From: lucas Date: Mon, 14 Nov 2011 15:18:40 +0000 (+0000) Subject: e_dbus/connman: Remove legacy interfaces X-Git-Tag: 2.0_alpha~43^2~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=9007aeae041b8e445dfd84cc6ca66d607fe10ead;p=framework%2Fuifw%2Fedbus.git e_dbus/connman: Remove legacy interfaces New methods only exist on new interface. Newer versions of ConnMan is already packaged by major distros so there's no need to keep the legacy stuff there. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/e_dbus@65173 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/connman/e_connman.c b/src/lib/connman/e_connman.c index 26dfb5b..198a957 100644 --- a/src/lib/connman/e_connman.c +++ b/src/lib/connman/e_connman.c @@ -4,12 +4,10 @@ static E_DBus_Signal_Handler *cb_name_owner_changed = NULL; static DBusPendingCall *pending_get_name_owner = NULL; -static DBusPendingCall *pending_get_name_owner_old = NULL; static unsigned int init_count = 0; static char *unique_name = NULL; static const char bus_name[] = "net.connman"; -static const char bus_name_old[] = "org.moblin.connman"; E_DBus_Connection *e_connman_conn = NULL; @@ -204,63 +202,6 @@ _e_connman_get_name_owner(void *data __UNUSED__, DBusMessage *msg, DBusError *er return; } - if (!e_connman_iface_manager) - e_connman_iface_manager = eina_stringshare_add("net.connman.Manager"); - - if (!e_connman_iface_profile) - e_connman_iface_profile = eina_stringshare_add("net.connman.Profile"); - - if (!e_connman_iface_service) - e_connman_iface_service = eina_stringshare_add("net.connman.Service"); - - if (!e_connman_iface_connection) - e_connman_iface_connection = eina_stringshare_add("net.connman.Connection"); - - if (!e_connman_iface_technology) - e_connman_iface_technology = eina_stringshare_add("net.connman.Technology"); - - _e_connman_system_name_owner_enter(uid); - return; -} - -static void -_e_connman_get_name_owner_old(void *data __UNUSED__, DBusMessage *msg, DBusError *err) -{ - DBusMessageIter itr; - int t; - const char *uid; - - pending_get_name_owner_old = NULL; - - if (!_dbus_callback_check_and_init(msg, &itr, err)) - return; - - t = dbus_message_iter_get_arg_type(&itr); - if (!_dbus_iter_type_check(t, DBUS_TYPE_STRING)) - return; - - dbus_message_iter_get_basic(&itr, &uid); - if (!uid) - { - ERR("no name owner!"); - return; - } - - if (!e_connman_iface_manager) - e_connman_iface_manager = eina_stringshare_add("org.moblin.connman.Manager"); - - if (!e_connman_iface_profile) - e_connman_iface_profile = eina_stringshare_add("org.moblin.connman.Profile"); - - if (!e_connman_iface_service) - e_connman_iface_service = eina_stringshare_add("org.moblin.connman.Service"); - - if (!e_connman_iface_connection) - e_connman_iface_connection = eina_stringshare_add("org.moblin.connman.Connection"); - - if (!e_connman_iface_technology) - e_connman_iface_technology = eina_stringshare_add("org.moblin.connman.Technology"); - _e_connman_system_name_owner_enter(uid); return; } @@ -320,6 +261,21 @@ e_connman_system_init(E_DBus_Connection *edbus_conn) if (E_CONNMAN_EVENT_ELEMENT_UPDATED == 0) E_CONNMAN_EVENT_ELEMENT_UPDATED = ecore_event_type_new(); + if (!e_connman_iface_manager) + e_connman_iface_manager = eina_stringshare_add("net.connman.Manager"); + + if (!e_connman_iface_profile) + e_connman_iface_profile = eina_stringshare_add("net.connman.Profile"); + + if (!e_connman_iface_service) + e_connman_iface_service = eina_stringshare_add("net.connman.Service"); + + if (!e_connman_iface_connection) + e_connman_iface_connection = eina_stringshare_add("net.connman.Connection"); + + if (!e_connman_iface_technology) + e_connman_iface_technology = eina_stringshare_add("net.connman.Technology"); + if (!e_connman_prop_available) e_connman_prop_available = eina_stringshare_add("Available"); @@ -451,12 +407,6 @@ e_connman_system_init(E_DBus_Connection *edbus_conn) pending_get_name_owner = e_dbus_get_name_owner (e_connman_conn, bus_name, _e_connman_get_name_owner, NULL); - if (pending_get_name_owner_old) - dbus_pending_call_cancel(pending_get_name_owner_old); - - pending_get_name_owner_old = e_dbus_get_name_owner - (e_connman_conn, bus_name_old, _e_connman_get_name_owner_old, NULL); - e_connman_elements_init(); return init_count;