EAPI Eina_Bool e_connman_service_error_get(const E_Connman_Element *service, const char **error) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
EAPI Eina_Bool e_connman_service_name_get(const E_Connman_Element *service, const char **name) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
EAPI Eina_Bool e_connman_service_type_get(const E_Connman_Element *service, const char **type) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-EAPI Eina_Bool e_connman_service_security2_get(const E_Connman_Element *service, unsigned int *count, const char ***security) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
+EAPI Eina_Bool e_connman_service_security_get(const E_Connman_Element *service, unsigned int *count, const char ***security) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
EAPI Eina_Bool e_connman_service_passphrase_get(const E_Connman_Element *service, const char **passphrase) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
EAPI Eina_Bool e_connman_service_passphrase_set(E_Connman_Element *service, const char *passphrase, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
EAPI Eina_Bool e_connman_element_is_service(const E_Connman_Element *element) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
EAPI Eina_Bool e_connman_element_is_technology(const E_Connman_Element *element) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
-/* compat api's */
-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_ethernet_netmask_get(const E_Connman_Element *service, const char **netmask) 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_mode_get(const E_Connman_Element *service, const char **mode) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-EAPI Eina_Bool e_connman_service_security_get(const E_Connman_Element *service, const char **security) EINA_ARG_NONNULL(1, 2) 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;
-
#ifdef __cplusplus
}
#endif
static E_DBus_Signal_Handler *cb_name_owner_changed = NULL;
static DBusPendingCall *pending_get_name_owner = NULL;
-static DBusPendingCall *pending_get_name_owner_old = NULL;
static unsigned int init_count = 0;
static char *unique_name = NULL;
static const char bus_name[] = "net.connman";
-static const char bus_name_old[] = "org.moblin.connman";
E_DBus_Connection *e_connman_conn = NULL;
const char *e_connman_prop_servers = NULL;
const char *e_connman_prop_excludes = NULL;
-/* compat api's - quickly pulled in old implementations */
-const char *e_connman_prop_apn = NULL;
-const char *e_connman_prop_mcc = NULL;
-const char *e_connman_prop_mode = NULL;
-const char *e_connman_prop_setup_required = NULL;
-
int _e_dbus_connman_log_dom = -1;
const char *
return;
}
- if (!e_connman_iface_manager)
- e_connman_iface_manager = eina_stringshare_add("net.connman.Manager");
-
- if (!e_connman_iface_profile)
- e_connman_iface_profile = eina_stringshare_add("net.connman.Profile");
-
- if (!e_connman_iface_service)
- e_connman_iface_service = eina_stringshare_add("net.connman.Service");
-
- if (!e_connman_iface_connection)
- e_connman_iface_connection = eina_stringshare_add("net.connman.Connection");
-
- if (!e_connman_iface_technology)
- e_connman_iface_technology = eina_stringshare_add("net.connman.Technology");
-
- _e_connman_system_name_owner_enter(uid);
- return;
-}
-
-static void
-_e_connman_get_name_owner_old(void *data __UNUSED__, DBusMessage *msg, DBusError *err)
-{
- DBusMessageIter itr;
- int t;
- const char *uid;
-
- pending_get_name_owner_old = NULL;
-
- if (!_dbus_callback_check_and_init(msg, &itr, err))
- return;
-
- t = dbus_message_iter_get_arg_type(&itr);
- if (!_dbus_iter_type_check(t, DBUS_TYPE_STRING))
- return;
-
- dbus_message_iter_get_basic(&itr, &uid);
- if (!uid)
- {
- ERR("no name owner!");
- return;
- }
-
- if (!e_connman_iface_manager)
- e_connman_iface_manager = eina_stringshare_add("org.moblin.connman.Manager");
-
- if (!e_connman_iface_profile)
- e_connman_iface_profile = eina_stringshare_add("org.moblin.connman.Profile");
-
- if (!e_connman_iface_service)
- e_connman_iface_service = eina_stringshare_add("org.moblin.connman.Service");
-
- if (!e_connman_iface_connection)
- e_connman_iface_connection = eina_stringshare_add("org.moblin.connman.Connection");
-
- if (!e_connman_iface_technology)
- e_connman_iface_technology = eina_stringshare_add("org.moblin.connman.Technology");
-
_e_connman_system_name_owner_enter(uid);
return;
}
#define ADD_STRINGSHARE(name, s) \
if (!name) \
name = eina_stringshare_add(s)
-/* dynamically determined either net.connman or org.moblin...
+
ADD_STRINGSHARE(e_connman_iface_manager, "net.connman.Manager");
ADD_STRINGSHARE(e_connman_iface_profile, "net.connman.Profile");
ADD_STRINGSHARE(e_connman_iface_service, "net.connman.Service");
ADD_STRINGSHARE(e_connman_iface_connection, "net.connman.Connection");
ADD_STRINGSHARE(e_connman_iface_technology, "net.connman.Technology");
- */
ADD_STRINGSHARE(e_connman_prop_ipv4, "IPv4");
ADD_STRINGSHARE(e_connman_prop_ipv4_configuration, "IPv4.Configuration");
ADD_STRINGSHARE(e_connman_prop_ethernet, "Ethernet");
ADD_STRINGSHARE(e_connman_prop_url, "URL");
ADD_STRINGSHARE(e_connman_prop_servers, "Servers");
ADD_STRINGSHARE(e_connman_prop_excludes, "Excludes");
-
- /* compat api's - quickly pulled in old implementations */
- ADD_STRINGSHARE(e_connman_prop_apn, "APN");
- ADD_STRINGSHARE(e_connman_prop_mcc, "MCC");
- ADD_STRINGSHARE(e_connman_prop_mode, "Mode");
- ADD_STRINGSHARE(e_connman_prop_security, "Security");
- ADD_STRINGSHARE(e_connman_prop_setup_required, "SetupRequired");
#undef ADD_STRINGSHARE
pending_get_name_owner = e_dbus_get_name_owner
(e_connman_conn, bus_name, _e_connman_get_name_owner, NULL);
- if (pending_get_name_owner_old)
- dbus_pending_call_cancel(pending_get_name_owner_old);
-
- pending_get_name_owner_old = e_dbus_get_name_owner
- (e_connman_conn, bus_name_old, _e_connman_get_name_owner_old, NULL);
-
e_connman_elements_init();
return init_count;
_stringshare_del(&e_connman_prop_servers);
_stringshare_del(&e_connman_prop_excludes);
- /* compat api's - quickly pulled in old implementations */
- _stringshare_del(&e_connman_prop_apn);
- _stringshare_del(&e_connman_prop_mcc);
- _stringshare_del(&e_connman_prop_mode);
- _stringshare_del(&e_connman_prop_setup_required);
-
if (pending_get_name_owner)
{
dbus_pending_call_cancel(pending_get_name_owner);
return init_count;
}
+
extern const char *e_connman_prop_servers;
extern const char *e_connman_prop_excludes;
-/* compat api's - quickly pulled in old implementations */
-extern const char *e_connman_prop_apn;
-extern const char *e_connman_prop_mcc;
-extern const char *e_connman_prop_mode;
-extern const char *e_connman_prop_setup_required;
-
extern int _e_dbus_connman_log_dom;
#ifndef EINA_LOG_DEFAULT_COLOR
* @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
*/
Eina_Bool
-e_connman_service_security2_get(const E_Connman_Element *service, unsigned int *count, const char ***security)
+e_connman_service_security_get(const E_Connman_Element *service, unsigned int *count, const char ***security)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(count, EINA_FALSE);
return e_connman_element_property_dict_get_stringshared
(service, e_connman_prop_ethernet, e_connman_prop_mtu, NULL, mtu);
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/* compat api's - quickly pulled in old implementations */
-EAPI 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);
-}
-
-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_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);
-}
-
-EAPI Eina_Bool
-e_connman_service_ethernet_netmask_get(const E_Connman_Element *service, const char **netmask)
-{
- EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
- EINA_SAFETY_ON_NULL_RETURN_VAL(netmask, EINA_FALSE);
- return e_connman_element_property_dict_get_stringshared
- (service, e_connman_prop_ethernet, e_connman_prop_netmask, NULL, netmask);
-}
-
-EAPI 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);
-}
-
-EAPI Eina_Bool
-e_connman_service_mode_get(const E_Connman_Element *service, const char **mode)
-{
- EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
- EINA_SAFETY_ON_NULL_RETURN_VAL(mode, EINA_FALSE);
- return e_connman_element_property_get_stringshared
- (service, e_connman_prop_mode, NULL, mode);
-}
-
-EAPI Eina_Bool
-e_connman_service_security_get(const E_Connman_Element *service, const char **security)
-{
- EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
- EINA_SAFETY_ON_NULL_RETURN_VAL(security, EINA_FALSE);
- return e_connman_element_property_get_stringshared
- (service, e_connman_prop_security, NULL, security);
-}
-
-EAPI 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);
-}