edbus is now.. required. no point making it optional anymore.

SVN revision: 37255
This commit is contained in:
Carsten Haitzler 2008-10-27 22:52:49 +00:00
parent 94cbe9dcc2
commit 75a9bb7367
29 changed files with 35 additions and 112 deletions

View File

@ -194,6 +194,8 @@ PKG_CHECK_MODULES(E, [
efreet
efreet-mime
eina-0
edbus
ehal
])
requirements_e="evas ecore ecore-x ecore-evas ecore-con ecore-ipc ecore-job ecore-file eet edje efreet efreet-mime eina-0"
@ -226,23 +228,9 @@ PKG_CHECK_MODULES(BATTERY, [
ecore-con
])
PKG_CHECK_MODULES(E_DBUS, edbus, have_edbus=yes, have_edbus=no)
PKG_CHECK_MODULES(E_HAL, ehal, have_ehal=yes, have_ehal=no)
# this is used to conditionally build modules which depend on E_DBUS
AM_CONDITIONAL(HAVE_EDBUS, test x$have_edbus = "xyes")
define_e_dbus=""
if test x$have_edbus = "xyes"; then
define_e_dbus="-DHAVE_EDBUS"
requirements_e=$requirements_e" edbus"
if test x$have_ehal = "xyes"; then
AC_DEFINE(HAVE_EDBUS, 1, [E_Dbus support])
fi
fi
e_libs=$E_LIBS" "$LIBINTL" "$fnmatch_libs" "$ECORE_IMF_LIBS" "
e_cflags="-DUSE_E_CONFIG_H "$define_e_dbus" "$E_CFLAGS" "$E_DBUS_CFLAGS" "$ECORE_IMF_CFLAGS" "
e_configflags="-DUSE_E_CONFIG_H "$define_e_dbus" "
e_libs=$E_LIBS" "$LIBINTL" "$fnmatch_libs" "$ECORE_IMF_LIBS
e_cflags="-DUSE_E_CONFIG_H "$E_CFLAGS" "$ECORE_IMF_CFLAGS
e_configflags="-DUSE_E_CONFIG_H"
AC_SUBST(e_libs)
AC_SUBST(e_cflags)

View File

@ -7,7 +7,6 @@ INCLUDES = -I$(top_srcdir) \
@cf_cflags@ \
@VALGRIND_CFLAGS@ \
@EDJE_DEF@ \
@E_HAL_CFLAGS@ \
-DPACKAGE_BIN_DIR=\"@PACKAGE_BIN_DIR@\" \
-DPACKAGE_LIB_DIR=\"@PACKAGE_LIB_DIR@\" \
-DPACKAGE_DATA_DIR=\"@PACKAGE_DATA_DIR@\" \
@ -305,7 +304,7 @@ enlightenment_SOURCES = \
e_main.c \
$(enlightenment_src)
enlightenment_LDFLAGS = -export-dynamic @e_libs@ @x_libs@ @dlopen_libs@ @cf_libs@ @VALGRIND_LIBS@ @E_DBUS_LIBS@ @E_HAL_LIBS@
enlightenment_LDFLAGS = -export-dynamic @e_libs@ @x_libs@ @dlopen_libs@ @cf_libs@ @VALGRIND_LIBS@
enlightenment_remote_SOURCES = \
e.h \
@ -341,8 +340,8 @@ e_user.c \
e_sha1.c \
e_prefix.c
enlightenment_fm_LDFLAGS = @e_libs@ @dlopen_libs@ @E_DBUS_LIBS@ @E_HAL_LIBS@
enlightenment_fm_CFLAGS = $(INCLUDES) @E_HAL_CFLAGS@
enlightenment_fm_LDFLAGS = @e_libs@ @dlopen_libs@
enlightenment_fm_CFLAGS = $(INCLUDES)
enlightenment_fm_op_SOURCES = \
e_fm_op.c

View File

