e_dbus/connman: Add getter/setter for LoginRequired
authorlucas <lucas@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 14 Nov 2011 15:18:48 +0000 (15:18 +0000)
committerlucas <lucas@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 14 Nov 2011 15:18:48 +0000 (15:18 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/e_dbus@65174 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/connman/E_Connman.h
src/lib/connman/e_connman.c
src/lib/connman/e_connman_private.h
src/lib/connman/e_connman_service.c

index 445cf92..2c0e8cc 100644 (file)
@@ -150,6 +150,7 @@ EAPI Eina_Bool              e_connman_service_auto_connect_set(E_Connman_Element
 
 EAPI Eina_Bool              e_connman_service_setup_required_get(const E_Connman_Element *service, Eina_Bool *setup_required) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
 EAPI Eina_Bool              e_connman_service_passphrase_required_get(const E_Connman_Element *service, Eina_Bool *passphrase_required) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
+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_apn_get(const E_Connman_Element *service, const char **apn) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
 EAPI Eina_Bool              e_connman_service_apn_set(E_Connman_Element *service, const char *apn, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
index 198a957..11e58ff 100644 (file)
@@ -51,6 +51,7 @@ const char *e_connman_prop_mode = NULL;
 const char *e_connman_prop_security = NULL;
 const char *e_connman_prop_passphrase = NULL;
 const char *e_connman_prop_passphrase_required = NULL;
+const char *e_connman_prop_login_required = NULL;
 const char *e_connman_prop_favorite = NULL;
 const char *e_connman_prop_immutable = NULL;
 const char *e_connman_prop_auto_connect = NULL;
@@ -360,6 +361,9 @@ e_connman_system_init(E_DBus_Connection *edbus_conn)
    if (!e_connman_prop_passphrase_required)
       e_connman_prop_passphrase_required = eina_stringshare_add("PassphraseRequired");
 
+   if (!e_connman_prop_login_required)
+      e_connman_prop_login_required = eina_stringshare_add("LoginRequired");
+
    if (!e_connman_prop_favorite)
       e_connman_prop_favorite = eina_stringshare_add("Favorite");
 
@@ -475,6 +479,7 @@ e_connman_system_shutdown(void)
    _stringshare_del(&e_connman_prop_security);
    _stringshare_del(&e_connman_prop_passphrase);
    _stringshare_del(&e_connman_prop_passphrase_required);
+   _stringshare_del(&e_connman_prop_login_required);
    _stringshare_del(&e_connman_prop_favorite);
    _stringshare_del(&e_connman_prop_immutable);
    _stringshare_del(&e_connman_prop_auto_connect);
index 9dfd762..d28cecb 100644 (file)
@@ -74,6 +74,7 @@ extern const char *e_connman_prop_technology_default;
 extern const char *e_connman_prop_technologies_available;
 extern const char *e_connman_prop_technologies_enabled;
 extern const char *e_connman_prop_technologies_connected;
+extern const char *e_connman_prop_login_required;
 
 extern int _e_dbus_connman_log_dom;
 
index 6bd7c1c..edf036e 100644 (file)
@@ -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.