e_dbus/connman: add Ethernet.Speed property
[framework/uifw/edbus.git] / src / lib / connman / e_connman_service.c
index 344ade6..011f14b 100644 (file)
@@ -369,24 +369,24 @@ e_connman_service_mode_get(const E_Connman_Element *service, const char **mode)
  * values shall be considered invalid.
  *
  * If the service type is WiFi, then this property is
- * present and contains the security method or key
+ * present and contains the list of security method or key
  * management setting.
  *
- * Possible values are "none", "wep", "wpa" and "rsn".
+ * Possible values are "none", "wep", "wpa", "rsn", "psk", "ieee8021x" and "wps"
  *
  * This property might be only present for WiFi
  * services.
  *
  * @param service path to get property.
  * @param security where to store the property value, must be a pointer
- *        to string (const char **), it will not be allocated or
+ *        to E_Connman_Array, 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_service_security_get(const E_Connman_Element *service, const char **security)
+e_connman_service_security_get(const E_Connman_Element *service, const E_Connman_Array **security)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(security, EINA_FALSE);
@@ -493,6 +493,37 @@ e_connman_service_passphrase_required_get(const E_Connman_Element *service, Eina
 }
 
 /**
+ * Get property "LoginRequired" 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 a manual configuration must be done to login the
+ * user, likely access an website using a browser.
+ *
+ * If a login has been set already or if no
+ * login is needed, then this property will
+ * be set to false.
+ *
+ * @param service path to get property.
+ * @param login_required 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.
+ *
+ * @since 1.1.0
+ */
+Eina_Bool
+e_connman_service_login_required_get(const E_Connman_Element *service, Eina_Bool *login_required)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(login_required, EINA_FALSE);
+   return e_connman_element_property_get_stringshared
+             (service, e_connman_prop_login_required, NULL, login_required);
+}
+
+/**
  * Get property "Strength" value.
  *
  * If this property isn't found then @c EINA_FALSE is returned.
@@ -1152,7 +1183,7 @@ e_connman_service_ipv4_configure_manual(E_Connman_Element *service, const char *
  * If @c EINA_FALSE is returned, then this call failed and parameter-returned
  * values shall be considered invalid.
  *
- * The Ethernet configuration method. Possible values here "auto".
+ * The Ethernet configuration method. Possible values here "auto" and "manual".
  *
  * @param service path to get property.
  * @param method where to store the property value, must be a pointer
@@ -1172,16 +1203,16 @@ e_connman_service_ethernet_method_get(const E_Connman_Element *service, const ch
 }
 
 /**
- * Get property "Ethernet.Address" value.
+ * Get property "Ethernet.Interface" 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 current configured Ethernet address (mac-address).
+ * Interface name (for example eth0).
  *
  * @param service path to get property.
- * @param address where to store the property value, must be a pointer
+ * @param iface 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.
@@ -1189,25 +1220,48 @@ e_connman_service_ethernet_method_get(const E_Connman_Element *service, const ch
  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
  */
 Eina_Bool
-e_connman_service_ethernet_address_get(const E_Connman_Element *service, const char **address)
+e_connman_service_ethernet_interface_get(const E_Connman_Element *service, const char **iface)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(address, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(iface, EINA_FALSE);
    return e_connman_element_property_dict_get_stringshared
-             (service, e_connman_prop_ethernet, e_connman_prop_address, NULL, address);
+             (service, e_connman_prop_ethernet, e_connman_prop_interface, NULL, iface);
 }
 
 /**
- * Get property "Ethernet.Gateway" value.
+ * Get property "Ethernet.Speed" 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 current configured Ethernet MTU.
+ * Selected speed of the line. This information might not always be available.
  *
  * @param service path to get property.
- * @param gateway where to store the property value, must be a pointer
+ * @param speed where to store the property value.
+ *
+ * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
+ */
+Eina_Bool
+e_connman_service_ethernet_speed_get(const E_Connman_Element *service, unsigned short *speed)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(speed, EINA_FALSE);
+   return e_connman_element_property_dict_get_stringshared
+             (service, e_connman_prop_ethernet, e_connman_prop_speed, NULL, speed);
+}
+
+/**
+ * Get property "Ethernet.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 current configured Ethernet address (mac-address).
+ *
+ * @param service 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.
@@ -1215,25 +1269,25 @@ e_connman_service_ethernet_address_get(const E_Connman_Element *service, const c
  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
  */
 Eina_Bool
-e_connman_service_ethernet_mtu_get(const E_Connman_Element *service, unsigned short *mtu)
+e_connman_service_ethernet_address_get(const E_Connman_Element *service, const char **address)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(mtu, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(address, EINA_FALSE);
    return e_connman_element_property_dict_get_stringshared
-             (service, e_connman_prop_ethernet, e_connman_prop_mtu, NULL, mtu);
+             (service, e_connman_prop_ethernet, e_connman_prop_address, NULL, address);
 }
 
 /**
- * Get property "Ethernet.Netmask" value.
+ * Get property "Ethernet.MTU" 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 current configured Ethernet netmask.
+ * The current configured Ethernet MTU.
  *
  * @param service path to get property.
- * @param netmask where to store the property value, must be a pointer
+ * @param gateway 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.
@@ -1241,11 +1295,10 @@ e_connman_service_ethernet_mtu_get(const E_Connman_Element *service, unsigned sh
  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
  */
 Eina_Bool
-e_connman_service_ethernet_netmask_get(const E_Connman_Element *service, const char **netmask)
+e_connman_service_ethernet_mtu_get(const E_Connman_Element *service, unsigned short *mtu)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(netmask, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(mtu, EINA_FALSE);
    return e_connman_element_property_dict_get_stringshared
-             (service, e_connman_prop_ethernet, e_connman_prop_netmask, NULL, netmask);
+             (service, e_connman_prop_ethernet, e_connman_prop_mtu, NULL, mtu);
 }
-