@ -77,9 +77,8 @@
#include <Edje.h>
#include <Efreet.h>
#include <Efreet_Mime.h>
#ifdef HAVE_EDBUS
#include <E_DBus.h>
#endif
#include <E_Hal.h>
#ifdef EAPI
#undef EAPI

View File

@ -33,6 +33,8 @@
#include <Evas.h>
#include <Efreet.h>
#include <Eet.h>
#include <E_DBus.h>
#include <E_Hal.h>
#include <eina_stringshare.h>
#include "config.h"
@ -43,12 +45,6 @@
#include "e_fm_op.h"
#include "e_prefix.h"
/* E_DBUS support */
#ifdef HAVE_EDBUS
#include <E_DBus.h>
#include <E_Hal.h>
#endif
/* FIXME: things to add to the slave enlightenment_fm process and ipc to e:
*
* * reporting results of fop's (current status - what has been don, what failed etc.)
@ -171,8 +167,6 @@ static void _e_dir_del(E_Dir *ed);
static const char *_e_prepare_command(E_Fm_Op_Type type, const char *args);
#ifdef HAVE_EDBUS
#ifndef EAPI
#define EAPI
#endif
@ -206,7 +200,6 @@ EAPI E_Volume *e_volume_find(const char *udi);
EAPI void e_volume_mount(E_Volume *v);
EAPI void e_volume_unmount(E_Volume *v);
#endif
/* local subsystem globals */
static Ecore_Ipc_Server *_e_ipc_server = NULL;
@ -217,7 +210,6 @@ static int _e_sync_num = 0;
static Eina_List *_e_fm_slaves = NULL;
static Eina_List *_e_fm_tasks = NULL;
#ifdef HAVE_EDBUS
static E_DBus_Connection *_e_dbus_conn = NULL;
/* contains:
@ -234,8 +226,6 @@ static E_DBus_Connection *_e_dbus_conn = NULL;
#include "e_fm_shared.h"
#undef E_FM_SHARED_CODEC
#endif
/* externally accessible functions */
int
main(int argc, char **argv)
@ -277,7 +267,6 @@ main(int argc, char **argv)
ecore_event_handler_add(ECORE_EXE_EVENT_ERROR, _e_fm_slave_error_cb, NULL);
ecore_event_handler_add(ECORE_EXE_EVENT_DEL, _e_fm_slave_del_cb, NULL);
#ifdef HAVE_EDBUS
_e_storage_volume_edd_init();
e_dbus_init();
_e_dbus_conn = e_dbus_bus_get(DBUS_BUS_SYSTEM);
@ -302,7 +291,6 @@ main(int argc, char **argv)
"org.freedesktop.Hal.Manager",
"NewCapability", _e_dbus_cb_cap_add, NULL);
}
#endif
if (_e_ipc_init()) ecore_main_loop_begin();
@ -312,11 +300,9 @@ main(int argc, char **argv)
_e_ipc_server = NULL;
}
#ifdef HAVE_EDBUS
if (_e_dbus_conn) e_dbus_connection_close(_e_dbus_conn);
e_dbus_shutdown();
_e_storage_volume_edd_shutdown();
#endif
e_prefix_shutdown();
@ -328,7 +314,6 @@ main(int argc, char **argv)
return 0;
}
#ifdef HAVE_EDBUS
static void
_e_dbus_cb_dev_all(void *user_data, void *reply_data, DBusError *error)
{
@ -937,8 +922,6 @@ e_volume_unmount(E_Volume *v)
_e_dbus_cb_vol_unmounted, v);
}
#endif
/* local subsystem functions */
static int
_e_ipc_init(void)
@ -1385,7 +1368,6 @@ _e_ipc_cb_server_data(void *data, int type, void *event)
}
break;
case E_FM_OP_MOUNT: /* mount udi mountpoint */
#ifdef HAVE_EDBUS
{
E_Volume *v;
const char *udi, *mountpoint;
@ -1404,10 +1386,8 @@ _e_ipc_cb_server_data(void *data, int type, void *event)
e_volume_mount(v);
}
}
#endif
break;
case E_FM_OP_UNMOUNT:/* unmount udi */
#ifdef HAVE_EDBUS
{
E_Volume *v;
const char *udi;
@ -1420,7 +1400,6 @@ _e_ipc_cb_server_data(void *data, int type, void *event)
e_volume_unmount(v);
}
}
#endif
break;
case E_FM_OP_QUIT: /* quit */
ecore_main_loop_quit();

