X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Flib%2Fconnman%2Fe_connman.c;h=bcd10384a0a0d67bbd8eaad456d21d07f42d53a2;hb=ad78d1a6ed407c226d50abd4c88d3c76c6f91762;hp=16619cb187f44bb77324564f71f682b68d00c0c9;hpb=8cfeb0d4ba839d8dc3c0e7c4dd31822032e493ef;p=framework%2Fuifw%2Fedbus.git diff --git a/src/lib/connman/e_connman.c b/src/lib/connman/e_connman.c index 16619cb..bcd1038 100644 --- a/src/lib/connman/e_connman.c +++ b/src/lib/connman/e_connman.c @@ -8,9 +8,6 @@ static unsigned int init_count = 0; static char *unique_name = NULL; static const char bus_name[] = "org.moblin.connman"; -static const char fdo_bus_name[] = "org.freedesktop.DBus"; -static const char fdo_interface[] = "org.freedesktop.DBus"; -static const char fdo_path[] = "/org/freedesktop/DBus"; E_DBus_Connection *e_connman_conn = NULL; @@ -26,6 +23,7 @@ const char *e_connman_iface_profile = NULL; const char *e_connman_iface_service = NULL; const char *e_connman_iface_device = NULL; const char *e_connman_iface_connection = NULL; +const char *e_connman_iface_technology = NULL; const char *e_connman_prop_available = NULL; const char *e_connman_prop_connected = NULL; @@ -34,9 +32,14 @@ const char *e_connman_prop_default = NULL; const char *e_connman_prop_device = NULL; const char *e_connman_prop_devices = NULL; const char *e_connman_prop_interface = NULL; -const char *e_connman_prop_ipv4_address = NULL; -const char *e_connman_prop_ipv4_method = NULL; +const char *e_connman_prop_ipv4 = NULL; +const char *e_connman_prop_ipv4_configuration = NULL; +const char *e_connman_prop_ethernet = NULL; +const char *e_connman_prop_method = NULL; const char *e_connman_prop_address = NULL; +const char *e_connman_prop_gateway = NULL; +const char *e_connman_prop_netmask = NULL; +const char *e_connman_prop_mtu = NULL; const char *e_connman_prop_name = NULL; const char *e_connman_prop_network = NULL; const char *e_connman_prop_networks = NULL; @@ -45,17 +48,22 @@ const char *e_connman_prop_policy = NULL; const char *e_connman_prop_powered = NULL; const char *e_connman_prop_priority = NULL; const char *e_connman_prop_profiles = NULL; +const char *e_connman_prop_profile_active = NULL; const char *e_connman_prop_services = NULL; +const char *e_connman_prop_technologies = NULL; const char *e_connman_prop_remember = NULL; const char *e_connman_prop_scan_interval = NULL; const char *e_connman_prop_scanning = NULL; const char *e_connman_prop_state = NULL; -const char *e_connman_prop_strengh = NULL; +const char *e_connman_prop_strength = NULL; +const char *e_connman_prop_frequency = NULL; const char *e_connman_prop_type = NULL; const char *e_connman_prop_wifi_mode = NULL; const char *e_connman_prop_wifi_passphrase = NULL; const char *e_connman_prop_wifi_security = NULL; const char *e_connman_prop_wifi_ssid = NULL; +const char *e_connman_prop_wifi_channel = NULL; +const char *e_connman_prop_wifi_eap = NULL; const char *e_connman_prop_error = NULL; const char *e_connman_prop_mode = NULL; const char *e_connman_prop_security = NULL; @@ -69,6 +77,10 @@ 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; +const char *e_connman_prop_technologies_enabled= NULL; +const char *e_connman_prop_technologies_connected = NULL; int _e_dbus_connman_log_dom = -1; @@ -103,16 +115,16 @@ e_connman_manager_sync_elements(void) E_Connman_Element *manager; if (!unique_name) - return FALSE; + return EINA_FALSE; manager = e_connman_element_register(manager_path, e_connman_iface_manager); if (manager) e_connman_element_properties_sync(manager); else - return FALSE; + return EINA_FALSE; DBG("sync_manager: %s (%s)", unique_name, bus_name); - return TRUE; + return EINA_TRUE; } static void @@ -260,107 +272,137 @@ e_connman_system_init(E_DBus_Connection *edbus_conn) if (E_CONNMAN_EVENT_ELEMENT_UPDATED == 0) E_CONNMAN_EVENT_ELEMENT_UPDATED = ecore_event_type_new(); - if (e_connman_iface_manager == NULL) + if (!e_connman_iface_manager) e_connman_iface_manager = eina_stringshare_add("org.moblin.connman.Manager"); - if (e_connman_iface_network == NULL) + if (!e_connman_iface_network) e_connman_iface_network = eina_stringshare_add("org.moblin.connman.Network"); - if (e_connman_iface_profile == NULL) + if (!e_connman_iface_profile) e_connman_iface_profile = eina_stringshare_add("org.moblin.connman.Profile"); - if (e_connman_iface_service == NULL) + if (!e_connman_iface_service) e_connman_iface_service = eina_stringshare_add("org.moblin.connman.Service"); - if (e_connman_iface_device == NULL) + if (!e_connman_iface_device) e_connman_iface_device = eina_stringshare_add("org.moblin.connman.Device"); - if (e_connman_iface_connection == NULL) + 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"); - if (e_connman_prop_available == NULL) + if (!e_connman_prop_available) e_connman_prop_available = eina_stringshare_add("Available"); - if (e_connman_prop_connected == NULL) + if (!e_connman_prop_connected) e_connman_prop_connected = eina_stringshare_add("Connected"); - if (e_connman_prop_connections == NULL) + if (!e_connman_prop_connections) e_connman_prop_connections = eina_stringshare_add("Connections"); - if (e_connman_prop_default == NULL) + if (!e_connman_prop_default) e_connman_prop_default = eina_stringshare_add("Default"); - if (e_connman_prop_device == NULL) + if (!e_connman_prop_device) e_connman_prop_device = eina_stringshare_add("Device"); - if (e_connman_prop_devices == NULL) + if (!e_connman_prop_devices) e_connman_prop_devices = eina_stringshare_add("Devices"); - if (e_connman_prop_interface == NULL) + if (!e_connman_prop_interface) e_connman_prop_interface = eina_stringshare_add("Interface"); - if (e_connman_prop_ipv4_address == NULL) - e_connman_prop_ipv4_address = eina_stringshare_add("IPv4.Address"); - if (e_connman_prop_ipv4_method == NULL) - e_connman_prop_ipv4_method = eina_stringshare_add("IPv4.Method"); - if (e_connman_prop_address == NULL) + if (!e_connman_prop_ipv4) + e_connman_prop_ipv4 = eina_stringshare_add("IPv4"); + if (!e_connman_prop_ipv4_configuration) + e_connman_prop_ipv4_configuration = eina_stringshare_add("IPv4.Configuration"); + if (!e_connman_prop_ethernet) + e_connman_prop_ethernet = eina_stringshare_add("Ethernet"); + if (!e_connman_prop_method) + e_connman_prop_method = eina_stringshare_add("Method"); + if (!e_connman_prop_address) e_connman_prop_address = eina_stringshare_add("Address"); - if (e_connman_prop_name == NULL) + if (!e_connman_prop_gateway) + e_connman_prop_gateway = eina_stringshare_add("Gateway"); + if (!e_connman_prop_netmask) + e_connman_prop_netmask = eina_stringshare_add("Netmask"); + if (!e_connman_prop_mtu) + e_connman_prop_mtu = eina_stringshare_add("MTU"); + if (!e_connman_prop_name) e_connman_prop_name = eina_stringshare_add("Name"); - if (e_connman_prop_network == NULL) + if (!e_connman_prop_network) e_connman_prop_network = eina_stringshare_add("Network"); - if (e_connman_prop_networks == NULL) + if (!e_connman_prop_networks) e_connman_prop_networks = eina_stringshare_add("Networks"); - if (e_connman_prop_offline_mode == NULL) + if (!e_connman_prop_offline_mode) e_connman_prop_offline_mode = eina_stringshare_add("OfflineMode"); - if (e_connman_prop_policy == NULL) + if (!e_connman_prop_policy) e_connman_prop_policy = eina_stringshare_add("Policy"); - if (e_connman_prop_powered == NULL) + if (!e_connman_prop_powered) e_connman_prop_powered = eina_stringshare_add("Powered"); - if (e_connman_prop_priority == NULL) + if (!e_connman_prop_priority) e_connman_prop_priority = eina_stringshare_add("Priority"); - if (e_connman_prop_profiles == NULL) + if (!e_connman_prop_profiles) e_connman_prop_profiles = eina_stringshare_add("Profiles"); - if (e_connman_prop_services == NULL) + if (!e_connman_prop_profile_active) + e_connman_prop_profile_active = eina_stringshare_add("ActiveProfile"); + if (!e_connman_prop_services) e_connman_prop_services = eina_stringshare_add("Services"); - if (e_connman_prop_remember == NULL) + if (!e_connman_prop_technologies) + e_connman_prop_technologies = eina_stringshare_add("Technologies"); + if (!e_connman_prop_remember) e_connman_prop_remember = eina_stringshare_add("Remember"); - if (e_connman_prop_scan_interval == NULL) + if (!e_connman_prop_scan_interval) e_connman_prop_scan_interval = eina_stringshare_add("ScanInterval"); - if (e_connman_prop_scanning == NULL) + if (!e_connman_prop_scanning) e_connman_prop_scanning = eina_stringshare_add("Scanning"); - if (e_connman_prop_state == NULL) + if (!e_connman_prop_state) e_connman_prop_state = eina_stringshare_add("State"); - if (e_connman_prop_strengh == NULL) - e_connman_prop_strengh = eina_stringshare_add("Strength"); - if (e_connman_prop_type == NULL) + if (!e_connman_prop_strength) + e_connman_prop_strength = eina_stringshare_add("Strength"); + if (!e_connman_prop_frequency) + e_connman_prop_frequency = eina_stringshare_add("Frequency"); + if (!e_connman_prop_type) e_connman_prop_type = eina_stringshare_add("Type"); - if (e_connman_prop_wifi_mode == NULL) + if (!e_connman_prop_wifi_mode) e_connman_prop_wifi_mode = eina_stringshare_add("WiFi.Mode"); - if (e_connman_prop_wifi_passphrase == NULL) + if (!e_connman_prop_wifi_passphrase) e_connman_prop_wifi_passphrase = eina_stringshare_add("WiFi.Passphrase"); - if (e_connman_prop_wifi_security == NULL) + if (!e_connman_prop_wifi_security) e_connman_prop_wifi_security = eina_stringshare_add("WiFi.Security"); - if (e_connman_prop_wifi_ssid == NULL) + if (!e_connman_prop_wifi_ssid) e_connman_prop_wifi_ssid = eina_stringshare_add("WiFi.SSID"); - if (e_connman_prop_error == NULL) + if (!e_connman_prop_wifi_channel) + e_connman_prop_wifi_channel = eina_stringshare_add("WiFi.Channel"); + if (!e_connman_prop_wifi_eap) + e_connman_prop_wifi_eap = eina_stringshare_add("WiFi.EAP"); + if (!e_connman_prop_error) e_connman_prop_error = eina_stringshare_add("Error"); - if (e_connman_prop_mode == NULL) + if (!e_connman_prop_mode) e_connman_prop_mode = eina_stringshare_add("Mode"); - if (e_connman_prop_security == NULL) + if (!e_connman_prop_security) e_connman_prop_security = eina_stringshare_add("Security"); - if (e_connman_prop_passphrase == NULL) + if (!e_connman_prop_passphrase) e_connman_prop_passphrase = eina_stringshare_add("Passphrase"); - if (e_connman_prop_passphrase_required == NULL) + if (!e_connman_prop_passphrase_required) e_connman_prop_passphrase_required = eina_stringshare_add("PassphraseRequired"); - if (e_connman_prop_favorite == NULL) + if (!e_connman_prop_favorite) e_connman_prop_favorite = eina_stringshare_add("Favorite"); - if (e_connman_prop_immutable == NULL) + if (!e_connman_prop_immutable) e_connman_prop_immutable = eina_stringshare_add("Immutable"); - if (e_connman_prop_auto_connect == NULL) + if (!e_connman_prop_auto_connect) e_connman_prop_auto_connect = eina_stringshare_add("AutoConnect"); - if (e_connman_prop_setup_required == NULL) + if (!e_connman_prop_setup_required) e_connman_prop_setup_required = eina_stringshare_add("SetupRequired"); - if (e_connman_prop_apn == NULL) + if (!e_connman_prop_apn) e_connman_prop_apn = eina_stringshare_add("APN"); - if (e_connman_prop_mcc == NULL) + if (!e_connman_prop_mcc) e_connman_prop_mcc = eina_stringshare_add("MCC"); - if (e_connman_prop_mnc == NULL) + if (!e_connman_prop_mnc) e_connman_prop_mnc = eina_stringshare_add("MCN"); - if (e_connman_prop_roaming == NULL) + if (!e_connman_prop_roaming) e_connman_prop_roaming = eina_stringshare_add("Roaming"); + if (!e_connman_prop_technology_default) + e_connman_prop_technology_default = eina_stringshare_add("DefaultTechnology"); + if (!e_connman_prop_technologies_available) + e_connman_prop_technologies_available = eina_stringshare_add("AvailableTechnologies"); + if (!e_connman_prop_technologies_enabled) + e_connman_prop_technologies_enabled = eina_stringshare_add("EnabledTechnologies"); + if (!e_connman_prop_technologies_connected) + e_connman_prop_technologies_connected = eina_stringshare_add("ConnectedTechnologies"); e_connman_conn = edbus_conn; cb_name_owner_changed = e_dbus_signal_handler_add - (e_connman_conn, fdo_bus_name, fdo_path, fdo_interface, "NameOwnerChanged", + (e_connman_conn, E_DBUS_FDO_BUS, E_DBUS_FDO_PATH, E_DBUS_FDO_INTERFACE, "NameOwnerChanged", _e_connman_system_name_owner_changed, NULL); if (pending_get_name_owner) @@ -407,6 +449,7 @@ e_connman_system_shutdown(void) _stringshare_del(&e_connman_iface_service); _stringshare_del(&e_connman_iface_device); _stringshare_del(&e_connman_iface_connection); + _stringshare_del(&e_connman_iface_technology); _stringshare_del(&e_connman_prop_available); _stringshare_del(&e_connman_prop_connected); @@ -415,9 +458,14 @@ e_connman_system_shutdown(void) _stringshare_del(&e_connman_prop_device); _stringshare_del(&e_connman_prop_devices); _stringshare_del(&e_connman_prop_interface); - _stringshare_del(&e_connman_prop_ipv4_address); - _stringshare_del(&e_connman_prop_ipv4_method); + _stringshare_del(&e_connman_prop_ipv4); + _stringshare_del(&e_connman_prop_ipv4_configuration); + _stringshare_del(&e_connman_prop_ethernet); + _stringshare_del(&e_connman_prop_method); _stringshare_del(&e_connman_prop_address); + _stringshare_del(&e_connman_prop_gateway); + _stringshare_del(&e_connman_prop_netmask); + _stringshare_del(&e_connman_prop_mtu); _stringshare_del(&e_connman_prop_name); _stringshare_del(&e_connman_prop_network); _stringshare_del(&e_connman_prop_networks); @@ -426,17 +474,22 @@ e_connman_system_shutdown(void) _stringshare_del(&e_connman_prop_powered); _stringshare_del(&e_connman_prop_priority); _stringshare_del(&e_connman_prop_profiles); + _stringshare_del(&e_connman_prop_profile_active); _stringshare_del(&e_connman_prop_services); + _stringshare_del(&e_connman_prop_technologies); _stringshare_del(&e_connman_prop_remember); _stringshare_del(&e_connman_prop_scan_interval); _stringshare_del(&e_connman_prop_scanning); _stringshare_del(&e_connman_prop_state); - _stringshare_del(&e_connman_prop_strengh); + _stringshare_del(&e_connman_prop_strength); + _stringshare_del(&e_connman_prop_frequency); _stringshare_del(&e_connman_prop_type); _stringshare_del(&e_connman_prop_wifi_mode); _stringshare_del(&e_connman_prop_wifi_passphrase); _stringshare_del(&e_connman_prop_wifi_security); _stringshare_del(&e_connman_prop_wifi_ssid); + _stringshare_del(&e_connman_prop_wifi_channel); + _stringshare_del(&e_connman_prop_wifi_eap); _stringshare_del(&e_connman_prop_error); _stringshare_del(&e_connman_prop_mode); _stringshare_del(&e_connman_prop_security); @@ -450,6 +503,10 @@ e_connman_system_shutdown(void) _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); + _stringshare_del(&e_connman_prop_technologies_enabled); + _stringshare_del(&e_connman_prop_technologies_connected); if (pending_get_name_owner) {