e_connman0_7x: phase-1 - revert to old code
authorbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 21 Nov 2011 20:16:57 +0000 (20:16 +0000)
committerbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 21 Nov 2011 20:16:57 +0000 (20:16 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/e_dbus@65496 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/connman/E_Connman.h
src/lib/connman/e_connman.c
src/lib/connman/e_connman_private.h
src/lib/connman/e_connman_service.c

index 499f62e..060ea1a 100644 (file)
@@ -138,7 +138,7 @@ EAPI Eina_Bool              e_connman_service_state_get(const E_Connman_Element
 EAPI Eina_Bool              e_connman_service_error_get(const E_Connman_Element *service, const char **error) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
 EAPI Eina_Bool              e_connman_service_name_get(const E_Connman_Element *service, const char **name) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
 EAPI Eina_Bool              e_connman_service_type_get(const E_Connman_Element *service, const char **type) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-EAPI Eina_Bool              e_connman_service_security2_get(const E_Connman_Element *service, unsigned int *count, const char ***security) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
+EAPI Eina_Bool              e_connman_service_security_get(const E_Connman_Element *service, unsigned int *count, const char ***security) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
 
 EAPI Eina_Bool              e_connman_service_passphrase_get(const E_Connman_Element *service, const char **passphrase) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
 EAPI Eina_Bool              e_connman_service_passphrase_set(E_Connman_Element *service, const char *passphrase, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
@@ -238,15 +238,6 @@ EAPI Eina_Bool              e_connman_element_is_profile(const E_Connman_Element
 EAPI Eina_Bool              e_connman_element_is_service(const E_Connman_Element *element) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
 EAPI Eina_Bool              e_connman_element_is_technology(const E_Connman_Element *element) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
 
-/* compat api's */
-EAPI Eina_Bool              e_connman_service_apn_get(const E_Connman_Element *service, const char **apn) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-EAPI Eina_Bool              e_connman_service_apn_set(E_Connman_Element *service, const char *apn, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
-EAPI Eina_Bool              e_connman_service_ethernet_netmask_get(const E_Connman_Element *service, const char **netmask) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-EAPI Eina_Bool              e_connman_service_mnc_get(const E_Connman_Element *service, const char **mnc) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-EAPI Eina_Bool              e_connman_service_mode_get(const E_Connman_Element *service, const char **mode) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-EAPI Eina_Bool              e_connman_service_security_get(const E_Connman_Element *service, const char **security) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-EAPI Eina_Bool              e_connman_service_setup_required_get(const E_Connman_Element *service, Eina_Bool *setup_required) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-
 #ifdef __cplusplus
 }
 #endif
index a1ebf23..2302bcd 100644 (file)
@@ -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;
 
@@ -68,12 +66,6 @@ const char *e_connman_prop_url = NULL;
 const char *e_connman_prop_servers = NULL;
 const char *e_connman_prop_excludes = NULL;
 
-/* compat api's - quickly pulled in old implementations */
-const char *e_connman_prop_apn = NULL;
-const char *e_connman_prop_mcc = NULL;
-const char *e_connman_prop_mode = NULL;
-const char *e_connman_prop_setup_required = NULL;
-
 int _e_dbus_connman_log_dom = -1;
 
 const char *
@@ -212,63 +204,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;
 }
@@ -331,13 +266,12 @@ e_connman_system_init(E_DBus_Connection *edbus_conn)
 #define ADD_STRINGSHARE(name, s)       \
    if (!name)                          \
       name = eina_stringshare_add(s)
-/* dynamically determined either net.connman or org.moblin...
+
    ADD_STRINGSHARE(e_connman_iface_manager, "net.connman.Manager");
    ADD_STRINGSHARE(e_connman_iface_profile, "net.connman.Profile");
    ADD_STRINGSHARE(e_connman_iface_service, "net.connman.Service");
    ADD_STRINGSHARE(e_connman_iface_connection, "net.connman.Connection");
    ADD_STRINGSHARE(e_connman_iface_technology, "net.connman.Technology");
- */
    ADD_STRINGSHARE(e_connman_prop_ipv4, "IPv4");
    ADD_STRINGSHARE(e_connman_prop_ipv4_configuration, "IPv4.Configuration");
    ADD_STRINGSHARE(e_connman_prop_ethernet, "Ethernet");
@@ -384,13 +318,6 @@ e_connman_system_init(E_DBus_Connection *edbus_conn)
    ADD_STRINGSHARE(e_connman_prop_url, "URL");
    ADD_STRINGSHARE(e_connman_prop_servers, "Servers");
    ADD_STRINGSHARE(e_connman_prop_excludes, "Excludes");
-   
-   /* compat api's - quickly pulled in old implementations */
-   ADD_STRINGSHARE(e_connman_prop_apn, "APN");
-   ADD_STRINGSHARE(e_connman_prop_mcc, "MCC");
-   ADD_STRINGSHARE(e_connman_prop_mode, "Mode");
-   ADD_STRINGSHARE(e_connman_prop_security, "Security");
-   ADD_STRINGSHARE(e_connman_prop_setup_required, "SetupRequired");
 
 #undef ADD_STRINGSHARE
 
@@ -405,12 +332,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;
@@ -494,12 +415,6 @@ e_connman_system_shutdown(void)
    _stringshare_del(&e_connman_prop_servers);
    _stringshare_del(&e_connman_prop_excludes);
 
-   /* compat api's - quickly pulled in old implementations */
-   _stringshare_del(&e_connman_prop_apn);
-   _stringshare_del(&e_connman_prop_mcc);
-   _stringshare_del(&e_connman_prop_mode);
-   _stringshare_del(&e_connman_prop_setup_required);
-   
    if (pending_get_name_owner)
      {
         dbus_pending_call_cancel(pending_get_name_owner);
@@ -521,3 +436,4 @@ e_connman_system_shutdown(void)
 
    return init_count;
 }
+
index ecda248..f13c936 100644 (file)
@@ -85,12 +85,6 @@ extern const char *e_connman_prop_url;
 extern const char *e_connman_prop_servers;
 extern const char *e_connman_prop_excludes;
 
-/* compat api's - quickly pulled in old implementations */
-extern const char *e_connman_prop_apn;
-extern const char *e_connman_prop_mcc;
-extern const char *e_connman_prop_mode;
-extern const char *e_connman_prop_setup_required;
-
 extern int _e_dbus_connman_log_dom;
 
 #ifndef EINA_LOG_DEFAULT_COLOR
index 8540a30..9638b4f 100644 (file)
@@ -351,7 +351,7 @@ e_connman_service_type_get(const E_Connman_Element *service, const char **type)
  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
  */
 Eina_Bool
-e_connman_service_security2_get(const E_Connman_Element *service, unsigned int *count, const char ***security)
+e_connman_service_security_get(const E_Connman_Element *service, unsigned int *count, const char ***security)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(count, EINA_FALSE);
@@ -1620,82 +1620,3 @@ e_connman_service_ethernet_mtu_get(const E_Connman_Element *service, unsigned sh
    return e_connman_element_property_dict_get_stringshared
              (service, e_connman_prop_ethernet, e_connman_prop_mtu, NULL, mtu);
 }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/* compat api's - quickly pulled in old implementations */
-EAPI Eina_Bool
-e_connman_service_apn_get(const E_Connman_Element *service, const char **apn)
-{
-   EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(apn, EINA_FALSE);
-   return e_connman_element_property_get_stringshared
-     (service, e_connman_prop_apn, NULL, apn);
-}
-
-EAPI Eina_Bool
-e_connman_service_apn_set(E_Connman_Element *service, const char *apn, E_DBus_Method_Return_Cb cb, const void *data)
-{
-   EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
-   return e_connman_element_property_set_full
-     (service, e_connman_prop_apn, DBUS_TYPE_STRING,
-         apn, cb, data);
-}
-
-EAPI Eina_Bool
-e_connman_service_ethernet_netmask_get(const E_Connman_Element *service, const char **netmask)
-{
-   EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(netmask, EINA_FALSE);
-   return e_connman_element_property_dict_get_stringshared
-     (service, e_connman_prop_ethernet, e_connman_prop_netmask, NULL, netmask);
-}
-
-EAPI Eina_Bool
-e_connman_service_mcc_get(const E_Connman_Element *service, const char **mcc)
-{
-   EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(mcc, EINA_FALSE);
-   return e_connman_element_property_get_stringshared
-     (service, e_connman_prop_mcc, NULL, mcc);
-}
-
-EAPI Eina_Bool
-e_connman_service_mode_get(const E_Connman_Element *service, const char **mode)
-{
-   EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(mode, EINA_FALSE);
-   return e_connman_element_property_get_stringshared
-     (service, e_connman_prop_mode, NULL, mode);
-}
-
-EAPI Eina_Bool
-e_connman_service_security_get(const E_Connman_Element *service, const char **security)
-{
-   EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(security, EINA_FALSE);
-   return e_connman_element_property_get_stringshared
-     (service, e_connman_prop_security, NULL, security);
-}
-
-EAPI Eina_Bool
-e_connman_service_setup_required_get(const E_Connman_Element *service, Eina_Bool *setup_required)
-{
-   EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(setup_required, EINA_FALSE);
-   return e_connman_element_property_get_stringshared
-     (service, e_connman_prop_setup_required, NULL, setup_required);
-}