CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
-SET(ENGINE_SOURCES
- ${CMAKE_CURRENT_SOURCE_DIR}/sources/libraries/WlanManager/EngineManager/connman-request.c
- ${CMAKE_CURRENT_SOURCE_DIR}/sources/libraries/WlanManager/EngineManager/connman-response.c
-)
-
-SET(ENGINE_INCLUDES
- ${CMAKE_CURRENT_SOURCE_DIR}/sources/libraries/WlanManager/EngineManager/include)
-
-SET(ENGINE_PKGCONFIGS
- capi-network-wifi-manager
- network)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wmissing-declarations")
#syspopup-caller
feedback
#setting-common-lite-internal
- ${TETHERING_REQUIRED_PKGS}
-#engine pkgconfigs
- ${ENGINE_PKGCONFIGS})
+ ${TETHERING_REQUIRED_PKGS})
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}/sources/ui-gadget/include
${CMAKE_CURRENT_SOURCE_DIR}/sources/libraries/WlanManager/WlanManager/include
${CMAKE_CURRENT_SOURCE_DIR}/sources/libraries/WlanManager/EngineManager/include
${CMAKE_CURRENT_SOURCE_DIR}/sources/libraries/appcoreWrapper/include
- ${CMAKE_CURRENT_SOURCE_DIR}/sources/libraries/i18nManager/include
-#engine includes
- ${ENGINE_INCLUDES})
+ ${CMAKE_CURRENT_SOURCE_DIR}/sources/libraries/i18nManager/include)
IF(TIZEN_MOBILE)
ADD_SUBDIRECTORY(po)
Name: wifi-efl-ug
Summary: Wi-Fi UI Gadget for TIZEN
-Version: 1.0.237
+Version: 1.0.238
Release: 1
Group: App/Network
License: Flora-1.1
BuildRequires: pkgconfig(capi-network-connection)
BuildRequires: pkgconfig(capi-network-tethering)
BuildRequires: pkgconfig(capi-ui-efl-util)
-BuildRequires: pkgconfig(network)
BuildRequires: pkgconfig(feedback)
BuildRequires: pkgconfig(efl-extension)
BuildRequires: pkgconfig(aul)
_ip_info_entry_add_callbacks(editfield, entry_info);
elm_object_part_content_set(layout, "elm.swallow.content", editfield);
+#if 0 /* TODO: Apply DPM */
if (!net_get_device_policy_wifi_profile())
elm_object_disabled_set(editfield, EINA_TRUE);
else
elm_object_disabled_set(editfield, EINA_FALSE);
-
+#endif
return layout;
}
return;
}
+#if 0 /* TODO: Apply DPM */
if (!net_get_device_policy_wifi_profile()) {
SECURE_DEBUG_LOG(UG_NAME_NORMAL, "Wifi profile device policy restricts");
__COMMON_FUNC_EXIT__;
return;
}
+#endif
wifi_manager_ap_h ap = ip_info_list_data->ap;
evas_object_smart_callback_add(toggle_btn, "changed",
__ip_info_toggle_item_sel_cb, ip_data);
+#if 0 /* TODO: Apply DPM */
if (!net_get_device_policy_wifi_profile())
elm_object_disabled_set(toggle_btn, EINA_TRUE);
else
elm_object_disabled_set(toggle_btn, EINA_FALSE);
+#endif
}
-
-
__COMMON_FUNC_EXIT__;
return toggle_btn;
}
char *temp = NULL;
char *status_txt = NULL;
- /* TODO: temporary disabled */
- /*
- wifi_manager_connection_state_e state;
- wifi_connection_error_e error;
-
- wifi_manager_ap_get_connection_state(device_info->ap, &state);
- if (state == WIFI_MANAGER_CONNECTION_STATE_FAILURE) {
- error = wlan_manager_get_connection_error_state(device_info->ap);
-
- if (error == WIFI_MANAGER_CONNECTION_ERROR_INVALID_KEY)
- return g_strdup(sc(pkg_name,
- I18N_TYPE_WIFI_AUTHENTICATION_ERROR_OCCURRED));
-
- if (error == WIFI_MANAGER_CONNECTION_ERROR_DHCP_FAILED)
- return g_strdup(sc(pkg_name,
- I18N_TYPE_WIFI_FAILED_TO_OBTAIN_IP_ADDRESS));
- }
- */
-
switch (device_info->security_mode) {
- case WLAN_SEC_MODE_NONE: /** Security disabled */
+ case WIFI_MANAGER_SECURITY_TYPE_NONE: /** Security disabled */
status_txt = g_strdup(sc(pkg_name, I18N_TYPE_Open));
break;
- case WLAN_SEC_MODE_IEEE8021X: /** EAP */
- status_txt = g_strdup_printf("%s (%s)", sc(pkg_name, I18N_TYPE_Secured),
- sc(pkg_name, I18N_TYPE_EAP));
- break;
- case WLAN_SEC_MODE_WEP: /** WEP */
- case WLAN_SEC_MODE_WPA_PSK: /** WPA-PSK */
- case WLAN_SEC_MODE_WPA2_PSK: /** WPA2-PSK */
+ case WIFI_MANAGER_SECURITY_TYPE_WEP: /** WEP */
+ case WIFI_MANAGER_SECURITY_TYPE_WPA_PSK: /** WPA-PSK */
+ case WIFI_MANAGER_SECURITY_TYPE_WPA2_PSK: /** WPA2-PSK */
if (TRUE == device_info->wps_mode) {
status_txt = g_strdup_printf("%s (%s)", sc(pkg_name,
I18N_TYPE_Secured), sc(pkg_name, I18N_TYPE_WPS_Available));
status_txt = g_strdup(sc(pkg_name, I18N_TYPE_Secured));
}
break;
+ case WIFI_MANAGER_SECURITY_TYPE_EAP: /** EAP */
+ status_txt = g_strdup_printf("%s (%s)", sc(pkg_name, I18N_TYPE_Secured),
+ sc(pkg_name, I18N_TYPE_EAP));
+ break;
default: /** Unknown */
status_txt = g_strdup(sc(pkg_name, I18N_TYPE_Unknown));
break;
g_strlcat(buf, "A01-3_icon", sizeof(buf));
- if (device_info->security_mode != WLAN_SEC_MODE_NONE)
+ if (device_info->security_mode != WIFI_MANAGER_SECURITY_TYPE_NONE)
g_strlcat(buf, "_lock", sizeof(buf));
switch (wlan_manager_get_signal_strength(device_info->rssi)) {
return rotate_angle;
}
-wlan_security_mode_type_t common_utils_get_sec_mode(wifi_manager_security_type_e sec_type)
-{
- switch (sec_type) {
- case WIFI_MANAGER_SECURITY_TYPE_NONE:
- return WLAN_SEC_MODE_NONE;
- case WIFI_MANAGER_SECURITY_TYPE_WEP:
- return WLAN_SEC_MODE_WEP;
- case WIFI_MANAGER_SECURITY_TYPE_WPA_PSK:
- return WLAN_SEC_MODE_WPA_PSK;
- case WIFI_MANAGER_SECURITY_TYPE_WPA2_PSK:
- return WLAN_SEC_MODE_WPA_PSK;
- case WIFI_MANAGER_SECURITY_TYPE_EAP:
- return WLAN_SEC_MODE_IEEE8021X;
- default:
- return WLAN_SEC_MODE_NONE;
- }
-
- return WLAN_SEC_MODE_NONE;
-}
-
int common_utils_send_message_to_net_popup(const char *title,
const char *content, const char *type, const char *ssid)
{
#endif
#include <Evas.h>
-#include <network-wifi-intf.h>
#include "wlan_manager.h"
#include "common_utils.h"
Evas_Object *common_utils_show_info_timeout_popup(Evas_Object *win,
const char* info_text, const double timeout);
int common_utils_get_rotate_angle(enum appcore_rm rotate_mode);
-wlan_security_mode_type_t common_utils_get_sec_mode(
- wifi_manager_security_type_e sec_type);
int common_utils_send_message_to_net_popup(const char *title,
const char *content, const char *type, const char *ssid);
int common_utils_send_restriction_to_net_popup(const char *title,
+++ /dev/null
-/*
- * Wi-Fi
- *
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * 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
- *
- * http://www.tizenopensource.org/license
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include "common.h"
-#include "wlan_manager.h"
-
-int connman_request_register(void)
-{
- int ret = net_register_client(network_evt_cb, NULL);
- switch (ret) {
- case NET_ERR_NONE:
- return WLAN_MANAGER_ERR_NONE;
- case NET_ERR_APP_ALREADY_REGISTERED:
- return WLAN_MANAGER_ERR_ALREADY_REGISTERED;
- default:
- return WLAN_MANAGER_ERR_UNKNOWN;
- }
-}
-
-int connman_request_deregister(void)
-{
- int ret = net_deregister_client();
- switch (ret) {
- case NET_ERR_NONE:
- return WLAN_MANAGER_ERR_NONE;
- default:
- return WLAN_MANAGER_ERR_UNKNOWN;
- }
-}
-
-int connman_request_specific_scan(const char *ssid)
-{
- int ret = net_specific_scan_wifi(ssid);
- INFO_LOG(COMMON_NAME_LIB, "net_specific_scan_wifi ret: %d", ret);
-
- switch (ret) {
- case NET_ERR_NONE:
- case NET_ERR_IN_PROGRESS:
- return WLAN_MANAGER_ERR_NONE;
- default:
- return WLAN_MANAGER_ERR_UNKNOWN;
- }
-}
-
-int connman_request_scan_mode_set(net_wifi_background_scan_mode_t scan_mode)
-{
- int ret = net_wifi_set_background_scan_mode(scan_mode);
-
- switch (ret) {
- case NET_ERR_NONE:
- return WLAN_MANAGER_ERR_NONE;
-
- default:
- return WLAN_MANAGER_ERR_UNKNOWN;
- }
-}
+++ /dev/null
-/*
- * Wi-Fi
- *
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * 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
- *
- * http://www.tizenopensource.org/license
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include "common.h"
-#include "wlan_manager.h"
-
-struct _wifi_cb_s {
- wifi_specific_scan_finished_cb specific_scan_cb;
- void *specific_scan_user_data;
-};
-
-static struct _wifi_cb_s wifi_callbacks = {NULL, NULL};
-
-int wifi_set_specific_scan_cb(wifi_specific_scan_finished_cb cb, void *data)
-{
- __COMMON_FUNC_ENTER__;
-
- if (!cb) {
- __COMMON_FUNC_EXIT__;
- return WIFI_MANAGER_ERROR_INVALID_PARAMETER;
- }
-
- wifi_callbacks.specific_scan_cb = cb;
- wifi_callbacks.specific_scan_user_data = data;
-
- __COMMON_FUNC_EXIT__;
- return WIFI_MANAGER_ERROR_NONE;
-}
-
-int wifi_unset_specific_scan_cb(void)
-{
- __COMMON_FUNC_ENTER__;
-
- if (wifi_callbacks.specific_scan_cb == NULL) {
- __COMMON_FUNC_EXIT__;
- return WIFI_MANAGER_ERROR_INVALID_OPERATION;
- }
-
- wifi_callbacks.specific_scan_cb = NULL;
- wifi_callbacks.specific_scan_user_data = NULL;
-
- __COMMON_FUNC_EXIT__;
- return WIFI_MANAGER_ERROR_NONE;
-}
-
-void network_evt_cb(const net_event_info_t *net_event, void *user_data)
-{
- __COMMON_FUNC_ENTER__;
-
- switch (net_event->Event) {
- case NET_EVENT_SPECIFIC_SCAN_RSP:
- INFO_LOG(COMMON_NAME_LIB, "NET_EVENT_SPECIFIC_SCAN_RSP");
-
- if (wifi_callbacks.specific_scan_cb) {
- if (net_event->Error != NET_ERR_NONE) {
- wifi_callbacks.specific_scan_cb(
- WIFI_MANAGER_ERROR_OPERATION_FAILED,
- NULL,
- wifi_callbacks.specific_scan_user_data);
- } else {
- INFO_LOG(COMMON_NAME_LIB, "Specific scan request successful");
- }
- } else {
- ERROR_LOG(COMMON_NAME_LIB, "Specific scan cb is not set !!!");
- }
- break;
-
- case NET_EVENT_SPECIFIC_SCAN_IND:
- INFO_LOG(COMMON_NAME_LIB, "SSID scan results (%d found)", (int)net_event->Datalength);
-
- if (wifi_callbacks.specific_scan_cb) {
- if (net_event->Error == NET_ERR_NONE) {
- wifi_callbacks.specific_scan_cb(WIFI_MANAGER_ERROR_NONE,
- net_event->Data,
- wifi_callbacks.specific_scan_user_data);
- } else {
- wifi_callbacks.specific_scan_cb(WIFI_MANAGER_ERROR_OPERATION_FAILED,
- NULL,
- wifi_callbacks.specific_scan_user_data);
- }
- }
- break;
-
- default:
- break;
- }
-
- __COMMON_FUNC_EXIT__;
-}
+++ /dev/null
-/*
- * Wi-Fi
- *
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * 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
- *
- * http://www.tizenopensource.org/license
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#ifndef __CONNMAN_REQUEST_H__
-#define __CONNMAN_REQUEST_H__
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#include <network-wifi-intf.h>
-
-int connman_request_specific_scan(const char *ssid);
-int connman_request_scan_mode_set(net_wifi_background_scan_mode_t scan_mode);
-int connman_request_register(void);
-int connman_request_deregister(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+++ /dev/null
-/*
- * Wi-Fi
- *
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * 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
- *
- * http://www.tizenopensource.org/license
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#ifndef __CONNMAN_RESPONSE_H__
-#define __CONNMAN_RESPONSE_H__
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#include "connman-request.h"
-
-/**
-* @brief Called when the specific scan is finished.
-* @param[in] error_code The error code
-* @param[in] user_data The user data passed from the callback registration function
-* @see wifi_set_specific_scan_cb()
-*/
-typedef void(*wifi_specific_scan_finished_cb)(wifi_manager_error_e error_code, GSList *bss_info_list, void* user_data);
-
-
-int wifi_set_specific_scan_cb(wifi_specific_scan_finished_cb cb, void *data);
-int wifi_unset_specific_scan_cb(void);
-void network_evt_cb(const net_event_info_t* net_event, void* user_data);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
#include <glib.h>
#include <wifi-manager.h>
-
-#include "connman-request.h"
-#include "connman-response.h"
+#include <wifi-manager-extension.h>
typedef enum {
WLAN_MANAGER_ERR_NONE = 0x00,
WLAN_MANAGER_ERR_WIFI_AP_TETHERING_OCCUPIED,
WLAN_MANAGER_ERR_NOSERVICE,
WLAN_MANAGER_ERR_IN_PROGRESS,
+ WLAN_MANAGER_ERR_OPERATION_FAILED,
} WLAN_MANAGER_ERR_TYPE;
typedef enum {
WIFI_MANAGER_CONNECTION_ERROR_UNKNOWN = 0x08,
} wifi_connection_error_e;
+typedef enum {
+ WLAN_MANAGER_AUTOSCAN_MODE_PERIODIC = WIFI_MANAGER_AUTOSCAN_MODE_PERIODIC,
+ WLAN_MANAGER_AUTOSCAN_MODE_EXPONENTIAL = WIFI_MANAGER_AUTOSCAN_MODE_EXPONENTIAL,
+} wlan_manager_autoscan_mode_e;
+
#define WLAN_PROXY_LEN_MAX 64
typedef struct _wifi_device_info_t {
char *ap_image_path;
int ipconfigtype;
int rssi;
- wlan_security_mode_type_t security_mode;
+ wifi_manager_security_type_e security_mode;
bool wps_mode;
bool is_hidden;
} wifi_device_info_t;
int wlan_manager_scan(void);
int wlan_manager_forget(wifi_manager_ap_h ap);
int wlan_manager_scan_with_ssid(const char *ssid, void *data);
-wifi_connection_error_e wlan_manager_get_connection_error_state(wifi_manager_ap_h ap);
gboolean wlan_manager_is_same_network(wifi_manager_ap_h ap1, wifi_manager_ap_h ap2);
-
-int wlan_manager_profile_modify_by_device_info(net_profile_info_t *profiles);
-
STRENGTH_TYPES wlan_manager_get_signal_strength(int rssi);
+int wlan_manager_set_autoscan_mode(wlan_manager_autoscan_mode_e mode);
//// profile refresh /////////////////////////////////////////////
void wlan_manager_scanned_profile_refresh(void);
switch (state) {
case WIFI_MANAGER_DEVICE_STATE_ACTIVATED:
- connman_request_scan_mode_set(WIFI_BGSCAN_MODE_PERIODIC);
-
+ wlan_manager_set_autoscan_mode(WLAN_MANAGER_AUTOSCAN_MODE_PERIODIC);
wlan_manager_enable_scan_result_update();
wlan_manager_register_cbs();
event_info.event_type = WLAN_MANAGER_RESPONSE_TYPE_POWER_ON_OK;
}
static void wlan_manager_specific_scan_finished_cb(
- wifi_manager_error_e error_code, GSList *bss_info_list, void *user_data)
+ wifi_manager_error_e error_code, void *user_data)
{
__COMMON_FUNC_ENTER__;
wlan_mgr_event_info_t event_info;
memset(&event_info, 0, sizeof(event_info));
- wifi_unset_specific_scan_cb();
-
if (WIFI_MANAGER_ERROR_NONE == error_code) {
event_info.event_type = WLAN_MANAGER_RESPONSE_TYPE_SPECIFIC_SCAN_OK;
- event_info.bss_info_list = bss_info_list;
+ // Maybe bss_info_list is not used.
+ //event_info.bss_info_list = bss_info_list;
} else {
event_info.event_type = WLAN_MANAGER_RESPONSE_TYPE_SPECIFIC_SCAN_FAIL;
}
scan_req_data.req_type = WLAN_MANAGER_REQ_TYPE_SCAN_RESULT;
wifi_manager_set_background_scan_cb(manager_object->wifi, wlan_manager_network_event_cb, &scan_req_data);
- connman_request_register();
-
__COMMON_FUNC_EXIT__;
}
* detsroy.
*/
-
wifi_manager_unset_background_scan_cb(manager_object->wifi);
wifi_manager_unset_connection_state_changed_cb(manager_object->wifi);
wifi_manager_unset_rssi_level_changed_cb(manager_object->wifi);
- wifi_unset_specific_scan_cb();
- connman_request_deregister();
__COMMON_FUNC_EXIT__;
}
{
__COMMON_FUNC_ENTER__;
- wifi_set_specific_scan_cb(wlan_manager_specific_scan_finished_cb, user_data);
-
- int ret = connman_request_specific_scan(ssid);
- if (ret != WLAN_MANAGER_ERR_NONE) {
+ int ret = wifi_manager_scan_specific_ap(manager_object->wifi,
+ ssid, wlan_manager_specific_scan_finished_cb, user_data);
+ if (ret != WIFI_MANAGER_ERROR_NONE) {
ERROR_LOG(UG_NAME_REQ, "Specific Scan failed. Ret: %d", ret);
-
__COMMON_FUNC_EXIT__;
- return ret;
+ return WLAN_MANAGER_ERR_OPERATION_FAILED;
}
/* Since the scan request was success,
__COMMON_FUNC_EXIT__;
}
-wifi_connection_error_e wlan_manager_get_connection_error_state(wifi_manager_ap_h ap)
-{
- net_profile_info_t *profile_info;
-
- if (!ap)
- return WIFI_MANAGER_CONNECTION_ERROR_UNKNOWN;
-
- profile_info = (net_profile_info_t *)ap;
-
- switch (profile_info->ProfileErrorState) {
- case NET_STATE_ERROR_NONE:
- return WIFI_MANAGER_CONNECTION_ERROR_NONE;
- case NET_STATE_ERROR_OUT_OF_RANGE:
- return WIFI_MANAGER_CONNECTION_ERROR_OUT_OF_RANGE;
- case NET_STATE_ERROR_PIN_MISSING:
- return WIFI_MANAGER_CONNECTION_ERROR_PIN_MISSING;
- case NET_STATE_ERROR_DHCP_FAILED:
- return WIFI_MANAGER_CONNECTION_ERROR_DHCP_FAILED;
- case NET_STATE_ERROR_CONNECT_FAILED:
- return WIFI_MANAGER_CONNECTION_ERROR_CONNECT_FAILED;
- case NET_STATE_ERROR_LOGIN_FAILED:
- return WIFI_MANAGER_CONNECTION_ERROR_LOGIN_FAILED;
- case NET_STATE_ERROR_AUTH_FAILED:
- return WIFI_MANAGER_CONNECTION_ERROR_AUTH_FAILED;
- case NET_STATE_ERROR_INVALID_KEY:
- return WIFI_MANAGER_CONNECTION_ERROR_INVALID_KEY;
- }
-
- return WIFI_MANAGER_CONNECTION_ERROR_UNKNOWN;
-}
-
gboolean wlan_manager_is_same_network(wifi_manager_ap_h ap1, wifi_manager_ap_h ap2)
{
gboolean is_same = FALSE;
break;
}
}
+
+int wlan_manager_set_autoscan_mode(wlan_manager_autoscan_mode_e mode)
+{
+ int ret = wifi_manager_set_autoscan_mode(manager_object->wifi, mode);
+ if (ret == WIFI_MANAGER_ERROR_NONE)
+ return WLAN_MANAGER_ERR_NONE;
+ else
+ return WLAN_MANAGER_ERR_OPERATION_FAILED;
+}
#include <ui-gadget.h>
#include <app_control_internal.h>
#include <efl_extension.h>
+#include <wifi-manager.h>
#include "common.h"
#include "ug_wifi.h"
#include "view_detail.h"
typedef struct {
- wlan_security_mode_type_t sec_mode;
+ wifi_manager_security_type_e sec_mode;
char *ssid;
wifi_device_info_t *device_info;
Evas_Object *confirm_popup;
static bool show_more = TRUE;
wifi_emulator_sample_s wifi_samples[] = {
- {"datanetwork", WLAN_SEC_MODE_WPA_PSK, 1},
- {"ureadyinternet", WLAN_SEC_MODE_IEEE8021X, 0},
- {"uready", WLAN_SEC_MODE_IEEE8021X, 1},
- {"setup", WLAN_SEC_MODE_NONE, 0},
- {"Tizen", WLAN_SEC_MODE_WPA2_PSK, 1},
+ {"datanetwork", WIFI_MANAGER_SECURITY_TYPE_WPA_PSK, 1},
+ {"ureadyinternet", WIFI_MANAGER_SECURITY_TYPE_EAP, 0},
+ {"uready", WIFI_MANAGER_SECURITY_TYPE_EAP, 1},
+ {"setup", WIFI_MANAGER_SECURITY_TYPE_NONE, 0},
+ {"Tizen", WIFI_MANAGER_SECURITY_TYPE_WPA2_PSK, 1},
};
int wifi_sample_count = sizeof(wifi_samples) / sizeof(wifi_samples[0]);
hidden_ap_data->ssid, hidden_ap_data->sec_mode);
switch (hidden_ap_data->sec_mode) {
- case WLAN_SEC_MODE_NONE:
+ case WIFI_MANAGER_SECURITY_TYPE_NONE:
INFO_LOG(UG_NAME_NORMAL, "OPEN: event %p; passpopup %p",
event_info, ug_app_state->passpopup);
wifi_manager_ap_set_security_type(ap, WIFI_MANAGER_SECURITY_TYPE_NONE);
break;
- case WLAN_SEC_MODE_WEP:
- case WLAN_SEC_MODE_WPA_PSK:
- case WLAN_SEC_MODE_WPA2_PSK:
+ case WIFI_MANAGER_SECURITY_TYPE_WEP:
+ case WIFI_MANAGER_SECURITY_TYPE_WPA_PSK:
+ case WIFI_MANAGER_SECURITY_TYPE_WPA2_PSK:
szPassword = passwd_popup_get_txt(ug_app_state->passpopup);
-
- if (WLAN_SEC_MODE_WEP == hidden_ap_data->sec_mode)
- wifi_manager_ap_set_security_type(ap, WIFI_MANAGER_SECURITY_TYPE_WEP);
- else if (WLAN_SEC_MODE_WPA_PSK == hidden_ap_data->sec_mode)
- wifi_manager_ap_set_security_type(ap, WIFI_MANAGER_SECURITY_TYPE_WPA_PSK);
- else
- wifi_manager_ap_set_security_type(ap, WIFI_MANAGER_SECURITY_TYPE_WPA2_PSK);
+ wifi_manager_ap_set_security_type(ap, hidden_ap_data->sec_mode);
int ret = wifi_manager_ap_set_passphrase(ap, szPassword);
if (ret != WIFI_MANAGER_ERROR_NONE)
}
switch (hidden_ap_data->sec_mode) {
- case WLAN_SEC_MODE_NONE:
+ case WIFI_MANAGER_SECURITY_TYPE_NONE:
INFO_LOG(UG_NAME_NORMAL, "This hidden AP is Open");
break;
- case WLAN_SEC_MODE_WEP:
- case WLAN_SEC_MODE_WPA_PSK:
- case WLAN_SEC_MODE_WPA2_PSK:
+ case WIFI_MANAGER_SECURITY_TYPE_WEP:
+ case WIFI_MANAGER_SECURITY_TYPE_WPA_PSK:
+ case WIFI_MANAGER_SECURITY_TYPE_WPA2_PSK:
INFO_LOG(UG_NAME_NORMAL, "Hidden AP Secured");
passwd_popup_free(ug_app_state->passpopup);
{
hidden_ap_data_t *hidden_ap_data = NULL;
const char *ssid = (const char *)user_data;
- wlan_security_mode_type_t sec_mode = 0;
+ wifi_manager_security_type_e sec_mode = 0;
bool favorite = false;
ug_genlist_data_t* gdata = NULL;
Evas_Object *popup = NULL;
/* Only if there is one AP found then we need Users further action */
switch (sec_mode) {
- case WLAN_SEC_MODE_NONE:
+ case WIFI_MANAGER_SECURITY_TYPE_NONE:
SECURE_INFO_LOG(UG_NAME_NORMAL, "%s open network found", ssid);
hidden_ap_data = g_new0(hidden_ap_data_t, 1);
- hidden_ap_data->sec_mode = WLAN_SEC_MODE_NONE;
+ hidden_ap_data->sec_mode = sec_mode;
hidden_ap_data->ssid = g_strdup(ssid);
popup_btn_info_t popup_btn_data;
manager_object->hidden_popup_data = hidden_ap_data;
break;
- case WLAN_SEC_MODE_IEEE8021X:
+ case WIFI_MANAGER_SECURITY_TYPE_EAP:
SECURE_INFO_LOG(UG_NAME_NORMAL, "%s IEEE8021X found", ssid);
wifi_device_info_t device_info;
break;
- case WLAN_SEC_MODE_WEP:
- case WLAN_SEC_MODE_WPA_PSK:
- case WLAN_SEC_MODE_WPA2_PSK:
+ case WIFI_MANAGER_SECURITY_TYPE_WEP:
+ case WIFI_MANAGER_SECURITY_TYPE_WPA_PSK:
+ case WIFI_MANAGER_SECURITY_TYPE_WPA2_PSK:
SECURE_INFO_LOG(UG_NAME_NORMAL,
"Secured(%d) %s found", sec_mode, ssid);
popup_info.ok_cb = hidden_ap_connect_ok_cb;
popup_info.cancel_cb = hidden_ap_connect_cancel_cb;
popup_info.cb_data = hidden_ap_data;
-
- if (sec_mode == WLAN_SEC_MODE_WEP)
- popup_info.sec_type = WIFI_MANAGER_SECURITY_TYPE_WEP;
- else if (sec_mode == WLAN_SEC_MODE_WPA_PSK)
- popup_info.sec_type = WIFI_MANAGER_SECURITY_TYPE_WPA_PSK;
- else if (sec_mode == WLAN_SEC_MODE_WPA2_PSK)
- popup_info.sec_type = WIFI_MANAGER_SECURITY_TYPE_WPA2_PSK;
+ popup_info.sec_type = sec_mode;
ug_app_state->passpopup =
create_passwd_popup(
wifi_device_info_t *view_list_item_device_info_create(wifi_manager_ap_h ap)
{
- wifi_manager_security_type_e sec_type;
int ret = false;
wifi_device_info_t* wifi_device = NULL;
goto FREE_DEVICE_INFO;
else if (WIFI_MANAGER_ERROR_NONE != wifi_manager_ap_get_rssi(ap, &(wifi_device->rssi)))
goto FREE_DEVICE_INFO;
- else if (WIFI_MANAGER_ERROR_NONE != wifi_manager_ap_get_security_type(ap, &sec_type))
+ else if (WIFI_MANAGER_ERROR_NONE != wifi_manager_ap_get_security_type(ap, &(wifi_device->security_mode)))
goto FREE_DEVICE_INFO;
else if (WIFI_MANAGER_ERROR_NONE != wifi_manager_ap_is_wps_supported(ap, &(wifi_device->wps_mode)))
goto FREE_DEVICE_INFO;
- wifi_device->security_mode = common_utils_get_sec_mode(sec_type);
common_utils_get_device_icon(wifi_device, &wifi_device->ap_image_path);
}
ret = true;
}
char *essid = NULL;
- wifi_manager_security_type_e type = WIFI_MANAGER_SECURITY_TYPE_NONE;
+ wifi_manager_security_type_e sec_type = WIFI_MANAGER_SECURITY_TYPE_NONE;
if (WIFI_MANAGER_ERROR_NONE != wifi_manager_ap_get_essid(ap, &essid)) {
__COMMON_FUNC_EXIT__;
return NULL;
- } else if (WIFI_MANAGER_ERROR_NONE != wifi_manager_ap_get_security_type(ap, &type)) {
+ } else if (WIFI_MANAGER_ERROR_NONE != wifi_manager_ap_get_security_type(ap, &sec_type)) {
g_free(essid);
__COMMON_FUNC_EXIT__;
return NULL;
}
Elm_Object_Item *it = first_item;
- wlan_security_mode_type_t sec_mode = common_utils_get_sec_mode(type);
while (it) {
ug_genlist_data_t* gdata = elm_object_item_data_get(it);
wifi_device_info_t *device_info = NULL;
if (gdata && (device_info = gdata->device_info)) {
- if (!g_strcmp0(device_info->ssid, essid) && device_info->security_mode == sec_mode)
+ if (!g_strcmp0(device_info->ssid, essid) && device_info->security_mode == sec_type)
break;
}
if (it == last_item) {
__COMMON_FUNC_ENTER__;
common_util_managed_idle_add(load_initial_ap_list, NULL);
-
- connman_request_scan_mode_set(WIFI_BGSCAN_MODE_PERIODIC);
+ wlan_manager_set_autoscan_mode(WLAN_MANAGER_AUTOSCAN_MODE_PERIODIC);
__COMMON_FUNC_EXIT__;
}
INFO_LOG(UG_NAME_NORMAL, "Wi-Fi UG paused");
- connman_request_scan_mode_set(WIFI_BGSCAN_MODE_EXPONENTIAL);
-
+ wlan_manager_set_autoscan_mode(WLAN_MANAGER_AUTOSCAN_MODE_EXPONENTIAL);
common_util_set_system_registry(VCONFKEY_WIFI_UG_RUN_STATE,
VCONFKEY_WIFI_UG_RUN_STATE_ON_BACKGROUND);
INFO_LOG(UG_NAME_NORMAL, "Wi-Fi UG resumed");
- connman_request_scan_mode_set(WIFI_BGSCAN_MODE_PERIODIC);
-
+ wlan_manager_set_autoscan_mode(WLAN_MANAGER_AUTOSCAN_MODE_PERIODIC);
common_util_set_system_registry(VCONFKEY_WIFI_UG_RUN_STATE,
VCONFKEY_WIFI_UG_RUN_STATE_ON_FOREGROUND);
#endif
if (wifi_exit_end == FALSE) {
- connman_request_scan_mode_set(WIFI_BGSCAN_MODE_EXPONENTIAL);
-
+ wlan_manager_set_autoscan_mode(WLAN_MANAGER_AUTOSCAN_MODE_EXPONENTIAL);
common_util_managed_idle_cleanup();
common_util_managed_ecore_scan_update_timer_del();
ugd = ug_app_state->gadget;
ug_app_state->bAlive = EINA_FALSE;
- connman_request_scan_mode_set(WIFI_BGSCAN_MODE_EXPONENTIAL);
-
+ wlan_manager_set_autoscan_mode(WLAN_MANAGER_AUTOSCAN_MODE_EXPONENTIAL);
common_util_managed_idle_cleanup();
common_util_managed_ecore_scan_update_timer_del();
}
char *essid = NULL;
- wifi_manager_security_type_e type = WIFI_MANAGER_SECURITY_TYPE_NONE;
+ wifi_manager_security_type_e sec_type = WIFI_MANAGER_SECURITY_TYPE_NONE;
if (WIFI_MANAGER_ERROR_NONE != wifi_manager_ap_get_essid(ap, &essid)) {
__COMMON_FUNC_EXIT__;
return NULL;
- } else if (WIFI_MANAGER_ERROR_NONE != wifi_manager_ap_get_security_type(ap, &type)) {
+ } else if (WIFI_MANAGER_ERROR_NONE != wifi_manager_ap_get_security_type(ap, &sec_type)) {
g_free(essid);
__COMMON_FUNC_EXIT__;
return NULL;
}
Elm_Object_Item *it = elm_genlist_first_item_get(list);
- wlan_security_mode_type_t sec_mode = common_utils_get_sec_mode(type);
while (it) {
devpkr_gl_data_t* gdata = elm_object_item_data_get(it);
wifi_device_info_t *device_info = NULL;
if (gdata && (device_info = gdata->dev_info)) {
- if (!g_strcmp0(device_info->ssid, essid) && device_info->security_mode == sec_mode)
+ if (!g_strcmp0(device_info->ssid, essid) && device_info->security_mode == sec_type)
break;
}
char *item_ssid = NULL;
wifi_manager_security_type_e sec_type;
- wlan_security_mode_type_t item_sec_mode;
Elm_Object_Item* it = NULL;
it = elm_genlist_first_item_get(list);
__COMMON_FUNC_EXIT__;
return;
}
- item_sec_mode = common_utils_get_sec_mode(sec_type);
- SECURE_INFO_LOG(SP_NAME_NORMAL, "item state set for AP[%s] with sec mode[%d]", item_ssid, item_sec_mode);
+ SECURE_INFO_LOG(SP_NAME_NORMAL, "item state set for AP[%s] with sec mode[%d]", item_ssid, sec_type);
while (it) {
devpkr_gl_data_t *gdata = (devpkr_gl_data_t *)elm_object_item_data_get(it);
if (gdata != NULL) {
gdata->dev_info->ssid, gdata->dev_info->security_mode);
}
- if (gdata && gdata->dev_info->security_mode == item_sec_mode &&
+ if (gdata && gdata->dev_info->security_mode == sec_type &&
!g_strcmp0(gdata->dev_info->ssid, item_ssid)) {
if (gdata->connection_mode != state) {
gdata->connection_mode = state;
return NULL;
}
- wifi_device->security_mode = common_utils_get_sec_mode(sec_type);
+ wifi_device->security_mode = sec_type;
wifi_device->ap_status_txt = common_utils_get_ap_security_type_info_txt(PACKAGE,
wifi_device, true);
common_utils_get_device_icon(wifi_device, &wifi_device->ap_image_path);
*
*/
-#include <wifi-manager.h>
#include <vconf.h>
#include <vconf-keys.h>
#include <appcore-efl.h>
vconf_ignore_key_changed(VCONFKEY_IDLE_LOCK_STATE, __idle_lock_state_change_cb);
- connman_request_scan_mode_set(WIFI_BGSCAN_MODE_EXPONENTIAL);
+ wlan_manager_set_autoscan_mode(WLAN_MANAGER_AUTOSCAN_MODE_EXPONENTIAL);
elm_exit();
break;
}
- connman_request_scan_mode_set(WIFI_BGSCAN_MODE_PERIODIC);
+ wlan_manager_set_autoscan_mode(WLAN_MANAGER_AUTOSCAN_MODE_PERIODIC);
__COMMON_FUNC_EXIT__;
return wlan_ret;
{
__COMMON_FUNC_ENTER__;
- connman_request_scan_mode_set(WIFI_BGSCAN_MODE_EXPONENTIAL);
+ wlan_manager_set_autoscan_mode(WLAN_MANAGER_AUTOSCAN_MODE_EXPONENTIAL);
__COMMON_FUNC_EXIT__;
return;
{
__COMMON_FUNC_ENTER__;
- connman_request_scan_mode_set(WIFI_BGSCAN_MODE_PERIODIC);
+ wlan_manager_set_autoscan_mode(WLAN_MANAGER_AUTOSCAN_MODE_PERIODIC);
__COMMON_FUNC_EXIT__;
return;