Replaced Wi-Fi CAPI with Wi-Fi manager CAPI
[apps/native/ug-mobile-ap.git] / src / mh_func_onoff.c
index 242ff48..e6d8caf 100644 (file)
@@ -265,7 +265,7 @@ int _create_wifi_hotspot_on_popup(mh_appdata_t *ad)
        bool wifi_state = false;
        int value = 0;
 
-       wifi_is_activated(&wifi_state);
+       wifi_manager_is_activated(ad->wifi_handle, &wifi_state);
        _set_vconf_prev_wifi_state(wifi_state);
        value = _get_checkbox_status(TETHERING_TYPE_WIFI);
        if (0 == value) {
@@ -386,14 +386,6 @@ static void __disable_tethering_by_ind(mh_appdata_t *ad, tethering_disabled_caus
        return;
 }
 
-/* Wi-Fi callbacks */
-static void __wifi_activated_cb(wifi_error_e result, void *user_data)
-{
-       DBG("+\n");
-
-       return;
-}
-
 /* Tethering callbacks */
 void _enabled_cb(tethering_error_e result, tethering_type_e type, bool is_requested, void *user_data)
 {
@@ -496,7 +488,7 @@ void _connection_changed_cb(tethering_client_h client, bool is_opened, void *use
        return;
 }
 
-void _wifi_state_changed_cb(wifi_device_state_e state, void *user_data)
+void _wifi_state_changed_cb(wifi_manager_device_state_e state, void *user_data)
 {
        if (user_data == NULL) {
                ERR("user_data is NULL\n");
@@ -508,11 +500,11 @@ void _wifi_state_changed_cb(wifi_device_state_e state, void *user_data)
        mh_appdata_t *ad = (mh_appdata_t *)user_data;
        char *str = NULL;
        char *fmt = NULL;
-       if (state == WIFI_DEVICE_STATE_ACTIVATED) {
+       if (state == WIFI_MANAGER_DEVICE_STATE_ACTIVATED) {
                if (ad->main.wifi_item && elm_object_item_disabled_get(ad->main.wifi_item))
                        elm_object_item_disabled_set(ad->main.wifi_item, EINA_FALSE);
                _set_vconf_prev_wifi_state(false);
-       } else if (state == WIFI_DEVICE_STATE_DEACTIVATED) {
+       } else if (state == WIFI_MANAGER_DEVICE_STATE_DEACTIVATED) {
                _set_vconf_prev_wifi_state(true);
        }
 
@@ -522,7 +514,7 @@ void _wifi_state_changed_cb(wifi_device_state_e state, void *user_data)
                ad->popup_checkbox = NULL;
                evas_object_del(ad->popup);
                ad->popup = NULL;
-               if (state == WIFI_DEVICE_STATE_ACTIVATED)
+               if (state == WIFI_MANAGER_DEVICE_STATE_ACTIVATED)
                        fmt = STR_TETH_ON_DESC_1;
                else
                        fmt = STR_TETH_ON_DESC_2;
@@ -766,19 +758,6 @@ int _handle_usb_onoff_change(mh_appdata_t *ad)
        return 0;
 }
 
-int _turn_on_wifi(void)
-{
-       int ret;
-
-       ret = wifi_activate(__wifi_activated_cb, NULL);
-       if (ret != WIFI_ERROR_NONE) {
-               ERR("wifi_activate() is failed : %d\n", ret);
-               return -1;
-       }
-
-       return 0;
-}
-
 bool _is_wifi_direct_on(void)
 {
        int wifi_direct_state = 0;