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;
+EAPI Eina_Bool e_connman_service_ethernet_duplex_get(const E_Connman_Element *service, const char **duplex) 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_duplex_get (not in connman yet)
-
/* Low-Level API:
*
* Should just be used to work around problems until proper solution
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_duplex = 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_ethernet, "Ethernet");
ADD_STRINGSHARE(e_connman_prop_interface, "Interface");
ADD_STRINGSHARE(e_connman_prop_speed, "Speed");
+ ADD_STRINGSHARE(e_connman_prop_duplex, "Duplex");
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_ethernet);
_stringshare_del(&e_connman_prop_interface);
_stringshare_del(&e_connman_prop_speed);
+ _stringshare_del(&e_connman_prop_duplex);
_stringshare_del(&e_connman_prop_method);
_stringshare_del(&e_connman_prop_address);
_stringshare_del(&e_connman_prop_gateway);
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_duplex;
extern const char *e_connman_prop_method;
extern const char *e_connman_prop_address;
extern const char *e_connman_prop_gateway;
}
/**
+ * Get property "Ethernet.Duplex" 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 duplex settings of the line. Possible values are "half" and "full".
+ * This information might not always be available.
+ *
+ * @param service path to get property.
+ * @param duplex 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_service_ethernet_duplex_get(const E_Connman_Element *service, const char **duplex)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(duplex, EINA_FALSE);
+ return e_connman_element_property_dict_get_stringshared
+ (service, e_connman_prop_ethernet, e_connman_prop_duplex, NULL, duplex);
+}
+
+/**
* Get property "Ethernet.MTU" value.
*
* If this property isn't found then @c EINA_FALSE is returned.