From 442e5ffc32f3d902fa2a92e8fa9e0b07c5b35ae0 Mon Sep 17 00:00:00 2001 From: rakuco Date: Wed, 29 May 2013 09:25:42 +0000 Subject: [PATCH] Adapt to the edbus->eldbus name change. Submitted by: Doug Newgard SVN revision: 84552 --- configure.ac | 2 +- src/bin/Makefile.am | 6 ++--- src/bin/main.c | 58 ++++++++++++++++++++++----------------------- 3 files changed, 33 insertions(+), 33 deletions(-) diff --git a/configure.ac b/configure.ac index fcc9158..62b88f4 100644 --- a/configure.ac +++ b/configure.ac @@ -59,7 +59,7 @@ AC_SUBST(ALL_LINGUAS) AM_GNU_GETTEXT_VERSION([0.12.1]) AM_GNU_GETTEXT([external]) -PKG_CHECK_MODULES([EDBUS], [edbus2]) +PKG_CHECK_MODULES([ELDBUS], [eldbus]) PKG_CHECK_MODULES([ELEMENTARY], [elementary]) PKG_CHECK_MODULES([EWEBKIT], [ewebkit ecore-file]) diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am index dfc3e70..adacad0 100644 --- a/src/bin/Makefile.am +++ b/src/bin/Makefile.am @@ -11,14 +11,14 @@ INCLUDES = \ -DLOCALEDIR=\"$(localedir)\" \ @ELEMENTARY_CFLAGS@ \ @EWEBKIT_CFLAGS@ \ -@EDBUS_CFLAGS@ +@ELDBUS_CFLAGS@ bin_PROGRAMS = eve if BUILD_QUICKLAUNCH bin_PROGRAMS += eve_ql endif -eve_LDADD = @ELEMENTARY_LIBS@ @EWEBKIT_LIBS@ @EDBUS_LIBS@ -lm +eve_LDADD = @ELEMENTARY_LIBS@ @EWEBKIT_LIBS@ @ELDBUS_LIBS@ -lm eve_SOURCES = main.c view.c chrome.c eve_state.c if BUILD_QUICKLAUNCH @@ -31,7 +31,7 @@ if BUILD_QUICKLAUNCH eve_qldir = $(quicklauncher_libdir) eve_ql_LTLIBRARIES = eve_ql.la eve_ql_la_SOURCES = main.c view.c chrome.c eve_state.c -eve_ql_la_LIBADD = @ELEMENTARY_LIBS@ @EWEBKIT_LIBS@ @EDBUS_LIBS@ -lm +eve_ql_la_LIBADD = @ELEMENTARY_LIBS@ @EWEBKIT_LIBS@ @ELDBUS_LIBS@ -lm eve_ql_la_CFLAGS = eve_ql_la_LDFLAGS = -module -avoid-version -no-undefined eve_ql_SOURCES = main.c diff --git a/src/bin/main.c b/src/bin/main.c index fc143e1..69e88b3 100644 --- a/src/bin/main.c +++ b/src/bin/main.c @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include "gettext.h" @@ -33,7 +33,7 @@ struct Cursor { }; struct Eve_DBus_Request_Name_Response { - EDBus_Connection *conn; + Eldbus_Connection *conn; const char *url; }; @@ -375,15 +375,15 @@ static const Ecore_Getopt options = { } }; -static EDBus_Message * -_cb_dbus_open_url(const EDBus_Service_Interface *iface __UNUSED__, - const EDBus_Message *msg) +static Eldbus_Message * +_cb_dbus_open_url(const Eldbus_Service_Interface *iface __UNUSED__, + const Eldbus_Message *msg) { Browser_Window *win = eina_list_data_get(app.windows); char *tmp_uri; char *uri; - if (!edbus_message_arguments_get(msg, "s", &tmp_uri)) + if (!eldbus_message_arguments_get(msg, "s", &tmp_uri)) goto end; if ((uri = uri_sanitize(tmp_uri))) @@ -393,52 +393,52 @@ _cb_dbus_open_url(const EDBus_Service_Interface *iface __UNUSED__, free(uri); } end: - return edbus_message_method_return_new(msg); + return eldbus_message_method_return_new(msg); } -static const EDBus_Method methods[] = { - { "open_url", EDBUS_ARGS({"s", "url"}), NULL, _cb_dbus_open_url }, +static const Eldbus_Method methods[] = { + { "open_url", ELDBUS_ARGS({"s", "url"}), NULL, _cb_dbus_open_url }, { } }; -static const EDBus_Service_Interface_Desc desc = { +static const Eldbus_Service_Interface_Desc desc = { "org.enlightenment.eve", methods }; static void -_cb_dbus_request_name(void *data, const EDBus_Message *msg, - EDBus_Pending *pending) +_cb_dbus_request_name(void *data, const Eldbus_Message *msg, + Eldbus_Pending *pending) { struct Eve_DBus_Request_Name_Response *response = data; unsigned ret; - if (edbus_message_error_get(msg, NULL, NULL)) + if (eldbus_message_error_get(msg, NULL, NULL)) goto cleanup; - if (!edbus_message_arguments_get(msg, "u", &ret)) + if (!eldbus_message_arguments_get(msg, "u", &ret)) goto cleanup; switch (ret) { - case EDBUS_NAME_REQUEST_REPLY_PRIMARY_OWNER: - case EDBUS_NAME_REQUEST_REPLY_ALREADY_OWNER: + case ELDBUS_NAME_REQUEST_REPLY_PRIMARY_OWNER: + case ELDBUS_NAME_REQUEST_REPLY_ALREADY_OWNER: { - edbus_service_interface_register(response->conn, + eldbus_service_interface_register(response->conn, "/org/enlightenment/eve", &desc); } break; - case EDBUS_NAME_REQUEST_REPLY_IN_QUEUE: - case EDBUS_NAME_REQUEST_REPLY_EXISTS: + case ELDBUS_NAME_REQUEST_REPLY_IN_QUEUE: + case ELDBUS_NAME_REQUEST_REPLY_EXISTS: { - EDBus_Message *open_url; + Eldbus_Message *open_url; ERR("eve is already running. Opening %s there and exiting", response->url); - open_url = edbus_message_method_call_new("org.enlightenment.eve", + open_url = eldbus_message_method_call_new("org.enlightenment.eve", "/org/enlightenment/eve", "org.enlightenment.eve", "open_url"); - edbus_message_arguments_append(open_url, "s", response->url); - edbus_connection_send(response->conn, open_url, NULL, NULL, -1); + eldbus_message_arguments_append(open_url, "s", response->url); + eldbus_connection_send(response->conn, open_url, NULL, NULL, -1); } elm_exit(); } @@ -633,7 +633,7 @@ elm_main(int argc, char **argv) const char *user_agent_str; char *backing_store_option = NULL; Backing_Store backing_store_enum; - EDBus_Connection *conn = NULL; + Eldbus_Connection *conn = NULL; size_t dirlen; Ecore_Timer *session_save_timer = NULL; @@ -718,7 +718,7 @@ elm_main(int argc, char **argv) elm_theme_extension_add(NULL, PACKAGE_DATA_DIR "/default.edj"); ewk_init(); eve_state_init(); - edbus_init(); + eldbus_init(); home = getenv("HOME"); if (!home || !home[0]) @@ -872,7 +872,7 @@ elm_main(int argc, char **argv) else url = config_home_page_get(config); - conn = edbus_connection_get(EDBUS_CONNECTION_TYPE_SESSION); + conn = eldbus_connection_get(ELDBUS_CONNECTION_TYPE_SESSION); if (conn) { struct Eve_DBus_Request_Name_Response *response = calloc(1, sizeof(*response)); @@ -881,7 +881,7 @@ elm_main(int argc, char **argv) response->conn = conn; response->url = url; - edbus_name_request(conn, "org.enlightenment.eve", 0, + eldbus_name_request(conn, "org.enlightenment.eve", 0, _cb_dbus_request_name, response); } @@ -912,7 +912,7 @@ end_fav: _cb_session_save(session); session_free(session); end_session: - if (conn) edbus_connection_unref(conn); + if (conn) eldbus_connection_unref(conn); if (session_save_timer) ecore_timer_del(session_save_timer); eina_log_domain_unregister(_log_domain); @@ -920,7 +920,7 @@ end_session: elm_shutdown(); ewk_shutdown(); eve_state_shutdown(); - edbus_shutdown(); + eldbus_shutdown(); return r; }