e_dbus: remove connman methods for Network interface
authorlucas <lucas@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 10 Dec 2010 17:43:00 +0000 (17:43 +0000)
committerlucas <lucas@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 10 Dec 2010 17:43:00 +0000 (17:43 +0000)
Remove methods dealing with org.moblin.connman.Network interface.
These methods were marked as internal, low-level, and should not be
used. They are not supported anymore in stable branch of connman.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/e_dbus@55459 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/connman/E_Connman.h
src/lib/connman/Makefile.am
src/lib/connman/e_connman.c
src/lib/connman/e_connman_element.c
src/lib/connman/e_connman_manager.c
src/lib/connman/e_connman_network.c [deleted file]
src/lib/connman/e_connman_private.h

index bc62ba9..8a3bdbc 100644 (file)
@@ -218,7 +218,6 @@ EAPI Eina_Bool              e_connman_element_property_get(const E_Connman_Eleme
 EAPI Eina_Bool              e_connman_element_is_manager(const E_Connman_Element *element) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
 EAPI Eina_Bool              e_connman_element_is_device(const E_Connman_Element *element) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
 EAPI Eina_Bool              e_connman_element_is_profile(const E_Connman_Element *element) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
-EAPI Eina_Bool              e_connman_element_is_network(const E_Connman_Element *element) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
 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;
 
@@ -245,27 +244,6 @@ EAPI Eina_Bool              e_connman_device_scanning_get(const E_Connman_Elemen
 
 EAPI Eina_Bool              e_connman_device_networks_get(const E_Connman_Element *device, unsigned int *count, E_Connman_Element ***p_elements) EINA_ARG_NONNULL(1, 2, 3) EINA_WARN_UNUSED_RESULT;
 
-/* Network Methods: Low-Level API
- *
- * The network API is informational only, to set these parameters,
- * use the services API instead.
- */
-EAPI E_Connman_Element *    e_connman_network_get(const char *path) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
-
-EAPI Eina_Bool              e_connman_network_address_get(const E_Connman_Element *network, const char **address) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-EAPI Eina_Bool              e_connman_network_name_get(const E_Connman_Element *network, const char **name) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-EAPI Eina_Bool              e_connman_network_connected_get(const E_Connman_Element *network, Eina_Bool *connected) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-EAPI Eina_Bool              e_connman_network_strength_get(const E_Connman_Element *network, unsigned char *strength) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-EAPI Eina_Bool              e_connman_network_frequency_get(const E_Connman_Element *network, unsigned short *frequency) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-EAPI Eina_Bool              e_connman_network_device_get(const E_Connman_Element *network, E_Connman_Element **element) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-
-EAPI Eina_Bool              e_connman_network_wifi_ssid_get(const E_Connman_Element *network, unsigned int *count, unsigned char **wifi_ssid) EINA_ARG_NONNULL(1, 2, 3) EINA_WARN_UNUSED_RESULT;
-EAPI Eina_Bool              e_connman_network_wifi_mode_get(const E_Connman_Element *network, const char **wifi_mode) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-EAPI Eina_Bool              e_connman_network_wifi_security_get(const E_Connman_Element *network, const char **wifi_security) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-EAPI Eina_Bool              e_connman_network_wifi_passphrase_get(const E_Connman_Element *network, const char **wifi_passphrase) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-EAPI Eina_Bool              e_connman_network_wifi_channel_get(const E_Connman_Element *network, unsigned short *wifi_channel) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-EAPI Eina_Bool              e_connman_network_wifi_eap_get(const E_Connman_Element *network, const char **wifi_eap) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-
 #ifdef __cplusplus
 }
 #endif
index 6159129..afb61bb 100644 (file)
@@ -13,7 +13,6 @@ e_connman.c \
 e_connman_device.c \
 e_connman_element.c \
 e_connman_manager.c \
-e_connman_network.c \
 e_connman_profile.c \
 e_connman_service.c \
 e_connman_technology.c
index 45e07b4..d684f30 100644 (file)
@@ -18,7 +18,6 @@ EAPI int E_CONNMAN_EVENT_ELEMENT_DEL = 0;
 EAPI int E_CONNMAN_EVENT_ELEMENT_UPDATED = 0;
 
 const char *e_connman_iface_manager = NULL;
-const char *e_connman_iface_network = NULL;
 const char *e_connman_iface_profile = NULL;
 const char *e_connman_iface_service = NULL;
 const char *e_connman_iface_device = NULL;
@@ -41,8 +40,6 @@ const char *e_connman_prop_gateway = NULL;
 const char *e_connman_prop_netmask = NULL;
 const char *e_connman_prop_mtu = NULL;
 const char *e_connman_prop_name = NULL;
-const char *e_connman_prop_network = NULL;
-const char *e_connman_prop_networks = NULL;
 const char *e_connman_prop_offline_mode = NULL;
 const char *e_connman_prop_policy = NULL;
 const char *e_connman_prop_powered = NULL;
@@ -282,9 +279,6 @@ e_connman_system_init(E_DBus_Connection *edbus_conn)
    if (!e_connman_iface_manager)
       e_connman_iface_manager = eina_stringshare_add("org.moblin.connman.Manager");
 
-   if (!e_connman_iface_network)
-      e_connman_iface_network = eina_stringshare_add("org.moblin.connman.Network");
-
    if (!e_connman_iface_profile)
       e_connman_iface_profile = eina_stringshare_add("org.moblin.connman.Profile");
 
@@ -348,12 +342,6 @@ e_connman_system_init(E_DBus_Connection *edbus_conn)
    if (!e_connman_prop_name)
       e_connman_prop_name = eina_stringshare_add("Name");
 
-   if (!e_connman_prop_network)
-      e_connman_prop_network = eina_stringshare_add("Network");
-
-   if (!e_connman_prop_networks)
-      e_connman_prop_networks = eina_stringshare_add("Networks");
-
    if (!e_connman_prop_offline_mode)
       e_connman_prop_offline_mode = eina_stringshare_add("OfflineMode");
 
@@ -514,7 +502,6 @@ e_connman_system_shutdown(void)
       return init_count;
 
    _stringshare_del(&e_connman_iface_manager);
-   _stringshare_del(&e_connman_iface_network);
    _stringshare_del(&e_connman_iface_profile);
    _stringshare_del(&e_connman_iface_service);
    _stringshare_del(&e_connman_iface_device);
@@ -537,8 +524,6 @@ e_connman_system_shutdown(void)
    _stringshare_del(&e_connman_prop_netmask);
    _stringshare_del(&e_connman_prop_mtu);
    _stringshare_del(&e_connman_prop_name);
-   _stringshare_del(&e_connman_prop_network);
-   _stringshare_del(&e_connman_prop_networks);
    _stringshare_del(&e_connman_prop_offline_mode);
    _stringshare_del(&e_connman_prop_policy);
    _stringshare_del(&e_connman_prop_powered);
index 1cfe593..f61cf99 100644 (file)
@@ -458,12 +458,6 @@ _e_connman_element_get_interface(const char *key)
 
          break;
 
-      case 'N':
-         if (strcmp(tail, "etworks") == 0)
-            interface = e_connman_iface_network;
-
-         break;
-
       case 'S':
          if (strcmp(tail, "ervices") == 0)
             interface = e_connman_iface_service;
@@ -2382,13 +2376,6 @@ e_connman_element_is_profile(const E_Connman_Element *element)
 }
 
 Eina_Bool
