tizen 2.3 release tizen_2.3 submit/tizen_2.3/20150202.061158 tizen_2.3_release
authorjk7744.park <jk7744.park@samsung.com>
Sun, 1 Feb 2015 04:32:56 +0000 (13:32 +0900)
committerjk7744.park <jk7744.park@samsung.com>
Sun, 1 Feb 2015 04:32:56 +0000 (13:32 +0900)
20 files changed:
AUTHORS [deleted file]
CMakeLists.txt
LICENSE [moved from LICENSE.APLv2 with 99% similarity]
NOTICE
capi-network-wifi.manifest
debian/capi-network-wifi-dev.install [deleted file]
debian/capi-network-wifi.install [deleted file]
debian/changelog [deleted file]
debian/compat [deleted file]
debian/control [deleted file]
debian/rules [deleted file]
doc/wifi_doc.h [new file with mode: 0755]
include/net_wifi_private.h [changed mode: 0644->0755]
include/wifi.h [changed mode: 0644->0755]
packaging/capi-network-wifi.spec
src/libnetwork.c [changed mode: 0644->0755]
src/net_wifi.c [changed mode: 0644->0755]
src/net_wifi_ap.c [changed mode: 0644->0755]
test/CMakeLists.txt
test/wifi_test.c [changed mode: 0644->0755]

diff --git a/AUTHORS b/AUTHORS
deleted file mode 100644 (file)
index 5c2063d..0000000
--- a/AUTHORS
+++ /dev/null
@@ -1,2 +0,0 @@
-Jeik Jaehyun Kim <jeik01.kim@samsung.com>
-ByungWoo Lee <bw1212.lee@samsung.com>
index 4974b90..0db0d49 100644 (file)
@@ -9,11 +9,21 @@ SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 SET(INC_DIR include)
 INCLUDE_DIRECTORIES(${INC_DIR})
 
-SET(dependents "dlog vconf capi-base-common glib-2.0 network")
+SET(dependents "dlog vconf capi-base-common glib-2.0 network capi-system-info")
 SET(pc_dependents "capi-base-common")
 
+IF(TIZEN_DUALSIM_ENABLE)
+    ADD_DEFINITIONS(-DTIZEN_DUALSIM_ENABLE)
+ENDIF(TIZEN_DUALSIM_ENABLE)
+IF(TIZEN_WEARABLE)
+       ADD_DEFINITIONS(-DTIZEN_WEARABLE)
+ENDIF(TIZEN_WEARABLE)
+IF(TIZEN_MOBILE)
+       ADD_DEFINITIONS(-DTIZEN_MOBILE)
+ENDIF(TIZEN_MOBILE)
+
 INCLUDE(FindPkgConfig)
-pkg_check_modules(${fw_name} REQUIRED ${dependents})
+pkg_check_modules(${fw_name} REQUIRED ${dependents} ${APPFW_REQUIRED_PKGS})
 FOREACH(flag ${${fw_name}_CFLAGS})
     SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
@@ -28,7 +38,7 @@ ENDIF("${ARCH}" STREQUAL "arm")
 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
 ADD_DEFINITIONS("-DTIZEN_DEBUG")
 
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=${LIB_INSTALL_DIR}")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib")
 
 aux_source_directory(src SOURCES)
 ADD_LIBRARY(${fw_name} SHARED ${SOURCES})
@@ -42,7 +52,7 @@ SET_TARGET_PROPERTIES(${fw_name}
      CLEAN_DIRECT_OUTPUT 1
 )
 
-INSTALL(TARGETS ${fw_name} DESTINATION ${LIB_INSTALL_DIR})
+INSTALL(TARGETS ${fw_name} DESTINATION lib)
 INSTALL(
         DIRECTORY ${INC_DIR}/ DESTINATION include/network
         FILES_MATCHING
@@ -59,9 +69,9 @@ CONFIGURE_FILE(
     ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc
     @ONLY
 )
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION lib/pkgconfig)
 
-#ADD_SUBDIRECTORY(test)
+ADD_SUBDIRECTORY(test)
 
 IF(UNIX)
 
similarity index 99%
rename from LICENSE.APLv2
rename to LICENSE
index d645695..100c877 100644 (file)
+++ b/LICENSE
@@ -1,3 +1,4 @@
+Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. All rights reserved.
 
                                  Apache License
                            Version 2.0, January 2004
    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.
+
diff --git a/NOTICE b/NOTICE
index 0e0f016..ccdad52 100644 (file)
--- a/NOTICE
+++ b/NOTICE
@@ -1,3 +1,3 @@
 Copyright (c) Samsung Electronics Co., Ltd. All rights reserved.
 Except as noted, this software is licensed under Apache License, Version 2.
-Please, see the LICENSE.APLv2 file for Apache License terms and conditions.
+Please, see the LICENSE file for Apache License terms and conditions.
index 97e8c31..5d417ef 100644 (file)
@@ -1,4 +1,7 @@
 <manifest>
+       <assign>
+               <filesystem path="/usr/bin/wifi_test" exec_label="connman"/>
+       </assign>
        <request>
                <domain name="_"/>
        </request>
diff --git a/debian/capi-network-wifi-dev.install b/debian/capi-network-wifi-dev.install
deleted file mode 100644 (file)
index 761a28b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-/usr/include/*
-/usr/include/*/*
-/usr/lib/pkgconfig/*.pc
-
diff --git a/debian/capi-network-wifi.install b/debian/capi-network-wifi.install
deleted file mode 100644 (file)
index 4a755a4..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/usr/lib/lib*.so*
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100644 (file)
index ff1b16d..0000000
+++ /dev/null
@@ -1,231 +0,0 @@
-capi-network-wifi (0.1.2-24) unstable; urgency=low
-
-  * Clean the unnecessary things up
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.2-24
-
- -- JaeHyun Kim <jeik01.kim@samsung.com>  Mon, 20 May 2013 16:33:46 +0900
-
-capi-network-wifi (0.1.2-23) unstable; urgency=low
-
-  * Use 'Already exists' error msg if applicable
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.2-23
-
- -- JaeHyun Kim <jeik01.kim@samsung.com>  Mon, 20 May 2013 15:27:34 +0900
-
-capi-network-wifi (0.1.2-22) unstable; urgency=low
-
-  * Revise wifi_ap_set_eap_private_key_info() - admit to set without password
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.2-22
-
- -- JaeHyun Kim <jeik01.kim@samsung.com>  Tue, 14 May 2013 23:27:03 +0900
-
-capi-network-wifi (0.1.2-21) unstable; urgency=low
-
-  * Avoid resetting IP, subnet mask and gateway to 0 in case of static type
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.2-21
-
- -- JaeHyun Kim <jeik01.kim@samsung.com>  Tue, 14 May 2013 23:05:09 +0900
-
-capi-network-wifi (0.1.2-20) unstable; urgency=low
-
-  * Set CFLAGS fvisibility hidden
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.2-20
-
- -- JaeHyun Kim <jeik01.kim@samsung.com>  Tue, 14 May 2013 22:19:16 +0900
-
-capi-network-wifi (0.1.2-19) unstable; urgency=low
-
-  * Fix Wi-Fi open connection
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.2-19
-
- -- JaeHyun Kim <jeik01.kim@samsung.com>  Tue, 14 May 2013 11:40:44 +0900
-
-capi-network-wifi (0.1.2-17) unstable; urgency=low
-
-  * Handle NET_ERR_ACTIVE_CONNECTION_EXISTS event and correct the unit of data transfer rate
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.2-17
-
- -- JaeHyun Kim <jeik01.kim@samsung.com>  Fri, 22 Mar 2013 18:30:06 +0900
-
-capi-network-wifi (0.1.2-16) unstable; urgency=low
-
-  * Revise wifi_is_activated() to fix performance issue
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.2-16
-
- -- JaeHyun Kim <jeik01.kim@samsung.com>  Tue, 19 Mar 2013 01:01:15 +0900
-
-capi-network-wifi (0.1.2-15) unstable; urgency=low
-
-  * Added specific(hidden) scan support
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.2-15
-
- -- JaeHyun Kim <jeik01.kim@samsung.com>  Tue, 26 Feb 2013 11:19:52 +0900
-
-capi-network-wifi (0.1.2-14) unstable; urgency=low
-
-  * Fix memory corruption
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.2-14
-
- -- JaeHyun Kim <jeik01.kim@samsung.com>  Mon, 28 Jan 2013 21:04:51 +0900
-
-capi-network-wifi (0.1.2-13) unstable; urgency=low
-
-  * Set default address if there is no manual proxy to be restored
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.2-13
-
- -- JaeHyun Kim <jeik01.kim@samsung.com>  Wed, 23 Jan 2013 12:17:18 +0900
-
-capi-network-wifi (0.1.2-12) unstable; urgency=low
-
-  * Revise wifi_ap_is_passphrase_required() to fit connman 1.3
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.2-12
-
- -- JaeHyun Kim <jeik01.kim@samsung.com>  Wed, 16 Jan 2013 17:15:16 +0900
-
-capi-network-wifi (0.1.2-11) unstable; urgency=low
-
-  * Use libnet-client API instead of vconf value to get Wi-Fi state in wifi_is_activated() API
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.2-11
-
- -- JaeHyun Kim <jeik01.kim@samsung.com>  Tue, 15 Jan 2013 00:07:57 +0900
-
-capi-network-wifi (0.1.2-10) unstable; urgency=low
-
-  * Add WIFI_ERROR_SECURITY_RESTRICTED
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.2-10
-
- -- JaeHyun Kim <jeik01.kim@samsung.com>  Fri, 04 Jan 2013 14:19:09 +0900
-
-capi-network-wifi (0.1.2-9) unstable; urgency=low
-
-  * In case of setting IP address, Gateway, Subnet and proxy, it is allowed that a value is set to NULL
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.2-9
-
- -- JaeHyun Kim <jeik01.kim@samsung.com>  Fri, 04 Jan 2013 13:43:46 +0900
-
-capi-network-wifi (0.1.2-8) unstable; urgency=low
-
-  * Fix a bug, the api for dns setting is not work properly
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.2-8
-
- -- JaeHyun Kim <jeik01.kim@samsung.com>  Thu, 13 Dec 2012 19:48:24 +0900
-
-capi-network-wifi (0.1.2-7) unstable; urgency=low
-
-  * Fix a bug, the list handle not reset to NULL after clearing the AP list.
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.2-7
-
- -- Praveen C <pravin.c@samsung.com>  Sat, 01 Dec 2012 18:56:38 +0530
-
-capi-network-wifi (0.1.2-6) unstable; urgency=low
-
-  * Fix a bug, the setters of proxy/ip method are not work properly
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.2-6
-
- -- JaeHyun Kim <jeik01.kim@samsung.com>  Fri, 23 Nov 2012 17:33:40 +0900
-
-capi-network-wifi (0.1.2-5) unstable; urgency=low
-
-  * Revise minor things
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.2-5
-
- -- Danny Jeongseok Seo <s.seo@samsung.com>  Tue, 13 Nov 2012 14:14:26 +0900
-
-capi-network-wifi (0.1.2-4) unstable; urgency=low
-
-  * Revise test code
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.2-4
-
- -- JaeHyun Kim <jeik01.kim@samsung.com>  Tue, 06 Nov 2012 20:31:31 +0900
-
-capi-network-wifi (0.1.2-3) unstable; urgency=low
-
-  * Add wifi_ap_get_eap_passphrase()
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.2-3
-
- -- JaeHyun Kim <jeik01.kim@samsung.com>  Mon, 15 Oct 2012 17:07:31 +0900
-
-capi-network-wifi (0.1.2-2) unstable; urgency=low
-
-  * Install license
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.2-2
-
- -- Danny Jeongseok Seo <s.seo@samsung.com>  Thu, 11 Oct 2012 19:06:52 +0900
-
-capi-network-wifi (0.1.2-1) unstable; urgency=low
-
-  * Extend some APIs to fit requirements from osp
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.2-1
-
- -- JaeHyun Kim <jeik01.kim@samsung.com>  Thu, 27 Sep 2012 17:25:19 +0900
-
-capi-network-wifi (0.1.1-4) unstable; urgency=low
-
-  * Update manifest
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.1-4
-
- -- Danny Jeongseok Seo <s.seo@samsung.com>  Fri, 21 Sep 2012 15:54:22 +0900
-
-capi-network-wifi (0.1.1-3) unstable; urgency=low
-
-  * Remove unused codes from the UTC file
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.1-3
-
- -- JaeHyun Kim <jeik01.kim@samsung.com>  Tue, 04 Sep 2012 16:21:28 +0900
-
-capi-network-wifi (0.1.1-2) unstable; urgency=low
-
-  * Add UTC files
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.1-2
-
- -- JaeHyun Kim <jeik01.kim@samsung.com>  Wed, 04 Jul 2012 11:41:10 +0900
-
-capi-network-wifi (0.1.1-1) unstable; urgency=low
-
-  * Add AP initialization functions for user creation
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.1-1
-
- -- JaeHyun Kim <jeik01.kim@samsung.com>  Mon, 02 Jul 2012 11:01:10 +0900
-
-capi-network-wifi (0.1.1-0) unstable; urgency=low
-
-  * Package implementation
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.1-0
-
- -- JaeHyun Kim <jeik01.kim@samsung.com>  Mon, 21 May 2012 19:31:01 +0900
-
-capi-network-wifi (0.1.0-1) unstable; urgency=low
-
-  * Initial Upload
-  * Git: framework/api/wifi
-  * Tag: capi-network-wifi_0.1.0-1
-
- -- JaeHyun Kim <jeik01.kim@samsung.com>  Mon, 09 Apr 2012 20:54:57 +0900
diff --git a/debian/compat b/debian/compat
deleted file mode 100644 (file)
index 7f8f011..0000000
+++ /dev/null
@@ -1 +0,0 @@
-7
diff --git a/debian/control b/debian/control
deleted file mode 100644 (file)
index 7fb1ee7..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-Source: capi-network-wifi
-Section: libs
-Priority: extra
-Maintainer: JaeHyun Kim <jeik01.kim@samsung.com>
-Build-Depends: debhelper (>= 5), dlog-dev, capi-base-common-dev, libvconf-dev, libglib2.0-dev, libdbus-glib-1-dev, libnetwork-dev
-
-Package: capi-network-wifi
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: Network Wi-Fi library in TIZEN C API
-
-Package: capi-network-wifi-dev
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, capi-network-wifi (= ${Source-Version}), capi-base-common-dev
-Description: Network Wi-Fi library in TIZEN C API (DEV)
-
-Package: capi-network-wifi-dbg
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, capi-network-wifi (= ${Source-Version})
-Description: Network Wi-Fi library in TIZEN C API (DBG)
-
diff --git a/debian/rules b/debian/rules
deleted file mode 100755 (executable)
index 3ae0922..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/make -f
-
-CFLAGS = -Wall -g
-FULLVER ?= $(shell dpkg-parsechangelog | grep Version: | cut -d ' ' -f 2 | cut -d '-' -f 1)
-MAJORVER ?= $(shell echo $(FULLVER) | cut -d '.' -f 1)
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-       CFLAGS += -O0
-else
-       CFLAGS += -O2
-endif
-CMAKE_ROOT_DIR ?= $(CURDIR)
-CMAKE_BUILD_DIR ?= $(CURDIR)/cmake_build_tmp
-
-configure: configure-stamp
-configure-stamp:
-       dh_testdir
-       mkdir -p $(CMAKE_BUILD_DIR) && cd $(CMAKE_BUILD_DIR) && cmake .. -DFULLVER=${FULLVER} -DMAJORVER=${MAJORVER}
-       touch configure-stamp
-
-
-build: build-stamp
-build-stamp: configure-stamp
-       dh_testdir
-       cd $(CMAKE_BUILD_DIR) && $(MAKE)
-       touch $@
-
-clean:
-       cd $(CMAKE_ROOT_DIR)
-       dh_testdir
-       dh_testroot
-       rm -f build-stamp configure-stamp
-       rm -f `find . -name *.pc`
-       rm -rf $(CMAKE_BUILD_DIR)
-       dh_clean
-
-install: build
-       dh_testdir
-       dh_testroot
-       dh_clean -k
-       dh_installdirs
-
-       cd $(CMAKE_BUILD_DIR) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
-
-binary-indep: build install
-
-binary-arch: build install
-       dh_testdir
-       dh_testroot
-       dh_installchangelogs
-       dh_installdocs
-       dh_installexamples
-       dh_install --sourcedir=debian/tmp
-       dh_installman
-       dh_link
-       dh_strip --dbg-package=capi-network-wifi-dbg
-       dh_fixperms
-       dh_makeshlibs
-       dh_installdeb
-       dh_shlibdeps
-       dh_gencontrol
-       dh_md5sums
-       dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
-
diff --git a/doc/wifi_doc.h b/doc/wifi_doc.h
new file mode 100755 (executable)
index 0000000..465e46e
--- /dev/null
@@ -0,0 +1,198 @@
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 __TIZEN_NETWORK_WIFI_DOC_H__
+#define __TIZEN_NETWORK_WIFI_DOC_H__
+
+/**
+ * @defgroup CAPI_NETWORK_WIFI_MODULE  Wi-Fi
+ * @brief The Wi-Fi API provides functions for managing Wi-Fi and monitoring the state of Wi-Fi.
+ * @ingroup CAPI_NETWORK_FRAMEWORK
+ *
+ * @section CAPI_NETWORK_WIFI_MODULE_HEADER Required Header
+ *   \#include <wifi.h>
+ *
+ * @section CAPI_NETWORK_WIFI_MODULE_OVERVIEW Overview
+ * Wi-Fi allows your application to connect to a Wireless Local Area Network (WLAN) and to transfer data over the network.
+ * The Wi-Fi Manager enables your application to activate and deactivate a local Wi-Fi device, and to connect to a WLAN network
+ * in the infrastructure mode.
+ * @section CAPI_NETWORK_WIFI_MODULE_FEATURE Related Features
+ * This API is related with the following features:\n
+ * - http://tizen.org/feature/network.wifi\n
+ *
+ * It is recommended to design feature related codes in your application for reliability.\n
+ *
+ * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n
+ *
+ * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
+ *
+ * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
+ *
+ */
+
+/**
+ * @defgroup CAPI_NETWORK_WIFI_MANAGER_MODULE  Wi-Fi Manager
+ * @brief The Wi-Fi API provides functions for managing Wi-Fi.
+ * @ingroup CAPI_NETWORK_WIFI_MODULE
+ *
+ * @section CAPI_NETWORK_WIFI_MANAGER_MODULE_HEADER Required Header
+ *   \#include <wifi.h>
+ *
+ * @section CAPI_NETWORK_WIFI_MANAGER_MODULE_OVERVEW Overview
+ * The Wi-Fi Manager provides functions for managing Wi-Fi.
+ * Using the Wi-Fi Manager, you can implement features that allow the users of your application to:
+ * - Activate / Deactivate the Wi-Fi device
+ * - Connect to the access point
+ * - Scans the access points
+ * @section CAPI_NETWORK_WIFI_MANAGER_MODULE_FEATURE Related Features
+ * This API is related with the following features:\n
+ * - http://tizen.org/feature/network.wifi\n
+ *
+ * It is recommended to design feature related codes in your application for reliability.\n
+ *
+ * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n
+ *
+ * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
+ *
+ * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
+ *
+ */
+
+/**
+ * @defgroup CAPI_NETWORK_WIFI_MONITOR_MODULE  Wi-Fi Monitor
+ * @brief The Wi-Fi API provides functions for monitoring the state of Wi-Fi.
+ * @ingroup CAPI_NETWORK_WIFI_MODULE
+ *
+ * @section CAPI_NETWORK_WIFI_MONITOR_MODULE_HEADER Required Header
+ *   \#include <wifi.h>
+ *
+ * @section CAPI_NETWORK_WIFI_MONITOR_MODULE_OVERVIEW Overview
+ * The Wi-Fi Monitor allows monitoring the changes of Wi-Fi.
+ * @section CAPI_NETWORK_WIFI_MONITOR_MODULE_FEATURE Related Features
+ * This API is related with the following features:\n
+ * - http://tizen.org/feature/network.wifi\n
+ *
+ * It is recommended to design feature related codes in your application for reliability.\n
+ *
+ * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n
+ *
+ * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
+ *
+ * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
+ *
+ */
+
+/**
+ * @defgroup CAPI_NETWORK_WIFI_AP_MODULE  AP
+ * @brief The Access Point API provides functions for managing the Access Point.
+ * @ingroup CAPI_NETWORK_WIFI_MANAGER_MODULE
+ *
+ * @section CAPI_NETWORK_WIFI_AP_MODULE  Required Header
+ *   \#include <wifi.h>
+ *
+ * @section CAPI_NETWORK_WIFI_AP_MODULE_OVERVIEW Overview
+ * The Access Point API provides functions for managing the Access Point. You need to create the @a ap handle for using the functions.
+ * You can use Wi-Fi information with the handle.
+ * @section CAPI_NETWORK_WIFI_AP_MODULE_FEATURE Related Features
+ * This API is related with the following features:\n
+ * - http://tizen.org/feature/network.wifi\n
+ *
+ * It is recommended to design feature related codes in your application for reliability.\n
+ *
+ * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n
+ *
+ * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
+ *
+ * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
+ *
+ */
+
+/**
+ * @defgroup CAPI_NETWORK_WIFI_AP_NETWORK_MODULE  Network Information
+ * @brief The Connection Information API provides functions for managing the network information.
+ * @ingroup CAPI_NETWORK_WIFI_AP_MODULE
+ *
+ * @section CAPI_NETWORK_WIFI_AP_CONNECTION_MODULE  Required Header
+ *   \#include <wifi.h>
+ *
+ * @section CAPI_NETWORK_WIFI_AP_CONNECTION_MODULE_OVERVIEW Overview
+ * The Connection Information API provides functions for managing the network information. You can manage the network information using the functions.
+ * @section CAPI_NETWORK_WIFI_AP_MODULE_FEATURE Related Features
+ * This API is related with the following features:\n
+ * - http://tizen.org/feature/network.wifi\n
+ *
+ * It is recommended to design feature related codes in your application for reliability.\n
+ *
+ * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n
+ *
+ * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
+ *
+ * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
+ *
+ */
+
+/**
+ * @defgroup CAPI_NETWORK_WIFI_AP_SECURITY_MODULE  Security Information
+ * @brief The Security Information API provides functions for managing the Security information.
+ * @ingroup CAPI_NETWORK_WIFI_AP_MODULE
+ *
+ * @section CAPI_NETWORK_WIFI_AP_SECURITY_MODULE  Required Header
+ *   \#include <wifi.h>
+ *
+ * @section CAPI_NETWORK_WIFI_AP_SECURITY_MODULE_OVERVIEW Overview
+ * The Security Information API provides functions for managing the Security information. You can manage the Security information using the functions.
+ * @section CAPI_NETWORK_WIFI_AP_SECURITY_MODULE_FEATURE Related Features
+ * This API is related with the following features:\n
+ * - http://tizen.org/feature/network.wifi\n
+ *
+ * It is recommended to design feature related codes in your application for reliability.\n
+ *
+ * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n
+ *
+ * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
+ *
+ * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
+ *
+ */
+
+/**
+ * @defgroup CAPI_NETWORK_WIFI_AP_SECURITY_EAP_MODULE  EAP
+ * @brief The EAP API provides functions for managing the EAP information.
+ * @ingroup CAPI_NETWORK_WIFI_AP_SECURITY_MODULE
+ *
+ * @section CAPI_NETWORK_WIFI_AP_SECURITY_EAP_MODULE  Required Header
+ *   \#include <wifi.h>
+ *
+ * @section CAPI_NETWORK_WIFI_AP_SECURITY_EAP_MODULE_OVERVIEW Overview
+ * The EAP API provides functions for managing the EAP information. You can manage the EAP information using the functions.
+ * @section CAPI_NETWORK_WIFI_AP_SECURITY_EAP_MODULE_FEATURE Related Features
+ * This API is related with the following features:\n
+ * - http://tizen.org/feature/network.wifi\n
+ *
+ * It is recommended to design feature related codes in your application for reliability.\n
+ *
+ * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n
+ *
+ * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
+ *
+ * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
+ *
+ */
+
+
+
+#endif /* __TIZEN_NETWORK_WIFI_DOC_H__ */
old mode 100644 (file)
new mode 100755 (executable)
index 3027178..7f206e8
 #include <dlog.h>
 #include <network-cm-intf.h>
 #include <network-wifi-intf.h>
+#include <system_info.h>
 
 #include "wifi.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
 #undef LOG_TAG
 #define LOG_TAG "CAPI_NETWORK_WIFI"
 
 #define WIFI_ERROR     2
 #define WIFI_WARN      3
 
