removed code related with tethering.
authorsungsik jang <sungsik.jang@samsung.com>
Tue, 28 Aug 2012 08:56:47 +0000 (17:56 +0900)
committersungsik jang <sungsik.jang@samsung.com>
Tue, 28 Aug 2012 08:56:47 +0000 (17:56 +0900)
debian/changelog
packaging/libug-setting-wifidirect-efl.spec
ug-wifidirect/include/wfd_client.h
ug-wifidirect/src/wfd_client.c
ug-wifidirect/src/wfd_ug_popup.c

index 4598de60fde78a26994ecd1ee6d825c8b62e3d4c..50a8300b7724f3246fe4a3699de9c0f022d594dd 100755 (executable)
@@ -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.
index d5d4dd9c198a1b1939ed195efe2e306d20c550b1..aedd7d7f983e624a1f7f9c135ccae6a4ea89378a 100755 (executable)
@@ -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
index 59eed60e6bf562af2fba37390070f25c6817618b..2e65b2ee6e9174d8257cfca49e0d8751d56ca1d4 100644 (file)
@@ -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);
index e565b52c87c85e7bac07ef9d4c9765ebc4ec81ea..d0c3ae9728fe9cad65863365e4dd5c9cbaa84ce2 100755 (executable)
@@ -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();
index 0c20c0fabdc10b8424f5f7ada63df8c2e78714cc..254a4e9c6b274fa408e65e2f444c3d51261d2936 100755 (executable)
 #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);