}
static Eina_Bool
-_on_cmd_service_get_setup_required(__UNUSED__ char *cmd, char *args)
-{
- const char *path;
- Eina_Bool setup_required;
- E_Connman_Element *e;
-
- if (!args)
- {
- fputs("ERROR: missing the service path\n", stderr);
- return ECORE_CALLBACK_RENEW;
- }
- _tok(args);
- path = args;
-
- e = e_connman_service_get(path);
- if (e_connman_service_setup_required_get(e, &setup_required))
- printf(":::Service %s Setup Required = %hhu\n", path, setup_required);
- else
- fputs("ERROR: can't get service setup required\n", stderr);
- return ECORE_CALLBACK_RENEW;
-}
-
-static Eina_Bool
-_on_cmd_service_get_apn(__UNUSED__ char *cmd, char *args)
-{
- const char *apn, *path;
- E_Connman_Element *e;
-
- if (!args)
- {
- fputs("ERROR: missing the service path\n", stderr);
- return ECORE_CALLBACK_RENEW;
- }
- _tok(args);
- path = args;
-
- e = e_connman_service_get(path);
- if (e_connman_service_apn_get(e, &apn))
- printf(":::Service %s APN = \"%s\"\n", path, apn);
- else
- fputs("ERROR: can't get service APN\n", stderr);
- return ECORE_CALLBACK_RENEW;
-}
-
-static Eina_Bool
-_on_cmd_service_set_apn(__UNUSED__ char *cmd, char *args)
-{
- char *apn, *path;
- E_Connman_Element *e;
-
- if (!args)
- {
- fputs("ERROR: missing the service path\n", stderr);
- return ECORE_CALLBACK_RENEW;
- }
- path = args;
- apn = _tok(args);
-
- if (!apn)
- {
- fputs("ERROR: missing the apn value\n", stderr);
- return ECORE_CALLBACK_RENEW;
- }
- _tok(apn);
-
- e = e_connman_service_get(path);
- if (e_connman_service_apn_set
- (e, apn, _method_success_check, "service_set_apn"))
- printf(":::Service %s APN set to \"%s\"\n", path, apn);
- else
- fputs("ERROR: can't set service APN\n", stderr);
- return ECORE_CALLBACK_RENEW;
-}
-
-static Eina_Bool
-_on_cmd_service_get_mcc(__UNUSED__ char *cmd, char *args)
-{
- const char *mcc, *path;
- E_Connman_Element *e;
-
- if (!args)
- {
- fputs("ERROR: missing the service path\n", stderr);
- return ECORE_CALLBACK_RENEW;
- }
- _tok(args);
- path = args;
-
- e = e_connman_service_get(path);
- if (e_connman_service_mcc_get(e, &mcc))
- printf(":::Service %s MCC = \"%s\"\n", path, mcc);
- else
- fputs("ERROR: can't get service MCC\n", stderr);
- return ECORE_CALLBACK_RENEW;
-}
-
-static Eina_Bool
-_on_cmd_service_get_mnc(__UNUSED__ char *cmd, char *args)
-{
- const char *mnc, *path;
- E_Connman_Element *e;
-
- if (!args)
- {
- fputs("ERROR: missing the service path\n", stderr);
- return ECORE_CALLBACK_RENEW;
- }
- _tok(args);
- path = args;
-
- e = e_connman_service_get(path);
- if (e_connman_service_mnc_get(e, &mnc))
- printf(":::Service %s MNC = \"%s\"\n", path, mnc);
- else
- fputs("ERROR: can't get service MNC\n", stderr);
- return ECORE_CALLBACK_RENEW;
-}
-
-static Eina_Bool
_on_cmd_service_get_roaming(__UNUSED__ char *cmd, char *args)
{
const char *path;
{"service_get_immutable", _on_cmd_service_get_immutable},
{"service_get_auto_connect", _on_cmd_service_get_auto_connect},
{"service_set_auto_connect", _on_cmd_service_set_auto_connect},
- {"service_get_setup_required", _on_cmd_service_get_setup_required},
- {"service_get_apn", _on_cmd_service_get_apn},
- {"service_set_apn", _on_cmd_service_set_apn},
- {"service_get_mcc", _on_cmd_service_get_mcc},
- {"service_get_mnc", _on_cmd_service_get_mnc},
{"service_get_roaming", _on_cmd_service_get_roaming},
{"service_get_ipv4_method", _on_cmd_service_get_ipv4_method},
{"service_get_ipv4_address", _on_cmd_service_get_ipv4_address},
TEST_DESC_BOOL_GET(e_connman_service_immutable_get, 0),
TEST_DESC_BOOL_GET(e_connman_service_auto_connect_get, 0),
//TEST_DESC_BOOL_SET(e_connman_service_auto_connect_set, 1),
- TEST_DESC_BOOL_GET(e_connman_service_setup_required_get, 1),
- TEST_DESC_STRING_GET(e_connman_service_apn_get, 1),
- //TEST_DESC_STRING_SET(e_connman_service_apn_set, 1),
- TEST_DESC_STRING_GET(e_connman_service_mcc_get, 1),
- TEST_DESC_STRING_GET(e_connman_service_mnc_get, 1),
TEST_DESC_BOOL_GET(e_connman_service_roaming_get, 1),
TEST_DESC_STRING_GET(e_connman_service_ipv4_method_get, 1),
TEST_DESC_STRING_GET(e_connman_service_ipv4_address_get, 1),
EAPI Eina_Bool e_connman_service_auto_connect_get(const E_Connman_Element *service, Eina_Bool *auto_connect) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
EAPI Eina_Bool e_connman_service_auto_connect_set(E_Connman_Element *service, Eina_Bool auto_connect, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
-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;
-
-EAPI Eina_Bool e_connman_service_mcc_get(const E_Connman_Element *service, const char **mcc) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-EAPI Eina_Bool e_connman_service_mnc_get(const E_Connman_Element *service, const char **mnc) 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_ipv4_method_get(const E_Connman_Element *service, const char **method) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
const char *e_connman_prop_favorite = NULL;
const char *e_connman_prop_immutable = NULL;
const char *e_connman_prop_auto_connect = NULL;
-const char *e_connman_prop_setup_required = NULL;
-const char *e_connman_prop_apn = NULL;
-const char *e_connman_prop_mcc = NULL;
-const char *e_connman_prop_mnc = NULL;
const char *e_connman_prop_roaming = NULL;
const char *e_connman_prop_technology_default = NULL;
const char *e_connman_prop_technologies_available = NULL;
ADD_STRINGSHARE(e_connman_prop_favorite, "Favorite");
ADD_STRINGSHARE(e_connman_prop_immutable, "Immutable");
ADD_STRINGSHARE(e_connman_prop_auto_connect, "AutoConnect");
- ADD_STRINGSHARE(e_connman_prop_setup_required, "SetupRequired");
- ADD_STRINGSHARE(e_connman_prop_apn, "APN");
- ADD_STRINGSHARE(e_connman_prop_mcc, "MCC");
- ADD_STRINGSHARE(e_connman_prop_mnc, "MNC");
ADD_STRINGSHARE(e_connman_prop_roaming, "Roaming");
ADD_STRINGSHARE(e_connman_prop_technology_default, "DefaultTechnology");
ADD_STRINGSHARE(e_connman_prop_technologies_available,
_stringshare_del(&e_connman_prop_favorite);
_stringshare_del(&e_connman_prop_immutable);
_stringshare_del(&e_connman_prop_auto_connect);
- _stringshare_del(&e_connman_prop_setup_required);
- _stringshare_del(&e_connman_prop_apn);
- _stringshare_del(&e_connman_prop_mcc);
- _stringshare_del(&e_connman_prop_mnc);
_stringshare_del(&e_connman_prop_roaming);
_stringshare_del(&e_connman_prop_technology_default);
_stringshare_del(&e_connman_prop_technologies_available);
extern const char *e_connman_prop_favorite;
extern const char *e_connman_prop_immutable;
extern const char *e_connman_prop_auto_connect;
-extern const char *e_connman_prop_setup_required;
-extern const char *e_connman_prop_apn;
-extern const char *e_connman_prop_mcc;
-extern const char *e_connman_prop_mnc;
extern const char *e_connman_prop_roaming;
extern const char *e_connman_prop_technology_default;
extern const char *e_connman_prop_technologies_available;
}
/**
- * Get property "SetupRequired" 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.
- *
- * If the service is Cellular, then this property
- * indicates that some extra setup steps are required.
- *
- * In most cases it is required to fill in the APN
- * details.
- *
- * @param service path to get property.
- * @param setup_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.
- */
-Eina_Bool
-e_connman_service_setup_required_get(const E_Connman_Element *service, Eina_Bool *setup_required)
-{
- EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
- EINA_SAFETY_ON_NULL_RETURN_VAL(setup_required, EINA_FALSE);
- return e_connman_element_property_get_stringshared
- (service, e_connman_prop_setup_required, NULL, setup_required);
-}
-
-/**
- * Get property "APN" 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.
- *
- * If the service is Cellular, then this property
- * contains the APN details.
- *
- * The APN is network provider specific and even
- * sometimes data plan specific. Possible examples
- * are "isp.cingular" or "internet.t-mobile".
- *
- * This property might also not always be included
- * since it is protected by a different security policy.
- *
- * @param service path to get property.
- * @param apn 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.
- * @see e_connman_service_apn_set()
- */
-Eina_Bool
-e_connman_service_apn_get(const E_Connman_Element *service, const char **apn)
-{
- EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
- EINA_SAFETY_ON_NULL_RETURN_VAL(apn, EINA_FALSE);
- return e_connman_element_property_get_stringshared
- (service, e_connman_prop_apn, NULL, apn);
-}
-
-/**
- * Set property "APN" 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.
- *
- * If the service is Cellular, then this property
- * contains the APN details.
- *
- * The APN is network provider specific and even
- * sometimes data plan specific. Possible examples
- * are "isp.cingular" or "internet.t-mobile".
- *
- * This property might also not always be included
- * since it is protected by a different security policy.
- *
- * @param service path to get property.
- * @param passphrase value to set.
- * @param cb function to call when server replies or some error happens.
- * @param data data to give to cb when it is called.
- *
- * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
- * @see e_connman_service_apn_get()
- */
-Eina_Bool
-e_connman_service_apn_set(E_Connman_Element *service, const char *apn, E_DBus_Method_Return_Cb cb, const void *data)
-{
- EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
- return e_connman_element_property_set_full
- (service, e_connman_prop_apn, DBUS_TYPE_STRING,
- apn, cb, data);
-}
-
-/**
- * Get property "MCC" 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.
- *
- * If the service is Cellular, then this property
- * contains the Mobile Country Code.
- *
- * @param service path to get property.
- * @param mcc 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_mcc_get(const E_Connman_Element *service, const char **mcc)
-{
- EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
- EINA_SAFETY_ON_NULL_RETURN_VAL(mcc, EINA_FALSE);
- return e_connman_element_property_get_stringshared
- (service, e_connman_prop_mcc, NULL, mcc);
-}
-
-/**
- * Get property "MNC" 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.
- *
- * If the service is Cellular, then this property
- * contains the Mobile Network Code.
- *
- * @param service path to get property.
- * @param mnc 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_mnc_get(const E_Connman_Element *service, const char **mnc)
-{
- EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
- EINA_SAFETY_ON_NULL_RETURN_VAL(mnc, EINA_FALSE);
- return e_connman_element_property_get_stringshared
- (service, e_connman_prop_mnc, NULL, mnc);
-}
-
-/**
* Get property "Roaming" value.
*
* If this property isn't found then @c EINA_FALSE is returned.