-e_connman_element_is_network(const E_Connman_Element *element)
-{
-   EINA_SAFETY_ON_NULL_RETURN_VAL(element, EINA_FALSE);
-   return _e_connman_element_is(element, e_connman_iface_network);
-}
-
-Eina_Bool
 e_connman_element_is_service(const E_Connman_Element *element)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(element, EINA_FALSE);
index b6259c4..e5a1779 100644 (file)
@@ -280,8 +280,8 @@ e_connman_manager_technologies_get(unsigned int *count, E_Connman_Element ***p_e
 /**
  * Request to trigger a scan for given technology.
  *
- * Call method RequestScan(type) on server in order to
- * find new services and networks for such technology type.
+ * Call method RequestScan(type) on server in order to find new services for
+ * such technology type.
  *
  * The empty string for type means all technolgies.
  *
diff --git a/src/lib/connman/e_connman_network.c b/src/lib/connman/e_connman_network.c
deleted file mode 100644 (file)
index df8938c..0000000
+++ /dev/null
@@ -1,358 +0,0 @@
-#include "e_connman_private.h"
-
-E_Connman_Element *
-e_connman_network_get(const char *path)
-{
-   E_Connman_Element *network;
-
-   EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
-
-   network = e_connman_element_get(path);
-   if (!network)
-      return NULL;
-
-   if (!e_connman_element_is_network(network))
-     {
-        WRN("path '%s' is not a network!", path);
-        return NULL;
-     }
-
-   return network;
-}
-
-/**
- * Get property "Address" value.
- *
- * If this property isn't found then @c EINA_FALSE is returned.
- * If @c EINA_FALSE is returned, then this call failed and parameter-returned
- * values shall be considered invalid.
- *
- * The network hardware address (mac-address for ethernet, wifi...).
- *
- * This address can be used for directly displaying it in
- * the application. It has pure informational purpose.
- *
- * @param network path to get property.
- * @param address where to store the property value, must be a pointer
- *        to string (const char **), it will not be allocated or
- *        copied and references will be valid until element changes,
- *        so copy it if you want to use it later.
- *
- * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
- */
-Eina_Bool
-e_connman_network_address_get(const E_Connman_Element *network, const char **address)
-{
-   EINA_SAFETY_ON_NULL_RETURN_VAL(network, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(address, EINA_FALSE);
-   return e_connman_element_property_get_stringshared
-             (network, e_connman_prop_address, NULL, address);
-}
-
-/**
- * Get property "Name" value.
- *
- * If this property isn't found then @c EINA_FALSE is returned.
- * If @c EINA_FALSE is returned, then this call failed and parameter-returned
- * values shall be considered invalid.
- *
- * The pretty/long version of the network name. For
- * example in case of WiFi this should be the UTF-8
- * valid version of the SSID.
- *
- * @param network path to get property.
- * @param name where to store the property value, must be a pointer
- *        to string (const char **), it will not be allocated or
- *        copied and references will be valid until element changes,
- *        so copy it if you want to use it later.
- *
- * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
- */
-Eina_Bool
-e_connman_network_name_get(const E_Connman_Element *network, const char **name)
-{
-   EINA_SAFETY_ON_NULL_RETURN_VAL(network, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(name, EINA_FALSE);
-   return e_connman_element_property_get_stringshared
-             (network, e_connman_prop_name, NULL, name);
-}
-
-/**
- * Get property "Connected" value.
- *
- * If this property isn't found then @c EINA_FALSE is returned.
- * If @c EINA_FALSE is returned, then this call failed and parameter-returned
- * values shall be considered invalid.
- *
- * Indicates that this network is currently connected.
- *
- * @param network path to get property.
- * @param connected where to store the property value, must be a pointer
- *        to Eina_Bool (Eina_Bool **).
- *
- * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
- */
-Eina_Bool
-e_connman_network_connected_get(const E_Connman_Element *network, Eina_Bool *connected)
-{
-   EINA_SAFETY_ON_NULL_RETURN_VAL(network, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(connected, EINA_FALSE);
-   return e_connman_element_property_get_stringshared
-             (network, e_connman_prop_connected, NULL, connected);
-}
-
-/**
- * Get property "Strength" value.
- *
- * If this property isn't found then @c EINA_FALSE is returned.
- * If @c EINA_FALSE is returned, then this call failed and parameter-returned
- * values shall be considered invalid.
- *
- * Indicates the signal strength of the network. This
- * is a normalized value between 0 and 100.
- *
- * @param network path to get property.
- * @param strength where to store the property value, must be a pointer
- *        to byte (unsigned char*).
- *
- * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
- */
-Eina_Bool
-e_connman_network_strength_get(const E_Connman_Element *network, unsigned char *strength)
-{
-   EINA_SAFETY_ON_NULL_RETURN_VAL(network, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(strength, EINA_FALSE);
-   return e_connman_element_property_get_stringshared
-             (network, e_connman_prop_strength, NULL, strength);
-}
-
-/**
- * Get property "Frequency" value.
- *
- * If this property isn't found then @c EINA_FALSE is returned.
- * If @c EINA_FALSE is returned, then this call failed and parameter-returned
- * values shall be considered invalid.
- *
- * Indicates the frequency of the network.
- *
- * @param network path to get property.
- * @param frequency where to store the property value, must be a pointer
- *        to uint16 (unsigned short*).
- *
- * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
- */
-Eina_Bool
-e_connman_network_frequency_get(const E_Connman_Element *network, unsigned short *frequency)
-{
-   EINA_SAFETY_ON_NULL_RETURN_VAL(network, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(frequency, EINA_FALSE);
-   return e_connman_element_property_get_stringshared
-             (network, e_connman_prop_frequency, NULL, frequency);
-}
-
-/**
- * Get the device element this network
- * belongs to.
- *
- * @param network path to get property.
- * @param element where to store element, just changed if return is @c EINA_TRUE
- *
- * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
- */
-Eina_Bool
-e_connman_network_device_get(const E_Connman_Element *network, E_Connman_Element **element)
-{
-   char *device_path;
-
-   EINA_SAFETY_ON_NULL_RETURN_VAL(network, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(element, EINA_FALSE);
-
-   if (!e_connman_element_property_get_stringshared
-          (network, e_connman_prop_device, NULL, &device_path))
-      return EINA_FALSE;
-
-   *element = e_connman_element_get(device_path);
-   return EINA_TRUE;
-}
-
-/**
- * Get property "WiFi.SSID" value.
- *
- * If this property isn't found then @c EINA_FALSE is returned.
- * If @c EINA_FALSE is returned, then this call failed and parameter-returned
- * values shall be considered invalid.
- *
- * If the network type is WiFi, then this property is
- * present and contains the binary SSID value.
- *
- * @param network path to get property.
- * @param count return the number of elements in array.
- * @param wifi_ssid where to store the property value, must be a pointer
- *        to array of bytes (unsigned char **).
- *
- * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
- */
-Eina_Bool
-e_connman_network_wifi_ssid_get(const E_Connman_Element *network, unsigned int *count, unsigned char **wifi_ssid)
-{
-   EINA_SAFETY_ON_NULL_RETURN_VAL(network, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(wifi_ssid, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(count, EINA_FALSE);
-   *wifi_ssid = e_connman_element_bytes_array_get_stringshared
-         (network, e_connman_prop_wifi_ssid, count);
-   if (!*wifi_ssid)
-      return EINA_FALSE;
-
-   return EINA_TRUE;
-}
-
-/**
- * Get property "WiFi.Mode" value.
- *
- * If this property isn't found then @c EINA_FALSE is returned.
- * If @c EINA_FALSE is returned, then this call failed and parameter-returned
- * values shall be considered invalid.
- *
- * If the network type is WiFi, then this property is
- * present and contains the mode of the network. The
- * possible values are "managed" or "adhoc".
- *
- * For scanned networks this value is read only, but in
- * case the network was manually created it is also
- * changeable.
- *
- * @param network path to get property.
- * @param wifi_mode where to store the property value, must be a pointer
- *        to string (const char **), it will not be allocated or
- *        copied and references will be valid until element changes,
- *        so copy it if you want to use it later.
- *
- * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
- */
-Eina_Bool
-e_connman_network_wifi_mode_get(const E_Connman_Element *network, const char **wifi_mode)
-{
-   EINA_SAFETY_ON_NULL_RETURN_VAL(network, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(wifi_mode, EINA_FALSE);
-   return e_connman_element_property_get_stringshared
-             (network, e_connman_prop_wifi_mode, NULL, wifi_mode);
-}
-
-/**
- * Get property "WiFi.Security" value.
- *
- * If this property isn't found then @c EINA_FALSE is returned.
- * If @c EINA_FALSE is returned, then this call failed and parameter-returned
- * values shall be considered invalid.
- *
- * If the network type is WiFi, then this property is
- * present and contains the security method or key
- * management setting.
- *
- * For scanned networks this value is read only, but in
- * case the network was manually created it is also
- * changeable.
- *
- * Possible values are "none", "wep", "wpa" and "wpa2".
- *
- * @param network path to get property.
- * @param wifi_security where to store the property value, must be a pointer
- *        to string (const char **), it will not be allocated or
- *        copied and references will be valid until element changes,
- *        so copy it if you want to use it later.
- *
- * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
- */
-Eina_Bool
-e_connman_network_wifi_security_get(const E_Connman_Element *network, const char **wifi_security)
-{
-   EINA_SAFETY_ON_NULL_RETURN_VAL(network, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(wifi_security, EINA_FALSE);
-   return e_connman_element_property_get_stringshared
-             (network, e_connman_prop_wifi_security, NULL, wifi_security);
-}
-
-/**
- * Get property "WiFi.Passphrase" value.
- *
- * If this property isn't found then @c EINA_FALSE is returned.
- * If @c EINA_FALSE is returned, then this call failed and parameter-returned
- * values shall be considered invalid.
- *
- * If the network type is WiFi and a passhrase is
- * requires, then this property is present and contains
- * the passphrase in clear text.
- *
- * For systems using PolicyKit, the access to this value
- * will be protected by the security policy.
- *
- * @param network path to get property.
- * @param wifi_passphrase where to store the property value, must be a pointer
- *        to string (const char **), it will not be allocated or
- *        copied and references will be valid until element changes,
- *        so copy it if you want to use it later.
- *
- * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
- */
-Eina_Bool
-e_connman_network_wifi_passphrase_get(const E_Connman_Element *network, const char **wifi_passphrase)
-{
-   EINA_SAFETY_ON_NULL_RETURN_VAL(network, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(wifi_passphrase, EINA_FALSE);
-   return e_connman_element_property_get_stringshared
-             (network, e_connman_prop_wifi_passphrase, NULL, wifi_passphrase);
-}
-
-/**
- * Get property "WiFi.Channel" value.
- *
- * If this property isn't found then @c EINA_FALSE is returned.
- * If @c EINA_FALSE is returned, then this call failed and parameter-returned
- * values shall be considered invalid.
- *
- * Indicates the channel this network is.
- *
- * @param network path to get property.
- * @param channel where to store the property value, must be a pointer
- *        to uint16 (unsigned short*).
- *
- * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
- */
-Eina_Bool
-e_connman_network_wifi_channel_get(const E_Connman_Element *network, unsigned short *wifi_channel)
-{
-   EINA_SAFETY_ON_NULL_RETURN_VAL(network, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(wifi_channel, EINA_FALSE);
-   return e_connman_element_property_get_stringshared
-             (network, e_connman_prop_wifi_channel, NULL, wifi_channel);
-}
-
-/**
- * Get property "WiFi.EAP" value.
- *
- * If this property isn't found then @c EINA_FALSE is returned.
- * If @c EINA_FALSE is returned, then this call failed and parameter-returned
- * values shall be considered invalid.
- *
- * This property is only available if WiFi.Security is "ieee8021x".
- *
- * For systems using PolicyKit, the access to this value
- * will be protected by the security policy.
- *
- * @param network path to get property.
- * @param wifi_eap where to store the property value, must be a pointer
- *        to string (const char **), it will not be allocated or
- *        copied and references will be valid until element changes,
- *        so copy it if you want to use it later.
- *
- * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
- */
-Eina_Bool
-e_connman_network_wifi_eap_get(const E_Connman_Element *network, const char **wifi_eap)
-{
-   EINA_SAFETY_ON_NULL_RETURN_VAL(network, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(wifi_eap, EINA_FALSE);
-   return e_connman_element_property_get_stringshared
-             (network, e_connman_prop_wifi_eap, NULL, wifi_eap);
-}
-
index 4d9d3db..9974735 100644 (file)
@@ -29,7 +29,6 @@ void *    alloca (size_t);
 static const char manager_path[] = "/";
 
 extern const char *e_connman_iface_manager;
-extern const char *e_connman_iface_network;
 extern const char *e_connman_iface_profile;
 extern const char *e_connman_iface_service;
 extern const char *e_connman_iface_device;
@@ -52,8 +51,6 @@ extern const char *e_connman_prop_gateway;
 extern const char *e_connman_prop_netmask;
 extern const char *e_connman_prop_mtu;
 extern const char *e_connman_prop_name;
-extern const char *e_connman_prop_network;
-extern const char *e_connman_prop_networks;
 extern const char *e_connman_prop_offline_mode;
 extern const char *e_connman_prop_policy;
 extern const char *e_connman_prop_powered;