diff options
author | sungsik jang <sungsik.jang@samsung.com> | 2012-08-28 17:56:47 +0900 |
---|---|---|
committer | sungsik jang <sungsik.jang@samsung.com> | 2012-08-28 17:56:47 +0900 |
commit | e5766d0f7a2d34638bffd6e9114f63e0b9ace2d9 (patch) | |
tree | cabf38f0c2a2d78493ab260e8951f5e58655bfd3 | |
parent | 2862180e1407377dd19d90f46291e95fa57b5979 (diff) | |
download | ug-wifi-direct-e5766d0f7a2d34638bffd6e9114f63e0b9ace2d9.tar.gz ug-wifi-direct-e5766d0f7a2d34638bffd6e9114f63e0b9ace2d9.tar.bz2 ug-wifi-direct-e5766d0f7a2d34638bffd6e9114f63e0b9ace2d9.zip |
removed code related with tethering.
-rwxr-xr-x | debian/changelog | 8 | ||||
-rwxr-xr-x | packaging/libug-setting-wifidirect-efl.spec | 2 | ||||
-rw-r--r-- | ug-wifidirect/include/wfd_client.h | 1 | ||||
-rwxr-xr-x | ug-wifidirect/src/wfd_client.c | 146 | ||||
-rwxr-xr-x | ug-wifidirect/src/wfd_ug_popup.c | 33 |
5 files changed, 10 insertions, 180 deletions
diff --git a/debian/changelog b/debian/changelog index 4598de6..50a8300 100755 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +ug-setting-wifidirect-efl (0.7.5) unstable; urgency=low + + * removed code related with tethering. + * Git: rsa/apps/home/ug-wifi-direct + * Tag: libug-setting-wifidirect-efl_0.7.5 + + -- Sungsik Jang <sungsik.jang@samsung.com> Tue, 28 Aug 2012 16:45:49 +0900 + ug-setting-wifidirect-efl (0.7.4) unstable; urgency=low * Update package & file name for tizen_2.0 beta. diff --git a/packaging/libug-setting-wifidirect-efl.spec b/packaging/libug-setting-wifidirect-efl.spec index d5d4dd9..aedd7d7 100755 --- a/packaging/libug-setting-wifidirect-efl.spec +++ b/packaging/libug-setting-wifidirect-efl.spec @@ -3,7 +3,7 @@ Name: libug-setting-wifidirect-efl Summary: Wi-Fi Direct setting UI gadget -Version: 0.7.4 +Version: 0.7.5 Release: 1 Group: TO_BE_FILLED License: Samsung Proprietary License diff --git a/ug-wifidirect/include/wfd_client.h b/ug-wifidirect/include/wfd_client.h index 59eed60..2e65b2e 100644 --- a/ug-wifidirect/include/wfd_client.h +++ b/ug-wifidirect/include/wfd_client.h @@ -52,7 +52,6 @@ typedef enum { int wfd_get_vconf_status(void *data); int wfd_wifi_off(void *data); -int wfd_mobile_ap_off(void *data); int init_wfd_client(void *data); int deinit_wfd_client(void *data); int wfd_client_start_discovery(void *data); diff --git a/ug-wifidirect/src/wfd_client.c b/ug-wifidirect/src/wfd_client.c index e565b52..d0c3ae9 100755 --- a/ug-wifidirect/src/wfd_client.c +++ b/ug-wifidirect/src/wfd_client.c @@ -106,53 +106,6 @@ int wfd_wifi_off(void *data) return 0; } -static void _hotspot_state_cb(keynode_t *key, void *data) -{ - __FUNC_ENTER__; - struct ug_data *ugd = (struct ug_data*) data; - int res; - int hotspot_mode; - tethering_error_e ret = TETHERING_ERROR_NONE; - tethering_h th = NULL; - - res = vconf_get_int(VCONFKEY_MOBILE_HOTSPOT_MODE, &hotspot_mode); - if (res != 0) - { - DBG(LOG_ERROR, "Failed to get mobile hotspot state from vconf. [%d]\n", res); - // TODO: set genlist head item as "WiFi Direct" - return; - } - - if(hotspot_mode & VCONFKEY_MOBILE_HOTSPOT_MODE_WIFI) - { - DBG(LOG_VERBOSE, " Mobile hotspot is activated\n"); - } - else - { - DBG(LOG_VERBOSE, " Mobile hotspot is deactivated\n"); - wfd_client_swtch_force(ugd, TRUE); - } - - th = ugd->hotspot_handle; - - if(th != NULL) - { - /* Deregister cbs */ - ret = tethering_unset_disabled_cb(th, TETHERING_TYPE_WIFI); - if(ret != TETHERING_ERROR_NONE) - DBG(LOG_ERROR, "tethering_unset_disabled_cb is failed(%d)\n", ret); - - /* Destroy tethering handle */ - ret = tethering_destroy(th); - if(ret != TETHERING_ERROR_NONE) - DBG(LOG_ERROR, "tethering_destroy is failed(%d)\n", ret); - - ugd->hotspot_handle = NULL; - } - - __FUNC_EXIT__; -} - static void __disabled_cb(tethering_error_e error, tethering_type_e type, tethering_disabled_cause_e code, void *data) { __FUNC_ENTER__; @@ -174,61 +127,6 @@ static void __disabled_cb(tethering_error_e error, tethering_type_e type, tether } -int wfd_mobile_ap_off(void *data) -{ - __FUNC_ENTER__; - struct ug_data *ugd = (struct ug_data*) data; - int res; - tethering_error_e ret = TETHERING_ERROR_NONE; - tethering_h th = NULL; - - res = vconf_notify_key_changed(VCONFKEY_MOBILE_HOTSPOT_MODE, _hotspot_state_cb, ugd); - if (res == -1) - { - DBG(LOG_ERROR, "Failed to register vconf callback\n"); - return -1; - } - - /* Create tethering handle */ - ret = tethering_create(&th); - if(ret != TETHERING_ERROR_NONE) - { - DBG(LOG_ERROR, "Failed to tethering_create() [%d]\n", ret); - return -1; - } - else - { - DBG(LOG_VERBOSE, "Succeeded to tethering_create()\n"); - } - - /* Register cbs */ - ret = tethering_set_disabled_cb(th, TETHERING_TYPE_WIFI, - __disabled_cb, NULL); - if(ret != TETHERING_ERROR_NONE) - { - DBG(LOG_ERROR, "tethering_set_disabled_cb is failed\n", ret); - return -1; - } - - /* Disable tethering */ - ret = tethering_disable(th, TETHERING_TYPE_WIFI); - if(ret != TETHERING_ERROR_NONE) - { - DBG(LOG_ERROR, "Failed to turn off mobile hotspot. [%d]\n", ret); - return -1; - } - else - { - DBG(LOG_VERBOSE, "Succeeded to turn off mobile hotspot\n"); - } - - ugd->hotspot_handle = th; - - - __FUNC_EXIT__; - return 0; -} - #if 0 static device_type_s *wfd_client_find_peer_by_ssid(void *data, const char *ssid) { @@ -343,12 +241,6 @@ void _activation_cb(int error_code, wifi_direct_device_state_e device_state, voi DBG(LOG_ERROR, "Failed to ignore vconf key callback for wifi state\n"); } - res = vconf_ignore_key_changed(VCONFKEY_MOBILE_HOTSPOT_MODE, _hotspot_state_cb); - if(res == -1) - { - DBG(LOG_ERROR, "Failed to ignore vconf key callback for hotspot state\n"); - } - res = wifi_direct_start_discovery(FALSE, 0); if(res != WIFI_DIRECT_ERROR_NONE) { @@ -814,30 +706,6 @@ int deinit_wfd_client(void *data) DBG(LOG_ERROR, "Failed to deregister network client. [%d]\n", res); } - res = vconf_ignore_key_changed(VCONFKEY_MOBILE_HOTSPOT_MODE, _hotspot_state_cb); - if(res == -1) - { - DBG(LOG_ERROR, "Failed to ignore vconf key callback for hotspot state\n"); - } - - th = ugd->hotspot_handle; - - if(th != NULL) - { - /* Deregister cbs */ - ret = tethering_unset_disabled_cb(th, TETHERING_TYPE_WIFI); - if(ret != TETHERING_ERROR_NONE) - DBG(LOG_ERROR, "tethering_unset_disabled_cb is failed(%d)\n", ret); - - /* Destroy tethering handle */ - ret = tethering_destroy(th); - if(ret != TETHERING_ERROR_NONE) - DBG(LOG_ERROR, "tethering_destroy is failed(%d)\n", ret); - - ugd->hotspot_handle = NULL; - - } - __FUNC_EXIT__; return 0; @@ -864,25 +732,11 @@ int wfd_client_switch_on(void *data) return -1; } - int hotspot_mode; - res = vconf_get_int(VCONFKEY_MOBILE_HOTSPOT_MODE, &hotspot_mode); - if (res != 0) - { - DBG(LOG_ERROR, "Failed to get mobile hotspot state from vconf. [%d]\n", res); - // TODO: set genlist head item as "WiFi Direct" - return -1; - } - if(wifi_state > VCONFKEY_WIFI_OFF) { DBG(LOG_VERBOSE, "WiFi is connected, so have to turn off WiFi"); wfd_ug_act_popup(ugd, _("IDS_WFD_POP_WIFI_OFF"), POPUP_TYPE_WIFI_OFF); // "This will turn off Wi-Fi client operation.<br>Continue?" } - else if(hotspot_mode & VCONFKEY_MOBILE_HOTSPOT_MODE_WIFI) - { - DBG(LOG_VERBOSE, "WiFi is connected, so have to turn off WiFi"); - wfd_ug_act_popup(ugd, _("IDS_WFD_POP_HOTSPOT_OFF"), POPUP_TYPE_HOTSPOT_OFF); // "This will turn off Portable Wi-Fi hotspots operation.<br>Continue?" - } else // (wifi_state < VCONFKEY_WIFI_CONNECTED && !(hotspot_mode & VCONFKEY_MOBILE_HOTSPOT_MODE_WIFI)) { res = wifi_direct_activate(); diff --git a/ug-wifidirect/src/wfd_ug_popup.c b/ug-wifidirect/src/wfd_ug_popup.c index 0c20c0f..254a4e9 100755 --- a/ug-wifidirect/src/wfd_ug_popup.c +++ b/ug-wifidirect/src/wfd_ug_popup.c @@ -31,34 +31,6 @@ #include "wfd_ug_view.h" #include "wfd_client.h" -static void _wfd_ug_act_popup_hotspot_ok_cb(void *data, Evas_Object *obj, void *event_info) -{ - __FUNC_ENTER__; - struct ug_data *ugd = (struct ug_data*) data; - - // TODO: Turn off Hotspot - ugd->wfd_status = WFD_LINK_STATUS_DEACTIVATED; - wfd_mobile_ap_off(ugd); - - evas_object_del(ugd->act_popup); - ugd->act_popup = NULL; - __FUNC_EXIT__; -} - -static void _wfd_ug_act_popup_hotspot_cancel_cb(void *data, Evas_Object *obj, void *event_info) -{ - __FUNC_ENTER__; - struct ug_data *ugd = (struct ug_data*) data; - - // TODO: set genlist head item as "WiFi Direct" - ugd->head_text_mode = HEAD_TEXT_TYPE_DIRECT; - wfd_ug_view_refresh_glitem(ugd->head); - - evas_object_del(ugd->act_popup); - ugd->act_popup = NULL; - __FUNC_EXIT__; -} - static void _wfd_ug_act_popup_wifi_ok_cb(void *data, Evas_Object *obj, void *event_info) { __FUNC_ENTER__; @@ -230,7 +202,7 @@ void wfd_ug_act_popup(void *data, const char *message, int popup_type) elm_object_style_set(btn2, "popup_button/default"); /* set the different text by type */ - if (popup_type == POPUP_TYPE_WIFI_OFF || popup_type == POPUP_TYPE_HOTSPOT_OFF) { + if (popup_type == POPUP_TYPE_WIFI_OFF) { elm_object_text_set(btn1, S_("IDS_COM_SK_YES")); elm_object_text_set(btn2, S_("IDS_COM_SK_NO")); } else { @@ -245,9 +217,6 @@ void wfd_ug_act_popup(void *data, const char *message, int popup_type) if (popup_type == POPUP_TYPE_WIFI_OFF) { evas_object_smart_callback_add(btn1, "clicked", _wfd_ug_act_popup_wifi_ok_cb, (void*) ugd); evas_object_smart_callback_add(btn2, "clicked", _wfd_ug_act_popup_wifi_cancel_cb, (void*) ugd); - } else if (popup_type == POPUP_TYPE_HOTSPOT_OFF) { - evas_object_smart_callback_add(btn1, "clicked", _wfd_ug_act_popup_hotspot_ok_cb, (void*) ugd); - evas_object_smart_callback_add(btn2, "clicked", _wfd_ug_act_popup_hotspot_cancel_cb, (void*) ugd); } else if (popup_type == POP_TYPE_DISCONNECT) { //evas_object_smart_callback_add(btn1, "clicked", _wfd_ug_act_popup_disconnect_ok_cb, (void*) ugd); evas_object_smart_callback_add(btn1, "clicked", _wfd_ug_act_popup_disconnect_all_ok_cb, (void*) ugd); |