+#define WIFI_FEATURE   "http://tizen.org/feature/network.wifi"
+
+#define CHECK_FEATURE_SUPPORTED(feature_name) \
+       do { \
+               bool feature_supported = FALSE; \
+               if (!system_info_get_platform_bool(feature_name, &feature_supported)) { \
+                       if (feature_supported == FALSE) { \
+                               LOGE("%s feature is disabled", feature_name); \
+                               return WIFI_ERROR_NOT_SUPPORTED; \
+                       } \
+               } else { \
+                       LOGE("Error - Feature getting from System Info"); \
+                       return WIFI_ERROR_OPERATION_FAILED; \
+               } \
+       } while(0)
+
 #define WIFI_LOG(log_level, format, args...) \
        do { \
                switch (log_level) { \
                } \
        } while(0)
 
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
+#define SECURE_WIFI_LOG(log_level, format, args...) \
+       do { \
+               switch (log_level) { \
+               case WIFI_ERROR: \
+                       SECURE_LOGE(format, ## args); \
+                       break; \
+               case WIFI_WARN: \
+                       SECURE_LOGW(format, ## args); \
+                       break; \
+               default: \
+                       SECURE_LOGI(format, ## args); \
+               } \
+       } while(0)
 
+bool _wifi_is_init(void);
 
-bool _wifi_libnet_init(void);
+int _wifi_libnet_init(void);
 bool _wifi_libnet_deinit(void);
-int _wifi_activate(wifi_activated_cb callback, void *user_data);
+int _wifi_activate(wifi_activated_cb callback, gboolean wifi_picker_test, void *user_data);
 int _wifi_deactivate(wifi_deactivated_cb callback, void *user_data);
 
 bool _wifi_libnet_check_ap_validity(wifi_ap_h ap_h);
@@ -59,19 +91,19 @@ void _wifi_libnet_add_to_ap_list(wifi_ap_h ap_h);
 void _wifi_libnet_remove_from_ap_list(wifi_ap_h ap_h);
 bool _wifi_libnet_check_profile_name_validity(const char *profile_name);
 
-bool _wifi_libnet_get_wifi_device_state(wifi_device_state_e *device_state);
-bool _wifi_libnet_get_wifi_state(wifi_connection_state_e* connection_state);
+int _wifi_libnet_get_wifi_device_state(wifi_device_state_e *device_state);
+int _wifi_libnet_get_wifi_state(wifi_connection_state_e* connection_state);
 int _wifi_libnet_get_intf_name(char** name);
 int _wifi_libnet_scan_request(wifi_scan_finished_cb callback, void *user_data);
-int _wifi_libnet_scan_hidden_ap(const char *essid,
-                                       wifi_scan_finished_cb callback, void *user_data);
 int _wifi_libnet_get_connected_profile(wifi_ap_h *ap);
-bool _wifi_libnet_foreach_found_aps(wifi_found_ap_cb callback, void *user_data);
-bool _wifi_libnet_foreach_found_hidden_aps(wifi_found_ap_cb callback, void *user_data);
+int _wifi_libnet_foreach_found_aps(wifi_found_ap_cb callback, void *user_data);
 
 int _wifi_libnet_open_profile(wifi_ap_h ap_h, wifi_connected_cb callback, void *user_data);
 int _wifi_libnet_close_profile(wifi_ap_h ap_h, wifi_disconnected_cb callback, void *user_data);
-int _wifi_libnet_connect_with_wps(wifi_ap_h ap, wifi_connected_cb callback, void *user_data);
+int _wifi_libnet_connect_with_wps_pbc(wifi_ap_h ap,
+               wifi_connected_cb callback, void *user_data);
+int _wifi_libnet_connect_with_wps_pin(wifi_ap_h ap, const char *pin,
+               wifi_connected_cb callback, void *user_data);
 int _wifi_libnet_forget_ap(wifi_ap_h ap);
 
 int _wifi_set_power_on_off_cb(wifi_device_state_changed_cb callback, void *user_data);
@@ -83,6 +115,10 @@ int _wifi_unset_connection_state_cb();
 
 int _wifi_update_ap_info(net_profile_info_t *ap_info);
 wifi_connection_state_e _wifi_convert_to_ap_state(net_state_type_t state);
+
+guint _wifi_callback_add(GSourceFunc func, gpointer user_data);
+void _wifi_callback_cleanup(void);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
old mode 100644 (file)
new mode 100755 (executable)
index fcf3add..0ff589a
@@ -24,29 +24,36 @@ extern "C" {
 #endif
 
 /**
+ * @file wifi.h
+ */
+
+/**
 * @addtogroup CAPI_NETWORK_WIFI_MANAGER_MODULE
 * @{
 */
 
 /**
-* @brief The Wi-Fi error type
-*/
+ * @brief Enumeration for the Wi-Fi error type.
+ * @since_tizen 2.3
+ */
 typedef enum
 {
-    WIFI_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
-    WIFI_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
-    WIFI_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory error */
-    WIFI_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< Invalid operation */
+    WIFI_ERROR_NONE = TIZEN_ERROR_NONE,                                                /**< Successful */
+    WIFI_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER,                      /**< Invalid parameter */
+    WIFI_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY,                              /**< Out of memory error */
+    WIFI_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION,                      /**< Invalid operation */
     WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED = TIZEN_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED, /**< Address family not supported */
-    WIFI_ERROR_OPERATION_FAILED = TIZEN_ERROR_NETWORK_CLASS|0x0301, /**< Operation failed */
-    WIFI_ERROR_NO_CONNECTION = TIZEN_ERROR_NETWORK_CLASS|0x0302, /**< There is no connected AP */
-    WIFI_ERROR_NOW_IN_PROGRESS = TIZEN_ERROR_NOW_IN_PROGRESS, /** Now in progress */
-    WIFI_ERROR_ALREADY_EXISTS = TIZEN_ERROR_NETWORK_CLASS|0x0303, /**< Already exists */
-    WIFI_ERROR_OPERATION_ABORTED = TIZEN_ERROR_NETWORK_CLASS|0x0304, /**< Operation is aborted */
-    WIFI_ERROR_DHCP_FAILED = TIZEN_ERROR_NETWORK_CLASS|0x0306, /**< DHCP failed */
-    WIFI_ERROR_INVALID_KEY = TIZEN_ERROR_NETWORK_CLASS|0x0307, /**< Invalid key */
-    WIFI_ERROR_NO_REPLY = TIZEN_ERROR_NETWORK_CLASS|0x0308, /**< No reply */
-    WIFI_ERROR_SECURITY_RESTRICTED = TIZEN_ERROR_NETWORK_CLASS|0x0309, /**< Restricted by security system policy */
+    WIFI_ERROR_OPERATION_FAILED = TIZEN_ERROR_WIFI|0x0301,                             /**< Operation failed */
+    WIFI_ERROR_NO_CONNECTION = TIZEN_ERROR_WIFI|0x0302,                                /**< There is no connected AP */
+    WIFI_ERROR_NOW_IN_PROGRESS = TIZEN_ERROR_NOW_IN_PROGRESS,                          /**< Now in progress */
+    WIFI_ERROR_ALREADY_EXISTS = TIZEN_ERROR_WIFI|0x0303,                               /**< Already exists */
+    WIFI_ERROR_OPERATION_ABORTED = TIZEN_ERROR_WIFI|0x0304,                            /**< Operation is aborted */
+    WIFI_ERROR_DHCP_FAILED = TIZEN_ERROR_WIFI|0x0306,                                  /**< DHCP failed */
+    WIFI_ERROR_INVALID_KEY = TIZEN_ERROR_WIFI|0x0307,                                  /**< Invalid key */
+    WIFI_ERROR_NO_REPLY = TIZEN_ERROR_WIFI|0x0308,                                     /**< No reply */
+    WIFI_ERROR_SECURITY_RESTRICTED = TIZEN_ERROR_WIFI|0x0309,                          /**< Restricted by security system policy */
+    WIFI_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED,                      /**< Permission Denied */
+    WIFI_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED                /**< Not Supported */
 } wifi_error_e;
 
 /**
@@ -60,28 +67,32 @@ typedef enum
 */
 
 /**
-* @brief The state of Wi-Fi device
-*/
+ * @brief Enumeration for the state of the Wi-Fi device.
+ * @since_tizen 2.3
+ */
 typedef enum
 {
     WIFI_DEVICE_STATE_DEACTIVATED = 0,  /**< Wi-Fi is Deactivated */
-    WIFI_DEVICE_STATE_ACTIVATED = 1,  /**< Wi-Fi is activated */
+    WIFI_DEVICE_STATE_ACTIVATED = 1,   /**< Wi-Fi is activated */
 } wifi_device_state_e;
 
 /**
-* @brief The state of Wi-Fi connection
-*/
+ * @brief Enumeration for the state of the Wi-Fi connection.
+ * @since_tizen 2.3
+ */
 typedef enum
 {
-    WIFI_CONNECTION_STATE_DISCONNECTED = 0,  /**< Disconnected state */
-    WIFI_CONNECTION_STATE_ASSOCIATION = 1,  /**< Association state */
-    WIFI_CONNECTION_STATE_CONFIGURATION = 2,  /**< Configuration state */
-    WIFI_CONNECTION_STATE_CONNECTED = 3,  /**< Connected state */
+       WIFI_CONNECTION_STATE_FAILURE = -1,             /**< Connection failed state */
+       WIFI_CONNECTION_STATE_DISCONNECTED = 0,         /**< Disconnected state */
+       WIFI_CONNECTION_STATE_ASSOCIATION = 1,          /**< Association state */
+       WIFI_CONNECTION_STATE_CONFIGURATION = 2,        /**< Configuration state */
+       WIFI_CONNECTION_STATE_CONNECTED = 3,            /**< Connected state */
 } wifi_connection_state_e;
 
 /**
-* @brief The RSSI level
-*/
+ * @brief Enumeration for the RSSI level.
+ * @since_tizen 2.3
+ */
 typedef enum
 {
     WIFI_RSSI_LEVEL_0 = 0,  /**< level 0 */
@@ -102,20 +113,22 @@ typedef enum
 */
 
 /**
-* @brief Net IP configuration Type
-*/
+ * @brief Enumeration for the Net IP configuration type.
+ * @since_tizen 2.3
+ */
 typedef enum
 {
-    WIFI_IP_CONFIG_TYPE_NONE = 0,  /**< Not defined */
-    WIFI_IP_CONFIG_TYPE_STATIC  = 1,  /**< Manual IP configuration */
-    WIFI_IP_CONFIG_TYPE_DYNAMIC = 2,  /**< Config IP using DHCP client*/
-    WIFI_IP_CONFIG_TYPE_AUTO = 3,  /**< Config IP from Auto IP pool (169.254/16). Later with DHCP client, if available */
-    WIFI_IP_CONFIG_TYPE_FIXED = 4,  /**< Indicates an IP address that can not be modified */
+    WIFI_IP_CONFIG_TYPE_NONE = 0,      /**< Not defined */
+    WIFI_IP_CONFIG_TYPE_STATIC  = 1,   /**< Manual IP configuration */
+    WIFI_IP_CONFIG_TYPE_DYNAMIC = 2,   /**< Config IP using DHCP client*/
+    WIFI_IP_CONFIG_TYPE_AUTO = 3,      /**< Config IP from Auto IP pool (169.254/16). Later with DHCP client, if available */
+    WIFI_IP_CONFIG_TYPE_FIXED = 4,     /**< Indicates an IP address that can not be modified */
 } wifi_ip_config_type_e;
 
 /**
-* @brief Address type
-*/
+ * @brief Enumeration for the address type.
+ * @since_tizen 2.3
+ */
 typedef enum
 {
     WIFI_ADDRESS_FAMILY_IPV4 = 0,  /**< IPV4 Address family */
@@ -123,13 +136,14 @@ typedef enum
 } wifi_address_family_e;
 
 /**
-* @brief This enumeration defines the proxy method type.
-*/
+ * @brief Enumeration for the proxy method type.
+ * @since_tizen 2.3
+ */
 typedef enum
 {
-    WIFI_PROXY_TYPE_DIRECT = 0, /**< Direct connection */
-    WIFI_PROXY_TYPE_AUTO = 1, /**< Auto configuration(Use PAC file). If URL property is not set, DHCP/WPAD auto-discover will be tried */
-    WIFI_PROXY_TYPE_MANUAL  = 2  /**< Manual configuration */
+    WIFI_PROXY_TYPE_DIRECT = 0,        /**< Direct connection */
+    WIFI_PROXY_TYPE_AUTO = 1,  /**< Auto configuration(Use PAC file). If URL property is not set, DHCP/WPAD auto-discover will be tried */
+    WIFI_PROXY_TYPE_MANUAL  = 2        /**< Manual configuration */
 } wifi_proxy_type_e;
 
 /**
@@ -143,28 +157,33 @@ typedef enum
 */
 
 /**
-* @brief Below security modes are used in infrastructure and ad-hoc mode
-* For now all EAP security mechanisms are provided only in infrastructure mode
-*/
+ * @brief Enumeration for Wi-Fi security type.
+ * @details The following security modes are used in infrastructure and ad-hoc mode.
+ * For now all EAP security mechanisms are provided only in infrastructure mode.
+ *
+ * @since_tizen 2.3
+ */
 typedef enum
 {
-    WIFI_SECURITY_TYPE_NONE = 0,  /**< Security disabled */
-    WIFI_SECURITY_TYPE_WEP = 1,  /**< WEP */
-    WIFI_SECURITY_TYPE_WPA_PSK = 2,  /**< WPA-PSK */
-    WIFI_SECURITY_TYPE_WPA2_PSK = 3,  /**< WPA2-PSK */
-    WIFI_SECURITY_TYPE_EAP = 4,  /**< EAP */
+    WIFI_SECURITY_TYPE_NONE = 0,       /**< Security disabled */
+    WIFI_SECURITY_TYPE_WEP = 1,        /**< WEP */
+    WIFI_SECURITY_TYPE_WPA_PSK = 2,    /**< WPA-PSK */
+    WIFI_SECURITY_TYPE_WPA2_PSK = 3,   /**< WPA2-PSK */
+    WIFI_SECURITY_TYPE_EAP = 4,        /**< EAP */
 } wifi_security_type_e;
 
 /**
-* @brief Below encryption modes are used in infrastructure and ad-hoc mode
-*/
+ * @brief Enumeration for Wi-Fi encryption type.
+ * @details The following encryption modes are used in infrastructure and ad-hoc mode.
+ * @since_tizen 2.3
+ */
 typedef enum
 {
-    WIFI_ENCRYPTION_TYPE_NONE = 0,  /**< Encryption disabled */
-    WIFI_ENCRYPTION_TYPE_WEP = 1,  /**< WEP */
-    WIFI_ENCRYPTION_TYPE_TKIP = 2,  /**< TKIP */
-    WIFI_ENCRYPTION_TYPE_AES = 3,  /**< AES */
-    WIFI_ENCRYPTION_TYPE_TKIP_AES_MIXED = 4,  /**< TKIP and AES are both supported */
+    WIFI_ENCRYPTION_TYPE_NONE = 0,             /**< Encryption disabled */
+    WIFI_ENCRYPTION_TYPE_WEP = 1,              /**< WEP */
+    WIFI_ENCRYPTION_TYPE_TKIP = 2,             /**< TKIP */
+    WIFI_ENCRYPTION_TYPE_AES = 3,              /**< AES */
+    WIFI_ENCRYPTION_TYPE_TKIP_AES_MIXED = 4,   /**< TKIP and AES are both supported */
 } wifi_encryption_type_e;
 
 /**
@@ -178,28 +197,30 @@ typedef enum
 */
 
 /**
-* @brief EAP type
-*/
+ * @brief Enumeration for EAP type.
+ * @since_tizen 2.3
+ */
 typedef enum
 {
-    WIFI_EAP_TYPE_PEAP = 0,  /**< EAP PEAP type */
-    WIFI_EAP_TYPE_TLS = 1,  /**< EAP TLS type */
-    WIFI_EAP_TYPE_TTLS = 2,  /**< EAP TTLS type */
-    WIFI_EAP_TYPE_SIM = 3,  /**< EAP SIM type */
-    WIFI_EAP_TYPE_AKA = 4,  /**< EAP AKA type */
+    WIFI_EAP_TYPE_PEAP = 0,    /**< EAP PEAP type */
+    WIFI_EAP_TYPE_TLS = 1,     /**< EAP TLS type */
+    WIFI_EAP_TYPE_TTLS = 2,    /**< EAP TTLS type */
+    WIFI_EAP_TYPE_SIM = 3,     /**< EAP SIM type */
+    WIFI_EAP_TYPE_AKA = 4,     /**< EAP AKA type */
 } wifi_eap_type_e;
 
 /**
-* @brief EAP phase2 authentication type
-*/
+ * @brief Enumeration for EAP phase2 authentication type.
+ * @since_tizen 2.3
+ */
 typedef enum
 {
-    WIFI_EAP_AUTH_TYPE_NONE = 0,  /**< EAP phase2 authentication none */
-    WIFI_EAP_AUTH_TYPE_PAP = 1,  /**< EAP phase2 authentication PAP */
-    WIFI_EAP_AUTH_TYPE_MSCHAP = 2,  /**< EAP phase2 authentication MSCHAP */
-    WIFI_EAP_AUTH_TYPE_MSCHAPV2 = 3,  /**< EAP phase2 authentication MSCHAPv2 */
-    WIFI_EAP_AUTH_TYPE_GTC = 4,  /**< EAP phase2 authentication GTC */
-    WIFI_EAP_AUTH_TYPE_MD5 = 5,  /**< EAP phase2 authentication MD5 */
+    WIFI_EAP_AUTH_TYPE_NONE = 0,       /**< EAP phase2 authentication none */
+    WIFI_EAP_AUTH_TYPE_PAP = 1,        /**< EAP phase2 authentication PAP */
+    WIFI_EAP_AUTH_TYPE_MSCHAP = 2,     /**< EAP phase2 authentication MSCHAP */
+    WIFI_EAP_AUTH_TYPE_MSCHAPV2 = 3,   /**< EAP phase2 authentication MSCHAPv2 */
+    WIFI_EAP_AUTH_TYPE_GTC = 4,                /**< EAP phase2 authentication GTC */
+    WIFI_EAP_AUTH_TYPE_MD5 = 5,                /**< EAP phase2 authentication MD5 */
 } wifi_eap_auth_type_e;
 
 /**
@@ -213,8 +234,9 @@ typedef enum
 */
 
 /**
-* @brief  The handle for Wi-Fi access point.
-*/
+ * @brief The Wi-Fi access point handle.
+ * @since_tizen 2.3
+ */
 typedef void* wifi_ap_h;
 
 /**
@@ -228,64 +250,71 @@ typedef void* wifi_ap_h;
 */
 
 /**
-* @brief Called when you get the found access point repeatedly.
-* @remarks  @a ap is valid only in this function. In order to use the ap outside this function, you must copy the ap with wifi_ap_clone().
-* @param[in]  ap  The access point
-* @param[in]  user_data  The user data passed from the request function
-* @return  @c true to continue with the next iteration of the loop, \n @c false to break out of the loop
-* @pre  wifi_foreach_found_aps() and wifi_foreach_found_hidden_aps() will invoke this callback.
-* @see  wifi_foreach_found_aps()
-* @see  wifi_foreach_found_hidden_aps()
-*/
-typedef bool(*wifi_found_ap_cb)(wifi_ap_h ap, void* user_data);
+ * @brief Called when you get the found access point repeatedly.
+ * @since_tizen 2.3
+ * @remarks @a ap is valid only in this function. In order to use @a ap outside this function, you must copy the ap with wifi_ap_clone().
+ * @param[in]  ap  The access point
+ * @param[in]  user_data  The user data passed from the request function
+ * @return  @c true to continue with the next iteration of the loop, \n
+ *         otherwise @c false to break out of the loop
+ * @pre  wifi_foreach_found_aps() will invoke this callback.
+ * @see  wifi_foreach_found_aps()
+ */
+typedef bool(*wifi_found_ap_cb)(wifi_ap_h ap, void *user_data);
 
 /**
-* @brief Called when the 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_scan()
-* @see wifi_scan_hidden_ap()
-* @see wifi_set_background_scan_cb()
-* @see wifi_unset_background_scan_cb()
-*/
-typedef void(*wifi_scan_finished_cb)(wifi_error_e error_code, voiduser_data);
+ * @brief Called when the scan is finished.
+ * @since_tizen 2.3
+ * @param[in] error_code  The error code
+ * @param[in] user_data The user data passed from the callback registration function
+ * @see wifi_scan()
+ * @see wifi_set_background_scan_cb()
+ * @see wifi_unset_background_scan_cb()
+ */
+typedef void(*wifi_scan_finished_cb)(wifi_error_e error_code, void *user_data);
 
 /**
-* @brief Called after wifi_activate() is completed.
-* @param[in] result  The result
-* @param[in] user_data The user data passed from wifi_activate()
-* @pre wifi_activate() will invoke this callback function.
-* @see wifi_activate()
-*/
-typedef void(*wifi_activated_cb)(wifi_error_e result, void* user_data);
+ * @brief Called after wifi_activate() or wifi_activate_with_wifi_picker_tested() is completed.
+ * @since_tizen 2.3
+ * @param[in] result  The result
+ * @param[in] user_data The user data passed from wifi_activate() and wifi_activate_with_wifi_picker_tested()
+ * @pre wifi_activate() or wifi_activate_with_wifi_picker_tested() will invoke this callback function.
+ * @see wifi_activate()
+ * @see wifi_activate_with_wifi_picker_tested()
+ */
+typedef void(*wifi_activated_cb)(wifi_error_e result, void *user_data);
 
 /**
-* @brief Called after wifi_deactivate() is completed.
-* @param[in] result  The result
-* @param[in] user_data The user data passed from wifi_deactivate()
-* @pre wifi_deactivate() will invoke this callback function.
-* @see wifi_deactivate()
-*/
-typedef void(*wifi_deactivated_cb)(wifi_error_e result, void* user_data);
+ * @brief Called after wifi_deactivate() is completed.
+ * @since_tizen 2.3
+ * @param[in] result  The result
+ * @param[in] user_data The user data passed from wifi_deactivate()
+ * @pre wifi_deactivate() will invoke this callback function.
+ * @see wifi_deactivate()
+ */
+typedef void(*wifi_deactivated_cb)(wifi_error_e result, void *user_data);
 
 /**
-* @brief Called after either wifi_connect() or wifi_connect_by_wps_pbc() are completed.
-* @param[in] result  The result
-* @param[in] user_data The user data passed from either wifi_connect() or wifi_connect_by_wps_pbc()
-* @pre Either wifi_connect() or wifi_connect_by_wps_pbc() will invoke this callback function.
-* @see wifi_connect()
-* @see wifi_connect_by_wps_pbc()
-*/
-typedef void(*wifi_connected_cb)(wifi_error_e result, void* user_data);
+ * @brief Called after either wifi_connect() or wifi_connect_by_wps_pbc() or wifi_connect_by_wps_pin() are completed.
+ * @since_tizen 2.3
+ * @param[in] result  The result
+ * @param[in] user_data The user data passed from either wifi_connect() or wifi_connect_by_wps_pbc() or wifi_connect_by_wps_pin()
+ * @pre Either wifi_connect() or wifi_connect_by_wps_pbc() or wifi_connect_by_wps_pin() will invoke this callback function.
+ * @see wifi_connect()
+ * @see wifi_connect_by_wps_pbc()
+ * @see wifi_connect_by_wps_pin()
+ */
+typedef void(*wifi_connected_cb)(wifi_error_e result, void *user_data);
 
 /**
-* @brief Called after wifi_disconnect() is completed.
-* @param[in] result  The result
-* @param[in] user_data The user data passed from wifi_disconnect()
-* @pre wifi_disconnect() will invoke this callback function.
-* @see wifi_disconnect()
-*/
-typedef void(*wifi_disconnected_cb)(wifi_error_e result, void* user_data);
+ * @brief Called after wifi_disconnect() is completed.
+ * @since_tizen 2.3
+ * @param[in] result  The result
+ * @param[in] user_data The user data passed from wifi_disconnect()
+ * @pre wifi_disconnect() will invoke this callback function.
+ * @see wifi_disconnect()
+ */
+typedef void(*wifi_disconnected_cb)(wifi_error_e result, void *user_data);
 
 /**
 * @}
@@ -298,32 +327,35 @@ typedef void(*wifi_disconnected_cb)(wifi_error_e result, void* user_data);
 */
 
 /**
-* @brief Called when the device state is changed.
-* @param[in] state  The device state
-* @param[in] user_data The user data passed from the callback registration function
-* @see wifi_set_device_state_changed_cb()
-* @see wifi_unset_device_state_changed_cb()
-*/
-typedef void(*wifi_device_state_changed_cb)(wifi_device_state_e state, void* user_data);
+ * @brief Called when the device state is changed.
+ * @since_tizen 2.3
+ * @param[in] state  The device state
+ * @param[in] user_data The user data passed from the callback registration function
+ * @see wifi_set_device_state_changed_cb()
+ * @see wifi_unset_device_state_changed_cb()
+ */
+typedef void(*wifi_device_state_changed_cb)(wifi_device_state_e state, void *user_data);
 
 /**
-* @brief Called when the connection state is changed.
-* @param[in] state  The connection state
-* @param[in] ap  The access point
-* @param[in] user_data The user data passed from the callback registration function
-* @see wifi_set_connection_state_changed_cb()
-* @see wifi_unset_connection_state_changed_cb()
-*/
-typedef void(*wifi_connection_state_changed_cb)(wifi_connection_state_e state, wifi_ap_h ap, void* user_data);
+ * @brief Called when the connection state is changed.
+ * @since_tizen 2.3
+ * @param[in] state  The connection state
+ * @param[in] ap  The access point
+ * @param[in] user_data The user data passed from the callback registration function
+ * @see wifi_set_connection_state_changed_cb()
+ * @see wifi_unset_connection_state_changed_cb()
+ */
+typedef void(*wifi_connection_state_changed_cb)(wifi_connection_state_e state, wifi_ap_h ap, void *user_data);
 
 /**
-* @brief Called when the RSSI of connected Wi-Fi changed.
-* @param[in] rssi_level  The level of RSSI
-* @param[in] user_data The user data passed from the callback registration function
-* @see wifi_set_rssi_level_changed_cb()
-* @see wifi_unset_rssi_level_changed_cb()
-*/
-typedef void(*wifi_rssi_level_changed_cb)(wifi_rssi_level_e rssi_level, void* user_data);
+ * @brief Called when the RSSI of connected Wi-Fi is changed.
+ * @since_tizen 2.3
+ * @param[in] rssi_level  The level of RSSI
+ * @param[in] user_data The user data passed from the callback registration function
+ * @see wifi_set_rssi_level_changed_cb()
+ * @see wifi_unset_rssi_level_changed_cb()
+ */
+typedef void(*wifi_rssi_level_changed_cb)(wifi_rssi_level_e rssi_level, void *user_data);
 
 /**
 * @}
@@ -336,21 +368,27 @@ typedef void(*wifi_rssi_level_changed_cb)(wifi_rssi_level_e rssi_level, void* us
 */
 
 /**
-* @brief Initializes Wi-Fi
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-*/
+ * @brief Initializes Wi-Fi.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.get
+ * @return @c 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_initialize(void);
 
 /**
-* @brief Deinitializes Wi-Fi
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-*/
+ * @brief Deinitializes Wi-Fi.
+ * @since_tizen 2.3
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_deinitialize(void);
 
 /**
@@ -364,193 +402,295 @@ int wifi_deinitialize(void);
 */
 
 /**
-* @brief Activates Wi-Fi, asynchronously.
-* @param[in] callback  The callback function to be called. This can be NULL if you don't want to get the notification.
-* @param[in] user_data The user data passed to the callback function
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-* @retval #WIFI_ERROR_SECURITY_RESTRICTED  Restricted by security system policy
-* @post wifi_activated_cb() will be invoked
-* @see wifi_activated_cb()
-* @see wifi_deactivate()
-*/
-int wifi_activate(wifi_activated_cb callback, void* user_data);
-
-/**
-* @brief Deactivates Wi-Fi, asynchronously.
-* @param[in] callback  The callback function to be called. This can be NULL if you don't want to get the notification.
-* @param[in] user_data The user data passed to the callback function
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-* @post wifi_deactivated_cb() will be invoked
-* @see wifi_deactivated_cb()
-* @see wifi_activate()
-*/
-int wifi_deactivate(wifi_deactivated_cb callback, void* user_data);
-
-/**
-* @brief Check whether Wi-Fi is activated.
-* @param[out] activated  Indicates whether wifi is activated or not
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-*/
+ * @brief Activates Wi-Fi asynchronously.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.set \n
+ *           %http://tizen.org/privilege/network.get
+ * @remark This API needs both privileges.
+ * @param[in] callback  The callback function to be called \n
+ *                     This can be @c NULL if you don't want to get the notification.
+ * @param[in] user_data The user data passed to the callback function
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_SECURITY_RESTRICTED  Restricted by security system policy
+ * @retval #WIFI_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ * @post wifi_activated_cb() will be invoked.
+ * @see wifi_activated_cb()
+ * @see wifi_deactivate()
+ */
+int wifi_activate(wifi_activated_cb callback, void *user_data);
+
+/**
+ * @brief Activates Wi-Fi asynchronously and displays Wi-Fi picker (popup) when Wi-Fi is not automatically connected.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.set \n
+ *           %http://tizen.org/privilege/network.get
+ * @remark This API needs both privileges.
+ * @param[in] callback  The callback function to be called \n
+ *                     This can be @c NULL if you don't want to get the notification.
+ * @param[in] user_data The user data passed to the callback function
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_SECURITY_RESTRICTED  Restricted by security system policy
+ * @retval #WIFI_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ * @post wifi_activated_cb() will be invoked.
+ * @see wifi_activated_cb()
+ * @see wifi_deactivate()
+ */
+int wifi_activate_with_wifi_picker_tested(wifi_activated_cb callback, void *user_data);
+
+/**
+ * @brief Deactivates Wi-Fi asynchronously.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.set \n
+ *           %http://tizen.org/privilege/network.get
+ * @remark This API needs both privileges.
+ * @param[in] callback  The callback function to be called \n
+ *                     This can be @c NULL if you don't want to get the notification.
+ * @param[in] user_data The user data passed to the callback function
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ * @post wifi_deactivated_cb() will be invoked.
+ * @see wifi_deactivated_cb()
+ * @see wifi_activate()
+ */
+int wifi_deactivate(wifi_deactivated_cb callback, void *user_data);
+
+/**
+ * @brief Checks whether Wi-Fi is activated.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.get
+ * @param[out] activated  @c ture if Wi-Fi is activated,
+ *                       otherwise @c false if Wi-Fi is not activated.
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_is_activated(bool* activated);
 
 /**
-* @brief Gets the local MAC address.
-* @remarks @a mac_address must be released with free() by you.
-* @param[out] mac_address  The mac address
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-*/
+ * @brief Gets the local MAC address.
+ * @since_tizen 2.3
+ * @remarks You must release @a mac_address using free().
+ * @param[out] mac_address  The MAC address
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_get_mac_address(char** mac_address);
 
 /**
-* @brief Gets the name of network interface.
-* @remarks @a name must be released with free() by you.
-* @param[out] name  The name of network interface
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-*/
+ * @brief Gets the name of the network interface.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.get
+ * @remarks You must release @a name using free().
+ * @param[out] name  The name of network interface
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_get_network_interface_name(char** name);
 
 /**
-* @brief Starts scan, asynchronously.
-* @param[in] callback  The callback function to be called
-* @param[in] user_data The user data passed to the callback function
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-* @post This function invokes wifi_scan_finished_cb().
-*/
-int wifi_scan(wifi_scan_finished_cb callback, void* user_data);
-
-/**
-* @brief Starts hidden ap scan, asynchronously.
-* @param[in] essid     The essid of hidden ap
-* @param[in] callback  The callback function to be called
-* @param[in] user_data The user data passed to the callback function
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-* @post This function invokes wifi_scan_finished_cb().
-*/
-int wifi_scan_hidden_ap(const char* essid, wifi_scan_finished_cb callback, void* user_data);
-
-/**
-* @brief Gets the handle of connected access point.
-* @remarks @a handle must be released with wifi_ap_destroy().
-* @param[out] ap  The handle of access point
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
-* @retval #WIFI_ERROR_NO_CONNECTION  There is no connected AP
-*/
+ * @brief Starts scan asynchronously.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.set \n
+ *           %http://tizen.org/privilege/network.get
+ * @remark This API needs both privileges.
+ * @param[in] callback  The callback function to be called
+ * @param[in] user_data The user data passed to the callback function
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ * @post This function invokes wifi_scan_finished_cb().
+ */
+int wifi_scan(wifi_scan_finished_cb callback, void *user_data);
+
+/**
+ * @brief Gets the handle of the connected access point.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.get
+ * @remarks You must release @a handle using wifi_ap_destroy().
+ * @param[out] ap  The access point handle
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #WIFI_ERROR_NO_CONNECTION  There is no connected AP
+ * @retval #WIFI_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_get_connected_ap(wifi_ap_h* ap);
 
 /**
-* @brief Gets the result of scan.
-* @param[in] callback  The callback to be called
-* @param[in] user_data The user data passed to the callback function
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-* @post This function invokes wifi_found_ap_cb().
-*/
-int wifi_foreach_found_aps(wifi_found_ap_cb callback, void* user_data);
-
-/**
-* @brief Gets the result of hidden ap scan.
-* @param[in] callback  The callback to be called
-* @param[in] user_data The user data passed to the callback function
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-* @post This function invokes wifi_found_ap_cb().
-*/
-int wifi_foreach_found_hidden_aps(wifi_found_ap_cb callback, void* user_data);
-
-/**
-* @brief Connects the access point, asynchronously.
-* @param[in] ap  The handle of access point
-* @param[in] callback  The callback function to be called. This can be NULL if you don't want to get the notification.
-* @param[in] user_data The user data passed to the callback function
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-* @post This function invokes wifi_connected_cb().
-* @see wifi_connected_cb()
-* @see wifi_connect_by_wps_pbc()
-* @see wifi_disconnect()
-*/
-int wifi_connect(wifi_ap_h ap, wifi_connected_cb callback, void* user_data);
-
-/**
-* @brief Disconnects the access point, asynchronously.
-* @param[in] ap  The handle of access point
-* @param[in] callback  The callback function to be called. This can be NULL if you don't want to get the notification.
-* @param[in] user_data The user data passed to the callback function
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-* @post This function invokes wifi_disconnected_cb().
-* @see wifi_disconnected_cb()
-* @see wifi_connect_by_wps_pbc()
-* @see wifi_connect()
-*/
-int wifi_disconnect(wifi_ap_h ap, wifi_disconnected_cb callback, void* user_data);
-
-/**
-* @brief Connects the access point with WPS PBC, asynchronously.
-* @param[in] ap  The handle of access point
-* @param[in] callback  The callback function to be called. This can be NULL if you don't want to get the notification.
-* @param[in] user_data The user data passed to the callback function
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-* @post This function invokes wifi_connected_cb().
-* @see wifi_connected_cb()
-* @see wifi_connect()
-* @see wifi_disconnect()
-* @see wifi_ap_is_wps_supported()
-*/
-int wifi_connect_by_wps_pbc(wifi_ap_h ap, wifi_connected_cb callback, void* user_data);
-
-/**
-* @brief Deletes the information of stored access point.
-* @details If an AP is connected, then connection information will be stored.
-* This information is used when a connection to that AP is established automatically.
-* @param[in] ap  The handle of access point
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-*/
+ * @brief Gets the result of the scan.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.get
+ * @param[in] callback  The callback to be called
+ * @param[in] user_data The user data passed to the callback function
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ * @post This function invokes wifi_found_ap_cb().
+ */
+int wifi_foreach_found_aps(wifi_found_ap_cb callback, void *user_data);
+
+/**
+ * @brief Connects the access point asynchronously.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.set \n
+ *           %http://tizen.org/privilege/network.get
+ * @remark This API needs both privileges.
+ * @param[in] ap  The access point handle
+ * @param[in] callback  The callback function to be called \n
+ *                     This can be @c NULL if you don't want to get the notification.
+ * @param[in] user_data The user data passed to the callback function
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ * @post This function invokes wifi_connected_cb().
+ * @see wifi_connected_cb()
+ * @see wifi_connect_by_wps_pbc()
+ * @see wifi_connect_by_wps_pin()
+ * @see wifi_disconnect()
+ */
+int wifi_connect(wifi_ap_h ap, wifi_connected_cb callback, void *user_data);
+
+/**
+ * @brief Disconnects the access point asynchronously.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.set \n
+ *           %http://tizen.org/privilege/network.get
+ * @remark This API needs both privileges.
+ * @param[in] ap  The access point handle
+ * @param[in] callback  The callback function to be called \n
+ *                     This can be @c NULL if you don't want to get the notification.
+ * @param[in] user_data The user data passed to the callback function
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ * @post This function invokes wifi_disconnected_cb().
+ * @see wifi_disconnected_cb()
+ * @see wifi_connect_by_wps_pbc()
+ * @see wifi_connect_by_wps_pin()
+ * @see wifi_connect()
+ */
+int wifi_disconnect(wifi_ap_h ap, wifi_disconnected_cb callback, void *user_data);
+
+/**
+ * @brief Connects the access point with WPS PBC asynchronously.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.profile \n
+ *           %http://tizen.org/privilege/network.get
+ * @remark This API needs both privileges.
+ * @param[in] ap  The access point handle
+ * @param[in] callback  The callback function to be called \n
+ *                     This can be NULL if you don't want to get the notification.
+ * @param[in] user_data The user data passed to the callback function
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ * @post This function invokes wifi_connected_cb().
+ * @see wifi_connected_cb()
+ * @see wifi_connect()
+ * @see wifi_disconnect()
+ * @see wifi_ap_is_wps_supported()
+ */
+int wifi_connect_by_wps_pbc(wifi_ap_h ap, wifi_connected_cb callback, void *user_data);
+
+/**
+ * @brief Connects the access point with WPS PIN asynchronously.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.profile \n
+ *           %http://tizen.org/privilege/network.get
+ * @remark This API needs both privileges.
+ * @param[in] ap  The access point handle
+ * @param[in] pin  The WPS PIN is a non-NULL string with length greater than 0 and less than or equal to 8
+ * @param[in] callback  The callback function to be called (this can be NULL if you don't want to get the notification)
+ * @param[in] user_data The user data passed to the callback function
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ * @post This function invokes wifi_connected_cb().
+ * @see wifi_connected_cb()
+ * @see wifi_connect()
+ * @see wifi_disconnect()
+ * @see wifi_ap_is_wps_supported()
+ */
+int wifi_connect_by_wps_pin(wifi_ap_h ap, const char *pin, wifi_connected_cb callback, void *user_data);
+
+/**
+ * @brief Deletes the information of stored access point and disconnects it when it connected.
+ * @details If an AP is connected, then connection information will be stored.
+ * This information is used when a connection to that AP is established automatically.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.profile \n
+*            %http://tizen.org/privilege/network.get
+ * @remark This API needs both privileges.
+ * @param[in] ap  The access point handle
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_forget_ap(wifi_ap_h ap);
 
 /**
@@ -564,89 +704,110 @@ int wifi_forget_ap(wifi_ap_h ap);
 */
 
 /**
-* @brief Gets connection state
-* @param[out] connection_state  The connection state
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-*/
+ * @brief Gets the connection state.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.get
+ * @param[out] connection_state  The connection state
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_get_connection_state(wifi_connection_state_e* connection_state);
 
 /**
-* @brief Registers the callback called when the device state is changed.
-* @param[in] callback  The callback function to be called
-* @param[in] user_data The user data passed to the callback function
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-* @retval #WIFI_ERROR_INVALID_PARAMETER   Invalid parameter
-*/
-int wifi_set_device_state_changed_cb(wifi_device_state_changed_cb callback, void* user_data);
+ * @brief Registers the callback called when the device state is changed.
+ * @since_tizen 2.3
+ * @param[in] callback  The callback function to be called
+ * @param[in] user_data The user data passed to the callback function
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_INVALID_PARAMETER   Invalid parameter
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
+int wifi_set_device_state_changed_cb(wifi_device_state_changed_cb callback, void *user_data);
 
 /**
-* @brief Unregisters the callback called when the device state is changed.
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-*/
+ * @brief Unregisters the callback called when the device state is changed.
+ * @since_tizen 2.3
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_unset_device_state_changed_cb(void);
 
 /**
-* @brief Registers the callback called when the background scan is finished periodically.
-* @param[in] callback  The callback function to be called
-* @param[in] user_data The user data passed to the callback function
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-* @retval #WIFI_ERROR_INVALID_PARAMETER   Invalid parameter
-*/
-int wifi_set_background_scan_cb(wifi_scan_finished_cb callback, void* user_data);
+ * @brief Registers the callback called when the background scan is finished periodically.
+ * @since_tizen 2.3
+ * @param[in] callback  The callback function to be called
+ * @param[in] user_data The user data passed to the callback function
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_INVALID_PARAMETER   Invalid parameter
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
+int wifi_set_background_scan_cb(wifi_scan_finished_cb callback, void *user_data);
 
 /**
-* @brief Unregisters the callback called when the scan is finished periodically.
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-*/
+ * @brief Unregisters the callback called when the scan is finished periodically.
+ * @since_tizen 2.3
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_unset_background_scan_cb(void);
 
 /**
-* @brief Registers the callback called when the connection state is changed.
-* @param[in] callback  The callback function to be called
-* @param[in] user_data The user data passed to the callback function
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-* @retval #WIFI_ERROR_INVALID_PARAMETER   Invalid parameter
-*/
-int wifi_set_connection_state_changed_cb(wifi_connection_state_changed_cb callback, void* user_data);
+ * @brief Registers the callback called when the connection state is changed.
+ * @since_tizen 2.3
+ * @param[in] callback  The callback function to be called
+ * @param[in] user_data The user data passed to the callback function
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_INVALID_PARAMETER   Invalid parameter
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
+int wifi_set_connection_state_changed_cb(wifi_connection_state_changed_cb callback, void *user_data);
 
 /**
-* @brief Unregisters the callback called when the connection state is changed.
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-*/
+ * @brief Unregisters the callback called when the connection state is changed.
+ * @since_tizen 2.3
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_unset_connection_state_changed_cb(void);
 
 /**
-* @brief Registers callback called when the RSSI of connected Wi-Fi changed.
-* @param[in] callback  The callback function to be called
-* @param[in] user_data The user data passed to the callback function
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-* @retval #WIFI_ERROR_INVALID_PARAMETER   Invalid parameter
-*/
-int wifi_set_rssi_level_changed_cb(wifi_rssi_level_changed_cb callback, void* user_data);
+ * @brief Registers callback called when the RSSI of connected Wi-Fi is changed.
+ * @since_tizen 2.3
+ * @param[in] callback  The callback function to be called
+ * @param[in] user_data The user data passed to the callback function
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_INVALID_PARAMETER   Invalid parameter
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
+int wifi_set_rssi_level_changed_cb(wifi_rssi_level_changed_cb callback, void *user_data);
 
 /**
-* @brief Unregisters callback called when the RSSI of connected Wi-Fi changed.
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-*/
+ * @brief Unregisters callback called when the RSSI of connected Wi-Fi is changed.
+ * @since_tizen 2.3
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_unset_rssi_level_changed_cb(void);
 
 /**
@@ -660,51 +821,81 @@ int wifi_unset_rssi_level_changed_cb(void);
 */
 
 /**
-* @brief Creates the handle of access point.
-* @remarks @a ap must be released with wifi_ap_destroy().
-* @param[in] essid  The ESSID(Extended Service Set Identifier)
-* @param[out] ap  The handle of access point
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
-* @see wifi_ap_destroy()
-*/
+ * @brief Creates the access point handle.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.profile \n
+ *            %http://tizen.org/privilege/network.get
+ * @remarks You must release @a ap using wifi_ap_destroy(). \n
+ *          This API needs both privileges.
+ * @param[in] essid  The ESSID (Extended Service Set Identifier) should be null-terminated and can be UTF-8 encoded
+ * @param[out] ap  The access point handle
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ * @see wifi_ap_destroy()
+ */
 int wifi_ap_create(const char* essid, wifi_ap_h* ap);
 
 /**
-* @brief Destroys the handle of access point.
-* @param[in] ap  The handle of access point
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @see wifi_ap_create()
-*/
+ * @brief Creates the hidden access point handle.
+ * @since_tizen 2.3
+ * @remarks You must release @a ap using wifi_ap_destroy().
+ * @param[in] essid  The ESSID (Extended Service Set Identifier) should be null-terminated and can be UTF-8 encoded
+ * @param[out] ap  The access point handle
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ * @see wifi_ap_destroy()
+ */
+int wifi_ap_hidden_create(const char* essid, wifi_ap_h* ap);
+
+/**
+ * @brief Destroys the access point handle.
+ * @since_tizen 2.3
+ * @param[in] ap  The access point handle
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ * @see wifi_ap_create()
+ */
 int wifi_ap_destroy(wifi_ap_h ap);
 
 /**
-* @brief Clons the handle of access point.
-* @remarks @a cloned_ap must be released with wifi_ap_destroy().
-* @param[out] cloned_ap  The handle of cloned access point
-* @param[in] origin  The handle of origin access point
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
-* @see wifi_ap_destroy()
-*/
+ * @brief Clones the access point handle.
+ * @since_tizen 2.3
+ * @remarks You must release @a cloned_ap using wifi_ap_destroy().
+ * @param[out] cloned_ap  The cloned access point handle
+ * @param[in] origin  The origin access point handle
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ * @see wifi_ap_destroy()
+ */
 int wifi_ap_clone(wifi_ap_h* cloned_ap, wifi_ap_h origin);
 
 /**
-* @brief Refresh the information of access point.
-* @remarks You should call this function in order to get the current information because the information of access point can be changed.
-* @param[in] ap  The handle of access point
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-* @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
-*/
+ * @brief Refreshes the access point information.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.get
+ * @remarks You should call this function in order to get the current access point information, because the information can be changed.
+ * @param[in] ap  The access point handle
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #WIFI_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_refresh(wifi_ap_h ap);
 
 /**
@@ -718,271 +909,367 @@ int wifi_ap_refresh(wifi_ap_h ap);
 */
 
 /**
-* @brief Gets ESSID(Extended Service Set Identifier).
-* @remarks @a essid must be released with free() by you.
-* @param[in] ap  The handle of access point
-* @param[out] essid  The ESSID
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
-*/
+ * @brief Gets ESSID (Extended Service Set Identifier).
+ * @since_tizen 2.3
+ * @remarks You must release @a essid using free().
+ * @param[in] ap  The access point handle
+ * @param[out] essid  The ESSID
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_get_essid(wifi_ap_h ap, char** essid);
 
 /**
-* @brief Gets BSSID(Basic Service Set Identifier).
-* @remarks @a bssid must be released with free() by you.
-* @param[in] ap  The handle of access point
-* @param[out] bssid  The BSSID
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
-*/
+ * @brief Gets BSSID (Basic Service Set Identifier).
+ * @since_tizen 2.3
+ * @remarks You must release @a bssid using free().
+ * @param[in] ap  The access point handle
+ * @param[out] bssid  The BSSID
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_get_bssid(wifi_ap_h ap, char** bssid);
 
 /**
-* @brief Gets the RSSI.
-* @param[in] ap  The handle of access point
-* @param[out] rssi  The RSSI
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-*/
+ * @brief Gets the RSSI.
+ * @since_tizen 2.3
+ * @param[in] ap  The access point handle
+ * @param[out] rssi  The RSSI
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_get_rssi(wifi_ap_h ap, int* rssi);
 
 /**
-* @brief Gets the Frequency band (MHz).
-* @param[in] ap  The handle of access point
-* @param[out] frequency  The frequency
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-*/
+ * @brief Gets the frequency band (MHz).
+ * @since_tizen 2.3
+ * @param[in] ap  The access point handle
+ * @param[out] frequency  The frequency
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_get_frequency(wifi_ap_h ap, int* frequency);
 
 /**
-* @brief Gets the max speed (Mbps).
-* @param[in] ap  The handle of access point
-* @param[out] max_speed  The max speed
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-*/
+ * @brief Gets the max speed (Mbps).
+ * @since_tizen 2.3
+ * @param[in] ap  The access point handle
+ * @param[out] max_speed  The max speed
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_get_max_speed(wifi_ap_h ap, int* max_speed);
 
 /**
-* @brief Indicates whether the access point is favorite or not.
-* @param[in] ap  The handle of access point
-* @param[out] favourite  Indicates whether access point is favorite or not.
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-*/
+ * @brief Checks whether the access point is favorite or not.
+ * @since_tizen 2.3
+ * @param[in] ap  The access point handle
+ * @param[out] favorite  @c true if access point is favorite,
+ *                      otherwise @c false if access point is not favorite
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_is_favorite(wifi_ap_h ap, bool* favorite);
 
 /**
-* @brief Gets the connection state.
-* @param[in] ap  The handle of access point
-* @param[out] state  The connection state
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-*/
+ * @brief Checks whether the access point is passpoint or not.
+ * @since_tizen 2.3
+ * @param[in] ap  The access point handle
+ * @param[out] passpoint  @c ture if access point is passpoint,
+ *                       otherwise @c false if access point is not passpoint.
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
+int wifi_ap_is_passpoint(wifi_ap_h ap, bool* passpoint);
+
+/**
+ * @brief Gets the connection state.
+ * @since_tizen 2.3
+ * @param[in] ap  The access point handle
+ * @param[out] state  The connection state
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_get_connection_state(wifi_ap_h ap, wifi_connection_state_e* state);
 
 /**
-* @brief Gets the config type of IP.
-* @param[in] ap  The handle of access point
-* @param[in] address_family  The address family
-* @param[out] type  The type of IP config
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-* @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
-*/
+ * @brief Gets the config type of IP.
+ * @since_tizen 2.3
+ * @param[in] ap  The access point handle
+ * @param[in] address_family  The address family
+ * @param[out] type  The type of IP config
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_get_ip_config_type(wifi_ap_h ap, wifi_address_family_e address_family, wifi_ip_config_type_e* type);
 
 /**
-* @brief Sets the config type of IP.
-* @details If you set IP config type to #WIFI_IP_CONFIG_TYPE_STATIC,
-* then IP address, Gateway and Subnet mask will be set to the initial value "0.0.0.0".
-* @param[in] ap  The handle of access point
-* @param[in] address_family  The address family
-* @param[in] type  The type of IP config
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-* @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
-*/
+ * @brief Sets the config type of IP.
+ * @details If you set IP config type to #WIFI_IP_CONFIG_TYPE_STATIC,
+ * then IP address, Gateway and Subnet mask will be set to the initial value "0.0.0.0".
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.profile \n
+ *           %http://tizen.org/privilege/network.get
+ * @remark This API needs both privileges.
+ * @param[in] ap  The access point handle
+ * @param[in] address_family  The address family
+ * @param[in] type  The type of IP config
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
+ * @retval #WIFI_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_set_ip_config_type(wifi_ap_h ap, wifi_address_family_e address_family, wifi_ip_config_type_e type);
 
 /**
-* @brief Gets the IP address.
-* @remarks @a ip_address must be released with free() by you.
-* @param[in] ap  The handle of access point
-* @param[in] address_family  The address family
-* @param[out] ip_address  The IP address
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
-* @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
-*/
+ * @brief Gets the IP address.
+ * @since_tizen 2.3
+ * @remarks You must release @a ip_address using free().
+ * @param[in] ap  The access point handle
+ * @param[in] address_family  The address family
+ * @param[out] ip_address  The IP address
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_get_ip_address(wifi_ap_h ap, wifi_address_family_e address_family, char** ip_address);
 
 /**
-* @brief Sets the IP address.
-* @param[in] ap  The handle of access point
-* @param[in] address_family  The address family
-* @param[in] ip_address  The IP address. If you set this value to NULL, then the existing value will be deleted.
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-* @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
-*/
+ * @brief Sets the IP address.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.profile \n
+ *           %http://tizen.org/privilege/network.get
+ * @remark This API needs both privileges.
+ * @param[in] ap  The access point handle
+ * @param[in] address_family  The address family
+ * @param[in] ip_address  The IP address; if you set this value to NULL, then the existing value will be deleted
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
+ * @retval #WIFI_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_set_ip_address(wifi_ap_h ap, wifi_address_family_e address_family, const char* ip_address);
 
 /**
-* @brief Gets the subnet mask.
-* @remarks @a subnet_mask must be released with free() by you.
-* @param[in] ap  The handle of access point
-* @param[in] address_family  The address family
-* @param[out] subnet_mask  The subnet mask
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
-* @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
-*/
+ * @brief Gets the subnet mask.
+ * @since_tizen 2.3
+ * @remarks You must release @a subnet_mask using free().
+ * @param[in] ap  The access point handle
+ * @param[in] address_family  The address family
+ * @param[out] subnet_mask  The subnet mask
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_get_subnet_mask(wifi_ap_h ap, wifi_address_family_e address_family, char** subnet_mask);
 
 /**
-* @brief Sets the subnet mask.
-* @param[in] ap  The handle of access point
-* @param[in] address_family  The address family
-* @param[in] subnet_mask  The subnet mask. If you set this value to NULL, then the existing value will be deleted.
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-* @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
-*/
+ * @brief Sets the subnet mask.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.profile \n
+ *           %http://tizen.org/privilege/network.get
+ * @remark This API needs both privileges.
+ * @param[in] ap  The access point handle
+ * @param[in] address_family  The address family
+ * @param[in] subnet_mask  The subnet mask; if you set this value to NULL, then the existing value will be deleted
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
+ * @retval #WIFI_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_set_subnet_mask(wifi_ap_h ap, wifi_address_family_e address_family, const char* subnet_mask);
 
 /**
-* @brief Gets the gateway address.
-* @remarks @a gateway_address must be released with free() by you.
-* @param[in] ap  The handle of access point
-* @param[in] address_family  The address family
-* @param[out] gateway_address  The gateway address
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
-* @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
-*/
+ * @brief Gets the gateway address.
+ * @since_tizen 2.3
+ * @remarks You must release @a gateway_address using free().
+ * @param[in] ap  The access point handle
+ * @param[in] address_family  The address family
+ * @param[out] gateway_address  The gateway address
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_get_gateway_address(wifi_ap_h ap, wifi_address_family_e address_family, char** gateway_address);
 
 /**
-* @brief Sets the gateway address.
-* @param[in] ap  The handle of access point
-* @param[in] address_family  The address family
-* @param[in] gateway_address  The gateway address. If you set this value to NULL, then the existing value will be deleted.
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-* @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
-*/
+ * @brief Sets the gateway address.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.profile \n
+ *           %http://tizen.org/privilege/network.get
+ * @remark This API needs both privileges.
+ * @param[in] ap  The access point handle
+ * @param[in] address_family  The address family
+ * @param[in] gateway_address  The gateway address \n
+ *                            If you set this value to @c NULL, then the existing value will be deleted.
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
+ * @retval #WIFI_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_set_gateway_address(wifi_ap_h ap, wifi_address_family_e address_family, const char* gateway_address);
 
 /**
-* @brief Gets the proxy address.
-* @remarks @a proxy_address must be released with free() by you.
-* @param[in] ap  The handle of access point
-* @param[in] address_family  The address family
-* @param[out] proxy_address  The proxy address
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
-* @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
-*/
+ * @brief Gets the proxy address.
+ * @since_tizen 2.3
+ * @remarks You must release @a proxy_address using free().
+ * @param[in] ap  The access point handle
+ * @param[in] address_family  The address family
+ * @param[out] proxy_address  The proxy address
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_get_proxy_address(wifi_ap_h ap, wifi_address_family_e address_family, char** proxy_address);
 
 /**
-* @brief Sets the proxy address.
-* @param[in] ap  The handle of access point
-* @param[in] address_family  The address family
-* @param[in] proxy_address  The proxy address. If you set this value to NULL, then the existing value will be deleted.
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-* @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
-*/
+ * @brief Sets the proxy address.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.profile \n
+ *           %http://tizen.org/privilege/network.get
+ * @remark This API needs both privileges.
+ * @param[in] ap  The access point handle
+ * @param[in] address_family  The address family
+ * @param[in] proxy_address  The proxy address \n
+ *                          If you set this value to @c NULL, then the existing value will be deleted.
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
+ * @retval #WIFI_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_set_proxy_address(wifi_ap_h ap, wifi_address_family_e address_family, const char* proxy_address);
 
 /**
-* @brief Gets the Proxy type.
-* @param[in] ap  The handle of access point
-* @param[out] type  The type of proxy
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-*/
+ * @brief Gets the Proxy type.
+ * @since_tizen 2.3
+ * @param[in] ap  The access point handle
+ * @param[out] type  The type of proxy
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_get_proxy_type(wifi_ap_h ap, wifi_proxy_type_e* type);
 
 /**
-* @brief Sets the Proxy address.
-* @details If you set Proxy type to #WIFI_PROXY_TYPE_AUTO or #WIFI_PROXY_TYPE_MANUAL, then Proxy will be restored.
-* @param[in] ap  The handle of access point
-* @param[in] type  The type of proxy
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-*/
+ * @brief Sets the Proxy address.
+ * @details If you set Proxy type to #WIFI_PROXY_TYPE_AUTO or #WIFI_PROXY_TYPE_MANUAL, then Proxy will be restored.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.profile \n
+ *           %http://tizen.org/privilege/network.get
+ * @remark This API needs both privileges.
+ * @param[in] ap  The access point handle
+ * @param[in] proxy_type  The type of proxy
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_set_proxy_type(wifi_ap_h ap, wifi_proxy_type_e proxy_type);
 
 /**
-* @brief Gets the DNS address.
-* @remarks The allowance of DNS address is 2. @a dns_address must be released with free() by you.
-* @param[in] ap  The handle of access point
-* @param[in] order  The order of DNS address. It starts from 1, which means first DNS address.
-* @param[in] address_family  The address family
-* @param[out] dns_address  The DNS address
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
-* @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
-*/
+ * @brief Gets the DNS address.
+ * @since_tizen 2.3
+ * @remarks The allowance of DNS address is @c 2.You must release @a dns_address using free().
+ * @param[in] ap  The access point handle
+ * @param[in] order  The order of DNS address; it starts from 1, which means first DNS address
+ * @param[in] address_family  The address family
+ * @param[out] dns_address  The DNS address
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_get_dns_address(wifi_ap_h ap, int order, wifi_address_family_e address_family, char** dns_address);
 
 /**
-* @brief Sets the DNS address.
-* @remarks The allowance of DNS address is 2.
-* @param[in] ap  The handle of access point
-* @param[in] order  The order of DNS address. It starts from 1, which means first DNS address.
-* @param[in] address_family  The address family
-* @param[in] dns_address  The DNS address. If you set this value to NULL, then the existing value will be deleted.
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-* @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
-*/
+ * @brief Sets the DNS address.
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.profile \n
+ *           %http://tizen.org/privilege/network.get
+ * @remarks The allowance of DNS address is @c 2 \n
+ *         This API needs both privileges.
+ * @param[in] ap  The access point handle
+ * @param[in] order  The order of DNS address \n
+ *                  It starts from @c 1, which means first DNS address.
+ * @param[in] address_family  The address family
+ * @param[in] dns_address  The DNS address \n
+ *                        If you set this value to @c NULL, then the existing value will be deleted.
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED  Address family not supported
+ * @retval #WIFI_ERROR_PERMISSION_DENIED Permission Denied
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_set_dns_address(wifi_ap_h ap, int order, wifi_address_family_e address_family, const char* dns_address);
 
 /**
@@ -996,82 +1283,99 @@ int wifi_ap_set_dns_address(wifi_ap_h ap, int order, wifi_address_family_e addre
 */
 
 /**
-* @brief Gets the security mode of Wi-Fi.
-* @param[in] ap  The handle of access point
-* @param[out] type  The type of Wi-Fi security
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-*/
+ * @brief Gets the Wi-Fi security mode.
+ * @since_tizen 2.3
+ * @param[in] ap  The access point handle
+ * @param[out] type  The type of Wi-Fi security
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_get_security_type(wifi_ap_h ap, wifi_security_type_e* type);
 
 /**
-* @brief Sets the security mode of Wi-Fi.
-* @param[in] ap  The handle of access point
-* @param[in] type  The type of Wi-Fi security
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-*/
+ * @brief Sets the Wi-Fi security mode.
+ * @since_tizen 2.3
+ * @param[in] ap  The access point handle
+ * @param[in] type  The type of Wi-Fi security
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_set_security_type(wifi_ap_h ap, wifi_security_type_e type);
 
 /**
-* @brief Gets the encryption type of Wi-Fi.
-* @param[in] ap  The handle of access point
-* @param[out] type  The type of Wi-Fi encryption
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-*/
+ * @brief Gets the Wi-Fi encryption type.
+ * @since_tizen 2.3
+ * @param[in] ap  The access point handle
+ * @param[out] type  The type of Wi-Fi encryption
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_get_encryption_type(wifi_ap_h ap, wifi_encryption_type_e* type);
 
 /**
-* @brief Sets the encryption type of Wi-Fi.
-* @param[in] ap  The handle of access point
-* @param[in] type  The type of Wi-Fi encryption
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-*/
+ * @brief Sets the Wi-Fi encryption type.
+ * @since_tizen 2.3
+ * @param[in] ap  The access point handle
+ * @param[in] type  The type of Wi-Fi encryption
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_set_encryption_type(wifi_ap_h ap, wifi_encryption_type_e type);
 
 /**
-* @brief Indicates whether the passphrase is required or not.
-* @remarks This function is not valid if security type is #WIFI_SECURITY_TYPE_EAP.
-* @param[in] ap  The handle of access point
-* @param[out] required  Indicates whether passphrase is required or not
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-*/
+ * @brief Checks whether the passphrase is required or not.
+ * @since_tizen 2.3
+ * @remarks This function is not valid if security type is #WIFI_SECURITY_TYPE_EAP.
+ * @param[in] ap  The access point handle
+ * @param[out] required  @c true if passphrase is required,
+ *                      @c false if passphrase is not required.
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_is_passphrase_required(wifi_ap_h ap, bool* required);
 
 /**
-* @brief Sets the passphrase.
-* @param[in] ap  The handle of access point
-* @param[in] passphrase  The passphrase of access point
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-*/
+ * @brief Sets the passphrase.
+ * @since_tizen 2.3
+ * @param[in] ap  The access point handle
+ * @param[in] passphrase  The passphrase of access point
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_set_passphrase(wifi_ap_h ap, const char* passphrase);
 
 /**
-* @brief Indicates whether the WPS(Wi-Fi Protected Setup) is supported or not.
-* @param[in] ap  The handle of access point
-* @param[out] supported  Indicates whether WPS is supported or not
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-* @see wifi_connect_by_wps_pbc()
-*/
+ * @brief Checks whether the WPS(Wi-Fi Protected Setup) is supported or not.
+ * @since_tizen 2.3
+ * @param[in] ap  The access point handle
+ * @param[out] supported  @c ture if WPS is supported,
+ *                       otherwise @c false is WPS is not supported.
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ * @see wifi_connect_by_wps_pbc()
+ * @see wifi_connect_by_wps_pin()
+ */
 int wifi_ap_is_wps_supported(wifi_ap_h ap, bool* supported);
 
 /**
@@ -1085,159 +1389,186 @@ int wifi_ap_is_wps_supported(wifi_ap_h ap, bool* supported);
 */
 
 /**
-* @brief Sets the passphrase of EAP.
-* @details You can set one of @a user_name and @a password as NULL.
-* In this case, the value of a parameter which is set as NULL will be the previous value.
-* But it is not allowed that both @a user_name and @a password are set as NULL.
-* @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_PEAP or #WIFI_EAP_TYPE_TTLS.
-* @param[in] ap  The handle of access point
-* @param[in] user_name  The user name. This value can be NULL.
-* @param[in] password  The password. This value can be NULL.
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-*/
+ * @brief Sets the passphrase of EAP.
+ * @details You can set one of @a user_name and @a password as @c NULL.
+ * In this case, the value of a parameter which is set as @c NULL will be the previous value.
+ * But it is not allowed that both @a user_name and @a password are set as @c NULL.
+ * @since_tizen 2.3
+ * @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_PEAP or #WIFI_EAP_TYPE_TTLS.
+ * @param[in] ap  The access point handle
+ * @param[in] user_name  The user name \n
+ *                      This value can be @c NULL.
+ * @param[in] password  The password \n
+ *                     This value can be @c NULL.
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_set_eap_passphrase(wifi_ap_h ap, const char* user_name, const char* password);
 
 /**
-* @brief Gets the passphrase of EAP.
-* @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_PEAP or #WIFI_EAP_TYPE_TTLS.
-* @a user_name must be released with free() by you.
-* @param[in] ap  The handle of access point
-* @param[out] user_name  The user name
-* @param[out] password  Indicates whether password is set or not (@c true = set, @c  false = not set)
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-*/
+ * @brief Gets the passphrase of EAP.
+ * @since_tizen 2.3
+ * @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_PEAP or #WIFI_EAP_TYPE_TTLS.
+ *         You must release @a user_name using free().
+ * @param[in] ap  The access point handle
+ * @param[out] user_name  The user name
+ * @param[out] is_password_set  @c ture if password is set,
+ *                             otherwise @c flase if password is not set.
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_get_eap_passphrase(wifi_ap_h ap, char** user_name, bool* is_password_set);
 
 /**
-* @brief Gets the CA Certificate of EAP.
-* @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_TLS.
-* @a file must be released with free() by you.
-* @param[in] ap  The handle of access point
-* @param[out] file  The file path of CA Certificate
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-*/
+ * @brief Gets the CA Certificate of EAP.
+ * @since_tizen 2.3
+ * @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_TLS.
+ *         You must release @a file using free().
+ * @param[in] ap  The access point handle
+ * @param[out] file  The file path of CA Certificate
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_get_eap_ca_cert_file(wifi_ap_h ap, char** file);
 
 /**
-* @brief Sets the CA Certificate of EAP.
-* @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_TLS.
-* @param[in] ap  The handle of access point
-* @param[in] file  The file path of CA Certificate
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-*/
+ * @brief Sets the CA Certificate of EAP.
+ * @since_tizen 2.3
+ * @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_TLS.
+ * @param[in] ap  The access point handle
+ * @param[in] file  The file path of CA Certificate
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_set_eap_ca_cert_file(wifi_ap_h ap, const char* file);
 
 /**
-* @brief Gets the Client Certificate of EAP.
-* @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_TLS.
-* @a file must be released with free() by you.
-* @param[in] ap  The handle of access point
-* @param[out] file  The file path of Client Certificate
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-*/
+ * @brief Gets the Client Certificate of EAP.
+ * @since_tizen 2.3
+ * @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_TLS.
+ *         You must release @a file using free().
+ * @param[in] ap  The access point handle
+ * @param[out] file  The file path of Client Certificate
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_get_eap_client_cert_file(wifi_ap_h ap, char** file);
 
 /**
-* @brief Sets the CA Certificate of EAP.
-* @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_TLS.
-* @param[in] ap  The handle of access point
-* @param[in] file  The file path of Client Certificate
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-*/
+ * @brief Sets the CA Certificate of EAP.
+ * @since_tizen 2.3
+ * @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_TLS.
+ * @param[in] ap  The access point handle
+ * @param[in] file  The file path of Client Certificate
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_set_eap_client_cert_file(wifi_ap_h ap, const char* file);
 
 /**
-* @brief Gets the private key file of EAP.
-* @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_TLS.
-* @a file must be released with free() by you.
-* @param[in] ap  The handle of access point
-* @param[out] file  The file path of private key
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-*/
+ * @brief Gets the private key file of EAP.
+ * @since_tizen 2.3
+ * @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_TLS.
+ *         You must release @a file using free().
+ * @param[in] ap  The access point handle
+ * @param[out] file  The file path of private key
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_get_eap_private_key_file(wifi_ap_h ap, char** file);
 
 /**
-* @brief Sets the private key information of EAP.
-* @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_TLS.
-* @param[in] ap  The handle of access point
-* @param[in] file  The file path of private key
-* @param[in] password  The password
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-*/
+ * @brief Sets the private key information of EAP.
+ * @since_tizen 2.3
+ * @remarks This function is valid only if the EAP type is #WIFI_EAP_TYPE_TLS.
+ * @param[in] ap  The access point handle
+ * @param[in] file  The file path of private key
+ * @param[in] password  The password
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_set_eap_private_key_info(wifi_ap_h ap, const char* file, const char* password);
 
 /**
-* @brief Gets the EAP type of Wi-Fi.
-* @param[in] ap  The handle of access point
-* @param[out] type  The type of EAP
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-*/
+ * @brief Gets the EAP type of Wi-Fi.
+ * @since_tizen 2.3
+ * @param[in] ap  The access point handle
+ * @param[out] type  The type of EAP
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_get_eap_type(wifi_ap_h ap, wifi_eap_type_e* type);
 
 /**
-* @brief Sets the EAP type of Wi-Fi.
-* @param[in] ap  The handle of access point
-* @param[in] type  The type of EAP
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-*/
+ * @brief Sets the EAP type of Wi-Fi.
+ * @since_tizen 2.3
+ * @param[in] ap  The access point handle
+ * @param[in] type  The type of EAP
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_set_eap_type(wifi_ap_h ap, wifi_eap_type_e type);
 
 /**
-* @brief Gets the type of EAP phase2 authentication of Wi-Fi.
-* @param[in] ap  The handle of access point
-* @param[out] type  The type of EAP phase2 authentication
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-* @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
-*/
+ * @brief Gets the type of EAP phase2 authentication of Wi-Fi.
+ * @since_tizen 2.3
+ * @param[in] ap  The access point handle
+ * @param[out] type  The type of EAP phase2 authentication
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_OPERATION_FAILED  Operation failed
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_get_eap_auth_type(wifi_ap_h ap, wifi_eap_auth_type_e* type);
 
 /**
-* @brief Sets the type of EAP phase2 authentication of Wi-Fi.
-* @param[in] ap  The handle of access point
-* @param[in] type  The type of EAP phase2 authentication
-* @return 0 on success, otherwise negative error value.
-* @retval #WIFI_ERROR_NONE  Successful
-* @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
-* @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
-*/
+ * @brief Sets the type of EAP phase2 authentication of Wi-Fi.
+ * @since_tizen 2.3
+ * @param[in] ap  The access point handle
+ * @param[in] type  The type of EAP phase2 authentication
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_ERROR_NONE  Successful
+ * @retval #WIFI_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #WIFI_ERROR_INVALID_OPERATION  Invalid operation
+ * @retval #WIFI_ERROR_NOT_SUPPORTED   Not supported
+ */
 int wifi_ap_set_eap_auth_type(wifi_ap_h ap, wifi_eap_auth_type_e type);
 
 /**
index 52b89c4..3df3c3d 100644 (file)
@@ -1,24 +1,32 @@
-Name:       capi-network-wifi
-Summary:    Network Wi-Fi library in TIZEN C API
-Version:    0.1.2_24
-Release:    1
-Group:      System/Network
-License:    Apache-2.0
-Source0:    %{name}-%{version}.tar.gz
-BuildRequires:  cmake
-BuildRequires:  pkgconfig(dlog)
-BuildRequires:  pkgconfig(glib-2.0)
-BuildRequires:  pkgconfig(vconf)
-BuildRequires:  pkgconfig(capi-base-common)
-BuildRequires:  pkgconfig(network)
+Name:          capi-network-wifi
+Summary:       Network Wi-Fi library in TIZEN C API
+Version:       1.0.40
+Release:       1
+Group:         System/Network
+License:       Apache License Version 2.0
+Source0:       %{name}-%{version}.tar.gz
+BuildRequires: cmake
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(vconf)
+BuildRequires: pkgconfig(network)
+BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(capi-base-common)
+BuildRequires: pkgconfig(capi-system-info)
+BuildRequires: model-build-features
+Requires(post):                /sbin/ldconfig
+Requires(postun):      /sbin/ldconfig
+
+%if "%{?tizen_profile_name}" == "wearable"
+BuildRequires:  pkgconfig(capi-appfw-application)
+%endif
 
 %description
 Network Wi-Fi library in Tizen C API
 
 %package devel
-Summary:  Network Wi-Fi library in Tizen C API (Development)
-Group:    System/Network
-Requires: %{name} = %{version}-%{release}
+Summary:       Network Wi-Fi library in Tizen C API (Development)
+Group:         System/Network
+Requires:      %{name} = %{version}-%{release}
 
 %description devel
 Network Wi-Fi library in Tizen C API (Development)
@@ -28,8 +36,18 @@ Network Wi-Fi library in Tizen C API (Development)
 
 
 %build
+export CFLAGS+=' -Wno-unused-local-typedefs'
 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
-%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+cmake -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER} \
+%if 0%{?model_build_feature_network_dsds} == 1
+       -DTIZEN_DUALSIM_ENABLE=1 \
+%endif
+%if "%{?tizen_profile_name}" == "wearable"
+       -DTIZEN_WEARABLE=1 \
+%elseif "%{?tizen_profile_name}" == "mobile"
+       -DTIZEN_MOBILE=1 \
+%endif
+       .
 
 make %{?_smp_mflags}
 
@@ -39,7 +57,7 @@ make %{?_smp_mflags}
 
 #License
 mkdir -p %{buildroot}%{_datadir}/license
-cp LICENSE.APLv2 %{buildroot}%{_datadir}/license/capi-network-wifi
+cp LICENSE %{buildroot}%{_datadir}/license/capi-network-wifi
 
 %post -p /sbin/ldconfig
 
@@ -50,6 +68,7 @@ cp LICENSE.APLv2 %{buildroot}%{_datadir}/license/capi-network-wifi
 %manifest capi-network-wifi.manifest
 %attr(644,-,-) %{_libdir}/libcapi-network-wifi.so.*
 %{_datadir}/license/capi-network-wifi
+%{_bindir}/wifi_test
 
 %files devel
 %{_includedir}/network/*.h
old mode 100644 (file)
new mode 100755 (executable)
index 1198c5f..4964147
  * limitations under the License.
  */
 
+#include <glib.h>
+#include <ctype.h>
 #include <stdio.h>
 #include <string.h>
-#include <ctype.h>
-#include <glib.h>
+
 #include "net_wifi_private.h"
 
-static GSList *ap_handle_list = NULL;
+static __thread bool is_init = false;
+static __thread GSList *ap_handle_list = NULL;
 
 struct _wifi_cb_s {
        wifi_device_state_changed_cb device_state_cb;
@@ -29,8 +31,6 @@ struct _wifi_cb_s {
        void *bg_scan_user_data;
        wifi_scan_finished_cb scan_request_cb;
        void *scan_request_user_data;
-       wifi_scan_finished_cb scan_hidden_ap_cb;
-       void *scan_hidden_ap_user_data;
        wifi_connection_state_changed_cb connection_state_cb;
        void *connection_state_user_data;
        wifi_activated_cb activated_cb;
@@ -48,10 +48,30 @@ struct _profile_list_s {
        net_profile_info_t *profiles;
 };
 
-static struct _wifi_cb_s wifi_callbacks = {0,};
-static struct _profile_list_s profile_iterator = {0, NULL};
-static struct _profile_list_s hidden_profile_iterator = {0, NULL};
+struct _wifi_state_notify {
+       net_profile_info_t *ap_info;
+       wifi_connection_state_e state;
+};
+
+struct managed_idle_data {
+       GSourceFunc func;
+       gpointer user_data;
+       guint id;
+};
+
+static __thread struct _wifi_cb_s wifi_callbacks = { 0, };
+static __thread struct _profile_list_s profile_iterator = { 0, NULL };
+static __thread GSList *managed_idler_list = NULL;
+
+bool _wifi_is_init(void)
+{
+       return is_init;
+}
 
+static void __wifi_set_init(bool tag)
+{
+       is_init = tag;
+}
 
 static wifi_error_e __libnet_convert_to_ap_error_type(net_err_t err_type)
 {
@@ -76,6 +96,8 @@ static wifi_error_e __libnet_convert_to_ap_error_type(net_err_t err_type)
                return WIFI_ERROR_OPERATION_ABORTED;
        case NET_ERR_TIME_OUT:
                return WIFI_ERROR_NO_REPLY;
+       case NET_ERR_ACCESS_DENIED:
+               return WIFI_ERROR_PERMISSION_DENIED;
        default:
                return WIFI_ERROR_OPERATION_FAILED;
        }
@@ -112,6 +134,10 @@ static const char *__libnet_convert_ap_error_type_to_string(wifi_error_e err_typ
                return "NO_REPLY";
        case WIFI_ERROR_SECURITY_RESTRICTED:
                return "SECURITY_RESTRICTED";
+       case WIFI_ERROR_PERMISSION_DENIED:
+               return "PERMISSION_DENIED";
+       case WIFI_ERROR_NOT_SUPPORTED:
+               return "NOT_SUPPROTED";
        }
 
        return "UNKNOWN";
@@ -120,6 +146,8 @@ static const char *__libnet_convert_ap_error_type_to_string(wifi_error_e err_typ
 static const char *__libnet_convert_ap_state_to_string(wifi_connection_state_e state)
 {
        switch (state) {
+       case WIFI_CONNECTION_STATE_FAILURE:
+               return "FAILURE";
        case WIFI_CONNECTION_STATE_DISCONNECTED:
                return "DISCONNECTED";
        case WIFI_CONNECTION_STATE_ASSOCIATION:
@@ -142,49 +170,28 @@ static void __libnet_clear_profile_list(struct _profile_list_s *profile_list)
        profile_list->profiles = NULL;
 }
 
-static void __libnet_update_profile_iterator(void)
+static int __libnet_update_profile_iterator(void)
 {
-       struct _profile_list_s wifi_profiles = {0, NULL};
+       int rv;
+       struct _profile_list_s wifi_profiles = { 0, NULL };
 
        __libnet_clear_profile_list(&profile_iterator);
 
-       net_get_profile_list(NET_DEVICE_WIFI, &wifi_profiles.profiles, &wifi_profiles.count);
-       WIFI_LOG(WIFI_INFO, "Wifi profile count : %d\n", wifi_profiles.count);
+       rv = net_get_profile_list(NET_DEVICE_WIFI, &wifi_profiles.profiles, &wifi_profiles.count);
+       WIFI_LOG(WIFI_INFO, "Wi-Fi profile count: %d", wifi_profiles.count);
+
+       if (rv == NET_ERR_ACCESS_DENIED) {
+               WIFI_LOG(WIFI_ERROR, "Access denied");
+               return WIFI_ERROR_PERMISSION_DENIED;
+       }
 
        if (wifi_profiles.count == 0)
-               return;
+               return WIFI_ERROR_NONE;
 
        profile_iterator.count = wifi_profiles.count;
        profile_iterator.profiles = wifi_profiles.profiles;
-}
-
-static void __libnet_update_hidden_profile_iterator(GSList *ap_list)
-{
-       int count;
-       GSList *list = ap_list;
-
-       for (count = 0; list; list = list->next)
-               count++;
-
-       if (count == 0) {
-               WIFI_LOG(WIFI_INFO, "No hidden AP found\n");
-               return;
-       }
-
-       hidden_profile_iterator.count = count;
-       hidden_profile_iterator.profiles = g_try_new0(net_profile_info_t, count);
-
-       list = ap_list;
-       for (count = 0; list; list = list->next) {
-               net_wifi_connection_info_t *ap = list->data;
-               net_profile_info_t *profile = &hidden_profile_iterator.profiles[count];
-
-               g_strlcpy(profile->ProfileInfo.Wlan.essid, ap->essid, NET_WLAN_ESSID_LEN+1);
-               profile->ProfileInfo.Wlan.security_info.sec_mode = ap->security_info.sec_mode;
-               count++;
-       }
 
-       WIFI_LOG(WIFI_INFO, "Hidden AP count : %d\n", count);
+       return WIFI_ERROR_NONE;
 }
 
 static void __libnet_convert_profile_info_to_wifi_info(net_wifi_connection_info_t *wifi_info,
@@ -193,188 +200,316 @@ static void __libnet_convert_profile_info_to_wifi_info(net_wifi_connection_info_
        g_strlcpy(wifi_info->essid, ap_info->ProfileInfo.Wlan.essid, NET_WLAN_ESSID_LEN+1);
        wifi_info->wlan_mode = ap_info->ProfileInfo.Wlan.wlan_mode;
        memcpy(&wifi_info->security_info, &ap_info->ProfileInfo.Wlan.security_info, sizeof(wlan_security_info_t));
+       wifi_info->is_hidden = ap_info->ProfileInfo.Wlan.is_hidden;
 }
 
 static int __libnet_connect_with_wifi_info(net_profile_info_t *ap_info)
 {
+       int rv;
        net_wifi_connection_info_t wifi_info;
        memset(&wifi_info, 0, sizeof(net_wifi_connection_info_t));
 
        __libnet_convert_profile_info_to_wifi_info(&wifi_info, ap_info);
 
-       if (net_open_connection_with_wifi_info(&wifi_info) != NET_ERR_NONE)
+       rv = net_open_connection_with_wifi_info(&wifi_info);
+       if (rv == NET_ERR_ACCESS_DENIED) {
+               WIFI_LOG(WIFI_ERROR, "Access denied");
+               return WIFI_ERROR_PERMISSION_DENIED;
+       } else if (rv != NET_ERR_NONE)
                return WIFI_ERROR_OPERATION_FAILED;
 
        return WIFI_ERROR_NONE;
 }
 
+static gboolean __wifi_state_changed_cb(gpointer data)
+{
+       wifi_ap_h ap_info;
+       struct _wifi_state_notify *notify = (struct _wifi_state_notify *)data;
+
+       if (notify == NULL)
+               return FALSE;
+
+       if (notify->ap_info == NULL) {
+               g_free(notify);
+               return FALSE;
+       }
+
+       ap_info = (wifi_ap_h)notify->ap_info;
+
+       _wifi_libnet_add_to_ap_list(ap_info);
+
+       if (wifi_callbacks.connection_state_cb != NULL)
+               wifi_callbacks.connection_state_cb(notify->state, ap_info,
+                                               wifi_callbacks.connection_state_user_data);
+
+       _wifi_libnet_remove_from_ap_list(ap_info);
+
+       g_free(notify);
+
+       return FALSE;
+}
+
 static void __libnet_state_changed_cb(char *profile_name, net_profile_info_t *profile_info,
                                                        wifi_connection_state_e state)
 {
+       guint id;
+       net_profile_info_t *ap_info = NULL;
+       struct _wifi_state_notify *notify = NULL;
+
+       if (_wifi_is_init() != true) {
+               WIFI_LOG(WIFI_ERROR, "Application is not registered"
+                               "If multi-threaded, thread integrity be broken.");
+               return;
+       }
+
+       if (wifi_callbacks.connection_state_cb == NULL)
+               return;
+
        if (profile_name == NULL)
                return;
 
        if (profile_info == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Error!! Profile info not found! : %s\n", profile_name);
+               SECURE_WIFI_LOG(WIFI_ERROR, "Failed to find: %s", profile_name);
                return;
        }
 
-       ap_handle_list = g_slist_append(ap_handle_list, (wifi_ap_h)profile_info);
+       ap_info = g_try_malloc0(sizeof(net_profile_info_t));
+       if (ap_info == NULL) {
+               WIFI_LOG(WIFI_ERROR, "Memory allocation error");
+               return;
+       }
 
-       if (wifi_callbacks.connection_state_cb)
-               wifi_callbacks.connection_state_cb(state, (wifi_ap_h)profile_info,
-                                       wifi_callbacks.connection_state_user_data);
+       memcpy(ap_info, profile_info, sizeof(net_profile_info_t));
 
-       ap_handle_list = g_slist_remove(ap_handle_list, (wifi_ap_h)profile_info);
+       notify = g_try_new0(struct _wifi_state_notify, 1);
+       if (notify == NULL) {
+               g_free(ap_info);
+               return;
+       }
+
+       notify->ap_info = ap_info;
+       notify->state = state;
+
+       id = _wifi_callback_add(__wifi_state_changed_cb, (gpointer)notify);
+       if (!id)
+               g_free(notify);
 }
 
 static void __libnet_set_activated_cb(wifi_activated_cb user_cb, void *user_data)
 {
-       if (user_cb) {
+       if (user_cb != NULL) {
                wifi_callbacks.activated_cb = user_cb;
                wifi_callbacks.activated_user_data = user_data;
        }
 }
 
-static void __libnet_activated_cb(wifi_error_e result)
+static gboolean __activated_cb_idle(gpointer data)
 {
-       if (wifi_callbacks.activated_cb)
+       wifi_error_e result = (wifi_error_e)data;
+
+       if (wifi_callbacks.activated_cb != NULL)
                wifi_callbacks.activated_cb(result, wifi_callbacks.activated_user_data);
 
        wifi_callbacks.activated_cb = NULL;
        wifi_callbacks.activated_user_data = NULL;
+
+       return FALSE;
 }
 
-static void __libnet_set_deactivated_cb(wifi_disconnected_cb user_cb, void *user_data)
+static void __libnet_set_deactivated_cb(wifi_deactivated_cb user_cb, void *user_data)
 {
-       if (user_cb) {
+       if (user_cb != NULL) {
                wifi_callbacks.deactivated_cb = user_cb;
                wifi_callbacks.deactivated_user_data = user_data;
        }
 }
 
-static void __libnet_deactivated_cb(wifi_error_e result)
+static gboolean __deactivated_cb_idle(gpointer data)
 {
-       if (wifi_callbacks.deactivated_cb)
+       wifi_error_e result = (wifi_error_e)data;
+
+       if (wifi_callbacks.deactivated_cb != NULL)
                wifi_callbacks.deactivated_cb(result, wifi_callbacks.deactivated_user_data);
 
        wifi_callbacks.deactivated_cb = NULL;
        wifi_callbacks.deactivated_user_data = NULL;
+
+       return FALSE;
+}
+
+static gboolean __device_state_cb_idle(gpointer data)
+{
+       wifi_device_state_e state = (wifi_device_state_e)data;
+
+       if (wifi_callbacks.device_state_cb != NULL)
+               wifi_callbacks.device_state_cb(state, wifi_callbacks.device_state_user_data);
+
+       return FALSE;
 }
 
 static void __libnet_power_on_off_cb(net_event_info_t *event_cb, bool is_requested)
 {
+       if (_wifi_is_init() != true) {
+               WIFI_LOG(WIFI_ERROR, "Application is not registered"
+                               "If multi-threaded, thread integrity be broken.");
+               return;
+       }
+
        if (wifi_callbacks.device_state_cb == NULL &&
-           wifi_callbacks.activated_cb == NULL &&
-           wifi_callbacks.deactivated_cb == NULL)
+                       wifi_callbacks.activated_cb == NULL &&
+                       wifi_callbacks.deactivated_cb == NULL)
                return;
 
        wifi_error_e error_code = WIFI_ERROR_NONE;
-       wifi_device_state_e state;
-       net_wifi_state_t *wifi_state = (net_wifi_state_t*)event_cb->Data;
+       wifi_device_state_e state = WIFI_DEVICE_STATE_DEACTIVATED;
+       net_wifi_state_t *wifi_state = (net_wifi_state_t *)event_cb->Data;
 
        if (event_cb->Error == NET_ERR_NONE &&
-           event_cb->Datalength == sizeof(net_wifi_state_t)) {
-
+                       event_cb->Datalength == sizeof(net_wifi_state_t)) {
                if (*wifi_state == WIFI_ON) {
-                       WIFI_LOG(WIFI_INFO, "Wi-Fi State : Power ON\n");
+                       WIFI_LOG(WIFI_INFO, "Wi-Fi power on");
                        state = WIFI_DEVICE_STATE_ACTIVATED;
                } else if (*wifi_state == WIFI_OFF) {
-                       WIFI_LOG(WIFI_INFO, "Wi-Fi State : Power OFF\n");
+                       WIFI_LOG(WIFI_INFO, "Wi-Fi power off");
                        state = WIFI_DEVICE_STATE_DEACTIVATED;
                        __libnet_clear_profile_list(&profile_iterator);
-                       __libnet_clear_profile_list(&hidden_profile_iterator);
                } else {
-                       WIFI_LOG(WIFI_INFO, "Wi-Fi State : Unknown\n");
+                       WIFI_LOG(WIFI_ERROR, "Error Wi-Fi state %d", *wifi_state);
                        error_code = WIFI_ERROR_OPERATION_FAILED;
                        state = WIFI_DEVICE_STATE_DEACTIVATED;
                }
        } else {
-               WIFI_LOG(WIFI_ERROR, "Wi-Fi Power on/off request failed! Error [%d]\n", event_cb->Error);
-               error_code = WIFI_ERROR_OPERATION_FAILED;
+               WIFI_LOG(WIFI_ERROR, "Wi-Fi power request failed(%d)", event_cb->Error);
+
+               if (event_cb->Error == NET_ERR_SECURITY_RESTRICTED)
+                       error_code = WIFI_ERROR_SECURITY_RESTRICTED;
+               else
+                       error_code = WIFI_ERROR_OPERATION_FAILED;
+
                state = WIFI_DEVICE_STATE_DEACTIVATED;
        }
 
-       __libnet_activated_cb(error_code);
-       __libnet_deactivated_cb(error_code);
+       if (wifi_callbacks.activated_cb != NULL)
+               _wifi_callback_add(__activated_cb_idle, (gpointer)error_code);
 
-       if (wifi_callbacks.device_state_cb)
-               wifi_callbacks.device_state_cb(state, wifi_callbacks.device_state_user_data);
+       if (wifi_callbacks.deactivated_cb != NULL)
+               _wifi_callback_add(__deactivated_cb_idle, (gpointer)error_code);
+
+       if (wifi_callbacks.device_state_cb != NULL)
+               _wifi_callback_add(__device_state_cb_idle, (gpointer)state);
 }
 
-static void __libnet_scan_cb(net_event_info_t *event_cb)
+static gboolean __scan_request_cb_idle(gpointer data)
 {
-       wifi_error_e error_code = WIFI_ERROR_NONE;
-
-       if (event_cb->Error != NET_ERR_NONE) {
-               WIFI_LOG(WIFI_ERROR, "Scan failed!, Error [%d]\n", event_cb->Error);
-               error_code = WIFI_ERROR_OPERATION_FAILED;
-       }
+       wifi_error_e error_code = (wifi_error_e)data;
 
-       if (wifi_callbacks.scan_request_cb) {
+       if (wifi_callbacks.scan_request_cb != NULL)
                wifi_callbacks.scan_request_cb(error_code, wifi_callbacks.scan_request_user_data);
-               wifi_callbacks.scan_request_cb = NULL;
-               wifi_callbacks.scan_request_user_data = NULL;
-               return;
-       }
+
+       wifi_callbacks.scan_request_cb = NULL;
+       wifi_callbacks.scan_request_user_data = NULL;
+
+       return FALSE;
+}
+
+static gboolean __bgscan_cb_idle(gpointer data)
+{
+       wifi_error_e error_code = (wifi_error_e)data;
 
        if (wifi_callbacks.bg_scan_cb != NULL)
                wifi_callbacks.bg_scan_cb(error_code, wifi_callbacks.bg_scan_user_data);
+
+       return FALSE;
 }
 
-static void __libnet_hidden_scan_cb(net_event_info_t *event_cb)
+static void __libnet_scan_cb(net_event_info_t *event_cb, bool is_requested)
 {
        wifi_error_e error_code = WIFI_ERROR_NONE;
 
-       __libnet_clear_profile_list(&hidden_profile_iterator);
+       if (_wifi_is_init() != true) {
+               WIFI_LOG(WIFI_ERROR, "Application is not registered"
+                               "If multi-threaded, thread integrity be broken.");
+               return;
+       }
 
        if (event_cb->Error != NET_ERR_NONE) {
-               WIFI_LOG(WIFI_ERROR, "Hidden scan failed!, Error [%d]\n", event_cb->Error);
+               WIFI_LOG(WIFI_ERROR, "Scan failed[%d]", event_cb->Error);
                error_code = WIFI_ERROR_OPERATION_FAILED;
-       } else if (event_cb->Data) {
-               GSList *ap_list = event_cb->Data;
-               __libnet_update_hidden_profile_iterator(ap_list);
        }
 
-       if (wifi_callbacks.scan_hidden_ap_cb) {
-               wifi_callbacks.scan_hidden_ap_cb(error_code, wifi_callbacks.scan_hidden_ap_user_data);
-               wifi_callbacks.scan_hidden_ap_cb = NULL;
-               wifi_callbacks.scan_hidden_ap_user_data = NULL;
+       if (wifi_callbacks.scan_request_cb != NULL) {
+               _wifi_callback_add(__scan_request_cb_idle, (gpointer)error_code);
+               return;
        }
+
+       if (wifi_callbacks.bg_scan_cb != NULL)
+               _wifi_callback_add(__bgscan_cb_idle, (gpointer)error_code);
 }
 
 static void __libnet_set_connected_cb(wifi_connected_cb user_cb, void *user_data)
 {
-       if (user_cb) {
+       if (user_cb != NULL) {
                wifi_callbacks.connected_cb = user_cb;
                wifi_callbacks.connected_user_data = user_data;
        }
 }
 
-static void __libnet_connected_cb(wifi_error_e result)
+static gboolean __connected_cb_idle(gpointer data)
 {
-       if (wifi_callbacks.connected_cb)
+       wifi_error_e result = (wifi_error_e)data;
+
+       if (wifi_callbacks.connected_cb != NULL)
                wifi_callbacks.connected_cb(result, wifi_callbacks.connected_user_data);
 
        wifi_callbacks.connected_cb = NULL;
        wifi_callbacks.connected_user_data = NULL;
+
+       return FALSE;
+}
+
+static void __libnet_connected_cb(wifi_error_e result)
+{
+       if (_wifi_is_init() != true) {
+               WIFI_LOG(WIFI_ERROR, "Application is not registered"
+                               "If multi-threaded, thread integrity be broken.");
+               return;
+       }
+
+       if (wifi_callbacks.connected_cb != NULL)
+               _wifi_callback_add(__connected_cb_idle, (gpointer)result);
 }
 
 static void __libnet_set_disconnected_cb(wifi_disconnected_cb user_cb, void *user_data)
 {
-       if (user_cb) {
+       if (user_cb != NULL) {
                wifi_callbacks.disconnected_cb = user_cb;
                wifi_callbacks.disconnected_user_data = user_data;
        }
 }
 
-static void __libnet_disconnected_cb(wifi_error_e result)
+static gboolean __disconnected_cb_idle(gpointer data)
 {
-       if (wifi_callbacks.disconnected_cb)
+       wifi_error_e result = (wifi_error_e)data;
+
+       if (wifi_callbacks.disconnected_cb != NULL)
                wifi_callbacks.disconnected_cb(result, wifi_callbacks.disconnected_user_data);
 
        wifi_callbacks.disconnected_cb = NULL;
        wifi_callbacks.disconnected_user_data = NULL;
+
+       return FALSE;
+}
+
+static void __libnet_disconnected_cb(wifi_error_e result)
+{
+       if (_wifi_is_init() != true) {
+               WIFI_LOG(WIFI_ERROR, "Application is not registered"
+                               "If multi-threaded, thread integrity be broken.");
+               return;
+       }
+
+       if (wifi_callbacks.disconnected_cb != NULL)
+               _wifi_callback_add(__disconnected_cb_idle, (gpointer)result);
 }
 
 static void __libnet_evt_cb(net_event_info_t *event_cb, void *user_data)
@@ -383,6 +518,8 @@ static void __libnet_evt_cb(net_event_info_t *event_cb, void *user_data)
        net_profile_info_t *prof_info_p = NULL;
        net_profile_info_t prof_info;
        wifi_error_e result = WIFI_ERROR_NONE;
+       int i = 0;
+       bool is_profile_exists = false;
 
        switch (event_cb->Event) {
        case NET_EVENT_OPEN_RSP:
@@ -394,27 +531,23 @@ static void __libnet_evt_cb(net_event_info_t *event_cb, void *user_data)
                        return;
 
                result = __libnet_convert_to_ap_error_type(event_cb->Error);
-               WIFI_LOG(WIFI_INFO, "Got Open RSP/IND : %s\n",
-                       __libnet_convert_ap_error_type_to_string(result));
+               WIFI_LOG(WIFI_INFO, "Connection open error %s",
+                               __libnet_convert_ap_error_type_to_string(result));
 
                if (is_requested)
                        __libnet_connected_cb(result);
 
                switch (event_cb->Error) {
                case NET_ERR_NONE:
-                       WIFI_LOG(WIFI_INFO, "Connection open succeeded\n");
-
                        if (event_cb->Datalength == sizeof(net_profile_info_t))
-                               prof_info_p = (net_profile_info_t*)event_cb->Data;
+                               prof_info_p = (net_profile_info_t *)event_cb->Data;
 
                        __libnet_state_changed_cb(event_cb->ProfileName, prof_info_p,
                                                        WIFI_CONNECTION_STATE_CONNECTED);
                        return;
                case NET_ERR_ACTIVE_CONNECTION_EXISTS:
-                       WIFI_LOG(WIFI_INFO, "Connection already existed\n");
                        return;
                default :
-                       WIFI_LOG(WIFI_ERROR, "Connection open failed!\n");
                        break;
                }
 
@@ -434,24 +567,22 @@ static void __libnet_evt_cb(net_event_info_t *event_cb, void *user_data)
                        return;
 
                result = __libnet_convert_to_ap_error_type(event_cb->Error);
-               WIFI_LOG(WIFI_INFO, "Got Close RSP/IND : %s\n",
-                       __libnet_convert_ap_error_type_to_string(result));
+               WIFI_LOG(WIFI_ERROR, "Connection close error %s",
+                               __libnet_convert_ap_error_type_to_string(result));
 
                if (is_requested)
                        __libnet_disconnected_cb(result);
 
                switch (event_cb->Error) {
                case NET_ERR_NONE:
-                       WIFI_LOG(WIFI_INFO, "Connection close succeeded!\n");
                        if (net_get_profile_info(event_cb->ProfileName, &prof_info) == NET_ERR_NONE)
                                __libnet_state_changed_cb(event_cb->ProfileName, &prof_info,
-                                                       WIFI_CONNECTION_STATE_DISCONNECTED);
+                                               WIFI_CONNECTION_STATE_DISCONNECTED);
                        else
                                __libnet_state_changed_cb(event_cb->ProfileName, NULL,
-                                                       WIFI_CONNECTION_STATE_DISCONNECTED);
+                                               WIFI_CONNECTION_STATE_DISCONNECTED);
                        return;
                default:
-                       WIFI_LOG(WIFI_ERROR, "Connection close failed!\n");
                        break;
                }
 
@@ -460,59 +591,63 @@ static void __libnet_evt_cb(net_event_info_t *event_cb, void *user_data)
                if (_wifi_libnet_check_profile_name_validity(event_cb->ProfileName) != true)
                        return;
 
-               WIFI_LOG(WIFI_INFO, "Got State changed IND\n");
-
                if (event_cb->Datalength != sizeof(net_state_type_t))
                        return;
 
-               net_state_type_t *profile_state = (net_state_type_t*)event_cb->Data;
+               net_state_type_t *profile_state = (net_state_type_t *)event_cb->Data;
                wifi_connection_state_e ap_state = _wifi_convert_to_ap_state(*profile_state);
-
-               WIFI_LOG(WIFI_INFO,
-                       "Profile State : %s, profile name : %s\n",
-                       __libnet_convert_ap_state_to_string(ap_state),
-                       event_cb->ProfileName);
+               
+               WIFI_LOG(WIFI_INFO, "state: %s", __libnet_convert_ap_state_to_string(ap_state));
+               SECURE_WIFI_LOG(WIFI_INFO, "profile name: %s", event_cb->ProfileName);
 
                if (net_get_profile_info(event_cb->ProfileName, &prof_info) == NET_ERR_NONE)
                        __libnet_state_changed_cb(event_cb->ProfileName, &prof_info, ap_state);
-               else
+               else if (ap_state == WIFI_CONNECTION_STATE_DISCONNECTED) {
+                       for (i = 0; i < profile_iterator.count; i++) {
+                               if (!g_strcmp0(event_cb->ProfileName,
+                                               profile_iterator.profiles[i].ProfileName)) {
+                                       is_profile_exists = true;
+                                       break;
+                               }
+                       }
+
+                       if (is_profile_exists == true) {
+                               profile_iterator.profiles[i].ProfileState = *profile_state;
+                               __libnet_state_changed_cb(event_cb->ProfileName,
+                                                       &profile_iterator.profiles[i], ap_state);
+                       } else
+                               __libnet_state_changed_cb(event_cb->ProfileName,
+                                                       NULL, ap_state);
+               } else
                        __libnet_state_changed_cb(event_cb->ProfileName, NULL, ap_state);
 
-
                break;
        case NET_EVENT_WIFI_SCAN_RSP:
        case NET_EVENT_WIFI_SCAN_IND:
-               WIFI_LOG(WIFI_INFO, "Got Wi-Fi scan IND\n");
-               __libnet_scan_cb(event_cb);
-               break;
-       case NET_EVENT_SPECIFIC_SCAN_RSP:
-               WIFI_LOG(WIFI_INFO, "Got Wi-Fi hidden scan RSP\n");
-               break;
-       case NET_EVENT_SPECIFIC_SCAN_IND:
-               WIFI_LOG(WIFI_INFO, "Got Wi-Fi hidden scan IND\n");
-               __libnet_hidden_scan_cb(event_cb);
+               __libnet_scan_cb(event_cb, is_requested);
                break;
        case NET_EVENT_WIFI_POWER_RSP:
                is_requested = true;
                /* fall through */
        case NET_EVENT_WIFI_POWER_IND:
-               WIFI_LOG(WIFI_INFO, "Got Wi-Fi power IND\n");
                __libnet_power_on_off_cb(event_cb, is_requested);
                break;
        default :
-               WIFI_LOG(WIFI_ERROR, "Error! Unknown Event\n\n");
+               break;
        }
 }
 
-bool _wifi_libnet_init(void)
+int _wifi_libnet_init(void)
 {
        int rv;
 
        rv = net_register_client_ext((net_event_cb_t)__libnet_evt_cb, NET_DEVICE_WIFI, NULL);
        if (rv != NET_ERR_NONE)
-               return false;
+               return rv;
 
-       return true;
+       __wifi_set_init(true);
+
+       return NET_ERR_NONE;
 }
 
 bool _wifi_libnet_deinit(void)
@@ -521,60 +656,76 @@ bool _wifi_libnet_deinit(void)
                return false;
 
        __libnet_clear_profile_list(&profile_iterator);
-       __libnet_clear_profile_list(&hidden_profile_iterator);
        g_slist_free_full(ap_handle_list, g_free);
        ap_handle_list = NULL;
        memset(&wifi_callbacks, 0, sizeof(struct _wifi_cb_s));
 
+       __wifi_set_init(false);
+
        return true;
 }
 
-int _wifi_activate(wifi_activated_cb callback, void *user_data)
+int _wifi_activate(wifi_activated_cb callback, gboolean wifi_picker_test,
+                                       void *user_data)
 {
-       int rv;
+       int rv = NET_ERR_NONE;
 
-       rv = net_wifi_power_on();
+       rv = net_wifi_power_on(wifi_picker_test);
        if (rv == NET_ERR_NONE) {
                __libnet_set_activated_cb(callback, user_data);
                return WIFI_ERROR_NONE;
+       } else if (rv == NET_ERR_ACCESS_DENIED) {
+               WIFI_LOG(WIFI_ERROR, "Access denied");
+               return WIFI_ERROR_PERMISSION_DENIED;
        } else if (rv == NET_ERR_INVALID_OPERATION)
                return WIFI_ERROR_INVALID_OPERATION;
        else if (rv == NET_ERR_ALREADY_EXISTS)
                return WIFI_ERROR_ALREADY_EXISTS;
+       else if (rv == NET_ERR_IN_PROGRESS)
+               return WIFI_ERROR_NOW_IN_PROGRESS;
+       else if (rv == NET_ERR_SECURITY_RESTRICTED)
+               return WIFI_ERROR_SECURITY_RESTRICTED;
 
        return WIFI_ERROR_OPERATION_FAILED;
 }
 
 int _wifi_deactivate(wifi_deactivated_cb callback, void *user_data)
 {
-       int rv;
+       int rv = NET_ERR_NONE;
 
        rv = net_wifi_power_off();
        if (rv == NET_ERR_NONE) {
                __libnet_set_deactivated_cb(callback, user_data);
                return WIFI_ERROR_NONE;
+       } else if (rv == NET_ERR_ACCESS_DENIED) {
+               WIFI_LOG(WIFI_ERROR, "Access denied");
+               return WIFI_ERROR_PERMISSION_DENIED;
        } else if (rv == NET_ERR_INVALID_OPERATION)
                return WIFI_ERROR_INVALID_OPERATION;
        else if (rv == NET_ERR_ALREADY_EXISTS)
                return WIFI_ERROR_ALREADY_EXISTS;
+       else if (rv == NET_ERR_IN_PROGRESS)
+               return WIFI_ERROR_NOW_IN_PROGRESS;
+       else if (rv == NET_ERR_SECURITY_RESTRICTED)
+               return WIFI_ERROR_SECURITY_RESTRICTED;
 
        return WIFI_ERROR_OPERATION_FAILED;
 }
 
 bool _wifi_libnet_check_ap_validity(wifi_ap_h ap_h)
 {
-       GSList *list;
-       int i = 0;
+       int i;
+       GSList *list = NULL;
+
+       if (ap_h == NULL)
+               return false;
 
        for (list = ap_handle_list; list; list = list->next)
                if (ap_h == list->data) return true;
 
-       for (; i < profile_iterator.count; i++)
+       for (i = 0; i < profile_iterator.count; i++)
                if (ap_h == &profile_iterator.profiles[i]) return true;
 
-       for (i = 0; i < hidden_profile_iterator.count; i++)
-               if (ap_h == &hidden_profile_iterator.profiles[i]) return true;
-
        return false;
 }
 
@@ -596,13 +747,13 @@ bool _wifi_libnet_check_profile_name_validity(const char *profile_name)
 
        if (profile_name == NULL ||
                        g_str_has_prefix(profile_name, profile_prefix) != TRUE) {
-               WIFI_LOG(WIFI_ERROR, "Error!!! Profile name is invalid\n");
+               WIFI_LOG(WIFI_INFO, "The profile is a hidden or not a regular Wi-Fi profile");
                return false;
        }
 
        while (profile_name[i] != '\0') {
                if (isgraph(profile_name[i]) == 0) {
-                       WIFI_LOG(WIFI_ERROR, "Error!!! Profile name is invalid\n");
+                       WIFI_LOG(WIFI_INFO, "Invalid format: %s", profile_name);
                        return false;
                }
                i++;
@@ -611,13 +762,18 @@ bool _wifi_libnet_check_profile_name_validity(const char *profile_name)
        return true;
 }
 
-bool _wifi_libnet_get_wifi_device_state(wifi_device_state_e *device_state)
+int _wifi_libnet_get_wifi_device_state(wifi_device_state_e *device_state)
 {
        net_tech_info_t tech_info;
 
-       if (net_get_technology_properties(NET_DEVICE_WIFI, &tech_info) != NET_ERR_NONE) {
-               WIFI_LOG(WIFI_ERROR, "Error!! net_get_technology_properties() failed.\n");
-               return false;
+       int rv = NET_ERR_NONE;
+       rv = net_get_technology_properties(NET_DEVICE_WIFI, &tech_info);
+       if (rv == NET_ERR_ACCESS_DENIED) {
+               WIFI_LOG(WIFI_ERROR, "Access denied");
+               return WIFI_ERROR_PERMISSION_DENIED;
+       } else if (rv != NET_ERR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Failed to get technology properties");
+               return WIFI_ERROR_OPERATION_FAILED;
        }
 
        if (tech_info.powered)
@@ -625,19 +781,22 @@ bool _wifi_libnet_get_wifi_device_state(wifi_device_state_e *device_state)
        else
                *device_state = WIFI_DEVICE_STATE_DEACTIVATED;
 
-       WIFI_LOG(WIFI_ERROR, "Wi-Fi device state: %d", *device_state);
-
-       return true;
+       return WIFI_ERROR_NONE;
 }
 
-bool _wifi_libnet_get_wifi_state(wifi_connection_state_e* connection_state)
+int _wifi_libnet_get_wifi_state(wifi_connection_state_e* connection_state)
 {
+       int rv;
        net_wifi_state_t wlan_state = 0;
        net_profile_name_t profile_name;
 
-       if (net_get_wifi_state(&wlan_state, &profile_name) != NET_ERR_NONE) {
-               WIFI_LOG(WIFI_ERROR, "Error!! net_get_wifi_state() failed.\n");
-               return false;
+       rv = net_get_wifi_state(&wlan_state, &profile_name);
+       if (rv == NET_ERR_ACCESS_DENIED) {
+               WIFI_LOG(WIFI_ERROR, "Access denied");
+               return WIFI_ERROR_PERMISSION_DENIED;
+       } else if (rv != NET_ERR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Failed to get Wi-Fi state");
+               return WIFI_ERROR_OPERATION_FAILED;
        }
 
        switch (wlan_state) {
@@ -645,9 +804,12 @@ bool _wifi_libnet_get_wifi_state(wifi_connection_state_e* connection_state)
        case WIFI_ON:
                *connection_state = WIFI_CONNECTION_STATE_DISCONNECTED;
                break;
-       case WIFI_CONNECTING:
+       case WIFI_ASSOCIATION:
                *connection_state = WIFI_CONNECTION_STATE_ASSOCIATION;
                break;
+       case WIFI_CONFIGURATION:
+               *connection_state = WIFI_CONNECTION_STATE_CONFIGURATION;
+               break;
        case WIFI_CONNECTED:
                *connection_state = WIFI_CONNECTION_STATE_CONNECTED;
                break;
@@ -655,20 +817,27 @@ bool _wifi_libnet_get_wifi_state(wifi_connection_state_e* connection_state)
                *connection_state = WIFI_CONNECTION_STATE_CONNECTED;
                break;
        default :
-               WIFI_LOG(WIFI_ERROR, "Error!! Unknown state\n");
-               return false;
+               WIFI_LOG(WIFI_ERROR, "Unknown state");
+               return WIFI_ERROR_OPERATION_FAILED;
        }
 
-       return true;
+       return WIFI_ERROR_NONE;
 }
 
 int _wifi_libnet_get_intf_name(char** name)
 {
-       if (profile_iterator.count == 0)
-               __libnet_update_profile_iterator();
+       int rv;
 
        if (profile_iterator.count == 0) {
-               WIFI_LOG(WIFI_ERROR, "Error!! There is no AP\n");
+               rv = __libnet_update_profile_iterator();
+               if (rv == NET_ERR_ACCESS_DENIED) {
+                       WIFI_LOG(WIFI_ERROR, "Access denied");
+                       return WIFI_ERROR_PERMISSION_DENIED;
+               }
+       }
+
+       if (profile_iterator.count == 0) {
+               WIFI_LOG(WIFI_ERROR, "There is no AP");
                return WIFI_ERROR_OPERATION_FAILED;
        }
 
@@ -688,22 +857,9 @@ int _wifi_libnet_scan_request(wifi_scan_finished_cb callback, void *user_data)
                wifi_callbacks.scan_request_cb = callback;
                wifi_callbacks.scan_request_user_data = user_data;
                return WIFI_ERROR_NONE;
-       } else if (rv == NET_ERR_INVALID_OPERATION)
-               return WIFI_ERROR_INVALID_OPERATION;
-
-       return WIFI_ERROR_OPERATION_FAILED;
-}
-
-int _wifi_libnet_scan_hidden_ap(const char *essid,
-                                       wifi_scan_finished_cb callback, void *user_data)
-{
-       int rv;
-       rv = net_specific_scan_wifi(essid);
-
-       if (rv == NET_ERR_NONE) {
-               wifi_callbacks.scan_hidden_ap_cb = callback;
-               wifi_callbacks.scan_hidden_ap_user_data = user_data;
-               return WIFI_ERROR_NONE;
+       } else if (rv == NET_ERR_ACCESS_DENIED) {
+               WIFI_LOG(WIFI_ERROR, "Access denied");
+               return WIFI_ERROR_PERMISSION_DENIED;
        } else if (rv == NET_ERR_INVALID_OPERATION)
                return WIFI_ERROR_INVALID_OPERATION;
 
@@ -712,12 +868,16 @@ int _wifi_libnet_scan_hidden_ap(const char *essid,
 
 int _wifi_libnet_get_connected_profile(wifi_ap_h *ap)
 {
-       int i = 0;
+       int i, rv;
        wifi_ap_h ap_h = NULL;
 
-       __libnet_update_profile_iterator();
+       rv = __libnet_update_profile_iterator();
+       if (rv == NET_ERR_ACCESS_DENIED) {
+               WIFI_LOG(WIFI_ERROR, "Access denied");
+               return WIFI_ERROR_PERMISSION_DENIED;
+       }
 
-       for (;i < profile_iterator.count;i++) {
+       for (i = 0; i < profile_iterator.count; i++) {
                if (profile_iterator.profiles[i].ProfileState == NET_STATE_TYPE_ONLINE ||
                    profile_iterator.profiles[i].ProfileState == NET_STATE_TYPE_READY) {
                        ap_h = (wifi_ap_h)(&profile_iterator.profiles[i]);
@@ -726,7 +886,7 @@ int _wifi_libnet_get_connected_profile(wifi_ap_h *ap)
        }
 
        if (ap_h == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Error!! There is no connected AP.\n");
+               WIFI_LOG(WIFI_ERROR, "There is no connected AP");
                return WIFI_ERROR_NO_CONNECTION;
        }
 
@@ -741,99 +901,116 @@ int _wifi_libnet_get_connected_profile(wifi_ap_h *ap)
        return WIFI_ERROR_NONE;
 }
 
-bool _wifi_libnet_foreach_found_aps(wifi_found_ap_cb callback, void *user_data)
+int _wifi_libnet_foreach_found_aps(wifi_found_ap_cb callback, void *user_data)
 {
-       int i = 0;
-       bool rv = true;
-
-       __libnet_update_profile_iterator();
+       int i, rv;
 
-       if (profile_iterator.count == 0) {
-               WIFI_LOG(WIFI_INFO, "There is no APs.\n");
-               return true;
+       rv = __libnet_update_profile_iterator();
+       if (rv == NET_ERR_ACCESS_DENIED) {
+               WIFI_LOG(WIFI_ERROR, "Access denied");
+               return WIFI_ERROR_PERMISSION_DENIED;
        }
 
-       for (;i < profile_iterator.count;i++) {
-               rv = callback((wifi_ap_h)(&profile_iterator.profiles[i]), user_data);
-               if (rv == false) break;
+       if (profile_iterator.count == 0) {
+               WIFI_LOG(WIFI_WARN, "There is no AP");
+               return WIFI_ERROR_NONE;
        }
 
-       return true;
-}
-
-bool _wifi_libnet_foreach_found_hidden_aps(wifi_found_ap_cb callback, void *user_data)
-{
-       int i = 0;
-       bool rv = true;
-
-       if (hidden_profile_iterator.count == 0) {
-               WIFI_LOG(WIFI_INFO, "There is no hidden APs.\n");
-               return true;
-       }
+       for (i = 0; i < profile_iterator.count; i++) {
+               if (profile_iterator.profiles[i].ProfileInfo.Wlan.is_hidden == TRUE)
+                       continue;
 
-       for (;i < hidden_profile_iterator.count;i++) {
-               rv = callback((wifi_ap_h)(&hidden_profile_iterator.profiles[i]), user_data);
+               rv = callback((wifi_ap_h)(&profile_iterator.profiles[i]), user_data);
                if (rv == false) break;
        }
 
-       return true;
+       return WIFI_ERROR_NONE;
 }
 
 int _wifi_libnet_open_profile(wifi_ap_h ap_h, wifi_connected_cb callback, void *user_data)
 {
        int rv;
        bool valid_profile;
-       net_profile_name_t profile_name;
        net_profile_info_t *ap_info = ap_h;
 
-       g_strlcpy(profile_name.ProfileName, ap_info->ProfileName, NET_PROFILE_NAME_LEN_MAX+1);
-
        valid_profile =
-                       _wifi_libnet_check_profile_name_validity(profile_name.ProfileName);
+                       _wifi_libnet_check_profile_name_validity(ap_info->ProfileName);
 
        if (valid_profile == true && ap_info->Favourite)
-               rv = net_open_connection_with_profile(profile_name.ProfileName);
+               rv = net_open_connection_with_profile(ap_info->ProfileName);
        else if (valid_profile == true &&
-                       ap_info->ProfileInfo.Wlan.security_info.sec_mode == WLAN_SEC_MODE_NONE)
-               rv = net_open_connection_with_profile(profile_name.ProfileName);
+                       ap_info->ProfileInfo.Wlan.is_hidden != TRUE &&
+                       ap_info->ProfileInfo.Wlan.security_info.sec_mode ==
+                                                                                               WLAN_SEC_MODE_NONE)
+               rv = net_open_connection_with_profile(ap_info->ProfileName);
        else
                rv = __libnet_connect_with_wifi_info(ap_info);
 
-       if (rv != NET_ERR_NONE)
+       rv = __libnet_convert_to_ap_error_type(rv);
+       if (rv == WIFI_ERROR_NONE)
+               __libnet_set_connected_cb(callback, user_data);
+
+       return rv;
+}
+
+int _wifi_libnet_close_profile(wifi_ap_h ap_h, wifi_disconnected_cb callback, void *user_data)
+{
+       int rv;
+       net_profile_info_t *ap_info = ap_h;
+
+       rv = net_close_connection(ap_info->ProfileName);
+       if (rv == NET_ERR_ACCESS_DENIED) {
+               WIFI_LOG(WIFI_ERROR, "Access denied");
+               return WIFI_ERROR_PERMISSION_DENIED;
+       } else if (rv != NET_ERR_NONE)
                return WIFI_ERROR_OPERATION_FAILED;
 
-       __libnet_set_connected_cb(callback, user_data);
+       __libnet_set_disconnected_cb(callback, user_data);
 
        return WIFI_ERROR_NONE;
 }
 
-int _wifi_libnet_close_profile(wifi_ap_h ap_h, wifi_disconnected_cb callback, void *user_data)
+int _wifi_libnet_connect_with_wps_pbc(wifi_ap_h ap_h, wifi_connected_cb callback, void *user_data)
 {
+       int rv;
        net_profile_info_t *ap_info = ap_h;
-       net_profile_name_t profile_name;
+       net_wifi_wps_info_t wps_info;
+       memset(&wps_info, 0, sizeof(net_wifi_wps_info_t));
 
-       g_strlcpy(profile_name.ProfileName, ap_info->ProfileName, NET_PROFILE_NAME_LEN_MAX+1);
+       wps_info.type = WIFI_WPS_PBC;
 
-       if (net_close_connection(profile_name.ProfileName) != NET_ERR_NONE)
+       rv = net_wifi_enroll_wps(ap_info->ProfileName, &wps_info);
+       if (rv == NET_ERR_ACCESS_DENIED) {
+               WIFI_LOG(WIFI_ERROR, "Access denied");
+               return WIFI_ERROR_PERMISSION_DENIED;
+       } else if (rv != NET_ERR_NONE)
                return WIFI_ERROR_OPERATION_FAILED;
 
-       __libnet_set_disconnected_cb(callback, user_data);
+       __libnet_set_connected_cb(callback, user_data);
 
        return WIFI_ERROR_NONE;
 }
 
-int _wifi_libnet_connect_with_wps(wifi_ap_h ap_h, wifi_connected_cb callback, void *user_data)
+int _wifi_libnet_connect_with_wps_pin(wifi_ap_h ap_h, const char *pin,
+               wifi_connected_cb callback, void *user_data)
 {
+       int rv;
        net_profile_info_t *ap_info = ap_h;
        net_wifi_wps_info_t wps_info;
-       net_profile_name_t profile_name;
 
-       memset(&wps_info, 0 , sizeof(net_wifi_wps_info_t));
-       g_strlcpy(profile_name.ProfileName, ap_info->ProfileName, NET_PROFILE_NAME_LEN_MAX+1);
+       if (ap_info == NULL) {
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
+               return WIFI_ERROR_INVALID_PARAMETER;
+       }
 
-       wps_info.type = WIFI_WPS_PBC;
+       wps_info.type = WIFI_WPS_PIN;
+       g_strlcpy(wps_info.pin, pin, NET_WLAN_MAX_WPSPIN_LEN + 1);
 
-       if (net_wifi_enroll_wps(profile_name.ProfileName, &wps_info) != NET_ERR_NONE)
+       rv = net_wifi_enroll_wps(ap_info->ProfileName, &wps_info);
+       if (rv == NET_ERR_ACCESS_DENIED) {
+               WIFI_LOG(WIFI_ERROR, "Access denied");
+               return WIFI_ERROR_PERMISSION_DENIED;
+       } else if (rv != NET_ERR_NONE)
                return WIFI_ERROR_OPERATION_FAILED;
 
        __libnet_set_connected_cb(callback, user_data);
@@ -844,26 +1021,35 @@ int _wifi_libnet_connect_with_wps(wifi_ap_h ap_h, wifi_connected_cb callback, vo
 int _wifi_libnet_forget_ap(wifi_ap_h ap)
 {
        int rv = 0;
-       net_profile_name_t profile_name;
        net_profile_info_t *ap_info = ap;
 
-       g_strlcpy(profile_name.ProfileName, ap_info->ProfileName, NET_PROFILE_NAME_LEN_MAX+1);
+       if (ap_info == NULL) {
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
+               return WIFI_ERROR_INVALID_PARAMETER;
+       }
 
-       rv = net_delete_profile(profile_name.ProfileName);
-       if (rv != NET_ERR_NONE)
+       rv = net_delete_profile(ap_info->ProfileName);
+       if (rv == NET_ERR_ACCESS_DENIED) {
+               WIFI_LOG(WIFI_ERROR, "Access denied");
+               return WIFI_ERROR_PERMISSION_DENIED;
+       } else if (rv != NET_ERR_NONE)
                return WIFI_ERROR_OPERATION_FAILED;
 
+       ap_info->Favourite = (char)FALSE;
+
        return WIFI_ERROR_NONE;
 }
 
 int _wifi_set_power_on_off_cb(wifi_device_state_changed_cb callback, void *user_data)
 {
-       if (wifi_callbacks.device_state_cb)
+       if (wifi_callbacks.device_state_cb != NULL)
                return WIFI_ERROR_INVALID_OPERATION;
 
        wifi_callbacks.device_state_cb = callback;
        wifi_callbacks.device_state_user_data = user_data;
 
+       WIFI_LOG(WIFI_INFO, "Wi-Fi registered device state changed callback");
+
        return WIFI_ERROR_NONE;
 }
 
@@ -880,7 +1066,7 @@ int _wifi_unset_power_on_off_cb(void)
 
 int _wifi_set_background_scan_cb(wifi_scan_finished_cb callback, void *user_data)
 {
-       if (wifi_callbacks.bg_scan_cb)
+       if (wifi_callbacks.bg_scan_cb != NULL)
                return WIFI_ERROR_INVALID_OPERATION;
 
        wifi_callbacks.bg_scan_cb = callback;
@@ -902,7 +1088,7 @@ int _wifi_unset_background_scan_cb(void)
 
 int _wifi_set_connection_state_cb(wifi_connection_state_changed_cb callback, void *user_data)
 {
-       if (wifi_callbacks.connection_state_cb)
+       if (wifi_callbacks.connection_state_cb != NULL)
                return WIFI_ERROR_INVALID_OPERATION;
 
        wifi_callbacks.connection_state_cb = callback;
@@ -924,8 +1110,84 @@ int _wifi_unset_connection_state_cb()
 
 int _wifi_update_ap_info(net_profile_info_t *ap_info)
 {
-       if (net_modify_profile(ap_info->ProfileName, ap_info) != NET_ERR_NONE)
+       int rv = NET_ERR_NONE;
+       rv = net_modify_profile(ap_info->ProfileName, ap_info);
+
+       if (rv == NET_ERR_ACCESS_DENIED) {
+               WIFI_LOG(WIFI_ERROR, "Access denied");
+               return WIFI_ERROR_PERMISSION_DENIED;
+       } else if (rv != NET_ERR_NONE)
                return WIFI_ERROR_OPERATION_FAILED;
 
        return WIFI_ERROR_NONE;
 }
+
+static void __wifi_idle_destroy_cb(gpointer data)
+{
+       if (!data)
+               return;
+
+       managed_idler_list = g_slist_remove(managed_idler_list, data);
+       g_free(data);
+}
+
+static gboolean __wifi_idle_cb(gpointer user_data)
+{
+       struct managed_idle_data *data = (struct managed_idle_data *)user_data;
+
+       if (!data)
+               return FALSE;
+
+       return data->func(data->user_data);
+}
+
+guint _wifi_callback_add(GSourceFunc func, gpointer user_data)
+{
+       guint id;
+       struct managed_idle_data *data;
+
+       if (!func)
+               return 0;
+
+       data = g_try_new0(struct managed_idle_data, 1);
+       if (!data)
+               return 0;
+
+       data->func = func;
+       data->user_data = user_data;
+
+       id = g_idle_add_full(G_PRIORITY_DEFAULT_IDLE, __wifi_idle_cb, data,
+                       __wifi_idle_destroy_cb);
+       if (!id) {
+               g_free(data);
+               return id;
+       }
+
+       data->id = id;
+
+       managed_idler_list = g_slist_append(managed_idler_list, data);
+
+       return id;
+}
+
+void _wifi_callback_cleanup(void)
+{
+       GSList *cur = managed_idler_list;
+       GSource *src;
+       struct managed_idle_data *data;
+
+       while (cur) {
+               GSList *next = cur->next;
+               data = (struct managed_idle_data *)cur->data;
+
+               src = g_main_context_find_source_by_id(g_main_context_default(), data->id);
+               if (src) {
+                       g_source_destroy(src);
+                       cur = managed_idler_list;
+               } else
+                       cur = next;
+       }
+
+       g_slist_free(managed_idler_list);
+       managed_idler_list = NULL;
+}
old mode 100644 (file)
new mode 100755 (executable)
index 97b87be..d3b60e8
  * limitations under the License.
  */
 
+#include <glib.h>
 #include <stdio.h>
 #include <string.h>
-#include <glib.h>
 #include <vconf/vconf.h>
 
 #include "net_wifi_private.h"
 
-static bool is_init = false;
-static wifi_rssi_level_changed_cb rssi_level_changed_cb = NULL;
-static void *rssi_level_changed_user_data = NULL;
+static __thread wifi_rssi_level_changed_cb rssi_level_changed_cb = NULL;
+static __thread void *rssi_level_changed_user_data = NULL;
+
+static gboolean __rssi_level_changed_cb_idle(gpointer data)
+{
+       int rssi_level = 0;
+
+       if (vconf_get_int(VCONFKEY_WIFI_STRENGTH, &rssi_level) != 0)
+               return FALSE;
+
+       if (rssi_level_changed_cb != NULL)
+               rssi_level_changed_cb(rssi_level, rssi_level_changed_user_data);
+
+       return FALSE;
+}
 
 static void __rssi_level_changed_cb(keynode_t *node, void *user_data)
 {
-       int rssi_level = vconf_keynode_get_int(node);
-       rssi_level_changed_cb(rssi_level, rssi_level_changed_user_data);
+       if (_wifi_is_init() != true) {
+               WIFI_LOG(WIFI_ERROR, "Application is not registered"
+                               "If multi-threaded, thread integrity be broken.");
+               return;
+       }
+
+       if (rssi_level_changed_cb != NULL)
+               _wifi_callback_add(__rssi_level_changed_cb_idle, NULL);
 }
 
 EXPORT_API int wifi_initialize(void)
 {
-       if (is_init) {
-               WIFI_LOG(WIFI_ERROR, "Already initialized\n");
+       int rv;
+
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
+       if (_wifi_is_init() == true) {
+               WIFI_LOG(WIFI_ERROR, "Already initialized");
                return WIFI_ERROR_INVALID_OPERATION;
        }
 
-       if (_wifi_libnet_init() == false) {
-               WIFI_LOG(WIFI_ERROR, "Init failed!\n");
+       rv = _wifi_libnet_init();
+       if (rv == NET_ERR_ACCESS_DENIED) {
+               WIFI_LOG(WIFI_ERROR, "Access denied");
+               return WIFI_ERROR_PERMISSION_DENIED;
+       }
+       else if (rv != NET_ERR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Init failed[%d]", rv);
                return WIFI_ERROR_OPERATION_FAILED;
        }
 
-       is_init = true;
-
-       WIFI_LOG(WIFI_INFO, "Wi-Fi successfully initialized!\n");
+       WIFI_LOG(WIFI_INFO, "Wi-Fi successfully initialized");
 
        return WIFI_ERROR_NONE;
 }
 
 EXPORT_API int wifi_deinitialize(void)
 {
-       if (is_init == false) {
-               WIFI_LOG(WIFI_ERROR, "Not initialized\n");
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
+       if (_wifi_is_init() == false) {
+               WIFI_LOG(WIFI_ERROR, "Not initialized");
                return WIFI_ERROR_INVALID_OPERATION;
        }
 
        if (_wifi_libnet_deinit() == false) {
-               WIFI_LOG(WIFI_ERROR, "Deinit failed!\n");
+               WIFI_LOG(WIFI_ERROR, "Deinit failed");
                return WIFI_ERROR_OPERATION_FAILED;
        }
 
-       is_init = false;
        wifi_unset_rssi_level_changed_cb();
+       _wifi_callback_cleanup();
 
-       WIFI_LOG(WIFI_INFO, "Wi-Fi successfully de-initialized!\n");
+       WIFI_LOG(WIFI_INFO, "Wi-Fi successfully de-initialized");
 
        return WIFI_ERROR_NONE;
 }
@@ -74,14 +101,35 @@ EXPORT_API int wifi_activate(wifi_activated_cb callback, void* user_data)
 {
        int rv;
 
-       if (is_init == false) {
-               WIFI_LOG(WIFI_ERROR, "Not initialized\n");
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
+       if (_wifi_is_init() == false) {
+               WIFI_LOG(WIFI_ERROR, "Not initialized");
+               return WIFI_ERROR_INVALID_OPERATION;
+       }
+
+       rv = _wifi_activate(callback, FALSE, user_data);
+       if (rv != WIFI_ERROR_NONE)
+               WIFI_LOG(WIFI_ERROR, "Failed to activate Wi-Fi[%d]", rv);
+
+       return rv;
+}
+
+EXPORT_API int wifi_activate_with_wifi_picker_tested(
+               wifi_activated_cb callback, void* user_data)
+{
+       int rv;
+
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
+       if (_wifi_is_init() == false) {
+               WIFI_LOG(WIFI_ERROR, "Not initialized");
                return WIFI_ERROR_INVALID_OPERATION;
        }
 
-       rv = _wifi_activate(callback, user_data);
+       rv = _wifi_activate(callback, TRUE, user_data);
        if (rv != WIFI_ERROR_NONE)
-               WIFI_LOG(WIFI_ERROR, "Error!! Wi-Fi Activation failed.\n");
+               WIFI_LOG(WIFI_ERROR, "Failed to activate Wi-Fi[%d]", rv);
 
        return rv;
 }
@@ -90,76 +138,68 @@ EXPORT_API int wifi_deactivate(wifi_deactivated_cb callback, void* user_data)
 {
        int rv;
 
-       if (is_init == false) {
-               WIFI_LOG(WIFI_ERROR, "Not initialized\n");
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
+       if (_wifi_is_init() == false) {
+               WIFI_LOG(WIFI_ERROR, "Not initialized");
                return WIFI_ERROR_INVALID_OPERATION;
        }
 
        rv = _wifi_deactivate(callback, user_data);
        if (rv != WIFI_ERROR_NONE)
-               WIFI_LOG(WIFI_ERROR, "Error!! Wi-Fi Deactivation failed.\n");
+               WIFI_LOG(WIFI_ERROR, "Wi-Fi deactivation failed");
 
        return rv;
 }
 
 EXPORT_API int wifi_is_activated(bool* activated)
 {
+       int rv;
        wifi_device_state_e device_state;
 
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (activated == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
-       if (_wifi_libnet_get_wifi_device_state(&device_state) == false) {
-               return WIFI_ERROR_OPERATION_FAILED;
-       } else {
-               WIFI_LOG(WIFI_INFO, "WiFi = %d\n", device_state);
+       rv = _wifi_libnet_get_wifi_device_state(&device_state);
+       if (rv == WIFI_ERROR_NONE) {
                if (WIFI_DEVICE_STATE_DEACTIVATED == device_state)
                        *activated = false;
                else
                        *activated = true;
        }
 
-       return WIFI_ERROR_NONE;
-}
-
-EXPORT_API int wifi_get_connection_state(wifi_connection_state_e* connection_state)
-{
-       if (connection_state == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
-               return WIFI_ERROR_INVALID_PARAMETER;
-       }
-
-       if (_wifi_libnet_get_wifi_state(connection_state) == false)
-               return WIFI_ERROR_OPERATION_FAILED;
-
-       return WIFI_ERROR_NONE;
+       return rv;
 }
 
 EXPORT_API int wifi_get_mac_address(char** mac_address)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (mac_address == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
        *mac_address = vconf_get_str(VCONFKEY_WIFI_BSSID_ADDRESS);
 
        if (*mac_address == NULL) {
-               WIFI_LOG(WIFI_ERROR, "vconf_get_str Failed\n");
+               WIFI_LOG(WIFI_ERROR, "vconf_get_str Failed");
                return WIFI_ERROR_OPERATION_FAILED;
        }
 
-       WIFI_LOG(WIFI_INFO, "MAC Address %s\n", *mac_address);
-
        return WIFI_ERROR_NONE;
 }
 
 EXPORT_API int wifi_get_network_interface_name(char** name)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (name == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
@@ -170,40 +210,21 @@ EXPORT_API int wifi_scan(wifi_scan_finished_cb callback, void* user_data)
 {
        int rv;
 
-       if (callback == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
-               return WIFI_ERROR_INVALID_PARAMETER;
-       }
-
-       if (is_init == false) {
-               WIFI_LOG(WIFI_ERROR, "Not initialized\n");
-               return WIFI_ERROR_INVALID_OPERATION;
-       }
-
-       rv = _wifi_libnet_scan_request(callback, user_data);
-       if (rv != WIFI_ERROR_NONE)
-               WIFI_LOG(WIFI_ERROR, "Error!! Wi-Fi scan failed.\n");
-
-       return rv;
-}
-
-EXPORT_API int wifi_scan_hidden_ap(const char* essid, wifi_scan_finished_cb callback, void* user_data)
-{
-       int rv;
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
        if (callback == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
-       if (is_init == false) {
-               WIFI_LOG(WIFI_ERROR, "Not initialized\n");
+       if (_wifi_is_init() == false) {
+               WIFI_LOG(WIFI_ERROR, "Not initialized");
                return WIFI_ERROR_INVALID_OPERATION;
        }
 
-       rv = _wifi_libnet_scan_hidden_ap(essid, callback, user_data);
+       rv = _wifi_libnet_scan_request(callback, user_data);
        if (rv != WIFI_ERROR_NONE)
-               WIFI_LOG(WIFI_ERROR, "Error!! Wi-Fi hidden scan failed.\n");
+               WIFI_LOG(WIFI_ERROR, "Wi-Fi scan failed");
 
        return rv;
 }
@@ -212,112 +233,144 @@ EXPORT_API int wifi_get_connected_ap(wifi_ap_h* ap)
 {
        int rv;
 
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (ap == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
        rv = _wifi_libnet_get_connected_profile(ap);
-       WIFI_LOG(WIFI_INFO, "Connected AP %p, rv %d\n", *ap, rv);
+       WIFI_LOG(WIFI_INFO, "Connected AP %p, rv %d", *ap, rv);
 
        return rv;
 }
 
 EXPORT_API int wifi_foreach_found_aps(wifi_found_ap_cb callback, void* user_data)
 {
-       if (callback == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
-               return WIFI_ERROR_INVALID_PARAMETER;
-       }
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
-       if (_wifi_libnet_foreach_found_aps(callback, user_data) == false)
-               return WIFI_ERROR_OPERATION_FAILED;
-
-       return WIFI_ERROR_NONE;
-}
-
-EXPORT_API int wifi_foreach_found_hidden_aps(wifi_found_ap_cb callback, void* user_data)
-{
        if (callback == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
-       if (_wifi_libnet_foreach_found_hidden_aps(callback, user_data) == false)
-               return WIFI_ERROR_OPERATION_FAILED;
-
-       return WIFI_ERROR_NONE;
+       return _wifi_libnet_foreach_found_aps(callback, user_data);
 }
 
 EXPORT_API int wifi_connect(wifi_ap_h ap, wifi_connected_cb callback, void* user_data)
 {
-       if (_wifi_libnet_check_ap_validity(ap) == false) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
-               return WIFI_ERROR_INVALID_PARAMETER;
-       }
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
-       if (is_init == false) {
-               WIFI_LOG(WIFI_ERROR, "Not initialized\n");
+       if (_wifi_is_init() == false) {
+               WIFI_LOG(WIFI_ERROR, "Not initialized");
                return WIFI_ERROR_INVALID_OPERATION;
        }
 
+       if (_wifi_libnet_check_ap_validity(ap) == false) {
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
+               return WIFI_ERROR_INVALID_PARAMETER;
+       }
+
        return _wifi_libnet_open_profile(ap, callback, user_data);
 }
 
 EXPORT_API int wifi_disconnect(wifi_ap_h ap, wifi_disconnected_cb callback, void* user_data)
 {
-       if (_wifi_libnet_check_ap_validity(ap) == false) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
-               return WIFI_ERROR_INVALID_PARAMETER;
-       }
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
-       if (is_init == false) {
-               WIFI_LOG(WIFI_ERROR, "Not initialized\n");
+       if (_wifi_is_init() == false) {
+               WIFI_LOG(WIFI_ERROR, "Not initialized");
                return WIFI_ERROR_INVALID_OPERATION;
        }
 
+       if (_wifi_libnet_check_ap_validity(ap) == false) {
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
+               return WIFI_ERROR_INVALID_PARAMETER;
+       }
+
        return _wifi_libnet_close_profile(ap, callback, user_data);
 }
 
 EXPORT_API int wifi_connect_by_wps_pbc(wifi_ap_h ap, wifi_connected_cb callback, void* user_data)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
+       if (_wifi_is_init() == false) {
+               WIFI_LOG(WIFI_ERROR, "Not initialized");
+               return WIFI_ERROR_INVALID_OPERATION;
+       }
+
        if (_wifi_libnet_check_ap_validity(ap) == false) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
-       if (is_init == false) {
-               WIFI_LOG(WIFI_ERROR, "Not initialized\n");
+       return _wifi_libnet_connect_with_wps_pbc(ap, callback, user_data);
+}
+
+EXPORT_API int wifi_connect_by_wps_pin(wifi_ap_h ap, const char *pin, wifi_connected_cb callback, void* user_data)
+{
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
+       if (_wifi_is_init() == false) {
+               WIFI_LOG(WIFI_ERROR, "Not initialized");
                return WIFI_ERROR_INVALID_OPERATION;
        }
 
-       return _wifi_libnet_connect_with_wps(ap, callback, user_data);
+       if (_wifi_libnet_check_ap_validity(ap) == false) {
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
+               return WIFI_ERROR_INVALID_PARAMETER;
+       }
+
+       if (NULL == pin || 0 == strlen(pin) || strlen(pin) > NET_WLAN_MAX_WPSPIN_LEN) {
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
+               return WIFI_ERROR_INVALID_PARAMETER;
+       }
+
+       return _wifi_libnet_connect_with_wps_pin(ap, pin, callback, user_data);
 }
 
 EXPORT_API int wifi_forget_ap(wifi_ap_h ap)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
+       if (_wifi_is_init() == false) {
+               WIFI_LOG(WIFI_ERROR, "Not initialized");
+               return WIFI_ERROR_INVALID_OPERATION;
+       }
+
        if (_wifi_libnet_check_ap_validity(ap) == false) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
-       if (is_init == false) {
-               WIFI_LOG(WIFI_ERROR, "Not initialized\n");
-               return WIFI_ERROR_INVALID_OPERATION;
+       return _wifi_libnet_forget_ap(ap);
+}
+
+EXPORT_API int wifi_get_connection_state(wifi_connection_state_e* connection_state)
+{
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
+       if (connection_state == NULL) {
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
+               return WIFI_ERROR_INVALID_PARAMETER;
        }
 
-       return _wifi_libnet_forget_ap(ap);
+       return _wifi_libnet_get_wifi_state(connection_state);
 }
 
 EXPORT_API int wifi_set_device_state_changed_cb(wifi_device_state_changed_cb callback, void* user_data)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (callback == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
-       if (is_init == false) {
-               WIFI_LOG(WIFI_ERROR, "Not initialized\n");
+       if (_wifi_is_init() == false) {
+               WIFI_LOG(WIFI_ERROR, "Not initialized");
                return WIFI_ERROR_INVALID_OPERATION;
        }
 
@@ -326,18 +379,22 @@ EXPORT_API int wifi_set_device_state_changed_cb(wifi_device_state_changed_cb cal
 
 EXPORT_API int wifi_unset_device_state_changed_cb(void)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        return _wifi_unset_power_on_off_cb();
 }
 
 EXPORT_API int wifi_set_background_scan_cb(wifi_scan_finished_cb callback, void* user_data)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (callback == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
-       if (is_init == false) {
-               WIFI_LOG(WIFI_ERROR, "Not initialized\n");
+       if (_wifi_is_init() == false) {
+               WIFI_LOG(WIFI_ERROR, "Not initialized");
                return WIFI_ERROR_INVALID_OPERATION;
        }
 
@@ -346,18 +403,22 @@ EXPORT_API int wifi_set_background_scan_cb(wifi_scan_finished_cb callback, void*
 
 EXPORT_API int wifi_unset_background_scan_cb(void)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        return _wifi_unset_background_scan_cb();
 }
 
 EXPORT_API int wifi_set_connection_state_changed_cb(wifi_connection_state_changed_cb callback, void* user_data)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (callback == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
-       if (is_init == false) {
-               WIFI_LOG(WIFI_ERROR, "Not initialized\n");
+       if (_wifi_is_init() == false) {
+               WIFI_LOG(WIFI_ERROR, "Not initialized");
                return WIFI_ERROR_INVALID_OPERATION;
        }
 
@@ -366,13 +427,17 @@ EXPORT_API int wifi_set_connection_state_changed_cb(wifi_connection_state_change
 
 EXPORT_API int wifi_unset_connection_state_changed_cb(void)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        return _wifi_unset_connection_state_cb();
 }
 
 EXPORT_API int wifi_set_rssi_level_changed_cb(wifi_rssi_level_changed_cb callback, void* user_data)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (callback == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
@@ -389,6 +454,8 @@ EXPORT_API int wifi_set_rssi_level_changed_cb(wifi_rssi_level_changed_cb callbac
 
 EXPORT_API int wifi_unset_rssi_level_changed_cb(void)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (rssi_level_changed_cb != NULL)
                vconf_ignore_key_changed(VCONFKEY_WIFI_STRENGTH, __rssi_level_changed_cb);
        else
old mode 100644 (file)
new mode 100755 (executable)
index c31cd4a..b68f297
  * limitations under the License.
  */
 
+#include <glib.h>
 #include <stdio.h>
 #include <string.h>
 #include <arpa/inet.h>
-#include <glib.h>
+
 #include "net_wifi_private.h"
 
 static char* __ap_convert_ip_to_string(net_addr_t *ip_addr)
@@ -45,6 +46,101 @@ static void __wifi_init_ap(net_profile_info_t *profile_info, const char *essid)
        g_strlcpy(profile_info->ProfileInfo.Wlan.essid, essid, NET_WLAN_ESSID_LEN+1);
 }
 
+static char *__wifi_create_profile_name(const char *ssid, const int net_mode, const int sec_mode)
+{
+       char *buf = NULL;
+       char *pbuf = NULL;
+       const char *hidden_str = "hidden";
+       char buf_tmp[32] = { 0, };
+       int i;
+       int ssid_len = 0;
+       int actual_len = 0;
+       const char *mode = "managed";
+       char *g_sec = NULL;
+
+       if (net_mode == NETPM_WLAN_CONNMODE_ADHOC) {
+               WIFI_LOG(WIFI_ERROR, "wlan_mode is adhoc");
+               return NULL;
+       }
+
+       switch (sec_mode) {
+       case WLAN_SEC_MODE_NONE:
+               g_sec = "none";
+               break;
+       case WLAN_SEC_MODE_WEP:
+               g_sec = "wep";
+               break;
+       case WLAN_SEC_MODE_WPA_PSK:
+       case WLAN_SEC_MODE_WPA2_PSK:
+               g_sec = "psk";
+               break;
+       case WLAN_SEC_MODE_IEEE8021X:
+               g_sec = "ieee8021x";
+               break;
+       default:
+               WIFI_LOG(WIFI_ERROR, "Invalid security type");
+               return NULL;
+       }
+
+       if (NULL != ssid) {
+               ssid_len = strlen(ssid);
+               actual_len = ssid_len * 2;
+       } else {
+               ssid_len = strlen(hidden_str);
+               actual_len = ssid_len;
+       }
+
+       buf = g_try_malloc0(actual_len + strlen(mode) + strlen(g_sec) + 3);
+       if (buf == NULL)
+               return NULL;
+
+       if (NULL != ssid) {
+               pbuf = buf;
+
+               for (i = 0; i < ssid_len; i++) {
+                       g_snprintf(pbuf, 3, "%02x", ssid[i]);
+                       pbuf += 2;
+               }
+       } else
+               g_strlcat(buf, hidden_str,
+                               actual_len + strlen(mode) + strlen(g_sec) + 3);
+
+       g_snprintf(buf_tmp, 32, "_%s_%s", mode, g_sec);
+       g_strlcat(buf, buf_tmp,
+                       actual_len + strlen(mode) + strlen(g_sec) + 3);
+
+       WIFI_LOG(WIFI_INFO, "Profile name: %s", buf);
+
+       return buf;
+}
+
+static bool _wifi_set_profile_name_to_ap(net_profile_info_t *ap_info)
+{
+       char *profile_name = NULL;
+
+       if (ap_info == NULL) {
+               WIFI_LOG(WIFI_ERROR, "profile_info is NULL");
+               return false;
+       }
+
+       profile_name = __wifi_create_profile_name(
+                       ap_info->ProfileInfo.Wlan.is_hidden == TRUE ?
+                                       NULL : ap_info->ProfileInfo.Wlan.essid,
+                       ap_info->ProfileInfo.Wlan.wlan_mode,
+                       ap_info->ProfileInfo.Wlan.security_info.sec_mode);
+       if (profile_name == NULL) {
+               WIFI_LOG(WIFI_ERROR, "Failed to make a group name");
+               return false;
+       }
+
+       g_strlcpy(ap_info->ProfileInfo.Wlan.net_info.ProfileName,
+                       profile_name, NET_PROFILE_NAME_LEN_MAX);
+
+       g_free(profile_name);
+
+       return true;
+}
+
 wifi_connection_state_e _wifi_convert_to_ap_state(net_state_type_t state)
 {
        wifi_connection_state_e ap_state;
@@ -54,8 +150,10 @@ wifi_connection_state_e _wifi_convert_to_ap_state(net_state_type_t state)
        case NET_STATE_TYPE_READY:
                ap_state = WIFI_CONNECTION_STATE_CONNECTED;
                break;
-       case NET_STATE_TYPE_IDLE:
        case NET_STATE_TYPE_FAILURE:
+               ap_state = WIFI_CONNECTION_STATE_FAILURE;
+               break;
+       case NET_STATE_TYPE_IDLE:
        case NET_STATE_TYPE_DISCONNECT:
                ap_state = WIFI_CONNECTION_STATE_DISCONNECTED;
                break;
@@ -67,6 +165,7 @@ wifi_connection_state_e _wifi_convert_to_ap_state(net_state_type_t state)
                break;
        default:
                ap_state = -1;
+               break;
        }
 
        return ap_state;
@@ -75,8 +174,10 @@ wifi_connection_state_e _wifi_convert_to_ap_state(net_state_type_t state)
 /* Wi-Fi AP ******************************************************************/
 EXPORT_API int wifi_ap_create(const char* essid, wifi_ap_h* ap)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (essid == NULL || ap == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
@@ -92,10 +193,34 @@ EXPORT_API int wifi_ap_create(const char* essid, wifi_ap_h* ap)
        return WIFI_ERROR_NONE;
 }
 
+EXPORT_API int wifi_ap_hidden_create(const char* essid, wifi_ap_h* ap)
+{
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
+       if (essid == NULL || ap == NULL) {
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
+               return WIFI_ERROR_INVALID_PARAMETER;
+       }
+
+       net_profile_info_t *ap_info = g_try_malloc0(sizeof(net_profile_info_t));
+       if (ap_info == NULL)
+               return WIFI_ERROR_OUT_OF_MEMORY;
+
+       __wifi_init_ap(ap_info, essid);
+       ap_info->ProfileInfo.Wlan.is_hidden = TRUE;
+
+       _wifi_libnet_add_to_ap_list((wifi_ap_h)ap_info);
+       *ap = (wifi_ap_h)ap_info;
+
+       return WIFI_ERROR_NONE;
+}
+
 EXPORT_API int wifi_ap_destroy(wifi_ap_h ap)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
@@ -106,8 +231,10 @@ EXPORT_API int wifi_ap_destroy(wifi_ap_h ap)
 
 EXPORT_API int wifi_ap_clone(wifi_ap_h* cloned_ap, wifi_ap_h origin)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(origin) == false || cloned_ap == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
@@ -125,11 +252,23 @@ EXPORT_API int wifi_ap_clone(wifi_ap_h* cloned_ap, wifi_ap_h origin)
 
 EXPORT_API int wifi_ap_refresh(wifi_ap_h ap)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        net_profile_info_t ap_info_local;
        net_profile_info_t *ap_info = ap;
 
-       if (net_get_profile_info(ap_info->ProfileName, &ap_info_local) != NET_ERR_NONE) {
-               WIFI_LOG(WIFI_ERROR, "Error!!! net_get_profile_info() failed\n");
+       if (_wifi_libnet_check_ap_validity(ap) == false) {
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
+               return WIFI_ERROR_INVALID_PARAMETER;
+       }
+
+       int rv = NET_ERR_NONE;
+       rv = net_get_profile_info(ap_info->ProfileName, &ap_info_local);
+       if (rv == NET_ERR_ACCESS_DENIED) {
+               WIFI_LOG(WIFI_ERROR, "Access denied");
+               return WIFI_ERROR_PERMISSION_DENIED;
+       } else if (rv != NET_ERR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Failed to getprofile_info");
                return WIFI_ERROR_OPERATION_FAILED;
        }
 
@@ -141,8 +280,10 @@ EXPORT_API int wifi_ap_refresh(wifi_ap_h ap)
 /* Wi-Fi network information *************************************************/
 EXPORT_API int wifi_ap_get_essid(wifi_ap_h ap, char** essid)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false || essid == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
@@ -156,8 +297,10 @@ EXPORT_API int wifi_ap_get_essid(wifi_ap_h ap, char** essid)
 
 EXPORT_API int wifi_ap_get_bssid(wifi_ap_h ap, char** bssid)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false || bssid == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
@@ -171,21 +314,25 @@ EXPORT_API int wifi_ap_get_bssid(wifi_ap_h ap, char** bssid)
 
 EXPORT_API int wifi_ap_get_rssi(wifi_ap_h ap, int* rssi)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false || rssi == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
        net_profile_info_t *profile_info = ap;
-       *rssi = (int)profile_info->ProfileInfo.Wlan.Strength;
+       *rssi = (int)(profile_info->ProfileInfo.Wlan.Strength - 120);
 
        return WIFI_ERROR_NONE;
 }
 
 EXPORT_API int wifi_ap_get_frequency(wifi_ap_h ap, int* frequency)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false || frequency == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
@@ -197,8 +344,10 @@ EXPORT_API int wifi_ap_get_frequency(wifi_ap_h ap, int* frequency)
 
 EXPORT_API int wifi_ap_get_max_speed(wifi_ap_h ap, int* max_speed)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false || max_speed == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
@@ -210,8 +359,10 @@ EXPORT_API int wifi_ap_get_max_speed(wifi_ap_h ap, int* max_speed)
 
 EXPORT_API int wifi_ap_is_favorite(wifi_ap_h ap, bool* favorite)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false || favorite == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
@@ -225,10 +376,31 @@ EXPORT_API int wifi_ap_is_favorite(wifi_ap_h ap, bool* favorite)
        return WIFI_ERROR_NONE;
 }
 
+EXPORT_API int wifi_ap_is_passpoint(wifi_ap_h ap, bool* passpoint)
+{
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
+       if (_wifi_libnet_check_ap_validity(ap) == false || passpoint == NULL) {
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
+               return WIFI_ERROR_INVALID_PARAMETER;
+       }
+
+       net_profile_info_t *profile_info = ap;
+
+       if (profile_info->ProfileInfo.Wlan.passpoint)
+               *passpoint = true;
+       else
+               *passpoint = false;
+
+       return WIFI_ERROR_NONE;
+}
+
 EXPORT_API int wifi_ap_get_connection_state(wifi_ap_h ap, wifi_connection_state_e* state)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false || state == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
@@ -244,16 +416,18 @@ EXPORT_API int wifi_ap_get_connection_state(wifi_ap_h ap, wifi_connection_state_
 
 EXPORT_API int wifi_ap_get_ip_config_type(wifi_ap_h ap, wifi_address_family_e address_family, wifi_ip_config_type_e* type)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false ||
            (address_family != WIFI_ADDRESS_FAMILY_IPV4 &&
             address_family != WIFI_ADDRESS_FAMILY_IPV6) ||
            type == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
        if (address_family == WIFI_ADDRESS_FAMILY_IPV6) {
-               WIFI_LOG(WIFI_ERROR, "Not supported yet\n");
+               WIFI_LOG(WIFI_ERROR, "Not supported yet");
                return WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED;
        }
 
@@ -284,15 +458,17 @@ EXPORT_API int wifi_ap_get_ip_config_type(wifi_ap_h ap, wifi_address_family_e ad
 
 EXPORT_API int wifi_ap_set_ip_config_type(wifi_ap_h ap, wifi_address_family_e address_family, wifi_ip_config_type_e type)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false ||
            (address_family != WIFI_ADDRESS_FAMILY_IPV4 &&
             address_family != WIFI_ADDRESS_FAMILY_IPV6)) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
        if (address_family == WIFI_ADDRESS_FAMILY_IPV6) {
-               WIFI_LOG(WIFI_ERROR, "Not supported yet\n");
+               WIFI_LOG(WIFI_ERROR, "Not supported yet");
                return WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED;
        }
 
@@ -326,16 +502,18 @@ EXPORT_API int wifi_ap_set_ip_config_type(wifi_ap_h ap, wifi_address_family_e ad
 
 EXPORT_API int wifi_ap_get_ip_address(wifi_ap_h ap, wifi_address_family_e address_family, char** ip_address)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false ||
            (address_family != WIFI_ADDRESS_FAMILY_IPV4 &&
             address_family != WIFI_ADDRESS_FAMILY_IPV6) ||
            ip_address == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
        if (address_family == WIFI_ADDRESS_FAMILY_IPV6) {
-               WIFI_LOG(WIFI_ERROR, "Not supported yet\n");
+               WIFI_LOG(WIFI_ERROR, "Not supported yet");
                return WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED;
        }
 
@@ -349,15 +527,17 @@ EXPORT_API int wifi_ap_get_ip_address(wifi_ap_h ap, wifi_address_family_e addres
 
 EXPORT_API int wifi_ap_set_ip_address(wifi_ap_h ap, wifi_address_family_e address_family, const char* ip_address)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false ||
            (address_family != WIFI_ADDRESS_FAMILY_IPV4 &&
             address_family != WIFI_ADDRESS_FAMILY_IPV6)) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
        if (address_family == WIFI_ADDRESS_FAMILY_IPV6) {
-               WIFI_LOG(WIFI_ERROR, "Not supported yet\n");
+               WIFI_LOG(WIFI_ERROR, "Not supported yet");
                return WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED;
        }
 
@@ -376,16 +556,18 @@ EXPORT_API int wifi_ap_set_ip_address(wifi_ap_h ap, wifi_address_family_e addres
 
 EXPORT_API int wifi_ap_get_subnet_mask(wifi_ap_h ap, wifi_address_family_e address_family, char** subnet_mask)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false ||
            (address_family != WIFI_ADDRESS_FAMILY_IPV4 &&
             address_family != WIFI_ADDRESS_FAMILY_IPV6) ||
            subnet_mask == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
        if (address_family == WIFI_ADDRESS_FAMILY_IPV6) {
-               WIFI_LOG(WIFI_ERROR, "Not supported yet\n");
+               WIFI_LOG(WIFI_ERROR, "Not supported yet");
                return WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED;
        }
 
@@ -399,15 +581,17 @@ EXPORT_API int wifi_ap_get_subnet_mask(wifi_ap_h ap, wifi_address_family_e addre
 
 EXPORT_API int wifi_ap_set_subnet_mask(wifi_ap_h ap, wifi_address_family_e address_family, const char* subnet_mask)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false ||
            (address_family != WIFI_ADDRESS_FAMILY_IPV4 &&
             address_family != WIFI_ADDRESS_FAMILY_IPV6)) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
        if (address_family == WIFI_ADDRESS_FAMILY_IPV6) {
-               WIFI_LOG(WIFI_ERROR, "Not supported yet\n");
+               WIFI_LOG(WIFI_ERROR, "Not supported yet");
                return WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED;
        }
 
@@ -426,16 +610,18 @@ EXPORT_API int wifi_ap_set_subnet_mask(wifi_ap_h ap, wifi_address_family_e addre
 
 EXPORT_API int wifi_ap_get_gateway_address(wifi_ap_h ap, wifi_address_family_e address_family, char** gateway_address)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false ||
            (address_family != WIFI_ADDRESS_FAMILY_IPV4 &&
             address_family != WIFI_ADDRESS_FAMILY_IPV6) ||
            gateway_address == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
        if (address_family == WIFI_ADDRESS_FAMILY_IPV6) {
-               WIFI_LOG(WIFI_ERROR, "Not supported yet\n");
+               WIFI_LOG(WIFI_ERROR, "Not supported yet");
                return WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED;
        }
 
@@ -449,15 +635,17 @@ EXPORT_API int wifi_ap_get_gateway_address(wifi_ap_h ap, wifi_address_family_e a
 
 EXPORT_API int wifi_ap_set_gateway_address(wifi_ap_h ap, wifi_address_family_e address_family, const char* gateway_address)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false ||
            (address_family != WIFI_ADDRESS_FAMILY_IPV4 &&
             address_family != WIFI_ADDRESS_FAMILY_IPV6)) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
        if (address_family == WIFI_ADDRESS_FAMILY_IPV6) {
-               WIFI_LOG(WIFI_ERROR, "Not supported yet\n");
+               WIFI_LOG(WIFI_ERROR, "Not supported yet");
                return WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED;
        }
 
@@ -476,16 +664,18 @@ EXPORT_API int wifi_ap_set_gateway_address(wifi_ap_h ap, wifi_address_family_e a
 
 EXPORT_API int wifi_ap_get_proxy_address(wifi_ap_h ap, wifi_address_family_e address_family, char** proxy_address)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false ||
            (address_family != WIFI_ADDRESS_FAMILY_IPV4 &&
             address_family != WIFI_ADDRESS_FAMILY_IPV6) ||
            proxy_address == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
        if (address_family == WIFI_ADDRESS_FAMILY_IPV6) {
-               WIFI_LOG(WIFI_ERROR, "Not supported yet\n");
+               WIFI_LOG(WIFI_ERROR, "Not supported yet");
                return WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED;
        }
 
@@ -499,15 +689,17 @@ EXPORT_API int wifi_ap_get_proxy_address(wifi_ap_h ap, wifi_address_family_e add
 
 EXPORT_API int wifi_ap_set_proxy_address(wifi_ap_h ap, wifi_address_family_e address_family, const char* proxy_address)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false ||
            (address_family != WIFI_ADDRESS_FAMILY_IPV4 &&
             address_family != WIFI_ADDRESS_FAMILY_IPV6)) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
        if (address_family == WIFI_ADDRESS_FAMILY_IPV6) {
-               WIFI_LOG(WIFI_ERROR, "Not supported yet\n");
+               WIFI_LOG(WIFI_ERROR, "Not supported yet");
                return WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED;
        }
 
@@ -527,8 +719,10 @@ EXPORT_API int wifi_ap_set_proxy_address(wifi_ap_h ap, wifi_address_family_e add
 
 EXPORT_API int wifi_ap_get_proxy_type(wifi_ap_h ap, wifi_proxy_type_e* type)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false || type == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
@@ -556,8 +750,10 @@ EXPORT_API int wifi_ap_get_proxy_type(wifi_ap_h ap, wifi_proxy_type_e* type)
 
 EXPORT_API int wifi_ap_set_proxy_type(wifi_ap_h ap, wifi_proxy_type_e proxy_type)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
@@ -594,18 +790,20 @@ EXPORT_API int wifi_ap_set_proxy_type(wifi_ap_h ap, wifi_proxy_type_e proxy_type
 
 EXPORT_API int wifi_ap_get_dns_address(wifi_ap_h ap, int order, wifi_address_family_e address_family, char** dns_address)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false ||
            (address_family != WIFI_ADDRESS_FAMILY_IPV4 &&
             address_family != WIFI_ADDRESS_FAMILY_IPV6) ||
            dns_address == NULL ||
            order <= 0 ||
            order > NET_DNS_ADDR_MAX) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
        if (address_family == WIFI_ADDRESS_FAMILY_IPV6) {
-               WIFI_LOG(WIFI_ERROR, "Not supported yet\n");
+               WIFI_LOG(WIFI_ERROR, "Not supported yet");
                return WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED;
        }
 
@@ -620,17 +818,19 @@ EXPORT_API int wifi_ap_get_dns_address(wifi_ap_h ap, int order, wifi_address_fam
 
 EXPORT_API int wifi_ap_set_dns_address(wifi_ap_h ap, int order, wifi_address_family_e address_family, const char* dns_address)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false ||
            (address_family != WIFI_ADDRESS_FAMILY_IPV4 &&
             address_family != WIFI_ADDRESS_FAMILY_IPV6) ||
            order <= 0 ||
            order > NET_DNS_ADDR_MAX) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
        if (address_family == WIFI_ADDRESS_FAMILY_IPV6) {
-               WIFI_LOG(WIFI_ERROR, "Not supported yet\n");
+               WIFI_LOG(WIFI_ERROR, "Not supported yet");
                return WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED;
        }
 
@@ -653,8 +853,10 @@ EXPORT_API int wifi_ap_set_dns_address(wifi_ap_h ap, int order, wifi_address_fam
 /* Wi-Fi security information ************************************************/
 EXPORT_API int wifi_ap_get_security_type(wifi_ap_h ap, wifi_security_type_e* type)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false || type == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
@@ -685,8 +887,10 @@ EXPORT_API int wifi_ap_get_security_type(wifi_ap_h ap, wifi_security_type_e* typ
 
 EXPORT_API int wifi_ap_set_security_type(wifi_ap_h ap, wifi_security_type_e type)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
@@ -712,13 +916,17 @@ EXPORT_API int wifi_ap_set_security_type(wifi_ap_h ap, wifi_security_type_e type
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
+       _wifi_set_profile_name_to_ap(profile_info);
+
        return WIFI_ERROR_NONE;
 }
 
 EXPORT_API int wifi_ap_get_encryption_type(wifi_ap_h ap, wifi_encryption_type_e* type)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false || type == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
@@ -749,8 +957,10 @@ EXPORT_API int wifi_ap_get_encryption_type(wifi_ap_h ap, wifi_encryption_type_e*
 
 EXPORT_API int wifi_ap_set_encryption_type(wifi_ap_h ap, wifi_encryption_type_e type)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
@@ -781,8 +991,10 @@ EXPORT_API int wifi_ap_set_encryption_type(wifi_ap_h ap, wifi_encryption_type_e
 
 EXPORT_API int wifi_ap_is_passphrase_required(wifi_ap_h ap, bool* required)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false || required == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
@@ -812,8 +1024,10 @@ EXPORT_API int wifi_ap_is_passphrase_required(wifi_ap_h ap, bool* required)
 
 EXPORT_API int wifi_ap_set_passphrase(wifi_ap_h ap, const char* passphrase)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false || passphrase == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
@@ -840,8 +1054,10 @@ EXPORT_API int wifi_ap_set_passphrase(wifi_ap_h ap, const char* passphrase)
 
 EXPORT_API int wifi_ap_is_wps_supported(wifi_ap_h ap, bool* supported)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false || supported == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
@@ -858,8 +1074,10 @@ EXPORT_API int wifi_ap_is_wps_supported(wifi_ap_h ap, bool* supported)
 /* Wi-Fi EAP *****************************************************************/
 EXPORT_API int wifi_ap_set_eap_passphrase(wifi_ap_h ap, const char* user_name, const char* password)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false || (user_name == NULL && password == NULL)) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
@@ -880,8 +1098,10 @@ EXPORT_API int wifi_ap_set_eap_passphrase(wifi_ap_h ap, const char* user_name, c
 
 EXPORT_API int wifi_ap_get_eap_passphrase(wifi_ap_h ap, char** user_name, bool* is_password_set)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false ||user_name == NULL || is_password_set == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
@@ -904,12 +1124,16 @@ EXPORT_API int wifi_ap_get_eap_passphrase(wifi_ap_h ap, char** user_name, bool*
 
 EXPORT_API int wifi_ap_get_eap_ca_cert_file(wifi_ap_h ap, char** file)
 {
+       net_profile_info_t *profile_info = NULL;
+
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false || file == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
-       net_profile_info_t *profile_info = ap;
+       profile_info = (net_profile_info_t *)ap;
        if (profile_info->ProfileInfo.Wlan.security_info.sec_mode != WLAN_SEC_MODE_IEEE8021X)
                return WIFI_ERROR_INVALID_OPERATION;
 
@@ -922,12 +1146,16 @@ EXPORT_API int wifi_ap_get_eap_ca_cert_file(wifi_ap_h ap, char** file)
 
 EXPORT_API int wifi_ap_set_eap_ca_cert_file(wifi_ap_h ap, const char* file)
 {
+       net_profile_info_t *profile_info = NULL;
+
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false || file == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
-       net_profile_info_t *profile_info = ap;
+       profile_info = (net_profile_info_t *)ap;
        if (profile_info->ProfileInfo.Wlan.security_info.sec_mode != WLAN_SEC_MODE_IEEE8021X)
                return WIFI_ERROR_INVALID_OPERATION;
 
@@ -939,12 +1167,16 @@ EXPORT_API int wifi_ap_set_eap_ca_cert_file(wifi_ap_h ap, const char* file)
 
 EXPORT_API int wifi_ap_get_eap_client_cert_file(wifi_ap_h ap, char** file)
 {
+       net_profile_info_t *profile_info = NULL;
+
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false || file == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
-       net_profile_info_t *profile_info = ap;
+       profile_info = (net_profile_info_t *)ap;
        if (profile_info->ProfileInfo.Wlan.security_info.sec_mode != WLAN_SEC_MODE_IEEE8021X)
                return WIFI_ERROR_INVALID_OPERATION;
 
@@ -957,12 +1189,16 @@ EXPORT_API int wifi_ap_get_eap_client_cert_file(wifi_ap_h ap, char** file)
 
 EXPORT_API int wifi_ap_set_eap_client_cert_file(wifi_ap_h ap, const char* file)
 {
+       net_profile_info_t *profile_info = NULL;
+
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false || file == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
-       net_profile_info_t *profile_info = ap;
+       profile_info = (net_profile_info_t *)ap;
        if (profile_info->ProfileInfo.Wlan.security_info.sec_mode != WLAN_SEC_MODE_IEEE8021X)
                return WIFI_ERROR_INVALID_OPERATION;
 
@@ -974,8 +1210,10 @@ EXPORT_API int wifi_ap_set_eap_client_cert_file(wifi_ap_h ap, const char* file)
 
 EXPORT_API int wifi_ap_get_eap_private_key_file(wifi_ap_h ap, char** file)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false || file == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
@@ -992,8 +1230,10 @@ EXPORT_API int wifi_ap_get_eap_private_key_file(wifi_ap_h ap, char** file)
 
 EXPORT_API int wifi_ap_set_eap_private_key_info(wifi_ap_h ap, const char* file, const char* password)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false || file == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
@@ -1014,8 +1254,10 @@ EXPORT_API int wifi_ap_set_eap_private_key_info(wifi_ap_h ap, const char* file,
 
 EXPORT_API int wifi_ap_get_eap_type(wifi_ap_h ap, wifi_eap_type_e* type)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false || type == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
@@ -1048,8 +1290,10 @@ EXPORT_API int wifi_ap_get_eap_type(wifi_ap_h ap, wifi_eap_type_e* type)
 
 EXPORT_API int wifi_ap_set_eap_type(wifi_ap_h ap, wifi_eap_type_e type)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
@@ -1082,8 +1326,10 @@ EXPORT_API int wifi_ap_set_eap_type(wifi_ap_h ap, wifi_eap_type_e type)
 
 EXPORT_API int wifi_ap_get_eap_auth_type(wifi_ap_h ap, wifi_eap_auth_type_e* type)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false || type == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
@@ -1119,8 +1365,10 @@ EXPORT_API int wifi_ap_get_eap_auth_type(wifi_ap_h ap, wifi_eap_auth_type_e* typ
 
 EXPORT_API int wifi_ap_set_eap_auth_type(wifi_ap_h ap, wifi_eap_auth_type_e type)
 {
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        if (_wifi_libnet_check_ap_validity(ap) == false) {
-               WIFI_LOG(WIFI_ERROR, "Wrong Parameter Passed\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                return WIFI_ERROR_INVALID_PARAMETER;
        }
 
index 7f2f801..b8e9c34 100644 (file)
@@ -1,6 +1,9 @@
+PROJECT(wifi_test C)
+
 SET(fw_test "${fw_name}-test")
 
 SET(dependents "capi-base-common glib-2.0 network")
+SET(pc_dependents "capi-base-common")
 
 INCLUDE(FindPkgConfig)
 pkg_check_modules(${fw_test} REQUIRED ${dependents})
@@ -17,3 +20,5 @@ FOREACH(src ${sources})
     ADD_EXECUTABLE(${src_name} ${src})
     TARGET_LINK_LIBRARIES(${src_name} ${fw_name} ${${fw_test}_LDFLAGS})
 ENDFOREACH()
+
+INSTALL(TARGETS wifi_test RUNTIME DESTINATION bin/)
old mode 100644 (file)
new mode 100755 (executable)
index 2ed97a9..f065563
@@ -64,6 +64,10 @@ static const char *__test_convert_error_to_string(wifi_error_e err_type)
                return "NO_REPLY";
        case WIFI_ERROR_SECURITY_RESTRICTED:
                return "SECURITY_RESTRICTED";
+       case WIFI_ERROR_PERMISSION_DENIED:
+               return "PERMISSION_DENIED";
+       case WIFI_ERROR_NOT_SUPPORTED:
+               return "NOT_SUPPORTED";
        }
 
        return "UNKNOWN";
@@ -91,46 +95,6 @@ static void __test_scan_request_callback(wifi_error_e error_code, void* user_dat
                        __test_convert_error_to_string(error_code));
 }
 
-static bool __test_found_hidden_aps_callback(wifi_ap_h ap, void *user_data)
-{
-       int rv;
-       char *ap_name;
-       wifi_security_type_e sec_type;
-
-       rv = wifi_ap_get_essid(ap, &ap_name);
-       if (rv != WIFI_ERROR_NONE) {
-               printf("Fail to get AP name [%s]\n", __test_convert_error_to_string(rv));
-               return false;
-       }
-
-       printf("AP name : %s\n", ap_name);
-
-       if (wifi_ap_get_security_type(ap, &sec_type) == WIFI_ERROR_NONE)
-               printf("Security type : %d\n", sec_type);
-       else
-               printf("Fail to get Security type\n");
-
-       g_free(ap_name);
-       return true;
-}
-
-static void __test_scan_hidden_ap_callback(wifi_error_e error_code, void* user_data)
-{
-       int rv;
-
-       printf("Hidden scan Completed from scan request, error code : %s\n",
-                       __test_convert_error_to_string(error_code));
-
-       if (error_code != WIFI_ERROR_NONE)
-               return;
-
-       rv = wifi_foreach_found_hidden_aps(__test_found_hidden_aps_callback, NULL);
-       if (rv != WIFI_ERROR_NONE) {
-               printf("Fail to get hidden AP(can't get AP list) [%s]\n", __test_convert_error_to_string(rv));
-               return;
-       }
-}
-
 static void __test_connection_state_callback(wifi_connection_state_e state, wifi_ap_h ap, void* user_data)
 {
        int rv = 0;
@@ -204,6 +168,8 @@ static void __test_rssi_level_callback(wifi_rssi_level_e rssi_level, void* user_
 static const char* __test_print_state(wifi_connection_state_e state)
 {
        switch (state) {
+       case WIFI_CONNECTION_STATE_FAILURE:
+               return "Failure";
        case WIFI_CONNECTION_STATE_DISCONNECTED:
                return "Disconnected";
        case WIFI_CONNECTION_STATE_ASSOCIATION:
@@ -256,7 +222,11 @@ static bool __test_found_connect_ap_callback(wifi_ap_h ap, void *user_data)
 
        if (strstr(ap_name, ap_name_part) != NULL) {
                bool required = false;
-               wifi_ap_is_passphrase_required(ap, &required);
+
+               if (wifi_ap_is_passphrase_required(ap, &required) == WIFI_ERROR_NONE)
+                       printf("Passphrase required : %s\n", required ? "TRUE" : "FALSE");
+               else
+                       printf("Fail to get Passphrase required\n");
 
                if (required) {
                        char passphrase[100];
@@ -379,8 +349,12 @@ static bool __test_found_eap_ap_callback(wifi_ap_h ap, void *user_data)
        }
 
        if (strstr(ap_name, ap_name_part) != NULL) {
-               wifi_security_type_e type;;
-               wifi_ap_get_security_type(ap, &type);
+               wifi_security_type_e type;
+
+               if (wifi_ap_get_security_type(ap, &type) == WIFI_ERROR_NONE)
+                       printf("Security type : %d\n", type);
+               else
+                       printf("Fail to get Security type\n");
 
                if (type != WIFI_SECURITY_TYPE_EAP) {
                        g_free(ap_name);
@@ -1186,27 +1160,6 @@ int test_get_ap_info(void)
        return 1;
 }
 
-int test_scan_hidden_ap(void)
-{
-       int rv;
-       char ap_name[33];
-
-       printf("Input a part of hidden AP name to find : ");
-       rv = scanf("%32s", ap_name);
-       if (rv <= 0)
-               return -1;
-
-       rv = wifi_scan_hidden_ap(ap_name, __test_scan_hidden_ap_callback, NULL);
-
-       if (rv != WIFI_ERROR_NONE) {
-               printf("Scan request failed [%s]\n", __test_convert_error_to_string(rv));
-               return -1;
-       }
-
-       printf("Scan hidden AP succeeded\n");
-       return 1;
-}
-
 int main(int argc, char **argv)
 {
        GMainLoop *mainloop;
@@ -1261,8 +1214,7 @@ gboolean test_thread(GIOChannel *source, GIOCondition condition, gpointer data)
                printf("g       - Set & connect EAP\n");
                printf("h       - Set IP method type\n");
                printf("i       - Set Proxy method type\n");
-               printf("j       - Get AP info\n");
-               printf("k       - Scan hidden AP\n");
+               printf("j       - Get Ap info\n");
                printf("0       - Exit \n");
 
                printf("ENTER  - Show options menu.......\n");
@@ -1326,9 +1278,6 @@ gboolean test_thread(GIOChannel *source, GIOCondition condition, gpointer data)
        case 'j':
                rv = test_get_ap_info();
                break;
-       case 'k':
-               rv = test_scan_hidden_ap();
-               break;
        default:
                break;
        }
@@ -1336,7 +1285,7 @@ gboolean test_thread(GIOChannel *source, GIOCondition condition, gpointer data)
        if (rv == 1)
                printf("Operation succeeded!\n");
        else
-               printf("Operation filed!\n");
+               printf("Operation failed!\n");
 
        return TRUE;
 }