View File

@ -1,7 +1,6 @@
#include "e.h"
/* local subsystem functions */
#ifdef HAVE_EDBUS
static void _e_msgbus_request_name_cb(void *data, DBusMessage *msg, DBusError *err);
static DBusMessage* _e_msgbus_core_restart_cb(E_DBus_Object *obj, DBusMessage *msg);
@ -18,7 +17,6 @@ static DBusMessage* _e_msgbus_profile_get_cb(E_DBus_Object *obj, DBusMessage *ms
static DBusMessage* _e_msgbus_profile_list_cb(E_DBus_Object *obj, DBusMessage *msg);
static DBusMessage* _e_msgbus_profile_add_cb(E_DBus_Object *obj, DBusMessage *msg);
static DBusMessage* _e_msgbus_profile_delete_cb(E_DBus_Object *obj, DBusMessage *msg);
#endif
/* local subsystem globals */
static E_Msgbus_Data *_e_msgbus_data = NULL;
@ -27,7 +25,6 @@ static E_Msgbus_Data *_e_msgbus_data = NULL;
EAPI int
e_msgbus_init(void)
{
#ifdef HAVE_EDBUS
E_DBus_Interface *iface;
_e_msgbus_data = E_NEW(E_Msgbus_Data, 1);
@ -84,16 +81,13 @@ e_msgbus_init(void)
e_dbus_interface_method_add(iface, "List", "", "as", _e_msgbus_profile_list_cb);
e_dbus_interface_method_add(iface, "Add", "s", "", _e_msgbus_profile_add_cb);
e_dbus_interface_method_add(iface, "Delete", "s", "", _e_msgbus_profile_delete_cb);
#endif
return 1;
}
EAPI int
e_msgbus_shutdown(void)
{
#ifdef HAVE_EDBUS
if (_e_msgbus_data->obj)
{
e_dbus_object_free(_e_msgbus_data->obj);
@ -106,11 +100,9 @@ e_msgbus_shutdown(void)
E_FREE(_e_msgbus_data);
_e_msgbus_data = NULL;
#endif
return 1;
}
#ifdef HAVE_EDBUS
EAPI void
e_msgbus_interface_attach(E_DBus_Interface *iface)
{
@ -357,6 +349,3 @@ _e_msgbus_profile_delete_cb(E_DBus_Object *obj, DBusMessage *msg)
return dbus_message_new_method_return(msg);
}
#endif

View File

@ -11,20 +11,16 @@ typedef struct _E_Msgbus_Data E_Msgbus_Data;
/* This is the dbus subsystem, but e_dbus namespace is taken by e_dbus */
#ifdef HAVE_EDBUS
struct _E_Msgbus_Data
{
E_DBus_Connection *conn;
E_DBus_Object *obj;
};
#endif
EAPI int e_msgbus_init(void);
EAPI int e_msgbus_shutdown(void);
#ifdef HAVE_EDBUS
EAPI void e_msgbus_interface_attach(E_DBus_Interface *iface);
EAPI void e_msgbus_interface_detach(E_DBus_Interface *iface);
#endif
#endif
#endif

View File

@ -19,7 +19,6 @@ INCLUDES = -I. \
pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
if HAVE_EDBUS
pkg_LTLIBRARIES = module.la
module_la_SOURCES = e_mod_main.h \
@ -27,10 +26,9 @@ module_la_SOURCES = e_mod_main.h \
e_iface.h \
e_iface.c
module_la_LIBADD = @e_libs@ @dlopen_libs@ @E_DBUS_LIBS@
module_la_LIBADD = @e_libs@ @dlopen_libs@
module_la_LDFLAGS = -module -avoid-version
module_la_DEPENDENCIES = $(top_builddir)/config.h
endif
uninstall:
rm -rf $(DESTDIR)$(libdir)/enlightenment/modules/$(MODULE)

View File

@ -1,4 +1,4 @@
#include <e.h>
#include "e.h"
#include "e_busycover.h"
#include "e_cfg.h"

View File

@ -1,4 +1,4 @@
#include <e.h>
#include "e.h"
#include "e_busywin.h"
#include "e_cfg.h"

View File

@ -1,14 +1,12 @@
#include "config.h"
#include <e.h>
#include "e.h"
#include "e_cfg.h"
#include "e_slipshelf.h"
#include "e_mod_win.h"
/* internal calls */
#ifdef HAVE_EDBUS
static void _e_cfg_dbus_if_init(void);
static void _e_cfg_dbus_if_shutdown(void);
#endif
static Evas_Object *_e_cfg_win_new(const char *title, const char *name, const char *themedir, void (*delfunc) (const void *data), const void *data);
static void _e_cfg_win_complete(Evas_Object *ol);
@ -119,18 +117,14 @@ e_cfg_init(E_Module *m)
e_configure_registry_generic_item_add("display/thumbscroll", 0, "Finger Scrolling", NULL, "enlightenment/thumbscroll", e_cfg_thumbscroll);
e_configure_registry_generic_item_add("display/gadgets", 0, "Shelf Gadgets", NULL, "enlightenment/gadgets", e_cfg_gadgets);
e_configure_registry_generic_item_add("display/fps", 0, "Framerate", NULL, "enlightenment/fps", e_cfg_fps);
#ifdef HAVE_EDBUS
_e_cfg_dbus_if_init();
#endif
return 1;
}
EAPI int
e_cfg_shutdown(void)
{
#ifdef HAVE_EDBUS
_e_cfg_dbus_if_shutdown();
#endif
e_configure_registry_item_del("display/fps");
e_configure_registry_item_del("display/gadgets");
e_configure_registry_item_del("display/thumbscroll");
@ -1280,7 +1274,6 @@ _theme_obj_new(Evas *e, const char *custom_dir, const char *group)
///////////////////////////////////////////////////////////////////////////////
#ifdef HAVE_EDBUS
typedef struct _DB_Method DB_Method;
struct _DB_Method
{
@ -2053,4 +2046,3 @@ _e_cfg_dbus_if_shutdown(void)
dbus_if = NULL;
}
}
#endif

View File

@ -1,4 +1,4 @@
#include <e.h>
#include "e.h"
#include "e_flaunch.h"
#include "e_cfg.h"

View File

@ -1,13 +1,8 @@
#include <e.h>
#include "e.h"
#include "e_kbd.h"
#include "e_mod_layout.h"
#include "e_cfg.h"
#ifdef HAVE_EDBUS
#include <E_DBus.h>
#include <E_Hal.h>
#endif
static void _e_kbd_layout_send(E_Kbd *kbd);
static Eina_List *handlers = NULL;
@ -668,7 +663,6 @@ _e_kbd_layout_send(E_Kbd *kbd)
ecore_x_e_virtual_keyboard_state_send(kbd->border->client.win, type);
}
#ifdef HAVE_EDBUS
// NOTES:
//
// on freerunner these are always there:
@ -941,7 +935,6 @@ _e_kbd_dbus_real_kbd_shutdown(void)
}
_e_kbd_dbus_have_real_keyboard = 0;
}
#endif
EAPI int
e_kbd_init(E_Module *m)
@ -995,9 +988,7 @@ e_kbd_init(E_Module *m)
(E_BORDER_HOOK_EVAL_END,
_e_kbd_cb_border_hook_end,
NULL));
#ifdef HAVE_EDBUS
_e_kbd_dbus_real_kbd_init();
#endif
return 1;
}
@ -1005,9 +996,7 @@ EAPI int
e_kbd_shutdown(void)
{
_e_kbd_apply_all_job_queue_end();
#ifdef HAVE_EDBUS
_e_kbd_dbus_real_kbd_shutdown();
#endif
while (border_hooks)
{
e_border_hook_del(border_hooks->data);

View File

@ -1,4 +1,4 @@
#include <e.h>
#include "e.h"
#include "e_kbd_buf.h"
#include "e_kbd_dict.h"
#include "e_cfg.h"

View File

@ -1,4 +1,4 @@
#include <e.h>
#include "e.h"
#include "e_kbd_dict.h"
#include <sys/types.h>

View File

@ -1,4 +1,4 @@
#include <e.h>
#include "e.h"
#include "e_kbd_buf.h"
#include "e_kbd_int.h"
#include "e_kbd_send.h"

View File

@ -1,4 +1,4 @@
#include <e.h>
#include "e.h"
#include "e_kbd_send.h"
static const char *

View File

@ -1,4 +1,4 @@
#include <e.h>
#include "e.h"
/***************************************************************************/
typedef struct _Instance Instance;

View File

@ -1,4 +1,4 @@
#include <e.h>
#include "e.h"
/***************************************************************************/
typedef struct _Instance Instance;

View File

@ -1,8 +1,4 @@
#include <e.h>
/* for complex link stuff */
#include "config.h"
#include <Ecore.h>
#include <E_DBus.h>
#include "e.h"
#include <stdio.h>
#include <stdlib.h>

View File

@ -1,4 +1,4 @@
#include <e.h>
#include "e.h"
/***************************************************************************/
typedef struct _Instance Instance;

View File

@ -1,4 +1,4 @@
#include <e.h>
#include "e.h"
/***************************************************************************/
typedef struct _Instance Instance;

View File

@ -1,4 +1,4 @@
#include <e.h>
#include "e.h"
#include "e_mod_main.h"
#include "e_mod_layout.h"
#include "e_kbd.h"

View File

@ -1,4 +1,4 @@
#include <e.h>
#include "e.h"
#include "e_cfg.h"
#include "e_kbd.h"

View File

@ -1,4 +1,4 @@
#include <e.h>
#include "e.h"
#include "e_mod_win.h"
#include "e_slipshelf.h"
#include "e_slipwin.h"

View File

@ -1,4 +1,4 @@
#include <e.h>
#include "e.h"
#include "e_pwr.h"
#include "e_cfg.h"

View File

@ -1,4 +1,4 @@
#include <e.h>
#include "e.h"
#include "e_slipshelf.h"
#include "e_winilist.h"
#include "e_cfg.h"

View File

@ -1,4 +1,4 @@
#include <e.h>
#include "e.h"
#include "e_slipwin.h"
EAPI int E_EVENT_SLIPWIN_DEL = 0;

View File

@ -1,4 +1,4 @@
#include <e.h>
#include "e.h"
#include "e_winilist.h"
/* internal calls */

View File

@ -15,7 +15,6 @@ INCLUDES = -I. \
pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
if HAVE_EDBUS
files_DATA = \
e-module-$(MODULE).edj \
module.desktop
@ -26,10 +25,9 @@ pkg_LTLIBRARIES = module.la
module_la_SOURCES = e_mod_main.c \
e_mod_main.h
module_la_LIBADD = @e_libs@ @dlopen_libs@ @E_DBUS_LIBS@
module_la_LIBADD = @e_libs@ @dlopen_libs@
module_la_LDFLAGS = -module -avoid-version
module_la_DEPENDENCIES = $(top_builddir)/config.h
endif
uninstall:
rm -rf $(DESTDIR)$(libdir)/enlightenment/modules/$(MODULE)