*
* Copyright 2012 Samsung Electronics Co., Ltd
-* Licensed under the Flora License, Version 1.0 (the "License");
+* Licensed under the Flora License, Version 1.1 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
recheck_count = 0;
return FALSE;
}
- _send_signal_qp(QP_SIGNAL_PROGRESS_ON);
} else if (ad->type == TETHERING_TYPE_BT && _create_bt_tethering_on_popup(ad) < 0) {
ERR("_create_bt_tethering_on_popup fail\n");
_update_tethering_item(ad, MH_STATE_NONE);
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) {
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)
{
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");
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);
}
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;
_prepare_popup(MH_POPUP_WIFI_OFF, STR_CLOSE_INTERNET_Q);
_create_popup(ad);
} else {
+#ifndef TIZEN_FEATURE_EMULATOR
ret = tethering_disable(ad->handle, TETHERING_TYPE_WIFI);
if (ret != TETHERING_ERROR_NONE) {
ERR("wifi tethering off is failed : %d\n", ret);
return -1;
}
- _send_signal_qp(QP_SIGNAL_PROGRESS_OFF);
+#endif
}
return 0;
}
/* Turn off Bluetooth tethering */
if (ad->main.hotspot_mode & VCONFKEY_MOBILE_HOTSPOT_MODE_BT) {
+#ifndef TIZEN_FEATURE_EMULATOR
ret = tethering_disable(ad->handle, TETHERING_TYPE_BT);
if (ret) {
ERR("Error disable bt tethering [%d]\n", ret);
return -1;
}
+#endif
return 0;
}
/* Turn off USB tethering */
if (ad->main.hotspot_mode & VCONFKEY_MOBILE_HOTSPOT_MODE_USB) {
+#ifndef TIZEN_FEATURE_EMULATOR
ret = tethering_disable(ad->handle, TETHERING_TYPE_USB);
if (ret) {
ERR("Error disable usb tethering : %d\n", ret);
return -1;
}
+#endif
return 0;
}
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;