EAPI Eina_Bool e_connman_service_ethernet_interface_get(const E_Connman_Element *service, const char **iface) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
EAPI Eina_Bool e_connman_service_ethernet_address_get(const E_Connman_Element *service, const char **address) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
EAPI Eina_Bool e_connman_service_ethernet_mtu_get(const E_Connman_Element *service, unsigned short *mtu) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
+EAPI Eina_Bool e_connman_service_ethernet_speed_get(const E_Connman_Element *service, unsigned short *speed) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
/* Methods to configure IPv4 service */
EAPI Eina_Bool e_connman_service_ipv4_configure_dhcp(E_Connman_Element *service, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
EAPI Eina_Bool e_connman_technology_name_get(const E_Connman_Element *technology, const char **state) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
EAPI Eina_Bool e_connman_technology_type_get(const E_Connman_Element *technology, const char **state) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-// TODO: ethernet_speed_get (not in connman yet)
// TODO: ethernet_duplex_get (not in connman yet)
/* Low-Level API:
const char *e_connman_prop_ipv4_configuration = NULL;
const char *e_connman_prop_ethernet = NULL;
const char *e_connman_prop_interface = NULL;
+const char *e_connman_prop_speed = NULL;
const char *e_connman_prop_method = NULL;
const char *e_connman_prop_address = NULL;
const char *e_connman_prop_gateway = NULL;
ADD_STRINGSHARE(e_connman_prop_ipv4_configuration, "IPv4.Configuration");
ADD_STRINGSHARE(e_connman_prop_ethernet, "Ethernet");
ADD_STRINGSHARE(e_connman_prop_interface, "Interface");
+ ADD_STRINGSHARE(e_connman_prop_speed, "Speed");
ADD_STRINGSHARE(e_connman_prop_method, "Method");
ADD_STRINGSHARE(e_connman_prop_address, "Address");
ADD_STRINGSHARE(e_connman_prop_gateway, "Gateway");
_stringshare_del(&e_connman_prop_ipv4_configuration);
_stringshare_del(&e_connman_prop_ethernet);
_stringshare_del(&e_connman_prop_interface);
+ _stringshare_del(&e_connman_prop_speed);
_stringshare_del(&e_connman_prop_method);
_stringshare_del(&e_connman_prop_address);
_stringshare_del(&e_connman_prop_gateway);
extern const char *e_connman_prop_ipv4_configuration;
extern const char *e_connman_prop_ethernet;
extern const char *e_connman_prop_interface;
+extern const char *e_connman_prop_speed;
extern const char *e_connman_prop_method;
extern const char *e_connman_prop_address;
extern const char *e_connman_prop_gateway;
}
/**
+ * 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.
+ *
+ * Selected speed of the line. This information might not always be available.
+ *
+ * @param service path to get property.
+ * @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.