EAPI Eina_Bool e_connman_service_login_required_get(const E_Connman_Element *service, Eina_Bool *login_required) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
EAPI Eina_Bool e_connman_service_roaming_get(const E_Connman_Element *service, Eina_Bool *roaming) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
+EAPI Eina_Bool e_connman_service_nameservers_get(const E_Connman_Element *service, unsigned int *count, const char ***nameserver) EINA_ARG_NONNULL(1, 2, 3) EINA_WARN_UNUSED_RESULT;
EAPI Eina_Bool e_connman_service_ipv4_method_get(const E_Connman_Element *service, const char **method) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
EAPI Eina_Bool e_connman_service_ipv4_address_get(const E_Connman_Element *service, const char **address) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
const char *e_connman_prop_technologies_available = NULL;
const char *e_connman_prop_technologies_enabled = NULL;
const char *e_connman_prop_technologies_connected = NULL;
+const char *e_connman_prop_nameservers = NULL;
int _e_dbus_connman_log_dom = -1;
ADD_STRINGSHARE(e_connman_prop_technologies_enabled, "EnabledTechnologies");
ADD_STRINGSHARE(e_connman_prop_technologies_connected,
"ConnectedTechnologies");
+ ADD_STRINGSHARE(e_connman_prop_nameservers, "Nameservers");
#undef ADD_STRINGSHARE
_stringshare_del(&e_connman_prop_technologies_available);
_stringshare_del(&e_connman_prop_technologies_enabled);
_stringshare_del(&e_connman_prop_technologies_connected);
+ _stringshare_del(&e_connman_prop_nameservers);
if (pending_get_name_owner)
{
}
/**
+ * Get property "Nameservers" 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 list of currently active nameservers for this service. If the server is
+ * not in READY or ONLINE state than this list will be empty.
+ *
+ * Global nameservers are automatically added to this list.
+ *
+ * The array represents a sorted list of the current nameservers. The first one
+ * has the highest priority and is used by default.
+ *
+ * When using DHCP this array represents the nameservers provided by the
+ * network. In case of manual settings, the ones from Nameservers.Configuration
+ * are used.
+ *
+ * @param service path to get property.
+ * @param count return the number of elements in array.
+ * @param nameservers array with pointers to internal strings. These
+ * strings are not copied in any way, and they are granted to
+ * be eina_stringshare instances, so one can use
+ * eina_stringshare_ref() if he wants to save memory and cpu to
+ * get an extra reference. The array itself is allocated using
+ * malloc() and should be freed after usage is done. This
+ * pointer is just set if return is @c EINA_TRUE.
+ *
+ * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
+ */
+Eina_Bool
+e_connman_service_nameservers_get(const E_Connman_Element *service, unsigned int *count, const char ***nameservers)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(nameservers, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(count, EINA_FALSE);
+ return e_connman_element_strings_array_get_stringshared
+ (service, e_connman_prop_nameservers, count, nameservers);
+}
+
+/**
* Get property "IPv4.Method" value.
*
* If this property isn't found then @c EINA_FALSE is returned.