apply FSL(Flora Software License)
authorKim Kibum <kb0929.kim@samsung.com>
Fri, 8 Jun 2012 05:54:13 +0000 (14:54 +0900)
committerKim Kibum <kb0929.kim@samsung.com>
Fri, 8 Jun 2012 05:54:13 +0000 (14:54 +0900)
126 files changed:
AUTHORS [new file with mode: 0644]
CMakeLists.txt [new file with mode: 0644]
LICENSE [new file with mode: 0644]
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/dirs [new file with mode: 0644]
debian/docs [new file with mode: 0644]
debian/net.wifi-qs.install.in [new file with mode: 0644]
debian/net.wifi-qs.postinst [new file with mode: 0644]
debian/rules [new file with mode: 0755]
debian/wifi-efl-ug.install.in [new file with mode: 0644]
debian/wifi-efl-ug.postinst [new file with mode: 0644]
packaging/wifi-efl-ug.spec [new file with mode: 0644]
resources/images/01_controlbar_icon_delete.png [new file with mode: 0644]
resources/images/01_controlbar_icon_edit.png [new file with mode: 0644]
resources/images/01_controlbar_icon_update.png [new file with mode: 0644]
resources/images/37_wifi_icon_00.png [new file with mode: 0644]
resources/images/37_wifi_icon_01.png [new file with mode: 0644]
resources/images/37_wifi_icon_02.png [new file with mode: 0644]
resources/images/37_wifi_icon_03.png [new file with mode: 0644]
resources/images/37_wifi_icon_WPS.png [new file with mode: 0644]
resources/images/37_wifi_icon_WPS_support AP.png [new file with mode: 0644]
resources/images/37_wifi_icon_WPS_support AP_press.png [new file with mode: 0644]
resources/images/37_wifi_icon_lock_00.png [new file with mode: 0644]
resources/images/37_wifi_icon_lock_01.png [new file with mode: 0644]
resources/images/37_wifi_icon_lock_02.png [new file with mode: 0644]
resources/images/37_wifi_icon_lock_03.png [new file with mode: 0644]
resources/images/37_wifi_icon_searched_00.png [new file with mode: 0644]
resources/images/37_wifi_icon_searched_01.png [new file with mode: 0644]
resources/images/37_wifi_icon_searched_02.png [new file with mode: 0644]
resources/images/37_wifi_icon_searched_03.png [new file with mode: 0644]
resources/images/37_wifi_icon_searched_lock_00.png [new file with mode: 0644]
resources/images/37_wifi_icon_searched_lock_01.png [new file with mode: 0644]
resources/images/37_wifi_icon_searched_lock_02.png [new file with mode: 0644]
resources/images/37_wifi_icon_searched_lock_03.png [new file with mode: 0644]
sources/libraries/Common/include/common.h [new file with mode: 0644]
sources/libraries/WlanManager/EngineManager/connman-profile-manager.c [new file with mode: 0644]
sources/libraries/WlanManager/EngineManager/connman-request.c [new file with mode: 0644]
sources/libraries/WlanManager/EngineManager/connman-response.c [new file with mode: 0644]
sources/libraries/WlanManager/EngineManager/include/connman-profile-manager.h [new file with mode: 0644]
sources/libraries/WlanManager/EngineManager/include/connman-request.h [new file with mode: 0644]
sources/libraries/WlanManager/EngineManager/include/connman-response.h [new file with mode: 0644]
sources/libraries/WlanManager/wlan-manager/include/wlan_manager.h [new file with mode: 0644]
sources/libraries/WlanManager/wlan-manager/wlan_manager.c [new file with mode: 0644]
sources/libraries/appcoreWrapper/appcoreWrapper.c [new file with mode: 0644]
sources/libraries/appcoreWrapper/include/appcoreWrapper.h [new file with mode: 0644]
sources/libraries/i18nManager/i18nmanager.c [new file with mode: 0644]
sources/libraries/i18nManager/include/i18nmanager.h [new file with mode: 0644]
sources/libraries/settingWrapper/include/wifi-setting.h [new file with mode: 0644]
sources/libraries/settingWrapper/wifi-setting.c [new file with mode: 0644]
sources/ui-gadget/CMakeLists.txt [new file with mode: 0644]
sources/ui-gadget/edcs/wifi_ug_edj_etc.edc [new file with mode: 0644]
sources/ui-gadget/include/viewer_list.h [new file with mode: 0644]
sources/ui-gadget/include/viewer_manager.h [new file with mode: 0644]
sources/ui-gadget/include/wifi-engine-callback.h [new file with mode: 0644]
sources/ui-gadget/include/wifi-ui-list-callbacks.h [new file with mode: 0644]
sources/ui-gadget/include/wifi.h [new file with mode: 0644]
sources/ui-gadget/po/CMakeLists.txt [new file with mode: 0644]
sources/ui-gadget/po/POTFILES.in [new file with mode: 0644]
sources/ui-gadget/po/de_DE.po [new file with mode: 0644]
sources/ui-gadget/po/el_GR.po [new file with mode: 0644]
sources/ui-gadget/po/en.po [new file with mode: 0644]
sources/ui-gadget/po/es_ES.po [new file with mode: 0644]
sources/ui-gadget/po/fr_FR.po [new file with mode: 0644]
sources/ui-gadget/po/it_IT.po [new file with mode: 0644]
sources/ui-gadget/po/ja_JP.po [new file with mode: 0644]
sources/ui-gadget/po/ko_KR.po [new file with mode: 0644]
sources/ui-gadget/po/nl_NL.po [new file with mode: 0644]
sources/ui-gadget/po/pt_PT.po [new file with mode: 0644]
sources/ui-gadget/po/ru_RU.po [new file with mode: 0644]
sources/ui-gadget/po/tr_TR.po [new file with mode: 0644]
sources/ui-gadget/po/update-po.sh [new file with mode: 0755]
sources/ui-gadget/po/zh_CN.po [new file with mode: 0644]
sources/ui-gadget/po/zh_HK.po [new file with mode: 0644]
sources/ui-gadget/po/zh_TW.po [new file with mode: 0644]
sources/ui-gadget/viewers-layout/include/popup.h [new file with mode: 0644]
sources/ui-gadget/viewers-layout/include/view_detail.h [new file with mode: 0644]
sources/ui-gadget/viewers-layout/include/view_detail_datamodel.h [new file with mode: 0644]
sources/ui-gadget/viewers-layout/include/view_dhcpip.h [new file with mode: 0644]
sources/ui-gadget/viewers-layout/include/view_eap.h [new file with mode: 0644]
sources/ui-gadget/viewers-layout/include/view_ime_hidden.h [new file with mode: 0644]
sources/ui-gadget/viewers-layout/include/view_ime_password.h [new file with mode: 0644]
sources/ui-gadget/viewers-layout/include/view_staticip.h [new file with mode: 0644]
sources/ui-gadget/viewers-layout/popup.c [new file with mode: 0644]
sources/ui-gadget/viewers-layout/view_detail.c [new file with mode: 0644]
sources/ui-gadget/viewers-layout/view_detail_datamodel.c [new file with mode: 0644]
sources/ui-gadget/viewers-layout/view_dhcpip.c [new file with mode: 0644]
sources/ui-gadget/viewers-layout/view_eap.c [new file with mode: 0644]
sources/ui-gadget/viewers-layout/view_ime_hidden.c [new file with mode: 0644]
sources/ui-gadget/viewers-layout/view_ime_password.c [new file with mode: 0644]
sources/ui-gadget/viewers-layout/view_staticip.c [new file with mode: 0644]
sources/ui-gadget/viewers-layout/viewer_manager.c [new file with mode: 0644]
sources/ui-gadget/viewers-layout/wifi_viewer_list.c [new file with mode: 0644]
sources/ui-gadget/wifi-efl-UG.c [new file with mode: 0644]
sources/ui-gadget/wifi-ui-list-callbacks.c [new file with mode: 0644]
sources/ui-gadget/wifi-wlan-callbacks.c [new file with mode: 0644]
sources/wifi-syspopup/CMakeLists.txt [new file with mode: 0644]
sources/wifi-syspopup/include/wifi-syspopup-engine-callback.h [new file with mode: 0644]
sources/wifi-syspopup/include/wifi-syspopup.h [new file with mode: 0644]
sources/wifi-syspopup/net.wifi-qs.desktop.in [new file with mode: 0644]
sources/wifi-syspopup/po/CMakeLists.txt [new file with mode: 0644]
sources/wifi-syspopup/po/de_DE.po [new file with mode: 0644]
sources/wifi-syspopup/po/el_GR.po [new file with mode: 0644]
sources/wifi-syspopup/po/en.po [new file with mode: 0644]
sources/wifi-syspopup/po/es_ES.po [new file with mode: 0644]
sources/wifi-syspopup/po/fr_FR.po [new file with mode: 0644]
sources/wifi-syspopup/po/it_IT.po [new file with mode: 0644]
sources/wifi-syspopup/po/ja_JP.po [new file with mode: 0644]
sources/wifi-syspopup/po/ko_KR.po [new file with mode: 0644]
sources/wifi-syspopup/po/nl_NL.po [new file with mode: 0644]
sources/wifi-syspopup/po/pt_PT.po [new file with mode: 0644]
sources/wifi-syspopup/po/ru_RU.po [new file with mode: 0644]
sources/wifi-syspopup/po/tr_TR.po [new file with mode: 0644]
sources/wifi-syspopup/po/zh_CN.po [new file with mode: 0644]
sources/wifi-syspopup/po/zh_HK.po [new file with mode: 0644]
sources/wifi-syspopup/po/zh_TW.po [new file with mode: 0644]
sources/wifi-syspopup/viewer-popups/include/view-alerts.h [new file with mode: 0644]
sources/wifi-syspopup/viewer-popups/include/view-main.h [new file with mode: 0644]
sources/wifi-syspopup/viewer-popups/include/view-password.h [new file with mode: 0644]
sources/wifi-syspopup/viewer-popups/view-alerts.c [new file with mode: 0644]
sources/wifi-syspopup/viewer-popups/view-main.c [new file with mode: 0644]
sources/wifi-syspopup/viewer-popups/view-password.c [new file with mode: 0644]
sources/wifi-syspopup/wifi-qs.ini [new file with mode: 0644]
sources/wifi-syspopup/wifi-syspopup-engine-callback.c [new file with mode: 0644]
sources/wifi-syspopup/wifi-syspopup.c [new file with mode: 0644]

diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..3dbf984
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,2 @@
+Sanghoon Cho <sanghoon80.cho@samsung.com>\r
+Jeongseok Seo <s.seo@samsung.com>\r
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..05ccddc
--- /dev/null
@@ -0,0 +1,55 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+SET(ENGINE_SOURCES 
+                               ${CMAKE_CURRENT_SOURCE_DIR}/sources/libraries/WlanManager/EngineManager/connman-request.c
+                               ${CMAKE_CURRENT_SOURCE_DIR}/sources/libraries/WlanManager/EngineManager/connman-response.c
+                               ${CMAKE_CURRENT_SOURCE_DIR}/sources/libraries/WlanManager/EngineManager/connman-profile-manager.c)
+
+SET(ENGINE_INCLUDES 
+                               ${CMAKE_CURRENT_SOURCE_DIR}/sources/libraries/WlanManager/EngineManager/include) #connman
+
+SET(ENGINE_PKGCONFIGS 
+                               network)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED 
+               ecore
+               ecore-imf
+               ecore-input
+               appcore-efl 
+               elementary 
+               glib-2.0 
+               utilX 
+               ui-gadget 
+               x11 
+               sensor
+               syspopup
+               syspopup-caller
+#engine pkgconfigs
+               ${ENGINE_PKGCONFIGS})
+
+INCLUDE_DIRECTORIES(
+               ${CMAKE_CURRENT_SOURCE_DIR}/sources/ui-gadget/include 
+               ${CMAKE_CURRENT_SOURCE_DIR}/sources/ui-gadget/viewers-layout/include 
+               ${CMAKE_CURRENT_SOURCE_DIR}/sources/wifi-syspopup/include 
+               ${CMAKE_CURRENT_SOURCE_DIR}/sources/wifi-syspopup/viewer-popups/include 
+               ${CMAKE_CURRENT_SOURCE_DIR}/sources/libraries/Common/include
+               ${CMAKE_CURRENT_SOURCE_DIR}/sources/libraries/WlanManager/wlan-manager/include 
+               ${CMAKE_CURRENT_SOURCE_DIR}/sources/libraries/WlanManager/profile-manager/include 
+               ${CMAKE_CURRENT_SOURCE_DIR}/sources/libraries/gestureManager/include 
+               ${CMAKE_CURRENT_SOURCE_DIR}/sources/libraries/appcoreWrapper/include 
+               ${CMAKE_CURRENT_SOURCE_DIR}/sources/libraries/messageDispatcher/include 
+               ${CMAKE_CURRENT_SOURCE_DIR}/sources/libraries/ug-caller/include 
+               ${CMAKE_CURRENT_SOURCE_DIR}/sources/libraries/i18nManager/include 
+               ${CMAKE_CURRENT_SOURCE_DIR}/sources/libraries/LogManager/include 
+               ${CMAKE_CURRENT_SOURCE_DIR}/sources/libraries/settingWrapper/include 
+               ${CMAKE_CURRENT_SOURCE_DIR}/sources/libraries/mobileAPManager/include 
+
+#engine includes
+               ${ENGINE_INCLUDES})
+
+ADD_SUBDIRECTORY(sources/ui-gadget)
+ADD_SUBDIRECTORY(sources/wifi-syspopup)
+
+
diff --git a/LICENSE b/LICENSE
new file mode 100644 (file)
index 0000000..7ccb5b5
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,75 @@
+Flora License
+
+Version 1.0, May, 2012
+
+http://www.tizenopensource.org/license
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+"Tizen Certified Platform" shall mean a software platform that complies with the standards set forth in the Compatibility Definition Document and passes the Compatibility Test Suite as defined from time to time by the Tizen Technical Steering Group and certified by the Tizen Association or its designated agent.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work solely as incorporated into a Tizen Certified Platform, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work solely as incorporated into a Tizen Certified Platform to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof pursuant to the copyright license above, in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+  1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+  2. You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+  3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+  4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Flora License to your work
+
+To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..0955149
--- /dev/null
@@ -0,0 +1,8 @@
+wifi-efl-ug (0.4.26) unstable; urgency=low
+
+  * Update boiler plate
+  * Git: pkgs/s/sg-wifi-efl
+  * Tag: wifi-efl-ug_0.4.26
+
+ -- Sanghoon Cho <sanghoon80.cho@samsung.com>  Wed, 02 May 2012 17:14:46 +0900
+
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..7ed6ff8
--- /dev/null
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..56105fb
--- /dev/null
@@ -0,0 +1,46 @@
+Source: wifi-efl-ug
+Section: net
+Priority: extra
+Maintainer: Sanghoon Cho <sanghoon80.cho@samsung.com>, Danny Jeongseok Seo <s.seo@samsung.com>
+Uploaders: Sanghoon Cho <sanghoon80.cho@samsung.com>, Danny Jeongseok Seo <s.seo@samsung.com>
+Build-Depends:         debhelper (>= 5), 
+               libappcore-efl-dev, 
+               libelm-dev, 
+               libglib2.0-dev, 
+               libslp-utilx-dev, 
+               libslp-setting-dev, 
+               libui-gadget-dev, 
+               libedje-dev,
+               libslp-sensor-dev, 
+               libnetwork-dev,
+               syspopup-dev,
+               syspopup-caller-dev
+Standards-Version: 3.7.2
+
+Package: wifi-efl-ug
+Section: net
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Wi-Fi UI Gadget
+
+Package: wifi-efl-ug-dbg
+Section: net-debug
+Architecture: any
+Depends: wifi-efl-ug
+Description: Wi-Fi UI Gadget (dbg)
+
+Package: net.wifi-qs
+Section: application
+Architecture: any
+XB-Generate-Docs: no
+XB-Public-Package: no
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Wi-Fi System popup
+
+Package: net.wifi-qs-dbg
+Section: debug
+Architecture: any
+XB-Generate-Docs: no
+XB-Public-Package: no
+Depends: net.wifi-qs
+Description: Wi-Fi System popup (dbg)
diff --git a/debian/dirs b/debian/dirs
new file mode 100644 (file)
index 0000000..8b13789
--- /dev/null
@@ -0,0 +1 @@
+
diff --git a/debian/docs b/debian/docs
new file mode 100644 (file)
index 0000000..7a77580
--- /dev/null
@@ -0,0 +1,2 @@
+CMakeCache.txt
+CMakeLists.txt
diff --git a/debian/net.wifi-qs.install.in b/debian/net.wifi-qs.install.in
new file mode 100644 (file)
index 0000000..38d746e
--- /dev/null
@@ -0,0 +1,6 @@
+/usr/bin/wifi-qs
+/opt/share/applications/net.wifi-qs.desktop
+/usr/share/process-info/wifi-qs.ini
+/usr/share/icon/*
+/usr/share/locale/*
+
diff --git a/debian/net.wifi-qs.postinst b/debian/net.wifi-qs.postinst
new file mode 100644 (file)
index 0000000..837f41e
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+if [ ${USER} = "root" ]
+then
+       vconftool set -t int memory/wifi/wifi_qs_exit 0 -g 6519 -i
+       vconftool set -t int db/wifi/enable_quick_start 1 -g 6519 -i
+
+       
+       # Change file owner
+       # 1. libraries
+       # 2. executables
+#      chown 5000:5000 /usr/bin/wifi-qs
+       # 3. configurations
+#      chown 5000:5000 /usr/share/edje/wifi-qs*
+#      chown 5000:5000 /usr/share/locale/en_GB/LC_MESSAGES/wifi.mo
+#        chown 5000:5000 /usr/share/locale/en_US/LC_MESSAGES/wifi.mo
+#        chown 5000:5000 /usr/share/locale/ja/LC_MESSAGES/wifi.mo
+#        chown 5000:5000 /usr/share/locale/ko/LC_MESSAGES/wifi.mo
+#        chown 5000:5000 /usr/share/locale/zh_CN/LC_MESSAGES/wifi.mo
+fi
+
+# Change file permissions
+# 1. libraries
+# 2. executables
+#chmod 700 /usr/bin/wifi-qs
+# 3. configurations
+#chmod 644 /usr/share/edje/wifi-qs*
+#chmod 644 /usr/share/locale/en_GB/LC_MESSAGES/wifi.mo
+#chmod 644 /usr/share/locale/en_US/LC_MESSAGES/wifi.mo
+#chmod 644 /usr/share/locale/ja/LC_MESSAGES/wifi.mo
+#chmod 644 /usr/share/locale/ko/LC_MESSAGES/wifi.mo
+#chmod 644 /usr/share/locale/zh_CN/LC_MESSAGES/wifi.mo
+
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..aa548a6
--- /dev/null
@@ -0,0 +1,192 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+CFLAGS += -Wall -g
+LDFLAGS += -Wall -pie
+PREFIX ?= /opt/ug
+DATADIR ?= /opt
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+       CFLAGS += -O0
+else
+       CFLAGS += -O2
+endif
+
+CFLAGS += -fPIC
+LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--hash-style=both -Wl,--as-needed
+
+
+configure: configure-stamp
+configure-stamp:
+       dh_testdir
+       # Add here commands to configure the package.
+       CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" cmake . -DCMAKE_INSTALL_PREFIX=$(PREFIX)
+       touch configure-stamp
+
+build: build-stamp
+
+build-stamp: configure-stamp
+       dh_testdir
+
+       # Add here commands to compile the package.
+       $(MAKE)
+       for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
+               cat $$f > $${f%.in}; \
+               sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
+               sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
+       done
+       #docbook-to-man debian/wifi-efl-ug.sgml > wifi-efl-ug.1
+
+       touch $@
+
+clean:
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp configure-stamp
+
+       # Add here commands to clean up after the build process.
+       -$(MAKE) clean
+       rm -rf CMakeCache.txt
+       rm -rf CMakeFiles
+       rm -rf cmake_install.cmake
+       rm -rf Makefile
+       rm -rf install_manifest.txt
+       rm -rf sources/ui-gadget/CMakeCache.txt
+       rm -rf sources/ui-gadget/CMakeFiles
+       rm -rf sources/ui-gadget/cmake_install.cmake
+       rm -rf sources/ui-gadget/Makefile
+       rm -rf sources/ui-gadget/install_manifest.txt
+       rm -rf sources/ui-gadget/edcs/*.edj
+       rm -rf sources/ui-gadget/po/CMakeCache.txt
+       rm -rf sources/ui-gadget/po/CMakeFiles
+       rm -rf sources/ui-gadget/po/cmake_install.cmake
+       rm -rf sources/ui-gadget/po/Makefile
+       rm -rf sources/ui-gadget/po/install_manifest.txt
+       rm -rf sources/ui-gadget/po/*.mo
+
+       rm -rf sources/wifi-syspopup/CMakeCache.txt
+       rm -rf sources/wifi-syspopup/CMakeFiles
+       rm -rf sources/wifi-syspopup/cmake_install.cmake
+       rm -rf sources/wifi-syspopup/Makefile
+       rm -rf sources/wifi-syspopup/install_manifest.txt
+       rm -rf sources/wifi-syspopup/net.wifi-qs.desktop
+
+       rm -rf sources/wifi-syspopup/po/CMakeFiles
+       rm -rf sources/wifi-syspopup/po/Makefile
+       rm -rf sources/wifi-syspopup/po/cmake_install.cmake
+
+       rm -rf *.so
+       rm -rf *.edj
+
+       rm -rf debian/*.install
+
+       dh_clean 
+
+dev_clean:
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp configure-stamp
+
+       # Add here commands to clean up after the build process.
+       -$(MAKE) clean
+       rm -rf CMakeCache.txt
+       rm -rf CMakeFiles
+       rm -rf cmake_install.cmake
+       rm -rf Makefile
+       rm -rf install_manifest.txt
+       rm -rf sources/ui-gadget/CMakeCache.txt
+       rm -rf sources/ui-gadget/CMakeFiles
+       rm -rf sources/ui-gadget/cmake_install.cmake
+       rm -rf sources/ui-gadget/Makefile
+       rm -rf sources/ui-gadget/install_manifest.txt
+       rm -rf sources/ui-gadget/edcs/*.edj
+       rm -rf sources/ui-gadget/po/CMakeCache.txt
+       rm -rf sources/ui-gadget/po/CMakeFiles
+       rm -rf sources/ui-gadget/po/cmake_install.cmake
+       rm -rf sources/ui-gadget/po/Makefile
+       rm -rf sources/ui-gadget/po/install_manifest.txt
+       rm -rf sources/ui-gadget/po/*.mo
+
+       rm -rf sources/wifi-syspopup/CMakeCache.txt
+       rm -rf sources/wifi-syspopup/CMakeFiles
+       rm -rf sources/wifi-syspopup/cmake_install.cmake
+       rm -rf sources/wifi-syspopup/Makefile
+       rm -rf sources/wifi-syspopup/install_manifest.txt
+       rm -rf sources/wifi-syspopup/net.wifi-qs.desktop
+       rm -rf sources/wifi-syspopup/edcs/*.edj
+
+       rm -rf po/CMakeCache.txt
+       rm -rf po/CMakeFiles
+       rm -rf po/cmake_install.cmake
+       rm -rf po/Makefile
+       rm -rf po/install_manifest.txt
+       rm -rf po/*.mo
+
+       rm -rf *.so
+       rm -rf *.edj
+
+       rm -rf debian/*.install
+
+       touch cscope.a
+       rm cscop*.*
+       rm -f sources/cscope.*
+       rm -f sources/ui-gadget/cscope.*
+       rm -f sources/wifi-syspopup/cscope.*
+
+       rm -f tag*
+       rm -f sources/tag*
+       rm -f sources/ui-gadget/tag*
+       rm -f sources/wifi-syspopup/tag*
+
+       rm -f ../wifi-efl-ug*
+       rm -f ../net.wifi-qs_*
+       rm -f ../net.wifi-qs-dbg*
+       rm -f ../wifi-syspopup_*
+
+       dh_clean
+
+install: build
+       dh_testdir
+       dh_testroot
+       dh_clean -k
+       dh_installdirs
+
+       # Add here commands to install the package into debian/tmp.
+       $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+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=wifi-efl-ug-dbg
+       dh_compress
+       dh_fixperms
+#      dh_perl
+       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/debian/wifi-efl-ug.install.in b/debian/wifi-efl-ug.install.in
new file mode 100644 (file)
index 0000000..c0e8ba9
--- /dev/null
@@ -0,0 +1,6 @@
+/opt/ug/lib/libug-wifi-efl-UG.so.0.1.0
+/opt/ug/lib/libug-wifi-efl-UG.so
+/opt/ug/res/edje/wifi-efl-UG/wifi_ug_edj_etc.edj
+/opt/ug/res/locale/*
+/opt/ug/res/images/wifi-efl-UG/*
+
diff --git a/debian/wifi-efl-ug.postinst b/debian/wifi-efl-ug.postinst
new file mode 100644 (file)
index 0000000..ead844c
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+if [ ${USER} = "root" ]
+then
+       vconftool set -t int memory/wifi/ug_run_state 3 -i -g 6519
+fi
diff --git a/packaging/wifi-efl-ug.spec b/packaging/wifi-efl-ug.spec
new file mode 100644 (file)
index 0000000..0535d92
--- /dev/null
@@ -0,0 +1,85 @@
+#sbs-git:slp/pkgs/s/sg-wifi-efl wifi-efl-ug
+
+Name:       wifi-efl-ug
+Summary:    Wi-Fi UI Gadget
+Version:    0.4.25
+Release:    1
+Group:      App/Network
+License:    Flora Software License
+Source0:    %{name}-%{version}.tar.gz
+
+BuildRequires: cmake
+BuildRequires: gettext-tools
+BuildRequires: edje-tools
+BuildRequires: pkgconfig(ecore)
+BuildRequires: pkgconfig(ecore-imf)
+BuildRequires: pkgconfig(ecore-input)
+BuildRequires: pkgconfig(appcore-efl)
+BuildRequires: pkgconfig(elementary)
+BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(utilX)
+BuildRequires: pkgconfig(ui-gadget)
+BuildRequires: pkgconfig(x11)
+BuildRequires: pkgconfig(sensor)
+BuildRequires: pkgconfig(syspopup)
+BuildRequires: pkgconfig(syspopup-caller)
+BuildRequires: pkgconfig(network)
+
+Requires(post):   /sbin/ldconfig
+Requires(post):   /usr/bin/vconftool
+requires(postun): /sbin/ldconfig
+
+%description
+Wi-Fi UI Gadget
+
+
+%package -n net.wifi-qs
+Summary:    Wi-Fi System popup
+Requires(post):   /usr/bin/vconftool
+Requires:   %{name} = %{version}-%{release}
+
+%description -n net.wifi-qs
+Wi-Fi System popup
+
+%prep
+%setup -q
+
+%define PREFIX /opt/ug
+
+%build
+export LDFLAGS+="-Wl,--rpath=$PREFIX/lib -Wl,--as-needed"
+LDFLAGS="$LDFLAGS"
+cmake . -DCMAKE_INSTALL_PREFIX=$PREFIX
+make %{?jobs:-j%jobs}
+
+%install
+%make_install
+
+%post
+/sbin/ldconfig
+
+vconftool set -t int memory/wifi/ug_run_state 3 -i -g 6519
+
+%post -n net.wifi-qs
+
+vconftool set -t int memory/wifi/wifi_qs_exit 0 -g 6519 -i
+vconftool set -t int db/wifi/enable_quick_start 1 -g 6519 -i
+
+
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(-,root,root,-)
+/opt/ug/lib/libug-wifi-efl-UG.so
+/opt/ug/lib/libug-wifi-efl-UG.so.0.1.0
+/opt/ug/res/edje/wifi-efl-UG/*.edj
+/opt/ug/res/images/wifi-efl-UG/*.png
+/opt/ug/res/locale/*/LC_MESSAGES/*.mo
+
+%files -n net.wifi-qs
+%defattr(-,root,root,-)
+%{_prefix}/bin/wifi-qs
+/opt/share/applications/net.wifi-qs.desktop
+%{_prefix}/share/process-info/wifi-qs.ini
+%{_prefix}/share/icon/*.png
+%{_prefix}/share/locale/*/LC_MESSAGES/wifi-qs.mo
diff --git a/resources/images/01_controlbar_icon_delete.png b/resources/images/01_controlbar_icon_delete.png
new file mode 100644 (file)
index 0000000..e460e2c
Binary files /dev/null and b/resources/images/01_controlbar_icon_delete.png differ
diff --git a/resources/images/01_controlbar_icon_edit.png b/resources/images/01_controlbar_icon_edit.png
new file mode 100644 (file)
index 0000000..c1e8909
Binary files /dev/null and b/resources/images/01_controlbar_icon_edit.png differ
diff --git a/resources/images/01_controlbar_icon_update.png b/resources/images/01_controlbar_icon_update.png
new file mode 100644 (file)
index 0000000..fe731e3
Binary files /dev/null and b/resources/images/01_controlbar_icon_update.png differ
diff --git a/resources/images/37_wifi_icon_00.png b/resources/images/37_wifi_icon_00.png
new file mode 100644 (file)
index 0000000..29dcb9f
Binary files /dev/null and b/resources/images/37_wifi_icon_00.png differ
diff --git a/resources/images/37_wifi_icon_01.png b/resources/images/37_wifi_icon_01.png
new file mode 100644 (file)
index 0000000..3a7c359
Binary files /dev/null and b/resources/images/37_wifi_icon_01.png differ
diff --git a/resources/images/37_wifi_icon_02.png b/resources/images/37_wifi_icon_02.png
new file mode 100644 (file)
index 0000000..d0c0aaf
Binary files /dev/null and b/resources/images/37_wifi_icon_02.png differ
diff --git a/resources/images/37_wifi_icon_03.png b/resources/images/37_wifi_icon_03.png
new file mode 100644 (file)
index 0000000..75163ee
Binary files /dev/null and b/resources/images/37_wifi_icon_03.png differ
diff --git a/resources/images/37_wifi_icon_WPS.png b/resources/images/37_wifi_icon_WPS.png
new file mode 100644 (file)
index 0000000..50b1633
Binary files /dev/null and b/resources/images/37_wifi_icon_WPS.png differ
diff --git a/resources/images/37_wifi_icon_WPS_support AP.png b/resources/images/37_wifi_icon_WPS_support AP.png
new file mode 100644 (file)
index 0000000..50b1633
Binary files /dev/null and b/resources/images/37_wifi_icon_WPS_support AP.png differ
diff --git a/resources/images/37_wifi_icon_WPS_support AP_press.png b/resources/images/37_wifi_icon_WPS_support AP_press.png
new file mode 100644 (file)
index 0000000..98a80fe
Binary files /dev/null and b/resources/images/37_wifi_icon_WPS_support AP_press.png differ
diff --git a/resources/images/37_wifi_icon_lock_00.png b/resources/images/37_wifi_icon_lock_00.png
new file mode 100644 (file)
index 0000000..18d3d73
Binary files /dev/null and b/resources/images/37_wifi_icon_lock_00.png differ
diff --git a/resources/images/37_wifi_icon_lock_01.png b/resources/images/37_wifi_icon_lock_01.png
new file mode 100644 (file)
index 0000000..fd21c00
Binary files /dev/null and b/resources/images/37_wifi_icon_lock_01.png differ
diff --git a/resources/images/37_wifi_icon_lock_02.png b/resources/images/37_wifi_icon_lock_02.png
new file mode 100644 (file)
index 0000000..afaa6b5
Binary files /dev/null and b/resources/images/37_wifi_icon_lock_02.png differ
diff --git a/resources/images/37_wifi_icon_lock_03.png b/resources/images/37_wifi_icon_lock_03.png
new file mode 100644 (file)
index 0000000..ca81763
Binary files /dev/null and b/resources/images/37_wifi_icon_lock_03.png differ
diff --git a/resources/images/37_wifi_icon_searched_00.png b/resources/images/37_wifi_icon_searched_00.png
new file mode 100644 (file)
index 0000000..b463c4b
Binary files /dev/null and b/resources/images/37_wifi_icon_searched_00.png differ
diff --git a/resources/images/37_wifi_icon_searched_01.png b/resources/images/37_wifi_icon_searched_01.png
new file mode 100644 (file)
index 0000000..c3fdee9
Binary files /dev/null and b/resources/images/37_wifi_icon_searched_01.png differ
diff --git a/resources/images/37_wifi_icon_searched_02.png b/resources/images/37_wifi_icon_searched_02.png
new file mode 100644 (file)
index 0000000..3e12f0e
Binary files /dev/null and b/resources/images/37_wifi_icon_searched_02.png differ
diff --git a/resources/images/37_wifi_icon_searched_03.png b/resources/images/37_wifi_icon_searched_03.png
new file mode 100644 (file)
index 0000000..cc91651
Binary files /dev/null and b/resources/images/37_wifi_icon_searched_03.png differ
diff --git a/resources/images/37_wifi_icon_searched_lock_00.png b/resources/images/37_wifi_icon_searched_lock_00.png
new file mode 100644 (file)
index 0000000..ce2d087
Binary files /dev/null and b/resources/images/37_wifi_icon_searched_lock_00.png differ
diff --git a/resources/images/37_wifi_icon_searched_lock_01.png b/resources/images/37_wifi_icon_searched_lock_01.png
new file mode 100644 (file)
index 0000000..9ba94c7
Binary files /dev/null and b/resources/images/37_wifi_icon_searched_lock_01.png differ
diff --git a/resources/images/37_wifi_icon_searched_lock_02.png b/resources/images/37_wifi_icon_searched_lock_02.png
new file mode 100644 (file)
index 0000000..1d02881
Binary files /dev/null and b/resources/images/37_wifi_icon_searched_lock_02.png differ
diff --git a/resources/images/37_wifi_icon_searched_lock_03.png b/resources/images/37_wifi_icon_searched_lock_03.png
new file mode 100644 (file)
index 0000000..dbd794b
Binary files /dev/null and b/resources/images/37_wifi_icon_searched_lock_03.png differ
diff --git a/sources/libraries/Common/include/common.h b/sources/libraries/Common/include/common.h
new file mode 100644 (file)
index 0000000..092cfd9
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#ifndef __COMMON_H_
+#define __COMMON_H_
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <sys/wait.h>
+#include <signal.h>
+#include <sys/ioctl.h>
+#include <net/if.h>
+#include <glib.h>
+#include <assert.h>
+
+#define true 1
+#define false 0
+
+#ifndef _BOOLEAN_TYPE_H_
+#define  _BOOLEAN_TYPE_H_
+typedef unsigned short boolean;
+#endif /** _BOOLEAN_TYPE_H_ */
+
+#ifndef _UINT32_TYPE_H_
+#define _UINT32_TYPE_H_
+typedef unsigned int uint32;
+#endif /** _UINT32_TYPE_H_ */
+
+#include <linux/sockios.h>
+#include <linux/ethtool.h>
+#include <errno.h>
+
+#ifndef FACTORYFS
+#define FACTORYFS "/opt/ug"
+#endif
+
+#include <Elementary.h>
+#include <appcore-efl.h>
+#include <dlog.h>
+
+
+#define COMMON_NAME_FUNC       "wifi/func"
+#define COMMON_NAME_LIB                "wifi/lib"
+#define COMMON_NAME_ERR                "wifi/err"
+#define UG_NAME_NORMAL         "wifi_ug"
+#define UG_NAME_RESP                           "wifi_ug/resp"
+#define UG_NAME_REQ                            "wifi_ug/req"
+#define UG_NAME_SCAN                   "wifi_ug/scan"
+#define UG_NAME_ERR                            "wifi_ug/err"
+#define SP_NAME_NORMAL         "wifi_sp"
+#define SP_NAME_ERR                            "wifi_sp/err"
+
+/* Log Level */
+#define COMMON_LOG_DEBUG       LOG_DEBUG
+#define COMMON_LOG_INFO                LOG_INFO
+#define COMMON_LOG_WARN        LOG_WARN
+#define COMMON_LOG_ERROR       LOG_ERROR
+
+#define __COMMON_FUNC_ENTER__ FUNC_LOG(COMMON_NAME_FUNC, "[<Entering]: %s() [%d]", __func__, __LINE__)
+#define __COMMON_FUNC_EXIT__ FUNC_LOG(COMMON_NAME_FUNC, "[Quit/>]: %s() [%d]", __func__, __LINE__)
+
+#define FUNC_LOG(MID, format, args...) \
+       SLOG(LOG_INFO,  MID, "\033[2m[%s:%d]\033[2m " format "\033[0m", __func__, __LINE__, ##args)
+#define DEBUG_LOG(MID, format, args...) \
+       SLOG(LOG_DEBUG,  MID, "\033[42m[%s:%d]\033[0m\033[32m " format "\033[0m", __func__, __LINE__, ##args)
+#define INFO_LOG(MID, format, args...) \
+       SLOG(LOG_INFO,  MID, "\033[0m[%s:%d]\033[0m " format, __func__, __LINE__, ##args)
+#define WARN_LOG(MID, format, args...) \
+       SLOG(LOG_WARN,  MID, "\033[43m[%s:%d]\033[0m\033[33m " format "\033[0m", __func__, __LINE__, ##args)
+#define ERROR_LOG(MID, format, args...) \
+       SLOG(LOG_ERROR,  MID, "\033[41m[%s:%d]\033[0m\033[31m " format "\033[0m", __func__, __LINE__, ##args)
+
+
+#define assertm_if(expr, fmt, arg...) do { \
+       if(expr) { \
+               ERROR_LOG(COMMON_NAME_ERR, " ##(%s) -> %s() assert!!## "fmt, #expr, __FUNCTION__, ##arg); \
+               assert(1); \
+       } \
+} while (0) /* retvm if */
+
+#endif
diff --git a/sources/libraries/WlanManager/EngineManager/connman-profile-manager.c b/sources/libraries/WlanManager/EngineManager/connman-profile-manager.c
new file mode 100644 (file)
index 0000000..9d6ab28
--- /dev/null
@@ -0,0 +1,231 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#include "common.h"
+#include "wlan_manager.h"
+
+
+typedef struct connman_profile_manager {
+       int profile_num;
+       net_profile_info_t* profile_table;
+} connman_profile_manager;
+connman_profile_manager *_profile_manager = NULL;
+
+static connman_profile_manager *connman_profile_manager_get_singleton()
+{
+       if (_profile_manager == NULL) {
+               _profile_manager = (connman_profile_manager *)malloc(sizeof(connman_profile_manager));
+               _profile_manager->profile_num = 0;
+               _profile_manager->profile_table = NULL;
+       }
+
+       return _profile_manager;
+}
+
+void connman_profile_manager_destroy()
+{
+       if (_profile_manager) {
+               if (_profile_manager->profile_table) {
+                       g_free(_profile_manager->profile_table);
+               }
+
+               g_free(_profile_manager);
+               _profile_manager = NULL;
+       }
+}
+
+int connman_profile_manager_profile_cache(int count)
+{
+       int num_of_profiles = 0;
+       net_profile_info_t *profiles = NULL;
+       connman_profile_manager *profile_manager = NULL;
+
+       INFO_LOG(COMMON_NAME_LIB, "connman_profile_manager_profile_cache");
+
+       net_get_profile_list(NET_DEVICE_WIFI, &profiles, &num_of_profiles);
+       if (num_of_profiles == 0) {
+               INFO_LOG(COMMON_NAME_LIB, "count = 0");
+               return FALSE;
+       }
+
+       if (count < num_of_profiles && count > 0)
+               num_of_profiles = count;
+
+       INFO_LOG(COMMON_NAME_LIB, "count = %d", num_of_profiles);
+
+       profile_manager = connman_profile_manager_get_singleton();
+       if (profile_manager->profile_table) {
+               g_free(profile_manager->profile_table);
+               profile_manager->profile_table = NULL;
+       }
+
+       profile_manager->profile_table = (net_profile_info_t*)malloc(num_of_profiles*sizeof(net_profile_info_t));
+       memcpy(profile_manager->profile_table, profiles, num_of_profiles*sizeof(net_profile_info_t));
+       profile_manager->profile_num = num_of_profiles;
+
+       if (profiles)
+               g_free(profiles);
+
+       return num_of_profiles;
+}
+
+int connman_profile_manager_scanned_profile_table_size_get(void)
+{
+       connman_profile_manager *profile_manager = NULL;
+       profile_manager = connman_profile_manager_get_singleton();
+       return profile_manager->profile_num;
+}
+
+int connman_profile_manager_check_favourite(const char *profile_name, int *favourite)
+{
+       net_profile_info_t profile;
+
+       int ret = net_get_profile_info(profile_name, &profile);
+       if (ret != NET_ERR_NONE) {
+               ERROR_LOG(COMMON_NAME_ERR, "Failed - net_get_profile_info : error[%d]", ret);
+               return WLAN_MANAGER_ERR_UNKNOWN;
+       }
+
+       INFO_LOG(COMMON_NAME_LIB, "Favourite = %d", (int)profile.Favourite);
+
+       *favourite = (int)profile.Favourite;
+       return WLAN_MANAGER_ERR_NONE;
+}
+
+int connman_profile_manager_connected_ssid_set(const char *profile_name)
+{
+       INFO_LOG(COMMON_NAME_LIB, "Profile name : %s", profile_name);
+
+       net_profile_info_t profile;
+       if (net_get_profile_info(profile_name, &profile) != NET_ERR_NONE)
+               return FALSE;
+
+       wlan_manager_set_connected_AP((const net_profile_info_t *)&profile);
+
+       return TRUE;
+}
+
+int connman_profile_manager_disconnected_ssid_set(const char *profile_name)
+{
+       INFO_LOG(COMMON_NAME_LIB, "Profile name : %s", profile_name);
+
+       const char *connected_profile_name = wlan_manager_get_connected_profile();
+       if (connected_profile_name)
+               if (strncmp(connected_profile_name, profile_name, strlen(connected_profile_name)) == 0)
+                       wlan_manager_reset_connected_AP();
+
+       return TRUE;
+}
+
+int connman_profile_manager_profile_modify(net_profile_info_t new_profile)
+{
+       net_profile_info_t profile;
+       if (net_get_profile_info(new_profile.ProfileName, &profile) != NET_ERR_NONE) {
+               return 0;
+       }
+
+       profile.ProfileInfo.Wlan.net_info.IpConfigType = new_profile.ProfileInfo.Wlan.net_info.IpConfigType;
+       if (profile.ProfileInfo.Wlan.net_info.IpConfigType == NET_IP_CONFIG_TYPE_STATIC) {
+               profile.ProfileInfo.Wlan.net_info.IpAddr.Data.Ipv4 = new_profile.ProfileInfo.Wlan.net_info.IpAddr.Data.Ipv4;
+               profile.ProfileInfo.Wlan.net_info.SubnetMask.Data.Ipv4 = new_profile.ProfileInfo.Wlan.net_info.SubnetMask.Data.Ipv4;
+               profile.ProfileInfo.Wlan.net_info.GatewayAddr.Data.Ipv4 = new_profile.ProfileInfo.Wlan.net_info.GatewayAddr.Data.Ipv4;
+               profile.ProfileInfo.Wlan.net_info.DnsAddr[0].Data.Ipv4 = new_profile.ProfileInfo.Wlan.net_info.DnsAddr[0].Data.Ipv4;
+               profile.ProfileInfo.Wlan.net_info.DnsAddr[1].Data.Ipv4 = new_profile.ProfileInfo.Wlan.net_info.DnsAddr[1].Data.Ipv4;
+       }
+
+       profile.ProfileInfo.Wlan.net_info.ProxyMethod = NET_PROXY_TYPE_MANUAL;
+       strncpy(profile.ProfileInfo.Wlan.net_info.ProxyAddr, new_profile.ProfileInfo.Wlan.net_info.ProxyAddr, WLAN_PROXY_LEN_MAX);
+
+       int ret = net_modify_profile(new_profile.ProfileName, &profile);
+       if (ret != NET_ERR_NONE) {
+               INFO_LOG(COMMON_NAME_ERR, "Failed to modify profile - %d\n", ret);
+               return 0;
+       }
+       else {
+               INFO_LOG(COMMON_NAME_LIB, "Succeed to modify profile - %d\n", ret);
+       }
+
+       return 1;
+}
+
+int connman_profile_manager_profile_modify_auth(const char* profile_name, void *authdata, int secMode)
+{
+       if (profile_name == NULL || authdata == NULL)
+               return 0;
+
+       net_profile_info_t profile;
+       if (net_get_profile_info(profile_name, &profile) != NET_ERR_NONE) {
+               return 0;
+       }
+
+       wlan_manager_password_data* auth = (wlan_manager_password_data*)authdata;
+       char security_key[NETPM_WLAN_MAX_PSK_PASSPHRASE_LEN+1] = "";
+       
+       if (auth != NULL) {
+               strncpy(security_key, auth->password, NETPM_WLAN_MAX_PSK_PASSPHRASE_LEN);
+               DEBUG_LOG(COMMON_NAME_LIB, "security_key [%s]", auth->password);
+       }
+       
+       if (0 < strlen(security_key)) {
+               if (secMode == WLAN_SEC_MODE_WEP) {
+                       INFO_LOG(COMMON_NAME_LIB, "SECURITY_TYPE_WEP");
+                       strncpy(profile.ProfileInfo.Wlan.security_info.authentication.wep.wepKey, 
+                                       security_key,
+                                       NETPM_WLAN_MAX_WEP_KEY_LEN);
+               } else {
+                       INFO_LOG(COMMON_NAME_LIB, "not SECURITY_TYPE_WEP" );
+                       strncpy(profile.ProfileInfo.Wlan.security_info.authentication.psk.pskKey, security_key,
+                               NETPM_WLAN_MAX_PSK_PASSPHRASE_LEN);
+                       profile.ProfileInfo.Wlan.security_info.authentication.psk.pskKey[NETPM_WLAN_MAX_PSK_PASSPHRASE_LEN] = '\0';
+               }
+       } else {
+               INFO_LOG(COMMON_NAME_LIB, "security data <= 0" );
+               strncpy(profile.ProfileInfo.Wlan.security_info.authentication.psk.pskKey, security_key,
+                       NETPM_WLAN_MAX_PSK_PASSPHRASE_LEN);
+       }
+
+       int ret = net_modify_profile(profile_name, &profile);
+       if (ret != NET_ERR_NONE) {
+               INFO_LOG(COMMON_NAME_ERR, "Failed to modify profile - %d\n", ret);
+               return 0;
+       }
+       else {
+               INFO_LOG(COMMON_NAME_LIB, "Succeed to modify profile - %d\n", ret);
+       }
+
+       return 1;
+}
+
+void* connman_profile_manager_profile_table_get(void)
+{
+       connman_profile_manager *profile_manager = NULL;
+       profile_manager = connman_profile_manager_get_singleton();
+       return profile_manager->profile_table;
+}
+
+int connman_profile_manager_profile_info_get(const char *profile_name, net_profile_info_t *profile)
+{
+       if (profile_name == NULL)
+               return 0;
+
+       if (net_get_profile_info(profile_name, profile) != NET_ERR_NONE) {
+               return 0;
+       }
+
+       return 1;
+}
diff --git a/sources/libraries/WlanManager/EngineManager/connman-request.c b/sources/libraries/WlanManager/EngineManager/connman-request.c
new file mode 100644 (file)
index 0000000..2124224
--- /dev/null
@@ -0,0 +1,218 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#include "common.h"
+#include "wlan_manager.h"
+
+
+int connman_request_register(void)
+{
+       int ret = net_register_client((net_event_cb_t) network_evt_cb, NULL);
+       switch (ret) {
+               case NET_ERR_NONE:
+                       return WLAN_MANAGER_ERR_NONE;
+               case NET_ERR_APP_ALREADY_REGISTERED:
+                       return WLAN_MANAGER_ERR_ALREADY_REGISTERED;
+               default:
+                       return WLAN_MANAGER_ERR_UNKNOWN;
+       }
+}
+
+int connman_request_deregister(void)
+{
+       int ret = net_deregister_client();
+       switch (ret) {
+               case NET_ERR_NONE:
+                       return WLAN_MANAGER_ERR_NONE;
+               default:
+                       return WLAN_MANAGER_ERR_UNKNOWN;
+       }
+}
+
+int connman_request_power_on(void)
+{
+       int ret = NET_ERR_NONE;
+
+       ret = net_wifi_power_on();
+       INFO_LOG(COMMON_NAME_LIB,"network_wifi_power_on ret: %d", ret);
+
+       switch (ret){
+               case NET_ERR_NONE:
+                       return WLAN_MANAGER_ERR_NONE;
+               default:
+                       return WLAN_MANAGER_ERR_UNKNOWN;
+       }
+}
+
+int connman_request_power_off(void)
+{
+       int ret = NET_ERR_NONE;
+
+       ret = net_wifi_power_off();
+       INFO_LOG(COMMON_NAME_LIB, "network_wifi_power_off ret: %d", ret);
+
+       switch (ret){
+               case NET_ERR_NONE:
+                       return WLAN_MANAGER_ERR_NONE;
+               default:
+                       return WLAN_MANAGER_ERR_UNKNOWN;
+       }
+}
+
+int connman_request_connection_open(const char* profile_name)
+{
+       int ret = NET_ERR_NONE;
+       ret = net_open_connection_with_profile(profile_name);   
+       INFO_LOG(COMMON_NAME_LIB, "connman_request_connection_open ret: %d", ret);
+       
+       switch (ret){
+               case NET_ERR_NONE:
+                       return WLAN_MANAGER_ERR_NONE;
+               default:
+                       return WLAN_MANAGER_ERR_UNKNOWN;
+       }
+}
+
+int connman_request_connection_open_hidden_ap(net_wifi_connection_info_t* conninfo)
+       {
+       int ret = NET_ERR_NONE;
+       ret = net_open_connection_with_wifi_info(conninfo);
+       switch (ret){
+               case NET_ERR_NONE:
+                       return WLAN_MANAGER_ERR_NONE;
+               default:
+                       return WLAN_MANAGER_ERR_UNKNOWN;
+       }
+}
+
+int connman_request_connection_close(const char* profile_name)
+{
+       int ret = NET_ERR_NONE;
+       ret = net_close_connection(profile_name);
+
+       switch (ret) {
+       case NET_ERR_NONE:
+               return WLAN_MANAGER_ERR_NONE;
+       default:
+               return WLAN_MANAGER_ERR_UNKNOWN;
+       }
+}
+
+int connman_request_delete_profile(const char* profile_name)
+{
+       int ret = NET_ERR_NONE;
+       ret = net_delete_profile(profile_name);
+       switch (ret){
+               case NET_ERR_NONE:
+                       return WLAN_MANAGER_ERR_NONE;
+               default:
+                       return WLAN_MANAGER_ERR_UNKNOWN;
+       }
+}
+
+int connman_request_scan()
+{
+       int ret = NET_ERR_NONE;
+       ret = net_scan_wifi();
+       switch (ret){
+               case NET_ERR_NONE:
+                       return WLAN_MANAGER_ERR_NONE;
+               default:
+                       return WLAN_MANAGER_ERR_UNKNOWN;
+       }
+}
+
+int connman_request_scan_mode_set(net_wifi_background_scan_mode_t scan_mode)
+{
+       int ret = NET_ERR_NONE;
+
+       ret = net_wifi_set_background_scan_mode(scan_mode);
+       INFO_LOG(COMMON_NAME_LIB, "net_wifi_set_background_scan_mode ret: %d", ret);
+
+       switch (ret) {
+       case NET_ERR_NONE:
+               return WLAN_MANAGER_ERR_NONE;
+       default:
+               return WLAN_MANAGER_ERR_UNKNOWN;
+       }
+}
+
+int connman_request_wps_connection(const char *profile_name)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (profile_name == NULL) {
+               ERROR_LOG(COMMON_NAME_ERR, "profile_name is NULL!!!");
+               return WLAN_MANAGER_ERR_UNKNOWN;
+       }
+
+       net_wifi_wps_info_t wps_info;
+       memset(&wps_info, 0, sizeof(net_wifi_wps_info_t));
+       wps_info.type = WIFI_WPS_PBC;
+
+       int ret = net_wifi_enroll_wps(profile_name, &wps_info);
+       if (ret != NET_ERR_NONE) {
+               ERROR_LOG(COMMON_NAME_ERR, "Failed net_wifi_enroll_wps() error - %d", ret);
+               return WLAN_MANAGER_ERR_UNKNOWN;
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return WLAN_MANAGER_ERR_NONE;
+}
+
+int connman_request_state_get(const char* profile_name)
+{
+       __COMMON_FUNC_ENTER__;
+
+       int ret = NET_ERR_NONE;
+       net_wifi_state_t state;
+
+       ret = net_get_wifi_state(&state, (net_profile_name_t *)profile_name);
+       switch (ret) {
+       case NET_ERR_NONE:
+               if (WIFI_OFF == state) {
+                       INFO_LOG(COMMON_NAME_LIB, "STATE : WIFI_OFF");
+                       __COMMON_FUNC_EXIT__;
+                       return WLAN_MANAGER_OFF;
+               } else if (WIFI_ON == state) {
+                       INFO_LOG(COMMON_NAME_LIB, "STATE : WIFI_ON");
+                       __COMMON_FUNC_EXIT__;
+                       return WLAN_MANAGER_UNCONNECTED;
+               } else if (WIFI_CONNECTED == state) {
+                       INFO_LOG(COMMON_NAME_LIB, "STATE : WIFI_CONNECTED - %s", profile_name);
+                       __COMMON_FUNC_EXIT__;
+                       return WLAN_MANAGER_CONNECTED;
+               } else if (WIFI_CONNECTING == state) {
+                       INFO_LOG(COMMON_NAME_LIB, "STATE : WIFI_CONNECTING - %s", profile_name);
+                       __COMMON_FUNC_EXIT__;
+                       return WLAN_MANAGER_CONNECTING;
+               } else if (WIFI_DISCONNECTING == state) {
+                       INFO_LOG(COMMON_NAME_LIB, "STATE : WIFI_DISCONNECTING");
+                       __COMMON_FUNC_EXIT__;
+                       return WLAN_MANAGER_DISCONNECTING;
+               } else {
+                       ERROR_LOG(COMMON_NAME_ERR, "STATE : UNKNOWN[%d]", state);
+                       __COMMON_FUNC_EXIT__;
+                       return WLAN_MANAGER_ERROR;
+               }
+       default:
+               ERROR_LOG(COMMON_NAME_ERR, "Failed to get state [%d]", ret);
+               __COMMON_FUNC_EXIT__;
+               return WLAN_MANAGER_ERR_UNKNOWN;
+       }
+}
diff --git a/sources/libraries/WlanManager/EngineManager/connman-response.c b/sources/libraries/WlanManager/EngineManager/connman-response.c
new file mode 100644 (file)
index 0000000..ef65643
--- /dev/null
@@ -0,0 +1,215 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#include "common.h"
+#include "wlan_manager.h"
+
+
+void network_evt_cb(net_event_info_t* net_event, void* user_data)
+{
+       __COMMON_FUNC_ENTER__;
+
+       wlan_manager_object* manager_object = wlan_manager_get_singleton();
+
+       callback_data *ret = (callback_data *) malloc(sizeof(callback_data));
+       ret->profile_name = strdup(net_event->ProfileName);
+       ret->type = WLAN_MANAGER_RESPONSE_TYPE_NONE;
+
+       switch (net_event->Event) {
+               /** Wi-Fi interface Power On/Off Response Event */ 
+               case NET_EVENT_WIFI_POWER_RSP:
+               /** Wi-Fi interface Power On/Off Indication Event */ 
+               case NET_EVENT_WIFI_POWER_IND:
+                       INFO_LOG(COMMON_NAME_LIB, "Callback - NET_EVENT_WIFI_POWER_IND : %d", net_event->Error);
+                       net_wifi_state_t* wifi_state = (net_wifi_state_t*)net_event->Data;
+                       if (net_event->Error == NET_ERR_NONE && net_event->Datalength == sizeof(net_wifi_state_t)) {
+                               if (*wifi_state == WIFI_ON) {
+                                       ret->type = WLAN_MANAGER_RESPONSE_TYPE_POWER_ON_OK;
+                                       wlan_manager_request_scan();
+                               }
+                               else if (*wifi_state == WIFI_OFF) {
+                                       ret->type = WLAN_MANAGER_RESPONSE_TYPE_POWER_OFF_OK;
+                               }
+                               else {
+                                       INFO_LOG(COMMON_NAME_LIB, "State!! - %d", *wifi_state);
+                               }
+                       } else if (net_event->Error == NET_ERR_WIFI_DRIVER_FAILURE) {
+                               ret->type = WLAN_MANAGER_RESPONSE_TYPE_POWER_ON_NOT_SUPPORTED;
+                       } else if (net_event->Error == NET_ERR_SECURITY_RESTRICTED) {
+                               ret->type = WLAN_MANAGER_RESPONSE_TYPE_POWER_ON_RESTRICTED;
+                       } else {
+                               return;
+                       }
+                       break;
+               /** Open Connection Response Event */
+               case NET_EVENT_OPEN_RSP:
+                       INFO_LOG(COMMON_NAME_LIB, "Callback - NET_EVENT_OPEN_RSP : %s", ret->profile_name);
+
+                       if (net_event->Error == NET_ERR_NONE) {
+                               if (strstr(ret->profile_name, "wifi_") == NULL) {
+                                       INFO_LOG(COMMON_NAME_LIB, "RESULT: NOT WIFI");
+                                       return;
+                               }
+                               INFO_LOG(COMMON_NAME_LIB, "RESULT: CONNECTION OK");
+                               ret->type = WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_OK;           
+                               connman_profile_manager_connected_ssid_set((const char *)ret->profile_name);
+                       } else if (net_event->Error == NET_ERR_TIME_OUT) {
+                               ERROR_LOG(COMMON_NAME_LIB, "Open response: NET_ERR_TIME_OUT");
+                               ret->type = WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_FAIL_TIMEOUT;
+                               wlan_manager_reset_connected_AP();
+                               connman_request_connection_close(ret->profile_name);
+                       } else if (net_event->Error == NET_ERR_IN_PROGRESS) {
+                               ERROR_LOG(COMMON_NAME_LIB, "Open response: NET_ERR_IN_PROGRESS");
+                               ret->type = WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_FAIL_IN_PROGRESS;
+                       } else if (net_event->Error == NET_ERR_ACTIVE_CONNECTION_EXISTS) {
+                               ERROR_LOG(COMMON_NAME_LIB, "Open response: NET_ERR_ACTIVE_CONNECTION_EXISTS");
+                               ret->type = WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_FAIL_ALREADY_EXIST;
+                       } else if (net_event->Error == NET_ERR_UNKNOWN_METHOD) {
+                               ERROR_LOG(COMMON_NAME_LIB, "Open response: NET_ERR_UNKNOWN_METHOD");
+                               ret->type = WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_FAIL_UNKNOWN_METHOD;
+                               wlan_manager_reset_connected_AP();
+                       } else if (net_event->Error == NET_ERR_OPERATION_ABORTED) {
+                               ERROR_LOG(COMMON_NAME_LIB, "Open response: NET_ERR_OPERATION_ABORTED");
+                               ret->type = WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_FAIL_ABORTED;
+                               wlan_manager_reset_connected_AP();
+                       } else {
+                               ERROR_LOG(COMMON_NAME_LIB, "Open response: %d", net_event->Error);
+                               ret->type = WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_FAIL_UNKNOWN;
+                               wlan_manager_reset_connected_AP();
+                       }
+                       break;
+               /** Open connection Indication (auto join) */
+               case NET_EVENT_OPEN_IND:
+                       INFO_LOG(COMMON_NAME_LIB, "Callback - NET_EVENT_OPEN_IND : %s", ret->profile_name);
+                       if (strstr(ret->profile_name, "wifi_") == NULL) {
+                               return;
+                       }
+                       
+                       ret->type = WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_IND;
+                       connman_profile_manager_connected_ssid_set((const char *)ret->profile_name);
+                       break;
+               /** Close Connection Response Event */ 
+               case NET_EVENT_CLOSE_RSP:
+                       INFO_LOG(COMMON_NAME_LIB, "Callback - NET_EVENT_CLOSE_RSP : %s", ret->profile_name);
+                       if (strstr(ret->profile_name, "wifi_") == NULL) {
+                               return;
+                       }
+
+                       ret->type = WLAN_MANAGER_RESPONSE_TYPE_DISCONNECTION_OK;
+                       connman_profile_manager_disconnected_ssid_set((const char *)ret->profile_name);
+                       break;
+               /** Connection Close Indication Event */
+               case NET_EVENT_CLOSE_IND:
+                       INFO_LOG(COMMON_NAME_LIB, "Callback - NET_EVENT_CLOSE_IND : %s", ret->profile_name);
+                       if (strstr(ret->profile_name, "wifi_") == NULL) {
+                               return;
+                       }
+
+                       ret->type = WLAN_MANAGER_RESPONSE_TYPE_DISCONNECTION_IND;
+                       connman_profile_manager_disconnected_ssid_set((const char *)ret->profile_name);
+                       break;
+               /** Network PS state change Indication Event */
+               case NET_EVENT_NET_STATE_IND:
+                       INFO_LOG(COMMON_NAME_LIB, "Callback - NET_EVENT_NET_STATE_IND");
+
+                       if (net_event->Error == NET_ERR_NONE) {
+                               if (strstr(ret->profile_name, "wifi_") == NULL) {
+                                       return;
+                               } else {
+                                       net_state_type_t* state_type = (net_state_type_t*)net_event->Data;
+                                       if (*state_type == NET_STATE_TYPE_ASSOCIATION) {
+                                               INFO_LOG(COMMON_NAME_LIB, "STATE_IND : ASSOCIATION");
+                                               ret->type = WLAN_MANAGER_RESPONSE_TYPE_CONNECTING;
+                                       } else if (*state_type == NET_STATE_TYPE_DISCONNECT) {
+                                               INFO_LOG(COMMON_NAME_LIB, "STATE_IND : DISCONNECT");
+                                               return;
+                                       } else if (*state_type == NET_STATE_TYPE_FAILURE) {
+                                               INFO_LOG(COMMON_NAME_LIB, "STATE_IND : FAILURE");
+                                               ret->type = WLAN_MANAGER_RESPONSE_TYPE_DISCONNECTION_OK;
+                                       } else if (*state_type == NET_STATE_TYPE_IDLE) {
+                                               INFO_LOG(COMMON_NAME_LIB, "STATE_IND : IDLE");
+                                               return;
+                                       } else if (*state_type == NET_STATE_TYPE_CONFIGURATION) {
+                                               INFO_LOG(COMMON_NAME_LIB, "STATE_IND : CONFIGURATION");
+                                               return;
+                                       } else if (*state_type == NET_STATE_TYPE_READY) {
+                                               INFO_LOG(COMMON_NAME_LIB, "STATE_IND : READY");
+                                               return;
+                                       } else if (*state_type == NET_STATE_TYPE_ONLINE) {
+                                               INFO_LOG(COMMON_NAME_LIB, "STATE_IND : ONLINE");
+                                               return;
+                                       } else {
+                                               INFO_LOG(COMMON_NAME_LIB, "STATE_IND : ?????????");
+                                               return;         
+                                       }
+                               }
+                       } else {
+                               return;         
+                       }
+                       break;
+               /** Profile modify indication Event */
+               case NET_EVENT_PROFILE_MODIFY_IND:
+                       INFO_LOG(COMMON_NAME_LIB, "Callback - NET_EVENT_PROFILE_MODIFY_IND");
+                       break;
+               /** Wi-Fi interface Mac Address */
+               case NET_EVENT_WIFI_MAC_ID_IND:
+                       INFO_LOG(COMMON_NAME_LIB, "Callback - NET_EVENT_WIFI_MAC_ID_IND");
+                       ret->type = WLAN_MANAGER_RESPONSE_TYPE_MAC_ID_IND;
+                       break;
+               /** Scan Indication Event(BG scan) */ 
+               case NET_EVENT_WIFI_SCAN_IND:
+                       INFO_LOG(COMMON_NAME_LIB, "Callback - NET_EVENT_WIFI_SCAN_IND");
+                       ret->type = WLAN_MANAGER_RESPONSE_TYPE_SCAN_RESULT_IND;
+                       break;
+               /** Scan Response Event */ 
+               case NET_EVENT_WIFI_SCAN_RSP:
+                       INFO_LOG(COMMON_NAME_LIB, "Callback - NET_EVENT_WIFI_SCAN_RSP");
+                       ret->type = WLAN_MANAGER_RESPONSE_TYPE_SCAN_OK;
+                       break;
+               /** Network Configure/Reconfigure Response Event */ 
+               case NET_EVENT_NET_CONFIGURE_RSP:
+                       INFO_LOG(COMMON_NAME_LIB, "Callback - NET_EVENT_NET_CONFIGURE_RSP");
+                       break;
+               case NET_EVENT_WIFI_WPS_RSP:
+                       INFO_LOG(COMMON_NAME_LIB, "Callback - NET_EVENT_WIFI_WPS_RSP");
+
+                       if (net_event->Error == NET_ERR_NONE) {
+                               if (strstr(ret->profile_name, "wifi_") == NULL) {
+                                       INFO_LOG(COMMON_NAME_LIB, "RESULT : NOT WIFI");
+                                       return;
+                               }
+                               INFO_LOG(COMMON_NAME_LIB, "RESULT : CONNECTION OK");
+                               ret->type = WLAN_MANAGER_RESPONSE_TYPE_WPS_ENROLL_OK;
+                               connman_profile_manager_connected_ssid_set(ret->profile_name);
+                       } else if (net_event->Error == NET_ERR_OPERATION_ABORTED) {
+                               INFO_LOG(COMMON_NAME_LIB, "RESULT : ERR_ABORTED");
+                               ret->type = WLAN_MANAGER_RESPONSE_TYPE_CANCEL_WPS_ENROLL_FAIL;
+                               wlan_manager_reset_connected_AP();
+                       } else {
+                               INFO_LOG(COMMON_NAME_LIB, "RESULT : CONNECTION FAIL");
+                               ret->type = WLAN_MANAGER_RESPONSE_TYPE_WPS_ENROLL_FAIL;
+                       }
+                       break;
+               default:
+                       INFO_LOG(COMMON_NAME_LIB, "Callback - %d", net_event->Event);
+                       break;
+       }
+
+       if (manager_object->message_func)
+               manager_object->message_func((void*)net_event->Data, (void*)ret);
+}
diff --git a/sources/libraries/WlanManager/EngineManager/include/connman-profile-manager.h b/sources/libraries/WlanManager/EngineManager/include/connman-profile-manager.h
new file mode 100644 (file)
index 0000000..dc09515
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#ifndef __WIFI_CONNMAN_PROFILE_MANAGER_H__
+#define __WIFI_CONNMAN_PROFILE_MANAGER_H_
+
+#include <network-pm-intf.h>
+
+int connman_profile_manager_profile_cache(int count);
+int connman_profile_manager_check_favourite(const char *profile_name, int *favourite);
+int connman_profile_manager_connected_ssid_set(const char *profile_name);
+int connman_profile_manager_disconnected_ssid_set(const char *profile_name);
+int connman_profile_manager_profile_modify(net_profile_info_t new_profile);
+int connman_profile_manager_profile_modify_auth(const char *profile_name, void *authdata, int secMode);
+void *connman_profile_manager_profile_table_get(void);
+int connman_profile_manager_profile_info_get(const char *profile_name, net_profile_info_t *profile);
+int connman_profile_manager_scanned_profile_table_size_get(void);
+void connman_profile_manager_destroy(void);
+
+#endif
diff --git a/sources/libraries/WlanManager/EngineManager/include/connman-request.h b/sources/libraries/WlanManager/EngineManager/include/connman-request.h
new file mode 100644 (file)
index 0000000..2afa735
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#ifndef __CONNMAN_REQUEST_H_
+#define __CONNMAN_REQUEST_H_
+
+#include <network-cm-error.h>
+#include <network-cm-intf.h>
+#include <network-pm-config.h>
+#include <network-pm-intf.h>
+#include <network-pm-wlan.h>
+#include <network-wifi-intf.h>
+
+
+int connman_request_register(void);
+int connman_request_deregister(void);
+int connman_request_power_on(void);
+int connman_request_power_off(void);
+int connman_request_connection_open(const char* profile_name);
+int connman_request_connection_open_hidden_ap(net_wifi_connection_info_t* conninfo);
+int connman_request_connection_close(const char* profile_name);
+int connman_request_delete_profile(const char* profile_name);
+int connman_request_scan(void);
+int connman_request_scan_mode_set(net_wifi_background_scan_mode_t scan_mode);
+int connman_request_wps_connection(const char *profile_name);
+int connman_request_state_get(const char* profil_name);
+
+#endif
diff --git a/sources/libraries/WlanManager/EngineManager/include/connman-response.h b/sources/libraries/WlanManager/EngineManager/include/connman-response.h
new file mode 100644 (file)
index 0000000..3c7a365
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#ifndef __CONNMAN_RESPONSE_H__
+#define __CONNMAN_RESPONSE_H__
+
+#include "connman-request.h"
+
+void network_evt_cb(net_event_info_t* event_cb, void* user_data);
+
+#endif
diff --git a/sources/libraries/WlanManager/wlan-manager/include/wlan_manager.h b/sources/libraries/WlanManager/wlan-manager/include/wlan_manager.h
new file mode 100644 (file)
index 0000000..becd171
--- /dev/null
@@ -0,0 +1,268 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#ifndef __WIFI_WLAN_MANAGER_H__
+#define __WIFI_WLAN_MANAGER_H__
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include <glib.h>
+#include <dbus/dbus-glib.h>
+#include "connman-request.h"
+#include "connman-response.h"
+#include "connman-profile-manager.h"
+
+typedef void* DEVICE_OBJECT;
+
+#ifndef _BOOLEAN_TYPE_H_
+#define _BOOLEAN_TYPE_H_
+typedef unsigned short boolean;
+#endif /** _BOOLEAN_TYPE_H_ */
+
+
+typedef enum {
+       WLAN_MANAGER_ERR_NONE = 0,
+       WLAN_MANAGER_ERR_UNKNOWN,
+       WLAN_MANAGER_ERR_INVALID_PARAM,
+       WLAN_MANAGER_ERR_ALREADY_REGISTERED,
+       WLAN_MANAGER_ERR_CONNECT_PASSWORD_NEEDED,
+       WLAN_MANAGER_ERR_CONNECT_EAP_SEC_TYPE,
+       WLAN_MANAGER_ERR_MOBILE_HOTSPOT_OCCUPIED,
+       WLAN_MANAGER_ERR_NOSERVICE
+} WLAN_MANAGER_ERR_TYPE;
+
+typedef enum {
+       IP_TYPE_NULL,
+       IP_TYPE_STATIC_IP,
+       IP_TYPE_DHCP_IP,
+       IP_TYPE_MAX
+} IP_TYPES;
+
+typedef enum {
+       SIGNAL_STRENGTH_TYPE_EXCELLENT,
+       SIGNAL_STRENGTH_TYPE_GOOD,
+       SIGNAL_STRENGTH_TYPE_WEAK,
+       SIGNAL_STRENGTH_TYPE_VERY_WEAK,
+       SIGNAL_STRENGTH_TYPE_NULL
+} STRENGTH_TYPES;
+
+/*
+ * JOIN TYPE, SECURITY TYPE and EAP_TYPE
+ *
+ * Determine it`s security type
+ * It should be merged into one enumerations
+*/
+typedef enum {
+       SECURITY_TYPE_NONE=0x01,
+       SECURITY_TYPE_WEP,
+       SECURITY_TYPE_WPA_PSK,
+       SECURITY_TYPE_WPA2_PSK,
+
+       SECURITY_TYPE_WPA_EAP,
+       SECURITY_TYPE_WPA2_EAP,
+
+       SECURITY_TYPE_MAX,
+       SECURITY_TYPE_NULL
+} SECURITY_TYPES;
+
+typedef enum {
+       WLAN_MANAGER_EAP_TYPE_NONE, /* only use it`s WPA number */
+       WLAN_MANAGER_EAP_TYPE_TLS,
+       WLAN_MANAGER_EAP_TYPE_TTLS_PAP,         /** PAP is tunneled protocol */
+       WLAN_MANAGER_EAP_TYPE_TTLS_CHAP,             /** CHAP is tunneled protocol */
+       WLAN_MANAGER_EAP_TYPE_TTLS_MSCHAP,           /** MSCHAP is tunneled protocol */
+       WLAN_MANAGER_EAP_TYPE_TTLS_MSCHAPV2,         /** MSCHAPV2 is tunneled protocol */
+
+       /** Define EAP-TTLS and tunneled EAP sub types here */
+       WLAN_MANAGER_EAP_TYPE_TTLS_EAP_GTC,     /** EAP_GTC is tunneled protocol */
+       WLAN_MANAGER_EAP_TYPE_TTLS_EAP_MD5,          /** EAP_MD5 is tunneled protocol */
+       WLAN_MANAGER_EAP_TYPE_TTLS_EAP_MSCHAPV2,     /** EAP_MSCHAPV2 is tunneled protocol */
+
+       /** Define EAP-PEAP version 0 */
+       WLAN_MANAGER_EAP_TYPE_PEAP0_MSCHAPV2,   /** MSCHAPV2 is tunneled protocol, PEAP version is 0 */
+       WLAN_MANAGER_EAP_TYPE_PEAP0_MD5,             /** MD5 is tunneled protocol, PEAP version is 0 */
+       WLAN_MANAGER_EAP_TYPE_PEAP0_GTC,             /** GTC is tunneled protocol, PEAP version is 0 */
+
+       /** Define EAP-PEAP version 1 */
+       WLAN_MANAGER_EAP_TYPE_PEAP1_MSCHAPV2,   /** MSCHAPV2 is tunneled protocol, PEAP version is 1 */
+       WLAN_MANAGER_EAP_TYPE_PEAP1_MD5,             /** MD5 is tunneled protocol, PEAP version is 1 */
+       WLAN_MANAGER_EAP_TYPE_PEAP1_GTC,             /** GTC is tunneled protocol, PEAP version is 1 */
+       WLAN_MANAGER_EAP_TYPE_MAX,
+       WLAN_MANAGER_EAP_TYPE_ERROR
+} WLAN_MANAGER_EAP_TYPES;
+
+/*
+ * RESPONSES
+ */
+typedef enum {
+       WLAN_MANAGER_RESPONSE_TYPE_NONE,
+       WLAN_MANAGER_RESPONSE_TYPE_CONNECTING,
+       WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_OK,
+       WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_FAIL_IN_PROGRESS,
+       WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_FAIL_ABORTED,
+       WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_FAIL_ALREADY_EXIST,
+       WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_FAIL_TIMEOUT,
+       WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_FAIL_UNKNOWN,
+       WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_FAIL_UNKNOWN_METHOD,
+       WLAN_MANAGER_RESPONSE_TYPE_DISCONNECTION_OK,
+       WLAN_MANAGER_RESPONSE_TYPE_POWER_ON_OK,
+       WLAN_MANAGER_RESPONSE_TYPE_POWER_ON_NOT_SUPPORTED,
+       WLAN_MANAGER_RESPONSE_TYPE_POWER_ON_RESTRICTED,
+       WLAN_MANAGER_RESPONSE_TYPE_POWER_OFF_OK,
+       WLAN_MANAGER_RESPONSE_TYPE_SCAN_OK,
+       WLAN_MANAGER_RESPONSE_TYPE_WPS_ENROLL_OK,
+       WLAN_MANAGER_RESPONSE_TYPE_WPS_ENROLL_FAIL,
+       WLAN_MANAGER_RESPONSE_TYPE_CANCEL_WPS_ENROLL_OK,
+       WLAN_MANAGER_RESPONSE_TYPE_CANCEL_WPS_ENROLL_FAIL,
+       WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_IND,
+       WLAN_MANAGER_RESPONSE_TYPE_DISCONNECTION_IND,
+       WLAN_MANAGER_RESPONSE_TYPE_SCAN_RESULT_IND,
+       WLAN_MANAGER_RESPONSE_TYPE_MAC_ID_IND,
+       WLAN_MANAGER_RESPONSE_TYPE_MAX
+} WLAN_MANAGER_RESPONSE_TYPES;
+
+#define WLAN_RSSI_LEVEL_EXCELLENT      64
+#define WLAN_RSSI_LEVEL_GOOD                   59
+#define WLAN_RSSI_LEVEL_WEAK                   34
+
+#define WLAN_PROXY_LEN_MAX 64
+
+typedef struct {
+       DBusGProxy *proxy;
+       DBusGProxyCall * pending_call;
+       boolean is_handled;
+} wifi_pending_call_info_t;
+
+wifi_pending_call_info_t       g_pending_call;
+
+typedef struct _wifi_device_info_t {
+       char* profile_name;
+       char* ssid;
+       int ipconfigtype;
+       int rssi;
+       int security_mode;
+       boolean wps_mode;
+} wifi_device_info_t;
+
+typedef struct {
+       char* profile_name;
+       WLAN_MANAGER_RESPONSE_TYPES type;
+} callback_data;
+
+typedef struct {
+       char* password;
+       char* category;
+       char* subcategory;
+       char* username;
+       char* userpassword;
+       char* ca_cert_filename;
+       char* client_cert_filename;
+       char* private_key;
+       char* private_key_password;
+       int wlan_eap_type;
+} wlan_manager_password_data;
+
+/* it should be implement. */
+typedef enum {
+       WLAN_MANAGER_ERROR=0x01,
+       WLAN_MANAGER_OFF,
+       WLAN_MANAGER_UNCONNECTED,
+       WLAN_MANAGER_CONNECTED,
+       WLAN_MANAGER_CONNECTING,
+       WLAN_MANAGER_DISCONNECTING,
+       WLAN_MANAGER_MAX
+} WLAN_MANAGER_STATES;
+
+
+struct access_point_info {
+       char* profile_name;
+       char* ssid;
+};
+
+/** It should be hide to others */
+typedef struct wlan_manager_object {
+
+       void (*message_func)(void *user_data, void *data);
+       void (*refresh_func)(int is_scan);
+
+       /* AP SSID  & saved profile */
+       /** should be changed to DEVICE_OBJECT **/
+       struct access_point_info connected_AP;
+
+} wlan_manager_object;
+
+/////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////////////
+// FUNCTIONS 
+/////////////////////////////////////////////////////////////////
+
+
+wlan_manager_object* wlan_manager_get_singleton(void);
+void* wlan_manager_create();
+int wlan_manager_destroy();
+int wlan_manager_start();
+
+int wlan_manager_state_get(char* profile_name);
+void wlan_manager_set_message_callback(void *func);
+void wlan_manager_set_refresh_callback(void *func);
+
+void wlan_manager_set_connected_AP(const net_profile_info_t *profile);
+void wlan_manager_reset_connected_AP(void);
+const char *wlan_manager_get_connected_profile(void);
+const char *wlan_manager_get_connected_ssid(void);
+
+// * request
+int wlan_manager_request_power_on(void);
+int wlan_manager_request_power_off(void);
+int wlan_manager_request_connection(void *data);
+int wlan_manager_request_disconnection(void *data);
+int wlan_manager_request_cancel_connecting(const char *profile_name);
+int wlan_manager_request_scan(void);
+int wlan_manager_request_wps_connection(const char *profile_name);
+int wlan_manager_request_cancel_wps_connection(const char *profile_name);
+
+// * connect, disconnect and forget
+int wlan_manager_connect_with_profile(const char *profile_name);
+int wlan_manager_connect_with_password(const char *profile_name, int security_mode, void* authdata);
+int wlan_manager_disconnect(void* data);
+int wlan_manager_forget(const char *profile_name);
+void *wlan_manager_profile_table_get();
+
+// * profile add/modify/delete
+int wlan_manager_request_profile_add(const char *profile_name, int security_mode, void* authdata);
+int wlan_manager_profile_modify_by_device_info(net_profile_info_t profiles);
+
+STRENGTH_TYPES wlan_manager_get_signal_strength(int rssi);
+
+//// profile refresh /////////////////////////////////////////////
+void wlan_manager_scanned_profile_refresh(boolean view_update);
+int wlan_manager_scanned_profile_refresh_with_count(int count);
+int wlan_manager_profile_scanned_length_get();
+void *wlan_manager_profile_device_info_blank_create(void);
+
+int wlan_manager_network_syspopup_message(const char *title, const char *content);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __WIFI_REQUEST_HANDLER_H__ */
diff --git a/sources/libraries/WlanManager/wlan-manager/wlan_manager.c b/sources/libraries/WlanManager/wlan-manager/wlan_manager.c
new file mode 100644 (file)
index 0000000..9df4b68
--- /dev/null
@@ -0,0 +1,479 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#include <syspopup_caller.h>
+#include "common.h"
+#include "wlan_manager.h"
+#include "wifi-setting.h"
+
+
+int ts_temp, ts_first, ts_middle, ts_last; 
+struct timeval ex_tv; 
+
+static wlan_manager_object* manager_object = NULL;
+
+static int _power_on(void);
+
+
+wlan_manager_object* wlan_manager_get_singleton(void)
+{
+       if (NULL == manager_object) {
+               manager_object = (wlan_manager_object *)g_malloc0(sizeof(wlan_manager_object));
+               manager_object->message_func = NULL;
+               manager_object->refresh_func = NULL;
+       }
+
+       return manager_object;
+}
+
+int wlan_manager_connect_with_profile(const char *profile_name)
+{
+       if (profile_name == NULL) {
+               return WLAN_MANAGER_ERR_INVALID_PARAM;
+       }
+
+       return connman_request_connection_open(profile_name);
+}
+
+int wlan_manager_connect_with_password(const char *profile_name, int security_mode, void *authdata)
+{
+       if (profile_name == NULL) {
+               ERROR_LOG(UG_NAME_SCAN, "profile name is NULL");
+               return WLAN_MANAGER_ERR_INVALID_PARAM;
+       }
+
+       int ret = wlan_manager_request_profile_add(profile_name, security_mode, authdata);
+       if (ret == WLAN_MANAGER_ERR_NONE) {
+               ret = connman_request_connection_open(profile_name);
+               if (ret == WLAN_MANAGER_ERR_NONE) {
+                       INFO_LOG(UG_NAME_RESP, "====  open_connection() request Success for profile [%s]", profile_name);
+                       __COMMON_FUNC_EXIT__;
+                       return WLAN_MANAGER_ERR_NONE;
+               } else {
+                       ERROR_LOG(UG_NAME_RESP, "====  open_connection() request Failed for profile [%s]", profile_name);
+                       __COMMON_FUNC_EXIT__;
+                       return WLAN_MANAGER_ERR_UNKNOWN;
+               }
+       } else {
+               __COMMON_FUNC_EXIT__;
+               return WLAN_MANAGER_ERR_UNKNOWN;
+       }
+}
+
+int wlan_manager_disconnect(void* data)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (data == NULL) {
+               __COMMON_FUNC_EXIT__;
+               return FALSE;
+       }
+
+       wifi_device_info_t *di_s = (wifi_device_info_t *)data;
+
+       INFO_LOG(UG_NAME_RESP, "Closing connection with profile name [%s]", di_s->profile_name);
+
+       int ret = connman_request_connection_close(di_s->profile_name);
+       if (ret != WLAN_MANAGER_ERR_NONE) {
+               ERROR_LOG(UG_NAME_RESP, "Error..!!! Closing connection. Error Reason [%d]", ret);
+               __COMMON_FUNC_EXIT__;
+               return WLAN_MANAGER_ERR_UNKNOWN;
+       } else {
+               __COMMON_FUNC_EXIT__;
+               return WLAN_MANAGER_ERR_NONE;
+       }
+}
+
+int wlan_manager_forget(const char *profile_name)
+{
+       if (profile_name == NULL)
+               return 0;
+
+       int favourite = 0;
+       int ret = connman_profile_manager_check_favourite(profile_name, &favourite);
+       if (ret != WLAN_MANAGER_ERR_NONE)
+               return 0;
+
+       if (favourite) {
+               INFO_LOG(UG_NAME_RESP, "favourite AP\n");
+               connman_request_delete_profile(profile_name);
+       } else {
+               INFO_LOG(UG_NAME_RESP, "No favourite AP\n");
+       }
+
+       return 1;
+}
+
+void wlan_manager_set_refresh_callback(void *func)
+{
+       wlan_manager_object* manager_object = wlan_manager_get_singleton();
+       manager_object->refresh_func = func;
+}
+
+void wlan_manager_set_message_callback(void *func)
+{
+       wlan_manager_object* manager_object = wlan_manager_get_singleton();
+       manager_object->message_func = func;
+}
+
+void* wlan_manager_create()
+{
+       wlan_manager_get_singleton();
+       return NULL;
+}
+
+int wlan_manager_destroy()
+{
+       int ret = connman_request_deregister();
+       if (ret == WLAN_MANAGER_ERR_NONE) {
+               connman_profile_manager_destroy();
+       }
+
+       return ret;
+}
+
+int wlan_manager_start()
+{
+       __COMMON_FUNC_ENTER__;
+
+       int ret = WLAN_MANAGER_ERR_NONE;
+       char profile_name[NET_PROFILE_NAME_LEN_MAX+1] = "";
+
+       ret = connman_request_register();
+       if (ret != WLAN_MANAGER_ERR_NONE) {
+               ERROR_LOG(UG_NAME_ERR, "[Failed] Register");
+               return ret;
+       }
+
+       int state = wlan_manager_state_get(profile_name);
+       switch (state) {
+       case WLAN_MANAGER_OFF:
+               INFO_LOG(UG_NAME_NORMAL, "WIFI_OFF\n");
+               break;
+       case WLAN_MANAGER_UNCONNECTED:
+               INFO_LOG(UG_NAME_NORMAL, "WIFI_ON\n");
+
+               ret = wlan_manager_request_scan();
+               if (ret == WLAN_MANAGER_ERR_NONE) {
+                       INFO_LOG(UG_NAME_NORMAL, "Scan [OK]");
+               } else {
+                       ERROR_LOG(UG_NAME_NORMAL, "Scan [FAIL]");
+               }
+               break;
+       case WLAN_MANAGER_CONNECTED:
+               INFO_LOG(UG_NAME_NORMAL, "WIFI_CONNECTED\n");
+
+               if (!connman_profile_manager_connected_ssid_set((const char *)profile_name))
+                       ERROR_LOG(UG_NAME_NORMAL, "Fail to get profile_name of connected AP\n");
+
+               ret = wlan_manager_request_scan();
+               if (ret == WLAN_MANAGER_ERR_NONE) {
+                       INFO_LOG(UG_NAME_NORMAL, "Scan [OK]");
+               } else {
+                       ERROR_LOG(UG_NAME_NORMAL, "Scan [FAIL]");
+               }
+               break;
+       case WLAN_MANAGER_CONNECTING:
+               INFO_LOG(UG_NAME_NORMAL, "WIFI_CONNECTING\n");
+
+               ret = wlan_manager_request_scan();
+               if (ret == WLAN_MANAGER_ERR_NONE) {
+                       INFO_LOG(UG_NAME_NORMAL, "Scan [OK]");
+               } else {
+                       ERROR_LOG(UG_NAME_NORMAL, "Scan [FAIL]");
+               }
+               break;
+       default:
+               INFO_LOG(UG_NAME_NORMAL, "WIFI STATE ERROR\n");
+       }
+       
+       return WLAN_MANAGER_ERR_NONE;
+}
+
+int wlan_manager_state_get(char* profile_name)
+{
+       return connman_request_state_get(profile_name);
+}
+
+int wlan_manager_request_power_on(void)
+{
+       __COMMON_FUNC_ENTER__;
+       INFO_LOG(UG_NAME_REQ, "power on\n");
+       
+       int ret =  _power_on();
+
+       __COMMON_FUNC_EXIT__;
+       return ret;
+}
+
+int wlan_manager_request_power_off()
+{
+       return connman_request_power_off();
+}
+
+int wlan_manager_request_cancel_wps_connection(const char *profile_name)
+{
+       int ret = connman_request_connection_close(profile_name);
+       return ret;
+}
+
+int wlan_manager_request_wps_connection(const char *profile_name)
+{
+       int ret = connman_request_wps_connection(profile_name);
+       return ret;
+}
+
+int wlan_manager_request_connection(void* data)
+{
+       __COMMON_FUNC_ENTER__;
+
+       wifi_device_info_t *device_info = (wifi_device_info_t*)data;
+
+       int favourite;
+       int ret = connman_profile_manager_check_favourite(device_info->profile_name, &favourite);
+       if (ret == WLAN_MANAGER_ERR_NONE) {
+               if (favourite) {
+                       INFO_LOG(UG_NAME_REQ, "existed the profile");
+                       return wlan_manager_connect_with_profile(device_info->profile_name);
+               } else {
+                       INFO_LOG(UG_NAME_REQ, "no existed the profile");
+                       if (device_info->security_mode == WLAN_SEC_MODE_NONE) {
+                               return wlan_manager_connect_with_profile(device_info->profile_name);
+                       } else if (device_info->security_mode == WLAN_SEC_MODE_IEEE8021X) {
+                               return WLAN_MANAGER_ERR_CONNECT_EAP_SEC_TYPE;
+                       } else {
+                               return WLAN_MANAGER_ERR_CONNECT_PASSWORD_NEEDED;
+                       }
+               }
+       } else {
+               return WLAN_MANAGER_ERR_NOSERVICE;
+       }
+}
+
+int wlan_manager_request_disconnection(void* data)
+{
+       __COMMON_FUNC_ENTER__;
+       INFO_LOG(UG_NAME_REQ, "request disconnection");
+
+       if ((wlan_manager_disconnect(data)) != WLAN_MANAGER_ERR_NONE) {
+               return WLAN_MANAGER_ERR_UNKNOWN;
+       }
+
+       return WLAN_MANAGER_ERR_NONE;
+}
+
+int wlan_manager_request_cancel_connecting(const char *profile_name)
+{
+       return connman_request_connection_close(profile_name);
+}
+
+int wlan_manager_request_scan(void)
+{
+       return connman_request_scan();
+}
+
+int wlan_manager_request_profile_add(const char *profile_name, int security_mode, void *authdata)
+{
+       wlan_manager_password_data* auth = (wlan_manager_password_data*) authdata;
+       if (auth != NULL) {
+               INFO_LOG(UG_NAME_SCAN, "name [%s]", auth->username);
+               INFO_LOG(UG_NAME_SCAN, "name [%s]", auth->userpassword);
+       }
+
+       if (security_mode != WLAN_SEC_MODE_NONE) {
+               if (connman_profile_manager_profile_modify_auth(profile_name, authdata, security_mode)) {
+                       DEBUG_LOG(COMMON_NAME_LIB, "Success - profile modify");
+                       return WLAN_MANAGER_ERR_NONE;
+               }
+               else {
+                       DEBUG_LOG(COMMON_NAME_LIB, "Failed - profile modify");
+                       return WLAN_MANAGER_ERR_UNKNOWN;
+               }
+       }
+
+       return WLAN_MANAGER_ERR_UNKNOWN;
+}
+
+void* wlan_manager_profile_table_get()
+{
+       return connman_profile_manager_profile_table_get();
+}
+
+int wlan_manager_profile_modify_by_device_info(net_profile_info_t profile)
+{
+       if (connman_profile_manager_profile_modify(profile)) {
+               DEBUG_LOG(COMMON_NAME_LIB, "Success - profile modify");
+               return WLAN_MANAGER_ERR_NONE;
+       }
+       else {
+               DEBUG_LOG(COMMON_NAME_LIB, "Failed - profile modify");
+               return WLAN_MANAGER_ERR_UNKNOWN;
+       }
+}
+
+int wlan_manager_scanned_profile_refresh_with_count(int count)
+{
+       __COMMON_FUNC_ENTER__;
+
+       int ret = connman_profile_manager_profile_cache(count);
+       if (ret > 0) {
+               DEBUG_LOG(COMMON_NAME_LIB, "success %d profiles update", count);
+               manager_object->refresh_func(FALSE);
+       }
+
+       __COMMON_FUNC_EXIT__;
+
+       /* the return value should be FALSE - ecore_idler_callback function */
+       return FALSE;
+}
+
+void wlan_manager_scanned_profile_refresh(boolean view_update)
+{
+       __COMMON_FUNC_ENTER__;
+
+       int ret = connman_profile_manager_profile_cache(0);
+       if (ret > 0) {
+               DEBUG_LOG(COMMON_NAME_LIB, "success profiles update");
+               if (view_update)
+                       manager_object->refresh_func(TRUE);
+       }
+
+       __COMMON_FUNC_EXIT__;
+}
+
+STRENGTH_TYPES wlan_manager_get_signal_strength(int rssi)
+{
+       if (rssi > WLAN_RSSI_LEVEL_EXCELLENT) {
+               return SIGNAL_STRENGTH_TYPE_EXCELLENT;
+       } else if (rssi > WLAN_RSSI_LEVEL_GOOD) {
+               return SIGNAL_STRENGTH_TYPE_GOOD;
+       } else if (rssi > WLAN_RSSI_LEVEL_WEAK) {
+               return SIGNAL_STRENGTH_TYPE_WEAK;
+       } else {
+               return SIGNAL_STRENGTH_TYPE_VERY_WEAK;
+       }
+}
+
+void* wlan_manager_profile_device_info_blank_create()
+{
+       wifi_device_info_t *di_s0 = NULL;
+       di_s0 = malloc(sizeof(wifi_device_info_t));
+
+       if (di_s0 == NULL) {
+               ERROR_LOG(UG_NAME_NORMAL, "Error!!! Failed to allocate memory\n");
+               __COMMON_FUNC_EXIT__;
+               return NULL;
+       }
+
+       char No_AP_found[] = "No AP found";
+
+       memset(di_s0, 0x0, sizeof(wifi_device_info_t));
+       di_s0->ssid = malloc(sizeof(No_AP_found));
+
+       if (di_s0->ssid == NULL) {
+               g_free(di_s0);
+               di_s0 = NULL;
+               ERROR_LOG(UG_NAME_NORMAL, "Error!!! Failed to allocate memory\n");
+               __COMMON_FUNC_EXIT__;
+               return NULL;
+       }
+
+       strncpy(di_s0->ssid, No_AP_found, sizeof(No_AP_found));
+
+       return (void*) di_s0;
+}
+
+int wlan_manager_profile_scanned_length_get()
+{
+       return connman_profile_manager_scanned_profile_table_size_get();
+}
+
+static int _power_on(void)
+{
+       int mobile_hotspot = 0;
+       int ret = 0;
+       
+       mobile_hotspot = wifi_setting_value_get("memory/mobile_hotspot/mode");
+       switch(mobile_hotspot){
+               case VCONFKEY_MOBILE_HOTSPOT_MODE_NONE:
+               case VCONFKEY_MOBILE_HOTSPOT_MODE_USB:
+               case VCONFKEY_MOBILE_HOTSPOT_MODE_BT:
+                       INFO_LOG(COMMON_NAME_LIB, "mobile_hotspot OFF - wifi power on");
+                       ret = connman_request_power_on();
+                       return ret;
+               case VCONFKEY_MOBILE_HOTSPOT_MODE_WIFI:
+                       INFO_LOG(COMMON_NAME_LIB, "mobile_hotspot wifi ON");
+                       return WLAN_MANAGER_ERR_MOBILE_HOTSPOT_OCCUPIED;
+               default:
+                       INFO_LOG(COMMON_NAME_LIB, "mobile_hotspot status unknown");
+                       ret = connman_request_power_on();
+                       return ret;
+       }
+}
+
+void wlan_manager_set_connected_AP(const net_profile_info_t *profile)
+{
+       wlan_manager_object* obj = wlan_manager_get_singleton();
+
+       g_free(obj->connected_AP.profile_name);
+       obj->connected_AP.profile_name = strdup(profile->ProfileName);
+       g_free(obj->connected_AP.ssid);
+       obj->connected_AP.ssid = strdup(profile->ProfileInfo.Wlan.essid);
+
+       INFO_LOG(UG_NAME_REQ, "Profile ESSID = [%s]\n", obj->connected_AP.ssid);
+}
+
+void wlan_manager_reset_connected_AP(void)
+{
+       wlan_manager_object* obj = wlan_manager_get_singleton();
+
+       g_free(obj->connected_AP.profile_name);
+       obj->connected_AP.profile_name = NULL;
+       g_free(obj->connected_AP.ssid);
+       obj->connected_AP.ssid = NULL;
+
+       INFO_LOG(UG_NAME_REQ, "clear connected AP information\n");
+}
+
+const char *wlan_manager_get_connected_profile(void)
+{
+       wlan_manager_object* obj = wlan_manager_get_singleton();
+
+       return (const char *)obj->connected_AP.profile_name;
+}
+
+const char *wlan_manager_get_connected_ssid(void)
+{
+       wlan_manager_object* obj = wlan_manager_get_singleton();
+
+       return (const char *)obj->connected_AP.ssid;
+}
+
+int wlan_manager_network_syspopup_message(const char *title, const char *content)
+{
+       int ret = 0;
+       bundle *b = bundle_create();
+
+       bundle_add(b, "_SYSPOPUP_TITLE_", title);
+       bundle_add(b, "_SYSPOPUP_CONTENT_", content);
+
+       ret = syspopup_launch("net-popup", b);
+       bundle_free(b);
+
+       return ret;
+}
diff --git a/sources/libraries/appcoreWrapper/appcoreWrapper.c b/sources/libraries/appcoreWrapper/appcoreWrapper.c
new file mode 100644 (file)
index 0000000..caee0b7
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#include "common.h"
+#include "appcoreWrapper.h"
+
+
+void appcore_win_del(void *data, Evas_Object *obj, void *event)
+{
+       INFO_LOG(UG_NAME_NORMAL, "win_del" );
+       elm_exit();
+}
+
+Evas_Object* appcore_create_win(const char *name)
+{
+       Evas_Object *eo;
+       int w, h;
+
+       eo = elm_win_add(NULL, name, ELM_WIN_BASIC);
+       if (eo) {
+               elm_win_title_set(eo, name);
+               elm_win_borderless_set(eo, EINA_TRUE);
+               evas_object_smart_callback_add(eo, "delete,request",
+                               (Evas_Smart_Cb)appcore_win_del, NULL);
+               ecore_x_window_size_get(ecore_x_window_root_first_get(),
+                               &w, &h);
+               evas_object_resize(eo, w, h);
+       }
+
+       return eo;
+}
+
+Evas_Object* appcore_load_edj(Evas_Object *parent, const char *file, const char *group)
+{
+       Evas_Object *eo;
+       int r;
+
+       eo = elm_layout_add(parent);
+       if (eo) {
+               r = elm_layout_file_set(eo, file, group);
+               if (!r) {
+                       evas_object_del(eo);
+                       return NULL;
+               }
+
+               evas_object_size_hint_weight_set(eo,
+                               EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       }
+
+       return eo;
+}
+
+
diff --git a/sources/libraries/appcoreWrapper/include/appcoreWrapper.h b/sources/libraries/appcoreWrapper/include/appcoreWrapper.h
new file mode 100644 (file)
index 0000000..5406a82
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#ifndef __APPCORE_WRAPPER_H_
+#define __APPCORE_WRAPPER_H_
+
+#include <Ecore_X.h>
+
+void appcore_win_del(void *data, Evas_Object *obj, void *event);
+Evas_Object* appcore_create_win(const char *name);
+Evas_Object* appcore_load_edj(Evas_Object *parent, const char *file,const char *group);
+
+#endif
diff --git a/sources/libraries/i18nManager/i18nmanager.c b/sources/libraries/i18nManager/i18nmanager.c
new file mode 100644 (file)
index 0000000..60ae0ea
--- /dev/null
@@ -0,0 +1,155 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#include "i18nmanager.h"
+#include <libintl.h>
+#include <stdio.h>
+#include <string.h>
+
+static char* apply_i18n(const char *pkg_name, I18N_MODES mode, const char *string)
+{
+       switch (mode) {
+       case I18N_MODE_SELF_MADE:
+               return (char*) dgettext(pkg_name, string);
+       case I18N_MODE_NO_NEEDED:
+               return (char*) gettext(string);
+       default:
+               return "(debug)applying_i18n_failed";
+       }
+}
+
+static char* i18n_get_text_by_system(I18N_TYPES type){
+       switch (type) {
+       case I18N_TYPE_Ok:
+               return (char*)dgettext("sys_string", "IDS_COM_SK_OK");
+       case I18N_TYPE_Yes:
+               return (char*)dgettext("sys_string", "IDS_COM_SK_YES");
+       case I18N_TYPE_No:
+               return (char*)dgettext("sys_string", "IDS_COM_SK_NO");
+       case I18N_TYPE_Save:
+               return (char*)dgettext("sys_string", "IDS_COM_OPT_SAVE");
+       case I18N_TYPE_Done:
+               return (char*)dgettext("sys_string", "IDS_COM_SK_DONE");
+       case I18N_TYPE_Back:
+               return (char*)dgettext("sys_string", "IDS_COM_BODY_BACK");
+       case I18N_TYPE_Cancel:
+               return (char*)dgettext("sys_string", "IDS_COM_SK_CANCEL");
+       case I18N_TYPE_Activating:
+               return (char*)dgettext("sys_string", "IDS_COM_POP_ACTIVATING");
+       case I18N_TYPE_Connecting:
+               return (char*)dgettext("sys_string", "IDS_COM_POP_CONNECTING");
+       case I18N_TYPE_Connected:
+               return (char*)dgettext("sys_string", "IDS_COM_POP_CONNECTED");
+       case I18N_TYPE_Searching:
+               return (char*)dgettext("sys_string", "IDS_COM_POP_SEARCHING");
+       case I18N_TYPE_Wi_Fi:
+               return (char*)dgettext("sys_string", "IDS_COM_BODY_WI_FI");
+       case I18N_TYPE_Name:
+               return (char*)dgettext("sys_string", "IDS_COM_BODY_DETAILS_NAME");
+       case I18N_TYPE_Password:
+               return (char*)dgettext("sys_string", "IDS_COM_BODY_PASSWORD");
+       default:
+               return "(debug)system_text_failed";
+       }
+}
+
+char* i18n_manager_get_text(const char *pkg_name, I18N_TYPES type)
+{
+       switch (type) {
+       case I18N_TYPE_Ok:
+       case I18N_TYPE_Yes:
+       case I18N_TYPE_No:
+       case I18N_TYPE_Save:
+       case I18N_TYPE_Done:
+       case I18N_TYPE_Back:
+       case I18N_TYPE_Cancel:
+       case I18N_TYPE_Name:
+       case I18N_TYPE_Wi_Fi:
+       case I18N_TYPE_Password:
+       case I18N_TYPE_Activating:
+       case I18N_TYPE_Connecting:
+       case I18N_TYPE_Connected:
+       case I18N_TYPE_Searching:
+               return i18n_get_text_by_system(type);
+
+       case I18N_TYPE_Scan:
+               return apply_i18n(pkg_name, I18N_MODE_SELF_MADE, "IDS_ST_BODY_SCAN");
+       case I18N_TYPE_Forget:
+               return apply_i18n(pkg_name, I18N_MODE_SELF_MADE, "IDS_WIFI_SK_FORGET");
+       case I18N_TYPE_Dynamic_IP:
+               return apply_i18n(pkg_name, I18N_MODE_SELF_MADE, "IDS_WIFI_BODY_DYNAMIC_IP");
+       case I18N_TYPE_Static_IP:
+               return apply_i18n(pkg_name, I18N_MODE_SELF_MADE, "IDS_WIFI_BODY_STATIC_IP");
+       case I18N_TYPE_Security_type:
+               return apply_i18n(pkg_name, I18N_MODE_SELF_MADE, "IDS_WIFI_BODY_SECURITY_TYPE");
+       case I18N_TYPE_Excellent:
+               return apply_i18n(pkg_name, I18N_MODE_SELF_MADE, "IDS_ST_BODY_EXCELLENT");
+       case I18N_TYPE_Good:
+               return apply_i18n(pkg_name, I18N_MODE_SELF_MADE, "IDS_ST_BODY_GOOD_M_STRENGTH");
+       case I18N_TYPE_Week:
+               return apply_i18n(pkg_name, I18N_MODE_SELF_MADE, "IDS_WIFI_BODY_WEAK_M_STRENGTH");
+       case I18N_TYPE_Disconnecting:
+               return apply_i18n(pkg_name, I18N_MODE_SELF_MADE, "IDS_WIFI_BODY_DISCONNECTING_ING");
+       case I18N_TYPE_Hidden_AP:
+               return apply_i18n(pkg_name, I18N_MODE_SELF_MADE, "IDS_WIFI_HEADER_HIDDEN_NETWORK");
+       case I18N_TYPE_No_AP:
+               return apply_i18n(pkg_name, I18N_MODE_SELF_MADE, "IDS_WIFI_BODY_NO_APS");
+       case I18N_TYPE_Signal_strength:
+               return apply_i18n(pkg_name, I18N_MODE_SELF_MADE, "IDS_WIFI_BODY_SIGNAL_STRENGTH");
+       case I18N_TYPE_IP_address:
+               return apply_i18n(pkg_name, I18N_MODE_SELF_MADE, "IDS_WIFI_BODY_IP_ADDRESS");
+       case I18N_TYPE_Proxy_address:
+               return apply_i18n(pkg_name, I18N_MODE_SELF_MADE, "IDS_WIFI_HEADER_PROXY_ADDRESS");
+       case I18N_TYPE_Subnet_mask:
+               return apply_i18n(pkg_name, I18N_MODE_SELF_MADE, "IDS_WIFI_BODY_SUBNET_MASK");
+       case I18N_TYPE_DNS_1:
+               return apply_i18n(pkg_name, I18N_MODE_SELF_MADE, "IDS_WIFI_BODY_DNS_1");
+       case I18N_TYPE_DNS_2:
+               return apply_i18n(pkg_name, I18N_MODE_SELF_MADE, "IDS_WIFI_BODY_DNS_2");
+       case I18N_TYPE_WEP:
+               return apply_i18n(pkg_name, I18N_MODE_SELF_MADE, "IDS_WIFI_BODY_SECURITYTYPE_WEP");
+       case I18N_TYPE_Gateway:
+               return apply_i18n(pkg_name, I18N_MODE_SELF_MADE, "IDS_WIFI_BODY_GATEWAY");
+       case I18N_TYPE_Deactivating:
+               return apply_i18n(pkg_name, I18N_MODE_SELF_MADE, "IDS_ST_POP_DEACTIVATING_ING");
+       case I18N_TYPE_No_security:
+               return apply_i18n(pkg_name, I18N_MODE_SELF_MADE, "IDS_WIFI_BODY_CONFIGURATION_NO_SECURITY");
+       case I18N_TYPE_Network_notification:
+               return apply_i18n(pkg_name, I18N_MODE_SELF_MADE, "IDS_ST_BODY_NETWORK_NOTIFICATION");
+       case I18N_TYPE_Select_network:
+               return apply_i18n(pkg_name, I18N_MODE_SELF_MADE, "IDS_WIFI_HEADER_SELECT_NETWORK");
+       case I18N_TYPE_Input_password:
+               return apply_i18n(pkg_name, I18N_MODE_SELF_MADE, "IDS_CST_BODY_INPUT_PASSWORD");
+       case I18N_TYPE_Show_password:
+               return apply_i18n(pkg_name, I18N_MODE_SELF_MADE, "IDS_ST_BODY_SHOW_PASSWORD");
+       case I18N_TYPE_Autonomous_connection_to_s_will_be_turned_off_Continue:
+               return apply_i18n(pkg_name, I18N_MODE_SELF_MADE, "IDS_WIFI_POP_FORGETTING_ACCESS_POINT_WILL_PREVENT_FUTURE_AUTOMATIC_CONNECTION_CONTINUE_Q");
+
+       case I18N_TYPE_WPA_PSK:
+               return gettext("WPA-PSK");
+       case I18N_TYPE_WPA2_PSK:
+               return gettext("WPA2-PSK");
+       case I18N_TYPE_WPA_EAP:
+               return gettext("WPA-EAP");
+       case I18N_TYPE_WPA2_EAP:
+               return gettext("WPA2-EAP");
+       default:
+               return "(debugapplying_i18n_failed";
+       }
+}
+
diff --git a/sources/libraries/i18nManager/include/i18nmanager.h b/sources/libraries/i18nManager/include/i18nmanager.h
new file mode 100644 (file)
index 0000000..395cdb3
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#ifndef __I18NMANAGER_H_
+#define __I18NMANAGER_H_
+
+#define sc(pkg_name, I18N_TYPE) i18n_manager_get_text(pkg_name, I18N_TYPE)
+
+typedef enum {
+       I18N_MODE_SELF_MADE, /* self made, reserve to add platform string convert service */
+       I18N_MODE_NO_NEEDED, /* No need to convert other language */
+       I18N_MODE_MAX
+} I18N_MODES;
+
+typedef enum {
+       I18N_TYPE_Ok,
+       I18N_TYPE_Yes,
+       I18N_TYPE_No,
+       I18N_TYPE_Save,
+       I18N_TYPE_Done,
+       I18N_TYPE_Back,
+       I18N_TYPE_Cancel,
+       I18N_TYPE_Scan,
+       I18N_TYPE_Forget,
+       I18N_TYPE_User_ID,
+       I18N_TYPE_IP_address,
+       I18N_TYPE_Static_IP,
+       I18N_TYPE_Dynamic_IP,
+       I18N_TYPE_Proxy_address,
+       I18N_TYPE_Details,
+       I18N_TYPE_Name,
+       I18N_TYPE_Signal_strength,
+       I18N_TYPE_Excellent,
+       I18N_TYPE_Good,
+       I18N_TYPE_Week,
+       I18N_TYPE_No_security,
+       I18N_TYPE_Subnet_mask,
+       I18N_TYPE_Gateway,
+       I18N_TYPE_Wi_Fi,
+       I18N_TYPE_Password,
+       I18N_TYPE_Activating,
+       I18N_TYPE_Deactivating,
+       I18N_TYPE_Searching,
+       I18N_TYPE_Connecting,
+       I18N_TYPE_Connected,
+       I18N_TYPE_Disconnecting,
+       I18N_TYPE_Connection_Lost,
+       I18N_TYPE_Network_notification,
+       I18N_TYPE_Select_network,
+       I18N_TYPE_Input_password,
+       I18N_TYPE_Show_password,
+/* etc */
+       I18N_TYPE_DNS_1,
+       I18N_TYPE_DNS_2,
+       I18N_TYPE_WEP,
+       I18N_TYPE_WPA_PSK,
+       I18N_TYPE_WPA2_PSK,
+       I18N_TYPE_WPA_EAP,
+       I18N_TYPE_WPA2_EAP,
+       I18N_TYPE_Hidden_AP,
+       I18N_TYPE_No_AP,
+       I18N_TYPE_Security_type,
+       I18N_TYPE_Autonomous_connection_to_s_will_be_turned_off_Continue,
+       I18N_TYPE_MAX
+} I18N_TYPES;
+
+char* i18n_manager_get_text(const char *pkg_name, I18N_TYPES type);
+
+#endif
diff --git a/sources/libraries/settingWrapper/include/wifi-setting.h b/sources/libraries/settingWrapper/include/wifi-setting.h
new file mode 100644 (file)
index 0000000..4eca2ef
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#ifndef _WIFI_SETTING_H_
+#define _WIFI_SETTING_H_
+
+#include <vconf-keys.h>
+
+#define WIFI_SETTING_WIFI_CONNECTED_AP_NAME VCONFKEY_WIFI_CONNECTED_AP_NAME
+
+int wifi_setting_value_set(const char *key, int value);
+int wifi_setting_value_get(const char *key);
+
+int wifi_setting_key_notify_set();
+
+#endif //_WIFI_SETTING_H_
diff --git a/sources/libraries/settingWrapper/wifi-setting.c b/sources/libraries/settingWrapper/wifi-setting.c
new file mode 100644 (file)
index 0000000..809ec63
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#include <vconf.h>
+#include "wifi-setting.h"
+#include "common.h"
+
+int wifi_setting_value_set(const char *key, int value) 
+{
+       __COMMON_FUNC_ENTER__;
+
+       INFO_LOG(UG_NAME_NORMAL, "setting value : %d\n", value);
+       
+       if (vconf_set_int(key, value) < 0) {
+               ERROR_LOG(UG_NAME_NORMAL, "Failed to set vconf\n");
+               __COMMON_FUNC_EXIT__;
+               return -1;
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return 0;
+}
+
+int wifi_setting_value_get(const char *key) 
+{
+       __COMMON_FUNC_ENTER__;
+       
+       int value = 0;
+       if (vconf_get_int(key, &value) < 0) {
+               ERROR_LOG(UG_NAME_NORMAL, "Failed to get vconf\n");
+               __COMMON_FUNC_EXIT__;
+               return -1;
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return value;
+}
+
+static void wifi_flight_mode_changed(keynode_t* node, void* user_data)
+{
+       INFO_LOG(UG_NAME_NORMAL, "Airplane mode [%s] \n", node);
+       return;
+}
+
+static void mobile_hotspot_status(keynode_t* node, void* user_data)
+{
+       INFO_LOG(UG_NAME_NORMAL, "MobileAP mode [%s] \n", node);
+}
+
+int wifi_setting_key_notify_set() 
+{
+       vconf_notify_key_changed(VCONFKEY_SETAPPL_FLIGHT_MODE_BOOL, (vconf_callback_fn) wifi_flight_mode_changed, NULL);
+       vconf_notify_key_changed(VCONFKEY_MOBILE_HOTSPOT_MODE, (vconf_callback_fn) mobile_hotspot_status, NULL);
+
+       return TRUE;
+}
+
diff --git a/sources/ui-gadget/CMakeLists.txt b/sources/ui-gadget/CMakeLists.txt
new file mode 100644 (file)
index 0000000..f5e24b1
--- /dev/null
@@ -0,0 +1,59 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(ug-wifi-efl-UG C)
+
+# defines 
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(EXEC_PREFIX "\${prefix}")
+SET(LIBDIR "\${prefix}/lib")
+SET(INCLUDEDIR "\${prefix}/include")
+SET(VERSION 0.1.0)
+
+# source files
+SET(SRCS 
+       ../libraries/settingWrapper/wifi-setting.c
+       ../libraries/i18nManager/i18nmanager.c
+       ../libraries/appcoreWrapper/appcoreWrapper.c
+       ../libraries/WlanManager/wlan-manager/wlan_manager.c
+       ${ENGINE_SOURCES}
+       wifi-efl-UG.c
+       viewers-layout/popup.c
+       viewers-layout/viewer_manager.c 
+       viewers-layout/wifi_viewer_list.c
+       viewers-layout/view_detail.c
+       viewers-layout/view_detail_datamodel.c
+       viewers-layout/view_dhcpip.c
+       viewers-layout/view_staticip.c
+       viewers-layout/view_ime_password.c
+       viewers-layout/view_ime_hidden.c
+       viewers-layout/view_eap.c
+       wifi-wlan-callbacks.c
+       wifi-ui-list-callbacks.c)
+
+FOREACH(flag ${pkgs_CFLAGS})
+       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+
+# add library
+ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION 0.1.0)
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
+
+ADD_CUSTOM_TARGET(wifi_ug_edj_etc.edj
+       COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/../../resources/images
+                               ${CMAKE_CURRENT_SOURCE_DIR}/edcs/wifi_ug_edj_etc.edc ${CMAKE_CURRENT_SOURCE_DIR}/edcs/wifi_ug_edj_etc.edj
+                               DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/edcs/wifi_ug_edj_etc.edc
+)
+
+ADD_DEPENDENCIES(${PROJECT_NAME} wifi_ug_edj_etc.edj)
+
+
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /opt/ug/lib)
+
+# install image files
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../resources/images/ DESTINATION /opt/ug/res/images/wifi-efl-UG FILES_MATCHING PATTERN "*.png")
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/edcs/wifi_ug_edj_etc.edj DESTINATION /opt/ug/res/edje/wifi-efl-UG)
+
+ADD_SUBDIRECTORY(po)
+
diff --git a/sources/ui-gadget/edcs/wifi_ug_edj_etc.edc b/sources/ui-gadget/edcs/wifi_ug_edj_etc.edc
new file mode 100644 (file)
index 0000000..70b5f60
--- /dev/null
@@ -0,0 +1,33 @@
+collections {
+       group {
+               name: "fake_radio";
+               parts {
+                       part { name: "radio";
+                               type: SWALLOW;
+                               scale: 1;
+                               description { 
+                                       state: "default" 0.0;
+                                       fixed: 0 0;
+                                       min: 48 48;
+                                       align: 0.0 0.0;
+                                       rel1 { relative: 0 0; offset: 10 0; }
+                                       rel2 { relative: 1 1; offset: -10 0; }
+                               }
+                       }
+                       part { name: "image";
+                               type: RECT;
+                               scale: 1;
+                               description { 
+                                       state: "default" 0.0;
+                                       fixed: 0 0;
+                                       min: 48 48;
+                                       align: 0.0 0.0;
+                                       rel1 { relative: 0 0; offset: 10 0; }
+                                       rel2 { relative: 1 1; offset: -10 0; }
+                                       color: 0 0 0 0;
+                               }
+                       }
+
+               }
+       }
+}
diff --git a/sources/ui-gadget/include/viewer_list.h b/sources/ui-gadget/include/viewer_list.h
new file mode 100644 (file)
index 0000000..6017fa2
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#ifndef __DEF_VIEWER_LIST_H_
+#define __DEF_VIEWER_LIST_H_
+
+
+#include "viewer_manager.h"
+
+//////// genlist struct data ////////////////////////////////////////////////////////////////////
+typedef struct genlist_data {
+       char* ssid;
+       char* ap_image_path;
+       wifi_device_info_t *device_info;
+       VIEWER_ITEM_RADIO_MODES radio_mode;
+       void* callback_data;
+} genlist_data;
+/////////////////////////////////////////////////////////////////////////////////////////////
+
+
+Evas_Object* viewer_list_create(Evas_Object *win);
+int viewer_list_destroy(void);
+void viewer_list_title_item_del();
+////////////////////////////////////////////////////////////////////////////////////////////////
+
+//////// list item add / remove ///////////////////////////////////////////////////////////////
+int viewer_list_title_item_set(Elm_Object_Item *target);
+Elm_Object_Item* viewer_list_item_set(Evas_Object* list,
+               void* list_data,
+               const char* ssid,
+               const char* ap_image_path,
+               VIEWER_ITEM_RADIO_MODES mode,
+               void (*callback_func)(void*data,Evas_Object*obj,void*event_info),
+               void*callback_data);
+int viewer_list_item_clear();
+////////////////////////////////////////////////////////////////////////////////////////////////
+
+//////// item iteration /////////////////////////////////////////////////////////////////////////
+int viewer_list_item_size_get(void);
+Elm_Object_Item* viewer_list_item_first_get(Evas_Object* list);
+Elm_Object_Item* viewer_list_item_next_get(const Elm_Object_Item* current);
+Elm_Object_Item* viewer_list_item_at_index(int index);
+/////////////////////////////////////////////////////////////////////////////////////////////////
+
+//////// data get/set ///////////////////////////////////////////////////////////////////////////
+int viewer_list_item_data_set(Elm_Object_Item* item, const char* key, void* data);
+void* viewer_list_item_data_get(const Elm_Object_Item* item, const char* key);
+////////////////////////////////////////////////////////////////////////////////////////////////
+
+//////// item control /////////////////////////////////////////////////////////////////////////
+int viewer_list_item_enable_all(void);
+int viewer_list_item_disable_all(void);
+//////////////////////////////////////////////////////////////////////////////////////////////////
+
+Elm_Object_Item* item_get_for_profile_name(char* profile_name);
+
+#endif
+
diff --git a/sources/ui-gadget/include/viewer_manager.h b/sources/ui-gadget/include/viewer_manager.h
new file mode 100644 (file)
index 0000000..0796aa8
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#ifndef __DEF_VIEWER_MANAGER_H_
+#define __DEF_VIEWER_MANAGER_H_
+
+#include <Elementary.h>
+
+
+//////// viewer-manager enumeration /////////////////////////////////////
+typedef enum {
+       HEADER_MODE_OFF=0x01,
+       HEADER_MODE_ON,
+       HEADER_MODE_ACTIVATING,
+       HEADER_MODE_CONNECTING,
+       HEADER_MODE_CONNECTED,
+       HEADER_MODE_DISCONNECTING,
+       HEADER_MODE_DEACTIVATING,
+       HEADER_MODE_CANCEL_CONNECTING,
+       HEADER_MODE_SEARCHING,
+       HEADER_MODE_MAX
+} HEADER_MODES;
+
+typedef enum {
+       VIEWER_ITEM_RADIO_MODE_NULL=0,
+       VIEWER_ITEM_RADIO_MODE_OFF,
+       VIEWER_ITEM_RADIO_MODE_CONNECTED,
+       VIEWER_ITEM_RADIO_MODE_CONNECTING,
+       VIEWER_ITEM_RADIO_MODE_CANCEL_CONNECTING,
+       VIEWER_ITEM_RADIO_MODE_WPS_CONNECTING,
+       VIEWER_ITEM_RADIO_MODE_DISCONNECTING,
+       VIEWER_ITEM_RADIO_MODE_MAX
+
+} VIEWER_ITEM_RADIO_MODES;
+
+typedef enum {
+       VIEWER_CALLBACK_TYPE_NORMAL_LIST,
+       VIEWER_CALLBACK_TYPE_NONE_AP_LIST,
+       VIEWER_CALLBACK_TYPE_MAX
+
+} VIEWER_CALLBACK_TYPES;
+
+typedef enum {
+       VIEWER_WINSET_SEARCHING,
+       VIEWER_WINSET_SUB_CONTENTS
+
+} VIEWER_WINSETS;
+
+typedef enum {
+       VIEWER_MANAGER_TOUCH_RESPONSE_TYPE_NULL,
+       VIEWER_MANAGER_TOUCH_RESPONSE_TYPE_CONNECTION_AND_DETAILVIEW,
+       VIEWER_MANAGER_TOUCH_RESPONSE_TYPE_SELECTION,
+       VIEWER_MANAGER_TOUCH_RESPONSE_TYPE_MAX
+
+} VIEWER_MANAGER_TOUCH_RESPONSE_TYPE;
+
+
+//////////////////////////////////////////////////////////////////////////////////
+
+//////// viewer managing ///////////////////////////////////////////////////////////
+Evas_Object* viewer_manager_create(Evas_Object* parent);
+Eina_Bool viewer_manager_destroy();
+Eina_Bool viewer_manager_show(VIEWER_WINSETS winset);
+Eina_Bool viewer_manager_hide(VIEWER_WINSETS winset);
+Eina_Bool viewer_manager_refresh(int is_scan);
+
+//////////////////////////////////////////////////////////////////////////////////
+
+//////// item control ////////////////////////////////////////////////////////////
+/*
+ *
+ * add ap_list including "No AP" 
+ */
+Elm_Object_Item* viewer_manager_item_set(void*entry_data,
+                               const char* ssid,
+                               const char* ap_image_path,
+                               VIEWER_ITEM_RADIO_MODES mode,
+                               VIEWER_CALLBACK_TYPES type,
+                               void*callback_data);
+
+
+int power_control();
+
+Elm_Object_Item *viewer_manager_current_selected_item_get(void);
+void viewer_manager_current_selected_item_set(Elm_Object_Item *item);
+
+void viewer_manager_set_enabled_list_click(Eina_Bool enabled);
+
+int viewer_manager_item_radio_mode_all_reset(void);
+int viewer_manager_item_radio_mode_set(void* object, Elm_Object_Item* item, VIEWER_ITEM_RADIO_MODES mode);
+
+int viewer_manager_hidden_disable_set(int mode);
+
+Evas_Object* viewer_manager_get_naviframe();
+int viewer_manager_header_mode_set(HEADER_MODES mode);
+HEADER_MODES viewer_manager_header_mode_get(void);
+void viewer_manager_set_enabled_list_update(Eina_Bool enabled);
+void viewer_manager_scroll_to_top(void);
+
+#endif
diff --git a/sources/ui-gadget/include/wifi-engine-callback.h b/sources/ui-gadget/include/wifi-engine-callback.h
new file mode 100644 (file)
index 0000000..db58092
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#ifndef __WIFI_ENGINE_CALLBACK_H_
+#define __WIFI_ENGINE_CALLBACK_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+void wlan_engine_callback(void *user_data, void *wlan_data);
+void wlan_engine_refresh_callback(int is_scan);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __WIFI_ENGINE_CALLBACKS_H_ */
+
diff --git a/sources/ui-gadget/include/wifi-ui-list-callbacks.h b/sources/ui-gadget/include/wifi-ui-list-callbacks.h
new file mode 100644 (file)
index 0000000..11cffb0
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#ifndef __WIFI_CALLBACKS_H_
+#define __WIFI_CALLBACKS_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+void radio_button_cb(void *data, Evas_Object *obj, void *event_info);
+void list_select_cb(void *data, Evas_Object *obj, void *event_info);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif 
diff --git a/sources/ui-gadget/include/wifi.h b/sources/ui-gadget/include/wifi.h
new file mode 100644 (file)
index 0000000..19ab9ca
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#ifndef __NEW_WIFI_H_
+#define __NEW_WIFI_H_
+
+#define TARGET
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+#include "common.h"
+#include "wlan_manager.h"
+#include "viewer_manager.h"
+
+#define PACKAGE "ug-wifi-efl-UG"
+#define LOCALEDIR "/opt/ug/res/locale"
+
+#define WIFI_APP_IMAGE_DIR     FACTORYFS"/res/images/wifi-efl-UG"
+#define WIFI_APP_ICON_PATH_SCAN        WIFI_APP_IMAGE_DIR"/01_controlbar_icon_update.png"
+#define WIFI_APP_ICON_PATH_DONE        WIFI_APP_IMAGE_DIR"/01_controlbar_icon_edit.png"
+#define WIFI_APP_ICON_PATH_FORGET      WIFI_APP_IMAGE_DIR"/01_controlbar_icon_delete.png"
+
+#define WIFI_UG_FAKE_ICON_PATH FACTORYFS"/res/edje/wifi-efl-UG/wifi_ug_edj_etc.edj"
+
+#define UG_MAIN_MESSAGE_DESTROY 1
+
+typedef enum {
+       VIEW_MAIN=0,
+       VIEW_PASSWORD,
+       VIEW_DETAIL,
+       VIEW_HIDDEN_AP,
+       VIEW_STATIC_IP,
+       VIEW_DHCP_IP
+} VIEW_TYPE;
+
+
+struct wifi_appdata {
+       /* ui gadget object */
+       void* gadget;
+       struct ui_gadget* ug;
+       Eina_Bool bundle_back_button_show_force_when_connected;
+
+       //Basic Evas_Objects
+       Evas_Object *win_main;
+       Evas *evas;
+
+       VIEW_TYPE current_view;
+       Eina_Bool bAlive;
+};
+
+int wifi_exit();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __WIFI_H_ */
+
+
diff --git a/sources/ui-gadget/po/CMakeLists.txt b/sources/ui-gadget/po/CMakeLists.txt
new file mode 100644 (file)
index 0000000..b8de33a
--- /dev/null
@@ -0,0 +1,24 @@
+# for i18n
+
+SET(POFILES de_DE.po el_GR.po en.po es_ES.po fr_FR.po it_IT.po ja_JP.po ko_KR.po nl_NL.po pt_PT.po ru_RU.po tr_TR.po zh_CN.po zh_HK.po zh_TW.po)
+
+SET(MSGFMT "/usr/bin/msgfmt")
+
+FOREACH(pofile ${POFILES})
+       SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile})
+       MESSAGE("PO: ${pofile}")
+       GET_FILENAME_COMPONENT(absPofile ${pofile} ABSOLUTE)
+       GET_FILENAME_COMPONENT(lang ${absPofile} NAME_WE)
+       SET(moFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo)
+       ADD_CUSTOM_COMMAND(
+                       OUTPUT ${moFile}
+                       COMMAND ${MSGFMT} -o ${moFile} ${absPofile}
+                       DEPENDS ${absPofile}
+       )
+       INSTALL(FILES ${moFile}
+                       DESTINATION /opt/ug/res/locale/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
+       SET(moFiles ${moFiles} ${moFile})
+ENDFOREACH(pofile)
+
+MESSAGE(".mo files: ${moFiles}")
+ADD_CUSTOM_TARGET(po ALL DEPENDS ${moFiles})
diff --git a/sources/ui-gadget/po/POTFILES.in b/sources/ui-gadget/po/POTFILES.in
new file mode 100644 (file)
index 0000000..857c2b3
--- /dev/null
@@ -0,0 +1,97 @@
+# List of source files containing translatable strings.
+
+#ug-wifi-efl
+#scripts 
+logics/wifi-scripts.c
+logics/start/start_from_power_on.c
+logics/start/start_from_power_off.c
+logics/start/start_from_connected.c
+logics/request/wlan_request_power_on.c
+logics/request/wlan_request_power_off.c
+logics/request/wlan_request_connection.c
+logics/request/wlan_request_disconnection.c
+logics/response/response_wlan_event_connection_ok.c
+logics/response/response_wlan_event_connection_fail.c
+logics/response/response_wlan_event_connection_fail_ip_assign.c
+logics/response/response_wlan_event_connection_fail_security.c
+logics/response/response_wlan_event_connection_fail_timeout.c
+logics/response/response_wlan_event_connection_ind.c
+logics/response/response_wlan_event_connection_cancel_ok.c
+logics/response/response_wlan_event_connection_cancel_fail.c
+logics/response/response_wlan_event_disconnection_ok.c
+logics/response/response_wlan_event_disconnection_fail.c
+logics/response/response_wlan_event_disconnection_ind.c
+logics/response/response_wlan_event_power_on_ok.c
+logics/response/response_wlan_event_power_on_fail.c
+logics/response/response_wlan_event_power_on_ind.c
+logics/response/response_wlan_event_power_off_ok.c
+logics/response/response_wlan_event_power_off_fail.c
+logics/response/response_wlan_event_power_off_ind.c
+logics/response/response_wlan_event_scan_ok.c
+logics/response/response_wlan_event_scan_fail.c
+logics/response/response_wlan_event_scan_cancel_ok.c
+logics/response/response_wlan_event_scan_cancel_fail.c
+logics/response/response_wlan_event_wps_enroll_ok.c
+logics/response/response_wlan_event_wps_enroll_fail.c
+logics/response/response_wlan_event_cancel_wps_enroll_ok.c
+logics/response/response_wlan_event_cancel_wps_enroll_fail.c
+logics/response/response_wlan_event_get_wlan_transport_state_ok.c
+logics/response/response_wlan_event_get_wlan_transport_state_fail.c
+logics/response/response_wlan_event_wps_pin_ind.c
+logics/response/response_wlan_event_suspend_ind.c
+logics/response/response_wlan_event_ip_changed_ind.c
+logics/response/response_wlan_event_add_profile_ind.c
+logics/response/response_wlan_event_del_profile_ind.c
+logics/response/response_wlan_event_modify_profile_ind.c
+#viewers
+viewers/view_detail.c
+viewers/view_autoip.c
+viewers/view_staticip.c
+viewers/view_dhcpip.c
+viewers/view_ime_password.c
+viewers/view_ime_hidden.c
+viewers/view_ime_proxy.c
+viewers/view_ime_statics.c
+viewers/view_others.c
+viewers/view_list_with_input_data.c
+#view-controllers
+controller/view-main-controller.c
+#main application
+wifi-efl-UG.c
+wifi-ui-list-callbacks.c
+wifi-wlan-callbacks.c
+wifi-ui-normal-callbacks.c
+
+#library
+#UI Manager
+../libraries/UIManager/layout-manager/layout_manager.c 
+../libraries/UIManager/viewer-manager/viewer_manager.c 
+../libraries/UIManager/viewer-manager/wifi_viewer_dialogue.c
+../libraries/UIManager/winset-wrapper/main/window_layout.c 
+../libraries/UIManager/winset-wrapper/main/header.c 
+../libraries/UIManager/winset-wrapper/main/bottom_header.c 
+../libraries/UIManager/winset-wrapper/main/navigator.c 
+../libraries/UIManager/winset-wrapper/main/check.c 
+../libraries/UIManager/winset-wrapper/main/scroller.c 
+../libraries/UIManager/winset-wrapper/main/button.c
+../libraries/UIManager/winset-wrapper/main/popup.c
+#setting wrapper
+../libraries/settingWrapper/wifi-setting.c
+#logger wrapper
+../libraries/LogManager/logger.c
+#i18n manager
+../libraries/i18nManager/i18nmanager.c
+../libraries/i18nManager/i18n_mode_no_needed.c
+#gesture wrapper
+../libraries/gestureManager/gesture-manager.c 
+#appcore wrapper
+../libraries/appcoreWrapper/appcoreWrapper.c
+#Wlan Manager
+../libraries/WlanManager/wlan-manager/wlan_manager.c
+#engine wrapper
+../libraries/WlanManager/EngineManager/WifidWrapper/wifid-wrapper.c
+../libraries/WlanManager/EngineManager/WifidWrapper/profile-manager/profile_manager.c
+../libraries/WlanManager/EngineManager/WifidWrapper/Response/wlan_callback.c
+../libraries/WlanManager/EngineManager/WifidWrapper/LogManager/wifid-log-manager.c
+
+
diff --git a/sources/ui-gadget/po/de_DE.po b/sources/ui-gadget/po/de_DE.po
new file mode 100644 (file)
index 0000000..91964bc
--- /dev/null
@@ -0,0 +1,96 @@
+msgid "IDS_ST_BODY_EXCELLENT"
+msgstr "Exzellent"
+
+msgid "IDS_ST_BODY_GOOD_M_STRENGTH"
+msgstr "Gut"
+
+msgid "IDS_ST_BODY_SCAN"
+msgstr "Scannen"
+
+msgid "IDS_WIFI_BODY_CONNECTED"
+msgstr "Verbunden"
+
+msgid "IDS_WIFI_BODY_CONNECTING_ING"
+msgstr "Verbindung wird hergestellt..."
+
+msgid "IDS_WIFI_BODY_DISCONNECTING_ING"
+msgstr "Verbindung wird getrennt..."
+
+msgid "IDS_WIFI_BODY_DYNAMIC_IP"
+msgstr "Dynamische IP"
+
+msgid "IDS_WIFI_BODY_NO_APS"
+msgstr "Keine APs"
+
+msgid "IDS_WIFI_BODY_SECURITY_TYPE"
+msgstr "Sicherheitstyp"
+
+msgid "IDS_WIFI_BODY_STATIC_IP"
+msgstr "Statische IP-Adresse"
+
+msgid "IDS_WIFI_HEADER_HIDDEN_NETWORK"
+msgstr "Verborgenes Netz"
+
+msgid "IDS_WIFI_POP_ACTIVATING_WI_FI_ING"
+msgstr "WLAN wird aktiviert..."
+
+msgid "IDS_WIFI_POP_DEACTIVATING_WI_FI_ING"
+msgstr "WLAN wird deaktiviert..."
+
+msgid "IDS_WIFI_POP_SEARCHING_ING"
+msgstr "Suche läuft..."
+
+msgid "IDS_WIFI_POP_SELECT_NETWORK"
+msgstr "Netz auswählen"
+
+msgid "IDS_WIFI_SK_FORGET"
+msgstr "Entfernen"
+
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "Passwort eingeben"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "Passwort anzeigen"
+
+msgid "IDS_WIFI_HEADER_PROXY_ADDRESS"
+msgstr "Proxy-Adresse"
+
+msgid "IDS_WIFI_BODY_SIGNAL_STRENGTH"
+msgstr "Signalstärke"
+
+msgid "IDS_WIFI_BODY_IP_ADDRESS"
+msgstr "IP-Adresse"
+
+msgid "IDS_WIFI_BODY_SUBNET_MASK"
+msgstr "Subnetzmaske"
+
+msgid "IDS_WIFI_BODY_GATEWAY"
+msgstr "Gateway"
+
+msgid "IDS_WIFI_BODY_DNS_1"
+msgstr "DNS 1"
+
+msgid "IDS_WIFI_BODY_DNS_2"
+msgstr "DNS 2"
+
+msgid "IDS_WIFI_BODY_SECURITYTYPE_WEP"
+msgstr "WEP"
+
+msgid "IDS_ST_POP_DEACTIVATING_ING"
+msgstr "Wird deaktiviert..."
+
+msgid "IDS_WIFI_BODY_CONFIGURATION_NO_SECURITY"
+msgstr "Keine Sicherheit"
+
+msgid "IDS_ST_BODY_NETWORK_NOTIFICATION"
+msgstr "Netzbenachrichtigung"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "Netz auswählen"
+
+msgid "IDS_WIFI_POP_FORGETTING_ACCESS_POINT_WILL_PREVENT_FUTURE_AUTOMATIC_CONNECTION_CONTINUE_Q"
+msgstr "Durch Vergessen des Zugangspunkts werden automatische Verbindungen in Zukunft vermieden. Fortfahren?"
+
+msgid "IDS_WIFI_BODY_WEAK_M_STRENGTH"
+msgstr "Schwach"
+
diff --git a/sources/ui-gadget/po/el_GR.po b/sources/ui-gadget/po/el_GR.po
new file mode 100644 (file)
index 0000000..62bc11f
--- /dev/null
@@ -0,0 +1,96 @@
+msgid "IDS_ST_BODY_EXCELLENT"
+msgstr "Τέλεια"
+
+msgid "IDS_ST_BODY_GOOD_M_STRENGTH"
+msgstr "Καλό"
+
+msgid "IDS_ST_BODY_SCAN"
+msgstr "Σάρωση"
+
+msgid "IDS_WIFI_BODY_CONNECTED"
+msgstr "Συνδέθηκε"
+
+msgid "IDS_WIFI_BODY_CONNECTING_ING"
+msgstr "Σύνδεση..."
+
+msgid "IDS_WIFI_BODY_DISCONNECTING_ING"
+msgstr "Αποσύνδεση..."
+
+msgid "IDS_WIFI_BODY_DYNAMIC_IP"
+msgstr "Δυναμικό IP"
+
+msgid "IDS_WIFI_BODY_NO_APS"
+msgstr "Δεν υπάρχουν AP"
+
+msgid "IDS_WIFI_BODY_SECURITY_TYPE"
+msgstr "Τύπος ασφαλείας"
+
+msgid "IDS_WIFI_BODY_STATIC_IP"
+msgstr "Στατικό IP"
+
+msgid "IDS_WIFI_HEADER_HIDDEN_NETWORK"
+msgstr "Κρυφό δίκτυο"
+
+msgid "IDS_WIFI_POP_ACTIVATING_WI_FI_ING"
+msgstr "Ενεργοποίηση Wi-Fi..."
+
+msgid "IDS_WIFI_POP_DEACTIVATING_WI_FI_ING"
+msgstr "Απενεργοποίηση Wi-Fi..."
+
+msgid "IDS_WIFI_POP_SEARCHING_ING"
+msgstr "Αναζήτηση..."
+
+msgid "IDS_WIFI_POP_SELECT_NETWORK"
+msgstr "Επιλογή δικτύου"
+
+msgid "IDS_WIFI_SK_FORGET"
+msgstr "Εξαίρεσε"
+
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "Εισαγωγή κωδικού πρόσβασης"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "Εμφάνιση κωδικού πρόσβασης"
+
+msgid "IDS_WIFI_HEADER_PROXY_ADDRESS"
+msgstr "Διεύθ.διακ.μεσολάβ."
+
+msgid "IDS_WIFI_BODY_SIGNAL_STRENGTH"
+msgstr "Ισχύς σήματος"
+
+msgid "IDS_WIFI_BODY_IP_ADDRESS"
+msgstr "Διεύθυνση IP"
+
+msgid "IDS_WIFI_BODY_SUBNET_MASK"
+msgstr "Μάσκα υποδικτύου"
+
+msgid "IDS_WIFI_BODY_GATEWAY"
+msgstr "Πύλη"
+
+msgid "IDS_WIFI_BODY_DNS_1"
+msgstr "DNS1"
+
+msgid "IDS_WIFI_BODY_DNS_2"
+msgstr "DNS2"
+
+msgid "IDS_WIFI_BODY_SECURITYTYPE_WEP"
+msgstr "WEP"
+
+msgid "IDS_ST_POP_DEACTIVATING_ING"
+msgstr "Απενεργοποίηση.."
+
+msgid "IDS_WIFI_BODY_CONFIGURATION_NO_SECURITY"
+msgstr "Καμία ασφάλεια"
+
+msgid "IDS_ST_BODY_NETWORK_NOTIFICATION"
+msgstr "Ειδοποίηση δικτύου"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "Επιλογή δικτύου"
+
+msgid "IDS_WIFI_POP_FORGETTING_ACCESS_POINT_WILL_PREVENT_FUTURE_AUTOMATIC_CONNECTION_CONTINUE_Q"
+msgstr "Η μη απομνημόνευση του σημείου πρόσβασης θα κάνει αδύνατη την αυτόματη σύνδεση στο μέλλον. Συνέχεια;"
+
+msgid "IDS_WIFI_BODY_WEAK_M_STRENGTH"
+msgstr "Ασθενές"
+
diff --git a/sources/ui-gadget/po/en.po b/sources/ui-gadget/po/en.po
new file mode 100644 (file)
index 0000000..299d323
--- /dev/null
@@ -0,0 +1,96 @@
+msgid "IDS_ST_BODY_EXCELLENT"
+msgstr "Excellent"
+
+msgid "IDS_ST_BODY_GOOD_M_STRENGTH"
+msgstr "Good"
+
+msgid "IDS_ST_BODY_SCAN"
+msgstr "Scan"
+
+msgid "IDS_WIFI_BODY_CONNECTED"
+msgstr "Connected"
+
+msgid "IDS_WIFI_BODY_CONNECTING_ING"
+msgstr "Connecting..."
+
+msgid "IDS_WIFI_BODY_DISCONNECTING_ING"
+msgstr "Disconnecting..."
+
+msgid "IDS_WIFI_BODY_DYNAMIC_IP"
+msgstr "Dynamic IP"
+
+msgid "IDS_WIFI_BODY_NO_APS"
+msgstr "No APs"
+
+msgid "IDS_WIFI_BODY_SECURITY_TYPE"
+msgstr "Security type"
+
+msgid "IDS_WIFI_BODY_STATIC_IP"
+msgstr "Static IP"
+
+msgid "IDS_WIFI_HEADER_HIDDEN_NETWORK"
+msgstr "Hidden network"
+
+msgid "IDS_WIFI_POP_ACTIVATING_WI_FI_ING"
+msgstr "Activating Wi-Fi..."
+
+msgid "IDS_WIFI_POP_DEACTIVATING_WI_FI_ING"
+msgstr "Deactivating Wi-Fi..."
+
+msgid "IDS_WIFI_POP_SEARCHING_ING"
+msgstr "Searching..."
+
+msgid "IDS_WIFI_POP_SELECT_NETWORK"
+msgstr "Select network"
+
+msgid "IDS_WIFI_SK_FORGET"
+msgstr "Forget"
+
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "Input password"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "Show password"
+
+msgid "IDS_WIFI_HEADER_PROXY_ADDRESS"
+msgstr "Proxy address"
+
+msgid "IDS_WIFI_BODY_SIGNAL_STRENGTH"
+msgstr "Signal strength"
+
+msgid "IDS_WIFI_BODY_IP_ADDRESS"
+msgstr "IP address"
+
+msgid "IDS_WIFI_BODY_SUBNET_MASK"
+msgstr "Subnet mask"
+
+msgid "IDS_WIFI_BODY_GATEWAY"
+msgstr "Gateway"
+
+msgid "IDS_WIFI_BODY_DNS_1"
+msgstr "DNS 1"
+
+msgid "IDS_WIFI_BODY_DNS_2"
+msgstr "DNS 2"
+
+msgid "IDS_WIFI_BODY_SECURITYTYPE_WEP"
+msgstr "WEP"
+
+msgid "IDS_ST_POP_DEACTIVATING_ING"
+msgstr "Deactivating..."
+
+msgid "IDS_WIFI_BODY_CONFIGURATION_NO_SECURITY"
+msgstr "No security"
+
+msgid "IDS_ST_BODY_NETWORK_NOTIFICATION"
+msgstr "Network notification"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "Select network"
+
+msgid "IDS_WIFI_POP_FORGETTING_ACCESS_POINT_WILL_PREVENT_FUTURE_AUTOMATIC_CONNECTION_CONTINUE_Q"
+msgstr "Forgetting access point will prevent future automatic connection. Continue?"
+
+msgid "IDS_WIFI_BODY_WEAK_M_STRENGTH"
+msgstr "Weak"
+
diff --git a/sources/ui-gadget/po/es_ES.po b/sources/ui-gadget/po/es_ES.po
new file mode 100644 (file)
index 0000000..a0d096b
--- /dev/null
@@ -0,0 +1,96 @@
+msgid "IDS_ST_BODY_EXCELLENT"
+msgstr "Excelente"
+
+msgid "IDS_ST_BODY_GOOD_M_STRENGTH"
+msgstr "Buena"
+
+msgid "IDS_ST_BODY_SCAN"
+msgstr "Buscar"
+
+msgid "IDS_WIFI_BODY_CONNECTED"
+msgstr "Conectado"
+
+msgid "IDS_WIFI_BODY_CONNECTING_ING"
+msgstr "Conectando..."
+
+msgid "IDS_WIFI_BODY_DISCONNECTING_ING"
+msgstr "Desconectando..."
+
+msgid "IDS_WIFI_BODY_DYNAMIC_IP"
+msgstr "IP dinámica"
+
+msgid "IDS_WIFI_BODY_NO_APS"
+msgstr "No hay AP"
+
+msgid "IDS_WIFI_BODY_SECURITY_TYPE"
+msgstr "Tipo de seguridad"
+
+msgid "IDS_WIFI_BODY_STATIC_IP"
+msgstr "IP estática"
+
+msgid "IDS_WIFI_HEADER_HIDDEN_NETWORK"
+msgstr "Red oculta"
+
+msgid "IDS_WIFI_POP_ACTIVATING_WI_FI_ING"
+msgstr "Activando Wi-Fi..."
+
+msgid "IDS_WIFI_POP_DEACTIVATING_WI_FI_ING"
+msgstr "Desactivando Wi-Fi..."
+
+msgid "IDS_WIFI_POP_SEARCHING_ING"
+msgstr "Buscando..."
+
+msgid "IDS_WIFI_POP_SELECT_NETWORK"
+msgstr "Seleccionar red"
+
+msgid "IDS_WIFI_SK_FORGET"
+msgstr "Cancelar"
+
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "Introducir contraseña"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "Mostrar contraseña"
+
+msgid "IDS_WIFI_HEADER_PROXY_ADDRESS"
+msgstr "Dirección de proxy"
+
+msgid "IDS_WIFI_BODY_SIGNAL_STRENGTH"
+msgstr "Intensidad de la señal"
+
+msgid "IDS_WIFI_BODY_IP_ADDRESS"
+msgstr "Dirección IP"
+
+msgid "IDS_WIFI_BODY_SUBNET_MASK"
+msgstr "Máscara de subred"
+
+msgid "IDS_WIFI_BODY_GATEWAY"
+msgstr "Puerta de enlace"
+
+msgid "IDS_WIFI_BODY_DNS_1"
+msgstr "DNS 1"
+
+msgid "IDS_WIFI_BODY_DNS_2"
+msgstr "DNS 2"
+
+msgid "IDS_WIFI_BODY_SECURITYTYPE_WEP"
+msgstr "WEP"
+
+msgid "IDS_ST_POP_DEACTIVATING_ING"
+msgstr "Desactivando..."
+
+msgid "IDS_WIFI_BODY_CONFIGURATION_NO_SECURITY"
+msgstr "Sin seguridad"
+
+msgid "IDS_ST_BODY_NETWORK_NOTIFICATION"
+msgstr "Notificación de red"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "Seleccionar red"
+
+msgid "IDS_WIFI_POP_FORGETTING_ACCESS_POINT_WILL_PREVENT_FUTURE_AUTOMATIC_CONNECTION_CONTINUE_Q"
+msgstr "Olvidar el punto de acceso impedirá la conexión automática en el futuro. ¿Continuar?"
+
+msgid "IDS_WIFI_BODY_WEAK_M_STRENGTH"
+msgstr "Débil"
+
diff --git a/sources/ui-gadget/po/fr_FR.po b/sources/ui-gadget/po/fr_FR.po
new file mode 100644 (file)
index 0000000..07bde18
--- /dev/null
@@ -0,0 +1,96 @@
+msgid "IDS_ST_BODY_EXCELLENT"
+msgstr "Excellent"
+
+msgid "IDS_ST_BODY_GOOD_M_STRENGTH"
+msgstr "Correct"
+
+msgid "IDS_ST_BODY_SCAN"
+msgstr "Analyser"
+
+msgid "IDS_WIFI_BODY_CONNECTED"
+msgstr "Connecté"
+
+msgid "IDS_WIFI_BODY_CONNECTING_ING"
+msgstr "Connexion..."
+
+msgid "IDS_WIFI_BODY_DISCONNECTING_ING"
+msgstr "Déconnexion..."
+
+msgid "IDS_WIFI_BODY_DYNAMIC_IP"
+msgstr "IP dynamique"
+
+msgid "IDS_WIFI_BODY_NO_APS"
+msgstr "Aucun AP"
+
+msgid "IDS_WIFI_BODY_SECURITY_TYPE"
+msgstr "Type de sécurité"
+
+msgid "IDS_WIFI_BODY_STATIC_IP"
+msgstr "IP statique"
+
+msgid "IDS_WIFI_HEADER_HIDDEN_NETWORK"
+msgstr "Réseau masqué"
+
+msgid "IDS_WIFI_POP_ACTIVATING_WI_FI_ING"
+msgstr "Activation Wi-Fi..."
+
+msgid "IDS_WIFI_POP_DEACTIVATING_WI_FI_ING"
+msgstr "Désactivation Wi-Fi..."
+
+msgid "IDS_WIFI_POP_SEARCHING_ING"
+msgstr "Recherche..."
+
+msgid "IDS_WIFI_POP_SELECT_NETWORK"
+msgstr "Sélectionner un réseau"
+
+msgid "IDS_WIFI_SK_FORGET"
+msgstr "Oublier"
+
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "Entrez le mot de passe"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "Afficher le mot de passe"
+
+msgid "IDS_WIFI_HEADER_PROXY_ADDRESS"
+msgstr "Adresse de proxy"
+
+msgid "IDS_WIFI_BODY_SIGNAL_STRENGTH"
+msgstr "Force du signal"
+
+msgid "IDS_WIFI_BODY_IP_ADDRESS"
+msgstr "Adresse IP"
+
+msgid "IDS_WIFI_BODY_SUBNET_MASK"
+msgstr "Masque de sous-réseau"
+
+msgid "IDS_WIFI_BODY_GATEWAY"
+msgstr "Passerelle"
+
+msgid "IDS_WIFI_BODY_DNS_1"
+msgstr "DNS 1"
+
+msgid "IDS_WIFI_BODY_DNS_2"
+msgstr "DNS 2"
+
+msgid "IDS_WIFI_BODY_SECURITYTYPE_WEP"
+msgstr "WEP"
+
+msgid "IDS_ST_POP_DEACTIVATING_ING"
+msgstr "Désactivation..."
+
+msgid "IDS_WIFI_BODY_CONFIGURATION_NO_SECURITY"
+msgstr "Pas de sécurité"
+
+msgid "IDS_ST_BODY_NETWORK_NOTIFICATION"
+msgstr "Notification réseau"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "Sélectionner un réseau"
+
+msgid "IDS_WIFI_POP_FORGETTING_ACCESS_POINT_WILL_PREVENT_FUTURE_AUTOMATIC_CONNECTION_CONTINUE_Q"
+msgstr "Si vous oubliez le point d'accès, la connexion automatique sera désactivée. Continuer ?"
+
+msgid "IDS_WIFI_BODY_WEAK_M_STRENGTH"
+msgstr "Faible"
+
diff --git a/sources/ui-gadget/po/it_IT.po b/sources/ui-gadget/po/it_IT.po
new file mode 100644 (file)
index 0000000..8aebd4b
--- /dev/null
@@ -0,0 +1,96 @@
+msgid "IDS_ST_BODY_EXCELLENT"
+msgstr "Eccellente"
+
+msgid "IDS_ST_BODY_GOOD_M_STRENGTH"
+msgstr "Buono"
+
+msgid "IDS_ST_BODY_SCAN"
+msgstr "Scansione"
+
+msgid "IDS_WIFI_BODY_CONNECTED"
+msgstr "Connesso"
+
+msgid "IDS_WIFI_BODY_CONNECTING_ING"
+msgstr "Connessione..."
+
+msgid "IDS_WIFI_BODY_DISCONNECTING_ING"
+msgstr "Disconnessione..."
+
+msgid "IDS_WIFI_BODY_DYNAMIC_IP"
+msgstr "IP dinamico"
+
+msgid "IDS_WIFI_BODY_NO_APS"
+msgstr "Nessuna rete Wi-Fi"
+
+msgid "IDS_WIFI_BODY_SECURITY_TYPE"
+msgstr "Tipo protezione"
+
+msgid "IDS_WIFI_BODY_STATIC_IP"
+msgstr "IP statico"
+
+msgid "IDS_WIFI_HEADER_HIDDEN_NETWORK"
+msgstr "Rete nascosta"
+
+msgid "IDS_WIFI_POP_ACTIVATING_WI_FI_ING"
+msgstr "Attivazione Wi-Fi in corso"
+
+msgid "IDS_WIFI_POP_DEACTIVATING_WI_FI_ING"
+msgstr "Disattivazione Wi-Fi in corso"
+
+msgid "IDS_WIFI_POP_SEARCHING_ING"
+msgstr "Ricerca..."
+
+msgid "IDS_WIFI_POP_SELECT_NETWORK"
+msgstr "Selezione rete"
+
+msgid "IDS_WIFI_SK_FORGET"
+msgstr "Rimuovi"
+
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "Inserisci password"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "Mostra password"
+
+msgid "IDS_WIFI_HEADER_PROXY_ADDRESS"
+msgstr "Indirizzo proxy"
+
+msgid "IDS_WIFI_BODY_SIGNAL_STRENGTH"
+msgstr "Potenza del segnale"
+
+msgid "IDS_WIFI_BODY_IP_ADDRESS"
+msgstr "Indirizzo IP"
+
+msgid "IDS_WIFI_BODY_SUBNET_MASK"
+msgstr "Maschera di sottorete"
+
+msgid "IDS_WIFI_BODY_GATEWAY"
+msgstr "Gateway"
+
+msgid "IDS_WIFI_BODY_DNS_1"
+msgstr "DNS 1"
+
+msgid "IDS_WIFI_BODY_DNS_2"
+msgstr "DNS 2"
+
+msgid "IDS_WIFI_BODY_SECURITYTYPE_WEP"
+msgstr "WEP"
+
+msgid "IDS_ST_POP_DEACTIVATING_ING"
+msgstr "Disattivazione..."
+
+msgid "IDS_WIFI_BODY_CONFIGURATION_NO_SECURITY"
+msgstr "Nessuna protezione"
+
+msgid "IDS_ST_BODY_NETWORK_NOTIFICATION"
+msgstr "Notifica di rete"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "Selezione rete"
+
+msgid "IDS_WIFI_POP_FORGETTING_ACCESS_POINT_WILL_PREVENT_FUTURE_AUTOMATIC_CONNECTION_CONTINUE_Q"
+msgstr "Se si dimentica il punto di accesso, non sarà possibile connettersi automaticamente in futuro. Continuare?"
+
+msgid "IDS_WIFI_BODY_WEAK_M_STRENGTH"
+msgstr "Debole"
+
diff --git a/sources/ui-gadget/po/ja_JP.po b/sources/ui-gadget/po/ja_JP.po
new file mode 100644 (file)
index 0000000..e082614
--- /dev/null
@@ -0,0 +1,96 @@
+msgid "IDS_ST_BODY_EXCELLENT"
+msgstr "優秀"
+
+msgid "IDS_ST_BODY_GOOD_M_STRENGTH"
+msgstr "強"
+
+msgid "IDS_ST_BODY_SCAN"
+msgstr "スキャン"
+
+msgid "IDS_WIFI_BODY_CONNECTED"
+msgstr "接続しました。"
+
+msgid "IDS_WIFI_BODY_CONNECTING_ING"
+msgstr "接続中..."
+
+msgid "IDS_WIFI_BODY_DISCONNECTING_ING"
+msgstr "切断中..."
+
+msgid "IDS_WIFI_BODY_DYNAMIC_IP"
+msgstr "ダイナミックIP"
+
+msgid "IDS_WIFI_BODY_NO_APS"
+msgstr "アプリケーション​なし"
+
+msgid "IDS_WIFI_BODY_SECURITY_TYPE"
+msgstr "セキュリティタイプ"
+
+msgid "IDS_WIFI_BODY_STATIC_IP"
+msgstr "静的​IP"
+
+msgid "IDS_WIFI_HEADER_HIDDEN_NETWORK"
+msgstr "非表示​ネットワーク"
+
+msgid "IDS_WIFI_POP_ACTIVATING_WI_FI_ING"
+msgstr "Wi-Fi​を​起動中..."
+
+msgid "IDS_WIFI_POP_DEACTIVATING_WI_FI_ING"
+msgstr "Wi-Fi​を​無効に​して​います..."
+
+msgid "IDS_WIFI_POP_SEARCHING_ING"
+msgstr "検索中..."
+
+msgid "IDS_WIFI_POP_SELECT_NETWORK"
+msgstr "ネットワーク​を​選択​"
+
+msgid "IDS_WIFI_SK_FORGET"
+msgstr "切断"
+
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "パスワードを​入力してください"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "パスワード​を​表示"
+
+msgid "IDS_WIFI_HEADER_PROXY_ADDRESS"
+msgstr "プロキシ​アドレス"
+
+msgid "IDS_WIFI_BODY_SIGNAL_STRENGTH"
+msgstr "電波​強度"
+
+msgid "IDS_WIFI_BODY_IP_ADDRESS"
+msgstr "IP​アドレス"
+
+msgid "IDS_WIFI_BODY_SUBNET_MASK"
+msgstr "サブネット​マスク"
+
+msgid "IDS_WIFI_BODY_GATEWAY"
+msgstr "ゲートウェイ"
+
+msgid "IDS_WIFI_BODY_DNS_1"
+msgstr "DNS 1"
+
+msgid "IDS_WIFI_BODY_DNS_2"
+msgstr "DNS 2"
+
+msgid "IDS_WIFI_BODY_SECURITYTYPE_WEP"
+msgstr "WEP"
+
+msgid "IDS_ST_POP_DEACTIVATING_ING"
+msgstr "解除中…"
+
+msgid "IDS_WIFI_BODY_CONFIGURATION_NO_SECURITY"
+msgstr "セキュリティ保護なし"
+
+msgid "IDS_ST_BODY_NETWORK_NOTIFICATION"
+msgstr "ネットワーク​通知"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "ネットワーク​を​選択"
+
+msgid "IDS_WIFI_POP_FORGETTING_ACCESS_POINT_WILL_PREVENT_FUTURE_AUTOMATIC_CONNECTION_CONTINUE_Q"
+msgstr "アクセス​ポイント​の接続情報​を​消去​する​と、​自動​接続​が​できなくなります。​続行​しますか?"
+
+msgid "IDS_WIFI_BODY_WEAK_M_STRENGTH"
+msgstr "弱い"
+
diff --git a/sources/ui-gadget/po/ko_KR.po b/sources/ui-gadget/po/ko_KR.po
new file mode 100644 (file)
index 0000000..de931f6
--- /dev/null
@@ -0,0 +1,96 @@
+msgid "IDS_ST_BODY_EXCELLENT"
+msgstr "매우 좋음"
+
+msgid "IDS_ST_BODY_GOOD_M_STRENGTH"
+msgstr "좋음"
+
+msgid "IDS_ST_BODY_SCAN"
+msgstr "검색"
+
+msgid "IDS_WIFI_BODY_CONNECTED"
+msgstr "연결되었습니다"
+
+msgid "IDS_WIFI_BODY_CONNECTING_ING"
+msgstr "연결 중..."
+
+msgid "IDS_WIFI_BODY_DISCONNECTING_ING"
+msgstr "연결을 끊는 중..."
+
+msgid "IDS_WIFI_BODY_DYNAMIC_IP"
+msgstr "유동 IP"
+
+msgid "IDS_WIFI_BODY_NO_APS"
+msgstr "APs가 없습니다"
+
+msgid "IDS_WIFI_BODY_SECURITY_TYPE"
+msgstr "보안 형식"
+
+msgid "IDS_WIFI_BODY_STATIC_IP"
+msgstr "고정 IP"
+
+msgid "IDS_WIFI_HEADER_HIDDEN_NETWORK"
+msgstr "허용되지 않은 네트워크"
+
+msgid "IDS_WIFI_POP_ACTIVATING_WI_FI_ING"
+msgstr "Wi-Fi 실행 중..."
+
+msgid "IDS_WIFI_POP_DEACTIVATING_WI_FI_ING"
+msgstr "Wi-Fi 연결을 끊는 중..."
+
+msgid "IDS_WIFI_POP_SEARCHING_ING"
+msgstr "검색 중..."
+
+msgid "IDS_WIFI_POP_SELECT_NETWORK"
+msgstr "네트워크를 선택하세요"
+
+msgid "IDS_WIFI_SK_FORGET"
+msgstr "저장 안 함"
+
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "비밀번호를 입력하세요"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "비밀번호 표시"
+
+msgid "IDS_WIFI_HEADER_PROXY_ADDRESS"
+msgstr "프록시 주소"
+
+msgid "IDS_WIFI_BODY_SIGNAL_STRENGTH"
+msgstr "신호 세기"
+
+msgid "IDS_WIFI_BODY_IP_ADDRESS"
+msgstr "IP 주소"
+
+msgid "IDS_WIFI_BODY_SUBNET_MASK"
+msgstr "서브넷 마스크"
+
+msgid "IDS_WIFI_BODY_GATEWAY"
+msgstr "게이트웨이"
+
+msgid "IDS_WIFI_BODY_DNS_1"
+msgstr "DNS1"
+
+msgid "IDS_WIFI_BODY_DNS_2"
+msgstr "DNS2"
+
+msgid "IDS_WIFI_BODY_SECURITYTYPE_WEP"
+msgstr "WEP"
+
+msgid "IDS_ST_POP_DEACTIVATING_ING"
+msgstr "해제 중..."
+
+msgid "IDS_WIFI_BODY_CONFIGURATION_NO_SECURITY"
+msgstr "보안 기능 사용하지 않음"
+
+msgid "IDS_ST_BODY_NETWORK_NOTIFICATION"
+msgstr "네트워크 알림"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "네트워크 선택"
+
+msgid "IDS_WIFI_POP_FORGETTING_ACCESS_POINT_WILL_PREVENT_FUTURE_AUTOMATIC_CONNECTION_CONTINUE_Q"
+msgstr "액세스 포인트 정보를 기억하지 않으면 이후 자동 연결을 방지할 수 있습니다. 계속할까요?"
+
+msgid "IDS_WIFI_BODY_WEAK_M_STRENGTH"
+msgstr "약함"
+
diff --git a/sources/ui-gadget/po/nl_NL.po b/sources/ui-gadget/po/nl_NL.po
new file mode 100644 (file)
index 0000000..2759b63
--- /dev/null
@@ -0,0 +1,96 @@
+msgid "IDS_ST_BODY_EXCELLENT"
+msgstr "Uitstekend"
+
+msgid "IDS_ST_BODY_GOOD_M_STRENGTH"
+msgstr "Goed"
+
+msgid "IDS_ST_BODY_SCAN"
+msgstr "Scannen"
+
+msgid "IDS_WIFI_BODY_CONNECTED"
+msgstr "Verbonden"
+
+msgid "IDS_WIFI_BODY_CONNECTING_ING"
+msgstr "Verbinden..."
+
+msgid "IDS_WIFI_BODY_DISCONNECTING_ING"
+msgstr "Verbinding verbreken..."
+
+msgid "IDS_WIFI_BODY_DYNAMIC_IP"
+msgstr "Dynamische IP"
+
+msgid "IDS_WIFI_BODY_NO_APS"
+msgstr "Geen AP’s"
+
+msgid "IDS_WIFI_BODY_SECURITY_TYPE"
+msgstr "Beveiligingstype"
+
+msgid "IDS_WIFI_BODY_STATIC_IP"
+msgstr "Vast IP"
+
+msgid "IDS_WIFI_HEADER_HIDDEN_NETWORK"
+msgstr "Verborgen netwerk"
+
+msgid "IDS_WIFI_POP_ACTIVATING_WI_FI_ING"
+msgstr "Wi-Fi activeren..."
+
+msgid "IDS_WIFI_POP_DEACTIVATING_WI_FI_ING"
+msgstr "Wi-Fi deactiveren..."
+
+msgid "IDS_WIFI_POP_SEARCHING_ING"
+msgstr "Zoeken..."
+
+msgid "IDS_WIFI_POP_SELECT_NETWORK"
+msgstr "Netwerk kiezen"
+
+msgid "IDS_WIFI_SK_FORGET"
+msgstr "Vergeten"
+
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "Wachtwoord ingeven"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "Wachtwoord tonen"
+
+msgid "IDS_WIFI_HEADER_PROXY_ADDRESS"
+msgstr "Proxyadres"
+
+msgid "IDS_WIFI_BODY_SIGNAL_STRENGTH"
+msgstr "Signaalsterkte"
+
+msgid "IDS_WIFI_BODY_IP_ADDRESS"
+msgstr "IP-adres"
+
+msgid "IDS_WIFI_BODY_SUBNET_MASK"
+msgstr "Subnetmasker"
+
+msgid "IDS_WIFI_BODY_GATEWAY"
+msgstr "Gateway"
+
+msgid "IDS_WIFI_BODY_DNS_1"
+msgstr "DNS 1"
+
+msgid "IDS_WIFI_BODY_DNS_2"
+msgstr "DNS 2"
+
+msgid "IDS_WIFI_BODY_SECURITYTYPE_WEP"
+msgstr "WEP"
+
+msgid "IDS_ST_POP_DEACTIVATING_ING"
+msgstr "Uitschakelen..."
+
+msgid "IDS_WIFI_BODY_CONFIGURATION_NO_SECURITY"
+msgstr "Geen beveiliging"
+
+msgid "IDS_ST_BODY_NETWORK_NOTIFICATION"
+msgstr "Netwerkmelding"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "Netwerk kiezen"
+
+msgid "IDS_WIFI_POP_FORGETTING_ACCESS_POINT_WILL_PREVENT_FUTURE_AUTOMATIC_CONNECTION_CONTINUE_Q"
+msgstr "Als u het toegangspunt niet opgeeft, kunt u later niet automatisch verbinden. Doorgaan?"
+
+msgid "IDS_WIFI_BODY_WEAK_M_STRENGTH"
+msgstr "Zwak"
+
diff --git a/sources/ui-gadget/po/pt_PT.po b/sources/ui-gadget/po/pt_PT.po
new file mode 100644 (file)
index 0000000..dbd9dbd
--- /dev/null
@@ -0,0 +1,96 @@
+msgid "IDS_ST_BODY_EXCELLENT"
+msgstr "Excelente"
+
+msgid "IDS_ST_BODY_GOOD_M_STRENGTH"
+msgstr "Bom"
+
+msgid "IDS_ST_BODY_SCAN"
+msgstr "Pesquisar"
+
+msgid "IDS_WIFI_BODY_CONNECTED"
+msgstr "Ligado"
+
+msgid "IDS_WIFI_BODY_CONNECTING_ING"
+msgstr "A ligar..."
+
+msgid "IDS_WIFI_BODY_DISCONNECTING_ING"
+msgstr "A desligar..."
+
+msgid "IDS_WIFI_BODY_DYNAMIC_IP"
+msgstr "IP dinâmico"
+
+msgid "IDS_WIFI_BODY_NO_APS"
+msgstr "Nenhuns APs"
+
+msgid "IDS_WIFI_BODY_SECURITY_TYPE"
+msgstr "Tipo de segurança"
+
+msgid "IDS_WIFI_BODY_STATIC_IP"
+msgstr "IP estático"
+
+msgid "IDS_WIFI_HEADER_HIDDEN_NETWORK"
+msgstr "Rede oculta"
+
+msgid "IDS_WIFI_POP_ACTIVATING_WI_FI_ING"
+msgstr "A activar Wi-Fi..."
+
+msgid "IDS_WIFI_POP_DEACTIVATING_WI_FI_ING"
+msgstr "A desactivar Wi-Fi..."
+
+msgid "IDS_WIFI_POP_SEARCHING_ING"
+msgstr "A procurar..."
+
+msgid "IDS_WIFI_POP_SELECT_NETWORK"
+msgstr "Seleccionar rede"
+
+msgid "IDS_WIFI_SK_FORGET"
+msgstr "Esquecer"
+
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "Introduzir palavra-passe"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "Mostrar palavra-passe"
+
+msgid "IDS_WIFI_HEADER_PROXY_ADDRESS"
+msgstr "Endereço proxy"
+
+msgid "IDS_WIFI_BODY_SIGNAL_STRENGTH"
+msgstr "Potência do sinal"
+
+msgid "IDS_WIFI_BODY_IP_ADDRESS"
+msgstr "Endereço IP"
+
+msgid "IDS_WIFI_BODY_SUBNET_MASK"
+msgstr "Máscara de sub-rede"
+
+msgid "IDS_WIFI_BODY_GATEWAY"
+msgstr "Gateway"
+
+msgid "IDS_WIFI_BODY_DNS_1"
+msgstr "DNS 1"
+
+msgid "IDS_WIFI_BODY_DNS_2"
+msgstr "DNS 2"
+
+msgid "IDS_WIFI_BODY_SECURITYTYPE_WEP"
+msgstr "WEP"
+
+msgid "IDS_ST_POP_DEACTIVATING_ING"
+msgstr "A desactivar..."
+
+msgid "IDS_WIFI_BODY_CONFIGURATION_NO_SECURITY"
+msgstr "Sem segurança"
+
+msgid "IDS_ST_BODY_NETWORK_NOTIFICATION"
+msgstr "Notificação de rede"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "Seleccionar rede"
+
+msgid "IDS_WIFI_POP_FORGETTING_ACCESS_POINT_WILL_PREVENT_FUTURE_AUTOMATIC_CONNECTION_CONTINUE_Q"
+msgstr "O esquecimento do ponto de acesso impedirá a ligação automática futura. Continuar?"
+
+msgid "IDS_WIFI_BODY_WEAK_M_STRENGTH"
+msgstr "Fraca"
+
diff --git a/sources/ui-gadget/po/ru_RU.po b/sources/ui-gadget/po/ru_RU.po
new file mode 100644 (file)
index 0000000..d758fee
--- /dev/null
@@ -0,0 +1,96 @@
+msgid "IDS_ST_BODY_EXCELLENT"
+msgstr "Супер"
+
+msgid "IDS_ST_BODY_GOOD_M_STRENGTH"
+msgstr "Хороший"
+
+msgid "IDS_ST_BODY_SCAN"
+msgstr "Поиск"
+
+msgid "IDS_WIFI_BODY_CONNECTED"
+msgstr "Подключено"
+
+msgid "IDS_WIFI_BODY_CONNECTING_ING"
+msgstr "Подключение..."
+
+msgid "IDS_WIFI_BODY_DISCONNECTING_ING"
+msgstr "Отключение..."
+
+msgid "IDS_WIFI_BODY_DYNAMIC_IP"
+msgstr "Динамический IP"
+
+msgid "IDS_WIFI_BODY_NO_APS"
+msgstr "Нет точек доступа"
+
+msgid "IDS_WIFI_BODY_SECURITY_TYPE"
+msgstr "Тип защиты"
+
+msgid "IDS_WIFI_BODY_STATIC_IP"
+msgstr "Статический IP-адрес"
+
+msgid "IDS_WIFI_HEADER_HIDDEN_NETWORK"
+msgstr "Скрытая сеть"
+
+msgid "IDS_WIFI_POP_ACTIVATING_WI_FI_ING"
+msgstr "Активация Wi-Fi..."
+
+msgid "IDS_WIFI_POP_DEACTIVATING_WI_FI_ING"
+msgstr "Выключение Wi-Fi..."
+
+msgid "IDS_WIFI_POP_SEARCHING_ING"
+msgstr "Поиск..."
+
+msgid "IDS_WIFI_POP_SELECT_NETWORK"
+msgstr "Выбор сети"
+
+msgid "IDS_WIFI_SK_FORGET"
+msgstr "Забыть"
+
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "Введите пароль"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "Показать пароль"
+
+msgid "IDS_WIFI_HEADER_PROXY_ADDRESS"
+msgstr "Адрес прокси"
+
+msgid "IDS_WIFI_BODY_SIGNAL_STRENGTH"
+msgstr "Уровень сигнала"
+
+msgid "IDS_WIFI_BODY_IP_ADDRESS"
+msgstr "IP-адрес"
+
+msgid "IDS_WIFI_BODY_SUBNET_MASK"
+msgstr "Маска подсети"
+
+msgid "IDS_WIFI_BODY_GATEWAY"
+msgstr "Шлюз"
+
+msgid "IDS_WIFI_BODY_DNS_1"
+msgstr "DNS 1"
+
+msgid "IDS_WIFI_BODY_DNS_2"
+msgstr "DNS 2"
+
+msgid "IDS_WIFI_BODY_SECURITYTYPE_WEP"
+msgstr "WEP"
+
+msgid "IDS_ST_POP_DEACTIVATING_ING"
+msgstr "Выключение..."
+
+msgid "IDS_WIFI_BODY_CONFIGURATION_NO_SECURITY"
+msgstr "Нет защиты"
+
+msgid "IDS_ST_BODY_NETWORK_NOTIFICATION"
+msgstr "Уведомление о сетях"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "Выбор сети"
+
+msgid "IDS_WIFI_POP_FORGETTING_ACCESS_POINT_WILL_PREVENT_FUTURE_AUTOMATIC_CONNECTION_CONTINUE_Q"
+msgstr "Удаление данных о точке доступа предотвратит автоматическое подключение в будущем. Продолжить?"
+
+msgid "IDS_WIFI_BODY_WEAK_M_STRENGTH"
+msgstr "Слабый"
+
diff --git a/sources/ui-gadget/po/tr_TR.po b/sources/ui-gadget/po/tr_TR.po
new file mode 100644 (file)
index 0000000..28fbf13
--- /dev/null
@@ -0,0 +1,96 @@
+msgid "IDS_ST_BODY_EXCELLENT"
+msgstr "Harika..!!"
+
+msgid "IDS_ST_BODY_GOOD_M_STRENGTH"
+msgstr "İyi"
+
+msgid "IDS_ST_BODY_SCAN"
+msgstr "Tara"
+
+msgid "IDS_WIFI_BODY_CONNECTED"
+msgstr "Bağlantı kuruldu"
+
+msgid "IDS_WIFI_BODY_CONNECTING_ING"
+msgstr "Bağlanılıyor..."
+
+msgid "IDS_WIFI_BODY_DISCONNECTING_ING"
+msgstr "Bağlantı kesiliyor..."
+
+msgid "IDS_WIFI_BODY_DYNAMIC_IP"
+msgstr "Dinamik IP"
+
+msgid "IDS_WIFI_BODY_NO_APS"
+msgstr "AP Yok"
+
+msgid "IDS_WIFI_BODY_SECURITY_TYPE"
+msgstr "Güvenlik tipi"
+
+msgid "IDS_WIFI_BODY_STATIC_IP"
+msgstr "Statik IP"
+
+msgid "IDS_WIFI_HEADER_HIDDEN_NETWORK"
+msgstr "Gizli ağ"
+
+msgid "IDS_WIFI_POP_ACTIVATING_WI_FI_ING"
+msgstr "Wi-Fi etkinleştiriliyor..."
+
+msgid "IDS_WIFI_POP_DEACTIVATING_WI_FI_ING"
+msgstr "Wi-Fi devre dışı bırakılıyor..."
+
+msgid "IDS_WIFI_POP_SEARCHING_ING"
+msgstr "Aranıyor..."
+
+msgid "IDS_WIFI_POP_SELECT_NETWORK"
+msgstr "Şebeke seçimi"
+
+msgid "IDS_WIFI_SK_FORGET"
+msgstr "Unut"
+
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "Şifre giriniz"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "Parolayı göster"
+
+msgid "IDS_WIFI_HEADER_PROXY_ADDRESS"
+msgstr "Proxy adresi"
+
+msgid "IDS_WIFI_BODY_SIGNAL_STRENGTH"
+msgstr "Sinyal kuvveti"
+
+msgid "IDS_WIFI_BODY_IP_ADDRESS"
+msgstr "IP adresi"
+
+msgid "IDS_WIFI_BODY_SUBNET_MASK"
+msgstr "Alt ağ maskesi"
+
+msgid "IDS_WIFI_BODY_GATEWAY"
+msgstr "Ağ geçidi"
+
+msgid "IDS_WIFI_BODY_DNS_1"
+msgstr "DNS 1"
+
+msgid "IDS_WIFI_BODY_DNS_2"
+msgstr "DNS 2"
+
+msgid "IDS_WIFI_BODY_SECURITYTYPE_WEP"
+msgstr "WEP"
+
+msgid "IDS_ST_POP_DEACTIVATING_ING"
+msgstr "Devreden çıkartılıyor..."
+
+msgid "IDS_WIFI_BODY_CONFIGURATION_NO_SECURITY"
+msgstr "Güvenlik yok"
+
+msgid "IDS_ST_BODY_NETWORK_NOTIFICATION"
+msgstr "Ağ bildirimi"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "Şebeke seçimi"
+
+msgid "IDS_WIFI_POP_FORGETTING_ACCESS_POINT_WILL_PREVENT_FUTURE_AUTOMATIC_CONNECTION_CONTINUE_Q"
+msgstr "Erişim noktasını unutmak ileride otomatik bağlantıyı engeller. Devam edilsin mi?"
+
+msgid "IDS_WIFI_BODY_WEAK_M_STRENGTH"
+msgstr "Zayıf"
+
diff --git a/sources/ui-gadget/po/update-po.sh b/sources/ui-gadget/po/update-po.sh
new file mode 100755 (executable)
index 0000000..6441967
--- /dev/null
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+PACKAGE=ug-wifi-efl
+SRCROOT=..
+POTFILES=POTFILES.in
+
+#ALL_LINGUAS= am az be ca cs da de el en_CA en_GB es et fi fr hr hu it ja ko lv mk ml ms nb ne nl pa pl pt pt_BR ru rw sk sl sr sr@Latn sv ta tr uk vi zh_CN zh_TW
+ALL_LINGUAS="en_US en_GB ja ko zh_CN"
+
+XGETTEXT=/usr/bin/xgettext
+MSGMERGE=/usr/bin/msgmerge
+
+echo -n "Make ${PACKAGE}.pot  "
+if [ ! -e $POTFILES ] ; then
+       echo "$POTFILES not found"
+       exit 1
+fi
+
+$XGETTEXT --default-domain=${PACKAGE} --directory=${SRCROOT} \
+               --add-comments --keyword=_ --keyword=N_ --files-from=$POTFILES
+if [ $? -ne 0 ]; then
+       echo "error"
+       exit 1  
+fi
+
+if [ ! -f ${PACKAGE}.po ]; then
+       echo "No such file: ${PACKAGE}.po"
+       exit 1
+fi
+
+rm -f ${PACKAGE}.pot && mv ${PACKAGE}.po ${PACKAGE}.pot
+echo "done"
+
+for LANG in $ALL_LINGUAS; do 
+       echo "$LANG : "
+
+       if [ ! -e $LANG.po ] ; then
+               sed 's/CHARSET/UTF-8/g' ${PACKAGE}.pot > ${LANG}.po
+               echo "${LANG}.po created"
+       else
+               if $MSGMERGE ${LANG}.po ${PACKAGE}.pot -o ${LANG}.new.po ; then
+                       if cmp ${LANG}.po ${LANG}.new.po > /dev/null 2>&1; then
+                               rm -f ${LANG}.new.po
+                       else
+                               if mv -f ${LANG}.new.po ${LANG}.po; then
+                                       echo "" 
+                               else
+                                       echo "msgmerge for $LANG.po failed: cannot move $LANG.new.po to $LANG.po" 1>&2
+                                       rm -f ${LANG}.new.po
+                                       exit 1
+                               fi
+                       fi
+               else
+                       echo "msgmerge for $LANG failed!"
+                       rm -f ${LANG}.new.po
+               fi
+       fi
+       echo ""
+done
+
diff --git a/sources/ui-gadget/po/zh_CN.po b/sources/ui-gadget/po/zh_CN.po
new file mode 100644 (file)
index 0000000..a5e46eb
--- /dev/null
@@ -0,0 +1,96 @@
+msgid "IDS_ST_BODY_EXCELLENT"
+msgstr "棒极了"
+
+msgid "IDS_ST_BODY_GOOD_M_STRENGTH"
+msgstr "好"
+
+msgid "IDS_ST_BODY_SCAN"
+msgstr "扫描"
+
+msgid "IDS_WIFI_BODY_CONNECTED"
+msgstr "已连接"
+
+msgid "IDS_WIFI_BODY_CONNECTING_ING"
+msgstr "连接中..."
+
+msgid "IDS_WIFI_BODY_DISCONNECTING_ING"
+msgstr "正在断开..."
+
+msgid "IDS_WIFI_BODY_DYNAMIC_IP"
+msgstr "动态 IP"
+
+msgid "IDS_WIFI_BODY_NO_APS"
+msgstr "没有Ap"
+
+msgid "IDS_WIFI_BODY_SECURITY_TYPE"
+msgstr "安全类型"
+
+msgid "IDS_WIFI_BODY_STATIC_IP"
+msgstr "静态IP"
+
+msgid "IDS_WIFI_HEADER_HIDDEN_NETWORK"
+msgstr "隐藏的网络"
+
+msgid "IDS_WIFI_POP_ACTIVATING_WI_FI_ING"
+msgstr "正在激活WLAN..."
+
+msgid "IDS_WIFI_POP_DEACTIVATING_WI_FI_ING"
+msgstr "正在取消WLAN..."
+
+msgid "IDS_WIFI_POP_SEARCHING_ING"
+msgstr "正在搜索"
+
+msgid "IDS_WIFI_POP_SELECT_NETWORK"
+msgstr "选择网络"
+
+msgid "IDS_WIFI_SK_FORGET"
+msgstr "忘记"
+
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "输入密码"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "显示密码"
+
+msgid "IDS_WIFI_HEADER_PROXY_ADDRESS"
+msgstr "代理服务器地址"
+
+msgid "IDS_WIFI_BODY_SIGNAL_STRENGTH"
+msgstr "信号强度"
+
+msgid "IDS_WIFI_BODY_IP_ADDRESS"
+msgstr "IP 地址"
+
+msgid "IDS_WIFI_BODY_SUBNET_MASK"
+msgstr "子网时标"
+
+msgid "IDS_WIFI_BODY_GATEWAY"
+msgstr "网关"
+
+msgid "IDS_WIFI_BODY_DNS_1"
+msgstr "DNS 1"
+
+msgid "IDS_WIFI_BODY_DNS_2"
+msgstr "DNS 2"
+
+msgid "IDS_WIFI_BODY_SECURITYTYPE_WEP"
+msgstr "WEP"
+
+msgid "IDS_ST_POP_DEACTIVATING_ING"
+msgstr "正在取消..."
+
+msgid "IDS_WIFI_BODY_CONFIGURATION_NO_SECURITY"
+msgstr "不安全"
+
+msgid "IDS_ST_BODY_NETWORK_NOTIFICATION"
+msgstr "网络通知"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "选择网络"
+
+msgid "IDS_WIFI_POP_FORGETTING_ACCESS_POINT_WILL_PREVENT_FUTURE_AUTOMATIC_CONNECTION_CONTINUE_Q"
+msgstr "忘记接入点将阻止将来自动连接。继续?"
+
+msgid "IDS_WIFI_BODY_WEAK_M_STRENGTH"
+msgstr "弱"
+
diff --git a/sources/ui-gadget/po/zh_HK.po b/sources/ui-gadget/po/zh_HK.po
new file mode 100644 (file)
index 0000000..3d9b739
--- /dev/null
@@ -0,0 +1,96 @@
+msgid "IDS_ST_BODY_EXCELLENT"
+msgstr "極佳"
+
+msgid "IDS_ST_BODY_GOOD_M_STRENGTH"
+msgstr "良好"
+
+msgid "IDS_ST_BODY_SCAN"
+msgstr "掃描"
+
+msgid "IDS_WIFI_BODY_CONNECTED"
+msgstr "已連接"
+
+msgid "IDS_WIFI_BODY_CONNECTING_ING"
+msgstr "連接中..."
+
+msgid "IDS_WIFI_BODY_DISCONNECTING_ING"
+msgstr "正在中斷連接..."
+
+msgid "IDS_WIFI_BODY_DYNAMIC_IP"
+msgstr "動態 IP"
+
+msgid "IDS_WIFI_BODY_NO_APS"
+msgstr "沒有接入點"
+
+msgid "IDS_WIFI_BODY_SECURITY_TYPE"
+msgstr "安全類型"
+
+msgid "IDS_WIFI_BODY_STATIC_IP"
+msgstr "靜態 IP"
+
+msgid "IDS_WIFI_HEADER_HIDDEN_NETWORK"
+msgstr "隱藏網絡"
+
+msgid "IDS_WIFI_POP_ACTIVATING_WI_FI_ING"
+msgstr "正在啟動 Wi-Fi..."
+
+msgid "IDS_WIFI_POP_DEACTIVATING_WI_FI_ING"
+msgstr "正在關閉 WiFi..."
+
+msgid "IDS_WIFI_POP_SEARCHING_ING"
+msgstr "正在搜尋..."
+
+msgid "IDS_WIFI_POP_SELECT_NETWORK"
+msgstr "選擇網絡"
+
+msgid "IDS_WIFI_SK_FORGET"
+msgstr "忘記"
+
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "輸入密碼"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "顯示密碼"
+
+msgid "IDS_WIFI_HEADER_PROXY_ADDRESS"
+msgstr "代理伺服器位址"
+
+msgid "IDS_WIFI_BODY_SIGNAL_STRENGTH"
+msgstr "訊號強度"
+
+msgid "IDS_WIFI_BODY_IP_ADDRESS"
+msgstr "IP 位址"
+
+msgid "IDS_WIFI_BODY_SUBNET_MASK"
+msgstr "子網絡範圍"
+
+msgid "IDS_WIFI_BODY_GATEWAY"
+msgstr "網關"
+
+msgid "IDS_WIFI_BODY_DNS_1"
+msgstr "DNS 1"
+
+msgid "IDS_WIFI_BODY_DNS_2"
+msgstr "DNS 2"
+
+msgid "IDS_WIFI_BODY_SECURITYTYPE_WEP"
+msgstr "WEP"
+
+msgid "IDS_ST_POP_DEACTIVATING_ING"
+msgstr "正在關閉..."
+
+msgid "IDS_WIFI_BODY_CONFIGURATION_NO_SECURITY"
+msgstr "不安全"
+
+msgid "IDS_ST_BODY_NETWORK_NOTIFICATION"
+msgstr "網絡通知"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "選擇網絡"
+
+msgid "IDS_WIFI_POP_FORGETTING_ACCESS_POINT_WILL_PREVENT_FUTURE_AUTOMATIC_CONNECTION_CONTINUE_Q"
+msgstr "忘記接入點將妨礙日後自動連接。是否繼續?"
+
+msgid "IDS_WIFI_BODY_WEAK_M_STRENGTH"
+msgstr "弱"
+
diff --git a/sources/ui-gadget/po/zh_TW.po b/sources/ui-gadget/po/zh_TW.po
new file mode 100644 (file)
index 0000000..f58e31a
--- /dev/null
@@ -0,0 +1,96 @@
+msgid "IDS_ST_BODY_EXCELLENT"
+msgstr "棒極了"
+
+msgid "IDS_ST_BODY_GOOD_M_STRENGTH"
+msgstr "良好"
+
+msgid "IDS_ST_BODY_SCAN"
+msgstr "掃描"
+
+msgid "IDS_WIFI_BODY_CONNECTED"
+msgstr "已連線"
+
+msgid "IDS_WIFI_BODY_CONNECTING_ING"
+msgstr "連線中..."
+
+msgid "IDS_WIFI_BODY_DISCONNECTING_ING"
+msgstr "正在中斷連線..."
+
+msgid "IDS_WIFI_BODY_DYNAMIC_IP"
+msgstr "動態 IP"
+
+msgid "IDS_WIFI_BODY_NO_APS"
+msgstr "沒有接入點"
+
+msgid "IDS_WIFI_BODY_SECURITY_TYPE"
+msgstr "安全性類型"
+
+msgid "IDS_WIFI_BODY_STATIC_IP"
+msgstr "靜態 IP"
+
+msgid "IDS_WIFI_HEADER_HIDDEN_NETWORK"
+msgstr "隱藏網路"
+
+msgid "IDS_WIFI_POP_ACTIVATING_WI_FI_ING"
+msgstr "正在啟動 Wi-Fi..."
+
+msgid "IDS_WIFI_POP_DEACTIVATING_WI_FI_ING"
+msgstr "正在停用 Wi-Fi..."
+
+msgid "IDS_WIFI_POP_SEARCHING_ING"
+msgstr "正在搜尋..."
+
+msgid "IDS_WIFI_POP_SELECT_NETWORK"
+msgstr "選擇網路"
+
+msgid "IDS_WIFI_SK_FORGET"
+msgstr "清除"
+
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "輸入密碼"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "顯示密碼"
+
+msgid "IDS_WIFI_HEADER_PROXY_ADDRESS"
+msgstr "代理伺服器位址"
+
+msgid "IDS_WIFI_BODY_SIGNAL_STRENGTH"
+msgstr "訊號強度"
+
+msgid "IDS_WIFI_BODY_IP_ADDRESS"
+msgstr "IP 位址"
+
+msgid "IDS_WIFI_BODY_SUBNET_MASK"
+msgstr "子網路遮罩"
+
+msgid "IDS_WIFI_BODY_GATEWAY"
+msgstr "閘道"
+
+msgid "IDS_WIFI_BODY_DNS_1"
+msgstr "DNS 1"
+
+msgid "IDS_WIFI_BODY_DNS_2"
+msgstr "DNS 2"
+
+msgid "IDS_WIFI_BODY_SECURITYTYPE_WEP"
+msgstr "WEP"
+
+msgid "IDS_ST_POP_DEACTIVATING_ING"
+msgstr "正在停用..."
+
+msgid "IDS_WIFI_BODY_CONFIGURATION_NO_SECURITY"
+msgstr "不設置安全性"
+
+msgid "IDS_ST_BODY_NETWORK_NOTIFICATION"
+msgstr "網路通知"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "選擇網路"
+
+msgid "IDS_WIFI_POP_FORGETTING_ACCESS_POINT_WILL_PREVENT_FUTURE_AUTOMATIC_CONNECTION_CONTINUE_Q"
+msgstr "不儲存Wi-Fi連接點以防止系統自動連接。要繼續嗎?"
+
+msgid "IDS_WIFI_BODY_WEAK_M_STRENGTH"
+msgstr "弱"
+
diff --git a/sources/ui-gadget/viewers-layout/include/popup.h b/sources/ui-gadget/viewers-layout/include/popup.h
new file mode 100644 (file)
index 0000000..5f7ec05
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#ifndef __DEF_POPUP_H_
+#define __DEF_POPUP_H_
+
+
+typedef enum {
+       POPUP_MODE_OFF=0X01,
+       POPUP_MODE_PBC,
+       POPUP_MODE_PIN,
+       POPUP_MODE_REGISTER_FAILED,
+       POPUP_MODE_POWER_ON_FAILED,
+       POPUP_MODE_CONNECTING_FAILED,
+       POPUP_MODE_INPUT_FAILED,
+       POPUP_MODE_ETC,
+       POPUP_MODE_MAX
+} POPUP_MODES;
+
+typedef enum {
+       POPUP_OPTION_NONE=0X01,
+       POPUP_OPTION_REGISTER_FAILED_COMMUNICATION_FAILED,
+       POPUP_OPTION_POWER_ON_FAILED_MOBILE_HOTSPOT,
+       POPUP_OPTION_CONNECTING_FAILED_TIMEOUT,
+       POPUP_OPTION_CONNECTING_FAILED_INVALID_OPERATION,
+       POPUP_OPTION_CONNECTIONG_PASSWORD_WEP_ERROR,
+       POPUP_OPTION_CONNECTIONG_PASSWORD_WPAPSK_ERROR,
+       POPUP_OPTION_INPUT_FAILED_PROXY_IP_MISTYPE,
+       POPUP_OPTION_ETC_WLAN_STATE_GET_ERROR,
+       POPUP_OPTION_ETC_BACK_ENABLE_WHEN_CONNECTED_ERROR,
+       POPUP_OPTION_MAX
+} POPUP_MODE_OPTIONS;
+
+typedef struct popup_manager_object {
+       POPUP_MODES mode;
+       Evas_Object* content;
+       Evas_Object* progressbar;
+       Evas_Object* win;
+} popup_manager_object;
+
+
+void* winset_popup_create(Evas_Object* win);
+int winset_popup_mode_set(void* object, POPUP_MODES mode, POPUP_MODE_OPTIONS option);
+int winset_popup_simple_set(const char* text);
+POPUP_MODES winset_popup_mode_get(void* object);
+int winset_popup_destroy(void* object);
+Evas_Object* winset_popup_content_get(void* object);
+int winset_popup_content_set(Evas_Object* object);
+int winset_popup_content_clear();
+int winset_popup_stop(void* object);
+int winset_popup_timer_remove(void);
+
+#endif
diff --git a/sources/ui-gadget/viewers-layout/include/view_detail.h b/sources/ui-gadget/viewers-layout/include/view_detail.h
new file mode 100644 (file)
index 0000000..dc1fa0e
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#ifndef __VIEW_DETAIL_H_
+#define __VIEW_DETAIL_H_
+
+
+void view_detail(wifi_device_info_t *device_info);
+
+int view_detail_current_proxy_address_set(const char* proxy_address);
+const char* view_detail_current_proxy_address_get(void);
+int detailview_ip_and_dns_type_set_as_static();
+
+int detailview_modified_ip_address_set(char* data);
+int detailview_modified_gateway_address_set(char* data);
+int detailview_modified_subnet_mask_set(char* data);
+int detailview_modified_dns1_address_set(char* data);
+int detailview_modified_dns2_address_set(char* data);
+
+const char* detailview_modified_ip_address_get(void);
+const char* detailview_modified_gateway_address_get(void);
+const char* detailview_modified_subnet_mask_get(void);
+const char* detailview_modified_dns1_address_get(void);
+const char* detailview_modified_dns2_address_get(void);
+
+#endif
diff --git a/sources/ui-gadget/viewers-layout/include/view_detail_datamodel.h b/sources/ui-gadget/viewers-layout/include/view_detail_datamodel.h
new file mode 100644 (file)
index 0000000..6db140d
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#ifndef __VIEW_DETAIL_DATAMODEL_H_
+#define __VIEW_DETAIL_DATAMODEL_H_
+
+#include "wlan_manager.h"
+
+///////////////////////////////////////////////////////////////
+// managing function
+///////////////////////////////////////////////////////////////
+int view_detail_datamodel_create(const char *profile_name);
+int view_detail_datamodel_destroy(void);
+///////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////
+// determine it`s changeness
+///////////////////////////////////////////////////////////////
+void view_detail_datamodel_determine_modified(const char *profile_name);
+int view_detail_datamodel_determine_staticip_modified(void);
+///////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////
+// getter and setter
+///////////////////////////////////////////////////////////////
+int view_detail_datamodel_ip_and_dns_type_set(IP_TYPES type);
+IP_TYPES view_detail_datamodel_ip_and_dns_type_get(void);
+
+int view_detail_datamodel_proxy_address_set(const char* proxy);
+const char* view_detail_datamodel_proxy_address_get(void);
+
+int view_detail_datamodel_static_ip_address_set(const char* addr);
+int view_detail_datamodel_static_gateway_address_set(const char* addr);
+int view_detail_datamodel_static_subnet_mask_set(const char* addr);
+int view_detail_datamodel_static_dns1_address_set(const char* addr);
+int view_detail_datamodel_static_dns2_address_set(const char* addr);
+
+char* view_detail_datamodel_static_ip_address_get(void);
+char* view_detail_datamodel_static_gateway_address_get(void);
+char* view_detail_datamodel_static_subnet_mask_get(void);
+char* view_detail_datamodel_static_dns1_address_get(void);
+char* view_detail_datamodel_static_dns2_address_get(void);
+///////////////////////////////////////////////////////////////
+
+#endif
diff --git a/sources/ui-gadget/viewers-layout/include/view_dhcpip.h b/sources/ui-gadget/viewers-layout/include/view_dhcpip.h
new file mode 100644 (file)
index 0000000..d841acd
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#ifndef __VIEW_DHCPIP_H_
+#define __VIEW_DHCPIP_H_
+
+
+void view_dhcpip(void);
+
+#endif
diff --git a/sources/ui-gadget/viewers-layout/include/view_eap.h b/sources/ui-gadget/viewers-layout/include/view_eap.h
new file mode 100644 (file)
index 0000000..3fbf113
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#ifndef __VIEW_EAP_H_
+#define __VIEW_EAP_H_
+
+typedef enum {
+       EAP_SEC_TYPE_PEAP  = 0,
+       EAP_SEC_TYPE_TLS,
+       EAP_SEC_TYPE_TTLS ,
+       EAP_SEC_TYPE_SIM,
+       EAP_SEC_TYPE_AKA ,
+       EAP_SEC_TYPE_NULL
+} eap_type_t;
+
+void view_eap(wifi_device_info_t *device_info);
+
+#endif
diff --git a/sources/ui-gadget/viewers-layout/include/view_ime_hidden.h b/sources/ui-gadget/viewers-layout/include/view_ime_hidden.h
new file mode 100644 (file)
index 0000000..8f218ff
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#ifndef __VIEW_IME_HIDDEN_H_
+#define __VIEW_IME_HIDDEN_H_
+
+
+typedef enum {
+       HIDDEN_AP_SECURITY_PUBLIC = 0,
+       HIDDEN_AP_SECURITY_WEP = 1,
+       HIDDEN_AP_SECURITY_WPAPSK = 2,
+       HIDDEN_AP_SECURITY_ENTERPRISE = 3,
+       HIDDEN_AP_SECURITY_DYNAMICWEP = 4
+} hidden_ap_security_type_t;
+
+void view_ime_hidden(void);
+
+#endif
diff --git a/sources/ui-gadget/viewers-layout/include/view_ime_password.h b/sources/ui-gadget/viewers-layout/include/view_ime_password.h
new file mode 100644 (file)
index 0000000..15550bc
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#ifndef __VIEW_IME_PASSWORD_H_
+#define __VIEW_IME_PASSWORD_H_
+
+#include "wlan_manager.h"
+
+void view_ime_password(wifi_device_info_t *device_info);
+void view_ime_password_destroy(void);
+
+#endif
diff --git a/sources/ui-gadget/viewers-layout/include/view_staticip.h b/sources/ui-gadget/viewers-layout/include/view_staticip.h
new file mode 100644 (file)
index 0000000..2c8bfb6
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#ifndef __VIEW_STATICIP_H_
+#define __VIEW_STATICIP_H_
+
+void view_staticip(void);
+
+#endif
diff --git a/sources/ui-gadget/viewers-layout/popup.c b/sources/ui-gadget/viewers-layout/popup.c
new file mode 100644 (file)
index 0000000..61938f2
--- /dev/null
@@ -0,0 +1,600 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#include "wifi.h"
+#include "popup.h"
+#include "wlan_manager.h"
+#include "i18nmanager.h"
+#include "viewer_manager.h"
+
+
+#define POPUP_LAYOUT_TEXT_MAX 100
+
+static Ecore_Timer *timer = NULL;
+static popup_manager_object* manager_object = NULL;
+
+static int checker = 0;
+static double value = 0.0;
+
+
+static void _timeout_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       if (obj)
+               evas_object_del(obj);
+}
+
+void* winset_popup_create(Evas_Object* win)
+{
+       manager_object = (popup_manager_object *)g_malloc0(sizeof(popup_manager_object));
+       manager_object->win = win;
+       manager_object->mode = POPUP_MODE_OFF;
+       return NULL;
+}
+
+static void pbc_popup_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (checker == 0) {
+               checker = 1;
+
+               if (timer != NULL) {
+                       ecore_timer_del(timer);
+                       timer = NULL;
+               }
+
+               wlan_manager_request_cancel_wps_connection((char*) data);
+               winset_popup_mode_set (NULL, POPUP_MODE_OFF, POPUP_OPTION_NONE);
+
+               if (manager_object->content != NULL) {
+                       evas_object_hide(manager_object->content);
+                       evas_object_del(manager_object->content);
+                       manager_object->content = NULL;
+               }
+
+               checker = 0;
+       }
+
+       __COMMON_FUNC_EXIT__;
+}
+
+static void _mobilehotspot_disable_cb(DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data)
+{
+       __COMMON_FUNC_ENTER__;
+
+       GError *err = NULL;
+       guint type;
+       guint result;
+       DBusGConnection *bus = user_data;       
+
+       dbus_g_proxy_end_call(proxy, call, &err, G_TYPE_UINT, &type,
+                                               G_TYPE_UINT, &result, G_TYPE_INVALID);
+       if (err != NULL) {
+               INFO_LOG(COMMON_NAME_LIB, "Error occured [%s]\n", err->message);
+               g_error_free(err);
+       } else {
+               INFO_LOG(COMMON_NAME_LIB, "TYPE = %d,  Result = %d\n", type, result);
+               if (type == 1 && result == 0) {
+                       INFO_LOG(COMMON_NAME_LIB, "OK\n");
+                       power_control();
+               }
+       }
+
+       g_pending_call.is_handled = TRUE;
+
+       g_object_unref(proxy);
+       dbus_g_connection_unref(bus);
+
+       __COMMON_FUNC_EXIT__;
+}
+
+int mobilehotspot_deactivate()
+{
+       __COMMON_FUNC_ENTER__;
+
+       DBusGConnection *bus;
+       DBusGProxy *proxy;
+       GError *error= NULL;
+
+       bus = dbus_g_bus_get(DBUS_BUS_SYSTEM, &error);
+       if (error != NULL) {
+               INFO_LOG(COMMON_NAME_LIB, "Couldn't connect to the system bus");
+               g_error_free(error);
+               return FALSE;
+       }
+
+       proxy = dbus_g_proxy_new_for_name(bus,
+                                       "org.tizen.mobileap",   /* name */
+                                       "/MobileAP",                    /* obj path */
+                                       "org.tizen.mobileap");/* interface */
+       if (proxy == NULL) {
+               INFO_LOG(COMMON_NAME_LIB, "Couldn't create the proxy object");
+               dbus_g_connection_unref(bus);
+               return FALSE;
+       }
+
+       g_pending_call.pending_call = dbus_g_proxy_begin_call(proxy, "disable_wifi_tethering",
+                       _mobilehotspot_disable_cb, bus, NULL, G_TYPE_INVALID);
+
+       g_pending_call.proxy = proxy;
+       g_pending_call.is_handled = FALSE;
+
+       __COMMON_FUNC_EXIT__;
+       return TRUE;
+}
+
+void _ok_clicked_cb(void* data, Evas_Object* obj, void* event_info)
+{
+       if (data) {
+               evas_object_del(data);
+       }
+}
+
+void _retry_clicked_cb(void* data, Evas_Object* obj, void* event_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       INFO_LOG(UG_NAME_NORMAL, "Response OK");
+
+       switch (wlan_manager_start()) {
+       case WLAN_MANAGER_ERR_NONE:
+               break;
+       case WLAN_MANAGER_ERR_ALREADY_REGISTERED:
+               winset_popup_mode_set(NULL, POPUP_MODE_REGISTER_FAILED, POPUP_OPTION_NONE);
+               return;
+       case WLAN_MANAGER_ERR_UNKNOWN:
+               winset_popup_mode_set(NULL, POPUP_MODE_REGISTER_FAILED, POPUP_OPTION_REGISTER_FAILED_COMMUNICATION_FAILED);
+               return;
+       default:
+               __COMMON_FUNC_EXIT__;
+               return;
+       }
+               
+       char profile_name[NET_PROFILE_NAME_LEN_MAX+1] = "";
+       switch (wlan_manager_state_get(profile_name)) {
+       case WLAN_MANAGER_OFF:
+               ERROR_LOG(UG_NAME_NORMAL, "current state is wifi-off\n");
+               viewer_manager_hide(VIEWER_WINSET_SUB_CONTENTS);
+               break;
+       case WLAN_MANAGER_UNCONNECTED:
+               ERROR_LOG(UG_NAME_NORMAL, "current state is wifi-connecting\n");
+       case WLAN_MANAGER_CONNECTING:
+               ERROR_LOG(UG_NAME_NORMAL, "current state is wifi-on\n");
+               viewer_manager_hide(VIEWER_WINSET_SEARCHING);
+               viewer_manager_show(VIEWER_WINSET_SUB_CONTENTS);
+               break;
+       case WLAN_MANAGER_CONNECTED:
+               ERROR_LOG(UG_NAME_NORMAL, "current state is wifi-connected\n");
+               viewer_manager_hide(VIEWER_WINSET_SEARCHING);
+               viewer_manager_show(VIEWER_WINSET_SUB_CONTENTS);
+               break;
+       case WLAN_MANAGER_ERROR:
+               winset_popup_mode_set(NULL, POPUP_MODE_ETC, POPUP_OPTION_ETC_WLAN_STATE_GET_ERROR);
+               break;
+       default:
+               winset_popup_mode_set(NULL, POPUP_MODE_ETC, POPUP_OPTION_ETC_WLAN_STATE_GET_ERROR);
+               break;
+       }
+
+       __COMMON_FUNC_EXIT__;
+}
+
+void _back_clicked_cb(void* data, Evas_Object* obj, void* event_info)
+{
+       INFO_LOG(UG_NAME_NORMAL, "Response CANCEL");
+       wifi_exit();
+}
+
+void _turn_off_mobileap_yes_clicked_cb(void* data, Evas_Object* obj, void* event_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       INFO_LOG(UG_NAME_NORMAL, "Response OK");
+       if (mobilehotspot_deactivate()) {
+               INFO_LOG(UG_NAME_NORMAL, "Mobile AP return value TRUE");
+       } else {
+               INFO_LOG(UG_NAME_NORMAL, "Mobile AP return value FALSE");
+       }
+
+       __COMMON_FUNC_EXIT__;
+}
+
+void _turn_off_mobileap_no_clicked_cb(void* data, Evas_Object* obj, void* event_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       INFO_LOG(UG_NAME_NORMAL, "Response CANCEL");
+       viewer_manager_header_mode_set(HEADER_MODE_OFF);
+
+       __COMMON_FUNC_EXIT__;
+}
+
+/* Mobile-AP popup callback */
+void _popup_out_of_wifi_yes_cb(void* data, Evas_Object* obj, void* event_info)
+{
+       INFO_LOG(UG_NAME_NORMAL, "Response OK");
+       wifi_exit();
+}
+
+void _popup_out_of_wifi_no_cb(void* data, Evas_Object* obj, void* event_info)
+{
+       INFO_LOG(UG_NAME_NORMAL, "Response CANCEL");
+       if (data) {
+               evas_object_del(data);
+       }
+}
+
+int winset_popup_timer_remove(void)
+{
+       if(timer != NULL) {
+               ecore_timer_del(timer);
+               timer = NULL;
+               return TRUE;
+       }
+       return FALSE;
+}
+
+int winset_popup_stop(void* object)
+{
+       __COMMON_FUNC_ENTER__;
+       value = 1.0;
+       __COMMON_FUNC_EXIT__;
+       return TRUE;
+}
+
+static int _fn_pb_timer_bar(void *data)
+{
+       if (timer == NULL || manager_object->progressbar == NULL) {
+               return 0;
+       }
+
+       value = 0.0;
+       value = elm_progressbar_value_get(manager_object->progressbar);
+       if (value >= 1) {
+               if (checker == 0) {
+                       checker = 1;
+
+                       __COMMON_FUNC_ENTER__;
+
+                       wlan_manager_request_cancel_wps_connection((char*) data);
+
+                       char message[128] = "one click connection failed";
+
+                       winset_popup_mode_set (manager_object, POPUP_MODE_OFF, POPUP_OPTION_NONE);
+                       evas_object_hide(manager_object->content);
+                       evas_object_del(manager_object->content);
+                       manager_object->content = NULL;
+
+                       checker = 0;
+
+                       Evas_Object*instance_popup = elm_popup_add(manager_object->win);
+                       elm_object_text_set(instance_popup, message);
+                       elm_popup_timeout_set(instance_popup, 3.0f);
+                       evas_object_smart_callback_add(instance_popup, "timeout", _timeout_cb, NULL);
+                       evas_object_size_hint_weight_set(instance_popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+                       elm_popup_orient_set(instance_popup, ELM_POPUP_ORIENT_CENTER);
+                       evas_object_show(instance_popup);
+                       INFO_LOG(UG_NAME_NORMAL, "Back button");
+
+                       __COMMON_FUNC_EXIT__;
+                       return 0;
+               }
+       } else {
+               value += 0.001;
+       }
+
+       elm_progressbar_value_set(manager_object->progressbar, value);
+
+       return 1;
+}
+
+int winset_popup_simple_set(const char* text)
+{
+       __COMMON_FUNC_ENTER__;
+       manager_object->content = elm_popup_add(manager_object->win);
+       evas_object_size_hint_weight_set(manager_object->content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_object_text_set(manager_object->content, text);
+       Evas_Object *btn_ok = elm_button_add(manager_object->content);
+       elm_object_text_set(btn_ok, sc(PACKAGE, I18N_TYPE_Ok));
+       elm_object_part_content_set(manager_object->content, "button1", btn_ok);
+       evas_object_smart_callback_add(btn_ok, "clicked", _ok_clicked_cb, manager_object->content);
+       evas_object_show(manager_object->content);
+
+       return TRUE;
+}
+
+static POPUP_MODES _popup_mode;
+static POPUP_MODE_OPTIONS _popup_option;
+
+static int _winset_popup_mode_set(void* data)
+{
+       __COMMON_FUNC_ENTER__;
+
+       POPUP_MODES mode = _popup_mode;
+       POPUP_MODE_OPTIONS option = _popup_option;
+
+       if(NULL != manager_object->content) {
+               evas_object_del(manager_object->content);
+               manager_object->content = NULL;
+       }
+       switch (manager_object->mode) {
+               case POPUP_MODE_OFF:
+                       if (POPUP_MODE_PBC == mode) {
+                               manager_object->content = elm_popup_add(manager_object->win);
+                               evas_object_size_hint_weight_set(manager_object->content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+                               elm_object_text_set(manager_object->content, _("Push the wps button"));
+                               Evas_Object *btn_cancel = elm_button_add(manager_object->content);
+                               elm_object_text_set(btn_cancel,  sc(PACKAGE, I18N_TYPE_Cancel));
+                               elm_object_part_content_set(manager_object->content, "button1", btn_cancel);
+                               evas_object_smart_callback_add(btn_cancel, "clicked", pbc_popup_cb, data);
+                               evas_object_show(manager_object->content);
+
+                               manager_object->progressbar = elm_progressbar_add(manager_object->content);
+                               elm_progressbar_horizontal_set(manager_object->progressbar, EINA_TRUE);
+
+                               elm_object_style_set(manager_object->progressbar, "list_progress");
+                               evas_object_size_hint_align_set(manager_object->progressbar, EVAS_HINT_FILL, 0.5);
+                               evas_object_size_hint_weight_set(manager_object->progressbar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+                               elm_object_content_set(manager_object->content, manager_object->progressbar);
+                               elm_progressbar_span_size_set(manager_object->progressbar, 250);
+                               elm_progressbar_value_set(manager_object->progressbar, 0.0);
+                               timer = ecore_timer_add(0.1, (Ecore_Task_Cb) _fn_pb_timer_bar, data);
+                               elm_progressbar_unit_format_set(manager_object->progressbar, NULL);
+
+                       } else if (POPUP_MODE_REGISTER_FAILED == mode){
+                               switch(option) {
+                                       case POPUP_OPTION_REGISTER_FAILED_COMMUNICATION_FAILED:
+                                               manager_object->content = elm_popup_add(manager_object->win);
+                                               evas_object_size_hint_weight_set(manager_object->content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+                                               elm_object_text_set(manager_object->content, "connman is not working now");
+                                               Evas_Object *btn_retry = elm_button_add(manager_object->content);
+                                               elm_object_text_set(btn_retry, "Retry");
+                                               elm_object_part_content_set(manager_object->content, "button1", btn_retry);
+                                               evas_object_smart_callback_add(btn_retry, "clicked", _retry_clicked_cb, NULL);
+                                               Evas_Object *btn_back = elm_button_add(manager_object->content);
+                                               elm_object_text_set(btn_retry, "Back");
+                                               elm_object_part_content_set(manager_object->content, "button2", btn_back);
+                                               evas_object_smart_callback_add(btn_retry, "clicked", _back_clicked_cb, NULL);
+                                               evas_object_show(manager_object->content);
+                                               break;
+
+                                       default:
+                                               manager_object->content = elm_popup_add(manager_object->win);
+                                               elm_object_text_set(manager_object->content, _("[ERROR] wlan_client func<br>wlan_client_register"));
+                                               Evas_Object *btn_ok = elm_button_add(manager_object->content);
+                                               elm_object_text_set(btn_ok, sc(PACKAGE, I18N_TYPE_Ok));
+                                               elm_object_part_content_set(manager_object->content, "button1", btn_ok);
+                                               evas_object_smart_callback_add(btn_ok, "clicked", _ok_clicked_cb, manager_object->content);
+                                               evas_object_show(manager_object->content);
+                                               break;
+                               }
+
+                       } else if (POPUP_MODE_POWER_ON_FAILED == mode) {
+                               switch (option) {
+                               case POPUP_OPTION_POWER_ON_FAILED_MOBILE_HOTSPOT:
+                                       manager_object->content = elm_popup_add(manager_object->win);
+                                       evas_object_size_hint_weight_set(manager_object->content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+                                       elm_object_text_set(manager_object->content, "Connecting Wi-Fi will turn off Mobile hotspot. Continue?");
+                                       Evas_Object *btn_yes = elm_button_add(manager_object->content);
+                                       elm_object_text_set(btn_yes, sc(PACKAGE, I18N_TYPE_Yes));
+                                       elm_object_part_content_set(manager_object->content, "button1", btn_yes);
+                                       evas_object_smart_callback_add(btn_yes, "clicked", _turn_off_mobileap_yes_clicked_cb, NULL);
+                                       Evas_Object *btn_no = elm_button_add(manager_object->content);
+                                       elm_object_text_set(btn_no, sc(PACKAGE, I18N_TYPE_No));
+                                       elm_object_part_content_set(manager_object->content, "button2", btn_no);
+                                       evas_object_smart_callback_add(btn_no, "clicked", _turn_off_mobileap_no_clicked_cb, NULL);
+                                       evas_object_show(manager_object->content);
+                                       break;
+                               default:
+                                       manager_object->content = elm_popup_add(manager_object->win);
+                                       evas_object_size_hint_weight_set(manager_object->content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+                                       elm_object_text_set(manager_object->content, "wlan_client_power_on fail");
+                                       Evas_Object *btn_ok = elm_button_add(manager_object->content);
+                                       elm_object_text_set(btn_ok, sc(PACKAGE, I18N_TYPE_Ok));
+                                       elm_object_part_content_set(manager_object->content, "button1", btn_ok);
+                                       evas_object_smart_callback_add(btn_ok, "clicked", _ok_clicked_cb, manager_object->content);
+                                       break;
+                               }
+                               evas_object_show(manager_object->content);
+
+                       } else if (POPUP_MODE_CONNECTING_FAILED == mode) {
+                               manager_object->content = elm_popup_add(manager_object->win);
+                               evas_object_size_hint_weight_set(manager_object->content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+                               Evas_Object *btn_ok = elm_button_add(manager_object->content);
+                               elm_object_text_set(btn_ok, sc(PACKAGE, I18N_TYPE_Ok));
+                               elm_object_part_content_set(manager_object->content, "button1", btn_ok);
+                               evas_object_smart_callback_add(btn_ok, "clicked", _ok_clicked_cb, manager_object->content);
+
+                               char buffer[POPUP_LAYOUT_TEXT_MAX+1];
+/*
+ * FIX ME LATER
+ * It will be fixed to use i18n function when elm_popup bug fixing work done
+ * ex) str = i18n_manager_get_text(I18N_TYPE_Connection_attempt...);
+ */
+                               char* str = NULL;
+
+                               switch (option) {
+                                       case POPUP_OPTION_CONNECTING_FAILED_TIMEOUT:
+                                               str = "No response from<br>Wi-Fi Access Point";
+                                               break;
+                                       case POPUP_OPTION_CONNECTING_FAILED_INVALID_OPERATION:
+                                               str = "[ERROR]<br>wlan_client_open_connection<br>return INVALID OPERATION";
+                                               break;
+                                       case POPUP_OPTION_CONNECTIONG_PASSWORD_WEP_ERROR:
+                                               str = "WEP requires 5, 10, 13, 26 letters for a password.<br>Please, check your input.";
+                                               break;
+                                       case POPUP_OPTION_CONNECTIONG_PASSWORD_WPAPSK_ERROR:
+                                               str = "WPA2 requires 8 - 63 letters for a password.<br>Please, check your input.";
+                                               break;
+                                       case POPUP_OPTION_NONE:
+                                               str = "NONE";
+                                               break;
+                                       default:
+                                               str = "Connection attempt failed";
+                                               break;
+                               }
+
+                               INFO_LOG(UG_NAME_NORMAL,"popup str [%s] by option [%d]", str, option);
+                               if(NULL != str) {
+                                       int len = strlen(str);
+                                       if(len+1 <= POPUP_LAYOUT_TEXT_MAX+1) {
+                                               snprintf(buffer, len+1, "%s", str);
+                                       }
+                               }
+
+                               elm_object_text_set(manager_object->content, buffer);
+                               evas_object_show(manager_object->content);
+
+                       } else if (POPUP_MODE_INPUT_FAILED == mode) {
+                               char* text = NULL;
+                               switch(option){
+                                       case POPUP_OPTION_INPUT_FAILED_PROXY_IP_MISTYPE :
+                                               text = _("Please, input a valid address.");
+                                               break;
+                                       default:
+                                               text = _("Type error");
+                                               break;
+                               }
+
+                               manager_object->content = elm_popup_add(manager_object->win);
+                               evas_object_size_hint_weight_set(manager_object->content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+                               elm_object_text_set(manager_object->content, text);
+                               Evas_Object *btn_ok = elm_button_add(manager_object->content);
+                               elm_object_text_set(btn_ok, sc(PACKAGE, I18N_TYPE_Ok));
+                               elm_object_part_content_set(manager_object->content, "button1", btn_ok);
+                               evas_object_smart_callback_add(btn_ok, "clicked", _ok_clicked_cb, manager_object->content);
+
+                               evas_object_show(manager_object->content);
+
+                       } else if (POPUP_MODE_PIN == mode) {
+                               manager_object->content = elm_popup_add(manager_object->win);
+                               evas_object_size_hint_weight_set(manager_object->content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+                               elm_object_text_set(manager_object->content, _("Enter PIN code"));
+                               Evas_Object *btn_cancel = elm_button_add(manager_object->content);
+                               elm_object_text_set(btn_cancel, sc(PACKAGE, I18N_TYPE_Cancel));
+                               elm_object_part_content_set(manager_object->content, "button1", btn_cancel);
+                               evas_object_smart_callback_add(btn_cancel, "clicked", _ok_clicked_cb, manager_object->content);
+                               evas_object_show(manager_object->content);
+
+                               manager_object->progressbar = elm_progressbar_add(manager_object->content);
+                               elm_object_style_set(manager_object->progressbar, "list_progress");
+                               evas_object_size_hint_align_set(manager_object->progressbar, EVAS_HINT_FILL, 0.5);
+                               evas_object_size_hint_weight_set(manager_object->progressbar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+                               elm_progressbar_unit_format_set(manager_object->progressbar, NULL);
+                               elm_object_content_set(manager_object->content, manager_object->progressbar);
+                               timer = ecore_timer_add(0.1, (Ecore_Task_Cb) _fn_pb_timer_bar, manager_object->progressbar);
+
+                       } else if (POPUP_MODE_ETC) {
+                               switch (option) {
+                               case POPUP_OPTION_ETC_WLAN_STATE_GET_ERROR:
+                                       manager_object->content = elm_popup_add(manager_object->win);
+                                       elm_object_text_set(manager_object->content, _("[ERROR] wlan_client func<br>wlan_client_get_state"));
+                                       Evas_Object *btn_ok = elm_button_add(manager_object->content);
+                                       elm_object_text_set(btn_ok, sc(PACKAGE, I18N_TYPE_Ok));
+                                       elm_object_part_content_set(manager_object->content, "button1", btn_ok);
+                                       evas_object_smart_callback_add(btn_ok, "clicked", _ok_clicked_cb, manager_object->content);
+                                       evas_object_show(manager_object->content);
+                                       break;
+                               case POPUP_OPTION_ETC_BACK_ENABLE_WHEN_CONNECTED_ERROR:
+                                       manager_object->content = elm_popup_add(manager_object->win);
+                                       evas_object_size_hint_weight_set(manager_object->content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+                                       elm_object_text_set(manager_object->content, "Wi-Fi is not connected yet<br>Will you out of Wi-Fi?");
+                                       Evas_Object *btn_yes = elm_button_add(manager_object->content);
+                                       elm_object_text_set(btn_yes, sc(PACKAGE, I18N_TYPE_Yes));
+                                       elm_object_part_content_set(manager_object->content, "button1", btn_yes);
+                                       evas_object_smart_callback_add(btn_yes, "clicked", _popup_out_of_wifi_yes_cb, manager_object->content);
+                                       Evas_Object *btn_no = elm_button_add(manager_object->content);
+                                       elm_object_text_set(btn_no, sc(PACKAGE, I18N_TYPE_No));
+                                       elm_object_part_content_set(manager_object->content, "button1", btn_no);
+                                       evas_object_smart_callback_add(btn_no, "clicked", _popup_out_of_wifi_no_cb, manager_object->content);
+                                       evas_object_show(manager_object->content);
+                                       break;
+                               case POPUP_OPTION_NONE:
+                                       break;
+                               default:
+                                       break;
+                               }
+                       }
+                       break;
+               default:
+                       if (POPUP_MODE_OFF == mode) {
+                               if (manager_object->content) {
+                                       evas_object_hide(manager_object->content);
+                                       evas_object_del(manager_object->content);
+                                       manager_object->content = NULL;
+                               }
+                       }
+                       break;
+       }
+       __COMMON_FUNC_EXIT__;
+       return FALSE;
+}
+
+/**
+ * FIX ME LATER
+ *
+ * This function had re-factored as elm_popup's bug
+ *
+ */
+int winset_popup_mode_set(void* object, POPUP_MODES mode, POPUP_MODE_OPTIONS option)
+{
+       _popup_mode = mode;
+       _popup_option = option;
+       ecore_idler_add( (Ecore_Task_Cb) _winset_popup_mode_set, object);
+       return TRUE;
+}
+
+POPUP_MODES winset_popup_mode_get(void* object)
+{
+       return manager_object->mode;
+}
+
+int winset_popup_destroy(void* object)
+{
+       if (timer != NULL) {
+               ecore_timer_del(timer);
+               timer = NULL;
+       }
+
+       if (NULL != manager_object->content) {
+               evas_object_del(manager_object->content);
+               manager_object->content = NULL;
+       }
+
+       g_free(manager_object);
+       return TRUE;
+}
+
+Evas_Object* winset_popup_content_get(void* object)
+{
+       return manager_object->content;
+}
+
+int winset_popup_content_set(Evas_Object* object)
+{
+       manager_object->content = object;
+       return TRUE;
+}
+
+int winset_popup_content_clear()
+{
+       evas_object_hide(manager_object->content);
+       evas_object_del(manager_object->content);
+       manager_object->content = NULL;
+       return TRUE;
+}
diff --git a/sources/ui-gadget/viewers-layout/view_detail.c b/sources/ui-gadget/viewers-layout/view_detail.c
new file mode 100644 (file)
index 0000000..c41bd12
--- /dev/null
@@ -0,0 +1,809 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#include "wifi.h"
+#include "view_detail.h"
+#include "view_detail_datamodel.h"
+#include "view_staticip.h"
+#include "view_dhcpip.h"
+#include "i18nmanager.h"
+#include "viewer_manager.h"
+#include "connman-profile-manager.h"
+#include "popup.h"
+
+
+static Elm_Genlist_Item_Class grouptitle_itc ;
+static Elm_Genlist_Item_Class staticip_itc ;
+static Elm_Genlist_Item_Class dhcpip_itc ;
+static Elm_Genlist_Item_Class seperator_itc ;
+static Elm_Genlist_Item_Class description_itc ;
+static Elm_Genlist_Item_Class proxy_itc ;
+
+typedef struct _view_detail_data {
+       char *profile_name;
+       char *ssid;
+       int rssi;
+       int security_mode;
+} view_detail_data;
+view_detail_data *_detail_data = NULL;
+
+typedef struct _view_detail_description_data {
+       char* title;
+       char* description;
+} _view_detail_description_data;
+
+
+static Evas_Object* _list = NULL;
+static Elm_Object_Item* _button_forget_item = NULL;
+static Elm_Object_Item* dhcpip_item = NULL;
+static Elm_Object_Item* staticip_item = NULL;
+
+static int view_detail_end = TRUE;
+
+/* function declaration */
+static void detailview_sk_cb(void *data, Evas_Object *obj, void *event_info);
+static void forget_sk_cb(void *data, Evas_Object *obj, void *event_info);
+static void resource_remove_and_pop(void);
+static void _detailview_staticip_button_cb(void* data, Evas_Object* obj, void* event_info);
+static void _detailview_dhcpip_button_cb(void* data, Evas_Object* obj, void* event_info);
+
+
+///////////////////////////////////////////////////////////////
+// implementation
+///////////////////////////////////////////////////////////////
+int view_detail_current_proxy_address_set(const char* proxy_address)
+{
+       return view_detail_datamodel_proxy_address_set(proxy_address);
+}
+
+const char* view_detail_current_proxy_address_get(void){
+       return view_detail_datamodel_proxy_address_get();
+}
+
+static void _remove_all(void)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if(_list) {
+               evas_object_del(_list);
+       }
+
+       if (_detail_data) {
+               g_free(_detail_data);
+               _detail_data = NULL;
+       }
+
+       view_detail_datamodel_destroy();
+
+       __COMMON_FUNC_EXIT__;
+}
+
+int detailview_ip_and_dns_type_set_as_static()
+{
+       view_detail_datamodel_ip_and_dns_type_set(IP_TYPE_STATIC_IP);
+
+       if(NULL != dhcpip_item) {
+               elm_genlist_item_update(dhcpip_item);
+       }
+       if(NULL != staticip_item) {
+               elm_genlist_item_update(staticip_item);
+       }
+
+       return TRUE;
+}
+
+int detailview_modified_ip_address_set(char* data){
+       /* data can be NULL */
+       view_detail_datamodel_static_ip_address_set((const char*) data);
+       return TRUE;
+}
+int detailview_modified_gateway_address_set(char* data){
+       /* data can be NULL */
+       view_detail_datamodel_static_gateway_address_set((const char*) data);
+       return TRUE;
+}
+int detailview_modified_subnet_mask_set(char* data){
+       /* data can be NULL */
+       view_detail_datamodel_static_subnet_mask_set((const char*) data);
+       return TRUE;
+}
+int detailview_modified_dns1_address_set(char* data){
+       /* data can be NULL */
+       view_detail_datamodel_static_dns1_address_set((const char*) data);
+       return TRUE;
+}
+int detailview_modified_dns2_address_set(char* data){
+       /* data can be NULL */
+       view_detail_datamodel_static_dns2_address_set((const char*) data);
+       return TRUE;
+}
+const char* detailview_modified_ip_address_get(){
+       return view_detail_datamodel_static_ip_address_get();
+}
+const char* detailview_modified_gateway_address_get(){
+       return view_detail_datamodel_static_gateway_address_get();
+}
+const char* detailview_modified_subnet_mask_get(){
+       return view_detail_datamodel_static_subnet_mask_get();
+}
+const char* detailview_modified_dns1_address_get(){
+       return view_detail_datamodel_static_dns1_address_get();
+}
+const char* detailview_modified_dns2_address_get(){
+       return view_detail_datamodel_static_dns2_address_get();
+}
+
+static void yes_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if(view_detail_end == TRUE) {
+               return;
+       }
+       view_detail_end = TRUE;
+
+       wlan_manager_forget(_detail_data->profile_name);
+       elm_naviframe_item_pop(viewer_manager_get_naviframe());
+       resource_remove_and_pop();
+
+       __COMMON_FUNC_EXIT__;
+       return;
+}
+
+static void no_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       __COMMON_FUNC_ENTER__;
+       if (data) {
+               evas_object_del(data);
+       }
+       __COMMON_FUNC_EXIT__;
+}
+
+static void forget_sk_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       Evas_Object* popup = elm_popup_add((Evas_Object *)data);
+       evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       char buffer[200];
+       snprintf(buffer, sizeof(buffer), sc(PACKAGE, I18N_TYPE_Autonomous_connection_to_s_will_be_turned_off_Continue), _detail_data->ssid);
+       elm_object_text_set(popup, buffer);
+       Evas_Object *btn_yes = elm_button_add(popup);
+       elm_object_text_set(btn_yes, sc(PACKAGE, I18N_TYPE_Yes));
+       elm_object_part_content_set(popup, "button1", btn_yes);
+       evas_object_smart_callback_add(btn_yes, "clicked", yes_cb, NULL);
+       Evas_Object *btn_no = elm_button_add(popup);
+       elm_object_text_set(btn_no, sc(PACKAGE, I18N_TYPE_No));
+       elm_object_part_content_set(popup, "button2", btn_no);
+       evas_object_smart_callback_add(btn_no, "clicked", no_cb, popup);
+       winset_popup_content_set(popup);
+
+       evas_object_show(popup);
+
+       __COMMON_FUNC_EXIT__;
+}
+
+static void resource_remove_and_pop()
+{
+       _remove_all();
+}
+
+static void detailview_sk_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       assertm_if(NULL == data, "NULL!!");
+
+       if (view_detail_end == TRUE)
+               return;
+
+       view_detail_end = TRUE;
+
+       view_detail_datamodel_determine_modified(_detail_data->profile_name);
+
+       resource_remove_and_pop();
+
+       __COMMON_FUNC_EXIT__;
+}
+
+static char* _view_detail_grouptitle_text_get(void *data, Evas_Object *obj, const char *part)
+{
+       __COMMON_FUNC_ENTER__;
+
+       assertm_if(NULL == obj, "NULL!!");
+       assertm_if(NULL == part, "NULL!!");
+
+       if (part != NULL) {
+               if (!strncmp(part, "elm.text", strlen(part))) {
+                       __COMMON_FUNC_EXIT__;
+                       return (char*) strdup(sc(PACKAGE, I18N_TYPE_IP_address));
+               }
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return NULL;
+}
+
+static char* _view_detail_staticip_text_get(void *data, Evas_Object *obj, const char *part)
+{
+       __COMMON_FUNC_ENTER__;
+
+       assertm_if(NULL == obj, "NULL!!");
+       assertm_if(NULL == part, "NULL!!");
+
+       if (part != NULL) {
+               if (!strncmp(part, "elm.text", strlen(part))) {
+                       __COMMON_FUNC_EXIT__;
+                       return (char*) strdup(sc(PACKAGE, I18N_TYPE_Static_IP));
+               }
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return NULL;
+}
+
+static char* _view_detail_dhcpip_text_get(void *data, Evas_Object *obj, const char *part)
+{
+       __COMMON_FUNC_ENTER__;
+
+       assertm_if(NULL == obj, "NULL!!");
+       assertm_if(NULL == part, "NULL!!");
+
+       if (part != NULL) {
+               if (!strncmp(part, "elm.text", strlen(part))) {
+                       __COMMON_FUNC_EXIT__;
+                       return (char*) strdup(sc(PACKAGE, I18N_TYPE_Dynamic_IP));
+               }
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return NULL;
+}
+
+static Evas_Object *_view_detail_staticip_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (obj == NULL || part == NULL) {
+               return NULL;
+       }
+
+       int current_value = view_detail_datamodel_ip_and_dns_type_get();
+       Evas_Object* icon = NULL;
+       if (!strncmp(part, "elm.icon.1", strlen(part))) {
+               icon = elm_radio_add(obj);
+               DEBUG_LOG(UG_NAME_NORMAL, "current_value [%d]", current_value);
+
+               if (current_value == IP_TYPE_STATIC_IP) {
+                       elm_radio_state_value_set(icon, FALSE); /* ON */
+               } else {
+                       elm_radio_state_value_set(icon, TRUE); /* OFF */
+               }
+       } else if (!strncmp(part, "elm.icon.2", strlen(part))) {
+               if (current_value == IP_TYPE_STATIC_IP) {
+                       icon = elm_button_add(obj);
+                       assertm_if(NULL == icon, "NULL!!");
+                       elm_object_style_set(icon, "reveal");
+                       evas_object_smart_callback_add(icon, "clicked", (Evas_Smart_Cb)_detailview_staticip_button_cb, NULL);
+                       evas_object_propagate_events_set(icon, EINA_FALSE);
+               }
+               return icon;
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return icon;
+}
+
+static Evas_Object *_view_detail_dhcpip_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (obj == NULL || part == NULL) {
+               return NULL;
+       }
+
+       int current_value = view_detail_datamodel_ip_and_dns_type_get();
+       Evas_Object* icon = NULL;
+       if (!strncmp(part, "elm.icon.1", strlen(part))) {
+               icon = elm_radio_add(obj);
+               DEBUG_LOG(UG_NAME_NORMAL, "current_value [%d]", current_value);
+
+               if (current_value == IP_TYPE_DHCP_IP) {
+                       elm_radio_state_value_set(icon, FALSE); /* ON */
+               } else {
+                       elm_radio_state_value_set(icon, TRUE); /* OFF */
+               }
+       } else if (!strncmp(part, "elm.icon.2", strlen(part))) {
+               if (current_value == IP_TYPE_DHCP_IP) {
+                       icon = elm_button_add(obj);
+                       assertm_if(NULL == icon, "NULL!!");
+                       elm_object_style_set(icon, "reveal");
+                       evas_object_smart_callback_add(icon, "clicked", (Evas_Smart_Cb)_detailview_dhcpip_button_cb, NULL);
+                       evas_object_propagate_events_set(icon, EINA_FALSE);
+               }
+               return icon;
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return icon;
+}
+
+static char *_view_detail_description_text_get(void *data, Evas_Object *obj, const char *part)
+{
+       __COMMON_FUNC_ENTER__;
+
+       _view_detail_description_data* det = (_view_detail_description_data*) data;
+       assertm_if(NULL == det, "NULL!!");
+       assertm_if(NULL == det->title, "NULL!!");
+       assertm_if(NULL == det->description, "NULL!!");
+       assertm_if(NULL == part, "NULL!!");
+
+       if(0 == strncmp("elm.text.1", part, strlen(part))) {
+               __COMMON_FUNC_EXIT__;
+               return strdup(det->title);
+       } else if(0 == strncmp("elm.text.2", part, strlen(part))) {
+               __COMMON_FUNC_EXIT__;
+               return strdup(det->description);
+       } else {
+               __COMMON_FUNC_EXIT__;
+               return NULL;
+       }
+}
+
+static void _entry_changed_cb(void* data, Evas_Object* obj, void* event_info)
+{
+       if (obj == NULL)
+               return;
+
+       if (elm_object_focus_get(data)) {
+               if (elm_entry_is_empty(obj))
+                       elm_object_signal_emit(data, "elm,state,eraser,hide", "elm");
+               else
+                       elm_object_signal_emit(data, "elm,state,eraser,show", "elm");
+       }
+
+       const char* txt = elm_entry_markup_to_utf8(elm_entry_entry_get(obj));
+       assertm_if(NULL == txt, "NULL!!");
+
+       DEBUG_LOG( UG_NAME_NORMAL, "text [%s]", txt);
+       view_detail_current_proxy_address_set(txt);
+}
+
+static void _entry_focused_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       if (!elm_entry_is_empty(obj))
+               elm_object_signal_emit(data, "elm,state,eraser,show", "elm");
+       elm_object_signal_emit(data, "elm,state,guidetext,hide", "elm");
+}
+
+static void _entry_unfocused_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       if (elm_entry_is_empty(obj))
+               elm_object_signal_emit(data, "elm,state,guidetext,show", "elm");
+       elm_object_signal_emit(data, "elm,state,eraser,hide", "elm");
+}
+
+static void _eraser_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
+{
+       elm_entry_entry_set(data, "");
+}
+
+static Evas_Object *_view_detail_proxy_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if(!strncmp(part, "elm.icon", strlen(part))) {
+               Evas_Object* layout = NULL;
+
+               _view_detail_description_data* det = (_view_detail_description_data*) data;
+               assertm_if(NULL == det, "NULL!!");
+               assertm_if(NULL == det->title, "NULL!!");
+               assertm_if(NULL == obj, "NULL!!");
+
+               const char* proxy_addr = view_detail_current_proxy_address_get();
+               assertm_if(NULL == proxy_addr, "NULL!!");
+
+               DEBUG_LOG(UG_NAME_NORMAL, "title [%s]", det->title);
+               DEBUG_LOG(UG_NAME_NORMAL, "description [%s]", proxy_addr);
+
+               layout = elm_layout_add(obj);
+               if (layout) {
+                       elm_layout_theme_set(layout, "layout", "editfield", "title");
+                       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+                       evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+                       elm_object_part_text_set(layout, "elm.text", det->title);
+                       Evas_Object *entry = elm_entry_add(obj);
+                       elm_object_part_content_set(layout, "elm.swallow.content", entry);
+                       elm_entry_entry_set(entry, proxy_addr);
+
+                       elm_entry_single_line_set(entry, EINA_TRUE);
+                       elm_entry_scrollable_set(entry, EINA_TRUE);
+                       elm_entry_cnp_mode_set(entry, ELM_CNP_MODE_NO_IMAGE);
+                       elm_entry_input_panel_layout_set(entry, ELM_INPUT_PANEL_LAYOUT_URL);
+
+                       evas_object_smart_callback_add(entry, "changed", _entry_changed_cb, layout);
+                       evas_object_smart_callback_add(entry, "focused", _entry_focused_cb, layout);
+                       evas_object_smart_callback_add(entry, "unfocused", _entry_unfocused_cb, layout);
+                       elm_object_signal_callback_add(layout, "elm,eraser,clicked", "elm", _eraser_clicked_cb, entry);
+
+                       __COMMON_FUNC_EXIT__;
+                       return layout;
+               }
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return NULL;
+
+}
+
+static int _genlist_item_disable_later(void* data)
+{
+       if(NULL != data){
+               elm_genlist_item_selected_set((Elm_Object_Item*) data, FALSE);
+       }
+       return FALSE;
+}
+static void _detailview_description_callback(void* data, Evas_Object* obj, void* event_info)
+{
+       ecore_idler_add( (Ecore_Task_Cb) _genlist_item_disable_later, event_info);
+}
+
+static void _detailview_staticip_button_cb(void* data, Evas_Object* obj, void* event_info)
+{
+       __COMMON_FUNC_ENTER__;
+       assertm_if(NULL == data, "data is NULL!!");
+       assertm_if(NULL == obj, "obj is NULL!!");
+
+       view_staticip();
+
+       if (dhcpip_item != NULL) {
+               elm_genlist_item_update(dhcpip_item);
+       }
+       if (staticip_item != NULL) {
+               elm_genlist_item_update(staticip_item);
+       }
+
+       ecore_idler_add((Ecore_Task_Cb)_genlist_item_disable_later, event_info);
+       __COMMON_FUNC_EXIT__;
+}
+
+static void _detailview_dhcpip_button_cb(void* data, Evas_Object* obj, void* event_info)
+{
+       __COMMON_FUNC_ENTER__;
+       assertm_if(NULL == data, "data is NULL!!");
+       assertm_if(NULL == obj, "obj is NULL!!");
+
+       view_dhcpip();
+
+       if (dhcpip_item != NULL) {
+               elm_genlist_item_update(dhcpip_item);
+       }
+       if (staticip_item != NULL) {
+               elm_genlist_item_update(staticip_item);
+       }
+
+       ecore_idler_add((Ecore_Task_Cb)_genlist_item_disable_later, event_info);
+       __COMMON_FUNC_EXIT__;
+}
+
+void _detailview_staticip_item_click_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       view_detail_datamodel_ip_and_dns_type_set(IP_TYPE_STATIC_IP);
+
+       if (dhcpip_item != NULL) {
+               elm_genlist_item_update(dhcpip_item);
+       }
+       if (staticip_item != NULL) {
+               elm_genlist_item_update(staticip_item);
+       }
+
+       ecore_idler_add((Ecore_Task_Cb)_genlist_item_disable_later, event_info);
+       __COMMON_FUNC_EXIT__;
+}
+
+void _detailview_dhcpip_item_click_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       view_detail_datamodel_ip_and_dns_type_set(IP_TYPE_DHCP_IP);
+
+       if (dhcpip_item != NULL) {
+               elm_genlist_item_update(dhcpip_item);
+       }
+       if (staticip_item != NULL) {
+               elm_genlist_item_update(staticip_item);
+       }
+
+       ecore_idler_add((Ecore_Task_Cb)_genlist_item_disable_later, event_info);
+       __COMMON_FUNC_EXIT__;
+}
+
+static int _add_seperator(Evas_Object* genlist)
+{
+       assertm_if(NULL == genlist, "NULL!!");
+
+       Elm_Object_Item* sep2 = elm_genlist_item_append(
+                                       genlist,
+                                       &seperator_itc,
+                                       NULL,
+                                       NULL,
+                                       ELM_GENLIST_ITEM_GROUP,
+                                       NULL,
+                                       NULL);
+
+       assertm_if(NULL == sep2, "NULL!!");
+
+       elm_genlist_item_select_mode_set(sep2, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+       return TRUE;
+}
+
+static int _add_description(Evas_Object* genlist, char* title, char* description)
+{
+       assertm_if(NULL == genlist, "NULL!!");
+       assertm_if(NULL == title, "NULL!!");
+       assertm_if(NULL == description, "NULL!!");
+
+       _view_detail_description_data* description_data = (_view_detail_description_data*) malloc (sizeof( _view_detail_description_data));
+       assertm_if(NULL == description_data, "NULL!!");
+       memset(description_data, 0, sizeof(_view_detail_description_data));
+
+       description_data->title = strdup(title);
+       description_data->description = strdup(description);
+
+       Elm_Object_Item* det = NULL;
+       det = elm_genlist_item_append(
+                       genlist,
+                       &description_itc,
+                       description_data,
+                       NULL,
+                       ELM_GENLIST_ITEM_NONE,
+                       _detailview_description_callback,
+                       NULL);
+       assertm_if(NULL == det, "NULL!!");
+
+       elm_genlist_item_select_mode_set(det, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+
+       return TRUE;
+}
+
+static int _add_proxy(Evas_Object* genlist, char* title) 
+{
+       assertm_if(NULL == genlist, "NULL!!");
+       assertm_if(NULL == title, "NULL!!");
+
+       _view_detail_description_data* description_data = 
+               (_view_detail_description_data*) malloc (sizeof( _view_detail_description_data));
+       assertm_if(NULL == description_data, "NULL!!");
+       memset(description_data, 0, sizeof(_view_detail_description_data));
+
+       description_data->title = strdup(title);
+
+       Elm_Object_Item* det = NULL;
+       det = elm_genlist_item_append(
+                       genlist,
+                       &proxy_itc,
+                       description_data,
+                       NULL,
+                       ELM_GENLIST_ITEM_NONE,
+                       NULL,
+                       NULL);
+       assertm_if(NULL == det, "NULL!!");
+
+       elm_genlist_item_select_mode_set(det, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+
+       return TRUE;
+}
+
+static Evas_Object* _create_list(Evas_Object* parent)
+{
+       assertm_if(NULL == parent, "NULL!!");
+
+       _list = elm_genlist_add(parent);
+       assertm_if(NULL == _list, "NULL!!");
+
+       grouptitle_itc.item_style = "grouptitle.dialogue";
+       grouptitle_itc.func.text_get = _view_detail_grouptitle_text_get;
+       grouptitle_itc.func.content_get = NULL;
+       grouptitle_itc.func.state_get = NULL;
+       grouptitle_itc.func.del = NULL;//_view_detail_grouptitle_del;
+
+       staticip_itc.item_style = "dialogue/1text.2icon.2";
+       staticip_itc.func.text_get = _view_detail_staticip_text_get;
+       staticip_itc.func.content_get = _view_detail_staticip_content_get;
+       staticip_itc.func.state_get = NULL;
+       staticip_itc.func.del = NULL;
+
+       dhcpip_itc.item_style = "dialogue/1text.2icon.2";
+       dhcpip_itc.func.text_get = _view_detail_dhcpip_text_get;
+       dhcpip_itc.func.content_get = _view_detail_dhcpip_content_get;
+       dhcpip_itc.func.state_get = NULL;
+       dhcpip_itc.func.del = NULL;
+
+       seperator_itc.item_style = "dialogue/seperator";
+       seperator_itc.func.text_get = NULL;
+       seperator_itc.func.content_get = NULL;
+       seperator_itc.func.state_get = NULL;
+       seperator_itc.func.del = NULL;
+
+       description_itc.item_style = "dialogue/2text.3";
+       description_itc.func.text_get = _view_detail_description_text_get;
+       description_itc.func.content_get = NULL;
+       description_itc.func.state_get = NULL;
+       description_itc.func.del = NULL;
+
+       proxy_itc.item_style = "dialogue/1icon";
+       proxy_itc.func.text_get = NULL;
+       proxy_itc.func.content_get = _view_detail_proxy_content_get;
+       proxy_itc.func.state_get = NULL;
+       proxy_itc.func.del = NULL;
+
+       Elm_Object_Item* sep = elm_genlist_item_append(_list, &grouptitle_itc, NULL, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL);
+       elm_genlist_item_select_mode_set(sep, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+
+       staticip_item = elm_genlist_item_append(_list, &staticip_itc, NULL, NULL, ELM_GENLIST_ITEM_NONE, _detailview_staticip_item_click_cb, NULL);
+       dhcpip_item = elm_genlist_item_append(_list, &dhcpip_itc, NULL, NULL, ELM_GENLIST_ITEM_NONE, _detailview_dhcpip_item_click_cb, NULL);
+
+       _add_seperator(_list);
+       _add_description(_list, sc(PACKAGE, I18N_TYPE_Name), _detail_data->ssid);
+
+       int signal_strength = wlan_manager_get_signal_strength(_detail_data->rssi);
+       switch (signal_strength) {
+       case SIGNAL_STRENGTH_TYPE_EXCELLENT:
+               _add_description(_list, sc(PACKAGE, I18N_TYPE_Signal_strength), sc(PACKAGE, I18N_TYPE_Excellent));
+               break;
+       case SIGNAL_STRENGTH_TYPE_GOOD:
+               _add_description(_list, sc(PACKAGE, I18N_TYPE_Signal_strength),  sc(PACKAGE, I18N_TYPE_Good));
+               break;
+       case SIGNAL_STRENGTH_TYPE_WEAK:
+               _add_description(_list, sc(PACKAGE, I18N_TYPE_Signal_strength), sc(PACKAGE, I18N_TYPE_Week));
+               break;
+       default:
+               _add_description(_list, sc(PACKAGE, I18N_TYPE_Signal_strength), "Unknown");
+               break;
+       }
+
+       /* Security type */
+       switch (_detail_data->security_mode) {
+       case WLAN_SEC_MODE_NONE:
+               _add_description(_list, sc(PACKAGE, I18N_TYPE_Security_type), sc(PACKAGE, I18N_TYPE_No_security));
+               break;
+       case WLAN_SEC_MODE_WEP:
+               _add_description(_list, sc(PACKAGE, I18N_TYPE_Security_type), sc(PACKAGE, I18N_TYPE_WEP));
+               break;
+       case WLAN_SEC_MODE_WPA_PSK:
+               _add_description(_list, sc(PACKAGE, I18N_TYPE_Security_type), sc(PACKAGE, I18N_TYPE_WPA_PSK));
+               break;
+       case WLAN_SEC_MODE_WPA2_PSK:
+               _add_description(_list, sc(PACKAGE, I18N_TYPE_Security_type), sc(PACKAGE, I18N_TYPE_WPA2_PSK));
+               break;
+       case WLAN_SEC_MODE_IEEE8021X:
+               _add_description(_list, sc(PACKAGE, I18N_TYPE_Security_type), sc(PACKAGE, I18N_TYPE_WPA_EAP));
+               break;
+       default:
+               _add_description(_list, sc(PACKAGE, I18N_TYPE_Security_type), "Unknown");
+               break;
+       }
+
+       /* Proxy Address */
+       _add_proxy(_list, sc(PACKAGE, I18N_TYPE_Proxy_address));
+
+       return _list;
+}
+
+static Evas_Object* _create_conformant(Evas_Object* parent)
+{
+       assertm_if(NULL == parent, "NULL!!");
+
+       Evas_Object* conform = NULL;
+       elm_win_conformant_set(parent, TRUE);
+       conform = elm_conformant_add(parent);
+       assertm_if(NULL == conform, "NULL!!");
+
+       elm_object_style_set(conform, "internal_layout");
+
+       evas_object_size_hint_weight_set(conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(conform, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+       evas_object_show(conform);
+
+       return conform;
+}
+
+void view_detail(wifi_device_info_t *device_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (device_info == NULL) {
+               ERROR_LOG(UG_NAME_NORMAL, "Failed : device_info is NULL");
+               return;
+       }
+
+       int favourite = 0;
+       int ret = connman_profile_manager_check_favourite(device_info->profile_name, &favourite);
+       if (ret != WLAN_MANAGER_ERR_NONE) {
+               ERROR_LOG(UG_NAME_NORMAL, "Failed : check favourite");
+               return;
+       }
+
+       if (view_detail_datamodel_create(device_info->profile_name) == 0) {
+               ERROR_LOG(UG_NAME_NORMAL, "Failed : data model created");
+               return;
+       }
+
+       Evas_Object* navi_frame = viewer_manager_get_naviframe();
+       if (navi_frame == NULL) {
+               ERROR_LOG(UG_NAME_NORMAL, "Failed : get naviframe");
+               return;
+       }
+
+       view_detail_end = FALSE;
+
+       _detail_data = (view_detail_data *) malloc(sizeof(view_detail_data));
+       if (_detail_data == NULL)
+               return;
+
+       memset(_detail_data, 0, sizeof(view_detail_data));
+       _detail_data->profile_name = strdup(device_info->profile_name);
+       _detail_data->ssid = strdup(device_info->ssid);
+       _detail_data->rssi = device_info->rssi;
+       _detail_data->security_mode = device_info->security_mode;
+
+       Evas_Object* layout = elm_layout_add(navi_frame);
+       elm_layout_theme_set(layout, "layout", "application", "noindicator");
+       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+       Evas_Object* bg = elm_bg_add(layout);
+       evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_object_style_set(bg, "group_list");
+       elm_object_part_content_set(layout, "elm.swallow.bg", bg);
+
+       Evas_Object* conform = _create_conformant(layout);
+       assertm_if(NULL == conform, "NULL!!");
+       elm_object_part_content_set(layout, "elm.swallow.content", conform);
+
+       evas_object_show(layout);
+
+       Evas_Object* detailview_list = _create_list(conform);
+       assertm_if(NULL == detailview_list, "NULL!!");
+
+       elm_object_content_set(conform, detailview_list);
+
+       Elm_Object_Item* navi_it = elm_naviframe_item_push(navi_frame, _detail_data->ssid, NULL, NULL, layout, NULL);
+
+       _button_forget_item = NULL;
+       if (favourite) {
+               Evas_Object* toolbar = elm_toolbar_add(navi_frame);
+               elm_toolbar_shrink_mode_set(toolbar, ELM_TOOLBAR_SHRINK_EXPAND);
+
+               _button_forget_item = elm_toolbar_item_append(toolbar,
+                                                                                                                               NULL,
+                                                                                                                               sc(PACKAGE, I18N_TYPE_Forget),
+                                                                                                                               (Evas_Smart_Cb) forget_sk_cb,
+                                                                                                                               layout);
+               elm_object_item_disabled_set(elm_toolbar_item_append(toolbar, NULL, NULL, NULL, NULL), EINA_TRUE);
+               elm_object_item_part_content_set(navi_it, "controlbar", toolbar);
+       }
+
+       Evas_Object* button_back = elm_object_item_part_content_get(navi_it, "prev_btn");
+       elm_object_focus_allow_set(button_back, EINA_TRUE);
+       evas_object_smart_callback_add(button_back, "clicked", (Evas_Smart_Cb)detailview_sk_cb, NULL);
+
+       __COMMON_FUNC_EXIT__;
+}
diff --git a/sources/ui-gadget/viewers-layout/view_detail_datamodel.c b/sources/ui-gadget/viewers-layout/view_detail_datamodel.c
new file mode 100644 (file)
index 0000000..2337f19
--- /dev/null
@@ -0,0 +1,340 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#include "common.h"
+#include "view_detail_datamodel.h"
+
+
+struct view_detail_datamodel {
+       net_ip_config_type_t ip_and_dns_type_initial;
+       char* proxy_addr_initial;
+       char* ip_initial;
+       char* subnet_initial;
+       char* gateway_initial;
+       char* dns1_initial;
+       char* dns2_initial;
+
+       net_ip_config_type_t ip_and_dns_type_current;
+       char* proxy_addr_current;
+       char* ip_current;
+       char* subnet_current;
+       char* gateway_current;
+       char* dns1_current;
+       char* dns2_current;
+};
+
+static struct view_detail_datamodel *manager_object = NULL;
+
+int view_detail_datamodel_create(const char *profile_name)
+{
+       __COMMON_FUNC_ENTER__;
+
+       manager_object = g_malloc0(sizeof(struct view_detail_datamodel));
+       assertm_if(NULL == manager_object, "NULL!!");
+
+       net_profile_info_t profile_info;
+       int ret = connman_profile_manager_profile_info_get(profile_name, &profile_info);
+       if (ret == 0)
+               return 0;
+
+       manager_object->ip_and_dns_type_initial = profile_info.ProfileInfo.Wlan.net_info.IpConfigType;
+       manager_object->ip_and_dns_type_current = profile_info.ProfileInfo.Wlan.net_info.IpConfigType;
+       if (strlen(profile_info.ProfileInfo.Wlan.net_info.ProxyAddr) < 1) {
+               manager_object->proxy_addr_initial = strdup("0.0.0.0:80");
+               manager_object->proxy_addr_current = strdup("0.0.0.0:80");
+       } else {
+               manager_object->proxy_addr_initial = strdup(profile_info.ProfileInfo.Wlan.net_info.ProxyAddr);
+               manager_object->proxy_addr_current = strdup(profile_info.ProfileInfo.Wlan.net_info.ProxyAddr);
+       }
+
+       manager_object->ip_initial = strdup(inet_ntoa(profile_info.ProfileInfo.Wlan.net_info.IpAddr.Data.Ipv4));
+       manager_object->ip_current = strdup(inet_ntoa(profile_info.ProfileInfo.Wlan.net_info.IpAddr.Data.Ipv4));
+       manager_object->subnet_initial = strdup(inet_ntoa(profile_info.ProfileInfo.Wlan.net_info.SubnetMask.Data.Ipv4));
+       manager_object->subnet_current = strdup(inet_ntoa(profile_info.ProfileInfo.Wlan.net_info.SubnetMask.Data.Ipv4));
+       manager_object->gateway_initial = strdup(inet_ntoa(profile_info.ProfileInfo.Wlan.net_info.GatewayAddr.Data.Ipv4));
+       manager_object->gateway_current = strdup(inet_ntoa(profile_info.ProfileInfo.Wlan.net_info.GatewayAddr.Data.Ipv4));
+       manager_object->dns1_initial = strdup(inet_ntoa(profile_info.ProfileInfo.Wlan.net_info.DnsAddr[0].Data.Ipv4));
+       manager_object->dns1_current = strdup(inet_ntoa(profile_info.ProfileInfo.Wlan.net_info.DnsAddr[0].Data.Ipv4));
+       manager_object->dns2_initial = strdup(inet_ntoa(profile_info.ProfileInfo.Wlan.net_info.DnsAddr[1].Data.Ipv4));
+       manager_object->dns2_current = strdup(inet_ntoa(profile_info.ProfileInfo.Wlan.net_info.DnsAddr[1].Data.Ipv4));
+
+       INFO_LOG(UG_NAME_NORMAL, "ip : %s", manager_object->ip_current);
+       INFO_LOG(UG_NAME_NORMAL, "subnet : %s", manager_object->subnet_current);
+       INFO_LOG(UG_NAME_NORMAL, "gateway : %s", manager_object->gateway_current);
+       INFO_LOG(UG_NAME_NORMAL, "dns1 : %s", manager_object->dns1_current);
+       INFO_LOG(UG_NAME_NORMAL, "dns2 : %s", manager_object->dns2_current);
+
+       __COMMON_FUNC_EXIT__;
+
+       return 1;
+}
+
+int view_detail_datamodel_destroy(void)
+{
+       __COMMON_FUNC_ENTER__;
+
+       assertm_if(NULL == manager_object, "NULL!!");
+
+       g_free(manager_object->proxy_addr_initial);
+       g_free(manager_object->proxy_addr_current);
+       g_free(manager_object->ip_initial);
+       g_free(manager_object->ip_current);
+       g_free(manager_object->subnet_initial);
+       g_free(manager_object->subnet_current);
+       g_free(manager_object->gateway_initial);
+       g_free(manager_object->gateway_current);
+       g_free(manager_object->dns1_initial);
+       g_free(manager_object->dns1_current);
+       g_free(manager_object->dns2_initial);
+       g_free(manager_object->dns2_current);
+       g_free(manager_object);
+
+       manager_object = NULL;
+
+       __COMMON_FUNC_EXIT__;
+
+       return 1;
+}
+
+static int _zstrcmp(char* s, char* t)
+{
+       if(NULL == s && NULL == t){
+               return 0;
+       }
+       if(NULL != s && NULL == t){
+               return -1;
+       }
+       if(NULL == s && NULL != t){
+               return 1;
+       }
+       return strcmp(s, t);
+}
+
+int view_detail_datamodel_determine_staticip_modified(void)
+{
+       if(0 != _zstrcmp(manager_object->ip_initial, 
+                               manager_object->ip_current)){
+               return TRUE;
+       }
+
+       if(0 != _zstrcmp(manager_object->subnet_initial, 
+                               manager_object->subnet_current)){
+               return TRUE;
+       }
+
+       if(0 != _zstrcmp(manager_object->gateway_initial, 
+                               manager_object->gateway_current)){
+               return TRUE;
+       }
+
+       if(0 != _zstrcmp(manager_object->dns1_initial, 
+                               manager_object->dns1_current)){
+               return TRUE;
+       }
+
+       if(0 != _zstrcmp(manager_object->dns2_initial, 
+                               manager_object->dns2_current)){
+               return TRUE;
+       }
+       return FALSE;
+}
+
+void view_detail_datamodel_determine_modified(const char *profile_name)
+{
+       assertm_if(NULL == manager_object, "NULL!!");
+
+       Eina_Bool changed = EINA_FALSE;
+       net_profile_info_t profile;
+       memset(&profile, 0, sizeof(net_profile_info_t));
+
+       if (manager_object->ip_and_dns_type_initial != manager_object->ip_and_dns_type_current) {
+               profile.ProfileInfo.Wlan.net_info.IpConfigType = manager_object->ip_and_dns_type_current;
+               changed = EINA_TRUE;
+       }
+
+       if (_zstrcmp(manager_object->proxy_addr_initial, manager_object->proxy_addr_current) != 0) {
+               strncpy(profile.ProfileInfo.Wlan.net_info.ProxyAddr, manager_object->proxy_addr_current, WLAN_PROXY_LEN_MAX);
+               changed = EINA_TRUE;
+       }
+
+       if (manager_object->ip_and_dns_type_current == NET_IP_CONFIG_TYPE_STATIC) {
+               if (_zstrcmp(manager_object->ip_initial, manager_object->ip_current) != 0) {
+                       inet_aton(manager_object->ip_current, &(profile.ProfileInfo.Wlan.net_info.IpAddr.Data.Ipv4));
+                       changed = EINA_TRUE;
+               }
+
+               if (_zstrcmp(manager_object->subnet_initial, manager_object->subnet_current) != 0) {
+                       inet_aton(manager_object->subnet_current, &(profile.ProfileInfo.Wlan.net_info.SubnetMask.Data.Ipv4));
+                       changed = EINA_TRUE;
+               }
+
+               if (_zstrcmp(manager_object->gateway_initial, manager_object->gateway_current) != 0) {
+                       inet_aton(manager_object->subnet_current, &(profile.ProfileInfo.Wlan.net_info.GatewayAddr.Data.Ipv4));
+                       changed = EINA_TRUE;
+               }
+
+               if (_zstrcmp(manager_object->dns1_initial, manager_object->dns1_current) != 0) {
+                       inet_aton(manager_object->subnet_current, &(profile.ProfileInfo.Wlan.net_info.DnsAddr[0].Data.Ipv4));
+                       changed = EINA_TRUE;
+               }
+
+               if (_zstrcmp(manager_object->dns2_initial, manager_object->dns2_current) != 0) {
+                       inet_aton(manager_object->subnet_current, &(profile.ProfileInfo.Wlan.net_info.DnsAddr[1].Data.Ipv4));
+                       changed = EINA_TRUE;
+               }
+       }
+
+       if (changed) {
+               profile.ProfileInfo.Wlan.net_info.IpConfigType = manager_object->ip_and_dns_type_current;
+               strncpy(profile.ProfileName, profile_name, NET_PROFILE_NAME_LEN_MAX);
+               wlan_manager_profile_modify_by_device_info(profile);
+       }
+}
+
+int view_detail_datamodel_ip_and_dns_type_set(IP_TYPES type)
+{
+       assertm_if(NULL == manager_object, "NULL!!");
+       manager_object->ip_and_dns_type_current = type;
+       return TRUE;
+}
+
+IP_TYPES view_detail_datamodel_ip_and_dns_type_get(void)
+{
+       assertm_if(NULL == manager_object, "NULL!!");
+       return manager_object->ip_and_dns_type_current;
+}
+
+int view_detail_datamodel_proxy_address_set(const char* proxy)
+{
+       assertm_if(NULL == manager_object, "NULL!!");
+       g_free(manager_object->proxy_addr_current);
+       if(NULL != proxy) {
+               manager_object->proxy_addr_current = strdup(proxy);
+       }
+       return TRUE;
+}
+
+const char* view_detail_datamodel_proxy_address_get(void)
+{
+       assertm_if(NULL == manager_object, "NULL!!");
+       const char* ret = strdup(manager_object->proxy_addr_current);
+       return ret;
+}
+
+int view_detail_datamodel_static_ip_address_set(const char* addr)
+{
+       assertm_if(NULL == manager_object, "NULL!!");
+       g_free(manager_object->ip_current);
+       manager_object->ip_current=NULL;
+       if(NULL != addr) {
+               DEBUG_LOG(UG_NAME_NORMAL, "* set as [%s]", addr);
+               manager_object->ip_current = strdup(addr);
+       }
+       return TRUE;
+}
+
+int view_detail_datamodel_static_gateway_address_set(const char* addr)
+{
+       assertm_if(NULL == manager_object, "NULL!!");
+       g_free(manager_object->gateway_current);
+       manager_object->gateway_current = NULL;
+       if(NULL != addr) {
+               manager_object->gateway_current = strdup(addr);
+       }
+       return TRUE;
+}
+
+int view_detail_datamodel_static_subnet_mask_set(const char* addr)
+{
+       assertm_if(NULL == manager_object, "NULL!!");
+       g_free(manager_object->subnet_current);
+       manager_object->subnet_current = NULL;
+       if(NULL != addr) {
+               manager_object->subnet_current = strdup(addr);
+       }
+       return TRUE;
+}
+
+int view_detail_datamodel_static_dns1_address_set(const char* addr)
+{
+       assertm_if(NULL == manager_object, "NULL!!");
+       g_free(manager_object->dns1_current);
+       manager_object->dns1_current = NULL;
+       if(NULL != addr) {
+               manager_object->dns1_current = strdup(addr);
+       }
+       return TRUE;
+}
+
+int view_detail_datamodel_static_dns2_address_set(const char* addr)
+{
+       assertm_if(NULL == manager_object, "NULL!!");
+       g_free(manager_object->dns2_current);
+       manager_object->dns2_current = NULL;
+       if (NULL != addr) {
+               manager_object->dns2_current = strdup(addr);
+       }
+       return TRUE;
+}
+
+char *view_detail_datamodel_static_ip_address_get(void)
+{
+       assertm_if(NULL == manager_object, "NULL!!");
+
+       return strdup(manager_object->ip_current);
+}
+
+char *view_detail_datamodel_static_gateway_address_get(void)
+{
+       assertm_if(NULL == manager_object, "NULL!!");
+       if (NULL == manager_object->gateway_current) {
+               return NULL;
+       } else {
+               return strdup(manager_object->gateway_current);
+       }
+}
+
+char *view_detail_datamodel_static_subnet_mask_get(void)
+{
+       assertm_if(NULL == manager_object, "NULL!!");
+       if (NULL == manager_object->subnet_current) {
+               return NULL;
+       } else {
+               return strdup(manager_object->subnet_current);
+       }
+}
+
+char *view_detail_datamodel_static_dns1_address_get(void)
+{
+       assertm_if(NULL == manager_object, "NULL!!");
+       if (NULL == manager_object->dns1_current) {
+               return NULL;
+       } else {
+               return strdup(manager_object->dns1_current);
+       }
+}
+
+char *view_detail_datamodel_static_dns2_address_get(void)
+{
+       assertm_if(NULL == manager_object, "NULL!!");
+       if (NULL == manager_object->dns2_current) {
+               return NULL;
+       } else {
+               return strdup(manager_object->dns2_current);
+       }
+}
diff --git a/sources/ui-gadget/viewers-layout/view_dhcpip.c b/sources/ui-gadget/viewers-layout/view_dhcpip.c
new file mode 100644 (file)
index 0000000..bc051c1
--- /dev/null
@@ -0,0 +1,184 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#include "wifi.h"
+#include "view_dhcpip.h"
+#include "i18nmanager.h"
+#include "view_detail_datamodel.h"
+#include "viewer_manager.h"
+
+
+typedef struct _view_dhcpip_data{
+       char* title;
+       char* description;
+} _view_dhcpip_data;
+
+static Elm_Genlist_Item_Class sep_itc;
+static Elm_Genlist_Item_Class itc;
+
+static char* _gl_listview_text_get(void *data, Evas_Object *obj, const char *part)
+{
+       assertm_if(NULL == data, "NULL!!");
+       assertm_if(NULL == obj, "NULL!!");
+       assertm_if(NULL == part, "NULL!!");
+       
+       _view_dhcpip_data* det = (_view_dhcpip_data*) data;
+
+       DEBUG_LOG(UG_NAME_NORMAL, "part: %s", part);
+
+       if (0 == strncmp("elm.text.1", part, strlen(part))) {
+               DEBUG_LOG(UG_NAME_NORMAL, "%s", det->description);
+               return strdup(det->description);
+       } else if(0 == strncmp("elm.text.2", part, strlen(part))) {
+               DEBUG_LOG(UG_NAME_NORMAL, "%s", det->title);
+               return strdup(det->title);
+       } else {
+               return NULL;
+       }
+}
+
+static void _gl_listview_del(void *data, Evas_Object *obj)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (data == NULL)
+               return;
+
+       _view_dhcpip_data* det = (_view_dhcpip_data*) data;
+
+       if (det->description)
+               g_free(det->description);
+
+       g_free(data);
+
+       __COMMON_FUNC_EXIT__;
+}
+
+static int _add_list_item(Evas_Object* view_list, char* title, char* description)
+{
+       assertm_if(NULL == view_list, "NULL!!");
+
+       _view_dhcpip_data* target = NULL;
+       target = (_view_dhcpip_data*) malloc(sizeof(_view_dhcpip_data));
+       assertm_if(NULL == target, "NULL!!");
+       memset(target, 0, sizeof(_view_dhcpip_data));
+
+       target->title = title;
+       target->description = description;
+
+       Elm_Object_Item *it = elm_genlist_item_append(
+                       view_list,
+                       &itc,
+                       target,
+                       NULL,
+                       ELM_GENLIST_ITEM_NONE,
+                       NULL,
+                       NULL);
+       elm_genlist_item_select_mode_set(it, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+
+       return TRUE;
+}
+
+static Evas_Object* _create_list(Evas_Object* parent)
+{
+       __COMMON_FUNC_ENTER__;
+
+       assertm_if(NULL == parent, "NULL!!");
+
+       Evas_Object* view_list = NULL;
+       view_list = elm_genlist_add(parent);
+       assertm_if(NULL == view_list, "NULL!!");
+
+       elm_genlist_mode_set(view_list,
+                       ELM_LIST_LIMIT);
+       evas_object_size_hint_weight_set(view_list, 
+                       EVAS_HINT_EXPAND,
+                       EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(view_list, 
+                       EVAS_HINT_FILL, 
+                       EVAS_HINT_FILL);
+
+       sep_itc.item_style = "dialogue/seperator";
+       sep_itc.func.text_get = NULL;
+       sep_itc.func.content_get = NULL;
+       sep_itc.func.state_get = NULL;
+       sep_itc.func.del = NULL;
+
+       Elm_Object_Item* sep = NULL;
+       sep = elm_genlist_item_append(
+                       view_list, 
+                       &sep_itc, 
+                       NULL, 
+                       NULL, 
+                       ELM_GENLIST_ITEM_GROUP, 
+                       NULL, 
+                       NULL);
+       assertm_if(NULL == sep, "NULL!!");
+
+       elm_genlist_item_select_mode_set(sep, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+
+       itc.item_style = "2text.3";
+       itc.func.text_get = _gl_listview_text_get;
+       itc.func.content_get = NULL;
+       itc.func.state_get = NULL;
+       itc.func.del = _gl_listview_del;
+
+       char *ip_addr = view_detail_datamodel_static_ip_address_get();
+       char *subnet_addr = view_detail_datamodel_static_subnet_mask_get();
+       char *gw_addr = view_detail_datamodel_static_gateway_address_get();
+       char *dns1_addr = view_detail_datamodel_static_dns1_address_get();
+       char *dns2_addr = view_detail_datamodel_static_dns2_address_get();
+
+       _add_list_item(view_list, sc(PACKAGE, I18N_TYPE_IP_address), ip_addr);
+       _add_list_item(view_list, sc(PACKAGE, I18N_TYPE_Subnet_mask), subnet_addr);
+       _add_list_item(view_list, sc(PACKAGE, I18N_TYPE_Gateway), gw_addr);
+       _add_list_item(view_list, sc(PACKAGE, I18N_TYPE_DNS_1), dns1_addr);
+       _add_list_item(view_list, sc(PACKAGE, I18N_TYPE_DNS_2), dns2_addr);
+
+       __COMMON_FUNC_EXIT__;
+
+       return view_list;
+}
+
+void view_dhcpip()
+{
+       __COMMON_FUNC_ENTER__;
+
+       Evas_Object* navi_frame = viewer_manager_get_naviframe();
+       assertm_if(NULL == navi_frame, "NULL!!");
+
+       Evas_Object *layout = elm_layout_add(navi_frame);
+       elm_layout_theme_set(layout, "layout", "application", "noindicator");
+       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+       Evas_Object *bg = elm_bg_add(layout);
+       evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_object_style_set(bg, "group_list");
+       elm_object_part_content_set(layout, "elm.swallow.bg", bg);
+
+       Evas_Object* list = _create_list(layout);
+       elm_object_part_content_set(layout, "elm.swallow.content", list);
+       evas_object_show(layout);
+
+       Elm_Object_Item *navi_it = elm_naviframe_item_push(navi_frame, sc(PACKAGE, I18N_TYPE_Dynamic_IP), NULL, NULL, layout, NULL);
+
+       Evas_Object* back_btn = elm_object_item_part_content_get(navi_it, "prev_btn");
+       elm_object_focus_allow_set(back_btn, EINA_TRUE);
+
+       __COMMON_FUNC_EXIT__;
+}
diff --git a/sources/ui-gadget/viewers-layout/view_eap.c b/sources/ui-gadget/viewers-layout/view_eap.c
new file mode 100644 (file)
index 0000000..44d8095
--- /dev/null
@@ -0,0 +1,614 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#include "wifi.h"
+#include "view_eap.h"
+#include "i18nmanager.h"
+#include "wlan_manager.h"
+#include "viewer_manager.h"
+#include "popup.h"
+
+
+static Elm_Genlist_Item_Class seperator_itc;
+static Elm_Genlist_Item_Class eap_type_itc;
+static Elm_Genlist_Item_Class eap_type_sub_itc;
+static Elm_Genlist_Item_Class eap_auth_itc;
+static Elm_Genlist_Item_Class eap_auth_sub_itc;
+static Elm_Genlist_Item_Class eap_id_itc;
+static Elm_Genlist_Item_Class eap_anonyid_itc;
+static Elm_Genlist_Item_Class eap_pw_itc;
+
+
+static int view_eap_end = TRUE;
+static Elm_Object_Item *_button_done_item = NULL;
+static Evas_Object *_entry[3];
+struct _Expand_List {
+       char depth;
+       char *name;
+       Elm_Genlist_Item_Type flags;
+};
+
+static struct _Expand_List list_eap_type[] = {
+       {1, "PEAP", ELM_GENLIST_ITEM_NONE},
+       {1, "TLS", ELM_GENLIST_ITEM_NONE},
+       {1, "TTLS", ELM_GENLIST_ITEM_NONE},
+       {1, "SIM", ELM_GENLIST_ITEM_NONE},
+       {1, "AKA", ELM_GENLIST_ITEM_NONE},
+       {1, NULL, ELM_GENLIST_ITEM_NONE}
+};
+
+static struct _Expand_List list_eap_auth[] = {
+       {1, "NONE", ELM_GENLIST_ITEM_NONE},
+       {1, "PAP", ELM_GENLIST_ITEM_NONE},
+       {1, "MSCHAP", ELM_GENLIST_ITEM_NONE},
+       {1, "MSCHAPV2", ELM_GENLIST_ITEM_NONE},
+       {1, "GTC", ELM_GENLIST_ITEM_NONE},
+       {1, NULL, ELM_GENLIST_ITEM_NONE}
+};
+
+typedef struct _view_eap_data {
+       char *profile_name;
+       char *ssid;
+       int rssi;
+       int security_mode;
+} view_eap_data;
+
+static int expandable_list_index = 0;
+static Elm_Object_Item *eap_type_item = NULL;
+static Elm_Object_Item *eap_auth_item = NULL;
+static Elm_Object_Item *eap_id_item = NULL;
+static Elm_Object_Item *eap_anonyid_item = NULL;
+static Elm_Object_Item *eap_pw_item = NULL;
+
+static void _gl_eap_auth_sel(void *data, Evas_Object *obj, void *event_info);
+static void view_eap_destroy(void *data);
+
+static Evas_Object* _create_layout(Evas_Object *parent)
+{
+       assertm_if(NULL == parent, "NULL!!");
+
+       Evas_Object *layout=NULL;
+       layout = elm_layout_add(parent);
+       assertm_if(NULL == layout, "NULL!!");
+
+       elm_layout_theme_set(layout, "standard", "window", "integration");
+       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       edje_object_signal_emit(elm_layout_edje_get(layout), "elm,state,show,content", "elm");
+       edje_object_signal_emit(elm_layout_edje_get(layout), "elm,bg,show,group_list", "elm");
+
+       return layout;
+}
+
+static void _set_list(Evas_Object *obj, eap_type_t pre_type, eap_type_t new_type)
+{
+       switch (new_type) {
+       case EAP_SEC_TYPE_PEAP:
+       case EAP_SEC_TYPE_TLS:
+       case EAP_SEC_TYPE_TTLS:
+               if (pre_type > EAP_SEC_TYPE_TTLS) {
+                       eap_auth_item = elm_genlist_item_append(obj, &eap_auth_itc, NULL, NULL, ELM_GENLIST_ITEM_TREE, _gl_eap_auth_sel, NULL);
+                       eap_id_item = elm_genlist_item_append(obj, &eap_id_itc, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+                       eap_anonyid_item = elm_genlist_item_append(obj, &eap_anonyid_itc, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+                       eap_pw_item = elm_genlist_item_append(obj, &eap_pw_itc, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+               }
+               break;
+       case EAP_SEC_TYPE_SIM:
+       case EAP_SEC_TYPE_AKA:
+               if (pre_type < EAP_SEC_TYPE_SIM) {
+                       elm_object_item_del(eap_auth_item);
+                       elm_object_item_del(eap_id_item);
+                       elm_object_item_del(eap_anonyid_item);
+                       elm_object_item_del(eap_pw_item);
+               }
+               break;
+       default:
+               break;
+       }
+}
+
+static void _entry_changed_cb(void* data, Evas_Object* obj, void* event_info)
+{
+       if (obj == NULL)
+               return;
+
+       if (elm_object_focus_get(data)) {
+               if (elm_entry_is_empty(obj))
+                       elm_object_signal_emit(data, "elm,state,eraser,hide", "elm");
+               else
+                       elm_object_signal_emit(data, "elm,state,eraser,show", "elm");
+       }
+}
+
+static void _entry_focused_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       if (!elm_entry_is_empty(obj))
+               elm_object_signal_emit(data, "elm,state,eraser,show", "elm");
+       elm_object_signal_emit(data, "elm,state,guidetext,hide", "elm");
+}
+
+static void _entry_unfocused_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       if (elm_entry_is_empty(obj))
+               elm_object_signal_emit(data, "elm,state,guidetext,show", "elm");
+       elm_object_signal_emit(data, "elm,state,eraser,hide", "elm");
+}
+
+static void _eraser_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
+{
+       elm_entry_entry_set(data, "");
+}
+
+static void _gl_eap_type_sel(void *data, Evas_Object *obj, void *event_info)
+{
+       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+       Eina_Bool expanded = EINA_FALSE;
+       if (item)
+               elm_genlist_item_selected_set(item, EINA_FALSE);
+
+       expandable_list_index = 0;
+
+       expanded = elm_genlist_item_expanded_get(item);
+       elm_genlist_item_expanded_set(item, !expanded);
+}
+
+static void _gl_eap_type_sub_sel(void *data, Evas_Object *obj, void *event_info)
+{
+       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+       Elm_Object_Item *parent_item = elm_genlist_item_parent_get(item);
+
+       int pre_index = (int)elm_object_item_data_get(parent_item);
+       int new_index = (int)data;
+
+       elm_object_item_data_set(parent_item, data);
+
+       Eina_Bool expanded = EINA_FALSE;
+       expanded = elm_genlist_item_expanded_get(parent_item);
+       elm_genlist_item_expanded_set(parent_item, !expanded);
+
+       if (pre_index != new_index) {
+               _set_list(obj, pre_index, new_index);
+               elm_genlist_item_update(parent_item);
+       }
+}
+
+static void _gl_eap_auth_sel(void *data, Evas_Object *obj, void *event_info)
+{
+       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+       Eina_Bool expanded = EINA_FALSE;
+       if (item)
+               elm_genlist_item_selected_set(item, EINA_FALSE);
+
+       expandable_list_index = 1;
+
+       expanded = elm_genlist_item_expanded_get(item);
+       elm_genlist_item_expanded_set(item, !expanded);
+}
+
+static void _gl_eap_auth_sub_sel(void *data, Evas_Object *obj, void *event_info)
+{
+       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+       Elm_Object_Item *parent_item = elm_genlist_item_parent_get(item);
+
+       elm_object_item_data_set(parent_item, data);
+
+       Eina_Bool expanded = EINA_FALSE;
+       expanded = elm_genlist_item_expanded_get(parent_item);
+       elm_genlist_item_expanded_set(parent_item, !expanded);
+}
+
+static Evas_Object *_gl_eap_id_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       Evas_Object* layout = NULL;
+       if (!strncmp(part, "elm.icon", strlen(part))) {
+               layout = elm_layout_add(obj);
+               if (layout) {
+                       elm_layout_theme_set(layout, "layout", "editfield", "title");
+                       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+                       evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+                       elm_object_part_text_set(layout, "elm.text", _("ID"));
+
+                       _entry[0] = elm_entry_add(obj);
+                       elm_object_part_content_set(layout, "elm.swallow.content", _entry[0]);
+                       elm_entry_single_line_set(_entry[0], EINA_TRUE);
+                       elm_entry_scrollable_set(_entry[0], EINA_TRUE);
+                       elm_entry_entry_set(_entry[0], "");
+
+                       evas_object_smart_callback_add(_entry[0], "changed", _entry_changed_cb, layout);
+                       evas_object_smart_callback_add(_entry[0], "focused", _entry_focused_cb, layout);
+                       evas_object_smart_callback_add(_entry[0], "unfocused", _entry_unfocused_cb, layout);
+                       elm_object_signal_callback_add(layout, "elm,eraser,clicked", "elm", _eraser_clicked_cb, _entry[0]);
+               }
+       }
+
+       return layout;
+}
+
+static Evas_Object *_gl_eap_anonyid_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       Evas_Object* layout = NULL;
+       if (!strncmp(part, "elm.icon", strlen(part))) {
+               layout = elm_layout_add(obj);
+               if (layout) {
+                       elm_layout_theme_set(layout, "layout", "editfield", "title");
+                       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+                       evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+                       elm_object_part_text_set(layout, "elm.text", _("Anonymous ID"));
+
+                       _entry[1] = elm_entry_add(obj);
+                       elm_object_part_content_set(layout, "elm.swallow.content", _entry[1]);
+                       elm_entry_single_line_set(_entry[1], EINA_TRUE);
+                       elm_entry_scrollable_set(_entry[1], EINA_TRUE);
+                       elm_entry_entry_set(_entry[1], "");
+
+                       evas_object_smart_callback_add(_entry[1], "changed", _entry_changed_cb, layout);
+                       evas_object_smart_callback_add(_entry[1], "focused", _entry_focused_cb, layout);
+                       evas_object_smart_callback_add(_entry[1], "unfocused", _entry_unfocused_cb, layout);
+                       elm_object_signal_callback_add(layout, "elm,eraser,clicked", "elm", _eraser_clicked_cb, _entry[1]);
+               }
+       }
+
+       return layout;
+}
+
+static Evas_Object *_gl_eap_pw_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       Evas_Object* layout = NULL;
+       if (!strncmp(part, "elm.icon", strlen(part))) {
+               layout = elm_layout_add(obj);
+               if (layout) {
+                       elm_layout_theme_set(layout, "layout", "editfield", "title");
+                       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+                       evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+                       elm_object_part_text_set(layout, "elm.text", _("Password"));
+
+                       _entry[2] = elm_entry_add(obj);
+                       elm_object_part_content_set(layout, "elm.swallow.content", _entry[2]);
+                       elm_entry_single_line_set(_entry[2], EINA_TRUE);
+                       elm_entry_scrollable_set(_entry[2], EINA_TRUE);
+                       elm_entry_entry_set(_entry[2], "");
+
+                       evas_object_smart_callback_add(_entry[2], "changed", _entry_changed_cb, layout);
+                       evas_object_smart_callback_add(_entry[2], "focused", _entry_focused_cb, layout);
+                       evas_object_smart_callback_add(_entry[2], "unfocused", _entry_unfocused_cb, layout);
+                       elm_object_signal_callback_add(layout, "elm,eraser,clicked", "elm", _eraser_clicked_cb, _entry[2]);
+               }
+       }
+
+       return layout;
+}
+
+
+static char *_gl_eap_type_text_get(void *data, Evas_Object *obj, const char *part)
+{
+       if (!strcmp(part, "elm.text.1")) {
+               return strdup(list_eap_type[(int)data].name);
+       } else if (!strcmp(part, "elm.text.2")) {
+               return strdup("EAP Type");
+       }
+
+       return NULL;
+}
+
+static char *_gl_eap_subtext_get(void *data, Evas_Object *obj, const char *part)
+{
+       if (!strcmp(part, "elm.text")) {
+               return strdup(list_eap_type[(int)data].name);
+       }
+
+       return NULL;
+}
+
+static char *_gl_eap_auth_text_get(void *data, Evas_Object *obj, const char *part)
+{
+       if (!strcmp(part, "elm.text.1")) {
+               return strdup(list_eap_auth[(int)data].name);
+       } else if (!strcmp(part, "elm.text.2")) {
+               return strdup("Authentication Type");
+       }
+
+       return NULL;
+}
+
+static char *_gl_eap_auth_subtext_get(void *data, Evas_Object *obj, const char *part)
+{
+       if (!strcmp(part, "elm.text")) {
+               return strdup(list_eap_auth[(int)data].name);
+       }
+
+       return NULL;
+}
+
+static void _gl_exp(void *data, Evas_Object *obj, void *event_info)
+{
+       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+       Evas_Object *gl = elm_object_item_widget_get(item);
+       if (gl == NULL) {
+               ERROR_LOG(UG_NAME_NORMAL, "gl is NULL");
+               return;
+       }
+
+       evas_object_focus_set(gl, EINA_TRUE);
+
+       int i = 0;
+       INFO_LOG(UG_NAME_RESP, "depth = %d", expandable_list_index);
+       switch (expandable_list_index) {
+       case 0:
+               while(list_eap_type[i].name != NULL) {
+                       elm_genlist_item_append(gl, &eap_type_sub_itc, (void*)i, item, list_eap_type[i].flags, _gl_eap_type_sub_sel, (void*)i);
+                       i++;
+               }
+               break;
+       case 1:
+               while(list_eap_auth[i].name != NULL) {
+                       elm_genlist_item_append(gl, &eap_auth_sub_itc, (void*)i, item, list_eap_auth[i].flags, _gl_eap_auth_sub_sel, (void*)i);
+                       i++;
+               }
+               break;
+       default:
+               break;
+       }
+}
+
+static void _gl_con(void *data, Evas_Object *obj, void *event_info)
+{
+       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+       
+       elm_genlist_item_subitems_clear(item);
+}
+
+static Evas_Object* _create_list(Evas_Object* parent)
+{
+       assertm_if(NULL == parent, "NULL!!");
+
+       Evas_Object* view_list = elm_genlist_add(parent);
+       assertm_if(NULL == view_list, "NULL!!");
+
+       seperator_itc.item_style = "dialogue/seperator";
+       seperator_itc.func.text_get = NULL;
+       seperator_itc.func.content_get = NULL;
+       seperator_itc.func.state_get = NULL;
+       seperator_itc.func.del = NULL;
+       Elm_Object_Item* sep = elm_genlist_item_append(view_list, &seperator_itc, 
+                                                                       NULL, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL);
+
+       assertm_if(NULL == sep, "NULL!!");
+       elm_genlist_item_select_mode_set(sep, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+
+       eap_type_itc.item_style = "dialogue/2text.2/expandable";
+       eap_type_itc.func.text_get = _gl_eap_type_text_get;
+       eap_type_itc.func.content_get = NULL;
+       eap_type_itc.func.state_get = NULL;
+       eap_type_itc.func.del = NULL;
+       eap_type_item = elm_genlist_item_append(view_list, &eap_type_itc,
+                                                                       NULL, NULL, ELM_GENLIST_ITEM_TREE, _gl_eap_type_sel, NULL);
+
+       elm_object_item_data_set(eap_type_item, (void*)0);
+
+       eap_type_sub_itc.item_style = "dialogue/1text/expandable2";
+       eap_type_sub_itc.func.text_get = _gl_eap_subtext_get;
+       eap_type_sub_itc.func.content_get = NULL;
+       eap_type_sub_itc.func.state_get = NULL;
+       eap_type_sub_itc.func.del = NULL;
+
+       eap_auth_itc.item_style = "dialogue/2text.2/expandable";
+       eap_auth_itc.func.text_get = _gl_eap_auth_text_get;
+       eap_auth_itc.func.content_get = NULL;
+       eap_auth_itc.func.state_get = NULL;
+       eap_auth_itc.func.del = NULL;
+       eap_auth_item = elm_genlist_item_append(view_list, &eap_auth_itc,
+                                                                       NULL, NULL, ELM_GENLIST_ITEM_TREE, _gl_eap_auth_sel, NULL);
+
+       eap_auth_sub_itc.item_style = "dialogue/1text/expandable2";
+       eap_auth_sub_itc.func.text_get = _gl_eap_auth_subtext_get;
+       eap_auth_sub_itc.func.content_get = NULL;
+       eap_auth_sub_itc.func.state_get = NULL;
+       eap_auth_sub_itc.func.del = NULL;
+
+       eap_id_itc.item_style = "dialogue/1icon";
+       eap_id_itc.func.text_get = NULL;
+       eap_id_itc.func.content_get = _gl_eap_id_content_get;
+       eap_id_itc.func.state_get = NULL;
+       eap_id_itc.func.del = NULL;
+       eap_id_item = elm_genlist_item_append(view_list, &eap_id_itc, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+
+       eap_anonyid_itc.item_style = "dialogue/1icon";
+       eap_anonyid_itc.func.text_get = NULL;
+       eap_anonyid_itc.func.content_get = _gl_eap_anonyid_content_get;
+       eap_anonyid_itc.func.state_get = NULL;
+       eap_anonyid_itc.func.del = NULL;
+       eap_anonyid_item = elm_genlist_item_append(view_list, &eap_anonyid_itc, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+
+       eap_pw_itc.item_style = "dialogue/1icon";
+       eap_pw_itc.func.text_get = NULL;
+       eap_pw_itc.func.content_get = _gl_eap_pw_content_get;
+       eap_pw_itc.func.state_get = NULL;
+       eap_pw_itc.func.del = NULL;
+       eap_pw_item = elm_genlist_item_append(view_list, &eap_pw_itc, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+
+       evas_object_smart_callback_add(view_list, "expanded", _gl_exp, view_list);
+       evas_object_smart_callback_add(view_list, "contracted", _gl_con, view_list);
+
+       return view_list;
+}
+
+void view_eap_back(void *data,  Evas_Object *obj, void *event_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if(view_eap_end == TRUE) {
+               return;
+       }
+       view_eap_end = TRUE;
+
+       view_eap_destroy(data);
+
+       viewer_manager_set_enabled_list_click(EINA_TRUE);
+
+       __COMMON_FUNC_EXIT__;
+}
+
+void view_eap_done(void *data,  Evas_Object *obj, void *event_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if(view_eap_end == TRUE) {
+               return;
+       }
+       view_eap_end = TRUE;
+
+       char* str_id = NULL;
+       char* str_anonyid = NULL;
+       char* str_pw = NULL;
+
+       net_wifi_connection_info_t conn_info;
+       int sel_index = (int)elm_object_item_data_get(eap_type_item);
+       switch (sel_index) {
+               case EAP_SEC_TYPE_PEAP:
+                       conn_info.security_info.sec_mode = WLAN_SEC_MODE_IEEE8021X;
+                       //conn_info.security_info.authentication.eap.eap_type = WLAN_SEC_EAP_TYPE_PEAP;
+
+                       connman_request_connection_open_hidden_ap(&conn_info);
+                       break;
+               case EAP_SEC_TYPE_TLS:
+                       conn_info.security_info.sec_mode = WLAN_SEC_MODE_IEEE8021X;
+                       //conn_info.security_info.authentication.eap.eap_type = WLAN_SEC_EAP_TYPE_TLS;
+
+                       str_id = elm_entry_markup_to_utf8(elm_entry_entry_get(_entry[0]));
+                       str_anonyid = elm_entry_markup_to_utf8(elm_entry_entry_get(_entry[1]));
+                       str_pw = elm_entry_markup_to_utf8(elm_entry_entry_get(_entry[2]));
+
+                       connman_request_connection_open_hidden_ap(&conn_info);
+                       break;
+               case EAP_SEC_TYPE_TTLS:
+                       conn_info.security_info.sec_mode = WLAN_SEC_MODE_IEEE8021X;
+                       //conn_info.security_info.authentication.eap.eap_type = WLAN_SEC_EAP_TYPE_TTLS;
+
+                       str_id = elm_entry_markup_to_utf8(elm_entry_entry_get(_entry[0]));
+                       str_anonyid = elm_entry_markup_to_utf8(elm_entry_entry_get(_entry[1]));
+                       str_pw = elm_entry_markup_to_utf8(elm_entry_entry_get(_entry[2]));
+
+                       connman_request_connection_open_hidden_ap(&conn_info);
+                       break;
+               case EAP_SEC_TYPE_SIM:
+                       conn_info.security_info.sec_mode = WLAN_SEC_MODE_IEEE8021X;
+                       //conn_info.security_info.authentication.eap.eap_type = WLAN_SEC_EAP_TYPE_SIM;
+
+                       connman_request_connection_open_hidden_ap(&conn_info);
+                       break;
+               case EAP_SEC_TYPE_AKA:
+                       conn_info.security_info.sec_mode = WLAN_SEC_MODE_IEEE8021X;
+                       //conn_info.security_info.authentication.eap.eap_type = WLAN_SEC_EAP_TYPE_AKA;
+
+                       connman_request_connection_open_hidden_ap(&conn_info);
+                       break;
+
+               default:
+                       break;
+       }
+
+       view_eap_destroy(data);
+
+       elm_naviframe_item_pop(viewer_manager_get_naviframe());
+
+       __COMMON_FUNC_EXIT__;
+}
+
+void view_eap(wifi_device_info_t *device_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (device_info == NULL) {
+               ERROR_LOG(UG_NAME_NORMAL, "Failed : device_info is NULL");
+               return;
+       }
+
+       Evas_Object* navi_frame = viewer_manager_get_naviframe();
+       if (navi_frame == NULL) {
+               ERROR_LOG(UG_NAME_NORMAL, "Failed : get naviframe");
+               return;
+       }
+
+       view_eap_end = FALSE;
+
+       view_eap_data * eap_data = (view_eap_data *) malloc(sizeof(view_eap_data));
+       memset(eap_data, 0, sizeof(view_eap_data));
+       eap_data->profile_name = strdup(device_info->profile_name);
+       eap_data->security_mode = device_info->security_mode;
+
+       Evas_Object *layout =_create_layout(navi_frame);
+       if (layout == NULL)
+               return;
+
+       Evas_Object* conform = elm_conformant_add(navi_frame);
+       elm_object_style_set(conform, "internal_layout");
+       elm_object_part_content_set(layout, "elm.swallow.content", conform);
+       evas_object_show(conform);
+
+       Evas_Object* list = _create_list(navi_frame);
+       assertm_if(NULL == list, "NULL!!");
+
+       elm_object_content_set(conform, list);
+
+       Elm_Object_Item *navi_it = elm_naviframe_item_push(navi_frame, device_info->ssid, NULL, NULL, layout, NULL);
+
+       Evas_Object *toolbar = elm_toolbar_add(navi_frame);
+       elm_toolbar_shrink_mode_set(toolbar, ELM_TOOLBAR_SHRINK_EXPAND);
+
+       _button_done_item = elm_toolbar_item_append(toolbar,
+                                                                                                       NULL,
+                                                                                                       sc(PACKAGE, I18N_TYPE_Done),
+                                                                                                       (Evas_Smart_Cb) view_eap_done,
+                                                                                                       eap_data);
+       elm_object_item_disabled_set(elm_toolbar_item_append(toolbar, NULL, NULL, NULL, NULL), EINA_TRUE);
+       elm_object_item_part_content_set(navi_it, "controlbar", toolbar);
+
+       Evas_Object* button_back = elm_object_item_part_content_get(navi_it, "prev_btn");
+       elm_object_focus_allow_set(button_back, EINA_TRUE);
+       evas_object_smart_callback_add(button_back, "clicked", (Evas_Smart_Cb)view_eap_back, eap_data);
+
+       evas_object_show(layout);
+       __COMMON_FUNC_EXIT__;
+}
+
+static void view_eap_destroy(void *data)
+{
+       if (_entry[0]) {
+               evas_object_smart_callback_del(_entry[0], "changed", _entry_changed_cb);
+               evas_object_smart_callback_del(_entry[0], "focused", _entry_focused_cb);
+               evas_object_smart_callback_del(_entry[0], "unfocused", _entry_unfocused_cb);
+               _entry[0] = NULL;
+       }
+
+       if (_entry[1]) {
+               evas_object_smart_callback_del(_entry[1], "changed", _entry_changed_cb);
+               evas_object_smart_callback_del(_entry[1], "focused", _entry_focused_cb);
+               evas_object_smart_callback_del(_entry[1], "unfocused", _entry_unfocused_cb);
+               _entry[1] = NULL;
+       }
+
+       if (_entry[2]) {
+               evas_object_smart_callback_del(_entry[2], "changed", _entry_changed_cb);
+               evas_object_smart_callback_del(_entry[2], "focused", _entry_focused_cb);
+               evas_object_smart_callback_del(_entry[2], "unfocused", _entry_unfocused_cb);
+               _entry[2] = NULL;
+       }
+
+       if (data  != NULL) {
+               g_free(data);
+       }
+}
diff --git a/sources/ui-gadget/viewers-layout/view_ime_hidden.c b/sources/ui-gadget/viewers-layout/view_ime_hidden.c
new file mode 100644 (file)
index 0000000..8eba0ad
--- /dev/null
@@ -0,0 +1,862 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#include "wifi.h"
+#include "view_ime_hidden.h"
+#include "i18nmanager.h"
+#include "wlan_manager.h"
+#include "viewer_manager.h"
+#include "popup.h"
+
+
+static Elm_Genlist_Item_Class seperator_itc;
+static Elm_Genlist_Item_Class itc;
+static Elm_Genlist_Item_Class type_sel_itc;
+static Elm_Genlist_Item_Class type_itc;
+static Elm_Genlist_Item_Class password_itc;
+static Elm_Genlist_Item_Class eap_itc, eap_auth_itc, eap_id_itc, eap_anonyid_itc, eap_pw_itc;
+static Elm_Genlist_Item_Class eap_sub_itc, eap_auth_sub_itc;
+
+static int view_ime_hidden_end = TRUE;
+static Evas_Object *_button_save = NULL;
+static Evas_Object *_entry[4];
+struct _Expand_List {
+       char depth;
+       char *name;
+       Elm_Genlist_Item_Type flags;
+};
+
+static struct _Expand_List list_sec_type[] = {
+       {1, "Public", ELM_GENLIST_ITEM_NONE},
+       {1, "WEP", ELM_GENLIST_ITEM_NONE},
+       {1, "WPA/WPA2 PSK", ELM_GENLIST_ITEM_NONE},
+       {1, "802.1x Enterprise", ELM_GENLIST_ITEM_NONE},
+       {1, "802.1x Dynamic WEP", ELM_GENLIST_ITEM_NONE},
+       {1, NULL, ELM_GENLIST_ITEM_NONE}
+};
+
+static struct _Expand_List list_eap_type[] = {
+       {1, "PEAP", ELM_GENLIST_ITEM_NONE},
+       {1, "TLS", ELM_GENLIST_ITEM_NONE},
+       {1, "TTLS", ELM_GENLIST_ITEM_NONE},
+       {1, "AKA", ELM_GENLIST_ITEM_NONE},
+       {1, NULL, ELM_GENLIST_ITEM_NONE}
+};
+
+static struct _Expand_List list_eap_auth[] = {
+       {1, "NONE", ELM_GENLIST_ITEM_NONE},
+       {1, "PAP", ELM_GENLIST_ITEM_NONE},
+       {1, "MSCHAP", ELM_GENLIST_ITEM_NONE},
+       {1, "MSCHAPV2", ELM_GENLIST_ITEM_NONE},
+       {1, "GTC", ELM_GENLIST_ITEM_NONE},
+       {1, NULL, ELM_GENLIST_ITEM_NONE}
+};
+
+static int expandable_list_index = 0;
+static Elm_Object_Item* security_type_item = NULL;
+static Elm_Object_Item* eap_items[5+1] = {NULL, };
+
+/* static */
+static void _gl_sel(void *data, Evas_Object *obj, void *event_info);
+static void view_ime_hidden_destroy();
+
+
+
+/* implementation */
+static Evas_Object* _create_layout(Evas_Object *parent)
+{
+       assertm_if(NULL == parent, "NULL!!");
+
+       Evas_Object *layout=NULL;
+       layout = elm_layout_add(parent);
+       assertm_if(NULL == layout, "NULL!!");
+
+       elm_layout_theme_set(layout, "standard", "window", "integration");
+       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       edje_object_signal_emit(elm_layout_edje_get(layout), "elm,state,show,content", "elm");
+       edje_object_signal_emit(elm_layout_edje_get(layout), "elm,bg,show,group_list", "elm");
+
+       return layout;
+}
+
+static void _network_name_entry_changed_cb(void* data, Evas_Object* obj, void* event_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (elm_object_focus_get(data)) {
+               if (elm_entry_is_empty(obj))
+                       elm_object_signal_emit(data, "elm,state,eraser,hide", "elm");
+               else
+                       elm_object_signal_emit(data, "elm,state,eraser,show", "elm");
+       }
+
+       const char* txt = elm_entry_markup_to_utf8(elm_entry_entry_get(_entry[0]));
+       int len = 0;
+
+       if(txt) {
+               len = strlen(txt);
+               if(len > 0) {
+                       elm_object_disabled_set(_button_save, EINA_FALSE);
+               } else {
+                       elm_object_disabled_set(_button_save, EINA_TRUE);
+               }
+       } else {
+               ERROR_LOG(UG_NAME_NORMAL, "Err!");
+       }
+
+       __COMMON_FUNC_EXIT__;
+}
+
+static void _entry_changed_cb(void* data, Evas_Object* obj, void* event_info)
+{
+       if (elm_object_focus_get(data)) {
+               if (elm_entry_is_empty(obj))
+                       elm_object_signal_emit(data, "elm,state,eraser,hide", "elm");
+               else
+                       elm_object_signal_emit(data, "elm,state,eraser,show", "elm");
+       }
+}
+
+static void _entry_focused_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       if (!elm_entry_is_empty(obj))
+               elm_object_signal_emit(data, "elm,state,eraser,show", "elm");
+       elm_object_signal_emit(data, "elm,state,guidetext,hide", "elm");
+}
+
+static void _entry_unfocused_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       if (elm_entry_is_empty(obj))
+               elm_object_signal_emit(data, "elm,state,guidetext,show", "elm");
+       elm_object_signal_emit(data, "elm,state,eraser,hide", "elm");
+}
+
+static void _eraser_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
+{
+       elm_entry_entry_set(data, "");
+}
+
+static void _gl_eap_sel(void *data, Evas_Object *obj, void *event_info)
+{
+       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+       Eina_Bool expanded = EINA_FALSE;
+       if (item)
+               elm_genlist_item_selected_set(item, EINA_FALSE);
+
+       expandable_list_index = 1;
+       
+       expanded = elm_genlist_item_expanded_get(item);
+       elm_genlist_item_expanded_set(item, !expanded);
+}
+
+static void _gl_eap_type_sel(void *data, Evas_Object *obj, void *event_info)
+{
+       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+       Elm_Object_Item *parent_item = elm_genlist_item_parent_get(item);
+
+       elm_object_item_data_set(parent_item, data);
+       
+       Eina_Bool expanded = EINA_FALSE;
+       expanded = elm_genlist_item_expanded_get(parent_item);
+       elm_genlist_item_expanded_set(parent_item, !expanded);
+}
+
+static void _gl_eap_auth_sel(void *data, Evas_Object *obj, void *event_info)
+{
+       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+       Eina_Bool expanded = EINA_FALSE;
+       if (item)
+               elm_genlist_item_selected_set(item, EINA_FALSE);
+
+       expandable_list_index = 2;
+       
+       expanded = elm_genlist_item_expanded_get(item);
+       elm_genlist_item_expanded_set(item, !expanded);
+}
+
+static void _gl_eap_auth_type_sel(void *data, Evas_Object *obj, void *event_info)
+{
+       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+       Elm_Object_Item *parent_item = elm_genlist_item_parent_get(item);
+
+       elm_object_item_data_set(parent_item, data);
+       
+       Eina_Bool expanded = EINA_FALSE;
+       expanded = elm_genlist_item_expanded_get(parent_item);
+       elm_genlist_item_expanded_set(parent_item, !expanded);
+}
+
+static void _set_list(Evas_Object *obj, hidden_ap_security_type_t prev_type, hidden_ap_security_type_t new_type)
+{
+       switch (new_type) {
+               case HIDDEN_AP_SECURITY_PUBLIC:
+                       if (prev_type < HIDDEN_AP_SECURITY_ENTERPRISE) {
+                               elm_object_item_del(elm_genlist_last_item_get(obj));
+                       } else {
+                               int i = 0;
+                               while (eap_items[i]) {
+                                       elm_object_item_del(eap_items[i]);
+                                       i++;
+                               }
+                       }
+                       break;
+               case HIDDEN_AP_SECURITY_WEP:
+                       if (prev_type == HIDDEN_AP_SECURITY_PUBLIC) {
+                               elm_genlist_item_append(obj, &password_itc,
+                                               NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+                       } else if (prev_type == HIDDEN_AP_SECURITY_WPAPSK) {
+                       } else {
+                               int i = 0;
+                               while (eap_items[i]) {
+                                       elm_object_item_del(eap_items[i]);
+                                       i++;
+                               }
+
+                               elm_genlist_item_append(obj, &password_itc,
+                                               NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+                       }
+                       break;
+               case HIDDEN_AP_SECURITY_WPAPSK:
+                       if (prev_type == HIDDEN_AP_SECURITY_PUBLIC) {
+                               elm_genlist_item_append(obj, &password_itc,
+                                               NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+                       } else if (prev_type == HIDDEN_AP_SECURITY_WEP) {
+                       } else {
+                               int i = 0;
+                               while (eap_items[i]) {
+                                       elm_object_item_del(eap_items[i]);
+                                       i++;
+                               }
+
+                               elm_genlist_item_append(obj, &password_itc,
+                                               NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+                       }
+                       break;
+               case HIDDEN_AP_SECURITY_ENTERPRISE:
+                       if (prev_type == HIDDEN_AP_SECURITY_PUBLIC) {   
+                               eap_items[0] = elm_genlist_item_append(obj, &eap_itc,
+                                                                       NULL, NULL, ELM_GENLIST_ITEM_TREE, _gl_eap_sel, NULL);
+                               eap_items[1] = elm_genlist_item_append(obj, &eap_auth_itc,
+                                                                       NULL, NULL, ELM_GENLIST_ITEM_TREE, _gl_eap_auth_sel, NULL);
+                               eap_items[2] = elm_genlist_item_append(obj, &eap_id_itc,
+                                                                       NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+                               eap_items[3] = elm_genlist_item_append(obj, &eap_anonyid_itc,
+                                                                       NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+                               eap_items[4] = elm_genlist_item_append(obj, &eap_pw_itc,
+                                                                       NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+                       } else if (prev_type == HIDDEN_AP_SECURITY_DYNAMICWEP) {
+                       } else {
+                               elm_object_item_del(elm_genlist_last_item_get(obj));
+
+                               eap_items[0] = elm_genlist_item_append(obj, &eap_itc,
+                                                                       NULL, NULL, ELM_GENLIST_ITEM_TREE, _gl_eap_sel, NULL);
+                               eap_items[1] = elm_genlist_item_append(obj, &eap_auth_itc,
+                                                                       NULL, NULL, ELM_GENLIST_ITEM_TREE, _gl_eap_auth_sel, NULL);
+                               eap_items[2] = elm_genlist_item_append(obj, &eap_id_itc,
+                                                                       NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+                               eap_items[3] = elm_genlist_item_append(obj, &eap_anonyid_itc,
+                                                                       NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+                               eap_items[4] = elm_genlist_item_append(obj, &eap_pw_itc,
+                                                                       NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+                       }
+                       break;
+               case HIDDEN_AP_SECURITY_DYNAMICWEP:
+                       if (prev_type == HIDDEN_AP_SECURITY_PUBLIC) {   
+                               eap_items[0] = elm_genlist_item_append(obj, &eap_itc,
+                                                                       NULL, NULL, ELM_GENLIST_ITEM_TREE, _gl_eap_sel, NULL);
+                               eap_items[1] = elm_genlist_item_append(obj, &eap_auth_itc,
+                                                                       NULL, NULL, ELM_GENLIST_ITEM_TREE, _gl_eap_auth_sel, NULL);
+                               eap_items[2] = elm_genlist_item_append(obj, &eap_id_itc,
+                                                                       NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+                               eap_items[3] = elm_genlist_item_append(obj, &eap_anonyid_itc,
+                                                                       NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+                               eap_items[4] = elm_genlist_item_append(obj, &eap_pw_itc,
+                                                                       NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+                       } else if (prev_type == HIDDEN_AP_SECURITY_ENTERPRISE) {
+                       } else {
+                               elm_object_item_del(elm_genlist_last_item_get(obj));
+
+                               eap_items[0] = elm_genlist_item_append(obj, &eap_itc,
+                                                                       NULL, NULL, ELM_GENLIST_ITEM_TREE, _gl_eap_sel, NULL);
+                               eap_items[1] = elm_genlist_item_append(obj, &eap_auth_itc,
+                                                                       NULL, NULL, ELM_GENLIST_ITEM_TREE, _gl_eap_auth_sel, NULL);
+                               eap_items[2] = elm_genlist_item_append(obj, &eap_id_itc,
+                                                                       NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+                               eap_items[3] = elm_genlist_item_append(obj, &eap_anonyid_itc,
+                                                                       NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+                               eap_items[4] = elm_genlist_item_append(obj, &eap_pw_itc,
+                                                                       NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+                       }
+                       break;
+               default:
+                       break;
+       }
+}
+
+static Evas_Object *_gl_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       assertm_if(NULL == data, "NULL!!");
+       assertm_if(NULL == obj, "NULL!!");
+       assertm_if(NULL == part, "NULL!!");
+
+       Evas_Object* layout = NULL;
+       
+       DEBUG_LOG(UG_NAME_NORMAL, "part [%s]", part);
+
+       if (!strncmp(part, "elm.icon", strlen(part))) {
+               layout = elm_layout_add(obj);
+               if (layout) {
+                       elm_layout_theme_set(layout, "layout", "editfield", "title");
+                       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+                       evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+                       elm_object_part_text_set(layout, "elm.text", _("Network name"));
+
+                       _entry[0] = elm_entry_add(obj);
+                       elm_object_part_content_set(layout, "elm.swallow.content", _entry[0]);
+                       elm_entry_single_line_set(_entry[0], EINA_TRUE);
+                       elm_entry_scrollable_set(_entry[0], EINA_TRUE);
+
+                       evas_object_smart_callback_add(_entry[0], "changed", _network_name_entry_changed_cb, layout);
+                       evas_object_smart_callback_add(_entry[0], "focused", _entry_focused_cb, layout);
+                       evas_object_smart_callback_add(_entry[0], "unfocused", _entry_unfocused_cb, layout);
+                       elm_object_signal_callback_add(layout, "elm,eraser,clicked", "elm", _eraser_clicked_cb, _entry[0]);
+               }
+       }
+
+       return layout;
+}
+
+static Evas_Object *_gl_pw_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       Evas_Object* layout = NULL;
+       if (!strncmp(part, "elm.icon", strlen(part))) {
+               layout = elm_layout_add(obj);
+               if (layout) {
+                       elm_layout_theme_set(layout, "layout", "editfield", "title");
+                       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+                       evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+                       elm_object_part_text_set(layout, "elm.text", _("Password"));
+
+                       _entry[1] = elm_entry_add(obj);
+                       elm_object_part_content_set(layout, "elm.swallow.content", _entry[1]);
+                       elm_entry_single_line_set(_entry[1], EINA_TRUE);
+                       elm_entry_scrollable_set(_entry[1], EINA_TRUE);
+                       elm_entry_entry_set(_entry[1], "");
+
+                       evas_object_smart_callback_add(_entry[1], "changed", _entry_changed_cb, layout);
+                       evas_object_smart_callback_add(_entry[1], "focused", _entry_focused_cb, layout);
+                       evas_object_smart_callback_add(_entry[1], "unfocused", _entry_unfocused_cb, layout);
+                       elm_object_signal_callback_add(layout, "elm,eraser,clicked", "elm", _eraser_clicked_cb, _entry[1]);
+               }
+       }
+
+       return layout;
+}
+
+static Evas_Object *_gl_eap_id_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       Evas_Object* layout = NULL;
+       if (!strncmp(part, "elm.icon", strlen(part))) {
+               layout = elm_layout_add(obj);
+               if (layout) {
+                       elm_layout_theme_set(layout, "layout", "editfield", "title");
+                       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+                       evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+                       elm_object_part_text_set(layout, "elm.text", _("ID"));
+
+                       _entry[1] = elm_entry_add(obj);
+                       elm_object_part_content_set(layout, "elm.swallow.content", _entry[1]);
+                       elm_entry_single_line_set(_entry[1], EINA_TRUE);
+                       elm_entry_scrollable_set(_entry[1], EINA_TRUE);
+                       elm_entry_entry_set(_entry[1], "");
+
+                       evas_object_smart_callback_add(_entry[1], "changed", _entry_changed_cb, layout);
+                       evas_object_smart_callback_add(_entry[1], "focused", _entry_focused_cb, layout);
+                       evas_object_smart_callback_add(_entry[1], "unfocused", _entry_unfocused_cb, layout);
+                       elm_object_signal_callback_add(layout, "elm,eraser,clicked", "elm", _eraser_clicked_cb, _entry[1]);
+               }
+       }
+
+       return layout;
+}
+
+static Evas_Object *_gl_eap_anonyid_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       Evas_Object* layout = NULL;
+       if (!strncmp(part, "elm.icon", strlen(part))) {
+               layout = elm_layout_add(obj);
+               if (layout) {
+                       elm_layout_theme_set(layout, "layout", "editfield", "title");
+                       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+                       evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+                       elm_object_part_text_set(layout, "elm.text", _("Anonymous ID"));
+
+                       _entry[2] = elm_entry_add(obj);
+                       elm_object_part_content_set(layout, "elm.swallow.content", _entry[2]);
+                       elm_entry_single_line_set(_entry[2], EINA_TRUE);
+                       elm_entry_scrollable_set(_entry[2], EINA_TRUE);
+                       elm_entry_entry_set(_entry[2], "");
+
+                       evas_object_smart_callback_add(_entry[2], "changed", _entry_changed_cb, layout);
+                       evas_object_smart_callback_add(_entry[2], "focused", _entry_focused_cb, layout);
+                       evas_object_smart_callback_add(_entry[2], "unfocused", _entry_unfocused_cb, layout);
+                       elm_object_signal_callback_add(layout, "elm,eraser,clicked", "elm", _eraser_clicked_cb, _entry[2]);
+               }
+       }
+
+       return layout;
+}
+
+static Evas_Object *_gl_eap_pw_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       Evas_Object* layout = NULL;
+       if (!strncmp(part, "elm.icon", strlen(part))) {
+               layout = elm_layout_add(obj);
+               if (layout) {
+                       elm_layout_theme_set(layout, "layout", "editfield", "title");
+                       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+                       evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+                       elm_object_part_text_set(layout, "elm.text", _("Password"));
+
+                       _entry[3] = elm_entry_add(obj);
+                       elm_object_part_content_set(layout, "elm.swallow.content", _entry[3]);
+                       elm_entry_single_line_set(_entry[3], EINA_TRUE);
+                       elm_entry_scrollable_set(_entry[3], EINA_TRUE);
+                       elm_entry_entry_set(_entry[3], "");
+
+                       evas_object_smart_callback_add(_entry[3], "changed", _entry_changed_cb, layout);
+                       evas_object_smart_callback_add(_entry[3], "focused", _entry_focused_cb, layout);
+                       evas_object_smart_callback_add(_entry[3], "unfocused", _entry_unfocused_cb, layout);
+                       elm_object_signal_callback_add(layout, "elm,eraser,clicked", "elm", _eraser_clicked_cb, _entry[3]);
+               }
+       }
+
+       return layout;
+}
+
+static char *_gl_text_get(void *data, Evas_Object *obj, const char *part)
+{
+       if (!strcmp(part, "elm.text.1")) {
+               return strdup(list_sec_type[(int)data].name);
+       } else if (!strcmp(part, "elm.text.2")) {
+               return strdup("Security");
+       }
+
+       return NULL;
+}
+
+static char *_gl_subtext_get(void *data, Evas_Object *obj, const char *part)
+{
+       if (!strcmp(part, "elm.text")) {
+               return strdup(list_sec_type[(int)data].name);
+       }
+
+       return NULL;
+}
+
+static char *_gl_eap_text_get(void *data, Evas_Object *obj, const char *part)
+{
+       if (!strcmp(part, "elm.text.1")) {
+               return strdup(list_eap_type[(int)data].name);
+       } else if (!strcmp(part, "elm.text.2")) {
+               return strdup("EAP Type");
+       }
+
+       return NULL;
+}
+
+static char *_gl_eap_subtext_get(void *data, Evas_Object *obj, const char *part)
+{
+       if (!strcmp(part, "elm.text")) {
+               return strdup(list_eap_type[(int)data].name);
+       }
+
+       return NULL;
+}
+
+static char *_gl_eap_auth_text_get(void *data, Evas_Object *obj, const char *part)
+{
+       if (!strcmp(part, "elm.text.1")) {
+               return strdup(list_eap_auth[(int)data].name);
+       } else if (!strcmp(part, "elm.text.2")) {
+               return strdup("Authentication Type");
+       }
+
+       return NULL;
+}
+
+static char *_gl_eap_auth_subtext_get(void *data, Evas_Object *obj, const char *part)
+{
+       if (!strcmp(part, "elm.text")) {
+               return strdup(list_eap_auth[(int)data].name);
+       }
+
+       return NULL;
+}
+
+static void _gl_type_sel(void *data, Evas_Object *obj, void *event_info)
+{
+       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+       Elm_Object_Item *parent_item = elm_genlist_item_parent_get(item);
+
+       int prev_index = (int)elm_object_item_data_get(parent_item);
+       int new_index = (int)data;
+
+       INFO_LOG(UG_NAME_RESP, "prev index[%d],  new index[%d]", prev_index, new_index);
+
+       elm_object_item_data_set(parent_item, data);
+       
+       Eina_Bool expanded = EINA_FALSE;
+       expanded = elm_genlist_item_expanded_get(parent_item);
+       elm_genlist_item_expanded_set(parent_item, !expanded);
+
+       if (prev_index != new_index) {
+               _set_list(obj, prev_index, new_index);
+               elm_genlist_item_update(parent_item);
+       }
+}
+
+static void _gl_sel(void *data, Evas_Object *obj, void *event_info)
+{
+       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+       Eina_Bool expanded = EINA_FALSE;
+       if (item)
+               elm_genlist_item_selected_set(item, EINA_FALSE);
+
+       expandable_list_index = 0;
+       
+       expanded = elm_genlist_item_expanded_get(item);
+       elm_genlist_item_expanded_set(item, !expanded);
+}
+
+static void _gl_exp(void *data, Evas_Object *obj, void *event_info)
+{
+       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+       Evas_Object *gl = elm_object_item_widget_get(item);
+       if (gl == NULL) {
+               ERROR_LOG(UG_NAME_NORMAL, "gl is NULL");
+               return;
+       }
+
+       evas_object_focus_set(gl, EINA_TRUE);
+       
+       int i = 0;
+       INFO_LOG(UG_NAME_RESP, "depth = %d", expandable_list_index);
+       switch (expandable_list_index) {
+       case 0:
+               while(list_sec_type[i].name != NULL) {
+                       elm_genlist_item_append(gl, &type_itc, (void*)i, item, list_sec_type[i].flags, _gl_type_sel, (void*)i);
+                       i++;
+               }
+               break;
+       case 1:
+               while(list_eap_type[i].name != NULL) {
+                       elm_genlist_item_append(gl, &eap_sub_itc, (void*)i, item, list_eap_type[i].flags, _gl_eap_type_sel, (void*)i);
+                       i++;
+               }
+               break;
+       case 2:
+               while(list_eap_auth[i].name != NULL) {
+                       elm_genlist_item_append(gl, &eap_auth_sub_itc, (void*)i, item, list_eap_auth[i].flags, _gl_eap_auth_type_sel, (void*)i);
+                       i++;
+               }
+               break;
+       }
+}
+
+static void _gl_con(void *data, Evas_Object *obj, void *event_info)
+{
+       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+       
+       elm_genlist_item_subitems_clear(item);
+}
+
+static Evas_Object* _create_list(Evas_Object* parent)
+{
+       assertm_if(NULL == parent, "NULL!!");
+
+       Evas_Object* view_list = elm_genlist_add(parent);
+       assertm_if(NULL == view_list, "NULL!!");
+
+       //evas_object_size_hint_weight_set(view_list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       //evas_object_size_hint_align_set(view_list, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+       seperator_itc.item_style = "dialogue/seperator";
+       seperator_itc.func.text_get = NULL;
+       seperator_itc.func.content_get = NULL;
+       seperator_itc.func.state_get = NULL;
+       seperator_itc.func.del = NULL;
+       Elm_Object_Item* sep = elm_genlist_item_append(view_list, &seperator_itc, 
+                                                                       NULL, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL);
+
+       assertm_if(NULL == sep, "NULL!!");
+       elm_genlist_item_select_mode_set(sep, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+
+       itc.item_style = "1icon";
+       itc.func.text_get = NULL;
+       itc.func.content_get = _gl_content_get;
+       itc.func.state_get = NULL;
+       itc.func.del = NULL;
+       elm_genlist_item_append(view_list, &itc, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+       
+       type_sel_itc.item_style = "dialogue/2text.2/expandable";
+       type_sel_itc.func.text_get = _gl_text_get;
+       type_sel_itc.func.content_get = NULL;
+       type_sel_itc.func.state_get = NULL;
+       type_sel_itc.func.del = NULL;
+       security_type_item = elm_genlist_item_append(view_list, &type_sel_itc,
+                                                                       NULL, NULL, ELM_GENLIST_ITEM_TREE, _gl_sel, NULL);
+
+       elm_object_item_data_set(security_type_item, (void*)0);
+
+       type_itc.item_style = "dialogue/1text/expandable2";
+       type_itc.func.text_get = _gl_subtext_get;
+       type_itc.func.content_get = NULL;
+       type_itc.func.state_get = NULL;
+       type_itc.func.del = NULL;
+
+       /* Set Password Item Class for WEP, WPA/PSK */
+       password_itc.item_style = "dialogue/1icon";
+       password_itc.func.text_get = NULL;
+       password_itc.func.content_get = _gl_pw_content_get;
+       password_itc.func.state_get = NULL;
+       password_itc.func.del = NULL;
+
+       /* Set EAP Item Class for 802.1x Enterprise, Dynamic WEP */
+       eap_itc.item_style = "dialogue/2text.2/expandable";
+       eap_itc.func.text_get = _gl_eap_text_get;
+       eap_itc.func.content_get = NULL;
+       eap_itc.func.state_get = NULL;
+       eap_itc.func.del = NULL;
+       eap_sub_itc.item_style = "dialogue/1text/expandable2";
+       eap_sub_itc.func.text_get = _gl_eap_subtext_get;
+       eap_sub_itc.func.content_get = NULL;
+       eap_sub_itc.func.state_get = NULL;
+       eap_sub_itc.func.del = NULL;
+       
+       eap_auth_itc.item_style = "dialogue/2text.2/expandable";
+       eap_auth_itc.func.text_get = _gl_eap_auth_text_get;
+       eap_auth_itc.func.content_get = NULL;
+       eap_auth_itc.func.state_get = NULL;
+       eap_auth_itc.func.del = NULL;
+       eap_auth_sub_itc.item_style = "dialogue/1text/expandable2";
+       eap_auth_sub_itc.func.text_get = _gl_eap_auth_subtext_get;
+       eap_auth_sub_itc.func.content_get = NULL;
+       eap_auth_sub_itc.func.state_get = NULL;
+       eap_auth_sub_itc.func.del = NULL;
+       
+       eap_id_itc.item_style = "dialogue/1icon";
+       eap_id_itc.func.text_get = NULL;
+       eap_id_itc.func.content_get = _gl_eap_id_content_get;
+       eap_id_itc.func.state_get = NULL;
+       eap_id_itc.func.del = NULL;
+       
+       eap_anonyid_itc.item_style = "dialogue/1icon";
+       eap_anonyid_itc.func.text_get = NULL;
+       eap_anonyid_itc.func.content_get = _gl_eap_anonyid_content_get;
+       eap_anonyid_itc.func.state_get = NULL;
+       eap_anonyid_itc.func.del = NULL;
+       
+       eap_pw_itc.item_style = "dialogue/1icon";
+       eap_pw_itc.func.text_get = NULL;
+       eap_pw_itc.func.content_get = _gl_eap_pw_content_get;
+       eap_pw_itc.func.state_get = NULL;
+       eap_pw_itc.func.del = NULL;
+
+       evas_object_smart_callback_add(view_list, "expanded", _gl_exp, view_list);
+       evas_object_smart_callback_add(view_list, "contracted", _gl_con, view_list);
+       
+       return view_list;
+}
+
+void view_ime_back(void *data,  Evas_Object *obj, void *event_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if(view_ime_hidden_end == TRUE) {
+               return;
+       }
+       view_ime_hidden_end = TRUE;
+
+
+       view_ime_hidden_destroy();
+
+       viewer_manager_set_enabled_list_click(EINA_TRUE);
+       viewer_manager_set_enabled_list_update(EINA_TRUE);
+
+       elm_naviframe_item_pop(viewer_manager_get_naviframe());
+
+       __COMMON_FUNC_EXIT__;
+}
+
+void view_ime_done(void *data,  Evas_Object *obj, void *event_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if(view_ime_hidden_end == TRUE) {
+               return;
+       }
+       view_ime_hidden_end = TRUE;
+
+       if(NULL == elm_entry_entry_get(_entry[0])) {
+               view_ime_hidden_end = FALSE;
+               return;
+       }
+
+       char* str_ssid = NULL;
+       char* str_id = NULL;
+       char* str_anonyid = NULL;
+       char* str_pw = NULL;
+
+       str_ssid = elm_entry_markup_to_utf8(elm_entry_entry_get(_entry[0]));
+       int ssid_len = strlen(str_ssid);
+       if (ssid_len == 0 || ssid_len > 32) {
+               winset_popup_simple_set("SSID can be up to 32 letters.<br>Check your input.");
+               view_ime_hidden_end = FALSE;
+               return;
+       }
+
+       net_wifi_connection_info_t conn_info;
+       strncpy(conn_info.essid, str_ssid, NET_WLAN_ESSID_LEN);
+       INFO_LOG(UG_NAME_REQ, "ssid = %s", conn_info.essid);
+
+       int sel_index = (int)elm_object_item_data_get(security_type_item);
+       switch (sel_index) {
+               case HIDDEN_AP_SECURITY_PUBLIC:
+                       conn_info.security_info.sec_mode = WLAN_SEC_MODE_NONE;
+
+                       connman_request_connection_open_hidden_ap(&conn_info);
+                       break;
+               case HIDDEN_AP_SECURITY_WEP:
+                       conn_info.security_info.sec_mode = WLAN_SEC_MODE_WEP;
+                       str_pw = elm_entry_markup_to_utf8(elm_entry_entry_get(_entry[1]));
+                       strncpy(conn_info.security_info.authentication.wep.wepKey, str_pw, NETPM_WLAN_MAX_WEP_KEY_LEN);
+                       conn_info.security_info.authentication.wep.wepKey[NETPM_WLAN_MAX_WEP_KEY_LEN] = '\0';
+                       INFO_LOG(UG_NAME_REQ, "pw = %s", conn_info.security_info.authentication.wep.wepKey);
+
+                       connman_request_connection_open_hidden_ap(&conn_info);
+                       break;
+               case HIDDEN_AP_SECURITY_WPAPSK:
+                       conn_info.security_info.sec_mode = WLAN_SEC_MODE_WPA_PSK; //WLAN_SEC_MODE_WPA2_PSK
+                       str_pw = elm_entry_markup_to_utf8(elm_entry_entry_get(_entry[1]));
+                       strncpy(conn_info.security_info.authentication.psk.pskKey, str_pw, NETPM_WLAN_MAX_PSK_PASSPHRASE_LEN);
+                       conn_info.security_info.authentication.psk.pskKey[NETPM_WLAN_MAX_PSK_PASSPHRASE_LEN] = '\0';
+                       INFO_LOG(UG_NAME_REQ, "pw = %s", conn_info.security_info.authentication.psk.pskKey);
+                       
+                       connman_request_connection_open_hidden_ap(&conn_info);
+                       break;
+
+               /* TODO : EAP authentication. */
+               case HIDDEN_AP_SECURITY_ENTERPRISE:
+               case HIDDEN_AP_SECURITY_DYNAMICWEP:
+                       conn_info.security_info.sec_mode = WLAN_SEC_MODE_IEEE8021X;
+                       str_id = elm_entry_markup_to_utf8(elm_entry_entry_get(_entry[1]));
+                       str_anonyid = elm_entry_markup_to_utf8(elm_entry_entry_get(_entry[2]));
+                       str_pw = elm_entry_markup_to_utf8(elm_entry_entry_get(_entry[3]));
+                       INFO_LOG(UG_NAME_REQ, "id = %s", str_id);
+                       INFO_LOG(UG_NAME_REQ, "anonyid = %s", str_anonyid);
+                       INFO_LOG(UG_NAME_REQ, "pw = %s", str_pw);
+                       break;
+
+               default:
+                       break;
+       }
+
+       view_ime_hidden_destroy();
+
+       viewer_manager_set_enabled_list_click(EINA_TRUE);
+       viewer_manager_set_enabled_list_update(EINA_TRUE);
+
+       elm_naviframe_item_pop(viewer_manager_get_naviframe());
+
+       __COMMON_FUNC_EXIT__;
+}
+
+void view_ime_hidden()
+{
+       __COMMON_FUNC_ENTER__;
+
+       view_ime_hidden_end = FALSE;
+
+       Evas_Object* navi_frame = viewer_manager_get_naviframe();
+       assertm_if(NULL == navi_frame, "NULL!!");
+
+       Evas_Object *layout =_create_layout(navi_frame);
+       if (layout == NULL)
+               return;
+
+       /* Add Conformant */
+       Evas_Object* conform = elm_conformant_add(navi_frame);
+       elm_object_style_set(conform, "internal_layout");
+       elm_object_part_content_set(layout, "elm.swallow.content", conform);
+       evas_object_show(conform);
+       
+       Evas_Object* list = _create_list(navi_frame);
+       assertm_if(NULL == list, "NULL!!");
+
+       elm_object_content_set(conform, list);
+
+       Elm_Object_Item *navi_it = elm_naviframe_item_push(navi_frame, sc(PACKAGE, I18N_TYPE_Hidden_AP), NULL, NULL, layout, NULL);
+
+       _button_save = elm_button_add(navi_frame);
+       elm_object_style_set(_button_save, "naviframe/title/default");
+       elm_object_text_set(_button_save, sc(PACKAGE, I18N_TYPE_Save));
+       evas_object_smart_callback_add(_button_save, "clicked", (Evas_Smart_Cb) view_ime_done, NULL);
+       elm_object_item_part_content_set(navi_it, "title_left_btn", _button_save);
+       elm_object_disabled_set(_button_save, EINA_TRUE);
+
+       Evas_Object *button_cancel = elm_button_add(navi_frame);
+       elm_object_style_set(button_cancel, "naviframe/title/default");
+       elm_object_text_set(button_cancel, sc(PACKAGE, I18N_TYPE_Cancel));
+       evas_object_smart_callback_add(button_cancel, "clicked", (Evas_Smart_Cb) view_ime_back, NULL);
+       elm_object_item_part_content_set(navi_it, "title_right_btn", button_cancel);
+
+       evas_object_show(layout);
+       __COMMON_FUNC_EXIT__;
+}
+
+static void view_ime_hidden_destroy()
+{
+       if (_entry[0]) {
+               evas_object_smart_callback_del(_entry[0], "changed", _network_name_entry_changed_cb);
+               evas_object_smart_callback_del(_entry[0], "focused", _entry_focused_cb);
+               evas_object_smart_callback_del(_entry[0], "unfocused", _entry_unfocused_cb);
+               _entry[0] = NULL;
+       }
+
+       if (_entry[1]) {
+               evas_object_smart_callback_del(_entry[1], "changed", _entry_changed_cb);
+               evas_object_smart_callback_del(_entry[1], "focused", _entry_focused_cb);
+               evas_object_smart_callback_del(_entry[1], "unfocused", _entry_unfocused_cb);
+               _entry[1] = NULL;
+       }
+
+       if (_entry[2]) {
+               evas_object_smart_callback_del(_entry[2], "changed", _entry_changed_cb);
+               evas_object_smart_callback_del(_entry[2], "focused", _entry_focused_cb);
+               evas_object_smart_callback_del(_entry[2], "unfocused", _entry_unfocused_cb);
+               _entry[2] = NULL;
+       }
+
+       if (_entry[3]) {
+               evas_object_smart_callback_del(_entry[3], "changed", _entry_changed_cb);
+               evas_object_smart_callback_del(_entry[3], "focused", _entry_focused_cb);
+               evas_object_smart_callback_del(_entry[3], "unfocused", _entry_unfocused_cb);
+               _entry[3] = NULL;
+       }
+}
diff --git a/sources/ui-gadget/viewers-layout/view_ime_password.c b/sources/ui-gadget/viewers-layout/view_ime_password.c
new file mode 100644 (file)
index 0000000..632d00f
--- /dev/null
@@ -0,0 +1,430 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#include "wifi.h"
+#include "view_ime_password.h"
+#include "i18nmanager.h"
+#include "wlan_manager.h"
+#include "viewer_manager.h"
+#include "popup.h"
+
+
+static Elm_Genlist_Item_Class itc;
+static Elm_Genlist_Item_Class show_pw_itc;
+static Elm_Genlist_Item_Class wps_itc;
+static Elm_Genlist_Item_Class wps_sep_itc;
+
+static Evas_Object* button_done = NULL;
+static Evas_Object* _entry = NULL;
+static int view_ime_password_end = TRUE;
+
+typedef struct _view_ime_password_data {
+       char *profile_name;
+       int security_mode;
+       int wps_mode;
+} view_ime_password_data;
+view_ime_password_data *_password_data = NULL;
+
+
+static void _entry_changed_cb(void* data, Evas_Object* obj, void* event_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (elm_object_focus_get(data)) {
+               if (elm_entry_is_empty(obj))
+                       elm_object_signal_emit(data, "elm,state,eraser,hide", "elm");
+               else
+                       elm_object_signal_emit(data, "elm,state,eraser,show", "elm");
+       }
+
+       const char* txt = elm_entry_markup_to_utf8(elm_entry_entry_get(obj));
+       int len = 0;
+
+       if (txt != NULL) {
+               INFO_LOG(UG_NAME_NORMAL, "* text [%s]", txt);
+               len = strlen(txt);
+
+               if (_password_data->security_mode == WLAN_SEC_MODE_WEP) {
+                       if (len > 0) {
+                               elm_object_disabled_set(button_done, EINA_FALSE);
+                       } else {
+                               elm_object_disabled_set(button_done, EINA_TRUE);
+                       }
+               } else {
+                       if (len > 7 && len < 64) {
+                               elm_object_disabled_set(button_done, EINA_FALSE);
+                       } else {
+                               elm_object_disabled_set(button_done, EINA_TRUE);
+                       }
+               }
+       } else {
+               ERROR_LOG(UG_NAME_NORMAL, "Err!");
+       }
+
+       __COMMON_FUNC_EXIT__;
+}
+
+static void _entry_focused_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       if (!elm_entry_is_empty(obj))
+               elm_object_signal_emit(data, "elm,state,eraser,show", "elm");
+       elm_object_signal_emit(data, "elm,state,guidetext,hide", "elm");
+}
+
+static void _entry_unfocused_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       if (elm_entry_is_empty(obj))
+               elm_object_signal_emit(data, "elm,state,guidetext,show", "elm");
+       elm_object_signal_emit(data, "elm,state,eraser,hide", "elm");
+}
+
+static void _eraser_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
+{
+       elm_entry_entry_set(data, "");
+}
+
+static int _genlist_item_disable_later(void* data)
+{
+       if(NULL != data) {
+               elm_genlist_item_selected_set((Elm_Object_Item*) data, FALSE);
+       }
+       return FALSE;
+}
+
+static void _wps_btn_cb(void* data, Evas_Object* obj, void* event_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (_password_data == NULL)
+               return;
+
+       int ret = wlan_manager_request_wps_connection(_password_data->profile_name);
+       if (ret == WLAN_MANAGER_ERR_NONE) {
+               viewer_manager_header_mode_set(HEADER_MODE_CONNECTING);
+               viewer_manager_item_radio_mode_set(NULL, viewer_manager_current_selected_item_get(), VIEWER_ITEM_RADIO_MODE_WPS_CONNECTING);
+               winset_popup_mode_set((void *)_password_data->profile_name, POPUP_MODE_PBC, POPUP_OPTION_NONE);
+               __COMMON_FUNC_EXIT__;
+       }
+
+       ecore_idler_add( (Ecore_Task_Cb) _genlist_item_disable_later, event_info);
+
+       __COMMON_FUNC_EXIT__;
+}
+
+static void _show_pw_changed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       if (obj == NULL)
+               return;
+
+       Eina_Bool state = elm_check_state_get(obj);
+       elm_entry_password_set(_entry, !state);
+}
+
+static Evas_Object *_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       Evas_Object *layout = NULL;
+       assertm_if(NULL == part, "NULL!!");
+
+       DEBUG_LOG(UG_NAME_NORMAL, "part [%s]", part);
+
+       if (!strncmp(part, "elm.icon", strlen(part))) {
+               layout = elm_layout_add(obj);
+               if (layout) {
+                       elm_layout_theme_set(layout, "layout", "editfield", "title");
+                       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+                       evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+                       _entry = elm_entry_add(obj);
+                       elm_object_part_content_set(layout, "elm.swallow.content", _entry);
+                       elm_object_part_text_set(layout, "elm.text", sc(PACKAGE, I18N_TYPE_Input_password));
+                       elm_entry_entry_set(_entry, "");
+
+                       evas_object_smart_callback_add(_entry, "changed", _entry_changed_cb, layout);
+                       evas_object_smart_callback_add(_entry, "focused", _entry_focused_cb, layout);
+                       evas_object_smart_callback_add(_entry, "unfocused", _entry_unfocused_cb, layout);
+                       elm_object_signal_callback_add(layout, "elm,eraser,clicked", "elm", _eraser_clicked_cb, _entry);
+
+                       elm_entry_password_set(_entry, TRUE);
+                       elm_entry_input_panel_layout_set(_entry, ELM_INPUT_PANEL_LAYOUT_URL);
+                       evas_object_show(_entry);
+                       evas_object_show(layout);
+                       elm_object_focus_set(layout, EINA_TRUE);
+               }
+       }
+
+       return layout;
+}
+
+static Evas_Object *_show_pw_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       Evas_Object *check = NULL;
+
+       if (!strncmp(part, "elm.icon", strlen(part))) {
+               check = elm_check_add(obj);
+               elm_object_text_set(check, sc(PACKAGE, I18N_TYPE_Show_password));
+               elm_object_focus_allow_set(check, EINA_FALSE);
+
+               evas_object_size_hint_weight_set(check, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+               evas_object_size_hint_align_set(check, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+               evas_object_smart_callback_add(check, "changed", _show_pw_changed_cb, obj);
+       }
+
+       return check;
+}
+
+static Evas_Object *_wps_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       if (obj == NULL)
+               return NULL;
+
+       Evas_Object* btn = NULL;
+
+       if(!strncmp(part, "elm.icon", strlen(part))) {
+               btn = elm_button_add(obj);
+               elm_object_text_set(btn, "WPS connection");
+       }
+
+       return btn;
+}
+
+static Evas_Object* _create_list(Evas_Object* parent)
+{
+       assertm_if(NULL == parent, "NULL!!");
+
+       Evas_Object *list = elm_genlist_add(parent);
+       elm_genlist_mode_set(list, ELM_LIST_LIMIT);
+       evas_object_size_hint_weight_set(list, 
+                       EVAS_HINT_EXPAND,
+                       EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(list, 
+                       EVAS_HINT_FILL, 
+                       EVAS_HINT_FILL);
+
+       itc.item_style = "1icon";
+       itc.func.text_get = NULL;
+       itc.func.content_get = _content_get;
+       itc.func.state_get = NULL;
+       itc.func.del = NULL;
+
+       WLAN_MANAGER_EAP_TYPES det = WLAN_MANAGER_EAP_TYPE_NONE;
+
+       INFO_LOG(UG_NAME_SCAN, "WlanSecMode %d", _password_data->security_mode);
+       if (_password_data->security_mode == WLAN_SEC_MODE_IEEE8021X) {
+               det =WLAN_MANAGER_EAP_TYPE_ERROR;
+       } else {
+               det = WLAN_MANAGER_EAP_TYPE_NONE;
+       }
+
+       INFO_LOG(UG_NAME_SCAN, "EAP Type %d", det);
+       switch (det) {
+       case WLAN_MANAGER_EAP_TYPE_NONE:
+               elm_genlist_item_append(list, &itc,     NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+               break;
+       case WLAN_MANAGER_EAP_TYPE_ERROR:
+               break;
+       default:
+               INFO_LOG(UG_NAME_SCAN, "EAP Type error");
+               break;
+       }
+
+       show_pw_itc.item_style = "1text.1icon.2";
+       show_pw_itc.func.text_get = NULL;
+       show_pw_itc.func.content_get = _show_pw_content_get;
+       show_pw_itc.func.state_get = NULL;
+       show_pw_itc.func.del = NULL;
+       Elm_Object_Item *item = elm_genlist_item_append(list, &show_pw_itc, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+       elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+       
+       if (_password_data->wps_mode) {
+               wps_sep_itc.item_style = "dialogue/separator/20";
+               wps_sep_itc.func.text_get = NULL;
+               wps_sep_itc.func.content_get = NULL;
+               wps_sep_itc.func.state_get = NULL;
+               wps_sep_itc.func.del = NULL;
+               elm_genlist_item_append(list, &wps_sep_itc, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+
+               wps_itc.item_style = "dialogue/bg/1icon";
+               wps_itc.func.text_get = NULL;
+               wps_itc.func.content_get = _wps_content_get;
+               wps_itc.func.state_get = NULL;
+               wps_itc.func.del = NULL;
+               elm_genlist_item_append(list, &wps_itc, NULL, NULL, ELM_GENLIST_ITEM_NONE, _wps_btn_cb, NULL);
+       }
+
+       return list;
+}
+
+static void view_ime_password_back(void *data,  Evas_Object *obj, void *event_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if(view_ime_password_end == TRUE)
+               return;
+
+       view_ime_password_end = TRUE;
+
+       viewer_manager_set_enabled_list_click(EINA_TRUE);
+       viewer_manager_set_enabled_list_update(EINA_TRUE);
+
+       view_ime_password_destroy();
+
+       __COMMON_FUNC_EXIT__;
+}
+
+static void view_ime_password_done(void *data,  Evas_Object *obj, void *event_info)
+{
+       __COMMON_FUNC_ENTER__;
+       
+       if(view_ime_password_end == TRUE) {
+               return;
+       } 
+       view_ime_password_end = TRUE;
+
+       int ret = WLAN_MANAGER_ERR_UNKNOWN;
+       wlan_manager_password_data* param = (wlan_manager_password_data*) g_malloc0(sizeof(wlan_manager_password_data));
+       param->wlan_eap_type = _password_data->security_mode;
+
+       int nLen = 0;
+       const char* szPassword = NULL;
+       switch (param->wlan_eap_type) {
+       case WLAN_SEC_MODE_WEP:
+               szPassword = elm_entry_markup_to_utf8(elm_entry_entry_get(_entry));
+               nLen = strlen(szPassword);
+
+               if (nLen == 5 || nLen == 13 || nLen == 26 || nLen == 10) {
+                       INFO_LOG(UG_NAME_NORMAL, "password = [%s]", szPassword);
+               } else {
+                       winset_popup_mode_set(NULL, POPUP_MODE_CONNECTING_FAILED, POPUP_OPTION_CONNECTIONG_PASSWORD_WEP_ERROR);
+                       view_ime_password_end = FALSE;
+                       return;
+               }
+
+               param->password = strdup(szPassword);
+               viewer_manager_item_radio_mode_all_reset();
+               viewer_manager_item_radio_mode_set(NULL, viewer_manager_current_selected_item_get(), VIEWER_ITEM_RADIO_MODE_CONNECTING);
+               viewer_manager_header_mode_set(HEADER_MODE_CONNECTING);
+
+               ret = wlan_manager_connect_with_password(_password_data->profile_name, _password_data->security_mode, param);
+               break;
+       case WLAN_SEC_MODE_WPA_PSK:
+       case WLAN_SEC_MODE_WPA2_PSK:
+               szPassword = elm_entry_markup_to_utf8(elm_entry_entry_get(_entry));
+               nLen = strlen(szPassword);
+
+               if (nLen < 8 || nLen > 63) {
+                       winset_popup_mode_set(NULL, POPUP_MODE_CONNECTING_FAILED, POPUP_OPTION_CONNECTIONG_PASSWORD_WPAPSK_ERROR);
+                       view_ime_password_end = FALSE;
+                       return;
+               } else {
+                       INFO_LOG(UG_NAME_NORMAL, "password = [%s]", szPassword);
+               }
+
+               param->password = strdup(szPassword);                   
+               viewer_manager_item_radio_mode_all_reset();
+               viewer_manager_item_radio_mode_set(NULL, viewer_manager_current_selected_item_get(), VIEWER_ITEM_RADIO_MODE_CONNECTING);
+               viewer_manager_header_mode_set(HEADER_MODE_CONNECTING);
+
+               ret = wlan_manager_connect_with_password(_password_data->profile_name, _password_data->security_mode, param);
+               break;
+       default:
+               break;
+       }
+
+       switch (ret) {
+       case WLAN_MANAGER_ERR_NONE:
+               INFO_LOG(UG_NAME_SCAN, "connect with password comp");
+               break;
+       default:
+               ERROR_LOG(UG_NAME_SCAN, "wlan error %d", ret);
+               viewer_manager_refresh(TRUE);
+               break;
+       }
+
+       view_ime_password_destroy();
+
+       __COMMON_FUNC_EXIT__;
+}
+
+void view_ime_password(wifi_device_info_t *device_info)
+{
+       __COMMON_FUNC_ENTER__;
+       view_ime_password_end = FALSE;
+
+       Evas_Object *navi_frame = viewer_manager_get_naviframe();
+       if (navi_frame == NULL)
+               return;
+
+       _password_data = (view_ime_password_data *) malloc(sizeof(view_ime_password_data));
+       if (_password_data == NULL)
+               return;
+
+       memset(_password_data, 0, sizeof(view_ime_password_data));
+       _password_data->profile_name = strdup(device_info->profile_name);
+       _password_data->security_mode = device_info->security_mode;
+       _password_data->wps_mode = device_info->wps_mode;
+
+       Evas_Object* layout = elm_layout_add(navi_frame);
+       elm_layout_theme_set(layout, "standard", "window", "integration");
+       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       edje_object_signal_emit(elm_layout_edje_get(layout), "elm,state,show,content", "elm");
+       edje_object_signal_emit(elm_layout_edje_get(layout), "elm,bg,show,group_list", "elm");
+
+       Evas_Object* conform = elm_conformant_add(navi_frame);
+       elm_object_style_set(conform, "internal_layout");
+       elm_object_part_content_set(layout, "elm.swallow.content", conform);
+
+       Evas_Object* list = _create_list(navi_frame);
+       elm_object_content_set(conform, list);
+
+       elm_naviframe_prev_btn_auto_pushed_set(navi_frame, EINA_FALSE);
+       Elm_Object_Item *navi_it = elm_naviframe_item_push(navi_frame, sc(PACKAGE, I18N_TYPE_Password), NULL, NULL, layout, NULL);
+       elm_naviframe_prev_btn_auto_pushed_set(navi_frame, EINA_TRUE);
+
+       Evas_Object* button_back = elm_button_add(navi_frame);
+       elm_object_style_set(button_back, "naviframe/title/default");
+       elm_object_text_set(button_back, sc(PACKAGE, I18N_TYPE_Back));
+       evas_object_smart_callback_add(button_back, "clicked", view_ime_password_back, NULL);
+       elm_object_item_part_content_set(navi_it, "title_left_btn", button_back);
+
+       button_done = elm_button_add(navi_frame);
+       elm_object_style_set(button_done, "naviframe/title/default");
+       elm_object_text_set(button_done, sc(PACKAGE, I18N_TYPE_Done));
+       evas_object_smart_callback_add(button_done, "clicked", (Evas_Smart_Cb) view_ime_password_done, NULL);
+       elm_object_item_part_content_set(navi_it, "title_right_btn", button_done);
+
+       evas_object_show(layout);
+
+       __COMMON_FUNC_EXIT__;
+}
+
+void view_ime_password_destroy()
+{
+       if (_entry) {
+               evas_object_smart_callback_del(_entry, "changed", _entry_changed_cb);
+               evas_object_smart_callback_del(_entry, "focused", _entry_focused_cb);
+               evas_object_smart_callback_del(_entry, "unfocused", _entry_unfocused_cb);
+               _entry = NULL;
+       }
+
+       if (_password_data) {
+               g_free(_password_data);
+               _password_data = NULL;
+       }
+
+       elm_naviframe_item_pop(viewer_manager_get_naviframe());
+}
diff --git a/sources/ui-gadget/viewers-layout/view_staticip.c b/sources/ui-gadget/viewers-layout/view_staticip.c
new file mode 100644 (file)
index 0000000..36fd679
--- /dev/null
@@ -0,0 +1,513 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#include "wifi.h"
+#include "view_staticip.h"
+#include "view_detail.h"
+#include "i18nmanager.h"
+#include "view_detail_datamodel.h"
+#include "popup.h"
+
+
+static char* guide_text_ip = NULL;
+static char* guide_text_subnet = NULL;
+static char* guide_text_gateway = NULL;
+static char* guide_text_dns1 = NULL;
+static char* guide_text_dns2 = NULL;
+
+static int view_staticip_end = TRUE;
+
+static Elm_Genlist_Item_Class ip_itc;
+static Elm_Genlist_Item_Class sep_itc;
+
+typedef enum VIEW_STATICIP_TYPES
+{
+       VIEW_STATICIP_TYPE_IP,
+       VIEW_STATICIP_TYPE_SUBNET,
+       VIEW_STATICIP_TYPE_GATEWAY,
+       VIEW_STATICIP_TYPE_DNS1,
+       VIEW_STATICIP_TYPE_DNS2,
+
+} VIEW_STATICIP_TYPES;
+
+typedef struct _view_staticip_description_data
+{
+       char* title;
+       int tag;
+} _view_staticip_description_data;
+/////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////////////
+// implementations 
+/////////////////////////////////////////////////////////////////
+static Elm_Object_Item* _add_list_item(Evas_Object* list,
+                               VIEW_STATICIP_TYPES tag,
+                               char* title)
+{
+       _view_staticip_description_data* data = NULL;
+
+       data = (_view_staticip_description_data*) malloc (
+                       sizeof( _view_staticip_description_data));
+       assertm_if(NULL == data, "NULL!!");
+       memset(data, 0, sizeof(_view_staticip_description_data));
+
+       data->title = strdup(title);
+       data->tag = tag;
+
+       Elm_Object_Item* det = NULL;
+       det = elm_genlist_item_append(
+                       list,
+                       &ip_itc,
+                       data,
+                       NULL,
+                       ELM_GENLIST_ITEM_NONE,
+                       NULL,
+                       NULL);
+       assertm_if(NULL == det, "NULL!!");
+       if (det == NULL) {
+               g_free(data->title);
+               g_free(data);
+       }
+
+       return det;
+}
+
+static void _entry_changed_cb(void* data, Evas_Object* obj, void* event_info)
+{
+       if (obj == NULL || view_staticip_end == TRUE)
+               return;
+
+       if (elm_object_focus_get(data)) {
+               if (elm_entry_is_empty(obj))
+                       elm_object_signal_emit(data, "elm,state,eraser,hide", "elm");
+               else
+                       elm_object_signal_emit(data, "elm,state,eraser,show", "elm");
+       }
+
+       const char* txt = elm_entry_markup_to_utf8(elm_entry_entry_get(obj));
+       assertm_if(NULL == txt, "NULL!!");
+       DEBUG_LOG( UG_NAME_NORMAL, "text [%s]", txt);
+
+       _view_staticip_description_data* det = 
+               (_view_staticip_description_data*) data;
+
+       switch(det->tag) {
+               case VIEW_STATICIP_TYPE_IP:
+                       view_detail_datamodel_static_ip_address_set(txt);
+                       break;
+               case VIEW_STATICIP_TYPE_SUBNET:
+                       view_detail_datamodel_static_subnet_mask_set(txt);
+                       break;
+               case VIEW_STATICIP_TYPE_GATEWAY:
+                       view_detail_datamodel_static_gateway_address_set(txt);
+                       break;
+               case VIEW_STATICIP_TYPE_DNS1:
+                       view_detail_datamodel_static_dns1_address_set(txt);
+                       break;
+               case VIEW_STATICIP_TYPE_DNS2:
+                       view_detail_datamodel_static_dns2_address_set(txt);
+                       break;
+       }
+}
+
+static void _entry_focused_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       if (!elm_entry_is_empty(obj))
+               elm_object_signal_emit(data, "elm,state,eraser,show", "elm");
+       elm_object_signal_emit(data, "elm,state,guidetext,hide", "elm");
+}
+
+static void _entry_unfocused_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       if (elm_entry_is_empty(obj))
+               elm_object_signal_emit(data, "elm,state,guidetext,show", "elm");
+       elm_object_signal_emit(data, "elm,state,eraser,hide", "elm");
+}
+
+static void _eraser_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
+{
+       elm_entry_entry_set(data, "");
+}
+
+static Evas_Object *_view_staticip_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       __COMMON_FUNC_ENTER__;
+
+       Evas_Object* layout = NULL;
+
+       assertm_if(NULL == part, "NULL!!");
+       DEBUG_LOG(UG_NAME_NORMAL, "part [%s]", part);
+
+       if(!strncmp(part, "elm.icon", strlen(part))) {
+               _view_staticip_description_data* det = 
+                       (_view_staticip_description_data*) data;
+
+               layout = elm_layout_add(obj);
+               if (layout) {
+                       elm_layout_theme_set(layout, "layout", "editfield", "title");
+                       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+                       evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+                       Evas_Object *entry = elm_entry_add(obj);
+                       elm_object_part_content_set(layout, "elm.swallow.content", entry);
+                       elm_object_part_text_set(layout, "elm.text", det->title);
+                       elm_entry_single_line_set(entry, EINA_TRUE);
+                       elm_entry_scrollable_set(entry, EINA_TRUE);
+
+                       const char* txt = NULL;
+                       switch(det->tag) {
+                       case VIEW_STATICIP_TYPE_IP:
+                               txt = view_detail_datamodel_static_ip_address_get();
+                               DEBUG_LOG(UG_NAME_NORMAL, "* IP [%s]", txt);
+                               g_free(guide_text_ip);
+                               guide_text_ip = g_strdup(txt);
+                               break;
+                       case VIEW_STATICIP_TYPE_SUBNET:
+                               txt = view_detail_datamodel_static_subnet_mask_get();
+                               DEBUG_LOG(UG_NAME_NORMAL, "* SUBNET [%s]", txt);
+                               g_free(guide_text_subnet);
+                               guide_text_subnet = g_strdup(txt);
+                               break;
+                       case VIEW_STATICIP_TYPE_GATEWAY:
+                               txt = view_detail_datamodel_static_gateway_address_get();
+                               DEBUG_LOG(UG_NAME_NORMAL, "* GATEWAY [%s]", txt);
+                               g_free(guide_text_gateway);
+                               guide_text_gateway = g_strdup(txt);
+                               break;
+                       case VIEW_STATICIP_TYPE_DNS1:
+                               txt = view_detail_datamodel_static_dns1_address_get();
+                               DEBUG_LOG(UG_NAME_NORMAL, "* DNS1 [%s]", txt);
+                               g_free(guide_text_dns1);
+                               guide_text_dns1 = g_strdup(txt);
+                               break;
+                       case VIEW_STATICIP_TYPE_DNS2:
+                               txt = view_detail_datamodel_static_dns2_address_get();
+                               DEBUG_LOG(UG_NAME_NORMAL, "* DNS2 [%s]", txt);
+                               g_free(guide_text_dns2);
+                               guide_text_dns2 = g_strdup(txt);
+                               break;
+                       }
+
+                       elm_object_part_text_set(layout, "elm.guidetext", txt);
+                       elm_entry_input_panel_layout_set(entry, ELM_INPUT_PANEL_LAYOUT_IP);
+                       elm_entry_cnp_mode_set(entry, ELM_CNP_MODE_NO_IMAGE);
+
+                       evas_object_smart_callback_add(entry, "changed", _entry_changed_cb, layout);
+                       evas_object_smart_callback_add(entry, "focused", _entry_focused_cb, layout);
+                       evas_object_smart_callback_add(entry, "unfocused", _entry_unfocused_cb, layout);
+                       elm_object_signal_callback_add(layout, "elm,eraser,clicked", "elm", _eraser_clicked_cb, entry);
+
+                       evas_object_show(entry);
+               }
+
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return layout;
+}
+
+static void _view_staticip_list_del(void *data, Evas_Object *obj)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (data == NULL)
+               return;
+
+       _view_staticip_description_data* det = (_view_staticip_description_data *) data;
+
+       if (det->title)
+               g_free(det->title);
+
+       g_free(data);
+
+       __COMMON_FUNC_EXIT__;
+}
+
+static Evas_Object* _create_list(Evas_Object* parent)
+{
+       __COMMON_FUNC_ENTER__;
+
+       ip_itc.item_style = "1icon";
+       ip_itc.func.text_get = NULL;
+       ip_itc.func.content_get = _view_staticip_content_get;
+       ip_itc.func.state_get = NULL;
+       ip_itc.func.del = _view_staticip_list_del;
+
+       Evas_Object *list = elm_genlist_add(parent);
+       elm_genlist_mode_set(list, ELM_LIST_LIMIT);
+       evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_show(list);
+
+       sep_itc.item_style = "dialogue/seperator";
+       sep_itc.func.text_get = NULL;
+       sep_itc.func.content_get = NULL;
+       sep_itc.func.state_get = NULL;
+       sep_itc.func.del = NULL;
+
+       Elm_Object_Item *sep = NULL;
+       sep = elm_genlist_item_append(list, &sep_itc, NULL, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL);
+       elm_genlist_item_select_mode_set(sep, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+
+       /* add list */
+       _add_list_item(list, VIEW_STATICIP_TYPE_IP, sc(PACKAGE, I18N_TYPE_IP_address));
+       _add_list_item(list, VIEW_STATICIP_TYPE_SUBNET, sc(PACKAGE, I18N_TYPE_Subnet_mask));
+       _add_list_item(list, VIEW_STATICIP_TYPE_GATEWAY, sc(PACKAGE, I18N_TYPE_Gateway));
+       _add_list_item(list, VIEW_STATICIP_TYPE_DNS1, sc(PACKAGE, I18N_TYPE_DNS_1));
+       _add_list_item(list, VIEW_STATICIP_TYPE_DNS2, sc(PACKAGE, I18N_TYPE_DNS_2));
+
+       __COMMON_FUNC_EXIT__;
+
+       return list;
+}
+
+static boolean isValidIP(const char *szIP)
+{
+       __COMMON_FUNC_ENTER__;
+
+       unsigned int n1,n2,n3,n4;
+       if (NULL == szIP) {
+               __COMMON_FUNC_EXIT__;
+               return FALSE;
+       }
+
+       INFO_LOG(UG_NAME_NORMAL, "* str [%s]", szIP);
+
+       int i;
+       int nDotCnt = 0;
+       for(i=0; i<strlen(szIP); i++) {
+               if(szIP[i] == '.') {
+                       ++nDotCnt;
+               } else if(szIP[i] == ':') {
+                       __COMMON_FUNC_EXIT__;
+                       return FALSE;
+               } else if(szIP[i] == '\0') {
+                       break;
+               } else if(0 == isdigit((int)szIP[i])) {
+                       __COMMON_FUNC_EXIT__;
+                       return FALSE;   
+               }
+       }
+
+       if (nDotCnt > 3){
+               __COMMON_FUNC_EXIT__;
+               return FALSE;
+       }
+
+       /* check dotted decial addressing format */
+       if(sscanf(szIP, "%u.%u.%u.%u", &n1, &n2, &n3, &n4) != 4) {
+               __COMMON_FUNC_EXIT__;
+               return FALSE;
+       }
+
+       /* check IPv4 address class invariants */
+       //if(!n1) return FALSE;
+
+       /* check address range */
+       if ((n1 < 0x100) &&
+                       (n2 < 0x100) &&
+                       (n3 < 0x100) &&
+                       (n4 < 0x100)){
+               __COMMON_FUNC_EXIT__;
+               return TRUE;
+       } else {
+               __COMMON_FUNC_EXIT__;
+               return FALSE;
+       }
+}
+
+static boolean _staticip_check(void)
+{
+       __COMMON_FUNC_ENTER__;
+
+       boolean ret = FALSE;
+
+       /** current addresses get */
+       char* str1= view_detail_datamodel_static_ip_address_get();
+       char* str2= view_detail_datamodel_static_subnet_mask_get();
+       char* str3= view_detail_datamodel_static_gateway_address_get();
+       char* str4= view_detail_datamodel_static_dns1_address_get();
+       char* str5= view_detail_datamodel_static_dns2_address_get();
+
+       assertm_if(NULL == str1, "NULL!!");
+       assertm_if(NULL == str2, "NULL!!");
+       assertm_if(NULL == str3, "NULL!!");
+       assertm_if(NULL == str4, "NULL!!");
+       assertm_if(NULL == str5, "NULL!!");
+
+       /** reset target value from "" to guide-text when user input is zero */
+       if(0 == strlen(str1)) {
+               g_free(str1);
+               DEBUG_LOG(UG_NAME_NORMAL, "reset address to guide text [%s]", guide_text_ip);
+               view_detail_datamodel_static_ip_address_set(guide_text_ip);
+               str1 = view_detail_datamodel_static_ip_address_get();
+       }
+       if(0 == strlen(str2)) {
+               g_free(str2);
+               DEBUG_LOG(UG_NAME_NORMAL, "reset address to guide text [%s]", guide_text_subnet);
+               view_detail_datamodel_static_subnet_mask_set(guide_text_subnet);
+               str2 = view_detail_datamodel_static_subnet_mask_get();
+       }
+       if(0 == strlen(str3)) {
+               g_free(str3);
+               DEBUG_LOG(UG_NAME_NORMAL, "reset address to guide text [%s]", guide_text_gateway);
+               view_detail_datamodel_static_gateway_address_set(guide_text_gateway);
+               str3 = view_detail_datamodel_static_gateway_address_get();
+       }
+       if(0 == strlen(str4)) {
+               g_free(str4);
+               DEBUG_LOG(UG_NAME_NORMAL, "reset address to guide text [%s]", guide_text_dns1);
+               view_detail_datamodel_static_dns1_address_set(guide_text_dns1);
+               str4 = view_detail_datamodel_static_dns1_address_get();
+       }
+       if(0 == strlen(str5)) {
+               g_free(str5);
+               DEBUG_LOG(UG_NAME_NORMAL, "reset address to guide text [%s]", guide_text_dns2);
+               view_detail_datamodel_static_dns2_address_set(guide_text_dns2);
+               str5 = view_detail_datamodel_static_dns2_address_get();
+       }
+
+       /** Judge valid or not */
+       if(isValidIP(str1) == TRUE && 
+               isValidIP(str2) == TRUE && 
+               isValidIP(str3) == TRUE && 
+               isValidIP(str4) == TRUE && 
+               isValidIP(str5) == TRUE) {
+
+               ret = TRUE;
+       } else {
+               ret = FALSE;
+       }
+
+       g_free(str1);
+       g_free(str2);
+       g_free(str3);
+       g_free(str4);
+       g_free(str5);
+
+       __COMMON_FUNC_EXIT__;
+       return ret;
+}
+
+static void static_done_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if(view_staticip_end == TRUE) {
+               __COMMON_FUNC_EXIT__;
+               return;
+       }
+       view_staticip_end = TRUE;
+
+       boolean det = _staticip_check();
+       if (det) {
+               detailview_ip_and_dns_type_set_as_static();
+               elm_naviframe_item_pop(viewer_manager_get_naviframe());
+
+               g_free((gpointer) guide_text_ip);
+               g_free((gpointer) guide_text_subnet);
+               g_free((gpointer) guide_text_gateway);
+               g_free((gpointer) guide_text_dns1);
+               g_free((gpointer) guide_text_dns2);
+
+               guide_text_ip = NULL;
+               guide_text_subnet = NULL;
+               guide_text_gateway = NULL;
+               guide_text_dns1 = NULL;
+               guide_text_dns2 = NULL;
+       } else {
+               winset_popup_mode_set(NULL, POPUP_MODE_INPUT_FAILED,
+                               POPUP_OPTION_INPUT_FAILED_PROXY_IP_MISTYPE);
+               view_staticip_end = FALSE;
+       }
+
+       __COMMON_FUNC_EXIT__;
+}
+
+static void static_back_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if(view_staticip_end == TRUE) {
+               __COMMON_FUNC_EXIT__;
+               return;
+       }
+       view_staticip_end = TRUE;
+
+       __COMMON_FUNC_EXIT__;
+}
+
+static Evas_Object* _create_conformant(Evas_Object* parent)
+{
+       assertm_if(NULL == parent, "NULL!!");
+
+       Evas_Object* conform = NULL;
+       elm_win_conformant_set(parent, TRUE);
+       conform = elm_conformant_add(parent);
+       assertm_if(NULL == conform, "NULL!!");
+
+       elm_object_style_set(conform, "internal_layout");
+       evas_object_show(conform);
+
+       return conform;
+}
+
+void view_staticip()
+{
+       __COMMON_FUNC_ENTER__;
+
+       view_staticip_end = FALSE;
+
+       Evas_Object* navi_frame = NULL;
+       navi_frame = viewer_manager_get_naviframe();
+       assertm_if(NULL == navi_frame, "NULL!!");
+
+       Evas_Object *layout = elm_layout_add(navi_frame);
+       elm_layout_theme_set(layout, "layout", "application", "noindicator");
+       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+       Evas_Object *bg = elm_bg_add(layout);
+       evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_object_style_set(bg, "group_list");
+       elm_object_part_content_set(layout, "elm.swallow.bg", bg);
+
+       Evas_Object* conform = NULL;
+       conform = _create_conformant(layout);
+       assertm_if(NULL == conform, "NULL!!");
+       elm_object_part_content_set(layout, "elm.swallow.content", conform);
+
+       Evas_Object* bx = NULL;
+       bx = _create_list(conform);
+       assertm_if(NULL == bx, "NULL!!");
+
+       evas_object_show(layout);
+       elm_object_content_set(conform, bx);
+
+       Elm_Object_Item *navi_it = elm_naviframe_item_push(navi_frame, sc(PACKAGE, I18N_TYPE_Static_IP), NULL, NULL, layout, NULL);
+
+       Evas_Object *button_done = elm_button_add(navi_frame);
+       elm_object_style_set(button_done, "naviframe/title/default");
+       elm_object_text_set(button_done, sc(PACKAGE, I18N_TYPE_Done));
+       evas_object_smart_callback_add(button_done, "clicked", (Evas_Smart_Cb) static_done_cb, NULL);
+       elm_object_item_part_content_set(navi_it, "title_right_btn", button_done);
+
+       Evas_Object* button_back = elm_object_item_part_content_get(navi_it, "prev_btn");
+       elm_object_focus_allow_set(button_back, EINA_TRUE);
+       evas_object_smart_callback_add(button_back, "clicked", (Evas_Smart_Cb)static_back_cb, NULL);
+
+       __COMMON_FUNC_EXIT__;
+}
diff --git a/sources/ui-gadget/viewers-layout/viewer_manager.c b/sources/ui-gadget/viewers-layout/viewer_manager.c
new file mode 100644 (file)
index 0000000..7463e0a
--- /dev/null
@@ -0,0 +1,1146 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#include "wifi.h"
+#include "viewer_manager.h"
+#include "viewer_list.h"
+#include "i18nmanager.h"
+#include "wifi-setting.h"
+#include "view_ime_hidden.h"
+#include "wlan_manager.h"
+#include "wifi-ui-list-callbacks.h"
+#include "popup.h"
+
+
+typedef struct viewer_manager_object {
+       Evas_Object* nav;
+       Elm_Object_Item* scan_button;
+       Evas_Object* list;
+       Elm_Object_Item *current_selected_item;
+
+       Elm_Object_Item *item_hidden_btn;
+       Elm_Object_Item *item_sep_above_hidden_button;
+       Elm_Object_Item *item_sep_below_hidden_button;
+
+       Eina_Bool click_enabled;
+       Eina_Bool update_enabled;
+
+       char* header_text;
+       HEADER_MODES header_mode;
+       Elm_Object_Item* item_header;
+       Elm_Object_Item* item_bottom;
+} viewer_manager_object;
+static viewer_manager_object* manager_object = NULL;
+
+extern struct wifi_appdata *app_state;
+
+static Elm_Genlist_Item_Class header_itc;
+static Elm_Genlist_Item_Class header_itc_text;
+static Elm_Genlist_Item_Class bottom_itc;
+static Elm_Genlist_Item_Class bottom_itc_text;
+static Elm_Genlist_Item_Class hidden_button_seperator_itc;
+static Elm_Genlist_Item_Class hidden_button_itc;
+
+int power_control()
+{
+       __COMMON_FUNC_ENTER__;
+
+       int cur_state = -1;
+       cur_state = viewer_manager_header_mode_get();
+
+       INFO_LOG(UG_NAME_NORMAL, "current state %d\n", cur_state);
+
+       int ret = TRUE;
+
+       switch (cur_state) {
+       case HEADER_MODE_OFF:
+       case HEADER_MODE_ACTIVATING:
+               INFO_LOG(UG_NAME_NORMAL, "wifi state power off/powering off");
+
+               ret = wlan_manager_request_power_on();
+               switch (ret){
+                       case WLAN_MANAGER_ERR_NONE:
+                               INFO_LOG(UG_NAME_NORMAL, "power on ok");
+                       case WLAN_MANAGER_ERR_MOBILE_HOTSPOT_OCCUPIED:
+                               viewer_manager_header_mode_set(HEADER_MODE_ACTIVATING);
+                               break;
+                       default:
+                               viewer_manager_header_mode_set(HEADER_MODE_OFF);
+               }
+               break;
+       case HEADER_MODE_ON:
+       case HEADER_MODE_CONNECTED:
+               INFO_LOG(UG_NAME_NORMAL, "wifi state power on/connected");
+               viewer_list_item_clear();
+               ret = wlan_manager_request_power_off();
+               switch (ret) {
+               case WLAN_MANAGER_ERR_NONE:
+                       viewer_manager_hide(VIEWER_WINSET_SUB_CONTENTS);
+                       viewer_manager_hide(VIEWER_WINSET_SEARCHING);
+                       viewer_manager_header_mode_set(HEADER_MODE_DEACTIVATING);
+                       break;
+               default:
+                       break;
+               }
+               break;
+       default:
+               INFO_LOG(UG_NAME_NORMAL, "powering on or scanning state, header is not working %d\n", cur_state);
+               break;
+       }
+
+       switch (ret) {
+       case WLAN_MANAGER_ERR_NONE:
+               break;
+       case WLAN_MANAGER_ERR_MOBILE_HOTSPOT_OCCUPIED:
+               winset_popup_mode_set(NULL, POPUP_MODE_POWER_ON_FAILED, POPUP_OPTION_POWER_ON_FAILED_MOBILE_HOTSPOT);
+               break;
+       default:
+               break;
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return TRUE;
+}
+
+static void _hide_finished_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       Elm_Object_Item* top_it = elm_naviframe_top_item_get(obj);
+
+       const char* title = elm_object_item_text_get((Elm_Object_Item*)data);
+       const char* title_top = elm_object_item_text_get(top_it);
+       
+       if(title == title_top) {
+               app_state->current_view = VIEW_MAIN;
+       }else if(!strcmp(title_top, "Password")) {
+               app_state->current_view = VIEW_PASSWORD;
+       }else if(!strcmp(title_top, sc(PACKAGE, I18N_TYPE_Hidden_AP))) {
+               app_state->current_view = VIEW_HIDDEN_AP;
+       }else if(!strcmp(title_top, sc(PACKAGE, I18N_TYPE_Static_IP))) {
+               app_state->current_view = VIEW_STATIC_IP;
+       }else if(!strcmp(title_top, sc(PACKAGE, I18N_TYPE_Dynamic_IP))) {
+               app_state->current_view = VIEW_DHCP_IP;
+       }else {
+               app_state->current_view = VIEW_DETAIL;
+       }
+}
+
+void _back_sk_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (app_state->bAlive == EINA_FALSE)
+               return;
+
+       int cur_state = -1;
+       cur_state = viewer_manager_header_mode_get();
+
+       if (app_state->bundle_back_button_show_force_when_connected == EINA_TRUE &&
+               cur_state != HEADER_MODE_CONNECTED){
+               winset_popup_mode_set(NULL, POPUP_MODE_ETC, POPUP_OPTION_ETC_BACK_ENABLE_WHEN_CONNECTED_ERROR);
+       } else {
+               wifi_exit();
+       }
+}
+
+void _refresh_sk_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       int cur_state = -1;
+       cur_state = viewer_manager_header_mode_get();
+
+       int ret = WLAN_MANAGER_ERR_NONE;
+
+       switch(cur_state){
+               case HEADER_MODE_OFF:
+                       power_control();
+                       break;
+               case HEADER_MODE_ON:
+               case HEADER_MODE_CONNECTED:
+                       ret = wlan_manager_request_scan();
+                       if(WLAN_MANAGER_ERR_NONE == ret) {
+                               viewer_manager_show(VIEWER_WINSET_SEARCHING);
+                               viewer_manager_header_mode_set(HEADER_MODE_SEARCHING);
+                       }
+                       break;
+               
+       }
+}
+
+static void _header_onoff_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       __COMMON_FUNC_ENTER__;
+       power_control();
+       __COMMON_FUNC_EXIT__;
+       return;
+}
+
+static char *_gl_header_text_get(void *data, Evas_Object *obj, const char *part)
+{
+       assertm_if(NULL == part, "NULL!!");
+
+       if (part != NULL) {
+               if (!strncmp(part, "elm.text", strlen(part))) {
+                       char* det = NULL;
+                       det = strdup(manager_object->header_text);
+                       assertm_if(NULL == det, "NULL!!");
+                       __COMMON_FUNC_EXIT__;
+                       return det; 
+               }
+       }
+
+       return NULL;
+}
+
+static Evas_Object *_gl_header_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       Evas_Object* ret = NULL;
+       assertm_if(NULL == part, "NULL!!");
+       assertm_if(NULL == obj, "NULL!!");
+       assertm_if(NULL == manager_object, "NULL!!");
+
+       Evas_Object *header_onoff = NULL;
+       if (!strncmp(part, "elm.icon", strlen(part))) {
+               switch (manager_object->header_mode) {
+               case HEADER_MODE_OFF:
+                       header_onoff = elm_check_add(obj);
+                       assertm_if(NULL == header_onoff, "NULL!!");
+
+                       evas_object_propagate_events_set(header_onoff, EINA_FALSE);
+                       elm_object_style_set(header_onoff, "on&off");
+                       elm_check_state_set(header_onoff, EINA_FALSE);
+                       evas_object_show(header_onoff);
+                       evas_object_smart_callback_add(header_onoff, "changed", (Evas_Smart_Cb)_header_onoff_cb, NULL);
+                       ret = header_onoff;
+                       break;
+               case HEADER_MODE_ON:
+               case HEADER_MODE_CONNECTED:
+                       header_onoff = elm_check_add(obj);
+                       assertm_if(NULL == header_onoff, "NULL!!");
+
+                       evas_object_propagate_events_set(header_onoff, EINA_FALSE);
+                       elm_object_style_set(header_onoff, "on&off");
+                       elm_check_state_set(header_onoff, EINA_TRUE);
+                       evas_object_show(header_onoff);
+                       evas_object_smart_callback_add(header_onoff, "changed", (Evas_Smart_Cb)_header_onoff_cb, NULL);
+                       ret = header_onoff;
+                       break;
+               default:
+                       break;
+               }
+       }
+
+       assertm_if(NULL == ret, "NULL!!");
+       return ret;
+}
+
+static char *_gl_bottom_text_get(void *data, Evas_Object *obj, const char *part)
+{
+       assertm_if(NULL == part, "NULL!!");
+
+       if (part != NULL) {
+               if (!strncmp(part, "elm.text", strlen(part))) {
+                       char* det = NULL;
+                       det = strdup(sc(PACKAGE, I18N_TYPE_Network_notification));
+                       assertm_if(NULL == det, "NULL!!");
+                       __COMMON_FUNC_EXIT__;
+                       return det;
+               }
+       }
+
+       return NULL;
+}
+
+static void _bottom_header_callback(void *data, Evas_Object *obj, void *event_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       int ret = -1;
+       int bottom_ret = (int)elm_check_state_get(obj);
+
+       INFO_LOG(UG_NAME_NORMAL, "bottom state[%d] is different", bottom_ret);
+
+       ret = wifi_setting_value_get(VCONFKEY_WIFI_ENABLE_QS);
+       switch (ret) {
+       case 1:
+               if (wifi_setting_value_set(VCONFKEY_WIFI_ENABLE_QS, VCONFKEY_WIFI_QS_DISABLE) < 0) {
+                       ERROR_LOG(UG_NAME_NORMAL, "Failed to set vconf - VCONFKEY_WIFI_QS_DISABLE");
+               }
+               break;
+       case 0:
+               if (wifi_setting_value_set(VCONFKEY_WIFI_ENABLE_QS, VCONFKEY_WIFI_QS_ENABLE) < 0) {
+                       ERROR_LOG(UG_NAME_NORMAL, "Failed to set vconf - VCONFKEY_WIFI_QS_ENABLE");
+               }
+               break;
+       default:
+               ERROR_LOG(UG_NAME_NORMAL, "Failed to get vconf value - VCONFKEY_WIFI_ENABLE_QS");
+               break;
+       }
+
+       __COMMON_FUNC_EXIT__;
+}
+
+static Evas_Object *_gl_bottom_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       __COMMON_FUNC_ENTER__;
+
+       assertm_if(NULL == obj, "NULL!!");
+
+       int ret = -1;
+       
+       Evas_Object* onoff = elm_check_add(obj);
+       elm_object_style_set(onoff, "on&off");
+
+       assertm_if(NULL == onoff, "NULL!!");
+
+       ret = wifi_setting_value_get(VCONFKEY_WIFI_ENABLE_QS);
+       switch (ret) {
+               case 1:
+                       elm_check_state_set(onoff, EINA_TRUE);
+                       break;
+               case 0:
+                       elm_check_state_set(onoff, EINA_FALSE);
+                       break;
+               default:
+                       assertm_if(TRUE, "Setting fail!!");
+                       break;
+       }
+
+       evas_object_smart_callback_add(onoff, "changed", (Evas_Smart_Cb)_bottom_header_callback, NULL);
+
+       __COMMON_FUNC_EXIT__;
+       return onoff;
+}
+
+static int _genlist_item_disable_later(void* data)
+{
+       if(NULL != data) {
+               elm_genlist_item_selected_set((Elm_Object_Item*) data, FALSE);
+       }
+       return FALSE;
+}
+
+static void _gl_header_sel_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       __COMMON_FUNC_ENTER__;
+       power_control();
+       ecore_idler_add( (Ecore_Task_Cb) _genlist_item_disable_later, manager_object->item_header);
+       __COMMON_FUNC_EXIT__;
+       return;
+}
+
+static void _gl_bottom_sel_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       __COMMON_FUNC_ENTER__;
+       _bottom_header_callback(data, obj, event_info);
+       ecore_idler_add( (Ecore_Task_Cb) _genlist_item_disable_later, manager_object->item_bottom);
+       elm_genlist_item_item_class_update((Elm_Object_Item*)event_info, &bottom_itc_text);
+       __COMMON_FUNC_EXIT__;
+       return;
+}
+
+static Evas_Object *_gl_hidden_btn_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       __COMMON_FUNC_ENTER__;
+
+       Evas_Object* ret = NULL;
+       assertm_if(NULL == part, "NULL!!");
+       assertm_if(NULL == obj, "NULL!!");
+
+       DEBUG_LOG(UG_NAME_NORMAL, "part [%s]", part);
+
+       if (!strncmp(part, "elm.icon", strlen(part))) {
+               ret = elm_button_add(obj);
+               assertm_if(NULL == ret, "NULL!!");
+
+               elm_object_text_set(ret, sc(PACKAGE, I18N_TYPE_Hidden_AP));
+       }
+
+       if (manager_object->item_hidden_btn != NULL) {
+               int state = elm_object_item_disabled_get(manager_object->item_hidden_btn);
+               elm_object_disabled_set(ret, state);
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return ret;
+}
+
+static void _hiddne_button_callback(void* data, Evas_Object* obj, void* event_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       viewer_manager_set_enabled_list_click(EINA_FALSE);
+       viewer_manager_set_enabled_list_update(EINA_FALSE);
+
+       view_ime_hidden();
+
+       ecore_idler_add((Ecore_Task_Cb)_genlist_item_disable_later, event_info);
+
+       __COMMON_FUNC_EXIT__;
+}
+
+int viewer_manager_header_create(Evas_Object* genlist)
+{
+       __COMMON_FUNC_ENTER__;
+
+       manager_object->header_text = NULL;
+       manager_object->header_text = strdup("Wi-Fi");
+       assertm_if(NULL == manager_object->header_text, "NULL!!");
+
+       header_itc.item_style = "dialogue/seperator";
+       header_itc.func.text_get = NULL;
+       header_itc.func.content_get = NULL;
+       header_itc.func.state_get = NULL;
+       header_itc.func.del = NULL;
+
+       header_itc_text.item_style = "dialogue/1text.1icon";
+       header_itc_text.func.text_get = _gl_header_text_get;
+       header_itc_text.func.content_get = _gl_header_content_get;
+       header_itc_text.func.state_get = NULL;
+       header_itc_text.func.del = NULL;
+
+       Elm_Object_Item* dialoguegroup = elm_genlist_item_append(genlist, &header_itc, NULL, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL);
+       assertm_if(NULL == dialoguegroup, "NULL!!");
+       elm_genlist_item_select_mode_set(dialoguegroup, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+
+       assertm_if(NULL != manager_object->item_header, "ERROR!!");
+       manager_object->item_header = elm_genlist_item_append(genlist, &header_itc_text, NULL, NULL, ELM_GENLIST_ITEM_NONE, _gl_header_sel_cb, NULL);
+       assertm_if(NULL == manager_object->item_header, "NULL!!");
+
+       __COMMON_FUNC_EXIT__;
+       return TRUE;
+}
+
+int viewer_manager_bottom_create(Evas_Object* genlist)
+{
+       __COMMON_FUNC_ENTER__;
+       assertm_if(NULL == genlist, "NULL!!");
+
+       bottom_itc.item_style = "grouptitle.dialogue.seperator";
+       bottom_itc.func.text_get = NULL;
+       bottom_itc.func.content_get = NULL;
+       bottom_itc.func.state_get = NULL;
+       bottom_itc.func.del = NULL;
+
+       bottom_itc_text.item_style = "dialogue/1text.1icon";
+       bottom_itc_text.func.text_get = _gl_bottom_text_get;
+       bottom_itc_text.func.content_get = _gl_bottom_content_get;
+       bottom_itc_text.func.state_get = NULL;
+       bottom_itc_text.func.del = NULL;
+
+       Elm_Object_Item* dialoguegroup = elm_genlist_item_append(genlist, &bottom_itc, NULL, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL);
+       assertm_if(NULL == dialoguegroup, "NULL!!");
+       elm_genlist_item_select_mode_set(dialoguegroup, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+
+       manager_object->item_bottom = elm_genlist_item_append(genlist, &bottom_itc_text, NULL, NULL, ELM_GENLIST_ITEM_NONE, _gl_bottom_sel_cb, NULL);
+       assertm_if(NULL == manager_object->item_bottom, "NULL!!");
+
+       __COMMON_FUNC_EXIT__;
+
+       return TRUE;
+}
+
+int viewer_manager_hidden_button_create(Evas_Object* genlist)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if(NULL != manager_object->item_sep_above_hidden_button ||
+               NULL != manager_object->item_sep_below_hidden_button ||
+               NULL != manager_object->item_hidden_btn) {
+
+               __COMMON_FUNC_EXIT__;
+               return FALSE;
+       }
+
+       assertm_if(NULL == genlist, "NULL!!");
+
+       hidden_button_seperator_itc.item_style = "dialogue/seperator";
+       hidden_button_seperator_itc.func.text_get = NULL;
+       hidden_button_seperator_itc.func.content_get = NULL;
+       hidden_button_seperator_itc.func.state_get = NULL;
+       hidden_button_seperator_itc.func.del = NULL;
+
+       hidden_button_itc.item_style = "dialogue/bg/1icon";
+       hidden_button_itc.func.text_get = NULL;
+       hidden_button_itc.func.content_get = _gl_hidden_btn_content_get;
+       hidden_button_itc.func.state_get = NULL;
+       hidden_button_itc.func.del = NULL;
+
+       manager_object->item_sep_above_hidden_button = elm_genlist_item_append(genlist, &hidden_button_seperator_itc, NULL, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL);
+       assertm_if(NULL == manager_object->item_sep_above_hidden_button, "NULL!!");
+       elm_genlist_item_select_mode_set(manager_object->item_sep_above_hidden_button, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+       
+       manager_object->item_hidden_btn = elm_genlist_item_append(genlist, &hidden_button_itc, NULL, NULL, ELM_GENLIST_ITEM_NONE, _hiddne_button_callback, NULL);
+       assertm_if(NULL == manager_object->item_hidden_btn, "NULL!!");
+
+       manager_object->item_sep_below_hidden_button = elm_genlist_item_append(genlist, &hidden_button_seperator_itc, NULL, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL);
+       assertm_if(NULL == manager_object->item_sep_below_hidden_button, "NULL!!");
+       elm_genlist_item_select_mode_set(manager_object->item_sep_below_hidden_button, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+
+       __COMMON_FUNC_EXIT__;
+       return TRUE;
+}
+
+Eina_Bool viewer_manager_scan_button_set(Eina_Bool show_state)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if(NULL == manager_object) {
+               __COMMON_FUNC_EXIT__;
+               return EINA_FALSE;
+       }
+       
+       if(show_state == EINA_TRUE) {
+               if(app_state->current_view == VIEW_MAIN) {
+                       INFO_LOG(UG_NAME_NORMAL,"Show directly");
+                       elm_object_item_disabled_set(manager_object->scan_button, EINA_FALSE);
+               } else {
+                       INFO_LOG(UG_NAME_NORMAL,"Show reserve");
+               }
+       } else if (show_state == EINA_FALSE) {
+               elm_object_item_disabled_set(manager_object->scan_button, EINA_TRUE);
+       }
+
+       __COMMON_FUNC_EXIT__;
+
+       return EINA_TRUE;
+}
+
+Evas_Object* viewer_manager_create(Evas_Object* _parent)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (manager_object != NULL || _parent == NULL) {
+               __COMMON_FUNC_EXIT__;
+               return NULL;
+       }
+
+       manager_object = (viewer_manager_object*) g_malloc0(sizeof(viewer_manager_object));
+       memset(manager_object, 0, sizeof(viewer_manager_object));
+
+       manager_object->list = NULL;
+       manager_object->current_selected_item = NULL;
+       manager_object->click_enabled = EINA_TRUE;
+       manager_object->update_enabled = EINA_TRUE;
+       manager_object->item_hidden_btn = NULL;
+       manager_object->item_sep_above_hidden_button = NULL;
+       manager_object->item_sep_below_hidden_button = NULL;
+       manager_object->item_header = NULL;
+
+       /* Add Full Layout */
+       Evas_Object* layout = elm_layout_add(_parent);
+       elm_layout_theme_set(layout, "layout", "application", "default");
+       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(_parent, layout);
+       edje_object_signal_emit(elm_layout_edje_get(layout), "elm,state,show,content", "elm");
+       edje_object_signal_emit(elm_layout_edje_get(layout), "elm,bg,show,group_list", "elm");
+       edje_object_signal_emit(elm_layout_edje_get(layout), "elm,state,show,indicator", "elm");
+
+       /* Add Naviframe */
+       manager_object->nav = elm_naviframe_add(layout);
+       elm_object_part_content_set(layout, "elm.swallow.content", manager_object->nav);
+
+       /* Add back button on Navigationbar */
+       Evas_Object* button_back = elm_button_add(manager_object->nav);
+
+       /* Add MainView Layout */
+       Evas_Object* view_content = elm_layout_add(manager_object->nav);
+       elm_layout_theme_set(view_content, "standard", "window", "integration");
+       edje_object_signal_emit(elm_layout_edje_get(view_content), "elm,state,show,content", "elm");
+       edje_object_signal_emit(elm_layout_edje_get(view_content), "elm,bg,show,group_list", "elm");
+
+       /* Add Conformant */
+       Evas_Object *conform = elm_conformant_add(manager_object->nav);
+       elm_object_style_set(conform, "internal_layout");
+       elm_object_part_content_set(view_content, "elm.swallow.content", conform);
+       evas_object_show(conform);
+
+       /* Add Genlist */
+       manager_object->list = viewer_list_create(manager_object->nav);
+       assertm_if(NULL == manager_object->list, "manager_object->list is NULL!!");
+       viewer_manager_header_create(manager_object->list);
+       viewer_manager_bottom_create(manager_object->list);
+       viewer_manager_hidden_button_create(manager_object->list);
+
+       elm_object_content_set(conform, manager_object->list);
+
+       /* Push in Navigationbar */
+       Elm_Object_Item* navi_it = elm_naviframe_item_push(manager_object->nav, sc(PACKAGE, I18N_TYPE_Wi_Fi), button_back, NULL, view_content, NULL);
+       evas_object_smart_callback_add(manager_object->nav, "transition,finished", (Evas_Smart_Cb)_hide_finished_cb, navi_it);
+
+       /* Add Toolbar */
+       Evas_Object *toolbar = elm_toolbar_add(manager_object->nav);
+       elm_toolbar_shrink_mode_set(toolbar, ELM_TOOLBAR_SHRINK_EXPAND);
+
+       manager_object->scan_button = elm_toolbar_item_append(toolbar, NULL, sc(PACKAGE, I18N_TYPE_Scan), _refresh_sk_cb, NULL);
+       elm_object_item_disabled_set(elm_toolbar_item_append(toolbar, NULL, "", NULL, NULL), EINA_TRUE);
+       elm_object_item_part_content_set(navi_it, "controlbar", toolbar);
+
+       elm_object_style_set(button_back, "naviframe/back_btn/default");
+       evas_object_smart_callback_add(button_back, "clicked", (Evas_Smart_Cb)_back_sk_cb, NULL);
+
+       evas_object_show(layout);
+
+       __COMMON_FUNC_EXIT__;
+       return layout;
+}
+
+Eina_Bool viewer_manager_destroy()
+{
+       __COMMON_FUNC_ENTER__;
+
+       viewer_list_destroy();
+
+       if (manager_object != NULL) {
+               g_free(manager_object);
+               manager_object = NULL;
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return EINA_TRUE;
+}
+
+Eina_Bool viewer_manager_show(VIEWER_WINSETS winset)
+{
+       __COMMON_FUNC_ENTER__;
+
+       assertm_if(NULL == manager_object, "NULL!!");
+
+       switch (winset) {
+       case VIEWER_WINSET_SEARCHING:
+               viewer_manager_scan_button_set(EINA_FALSE);
+               viewer_list_item_disable_all();
+               break;
+       case VIEWER_WINSET_SUB_CONTENTS:
+               assertm_if(NULL == manager_object->list, "NULL!!");
+               viewer_list_title_item_set(manager_object->item_bottom);
+               viewer_manager_hidden_button_create(manager_object->list);
+               break;
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return EINA_TRUE;
+}
+
+Eina_Bool viewer_manager_hide(VIEWER_WINSETS winset)
+{
+       __COMMON_FUNC_ENTER__;
+
+       switch (winset) {
+       case VIEWER_WINSET_SEARCHING:
+               /* searching view */
+               viewer_manager_scan_button_set(EINA_TRUE);
+               viewer_list_item_enable_all();
+               break;
+       case VIEWER_WINSET_SUB_CONTENTS:
+               /* hidden AP and WPS PBC */
+               viewer_list_title_item_del();
+               assertm_if(NULL == manager_object->item_sep_above_hidden_button, "NULL!!");
+               assertm_if(NULL == manager_object->item_sep_below_hidden_button, "NULL!!");
+               assertm_if(NULL == manager_object->item_hidden_btn, "NULL!!");
+               elm_object_item_del(manager_object->item_sep_above_hidden_button);
+               elm_object_item_del(manager_object->item_sep_below_hidden_button);
+               elm_object_item_del(manager_object->item_hidden_btn);
+               manager_object->item_sep_above_hidden_button = NULL;
+               manager_object->item_sep_below_hidden_button = NULL;
+               manager_object->item_hidden_btn = NULL;
+               break;
+       default:
+               /* Err */
+               assertm_if(TRUE, "Err!!");
+               break;
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return EINA_TRUE;
+}
+
+Eina_Bool viewer_manager_genlist_item_update(Elm_Object_Item* item)
+{
+       __COMMON_FUNC_ENTER__;
+       if (item == NULL) {
+               __COMMON_FUNC_EXIT__;
+               return EINA_FALSE;
+       }
+       
+       elm_genlist_item_update(item);
+
+       __COMMON_FUNC_EXIT__;
+       return EINA_FALSE;
+}
+
+static void viewer_manager_genlist_normal_callback(void* data, Evas_Object* obj, void* event_info)
+{
+       __COMMON_FUNC_ENTER__;
+       assertm_if(NULL == manager_object, "manager_object is NULL!!");
+       assertm_if(NULL == event_info, "event_info is NULL!!");
+       assertm_if(NULL == data, "data is NULL!!");
+       assertm_if(NULL == obj, "obj is NULL!!");
+
+       genlist_data* gdata = (genlist_data*) data;
+
+       if (manager_object->click_enabled == EINA_FALSE) {
+               INFO_LOG(UG_NAME_NORMAL, "normal callback cancel by proccesing something");
+               __COMMON_FUNC_EXIT__;
+               return;
+       }
+
+       DEBUG_LOG(UG_NAME_NORMAL, "event_info:[%s]", (char*) elm_object_style_get(obj));
+
+       radio_button_cb(gdata->device_info, obj, event_info);
+       elm_genlist_item_selected_set((Elm_Object_Item *)event_info, FALSE);
+
+       __COMMON_FUNC_EXIT__;
+       return;
+}
+
+Elm_Object_Item* viewer_manager_item_set(void* entry_data,
+                               const char* ssid,
+                               const char* ap_image_path,
+                               VIEWER_ITEM_RADIO_MODES mode,
+                               VIEWER_CALLBACK_TYPES type,
+                               void*callback_data)
+{
+       __COMMON_FUNC_ENTER__;
+
+       Elm_Object_Item *item = NULL;
+       assertm_if(NULL == manager_object, "manager_object is NULL!!");
+       assertm_if(NULL == manager_object->list, "manager_object->list is NULL!!");
+
+       switch (type) {
+       case VIEWER_CALLBACK_TYPE_NORMAL_LIST:
+               item = viewer_list_item_set(manager_object->list,
+                                       entry_data,
+                                       ssid,
+                                       ap_image_path,
+                                       mode,
+                                       viewer_manager_genlist_normal_callback,
+                                       callback_data);
+               break;
+       case VIEWER_CALLBACK_TYPE_NONE_AP_LIST:
+               item = viewer_list_item_set(manager_object->list,
+                                       entry_data,
+                                       ssid,
+                                       ap_image_path,
+                                       mode,
+                                       NULL,
+                                       callback_data);
+               elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+               break;
+       default:
+               break;
+       }
+
+       elm_genlist_item_update(item);
+
+       __COMMON_FUNC_EXIT__;
+       return item;
+}
+
+Elm_Object_Item *viewer_manager_current_selected_item_get(void)
+{
+       __COMMON_FUNC_ENTER__;
+
+       assertm_if(NULL == manager_object, "manager_object is NULL!!");
+       assertm_if(NULL == manager_object->current_selected_item, "manager_object->current_selected_item is NULL!!");
+
+       __COMMON_FUNC_EXIT__;
+       return manager_object->current_selected_item;
+}
+
+void viewer_manager_current_selected_item_set(Elm_Object_Item *item)
+{
+       __COMMON_FUNC_ENTER__;
+
+       assertm_if(NULL == manager_object, "manager_object is NULL!!");
+       assertm_if(NULL == item, "current is NULL!!");
+
+       manager_object->current_selected_item = item;
+
+       __COMMON_FUNC_EXIT__;
+}
+
+void viewer_manager_set_enabled_list_click(Eina_Bool enabled)
+{
+       __COMMON_FUNC_ENTER__;
+       if (manager_object == NULL)
+               return;
+       manager_object->click_enabled = enabled;
+       __COMMON_FUNC_EXIT__;
+}
+
+void viewer_manager_set_enabled_list_update(Eina_Bool enabled)
+{
+       __COMMON_FUNC_ENTER__;
+       if (manager_object == NULL)
+               return;
+       manager_object->update_enabled = enabled;
+       __COMMON_FUNC_EXIT__;
+}
+
+int viewer_manager_item_radio_mode_all_reset()
+{
+       __COMMON_FUNC_ENTER__;
+
+       Elm_Object_Item *gli = viewer_list_item_first_get(manager_object->list);
+       int searched_device_num = wlan_manager_profile_scanned_length_get();
+       int i=0;
+
+       for (i=0; i<searched_device_num; i++) {
+               viewer_manager_item_radio_mode_set(NULL, gli , VIEWER_ITEM_RADIO_MODE_OFF);
+               gli = viewer_list_item_next_get(gli);
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return TRUE;
+}
+
+int viewer_manager_item_radio_mode_set(void* object, Elm_Object_Item* item, VIEWER_ITEM_RADIO_MODES mode)
+{
+       assertm_if(NULL == manager_object, "manager_object is NULL!!");
+       assertm_if(NULL == item, "item is NULL!!");
+
+       if (NULL == item) {
+               return FALSE;
+       }
+
+       INFO_LOG(UG_NAME_NORMAL, "radio mode %d\n", mode);
+        
+       genlist_data* gdata = (genlist_data*) viewer_list_item_data_get(item, "data");
+       if (NULL == gdata) {
+               return FALSE;
+       }
+       gdata->radio_mode = mode;
+
+       DEBUG_LOG(UG_NAME_NORMAL, "ssid:[%s], radiomode:[%d]", gdata->ssid, gdata->radio_mode);
+
+       switch (mode) {
+       case VIEWER_ITEM_RADIO_MODE_NULL:
+               INFO_LOG(UG_NAME_NORMAL, "radio mode NULL");
+               manager_object->click_enabled = EINA_TRUE;
+               break;
+
+       case VIEWER_ITEM_RADIO_MODE_OFF:
+               INFO_LOG(UG_NAME_NORMAL, "radio mode off");
+               manager_object->click_enabled = EINA_TRUE;
+               break;
+
+       case VIEWER_ITEM_RADIO_MODE_CONNECTED:
+               INFO_LOG(UG_NAME_NORMAL, "radio mode connected");
+               manager_object->click_enabled = EINA_TRUE;
+               break;
+
+       case VIEWER_ITEM_RADIO_MODE_CONNECTING:
+               INFO_LOG(UG_NAME_NORMAL, "radio mode connecting");
+               manager_object->click_enabled = EINA_TRUE;
+               break;
+
+       case VIEWER_ITEM_RADIO_MODE_CANCEL_CONNECTING:
+               INFO_LOG(UG_NAME_NORMAL, "radio mode cancel connecting");
+               manager_object->click_enabled = EINA_FALSE;
+               break;
+
+       case VIEWER_ITEM_RADIO_MODE_DISCONNECTING:
+               INFO_LOG(UG_NAME_NORMAL, "radio mode disconnecting");
+               manager_object->click_enabled = EINA_FALSE;
+               break;
+
+       default:
+               INFO_LOG(UG_NAME_NORMAL, "unsupported modea [%d]", mode);
+               break;
+       }
+
+       viewer_list_item_data_set(item, "data", gdata);
+       elm_genlist_item_update(item);
+
+       return TRUE;
+}
+
+int viewer_manager_hidden_disable_set(int mode)
+{
+       __COMMON_FUNC_ENTER__;
+       assertm_if(NULL == manager_object->item_hidden_btn, "NULL!!");
+       
+       elm_object_item_disabled_set(manager_object->item_hidden_btn, mode);
+       elm_genlist_item_update(manager_object->item_hidden_btn);
+
+       __COMMON_FUNC_EXIT__;
+       return TRUE;
+}
+
+void viewer_manager_scroll_to_top()
+{
+       if (manager_object->item_header == NULL)
+               return;
+
+       ecore_idler_add((Ecore_Task_Cb)elm_genlist_item_bring_in, manager_object->item_header);
+}
+
+int viewer_manager_header_mode_set(HEADER_MODES mode)
+{
+       __COMMON_FUNC_ENTER__;
+
+       assertm_if(NULL == manager_object, "NULL!!");
+       assertm_if(NULL == manager_object->item_header, "NULL!!");
+       assertm_if(HEADER_MODE_OFF > mode || HEADER_MODE_MAX <= mode, "Err!!");
+
+       DEBUG_LOG(UG_NAME_NORMAL, "mode [%d]", mode);
+       manager_object->header_mode = mode;
+
+       if (NULL != manager_object->header_text) {
+               g_free(manager_object->header_text);
+               manager_object->header_text = NULL;
+       }
+
+       char buf[30] = {0,};
+       switch (mode) {
+               case HEADER_MODE_OFF:
+                       viewer_manager_hidden_disable_set(FALSE);
+                       viewer_manager_scan_button_set(EINA_TRUE);
+                       manager_object->header_text = strdup(sc(PACKAGE, I18N_TYPE_Wi_Fi));
+                       break;
+               case HEADER_MODE_ON:
+                       viewer_manager_hidden_disable_set(FALSE);
+                       viewer_manager_scan_button_set(EINA_TRUE);
+                       manager_object->header_text = strdup(sc(PACKAGE, I18N_TYPE_Wi_Fi));
+                       break;
+               case HEADER_MODE_ACTIVATING:
+                       viewer_manager_hidden_disable_set(TRUE);
+                       snprintf(buf, sizeof(buf), "%s %s", sc(PACKAGE, I18N_TYPE_Wi_Fi), sc(PACKAGE, I18N_TYPE_Activating));
+                       manager_object->header_text = strdup(buf);
+                       break;
+               case HEADER_MODE_CONNECTING:
+                       viewer_manager_hidden_disable_set(TRUE);
+                       snprintf(buf, sizeof(buf), "%s %s", sc(PACKAGE, I18N_TYPE_Wi_Fi), sc(PACKAGE, I18N_TYPE_Connecting));
+                       manager_object->header_text = strdup(buf);
+                       break;
+               case HEADER_MODE_CONNECTED:
+                       viewer_manager_hidden_disable_set(FALSE);
+                       viewer_manager_scan_button_set(EINA_TRUE);
+                       snprintf(buf, sizeof(buf), "%s %s", sc(PACKAGE, I18N_TYPE_Wi_Fi), sc(PACKAGE, I18N_TYPE_Connected));
+                       manager_object->header_text = strdup(buf);
+                       break;
+               case HEADER_MODE_DISCONNECTING:
+                       viewer_manager_hidden_disable_set(TRUE);
+                       snprintf(buf, sizeof(buf), "%s %s", sc(PACKAGE, I18N_TYPE_Wi_Fi), sc(PACKAGE, I18N_TYPE_Disconnecting));
+                       manager_object->header_text = strdup(buf);
+                       break;
+               case HEADER_MODE_DEACTIVATING:
+                       viewer_manager_hidden_disable_set(TRUE);
+                       snprintf(buf, sizeof(buf), "%s %s", sc(PACKAGE, I18N_TYPE_Wi_Fi), sc(PACKAGE, I18N_TYPE_Deactivating));
+                       manager_object->header_text = strdup(buf);
+                       break;
+               case HEADER_MODE_CANCEL_CONNECTING:
+                       viewer_manager_hidden_disable_set(TRUE);
+                       manager_object->header_text = strdup("Wi-Fi cancel connecting...");
+                       break;
+               case HEADER_MODE_SEARCHING:
+                       viewer_manager_hidden_disable_set(TRUE);
+                       snprintf(buf, sizeof(buf), "%s %s", sc(PACKAGE, I18N_TYPE_Wi_Fi), sc(PACKAGE, I18N_TYPE_Searching));
+                       manager_object->header_text = strdup(buf);
+                       break;
+               default:
+                       assertm_if(TRUE, "Err!!");
+                       break;
+       }
+
+       elm_genlist_item_update(manager_object->item_header);
+
+       __COMMON_FUNC_EXIT__;
+
+       return TRUE;
+}
+
+HEADER_MODES viewer_manager_header_mode_get(void){
+       __COMMON_FUNC_ENTER__;
+       assertm_if(HEADER_MODE_OFF > manager_object->header_mode || 
+                       HEADER_MODE_MAX <= manager_object->header_mode, "Err!");
+       __COMMON_FUNC_EXIT__;
+
+       return manager_object->header_mode;
+}
+
+Evas_Object* viewer_manager_get_naviframe()
+{
+       return manager_object->nav;
+}
+
+static char* viewer_manager_get_device_icon(int security_mode, int rssi)
+{
+       char tmp_str[128] = {0,};
+       char *ret;
+
+       sprintf(tmp_str, "%s/37_wifi_icon", WIFI_APP_IMAGE_DIR);
+
+       if (security_mode != WLAN_SEC_MODE_NONE) {
+               sprintf(tmp_str,"%s_lock", tmp_str);
+       }
+
+       switch (wlan_manager_get_signal_strength(rssi)) {
+       case SIGNAL_STRENGTH_TYPE_EXCELLENT:
+               sprintf(tmp_str,"%s_03", tmp_str);
+               break;
+       case SIGNAL_STRENGTH_TYPE_GOOD:
+               sprintf(tmp_str,"%s_02", tmp_str);
+               break;
+       case SIGNAL_STRENGTH_TYPE_WEAK:
+               sprintf(tmp_str,"%s_01", tmp_str);
+               break;
+       case SIGNAL_STRENGTH_TYPE_VERY_WEAK:
+       case SIGNAL_STRENGTH_TYPE_NULL:
+               sprintf(tmp_str,"%s_00", tmp_str);
+               break;
+       }
+
+       sprintf(tmp_str, "%s.png", tmp_str);
+       
+       ret = strdup(tmp_str);
+       return ret;
+}
+
+static void viewer_manager_update_list_one(net_profile_info_t *profile_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       wifi_device_info_t *wifi_device = (wifi_device_info_t*)malloc(sizeof(wifi_device_info_t));
+       memset(wifi_device, 0, sizeof(wifi_device_info_t));
+
+       wifi_device->profile_name = strdup(profile_info->ProfileName);
+       wifi_device->ssid = strdup(profile_info->ProfileInfo.Wlan.essid);
+       wifi_device->rssi = (int)profile_info->ProfileInfo.Wlan.Strength;
+       wifi_device->security_mode = (int)profile_info->ProfileInfo.Wlan.security_info.sec_mode;
+       wifi_device->wps_mode = (int)profile_info->ProfileInfo.Wlan.security_info.wps_support;
+
+       char *ap_image = NULL;
+       VIEWER_ITEM_RADIO_MODES mode = VIEWER_ITEM_RADIO_MODE_NULL;
+       ap_image = viewer_manager_get_device_icon(wifi_device->security_mode, wifi_device->rssi);
+       mode = VIEWER_ITEM_RADIO_MODE_NULL;
+
+       if (ap_image != NULL) {
+               viewer_manager_item_set(wifi_device, wifi_device->ssid, ap_image, mode, VIEWER_CALLBACK_TYPE_NORMAL_LIST, wifi_device);
+               g_free(ap_image);
+       }
+
+       __COMMON_FUNC_EXIT__;
+}
+
+static void viewer_manager_update_list_one_connected(net_profile_info_t *profile_info, const char *connected_ssid)
+{
+       __COMMON_FUNC_ENTER__;
+
+       wifi_device_info_t *wifi_device = (wifi_device_info_t*)malloc(sizeof(wifi_device_info_t));
+       memset(wifi_device, 0, sizeof(wifi_device_info_t));
+
+       wifi_device->profile_name = strdup(profile_info->ProfileName);
+       wifi_device->ssid = strdup(profile_info->ProfileInfo.Wlan.essid);
+       wifi_device->rssi = (int)profile_info->ProfileInfo.Wlan.Strength;
+       wifi_device->security_mode = (int)profile_info->ProfileInfo.Wlan.security_info.sec_mode;
+       wifi_device->wps_mode = (int)profile_info->ProfileInfo.Wlan.security_info.wps_support;
+
+       char *ap_image = NULL;
+       VIEWER_ITEM_RADIO_MODES mode = VIEWER_ITEM_RADIO_MODE_NULL;
+       if (strcmp(wifi_device->ssid, connected_ssid) == 0) {
+               INFO_LOG(UG_NAME_NORMAL, "update ssid [%s] : connected\n", wifi_device->ssid);
+               viewer_manager_header_mode_set(HEADER_MODE_CONNECTED);
+               ap_image = viewer_manager_get_device_icon(wifi_device->security_mode, wifi_device->rssi);
+               mode = VIEWER_ITEM_RADIO_MODE_CONNECTED;
+       } else {
+               INFO_LOG(UG_NAME_NORMAL, "update ssid [%s]\n", wifi_device->ssid);
+               ap_image = viewer_manager_get_device_icon(wifi_device->security_mode, wifi_device->rssi);
+               mode = VIEWER_ITEM_RADIO_MODE_NULL;
+       }
+
+       if (ap_image != NULL) {
+               viewer_manager_item_set(wifi_device, wifi_device->ssid, ap_image, mode, VIEWER_CALLBACK_TYPE_NORMAL_LIST, wifi_device);
+               g_free(ap_image);
+       }
+
+       __COMMON_FUNC_EXIT__;
+}
+
+static void viewer_manager_update_list_all()
+{
+       int i = 0;
+       struct wifi_appdata *ad = app_state;
+
+       __COMMON_FUNC_ENTER__;
+
+       viewer_list_item_clear();
+
+       net_profile_info_t *profiles_list = wlan_manager_profile_table_get();
+       if (profiles_list == NULL)
+               return;
+
+       int profiles_list_size = wlan_manager_profile_scanned_length_get();
+       INFO_LOG(UG_NAME_NORMAL, "profiles list count [%d]\n", profiles_list_size);
+
+       if (profiles_list_size > 0) {
+               const char *connected_ssid = wlan_manager_get_connected_ssid();
+               INFO_LOG(UG_NAME_NORMAL, "connected ssid [%s]\n", connected_ssid);
+               if (connected_ssid == NULL) {
+                       for (i = 0; i < profiles_list_size; i++) {
+                               viewer_manager_update_list_one(profiles_list+i);
+                       }
+               } else {
+                       for (i = 0; i < profiles_list_size; i++) {
+                               viewer_manager_update_list_one_connected(profiles_list+i, connected_ssid);
+                       }
+               }
+       } else if (profiles_list_size == 0) {
+               /* if there is no scan_data, generate No-AP item */
+               wifi_device_info_t *device_info = NULL;
+               device_info = (wifi_device_info_t *)wlan_manager_profile_device_info_blank_create();
+               const char* ssid_name = device_info->ssid;
+               const char* ap_image = NULL;
+               viewer_manager_item_set(device_info, ssid_name, ap_image, VIEWER_ITEM_RADIO_MODE_NULL, VIEWER_CALLBACK_TYPE_NONE_AP_LIST, ad);
+       } else {
+               ERROR_LOG(UG_NAME_NORMAL, "Err!");
+       }
+
+       __COMMON_FUNC_EXIT__;
+}
+
+Eina_Bool viewer_manager_refresh(int is_scan)
+{
+       INFO_LOG(UG_NAME_SCAN, "UI update start");
+
+       if (manager_object == NULL)
+               return EINA_FALSE;
+
+       if (manager_object->update_enabled == EINA_FALSE) {
+               INFO_LOG(UG_NAME_SCAN, "UI update disabled");
+               return EINA_FALSE;
+       }
+
+       if (is_scan) {
+               viewer_manager_hide(VIEWER_WINSET_SEARCHING);
+               viewer_manager_header_mode_set(HEADER_MODE_ON);
+               viewer_manager_update_list_all();
+       } else {
+               viewer_manager_update_list_all();
+
+               char profile_name[NET_PROFILE_NAME_LEN_MAX+1] = "";
+               if (wlan_manager_state_get(profile_name) == WLAN_MANAGER_CONNECTING) {
+                       Elm_Object_Item* target_item = item_get_for_profile_name(profile_name);
+                       viewer_manager_header_mode_set(HEADER_MODE_CONNECTING);
+                       viewer_manager_item_radio_mode_set(NULL, target_item, VIEWER_ITEM_RADIO_MODE_CONNECTING);
+               }
+       }
+
+       INFO_LOG(UG_NAME_SCAN, "UI update finish");
+
+       return EINA_TRUE;
+}
diff --git a/sources/ui-gadget/viewers-layout/wifi_viewer_list.c b/sources/ui-gadget/viewers-layout/wifi_viewer_list.c
new file mode 100644 (file)
index 0000000..48ce526
--- /dev/null
@@ -0,0 +1,583 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#include "common.h"
+#include "wifi.h"
+#include "wlan_manager.h"
+#include "wifi-ui-list-callbacks.h"
+#include "viewer_list.h"
+#include "viewer_manager.h"
+#include "appcoreWrapper.h"
+#include "i18nmanager.h"
+
+
+static Evas_Object* viewer_list = NULL;
+static GSList* container = NULL;
+
+static Elm_Genlist_Item_Class itc;
+static Elm_Genlist_Item_Class grouptitle_itc;
+static Elm_Object_Item* grouptitle=NULL;
+
+
+static char* _gl_listview_text_get(void *data, Evas_Object *obj, const char *part)
+{
+       assertm_if(NULL == obj, "NULL!!");
+       assertm_if(NULL == part, "NULL!!");
+       assertm_if(NULL == data, "NULL!!");
+
+       genlist_data* gdata = (genlist_data*) data;
+       assertm_if(NULL == gdata, "NULL!!");
+       assertm_if(NULL == gdata->ssid, "NULL!!");
+
+       char* det = (char*) strdup(gdata->ssid);
+       assertm_if(NULL == det, "NULL!!");
+
+       return det;
+}
+
+static Evas_Object *_gl_listview_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       assertm_if(NULL == obj, "NULL!!");
+       assertm_if(NULL == data, "NULL!!");
+       assertm_if(NULL == part, "NULL!!");
+
+       genlist_data* gdata = (genlist_data*) data;
+       Evas_Object* icon = NULL;
+
+       if (!strncmp(part, "elm.icon.1", strlen(part))) {
+               if (gdata->ap_image_path == NULL) {
+                       return NULL;
+               }
+
+               icon = elm_radio_add(obj);
+               assertm_if(NULL == icon, "NULL!!");
+
+               switch (gdata->radio_mode) {
+               case VIEWER_ITEM_RADIO_MODE_CONNECTED:
+                       elm_radio_state_value_set(icon, 0);
+                       break;
+               case VIEWER_ITEM_RADIO_MODE_OFF:
+               case VIEWER_ITEM_RADIO_MODE_NULL:
+               case VIEWER_ITEM_RADIO_MODE_CONNECTING:
+               case VIEWER_ITEM_RADIO_MODE_CANCEL_CONNECTING:
+               case VIEWER_ITEM_RADIO_MODE_DISCONNECTING:
+                       elm_radio_state_value_set(icon, 1);
+                       break;
+               default:
+                       assertm_if(TRUE, "Err!");
+                       break;
+               }
+
+               Evas_Object *fake_icon = appcore_load_edj(obj, WIFI_UG_FAKE_ICON_PATH, "fake_radio");
+               elm_object_part_content_set(fake_icon, "radio", icon);
+
+               return fake_icon;
+
+       } else if (!strncmp(part, "elm.icon.2", strlen(part))) {
+               /* if there is no ap_image_path (NO AP Found situlation) */
+               if (gdata->ap_image_path == NULL) {
+                       return NULL;
+               }
+
+               switch (gdata->radio_mode) {
+               case VIEWER_ITEM_RADIO_MODE_OFF:
+               case VIEWER_ITEM_RADIO_MODE_NULL:
+               case VIEWER_ITEM_RADIO_MODE_CONNECTED:
+                       /* for strength */
+                       icon = elm_icon_add(obj);
+                       assertm_if(NULL == icon, "NULL!!");
+                       if(NULL != gdata->ap_image_path) {
+                               elm_icon_file_set(icon, gdata->ap_image_path, NULL);
+                       }
+                       evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+                       return icon;
+
+               case VIEWER_ITEM_RADIO_MODE_CONNECTING:
+               case VIEWER_ITEM_RADIO_MODE_CANCEL_CONNECTING:
+               case VIEWER_ITEM_RADIO_MODE_DISCONNECTING:
+                       /* for processing animation */
+                       icon = elm_progressbar_add(obj);
+                       assertm_if(NULL == icon, "NULL!!");
+                       elm_object_style_set(icon, "list_process");
+                       evas_object_size_hint_align_set(icon, EVAS_HINT_FILL, 0.5);
+                       evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+                       elm_progressbar_pulse(icon, EINA_TRUE);
+                       return icon;
+
+               default:
+                       assertm_if(TRUE, "Err!");
+                       break;
+               }
+       } else if (!strncmp(part, "elm.icon.3", strlen(part))) {
+               /* if there is no ap_image_path (NO AP Found situlation) */
+               if (gdata->ap_image_path == NULL) {
+                       return NULL;
+               }
+
+               icon = elm_button_add(obj);
+               assertm_if(NULL == icon, "NULL!!");
+               elm_object_style_set(icon, "reveal");
+               evas_object_smart_callback_add(icon, "clicked", (Evas_Smart_Cb)list_select_cb, gdata->device_info);
+               evas_object_propagate_events_set(icon, EINA_FALSE);
+               return icon;
+       }
+
+       return NULL;
+}
+
+static void _gl_listview_del(void* data, Evas_Object* obj)
+{
+       if (data == NULL)
+               return;
+
+       genlist_data* gdata = (genlist_data*) data;
+       assertm_if(NULL == gdata->ssid, "NULL!!");
+
+       DEBUG_LOG(UG_NAME_NORMAL, "del target ssid:[%s]", gdata->ssid);
+
+       g_free(gdata->device_info);
+       g_free(gdata);
+
+       return;
+}
+
+static char* _gl_text_title_get(void *data, Evas_Object *obj, const char *part)
+{
+       assertm_if(NULL == obj, "NULL!!");
+       assertm_if(NULL == part, "NULL!!");
+
+       if (part != NULL) {
+               if (!strncmp(part, "elm.text", strlen(part))) {
+                       return (char*) strdup(sc(PACKAGE, I18N_TYPE_Select_network));
+               }
+       }
+
+       return NULL;
+}
+
+Evas_Object* viewer_list_create(Evas_Object *win)
+{
+       __COMMON_FUNC_ENTER__;
+
+       assertm_if(NULL == win, "NULL!!");
+
+       assertm_if(NULL != viewer_list, "Err!!");
+       viewer_list = elm_genlist_add(win);
+       assertm_if(NULL == viewer_list, "NULL!!");
+
+       elm_genlist_mode_set(viewer_list, ELM_LIST_LIMIT);
+       evas_object_size_hint_weight_set(viewer_list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(viewer_list, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+       container = NULL;
+       container = g_slist_alloc();
+       assertm_if(NULL == container, "NULL!!");
+
+       itc.item_style = "dialogue/1text.3icon";
+       itc.func.text_get = _gl_listview_text_get;
+       itc.func.content_get = _gl_listview_content_get;
+       itc.func.state_get = NULL;
+       itc.func.del = _gl_listview_del;
+
+       __COMMON_FUNC_EXIT__;
+       return viewer_list;
+}
+
+int viewer_list_destroy(void)
+{
+       __COMMON_FUNC_ENTER__;
+
+       assertm_if(NULL == viewer_list, "NULL!!");
+       viewer_list_item_clear();
+       evas_object_del(viewer_list);
+
+       viewer_list = NULL;
+
+       __COMMON_FUNC_EXIT__;
+       return TRUE;
+}
+
+void viewer_list_title_item_del()
+{
+       if (grouptitle) {
+               elm_object_item_del(grouptitle);
+               grouptitle = NULL;
+       }
+}
+
+int viewer_list_title_item_set(Elm_Object_Item *target)
+{
+       if (viewer_list_item_size_get() == 0) {
+
+               grouptitle_itc.item_style = "grouptitle.dialogue";
+               grouptitle_itc.func.text_get = _gl_text_title_get;
+               grouptitle_itc.func.content_get = NULL;
+               grouptitle_itc.func.state_get = NULL;
+               grouptitle_itc.func.del = NULL;
+
+               assertm_if(NULL != grouptitle, "Err!!");
+
+               grouptitle = elm_genlist_item_insert_after(viewer_list,
+                               &grouptitle_itc,
+                               NULL,
+                               NULL,
+                               target,
+                               ELM_GENLIST_ITEM_NONE,
+                               NULL,
+                               NULL);
+
+               assertm_if(NULL == grouptitle, "NULL!!");
+
+               elm_genlist_item_select_mode_set(grouptitle, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+
+               return TRUE;
+       } else {
+               return FALSE;
+       }
+}
+
+Elm_Object_Item* viewer_list_item_set(Evas_Object* list,
+                       void* list_data, 
+                       const char* ssid,
+                       const char* ap_image_path,
+                       VIEWER_ITEM_RADIO_MODES mode,
+                       void (*callback_func)(void*data,Evas_Object*obj,void*event_info), 
+                       void*callback_data){
+
+       Elm_Object_Item* ret = NULL;
+
+       assertm_if(NULL == list, "NULL!!");
+       assertm_if(NULL == list_data, "NULL!!");
+       assertm_if(NULL == ssid, "NULL!!");
+       /* FIX ME LATER - NOT TO USE VIEWER_ITEM_RADIO_MODE_NULL */
+       //assertm_if(VIEWER_ITEM_RADIO_MODE_NULL >= mode || VIEWER_ITEM_RADIO_MODE_MAX <= mode, "Wrong mode");
+       /*assertm_if(NULL == ap_image_path, "NULL!!");*/ // It can be NULL when it is NO-AP
+       assertm_if(NULL == callback_func, "NULL!!");
+       assertm_if(NULL == callback_data, "NULL!!");
+
+       genlist_data* gdata = NULL;
+       gdata = (genlist_data*) malloc(sizeof(genlist_data));
+       assertm_if(NULL == gdata, "NULL!!");
+       memset(gdata, 0, sizeof(genlist_data));
+
+       gdata->ssid = (char*) strdup( ssid );
+       if(NULL != ap_image_path) {
+               gdata->ap_image_path = (char*) strdup(ap_image_path);
+       } else {
+               gdata->ap_image_path = NULL;
+       }
+       gdata->device_info = (wifi_device_info_t *)list_data;
+
+       DEBUG_LOG(UG_NAME_NORMAL, "ssid[%s] image[%s]", ssid, ap_image_path);
+
+       Elm_Object_Item* target = NULL;
+
+       int count = viewer_list_item_size_get();
+
+       if (0 == count || VIEWER_ITEM_RADIO_MODE_CONNECTED == mode) {
+               DEBUG_LOG(UG_NAME_NORMAL, "first added AP item!");
+               target = grouptitle;
+       } else {
+               DEBUG_LOG(UG_NAME_NORMAL, "current size [%d]", count);
+               int last_index = count - 1;
+               target = viewer_list_item_at_index(last_index);
+       }
+
+       ret = elm_genlist_item_insert_after(
+                       viewer_list, /*obj*/
+                       &itc,/*itc*/
+                       gdata,/*data*/
+                       NULL,/*parent*/
+                       target, //grouptitle, //target, , /*after than*/
+                       ELM_GENLIST_ITEM_NONE, /*flags*/
+                       callback_func,/*func*/
+                       gdata);/*func_data*/
+
+       assertm_if(NULL == ret, "NULL!!");
+               
+       gdata->callback_data = callback_data;
+       gdata->radio_mode = mode;
+
+       elm_object_item_data_set(ret, gdata);
+
+       if (mode == VIEWER_ITEM_RADIO_MODE_CONNECTED) {
+               g_slist_insert(container, ret, 1);
+       } else {
+               container = g_slist_append(container, ret);
+       }
+
+       DEBUG_LOG(UG_NAME_NORMAL,
+                       "* item add complete ssid:[%s] size:[%d]",
+                       ssid,
+                       viewer_list_item_size_get());
+
+       return ret;
+}
+
+int viewer_list_item_size_get()
+{
+       __COMMON_FUNC_ENTER__;
+       assertm_if(NULL == container, "NULL!!");
+
+       int ret = g_slist_length(container);
+       ret = ret - 1;
+       if (ret < 0) {
+               ret = 0;
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return ret;
+}
+
+int viewer_list_item_clear()
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (viewer_list == NULL) {      
+               return TRUE;
+       }
+
+       int size = viewer_list_item_size_get();
+       if(0 == size){
+               DEBUG_LOG(UG_NAME_NORMAL, "header only");
+               __COMMON_FUNC_EXIT__;
+               return TRUE;
+       }
+
+       int index = 0;
+
+       DEBUG_LOG(UG_NAME_NORMAL, "list item size [%d]", size);
+
+       /* remove AP items (size) */
+       Elm_Object_Item* det = NULL;
+
+       for (index = 0; index < size; index++) {
+               DEBUG_LOG(UG_NAME_NORMAL, "* remove");
+               det = viewer_list_item_at_index(index);
+               assertm_if(NULL == det, "NULL!!");
+
+               genlist_data* gdata = viewer_list_item_data_get(det, "data");
+               assertm_if(NULL == gdata, "NULL!!");
+
+               DEBUG_LOG(UG_NAME_NORMAL,"remove ssid:[%s]", gdata->device_info->ssid);
+               elm_object_item_del(det);
+       }
+
+       g_slist_free(container);
+       container = g_slist_alloc();
+
+       __COMMON_FUNC_EXIT__;
+       return TRUE;
+}
+
+Elm_Object_Item* viewer_list_item_at_index(int index)
+{
+       __COMMON_FUNC_ENTER__;
+
+       int size = viewer_list_item_size_get();
+
+       assertm_if(0 > size, "query error! (i == zero base)");
+       DEBUG_LOG(UG_NAME_NORMAL, "(index_to_get:%d total:%d)", index, size); 
+
+       Elm_Object_Item *gli = NULL;
+       gli = (Elm_Object_Item*) g_slist_nth_data(container, index+1);
+       assertm_if(NULL == gli, "NULL!!");
+
+       genlist_data* gdata = NULL;
+       gdata = viewer_list_item_data_get(gli, "data");
+       assertm_if(NULL == gdata, "NULL!!");
+
+       INFO_LOG(UG_NAME_NORMAL,"selected_gli ssid:[%s]", gdata->device_info->ssid);
+
+       __COMMON_FUNC_EXIT__;
+       return gli;
+}
+
+int viewer_list_item_selected_set(Elm_Object_Item* item, int state)
+{
+       __COMMON_FUNC_ENTER__;
+       assertm_if(NULL == item, "NULL!!");
+       elm_genlist_item_selected_set(item, state);
+       __COMMON_FUNC_EXIT__;
+
+       return TRUE;
+}
+
+Elm_Object_Item* viewer_list_item_first_get(Evas_Object* list)
+{
+       __COMMON_FUNC_ENTER__;
+
+       Elm_Object_Item* ret=NULL;
+       ret = (Elm_Object_Item*) g_slist_nth_data(container, 1);
+       assertm_if(NULL == ret, "NULL!!");
+
+       __COMMON_FUNC_EXIT__;
+       return ret;
+}
+
+Elm_Object_Item* viewer_list_item_next_get(const Elm_Object_Item* current)
+{
+       assertm_if(NULL == current, "NULL!!");
+       Elm_Object_Item* ret=NULL;
+       ret = elm_genlist_item_next_get(current);
+       assertm_if(NULL == ret, "NULL!!");
+
+       return ret;
+}
+
+int viewer_list_item_data_set(Elm_Object_Item* item, const char* key, void* data)
+{
+       assertm_if(NULL == item, "NULL!!");
+       if(NULL == item) {
+               ERROR_LOG(UG_NAME_NORMAL, "Err!");
+               return FALSE;
+       }
+       assertm_if(NULL == key, "NULL!!");
+       if(NULL == key) {
+               ERROR_LOG(UG_NAME_NORMAL, "Err!");
+               return FALSE;
+       }
+
+       genlist_data* gdata = NULL;
+       gdata = elm_object_item_data_get(item);
+       if(NULL == gdata) {
+               ERROR_LOG(UG_NAME_NORMAL, "Err!");
+               return FALSE;
+       }
+
+       assertm_if(NULL == gdata, "NULL!!");
+
+       DEBUG_LOG(UG_NAME_REQ, "dataset ssid:[%s] key:[%s]", gdata->device_info->ssid, key);
+
+       if (strncmp(key, "data", strlen(key)) == 0) {
+               genlist_data* g_data = (genlist_data*)data;
+               gdata->radio_mode = g_data->radio_mode;
+               elm_object_item_data_set(item, gdata);
+               g_data = elm_object_item_data_get(item);
+               DEBUG_LOG(UG_NAME_REQ, "radio_mode:[%d], [%d]", gdata->radio_mode, g_data->radio_mode);
+               return TRUE;
+       } else {
+               assertm_if(TRUE, "unvalid key [%s]", key);
+               return FALSE;
+       }
+       return FALSE;
+}
+
+void* viewer_list_item_data_get(const Elm_Object_Item* item, const char* key)
+{
+       assertm_if(NULL == item, "NULL!!");
+       assertm_if(NULL == key, "NULL!!");
+
+       genlist_data* gdata = NULL;
+       gdata = elm_object_item_data_get(item);
+       assertm_if(NULL == gdata, "NULL!!");
+       if(NULL == gdata) {
+               return NULL;
+       }
+
+       DEBUG_LOG(UG_NAME_NORMAL, "dataget ssid:[%s] key:[%s]", gdata->device_info->ssid, key);
+
+       if (strncmp(key, "data", strlen(key)) == 0) {
+               return (void*) gdata;
+       } else {
+               assertm_if(TRUE, "unvalid key [%s]", key);
+               return NULL;
+       }
+
+       return NULL;
+}
+
+int viewer_list_item_enable_all(void)
+{
+       __COMMON_FUNC_ENTER__;
+       assertm_if(NULL == container, "NULL!!");
+
+       int count = g_slist_length(container);
+       int i = 1;
+
+       for(;i<count;i++){
+               Elm_Object_Item* det = NULL;
+               det = (Elm_Object_Item*) g_slist_nth_data(container, i);
+               assertm_if(NULL == det, "NULL!!");
+               elm_object_item_disabled_set(det, EINA_FALSE);
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return TRUE;
+}
+
+int viewer_list_item_disable_all(void)
+{
+       __COMMON_FUNC_ENTER__;
+       assertm_if(NULL == container, "NULL!!");
+
+       int count = g_slist_length(container);
+       int i = 1;
+
+       for(;i<count;i++){
+               Elm_Object_Item* det = NULL;
+               det = (Elm_Object_Item*) g_slist_nth_data(container, i);
+               assertm_if(NULL == det, "NULL!!");
+
+               elm_object_item_disabled_set(det, EINA_TRUE);
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return TRUE;
+}
+
+Elm_Object_Item* item_get_for_profile_name(char* profile_name)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (profile_name == NULL) {
+               __COMMON_FUNC_EXIT__;
+               return NULL;
+       }
+       
+       INFO_LOG(UG_NAME_RESP, "profile_name [%s]", profile_name);
+
+       int index = 0;
+       int size = viewer_list_item_size_get();
+       INFO_LOG(UG_NAME_RESP, "total size [%d]", size);
+
+       for (index =0; index < size; index++) {
+               Elm_Object_Item* item = viewer_list_item_at_index(index);
+               if (item == NULL) {
+                       DEBUG_LOG(UG_NAME_NORMAL, "continue");
+                       continue;
+               }
+
+               genlist_data* gdata = (genlist_data*) viewer_list_item_data_get(item, "data");
+               if (gdata == NULL) {
+                       __COMMON_FUNC_EXIT__;
+                       return NULL;
+               }
+
+               INFO_LOG(UG_NAME_RESP, "profile_name [%s]\n", gdata->device_info->profile_name);
+
+               if (!strcmp(profile_name, gdata->device_info->profile_name)) {
+                       __COMMON_FUNC_EXIT__;
+                       return item;
+               }
+       }
+       
+       __COMMON_FUNC_EXIT__;
+       return NULL;
+}
+
diff --git a/sources/ui-gadget/wifi-efl-UG.c b/sources/ui-gadget/wifi-efl-UG.c
new file mode 100644 (file)
index 0000000..dd59ee5
--- /dev/null
@@ -0,0 +1,376 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#ifndef UG_MODULE_API
+#define UG_MODULE_API __attribute__ ((visibility("default")))
+#endif
+
+
+#include <ui-gadget-module.h>
+#include "wifi.h"
+#include "wlan_manager.h"
+#include "popup.h"
+#include "viewer_manager.h"
+#include "wifi-engine-callback.h"
+#include "i18nmanager.h"
+#include "wifi-setting.h"
+#include "view_detail.h"
+#include "view_dhcpip.h"
+#include "view_staticip.h"
+#include "view_ime_password.h"
+#include "view_ime_hidden.h"
+
+
+static int wifi_exit_end = FALSE;
+
+struct wifi_appdata *app_state = NULL;
+
+struct ug_data 
+{
+       Evas_Object *base;
+       struct ui_gadget *ug;
+};
+
+
+static void *on_create(struct ui_gadget *ug, enum ug_mode mode, bundle *data, void *priv)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (!ug || !priv) {
+               INFO_LOG(UG_NAME_ERR, "[Error]Data is NULL - ug or priv");
+               return NULL;
+       }
+
+       app_state = (struct wifi_appdata *) g_malloc0(sizeof(struct wifi_appdata));
+       assertm_if(NULL == app_state, "Err!! app_state == NULL");
+       memset(app_state, 0x0, sizeof(struct wifi_appdata));
+
+       struct ug_data *ugd;
+       ugd = (struct ug_data*)priv;
+       ugd->ug = ug;
+
+       if (NULL != data) {
+               INFO_LOG(UG_NAME_NORMAL, "message load from caller");
+
+               const char* force_connected = (const char*) bundle_get_val(data,"back-button-show-force-when-connected");
+               INFO_LOG(UG_NAME_NORMAL, "* bundle:back-button-show-force-when-connected [%s]", force_connected);
+
+               if (force_connected != NULL) {
+                       if(strcmp(force_connected, "TRUE")==0) {
+                               app_state->bundle_back_button_show_force_when_connected = EINA_TRUE;
+                       }
+               } else {
+                       app_state->bundle_back_button_show_force_when_connected = EINA_FALSE;
+               }
+       } else {
+               INFO_LOG(UG_NAME_NORMAL, "I don`t know about my caller, I will just call him < Setting");
+               app_state->bundle_back_button_show_force_when_connected = EINA_FALSE;
+       }
+
+       INFO_LOG(UG_NAME_NORMAL, "bundle process end");
+       INFO_LOG(UG_NAME_NORMAL, "back button show when connected force set [%d]", app_state->bundle_back_button_show_force_when_connected);
+
+       bindtextdomain(PACKAGE, LOCALEDIR);
+
+       app_state->win_main = ug_get_parent_layout(ug);
+       assertm_if( NULL == app_state->win_main, "Err!! win_main == NULL");
+
+       elm_win_conformant_set(app_state->win_main, TRUE);
+       app_state->gadget= ugd;
+       app_state->ug = ug;
+
+       if (wifi_setting_value_set(VCONFKEY_WIFI_UG_RUN_STATE, VCONFKEY_WIFI_UG_RUN_STATE_ON_FOREGROUND) < 0) {
+               INFO_LOG(UG_NAME_ERR, "[Error]Failed to set vconf - VCONFKEY_WIFI_UG_RUN_STATE_ON_FOREGROUND");
+       }
+
+       evas_object_show(app_state->win_main);
+       elm_win_indicator_mode_set(app_state->win_main, ELM_WIN_INDICATOR_SHOW);
+
+       memset(&g_pending_call, 0, sizeof(wifi_pending_call_info_t));
+
+       Evas_Object* base = viewer_manager_create(app_state->win_main);
+       assertm_if(NULL == base, "Err!! main_layout == NULL");
+       ugd->base = base;
+
+       winset_popup_create(app_state->win_main);
+
+       app_state->bAlive = EINA_TRUE;
+       app_state->current_view = VIEW_MAIN;
+
+       wlan_manager_create();
+       wlan_manager_set_message_callback(wlan_engine_callback);
+       wlan_manager_set_refresh_callback(wlan_engine_refresh_callback);
+
+       switch (wlan_manager_start()) {
+       case WLAN_MANAGER_ERR_NONE:
+               break;
+       case WLAN_MANAGER_ERR_ALREADY_REGISTERED:
+               winset_popup_mode_set(NULL, POPUP_MODE_REGISTER_FAILED, POPUP_OPTION_NONE);
+               return ugd->base;
+       case WLAN_MANAGER_ERR_UNKNOWN:
+               winset_popup_mode_set(NULL, POPUP_MODE_REGISTER_FAILED, POPUP_OPTION_REGISTER_FAILED_COMMUNICATION_FAILED);
+               return ugd->base;
+       default:
+               __COMMON_FUNC_EXIT__;
+               return ugd->base;
+       }
+
+       char profile_name[NET_PROFILE_NAME_LEN_MAX+1] = "";
+       switch (wlan_manager_state_get(profile_name)) {
+       case WLAN_MANAGER_OFF:
+               ERROR_LOG(UG_NAME_NORMAL, "current state is wifi-off\n");
+               viewer_manager_header_mode_set(HEADER_MODE_OFF);
+               viewer_manager_hide(VIEWER_WINSET_SUB_CONTENTS);
+               break;
+       case WLAN_MANAGER_CONNECTING:
+               ERROR_LOG(UG_NAME_NORMAL, "current state is wifi-connecting\n");
+       case WLAN_MANAGER_UNCONNECTED:
+               ERROR_LOG(UG_NAME_NORMAL, "current state is wifi-on\n");
+               viewer_manager_header_mode_set(HEADER_MODE_SEARCHING);
+               viewer_manager_hide(VIEWER_WINSET_SEARCHING);
+               viewer_manager_show(VIEWER_WINSET_SUB_CONTENTS);
+               if (connman_request_scan_mode_set(WIFI_BGSCAN_MODE_PERIODIC) == WLAN_MANAGER_ERR_NONE) {
+                       DEBUG_LOG(UG_NAME_REQ, "Set BG scan mode - PERIODIC");
+               }
+               break;
+       case WLAN_MANAGER_CONNECTED:
+               ERROR_LOG(UG_NAME_NORMAL, "current state is wifi-connected\n");
+               viewer_manager_header_mode_set(HEADER_MODE_SEARCHING);
+               viewer_manager_hide(VIEWER_WINSET_SEARCHING);
+               viewer_manager_show(VIEWER_WINSET_SUB_CONTENTS);
+               if (connman_request_scan_mode_set(WIFI_BGSCAN_MODE_PERIODIC) == WLAN_MANAGER_ERR_NONE) {
+                       DEBUG_LOG(UG_NAME_REQ, "Set BG scan mode - PERIODIC");
+               }
+               break;
+       case WLAN_MANAGER_ERROR:
+       default:
+               winset_popup_mode_set(NULL, POPUP_MODE_ETC, POPUP_OPTION_ETC_WLAN_STATE_GET_ERROR);
+               break;
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return ugd->base;
+}
+
+static void on_start(struct ui_gadget *ug, bundle *data, void *priv)
+{
+       __COMMON_FUNC_ENTER__;
+       if(app_state->bAlive)
+               ecore_idler_add((Ecore_Task_Cb)wlan_manager_scanned_profile_refresh_with_count, (void *)8);
+       __COMMON_FUNC_EXIT__;
+}
+
+static void on_pause(struct ui_gadget *ug, bundle *data, void *priv)
+{
+       __COMMON_FUNC_ENTER__;
+       if (wifi_setting_value_set(VCONFKEY_WIFI_UG_RUN_STATE, VCONFKEY_WIFI_UG_RUN_STATE_ON_BACKGROUND) < 0) {
+               INFO_LOG(UG_NAME_NORMAL, "Failed to set vconf - VCONFKEY_WIFI_UG_RUN_STATE_ON_BACKGROUND");
+       }
+       __COMMON_FUNC_EXIT__;
+}
+
+static void on_resume(struct ui_gadget *ug, bundle *data, void *priv)
+{
+       __COMMON_FUNC_ENTER__;
+       if (wifi_setting_value_set(VCONFKEY_WIFI_UG_RUN_STATE, VCONFKEY_WIFI_UG_RUN_STATE_ON_FOREGROUND) < 0) {
+               INFO_LOG(UG_NAME_NORMAL, "Failed to set vconf - VCONFKEY_WIFI_UG_RUN_STATE_ON_FOREGROUND");
+       }
+       __COMMON_FUNC_EXIT__;
+}
+
+static void on_destroy(struct ui_gadget *ug, bundle *data, void *priv)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (wifi_setting_value_set(VCONFKEY_WIFI_UG_RUN_STATE, VCONFKEY_WIFI_UG_RUN_STATE_OFF) < 0) {
+               INFO_LOG(UG_NAME_NORMAL, "Failed to set vconf - VCONFKEY_WIFI_UG_RUN_STATE_OFF");
+       }
+
+       if (!ug || !priv){
+               __COMMON_FUNC_EXIT__;
+               return;
+       }
+
+       wifi_exit();
+
+       struct ug_data* ugd = priv;
+
+       if(ugd->base){
+               evas_object_del(ugd->base);
+               ugd->base = NULL;
+       }
+
+       __COMMON_FUNC_EXIT__;
+}
+
+static void on_message(struct ui_gadget *ug, bundle *msg, bundle *data, void *priv)
+{
+}
+
+static void on_event(struct ui_gadget *ug, enum ug_event event, bundle *data, void *priv)
+{
+       switch (event) {
+               case UG_EVENT_LOW_MEMORY:
+                       break;
+               case UG_EVENT_LOW_BATTERY:
+                       break;
+               case UG_EVENT_LANG_CHANGE:
+                       break;
+               case UG_EVENT_ROTATE_PORTRAIT:
+                       break;
+               case UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN:
+                       break;
+               case UG_EVENT_ROTATE_LANDSCAPE:
+                       break;
+               case UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN:
+                       break;
+               default:
+                       break;
+       }
+}
+
+static void on_key_event(struct ui_gadget *ug, enum ug_key_event event, bundle *data, void *priv)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (!ug) {
+               return;
+       }
+
+       switch (event) {
+               case UG_KEY_EVENT_END:
+                       INFO_LOG(UG_NAME_NORMAL, "UG_KEY_EVENT_END");
+
+                       /* popup key event determine */
+                       Evas_Object* det = winset_popup_content_get(NULL);
+               
+                       if(det == NULL) {
+                               INFO_LOG(UG_NAME_NORMAL, "No POPUP");
+                       } else {
+                               INFO_LOG(UG_NAME_NORMAL, "POPUP Removed");
+                               winset_popup_timer_remove();
+                               winset_popup_content_clear();
+                               return;
+                       }
+                       
+                       if(app_state->current_view == VIEW_MAIN) {
+                               INFO_LOG(UG_NAME_NORMAL, "same");
+                       } else {
+                               INFO_LOG(UG_NAME_NORMAL, "differ");
+                               elm_naviframe_item_pop(viewer_manager_get_naviframe());
+                               return;
+                       }
+
+                       wifi_exit();
+                       break;
+               default:
+                       INFO_LOG(UG_NAME_NORMAL, "UG_KEY_EVENT [%d]", event);
+                       break;
+       }
+       __COMMON_FUNC_EXIT__;
+}
+
+UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops)
+{
+       __COMMON_FUNC_ENTER__;
+
+       wifi_exit_end = FALSE;
+
+       assertm_if(NULL == ops, "Err!! ug_module_ops == NULL");
+
+       struct ug_data *ugd;
+       ugd = calloc(1, sizeof(struct ug_data));
+
+       assertm_if(NULL == ugd, "Err!! calloc fail");
+
+       ops->create = on_create;
+       ops->start = on_start;
+       ops->pause = on_pause;
+       ops->resume = on_resume;
+       ops->destroy = on_destroy;
+       ops->message = on_message;
+       ops->event = on_event;
+       ops->key_event = on_key_event;
+       ops->priv = ugd;
+       ops->opt = UG_OPT_INDICATOR_ENABLE;
+
+       __COMMON_FUNC_EXIT__;
+       return 0;
+}
+
+UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops)
+{
+       __COMMON_FUNC_ENTER__;
+       assertm_if(NULL == ops, "Err!! ug_module_ops == NULL");
+
+       struct ug_data *ugd;
+
+       ugd = ops->priv;
+
+       if (ugd)
+               free(ugd);
+       __COMMON_FUNC_EXIT__;
+}
+
+UG_MODULE_API int setting_plugin_reset(bundle *data, void *priv)
+{
+       __COMMON_FUNC_ENTER__;
+       INFO_LOG(UG_NAME_NORMAL, "setting_plugin_reset");
+       return 0;
+       __COMMON_FUNC_EXIT__;
+}
+
+int wifi_exit()
+{
+       __COMMON_FUNC_ENTER__;
+       if(wifi_exit_end == TRUE) {
+               __COMMON_FUNC_EXIT__;
+               return FALSE;
+       }
+       wifi_exit_end = TRUE;
+
+       if (connman_request_scan_mode_set(WIFI_BGSCAN_MODE_EXPONENTIAL) == WLAN_MANAGER_ERR_NONE) {
+               DEBUG_LOG(UG_NAME_REQ, "Set BG scan mode - EXPONENTIAL");
+       }
+
+       DEBUG_LOG(UG_NAME_NORMAL, "* popup manager destroying...");
+       winset_popup_destroy(NULL);
+       DEBUG_LOG(UG_NAME_NORMAL, "* wlan manager destroying...");
+       wlan_manager_destroy();
+       DEBUG_LOG(UG_NAME_NORMAL, "* view_main destroying...");
+       viewer_manager_destroy();
+       DEBUG_LOG(UG_NAME_NORMAL, "* manager destroy complete");
+
+       struct ug_data *ugd;
+       ugd = app_state->gadget;
+       app_state->bAlive = EINA_FALSE;
+
+       if(g_pending_call.is_handled == FALSE)
+       {
+               dbus_g_proxy_cancel_call(g_pending_call.proxy, g_pending_call.pending_call);
+               g_pending_call.is_handled = TRUE;
+               memset(&g_pending_call, 0, sizeof(wifi_pending_call_info_t));
+       }
+
+       DEBUG_LOG(UG_NAME_NORMAL, "* ug_destroying...");
+       ug_destroy_me(ugd->ug);
+
+       __COMMON_FUNC_EXIT__;
+
+       return TRUE;
+}
diff --git a/sources/ui-gadget/wifi-ui-list-callbacks.c b/sources/ui-gadget/wifi-ui-list-callbacks.c
new file mode 100644 (file)
index 0000000..d4af841
--- /dev/null
@@ -0,0 +1,188 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#include "wifi.h"
+#include "wifi-ui-list-callbacks.h"
+#include "wlan_manager.h"
+#include "view_detail.h"
+#include "viewer_list.h"
+#include "view_ime_password.h"
+#include "view_eap.h"
+#include "popup.h"
+
+
+void radio_button_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       int ret = WLAN_MANAGER_ERR_UNKNOWN;
+       if (data == NULL) {
+               ERROR_LOG(UG_NAME_NORMAL, "Error!!! Invalid argument device_info");
+               goto radio_button_cb_process_end;
+       }
+
+       //selected UI and it`s data
+       Elm_Object_Item *it = (Elm_Object_Item *)event_info;
+       wifi_device_info_t *device_info = (wifi_device_info_t *)data;
+
+       if (device_info->ssid == NULL) {
+               ERROR_LOG(UG_NAME_NORMAL, "Error!!! Invalid argument device_info ssid");
+               goto radio_button_cb_process_end;
+       }
+
+       viewer_manager_set_enabled_list_update(EINA_FALSE);
+       viewer_manager_current_selected_item_set(it);
+
+       genlist_data* gdata = (genlist_data*) viewer_list_item_data_get((Elm_Object_Item*)it, "data");
+       if(NULL == gdata) {
+               ERROR_LOG(UG_NAME_NORMAL, "Error!!! list item data null");
+               goto radio_button_cb_process_end;
+       }
+
+       int item_state = gdata->radio_mode;
+
+       INFO_LOG(UG_NAME_NORMAL, "ssid --- %s", device_info->ssid);
+       INFO_LOG(UG_NAME_NORMAL, "current item_state state is --- %d\n", item_state);
+       INFO_LOG(UG_NAME_NORMAL, "selected item_state %d", item_state);
+
+       switch (item_state) {
+               case VIEWER_ITEM_RADIO_MODE_NULL: //this is OFF too. of course, NULL should be un-state
+               case VIEWER_ITEM_RADIO_MODE_OFF:
+                       break;
+               case VIEWER_ITEM_RADIO_MODE_CONNECTED:
+                       INFO_LOG(UG_NAME_NORMAL, "want to disconnect for connected item");
+                       viewer_manager_item_radio_mode_set(NULL, it, VIEWER_ITEM_RADIO_MODE_DISCONNECTING);
+                       ret = wlan_manager_request_disconnection(device_info);
+                       if(ret == WLAN_MANAGER_ERR_NONE){
+                               viewer_manager_item_radio_mode_set(NULL, it, VIEWER_ITEM_RADIO_MODE_DISCONNECTING);
+                               viewer_manager_header_mode_set(HEADER_MODE_DISCONNECTING);
+                               viewer_manager_item_radio_mode_set(NULL, it, VIEWER_ITEM_RADIO_MODE_DISCONNECTING);
+
+                       } else {
+                               viewer_manager_item_radio_mode_set(NULL, it , VIEWER_ITEM_RADIO_MODE_OFF);
+                       }
+
+                       goto radio_button_cb_process_end;
+
+               case VIEWER_ITEM_RADIO_MODE_CONNECTING:
+                       INFO_LOG(UG_NAME_NORMAL, "want to cancel connecting for connected item");
+
+                       ret = wlan_manager_request_cancel_connecting(device_info->profile_name);
+                       if(ret == WLAN_MANAGER_ERR_NONE){
+                               viewer_manager_item_radio_mode_set(NULL, it, VIEWER_ITEM_RADIO_MODE_CANCEL_CONNECTING);
+                               viewer_manager_header_mode_set(HEADER_MODE_CANCEL_CONNECTING);
+                               viewer_manager_item_radio_mode_set(NULL, it, VIEWER_ITEM_RADIO_MODE_CANCEL_CONNECTING);
+                       } 
+                       goto radio_button_cb_process_end;
+
+               default:
+                       ret = WLAN_MANAGER_ERR_UNKNOWN;
+                       goto radio_button_cb_process_end;
+       }
+
+       int current_state = -1;
+       current_state = viewer_manager_header_mode_get();
+
+       INFO_LOG(UG_NAME_NORMAL, "Clicked AP`s information\n");
+       INFO_LOG(UG_NAME_NORMAL, "header mode [%d]", current_state);
+
+       switch (current_state) {
+               case HEADER_MODE_OFF:
+                       INFO_LOG(UG_NAME_NORMAL, "you can not connect when header off");
+                       break;
+               case HEADER_MODE_CONNECTED:
+                       INFO_LOG(UG_NAME_NORMAL, "header mode connected. disconnect and connect needed");
+               case HEADER_MODE_ON:
+                       viewer_manager_item_radio_mode_set(NULL, it, VIEWER_ITEM_RADIO_MODE_CONNECTING);
+
+                       ret = wlan_manager_request_connection(device_info);
+                       if (ret == WLAN_MANAGER_ERR_NONE) {
+                               Elm_Object_Item* target_item = viewer_manager_current_selected_item_get();
+                               viewer_manager_item_radio_mode_set(NULL, target_item, VIEWER_ITEM_RADIO_MODE_CONNECTING);
+                               viewer_manager_header_mode_set(HEADER_MODE_CONNECTING);
+                               viewer_manager_item_radio_mode_set(NULL, target_item, VIEWER_ITEM_RADIO_MODE_CONNECTING);
+                       } else {
+                               viewer_manager_item_radio_mode_set(NULL, it, VIEWER_ITEM_RADIO_MODE_OFF);
+                       }
+                       break;
+
+               case HEADER_MODE_SEARCHING:
+               case HEADER_MODE_ACTIVATING:
+               case HEADER_MODE_CONNECTING:
+               case HEADER_MODE_DISCONNECTING:
+               case HEADER_MODE_DEACTIVATING:
+                       viewer_manager_set_enabled_list_update(EINA_TRUE);
+                       viewer_manager_current_selected_item_set(NULL);
+                       INFO_LOG(UG_NAME_NORMAL, "Disable input");
+                       return;
+
+               default:
+                       INFO_LOG(UG_NAME_NORMAL, "default");
+                       break;
+       }
+
+radio_button_cb_process_end:
+
+       switch (ret) {
+       case WLAN_MANAGER_ERR_NONE:
+               INFO_LOG(UG_NAME_NORMAL, "ERROR_NONE");
+               break;
+       case WLAN_MANAGER_ERR_CONNECT_PASSWORD_NEEDED:
+               view_ime_password(device_info);
+               break;
+       case WLAN_MANAGER_ERR_CONNECT_EAP_SEC_TYPE:
+               view_eap(device_info);
+               break;
+       case WLAN_MANAGER_ERR_NOSERVICE:
+               viewer_manager_set_enabled_list_update(EINA_TRUE);
+               wlan_manager_scanned_profile_refresh(TRUE);
+               break;
+       default:
+               viewer_manager_set_enabled_list_update(EINA_TRUE);
+               winset_popup_mode_set(NULL, POPUP_MODE_CONNECTING_FAILED, POPUP_OPTION_CONNECTING_FAILED_INVALID_OPERATION);
+               ERROR_LOG(UG_NAME_NORMAL, "errro code [%d]", ret);
+               break;
+       }
+
+       __COMMON_FUNC_EXIT__;
+}
+
+void list_select_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       INFO_LOG(UG_NAME_NORMAL,"=================\n");
+       INFO_LOG(UG_NAME_NORMAL," %s %d\n", __func__ ,__LINE__);
+       INFO_LOG(UG_NAME_NORMAL,"=================\n");
+
+       if (data == NULL) {
+               __COMMON_FUNC_EXIT__;
+               return;
+       }
+
+       wifi_device_info_t *device_info = (wifi_device_info_t *)data;
+
+       DEBUG_LOG(UG_NAME_NORMAL, "ssid [%s]", device_info->ssid);
+
+       viewer_manager_current_selected_item_set((Elm_Object_Item *)obj);
+
+       view_detail(device_info);
+
+       __COMMON_FUNC_EXIT__;
+}
+
diff --git a/sources/ui-gadget/wifi-wlan-callbacks.c b/sources/ui-gadget/wifi-wlan-callbacks.c
new file mode 100644 (file)
index 0000000..9b0299d
--- /dev/null
@@ -0,0 +1,465 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#include "wifi.h"
+#include "wifi-ui-list-callbacks.h"
+#include "wlan_manager.h"
+#include "viewer_manager.h"
+#include "popup.h"
+#include "wifi-engine-callback.h"
+#include "view_ime_password.h"
+#include "viewer_list.h"
+
+
+void wlan_engine_callback(void *user_data, void *wlan_data)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (wlan_data == NULL) {
+               ERROR_LOG(UG_NAME_RESP, "[Error] Invalid user data");
+               __COMMON_FUNC_EXIT__;
+               return;
+       }
+
+       Elm_Object_Item* target_item = NULL;
+       callback_data* det = (callback_data*) wlan_data;
+
+       int header_state = -1;
+       header_state = viewer_manager_header_mode_get();
+
+       INFO_LOG(UG_NAME_NORMAL, "header state [%d]", header_state);
+       INFO_LOG(UG_NAME_NORMAL, "daemon message [%d]", det->type);
+
+       switch (det->type) {
+       case WLAN_MANAGER_RESPONSE_TYPE_POWER_ON_OK:
+               INFO_LOG(UG_NAME_RESP,"Power ok..\n");
+
+               if (connman_request_scan_mode_set(WIFI_BGSCAN_MODE_PERIODIC) == WLAN_MANAGER_ERR_NONE) {
+                       DEBUG_LOG(UG_NAME_REQ, "Set BG scan mode - PERIODIC");
+               }
+
+               viewer_manager_header_mode_set(HEADER_MODE_SEARCHING);
+               viewer_manager_hidden_disable_set(TRUE);
+               viewer_manager_show(VIEWER_WINSET_SEARCHING);
+               viewer_manager_show(VIEWER_WINSET_SUB_CONTENTS);
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_POWER_OFF_OK:
+               viewer_list_item_clear();
+               wlan_manager_reset_connected_AP();
+               viewer_manager_header_mode_set(HEADER_MODE_OFF);
+
+               viewer_manager_hide(VIEWER_WINSET_SEARCHING);
+               viewer_manager_hide(VIEWER_WINSET_SUB_CONTENTS);
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_POWER_ON_NOT_SUPPORTED:
+               viewer_manager_header_mode_set(HEADER_MODE_OFF);
+               wlan_manager_network_syspopup_message("Network connection popup", "not support");
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_POWER_ON_RESTRICTED:
+               viewer_manager_header_mode_set(HEADER_MODE_OFF);
+               wlan_manager_network_syspopup_message("Network connection popup", "wifi restricted");
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_SCAN_OK:
+               INFO_LOG(UG_NAME_RESP,"Scan ok..\n");
+               wlan_manager_scanned_profile_refresh(TRUE);
+
+               if (HEADER_MODE_CONNECTED == header_state) {
+                       viewer_manager_hidden_disable_set(FALSE);
+               } else if (HEADER_MODE_ON == header_state) {
+                       viewer_manager_hidden_disable_set(FALSE);
+               }
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_SCAN_RESULT_IND:
+               INFO_LOG(UG_NAME_RESP,"Scan result ind");
+               switch (header_state) {
+               case HEADER_MODE_CONNECTING:
+               case HEADER_MODE_CONNECTED:
+               case HEADER_MODE_DISCONNECTING:
+               case HEADER_MODE_ON:
+               case HEADER_MODE_SEARCHING:
+                       wlan_manager_scanned_profile_refresh(TRUE);
+                       break;
+               case HEADER_MODE_DEACTIVATING:
+               case HEADER_MODE_OFF:
+               case HEADER_MODE_ACTIVATING:
+               default:
+                       break;
+               }
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_IND:
+               target_item = item_get_for_profile_name(det->profile_name);
+
+               switch (header_state) {
+               case HEADER_MODE_CONNECTING:
+               case HEADER_MODE_CONNECTED:
+               case HEADER_MODE_DISCONNECTING:
+               case HEADER_MODE_ON:
+                       if (target_item == NULL) {
+                               ERROR_LOG(UG_NAME_RESP,"Error!!! Target item is NULL");
+                       } else {
+                               viewer_manager_item_radio_mode_set(NULL, target_item , VIEWER_ITEM_RADIO_MODE_CONNECTED);
+                       }
+
+                       viewer_manager_set_enabled_list_update(EINA_TRUE);
+                       viewer_manager_refresh(TRUE);
+                       viewer_manager_header_mode_set(HEADER_MODE_CONNECTED);
+                       viewer_manager_scroll_to_top();
+                       break;
+               case HEADER_MODE_DEACTIVATING:
+               case HEADER_MODE_OFF:
+               case HEADER_MODE_ACTIVATING:
+               default:
+                       break;
+               }
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_CONNECTING:
+               switch (header_state) {
+               case HEADER_MODE_CONNECTING:
+               case HEADER_MODE_DISCONNECTING:
+               case HEADER_MODE_DEACTIVATING:
+               case HEADER_MODE_CONNECTED:
+                       break;
+               default:
+                       target_item = item_get_for_profile_name(det->profile_name);
+                       viewer_manager_header_mode_set(HEADER_MODE_CONNECTING);
+                       viewer_manager_item_radio_mode_set(NULL, target_item, VIEWER_ITEM_RADIO_MODE_CONNECTING);
+                       break;
+               }
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_OK:
+               target_item = item_get_for_profile_name(det->profile_name);
+               switch (header_state) {
+               case HEADER_MODE_CONNECTING:
+               case HEADER_MODE_CONNECTED:
+               case HEADER_MODE_DISCONNECTING:
+               case HEADER_MODE_ON:
+                       if (target_item == NULL) {
+                               ERROR_LOG(UG_NAME_RESP,"Error!!! Target item is NULL");
+                       } else {
+                               viewer_manager_item_radio_mode_set(NULL, target_item , VIEWER_ITEM_RADIO_MODE_CONNECTED);
+                       }
+
+                       viewer_manager_set_enabled_list_update(EINA_TRUE);
+                       viewer_manager_refresh(TRUE);
+                       viewer_manager_header_mode_set(HEADER_MODE_CONNECTED);
+                       viewer_manager_scroll_to_top();
+                       break;
+               case HEADER_MODE_DEACTIVATING:
+               case HEADER_MODE_OFF:
+               case HEADER_MODE_ACTIVATING:
+               default:
+                       break;
+               }
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_FAIL_IN_PROGRESS:
+               target_item = item_get_for_profile_name(det->profile_name);
+               viewer_manager_header_mode_set(HEADER_MODE_ON);
+
+               if (target_item == NULL) {
+                       ERROR_LOG(UG_NAME_RESP,"Error!!! Target item is NULL");
+               } else {
+                       viewer_manager_item_radio_mode_set(NULL, target_item , VIEWER_ITEM_RADIO_MODE_OFF);
+               }
+
+               viewer_manager_set_enabled_list_update(EINA_TRUE);
+               viewer_manager_refresh(TRUE);
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_FAIL_UNKNOWN:
+               target_item = item_get_for_profile_name(det->profile_name);
+               viewer_manager_header_mode_set(HEADER_MODE_ON);
+
+               if (target_item == NULL) {
+                       ERROR_LOG(UG_NAME_RESP,"Error!!! Target item is NULL");
+               } else {
+                       viewer_manager_item_radio_mode_set(NULL, target_item , VIEWER_ITEM_RADIO_MODE_OFF);
+               }
+
+               viewer_manager_set_enabled_list_update(EINA_TRUE);
+               viewer_manager_refresh(TRUE);
+
+               wlan_manager_network_syspopup_message("Network connection popup", "unable to connect");
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_FAIL_TIMEOUT:
+               target_item = item_get_for_profile_name(det->profile_name);
+               viewer_manager_header_mode_set(HEADER_MODE_ON);
+
+               if (target_item == NULL) {
+                       ERROR_LOG(UG_NAME_RESP,"Error!!! Target item is NULL");
+               } else {
+                       viewer_manager_item_radio_mode_set(NULL, target_item, VIEWER_ITEM_RADIO_MODE_OFF);
+               }
+
+               viewer_manager_set_enabled_list_update(EINA_TRUE);
+               viewer_manager_refresh(TRUE);
+               winset_popup_mode_set(NULL, POPUP_MODE_CONNECTING_FAILED, POPUP_OPTION_CONNECTING_FAILED_TIMEOUT);
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_FAIL_ALREADY_EXIST:
+               target_item = item_get_for_profile_name(det->profile_name);
+               viewer_manager_header_mode_set(HEADER_MODE_ON);
+
+               if (target_item == NULL) {
+                       ERROR_LOG(UG_NAME_RESP,"Error!!! Target item is NULL");
+               } else {
+                       viewer_manager_item_radio_mode_set(NULL, target_item , VIEWER_ITEM_RADIO_MODE_OFF);
+               }
+
+               viewer_manager_set_enabled_list_update(EINA_TRUE);
+               wlan_manager_scanned_profile_refresh(TRUE);
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_FAIL_UNKNOWN_METHOD:
+               target_item = item_get_for_profile_name(det->profile_name);
+               viewer_manager_header_mode_set(HEADER_MODE_ON);
+
+               if (target_item == NULL) {
+                       ERROR_LOG(UG_NAME_RESP, "Error!!! Target item is NULL");
+               } else {
+                       viewer_manager_item_radio_mode_set(NULL, target_item , VIEWER_ITEM_RADIO_MODE_OFF);
+               }
+
+               viewer_manager_set_enabled_list_update(EINA_TRUE);
+               wlan_manager_scanned_profile_refresh(TRUE);
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_FAIL_ABORTED:
+               target_item = item_get_for_profile_name(det->profile_name);
+               viewer_manager_header_mode_set(HEADER_MODE_ON);
+
+               if (target_item == NULL) {
+                       ERROR_LOG(UG_NAME_RESP, "Error!!! Target item is NULL");
+               } else {
+                       viewer_manager_item_radio_mode_set(NULL, target_item , VIEWER_ITEM_RADIO_MODE_OFF);
+               }
+
+               viewer_manager_set_enabled_list_update(EINA_TRUE);
+               wlan_manager_scanned_profile_refresh(TRUE);
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_DISCONNECTION_IND:
+               INFO_LOG(UG_NAME_RESP, "DISCONNECTION IND");
+
+               target_item = item_get_for_profile_name(det->profile_name);
+               switch (header_state) {
+               case HEADER_MODE_CONNECTING:
+                       if (target_item == NULL) {
+                               ERROR_LOG(UG_NAME_RESP,"Error!!! Target item is NULL");
+                       } else {
+                               genlist_data* gdata = (genlist_data*) viewer_list_item_data_get(target_item, "data");
+                               if (gdata->radio_mode == VIEWER_ITEM_RADIO_MODE_CONNECTING)
+                                       viewer_manager_header_mode_set(HEADER_MODE_ON);
+
+                               viewer_manager_item_radio_mode_set(NULL, target_item, VIEWER_ITEM_RADIO_MODE_OFF);
+                       }
+                       break;
+               case HEADER_MODE_CONNECTED:
+               case HEADER_MODE_DISCONNECTING:
+               case HEADER_MODE_ON:
+                       if (target_item == NULL) {
+                               ERROR_LOG(UG_NAME_RESP,"Error!!! Target item is NULL");
+                       } else {
+                               viewer_manager_item_radio_mode_set(NULL, target_item, VIEWER_ITEM_RADIO_MODE_OFF);
+                       }
+
+                       viewer_manager_header_mode_set(HEADER_MODE_ON);
+                       viewer_manager_set_enabled_list_update(EINA_TRUE);
+                       viewer_manager_refresh(TRUE);
+                       break;
+               case HEADER_MODE_CANCEL_CONNECTING:
+                       viewer_manager_header_mode_set(HEADER_MODE_ON);
+                       viewer_manager_set_enabled_list_update(EINA_TRUE);
+                       viewer_manager_refresh(TRUE);
+                       break;
+               case HEADER_MODE_DEACTIVATING:
+               case HEADER_MODE_OFF:
+               case HEADER_MODE_ACTIVATING:
+               default:
+                       INFO_LOG(UG_NAME_RESP,"DISCONNECTION IND will not applied at header mode [%d]", header_state);
+                                       break;
+                       }
+
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_DISCONNECTION_OK:
+               INFO_LOG(UG_NAME_RESP,"DISCONNECTION_OK");
+
+               target_item = item_get_for_profile_name(det->profile_name);
+               if (target_item == NULL) {
+                       ERROR_LOG(UG_NAME_RESP,"Error!!! Target item is NULL");
+               } else {
+                       genlist_data* gdata = (genlist_data*) viewer_list_item_data_get(target_item, "data");
+                       if (gdata->radio_mode == VIEWER_ITEM_RADIO_MODE_WPS_CONNECTING) {
+                               viewer_manager_header_mode_set(HEADER_MODE_ON);
+                               viewer_manager_item_radio_mode_set(NULL, target_item, VIEWER_ITEM_RADIO_MODE_OFF);
+                               return;
+                       }
+
+                       viewer_manager_item_radio_mode_set(NULL, target_item, VIEWER_ITEM_RADIO_MODE_OFF);
+               }
+
+               switch (header_state) {
+               case HEADER_MODE_CONNECTING:
+               case HEADER_MODE_CANCEL_CONNECTING:
+               case HEADER_MODE_CONNECTED:
+               case HEADER_MODE_DISCONNECTING:
+                       viewer_manager_header_mode_set(HEADER_MODE_ON);
+                       break;
+               case HEADER_MODE_DEACTIVATING:
+                       viewer_manager_header_mode_set(HEADER_MODE_OFF);
+                       break;
+               case HEADER_MODE_OFF:
+                       viewer_manager_header_mode_set(HEADER_MODE_OFF);
+                       break;
+               case HEADER_MODE_ON:
+                       viewer_manager_header_mode_set(HEADER_MODE_ON);
+                       break;
+               case HEADER_MODE_ACTIVATING:
+               default:
+                       if (det) {
+                               if (det->profile_name)
+                                       g_free(det->profile_name);
+                               g_free(det);
+                       }
+                       return;
+               }
+
+               viewer_manager_set_enabled_list_update(EINA_TRUE);
+               viewer_manager_current_selected_item_set(NULL);
+
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_WPS_ENROLL_OK:
+               target_item = item_get_for_profile_name(det->profile_name);
+               switch(header_state) {
+               case HEADER_MODE_CONNECTING:
+               case HEADER_MODE_CONNECTED:
+               case HEADER_MODE_DISCONNECTING:
+               case HEADER_MODE_ON:
+                       if(target_item == NULL) {
+                               ERROR_LOG(UG_NAME_RESP,"Error!!! Target item is NULL");
+                       } else {
+                               winset_popup_mode_set(NULL, POPUP_MODE_OFF, POPUP_OPTION_NONE);
+                               view_ime_password_destroy();
+                               viewer_manager_item_radio_mode_set(NULL, target_item , VIEWER_ITEM_RADIO_MODE_CONNECTED);
+                       }
+
+                       viewer_manager_set_enabled_list_update(EINA_TRUE);
+                       viewer_manager_refresh(TRUE);
+
+                       viewer_manager_header_mode_set(HEADER_MODE_CONNECTED);
+                       break;
+               case HEADER_MODE_DEACTIVATING:
+               case HEADER_MODE_OFF:
+               case HEADER_MODE_ACTIVATING:
+               default:
+                       break;
+               }
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_WPS_ENROLL_FAIL:
+               target_item = item_get_for_profile_name(det->profile_name);
+               if (target_item == NULL) {
+                       ERROR_LOG(UG_NAME_RESP,"Error!!! Target item is NULL");
+               } else {
+                       viewer_manager_item_radio_mode_set(NULL, target_item, VIEWER_ITEM_RADIO_MODE_OFF);
+               }
+
+               switch (header_state) {
+               case HEADER_MODE_CONNECTING:
+               case HEADER_MODE_CANCEL_CONNECTING:
+               case HEADER_MODE_CONNECTED:
+               case HEADER_MODE_DISCONNECTING:
+                       viewer_manager_header_mode_set(HEADER_MODE_ON);
+                       break;
+               case HEADER_MODE_DEACTIVATING:
+                       viewer_manager_header_mode_set(HEADER_MODE_OFF);
+                       break;
+               case HEADER_MODE_OFF:
+                       viewer_manager_header_mode_set(HEADER_MODE_OFF);
+                       break;
+               case HEADER_MODE_ON:
+                       viewer_manager_header_mode_set(HEADER_MODE_ON);
+                       break;
+               case HEADER_MODE_ACTIVATING:
+               default:
+                       if (det) {
+                               if (det->profile_name)
+                                       g_free(det->profile_name);
+                               g_free(det);
+                       }
+                       return;
+               }
+
+               winset_popup_mode_set(NULL, POPUP_MODE_OFF, POPUP_OPTION_NONE);
+               wlan_manager_network_syspopup_message("Network connection popup", "unable to connect");
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_CANCEL_WPS_ENROLL_OK:
+               target_item = item_get_for_profile_name(det->profile_name);
+               if (target_item == NULL) {
+                       ERROR_LOG(UG_NAME_RESP,"Error!!! Target item is NULL");
+               } else {
+                       viewer_manager_item_radio_mode_set(NULL, target_item, VIEWER_ITEM_RADIO_MODE_OFF);
+               }
+
+               switch(header_state){
+               case HEADER_MODE_CONNECTING:
+               case HEADER_MODE_CANCEL_CONNECTING:
+               case HEADER_MODE_CONNECTED:
+               case HEADER_MODE_DISCONNECTING:
+                       viewer_manager_header_mode_set(HEADER_MODE_ON);
+                       break;
+               case HEADER_MODE_DEACTIVATING:
+                       viewer_manager_header_mode_set(HEADER_MODE_OFF);
+                       break;
+               case HEADER_MODE_OFF:
+                       viewer_manager_header_mode_set(HEADER_MODE_OFF);
+                       break;
+               case HEADER_MODE_ON:
+                       viewer_manager_header_mode_set(HEADER_MODE_ON);
+                       break;
+               case HEADER_MODE_ACTIVATING:
+               default:
+                       if (det) {
+                               if (det->profile_name)
+                                       g_free(det->profile_name);
+                               g_free(det);
+                       }
+                       return;
+               }
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_CANCEL_WPS_ENROLL_FAIL:
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_MAC_ID_IND:
+               INFO_LOG(UG_NAME_RESP, "MAC_ID_IND");
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_NONE:
+       default:
+               winset_popup_simple_set("[ERROR] Unregistered WLAN_EVENT number");
+               break;
+       }
+
+       __COMMON_FUNC_EXIT__;
+
+       if (det) {
+               if (det->profile_name)
+                       g_free(det->profile_name);
+               g_free(det);
+       }
+
+       return;
+}
+
+void wlan_engine_refresh_callback(int is_scan)
+{
+       __COMMON_FUNC_ENTER__;
+       viewer_manager_refresh(is_scan);
+       __COMMON_FUNC_EXIT__;
+}
diff --git a/sources/wifi-syspopup/CMakeLists.txt b/sources/wifi-syspopup/CMakeLists.txt
new file mode 100644 (file)
index 0000000..9556ab2
--- /dev/null
@@ -0,0 +1,56 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(wifi-qs C)
+
+# defines 
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(EXEC_PREFIX "\${prefix}")
+SET(LIBDIR "\${prefix}/lib")
+SET(INCLUDEDIR "\${prefix}/include")
+SET(VERSION 0.1.0)
+
+# source files
+SET(SRCS 
+       ../libraries/settingWrapper/wifi-setting.c
+       ../libraries/i18nManager/i18nmanager.c
+       ../libraries/appcoreWrapper/appcoreWrapper.c
+       ../libraries/WlanManager/wlan-manager/wlan_manager.c
+       ${ENGINE_SOURCES}
+       viewer-popups/view-main.c
+       viewer-popups/view-password.c
+       viewer-popups/view-alerts.c
+       wifi-syspopup.c 
+       wifi-syspopup-engine-callback.c)
+
+FOREACH(flag ${pkgs_CFLAGS})
+       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+ADD_DEFINITIONS("-DFACTORYFS=\"$ENV{FACTORYFS}\"")
+
+# add executable
+ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
+
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/bin)
+
+# install image files
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../resources/images/37_wifi_icon_00.png DESTINATION /usr/share/icon)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../resources/images/37_wifi_icon_01.png DESTINATION /usr/share/icon)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../resources/images/37_wifi_icon_02.png DESTINATION /usr/share/icon)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../resources/images/37_wifi_icon_03.png DESTINATION /usr/share/icon)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../resources/images/37_wifi_icon_lock_00.png DESTINATION /usr/share/icon)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../resources/images/37_wifi_icon_lock_01.png DESTINATION /usr/share/icon)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../resources/images/37_wifi_icon_lock_02.png DESTINATION /usr/share/icon)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../resources/images/37_wifi_icon_lock_03.png DESTINATION /usr/share/icon)
+
+# install desktop file & icon
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/net.${PROJECT_NAME}.desktop.in ${CMAKE_CURRENT_SOURCE_DIR}/net.${PROJECT_NAME}.desktop)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/net.${PROJECT_NAME}.desktop DESTINATION /opt/share/applications/)
+
+# install ini file
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.ini DESTINATION /usr/share/process-info)
+
+ADD_SUBDIRECTORY(po)
diff --git a/sources/wifi-syspopup/include/wifi-syspopup-engine-callback.h b/sources/wifi-syspopup/include/wifi-syspopup-engine-callback.h
new file mode 100644 (file)
index 0000000..9014285
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#ifndef __WIFI_SYSPOPUP_ENGINE_CALLBACK_H__
+#define __WIFI_SYSPOPUP_ENGINE_CALLBACK_H__
+
+void wlan_engine_callback( void *user_data, void *wlan_data);
+void wlan_engine_refresh_callback( void );
+
+#endif
diff --git a/sources/wifi-syspopup/include/wifi-syspopup.h b/sources/wifi-syspopup/include/wifi-syspopup.h
new file mode 100644 (file)
index 0000000..f44bcf8
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#ifndef __WIFI_SYSPOPUP_H__
+#define __WIFI_SYSPOPUP_H__
+
+
+#include "common.h"
+#include "wlan_manager.h"
+
+#define PACKAGE "wifi-qs"
+#define LOCALEDIR "/usr/share/locale"
+#define WIFI_SP_ICON_PATH "/usr/share/icon"
+
+typedef enum {
+       WIFI_SYSPOPUP_SUPPORT_NONE =0,
+       WIFI_SYSPOPUP_SUPPORT_QUICKPANEL=1,
+       WIFI_SYSPOPUP_SUPPORT_MAX
+} WIFI_SYSPOPUP_SUPPORTS;
+
+#define MAX_PROFILE_NUM NETPM_PROFILES_PERSISTENT_MAX
+
+typedef struct wifi_object {
+       /* wifi object attributes */
+       WIFI_SYSPOPUP_SUPPORTS wifi_syspopup_support;
+
+       /* connection_result */
+       int connection_result;
+
+       /* window */
+       Evas_Object* win_main;
+       Evas* evas;
+       bundle* b;
+       Evas_Object* layout_main;
+
+       /* popups */
+       Evas_Object* syspopup;
+       Evas_Object* passpopup;
+       Evas_Object* alertpopup; 
+
+} wifi_object;
+
+typedef enum {
+       ITEM_CONNECTION_MODE_NULL,
+       ITEM_CONNECTION_MODE_OFF,
+       ITEM_CONNECTION_MODE_CONNECTING,
+       ITEM_CONNECTION_MODE_MAX
+} ITEM_CONNECTION_MODES;
+
+typedef struct _genlist_data {
+       Elm_Object_Item *it;
+       Evas_Object *progressbar;
+       ITEM_CONNECTION_MODES connection_mode;
+       wifi_device_info_t *dev_info;
+} genlist_data;
+
+int wifi_syspopup_create(void);
+int wifi_syspopup_destroy(void);
+
+#endif
diff --git a/sources/wifi-syspopup/net.wifi-qs.desktop.in b/sources/wifi-syspopup/net.wifi-qs.desktop.in
new file mode 100644 (file)
index 0000000..c832b7a
--- /dev/null
@@ -0,0 +1,9 @@
+Name=Wi-Fi System Popup
+Type=Application
+Exec=/usr/bin/wifi-qs
+Icon=NULL
+Comment=wifi-qs
+nodisplay=true
+x-tizen-taskmanage=false
+x-tizen-removable=false
+Version=0.1.0
diff --git a/sources/wifi-syspopup/po/CMakeLists.txt b/sources/wifi-syspopup/po/CMakeLists.txt
new file mode 100644 (file)
index 0000000..ce3f07d
--- /dev/null
@@ -0,0 +1,24 @@
+# for i18n
+
+SET(POFILES de_DE.po el_GR.po en.po es_ES.po fr_FR.po it_IT.po ja_JP.po ko_KR.po nl_NL.po pt_PT.po ru_RU.po tr_TR.po zh_CN.po zh_HK.po zh_TW.po)
+
+SET(MSGFMT "/usr/bin/msgfmt")
+
+FOREACH(pofile ${POFILES})
+       SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile})
+       MESSAGE("PO: ${pofile}")
+       GET_FILENAME_COMPONENT(absPofile ${pofile} ABSOLUTE)
+       GET_FILENAME_COMPONENT(lang ${absPofile} NAME_WE)
+       SET(moFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo)
+       ADD_CUSTOM_COMMAND(
+                       OUTPUT ${moFile}
+                       COMMAND ${MSGFMT} -o ${moFile} ${absPofile}
+                       DEPENDS ${absPofile}
+       )
+       INSTALL(FILES ${moFile}
+                       DESTINATION /usr/share/locale/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
+       SET(moFiles ${moFiles} ${moFile})
+ENDFOREACH(pofile)
+
+MESSAGE(".mo files: ${moFiles}")
+ADD_CUSTOM_TARGET(po_sp ALL DEPENDS ${moFiles})
diff --git a/sources/wifi-syspopup/po/de_DE.po b/sources/wifi-syspopup/po/de_DE.po
new file mode 100644 (file)
index 0000000..b69a498
--- /dev/null
@@ -0,0 +1,9 @@
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "Passwort eingeben"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "Passwort anzeigen"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "Netz auswählen"
+
diff --git a/sources/wifi-syspopup/po/el_GR.po b/sources/wifi-syspopup/po/el_GR.po
new file mode 100644 (file)
index 0000000..2a955c6
--- /dev/null
@@ -0,0 +1,9 @@
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "Εισαγωγή κωδικού πρόσβασης"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "Εμφάνιση κωδικού πρόσβασης"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "Επιλογή δικτύου"
+
diff --git a/sources/wifi-syspopup/po/en.po b/sources/wifi-syspopup/po/en.po
new file mode 100644 (file)
index 0000000..11de50f
--- /dev/null
@@ -0,0 +1,9 @@
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "Input password"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "Show password"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "Select network"
+
diff --git a/sources/wifi-syspopup/po/es_ES.po b/sources/wifi-syspopup/po/es_ES.po
new file mode 100644 (file)
index 0000000..803577d
--- /dev/null
@@ -0,0 +1,9 @@
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "Introducir contraseña"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "Mostrar contraseña"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "Seleccionar red"
+
diff --git a/sources/wifi-syspopup/po/fr_FR.po b/sources/wifi-syspopup/po/fr_FR.po
new file mode 100644 (file)
index 0000000..56df377
--- /dev/null
@@ -0,0 +1,9 @@
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "Entrez le mot de passe"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "Afficher le mot de passe"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "Sélectionner un réseau"
+
diff --git a/sources/wifi-syspopup/po/it_IT.po b/sources/wifi-syspopup/po/it_IT.po
new file mode 100644 (file)
index 0000000..adcaa00
--- /dev/null
@@ -0,0 +1,9 @@
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "Inserisci password"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "Mostra password"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "Selezione rete"
+
diff --git a/sources/wifi-syspopup/po/ja_JP.po b/sources/wifi-syspopup/po/ja_JP.po
new file mode 100644 (file)
index 0000000..42c16e5
--- /dev/null
@@ -0,0 +1,9 @@
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "パスワードを​入力してください"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "パスワード​を​表示"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "ネットワーク​を​選択"
+
diff --git a/sources/wifi-syspopup/po/ko_KR.po b/sources/wifi-syspopup/po/ko_KR.po
new file mode 100644 (file)
index 0000000..5eec6f6
--- /dev/null
@@ -0,0 +1,9 @@
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "비밀번호를 입력하세요"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "비밀번호 표시"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "네트워크 선택"
+
diff --git a/sources/wifi-syspopup/po/nl_NL.po b/sources/wifi-syspopup/po/nl_NL.po
new file mode 100644 (file)
index 0000000..c38fe65
--- /dev/null
@@ -0,0 +1,9 @@
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "Wachtwoord ingeven"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "Wachtwoord tonen"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "Netwerk kiezen"
+
diff --git a/sources/wifi-syspopup/po/pt_PT.po b/sources/wifi-syspopup/po/pt_PT.po
new file mode 100644 (file)
index 0000000..018f4ed
--- /dev/null
@@ -0,0 +1,9 @@
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "Introduzir palavra-passe"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "Mostrar palavra-passe"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "Seleccionar rede"
+
diff --git a/sources/wifi-syspopup/po/ru_RU.po b/sources/wifi-syspopup/po/ru_RU.po
new file mode 100644 (file)
index 0000000..057aee5
--- /dev/null
@@ -0,0 +1,9 @@
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "Введите пароль"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "Показать пароль"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "Выбор сети"
+
diff --git a/sources/wifi-syspopup/po/tr_TR.po b/sources/wifi-syspopup/po/tr_TR.po
new file mode 100644 (file)
index 0000000..e231432
--- /dev/null
@@ -0,0 +1,9 @@
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "Şifre giriniz"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "Parolayı göster"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "Şebeke seçimi"
+
diff --git a/sources/wifi-syspopup/po/zh_CN.po b/sources/wifi-syspopup/po/zh_CN.po
new file mode 100644 (file)
index 0000000..28e112e
--- /dev/null
@@ -0,0 +1,9 @@
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "输入密码"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "显示密码"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "选择网络"
+
diff --git a/sources/wifi-syspopup/po/zh_HK.po b/sources/wifi-syspopup/po/zh_HK.po
new file mode 100644 (file)
index 0000000..c65b8a0
--- /dev/null
@@ -0,0 +1,9 @@
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "輸入密碼"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "顯示密碼"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "選擇網絡"
+
diff --git a/sources/wifi-syspopup/po/zh_TW.po b/sources/wifi-syspopup/po/zh_TW.po
new file mode 100644 (file)
index 0000000..cd17237
--- /dev/null
@@ -0,0 +1,9 @@
+msgid "IDS_CST_BODY_INPUT_PASSWORD"
+msgstr "輸入密碼"
+
+msgid "IDS_ST_BODY_SHOW_PASSWORD"
+msgstr "顯示密碼"
+
+msgid "IDS_WIFI_HEADER_SELECT_NETWORK"
+msgstr "選擇網路"
+
diff --git a/sources/wifi-syspopup/viewer-popups/include/view-alerts.h b/sources/wifi-syspopup/viewer-popups/include/view-alerts.h
new file mode 100644 (file)
index 0000000..396a3b8
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#ifndef __DEF_WIFI_SYSPOPUP_VIEW_ALERTS_H_
+#define __DEF_WIFI_SYSPOPUP_VIEW_ALERTS_H_
+
+int view_alerts_powering_on_show(void);
+int view_alerts_connection_fail_show(void);
+int view_alerts_connection_fail_timeout_show(void);
+int view_alerts_password_length_error_show(void);
+
+#endif
diff --git a/sources/wifi-syspopup/viewer-popups/include/view-main.h b/sources/wifi-syspopup/viewer-popups/include/view-main.h
new file mode 100644 (file)
index 0000000..26d066e
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#ifndef __DEF_WIFI_SYSPOPUP_VIEW_MAIN_H_
+#define __DEF_WIFI_SYSPOPUP_VIEW_MAIN_H_
+
+#include <Elementary.h>
+#include "wlan_manager.h"
+#include "wifi-syspopup.h"
+
+/* create */
+Evas_Object *view_main_create(Evas_Object* parent);
+int view_main_destroy(void);
+
+void *view_main_item_set(net_profile_info_t *profile_info);
+
+int view_main_refresh(void);
+int view_main_show(void);
+int view_main_item_connection_mode_set(genlist_data *data, ITEM_CONNECTION_MODES mode);
+
+#endif
diff --git a/sources/wifi-syspopup/viewer-popups/include/view-password.h b/sources/wifi-syspopup/viewer-popups/include/view-password.h
new file mode 100644 (file)
index 0000000..f4b95a5
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#ifndef __DEF_WIFI_SYSPOPUP_VIEW_PASSWORD_H_
+#define __DEF_WIFI_SYSPOPUP_VIEW_PASSWORD_H_
+
+#include "wifi-syspopup.h"
+
+int view_password_show(genlist_data *gdata);
+
+#endif
diff --git a/sources/wifi-syspopup/viewer-popups/view-alerts.c b/sources/wifi-syspopup/viewer-popups/view-alerts.c
new file mode 100644 (file)
index 0000000..30b8c23
--- /dev/null
@@ -0,0 +1,167 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#include "common.h"
+#include "wifi-syspopup.h"
+#include "view-alerts.h"
+#include "i18nmanager.h"
+
+extern wifi_object* app_state;
+
+static void _timeout_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       if (obj)
+               evas_object_del(obj);
+}
+
+int view_alerts_powering_on_show(void)
+{
+       __COMMON_FUNC_ENTER__;
+       if(WIFI_SYSPOPUP_SUPPORT_QUICKPANEL == app_state->wifi_syspopup_support){
+               __COMMON_FUNC_EXIT__;
+               return TRUE;
+       }
+       if(NULL != app_state->alertpopup) {
+               evas_object_del(app_state->alertpopup);
+               app_state->alertpopup = NULL;
+       }
+
+       Evas_Object *conformant = NULL;
+       conformant = elm_conformant_add(app_state->win_main);
+       elm_win_conformant_set(app_state->win_main, EINA_TRUE);
+       elm_win_resize_object_add(app_state->win_main, conformant);
+       evas_object_size_hint_weight_set(conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(conformant, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_show(conformant);
+
+       Evas_Object *content = elm_layout_add(conformant);
+       elm_object_content_set(conformant, content);
+       app_state->alertpopup = elm_popup_add(content);
+
+       Evas_Object *box = elm_box_add(app_state->alertpopup);
+       evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_show(box);
+
+       Evas_Object *progressbar = elm_progressbar_add(box);
+       elm_object_style_set(progressbar, "list_process");
+       evas_object_size_hint_weight_set(progressbar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(progressbar, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       elm_progressbar_pulse(progressbar, EINA_TRUE);
+       evas_object_show(progressbar);
+       elm_box_pack_end(box, progressbar);
+
+       Evas_Object *label = elm_label_add(box);
+       elm_object_style_set(label, "popup/default");
+       evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       elm_object_text_set(label, sc(PACKAGE, I18N_TYPE_Activating));
+       evas_object_show(label);
+       elm_box_pack_end(box, label);
+
+       elm_object_content_set(app_state->alertpopup, box);
+       evas_object_size_hint_weight_set(app_state->alertpopup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_show(app_state->alertpopup);
+
+       __COMMON_FUNC_EXIT__;
+
+       return TRUE;
+}
+
+int view_alerts_connection_fail_show(void)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (WIFI_SYSPOPUP_SUPPORT_QUICKPANEL == app_state->wifi_syspopup_support) {
+               __COMMON_FUNC_EXIT__;
+
+               return TRUE;
+       }
+
+       if (NULL != app_state->alertpopup) {
+               evas_object_del(app_state->alertpopup);
+               app_state->alertpopup = NULL;
+       }
+
+       app_state->alertpopup = elm_popup_add(app_state->win_main);
+       elm_object_text_set(app_state->alertpopup, "Connection attempt failed.<br>Try again.");
+       elm_popup_timeout_set(app_state->alertpopup, 2.0f);
+       evas_object_smart_callback_add(app_state->alertpopup, "timeout", _timeout_cb, NULL);
+       evas_object_size_hint_weight_set(app_state->alertpopup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_show(app_state->alertpopup);
+
+       __COMMON_FUNC_EXIT__;
+
+       return TRUE;
+}
+
+int view_alerts_connection_fail_timeout_show(void)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (WIFI_SYSPOPUP_SUPPORT_QUICKPANEL == app_state->wifi_syspopup_support) {
+               __COMMON_FUNC_EXIT__;
+
+               return TRUE;
+       }
+
+       if (NULL != app_state->alertpopup) {
+               evas_object_del(app_state->alertpopup);
+               app_state->alertpopup = NULL;
+       }
+
+       app_state->alertpopup = elm_popup_add(app_state->win_main);
+       elm_object_text_set(app_state->alertpopup, "No response from AP");
+       elm_popup_timeout_set(app_state->alertpopup, 2.0f);
+       evas_object_smart_callback_add(app_state->alertpopup, "timeout", _timeout_cb, NULL);
+
+       evas_object_size_hint_weight_set(app_state->alertpopup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_show(app_state->alertpopup);
+
+       __COMMON_FUNC_EXIT__;
+
+       return TRUE;
+}
+
+int view_alerts_password_length_error_show(void)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (WIFI_SYSPOPUP_SUPPORT_QUICKPANEL == app_state->wifi_syspopup_support) {
+               __COMMON_FUNC_EXIT__;
+
+               return TRUE;
+       }
+
+       if (NULL != app_state->alertpopup) {
+               evas_object_del(app_state->alertpopup);
+               app_state->alertpopup = NULL;
+       }
+
+       app_state->alertpopup = elm_popup_add(app_state->win_main);
+       elm_object_text_set(app_state->alertpopup, "WPA2 requires 8 - 63 letters for a password.<br>Please, check your input.");
+       elm_popup_timeout_set(app_state->alertpopup, 2.0f);
+       evas_object_smart_callback_add(app_state->alertpopup, "timeout", _timeout_cb, NULL);
+
+       evas_object_size_hint_weight_set(app_state->alertpopup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_show(app_state->alertpopup);
+
+       __COMMON_FUNC_EXIT__;
+
+       return TRUE;
+}
diff --git a/sources/wifi-syspopup/viewer-popups/view-main.c b/sources/wifi-syspopup/viewer-popups/view-main.c
new file mode 100644 (file)
index 0000000..56b07d3
--- /dev/null
@@ -0,0 +1,393 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#include "common.h"
+#include "view-main.h"
+#include "wifi-syspopup.h"
+#include "view-password.h"
+
+extern wifi_object* app_state;
+
+static Evas_Object* list = NULL;
+static Elm_Genlist_Item_Class itc;
+
+int view_main_item_connection_mode_set(genlist_data *data, ITEM_CONNECTION_MODES mode)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (data == NULL) {
+               WARN_LOG(SP_NAME_NORMAL, "NULL == data");
+               __COMMON_FUNC_EXIT__;
+               return FALSE;
+       }
+
+       if (ITEM_CONNECTION_MODE_NULL >= mode || ITEM_CONNECTION_MODE_MAX <= mode) {
+               ERROR_LOG(SP_NAME_NORMAL, "mode[%d] is not valid", mode);
+               __COMMON_FUNC_EXIT__;
+               return FALSE;
+       }
+
+       /* mode set */
+       data->connection_mode = mode;
+       INFO_LOG(SP_NAME_NORMAL, "mode: [%d]", data->connection_mode);
+
+       elm_genlist_item_update(data->it);
+
+       __COMMON_FUNC_EXIT__;
+
+       return TRUE;
+}
+
+static ITEM_CONNECTION_MODES view_main_state_get(Evas_Object *glist)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (glist == NULL)
+               return ITEM_CONNECTION_MODE_NULL;
+
+       Elm_Object_Item* it = NULL;
+       it = elm_genlist_first_item_get(glist);
+       while (it) {
+               genlist_data *gdata = (genlist_data *)elm_object_item_data_get(it);
+               if (gdata->connection_mode == ITEM_CONNECTION_MODE_CONNECTING) {
+                       return ITEM_CONNECTION_MODE_CONNECTING;
+               }
+
+               it = elm_genlist_item_next_get(it);
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return ITEM_CONNECTION_MODE_OFF;
+}
+
+static void _gl_sel(void *data, Evas_Object *obj, void *event_info)
+{
+       __COMMON_FUNC_ENTER__;
+       if (view_main_state_get(obj) != ITEM_CONNECTION_MODE_OFF) {
+               INFO_LOG(SP_NAME_NORMAL, "In connecting state, nothing can do" );
+               __COMMON_FUNC_EXIT__;
+               return;
+       }
+
+       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+
+       assertm_if(NULL == data, "data is NULL!!");
+       assertm_if(NULL == obj, "obj is NULL!!");
+       genlist_data *gdata = (genlist_data*) data;
+
+       int ret = WLAN_MANAGER_ERR_UNKNOWN;
+
+       switch (gdata->connection_mode) {
+       case ITEM_CONNECTION_MODE_OFF:
+               INFO_LOG( SP_NAME_NORMAL, "item state: off");
+               ret = wlan_manager_request_connection(gdata->dev_info);
+
+               break;
+       case ITEM_CONNECTION_MODE_CONNECTING:
+               INFO_LOG( SP_NAME_NORMAL, "item state: connecting");
+               break;
+       default:
+               ERROR_LOG( SP_NAME_NORMAL, "item state: etc [%d]", gdata->connection_mode);
+               break;
+       }
+
+       switch (ret) {
+       case WLAN_MANAGER_ERR_NONE:
+               INFO_LOG( SP_NAME_NORMAL, "ERROR_NONE");
+               view_main_item_connection_mode_set(gdata, ITEM_CONNECTION_MODE_CONNECTING);
+               break;
+       case WLAN_MANAGER_ERR_CONNECT_PASSWORD_NEEDED:
+               INFO_LOG( SP_NAME_NORMAL, "Password view will show up");
+               view_password_show(gdata);
+               break;
+       default:
+               view_main_item_connection_mode_set(gdata, ITEM_CONNECTION_MODE_OFF);
+               view_main_refresh();
+               ERROR_LOG( SP_NAME_NORMAL, "errro code [%d]", ret);
+               break;
+       }
+
+       elm_genlist_item_selected_set(item, 0);
+       elm_genlist_item_update(item);
+
+       __COMMON_FUNC_EXIT__;
+}
+
+static char *_gl_text_get(void *data, Evas_Object *obj, const char *part)
+{
+       __COMMON_FUNC_ENTER__;
+       assertm_if(NULL == data, "data param is NULL!!");
+       assertm_if(NULL == obj, "obj param is NULL!!");
+       assertm_if(NULL == part, "part param is NULL!!");
+
+       genlist_data *gdata = (genlist_data *) data;
+       const char* ssid_name = gdata->dev_info->ssid;
+
+       if (ssid_name == NULL) {
+               __COMMON_FUNC_EXIT__;
+               ERROR_LOG(SP_NAME_NORMAL, "ssid name is NULL!!");
+               return NULL;
+       }
+       __COMMON_FUNC_EXIT__;
+
+       return strdup(ssid_name);
+}
+
+static char *wifi_get_device_icon(wifi_device_info_t *device_info)
+{
+       __COMMON_FUNC_ENTER__;
+       assertm_if(NULL == device_info, "device param is NULL!!");
+
+       char tmp_str[128] = {0,};
+       char* ret;
+
+       sprintf(tmp_str, "%s/37_wifi_icon", WIFI_SP_ICON_PATH);
+
+       if (device_info->security_mode != WLAN_SEC_MODE_NONE) {
+               sprintf(tmp_str,"%s_lock", tmp_str);
+       }
+
+       switch (wlan_manager_get_signal_strength(device_info->rssi)) {
+       case SIGNAL_STRENGTH_TYPE_EXCELLENT:
+               sprintf(tmp_str,"%s_03", tmp_str);
+               break;
+       case SIGNAL_STRENGTH_TYPE_GOOD:
+               sprintf(tmp_str,"%s_02", tmp_str);
+               break;
+       case SIGNAL_STRENGTH_TYPE_WEAK:
+               sprintf(tmp_str,"%s_01", tmp_str);
+               break;
+       case SIGNAL_STRENGTH_TYPE_VERY_WEAK:
+       case SIGNAL_STRENGTH_TYPE_NULL:
+               sprintf(tmp_str,"%s_00", tmp_str);
+               break;
+       }
+
+       sprintf(tmp_str, "%s.png", tmp_str);
+
+       ret = strdup(tmp_str);
+       __COMMON_FUNC_EXIT__;
+
+       return ret;
+}
+
+static Evas_Object *_gl_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       __COMMON_FUNC_ENTER__;
+       if (data == NULL)
+               return NULL;
+
+       genlist_data *gdata = (genlist_data *) data;
+
+       const char* ssid_name = gdata->dev_info->ssid;
+       INFO_LOG(SP_NAME_NORMAL, "ssid name [%s]", ssid_name);
+
+       char*dev_icon_file = NULL;
+       Evas_Object* icon = NULL;
+
+       if (!strncmp(part, "elm.icon.1", strlen(part))) {
+               switch (gdata->connection_mode) {
+               case ITEM_CONNECTION_MODE_OFF:
+                       if (gdata->progressbar != NULL) {
+                               elm_progressbar_pulse(gdata->progressbar, EINA_FALSE);
+                               evas_object_del(gdata->progressbar);
+                               gdata->progressbar = NULL;
+                       }
+
+                       icon = elm_icon_add(obj);
+                       dev_icon_file = wifi_get_device_icon(gdata->dev_info);
+                       INFO_LOG(SP_NAME_NORMAL, "icon name [%s]", dev_icon_file);
+                       elm_icon_file_set(icon, dev_icon_file, NULL);
+                       g_free(dev_icon_file);
+                       evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 5, 5);
+                       return icon;
+
+               case ITEM_CONNECTION_MODE_CONNECTING:
+                       gdata->progressbar = elm_progressbar_add(obj);
+                       if (gdata->progressbar == NULL)
+                               return NULL;
+
+                       elm_object_style_set(gdata->progressbar, "list_process");
+                       evas_object_size_hint_align_set(gdata->progressbar, EVAS_HINT_FILL, 0.5);
+                       evas_object_size_hint_weight_set(gdata->progressbar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+                       elm_progressbar_pulse(gdata->progressbar, TRUE);
+                       return gdata->progressbar;
+               default:
+                       break;
+               }
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return NULL;
+}
+
+Evas_Object *view_main_create(Evas_Object* parent)
+{
+       __COMMON_FUNC_ENTER__;
+       assertm_if(NULL == parent, "parent is NULL!!");
+
+       list = elm_genlist_add(parent); //app_state->win_main);
+       assertm_if(NULL == list, "list allocation fail!!");
+
+       elm_genlist_mode_set(list, ELM_LIST_LIMIT);
+       evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+       __COMMON_FUNC_EXIT__;
+
+       return list;
+}
+
+int view_main_destroy(void)
+{
+       __COMMON_FUNC_ENTER__;
+       if(NULL != list) {
+               evas_object_del(list);
+               list = NULL;
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return TRUE;
+}
+
+static void view_main_scan_ui_clear(void)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (list == NULL)
+               return;
+
+       Elm_Object_Item* it = NULL;
+       it = elm_genlist_first_item_get(list);
+       while (it) {
+               genlist_data *gdata = (genlist_data *)elm_object_item_data_get(it);
+               if (gdata)
+                       g_free(gdata);
+
+               it = elm_genlist_item_next_get(it);
+       }
+
+       elm_genlist_clear(list);
+
+       __COMMON_FUNC_EXIT__;
+}
+
+void *view_main_item_set(net_profile_info_t *profile_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       wifi_device_info_t *wifi_device = (wifi_device_info_t*)malloc(sizeof(wifi_device_info_t));
+       memset(wifi_device, 0, sizeof(wifi_device_info_t));
+
+       wifi_device->profile_name = strdup(profile_info->ProfileName);
+       wifi_device->ssid = strdup(profile_info->ProfileInfo.Wlan.essid);
+       wifi_device->rssi = (int)profile_info->ProfileInfo.Wlan.Strength;
+       wifi_device->security_mode = (int)profile_info->ProfileInfo.Wlan.security_info.sec_mode;
+       wifi_device->wps_mode = (int)profile_info->ProfileInfo.Wlan.security_info.wps_support;
+
+       __COMMON_FUNC_EXIT__;
+       return wifi_device;
+}
+
+int view_main_refresh()
+{
+       view_main_scan_ui_clear();
+       view_main_show();
+       return TRUE;
+}
+
+int view_main_show(void)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (list == NULL) {
+               ERROR_LOG( SP_NAME_NORMAL, "list is NULL!!" );
+               return FALSE;
+       }
+
+       char profile_name[NET_PROFILE_NAME_LEN_MAX+1] = "";
+       int state = wlan_manager_state_get(profile_name);
+       switch (state) {
+       case WLAN_MANAGER_ERROR:
+       case WLAN_MANAGER_OFF:
+               return FALSE;
+       case WLAN_MANAGER_UNCONNECTED:
+       case WLAN_MANAGER_CONNECTED:
+       case WLAN_MANAGER_DISCONNECTING:
+               profile_name[0] = '\0';
+               break;
+       case WLAN_MANAGER_CONNECTING:
+               break;
+       }
+
+       view_main_scan_ui_clear();
+
+       net_profile_info_t *profiles_list = wlan_manager_profile_table_get();
+       if (profiles_list == NULL)
+               return FALSE;
+
+       int profiles_list_size = wlan_manager_profile_scanned_length_get();
+       INFO_LOG(SP_NAME_NORMAL, "profiles list count [%d]\n", profiles_list_size);
+
+       itc.item_style = "1text.1icon.4";
+       itc.func.text_get = _gl_text_get;
+       itc.func.content_get = _gl_content_get;
+       itc.func.state_get = NULL;
+       itc.func.del = NULL;
+
+       int i = 0;
+       wifi_device_info_t *device_info = NULL;
+       if (profiles_list_size > 0) {
+        if (profile_name[0] == '\0') {
+                   for (i = 0; i < profiles_list_size; i++) {
+                               device_info = (wifi_device_info_t *)view_main_item_set(profiles_list+i);
+
+                               genlist_data *gdata = (genlist_data *) malloc(sizeof(genlist_data));
+                               gdata->dev_info = device_info;
+                               gdata->connection_mode = ITEM_CONNECTION_MODE_OFF;
+                               gdata->progressbar = NULL;
+
+                               gdata->it = elm_genlist_item_append(list, &itc, gdata, NULL, ELM_GENLIST_ITEM_NONE, _gl_sel, gdata);
+                               elm_object_item_data_set(gdata->it, gdata);
+               }
+        } else {
+                       for (i = 0; i < profiles_list_size; i++) {
+                               device_info = (wifi_device_info_t *)view_main_item_set(profiles_list+i);
+
+                               genlist_data *gdata = (genlist_data *) malloc(sizeof(genlist_data));
+                               gdata->dev_info = device_info;
+                               gdata->progressbar = NULL;
+                               if (!strcmp((profiles_list+i)->ProfileName, profile_name)) {
+                                       gdata->connection_mode = ITEM_CONNECTION_MODE_CONNECTING;
+                               } else {
+                                       gdata->connection_mode = ITEM_CONNECTION_MODE_OFF;
+                               }
+
+                               gdata->it = elm_genlist_item_append(list, &itc, gdata, NULL, ELM_GENLIST_ITEM_NONE, _gl_sel, gdata);
+                               elm_object_item_data_set(gdata->it, gdata);
+                       }
+        }
+       } else if (profiles_list_size == 0) {
+               WARN_LOG(SP_NAME_NORMAL, "scan size is ZERO");
+       }
+
+       evas_object_show(list);
+       __COMMON_FUNC_EXIT__;
+
+       return TRUE;
+}
diff --git a/sources/wifi-syspopup/viewer-popups/view-password.c b/sources/wifi-syspopup/viewer-popups/view-password.c
new file mode 100644 (file)
index 0000000..4160d08
--- /dev/null
@@ -0,0 +1,225 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#include "common.h"
+#include "wifi-syspopup.h"
+#include "view-password.h"
+#include "wlan_manager.h"
+#include "view-main.h"
+#include "view-alerts.h"
+#include "i18nmanager.h"
+
+
+extern wifi_object* app_state;
+static Evas_Object* _entry = NULL;
+
+typedef struct _qs_view_password_data {
+       char *profile_name;
+       int security_mode;
+} qs_view_password_data;
+static qs_view_password_data *_qs_password_data = NULL;
+
+static void _entry_changed_cb(void* data, Evas_Object* obj, void* event_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (elm_object_focus_get(data)) {
+               if (elm_entry_is_empty(obj))
+                       elm_object_signal_emit(data, "elm,state,eraser,hide", "elm");
+               else
+                       elm_object_signal_emit(data, "elm,state,eraser,show", "elm");
+       }
+
+       __COMMON_FUNC_EXIT__;
+}
+
+static void _entry_focused_cb(void* data, Evas_Object* obj, void* event_info)
+{
+       if (!elm_entry_is_empty(obj))
+               elm_object_signal_emit(data, "elm,state,eraser,show", "elm");
+
+       elm_object_signal_emit(data, "elm,state,guidetext,hide", "elm");
+}
+
+static void _entry_unfocused_cb(void* data, Evas_Object* obj, void* event_info)
+{
+       if (elm_entry_is_empty(obj))
+               elm_object_signal_emit(data, "elm,state,guidetext,show", "elm");
+
+       elm_object_signal_emit(data, "elm,state,eraser,hide", "elm");
+}
+
+static void _eraser_clicked_cb(void* data, Evas_Object* obj, const char* emission, const char* source)
+{
+       elm_entry_entry_set(data, "");
+}
+
+static void _popup_ok_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       assertm_if(NULL == data, "data is NULL!!");
+       assertm_if(NULL == obj, "obj is NULL!!");
+       assertm_if(NULL == event_info, "event_info is NULL!!");
+
+       char* password = NULL;
+       int len_password = 0;
+       int ret = -1;
+
+       password = elm_entry_markup_to_utf8(elm_entry_entry_get(_entry));
+       len_password = strlen(password);
+       INFO_LOG(SP_NAME_NORMAL, "* password len [%d]", len_password);
+
+       if(len_password == 5 || (len_password > 7 && len_password < 64) ) {
+               wlan_manager_password_data* param= (wlan_manager_password_data*) g_malloc0(sizeof(wlan_manager_password_data));
+               assertm_if(NULL == param, "param is NULL!!");
+
+               param->wlan_eap_type = WLAN_MANAGER_EAP_TYPE_NONE;
+               param->password = strdup(password);
+               g_free(password);
+
+               genlist_data *gdata = (genlist_data *)data;
+               ret = wlan_manager_connect_with_password(_qs_password_data->profile_name, _qs_password_data->security_mode, param);
+               g_free(param->password);
+               g_free(param);
+
+               view_main_item_connection_mode_set(gdata, ITEM_CONNECTION_MODE_CONNECTING);
+       } else {
+               view_alerts_password_length_error_show();
+               return;
+       }
+
+       if (_qs_password_data) {
+               g_free(_qs_password_data);
+               _qs_password_data = NULL;
+       }
+
+       evas_object_del(app_state->passpopup);
+       app_state->passpopup = NULL;
+
+       __COMMON_FUNC_EXIT__;
+}
+
+static void _popup_cancel_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       __COMMON_FUNC_ENTER__;
+
+       INFO_LOG(SP_NAME_NORMAL, "button cancel");
+       if (_qs_password_data) {
+               g_free(_qs_password_data);
+               _qs_password_data = NULL;
+       }
+
+       evas_object_del(app_state->passpopup);
+       app_state->passpopup = NULL;
+
+       __COMMON_FUNC_EXIT__;
+}
+
+static void _check_changed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       if (obj == NULL)
+               return;
+
+       Eina_Bool state = elm_check_state_get(obj);
+       elm_entry_password_set(_entry, !state);
+}
+
+int view_password_show(genlist_data *gdata)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (gdata == NULL)
+               return FALSE;
+
+       assertm_if(NULL == app_state, "app_state is NULL!!");
+       assertm_if(NULL == app_state->win_main, "app_state->win_main is NULL!!");
+
+       _qs_password_data = (qs_view_password_data *) malloc(sizeof(qs_view_password_data));
+       if (_qs_password_data == NULL)
+               return FALSE;
+
+       memset(_qs_password_data, 0, sizeof(qs_view_password_data));
+       _qs_password_data->profile_name = strdup(gdata->dev_info->profile_name);
+       _qs_password_data->security_mode = gdata->dev_info->security_mode;
+
+       Evas_Object *conformant = NULL;
+       conformant = elm_conformant_add(app_state->win_main);
+       assertm_if(NULL == conformant, "conformant is NULL!!");
+       elm_win_conformant_set(app_state->win_main, EINA_TRUE);
+       elm_win_resize_object_add(app_state->win_main, conformant);
+       evas_object_size_hint_weight_set(conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(conformant, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_show(conformant);
+
+       Evas_Object *content = elm_layout_add(conformant);
+       elm_object_content_set(conformant, content);
+       app_state->passpopup = NULL;
+       app_state->passpopup = elm_popup_add(content);
+       assertm_if(NULL == app_state->syspopup, "app_state->syspopup is NULL!!");
+       elm_object_part_text_set(app_state->passpopup, "title,text", sc(PACKAGE, I18N_TYPE_Password));
+
+       Evas_Object *box = elm_box_add(app_state->syspopup);
+       evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_show(box);
+
+       Evas_Object *ly_editfield = elm_layout_add(box);
+       elm_layout_theme_set(ly_editfield, "layout", "editfield", "title");
+       evas_object_size_hint_weight_set(ly_editfield, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(ly_editfield, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       _entry = elm_entry_add(box);
+       elm_object_part_content_set(ly_editfield, "elm.swallow.content", _entry);
+       elm_object_part_text_set(ly_editfield, "elm.text", sc(PACKAGE, I18N_TYPE_Input_password));
+       elm_entry_single_line_set(_entry, EINA_TRUE);
+       elm_entry_scrollable_set(_entry, EINA_TRUE);
+
+       evas_object_smart_callback_add(_entry, "changed", _entry_changed_cb, ly_editfield);
+       evas_object_smart_callback_add(_entry, "focused", _entry_focused_cb, ly_editfield);
+       evas_object_smart_callback_add(_entry, "unfocused", _entry_unfocused_cb, ly_editfield);
+       elm_object_signal_callback_add(ly_editfield, "elm,eraser,clicked", "elm", _eraser_clicked_cb, _entry);
+
+       elm_entry_password_set(_entry, TRUE);
+       evas_object_show(_entry);
+       evas_object_show(ly_editfield);
+       elm_box_pack_end(box, ly_editfield);
+
+       Evas_Object *check = elm_check_add(box);
+       elm_object_text_set(check, sc(PACKAGE, I18N_TYPE_Show_password));
+       elm_object_focus_allow_set(check, EINA_FALSE);
+       evas_object_size_hint_weight_set(check, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(check, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_smart_callback_add(check, "changed", _check_changed_cb, NULL);
+       evas_object_show(check);
+       elm_box_pack_end(box, check);
+
+       elm_object_content_set(app_state->passpopup, box);
+       Evas_Object *btn_ok = elm_button_add(app_state->passpopup);
+       elm_object_text_set(btn_ok, sc(PACKAGE, I18N_TYPE_Ok));
+       elm_object_part_content_set(app_state->passpopup, "button1", btn_ok);
+       evas_object_smart_callback_add(btn_ok, "clicked", _popup_ok_cb, gdata);
+       Evas_Object *btn_cancel = elm_button_add(app_state->passpopup);
+       elm_object_text_set(btn_cancel, sc(PACKAGE, I18N_TYPE_Cancel));
+       elm_object_part_content_set(app_state->passpopup, "button2", btn_cancel);
+       evas_object_smart_callback_add(btn_cancel, "clicked", _popup_cancel_cb, gdata);
+       evas_object_show(app_state->passpopup);
+
+       __COMMON_FUNC_EXIT__;
+
+       return TRUE;
+}
diff --git a/sources/wifi-syspopup/wifi-qs.ini b/sources/wifi-syspopup/wifi-qs.ini
new file mode 100644 (file)
index 0000000..5abbace
--- /dev/null
@@ -0,0 +1,2 @@
+[ProcessSetting]
+BG_SCHEDULE=true
diff --git a/sources/wifi-syspopup/wifi-syspopup-engine-callback.c b/sources/wifi-syspopup/wifi-syspopup-engine-callback.c
new file mode 100644 (file)
index 0000000..c1bef47
--- /dev/null
@@ -0,0 +1,180 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#include <vconf-keys.h>
+#include <syspopup_caller.h>
+#include "common.h"
+#include "wifi-syspopup-engine-callback.h"
+#include "wlan_manager.h"
+#include "view-main.h"
+#include "view-alerts.h"
+
+
+extern wifi_object* app_state;
+
+int wlan_show_network_syspopup_message(const char *title, const char *content, const char *ssid)
+{
+       int ret = 0;
+       bundle *b = bundle_create();
+
+       bundle_add(b, "_SYSPOPUP_TITLE_", title);
+       bundle_add(b, "_SYSPOPUP_CONTENT_", content);
+       bundle_add(b, "_AP_NAME_", ssid);
+
+       ret = syspopup_launch("net-popup", b);
+       bundle_free(b);
+
+       return ret;
+}
+
+/* wlan_manager handler */
+void wlan_engine_callback(void *user_data, void *wlan_data)
+{
+       __COMMON_FUNC_ENTER__;
+
+       assertm_if(NULL == wlan_data, "wlan data is NULL!!");
+
+       callback_data* det = (callback_data*)wlan_data;
+
+       INFO_LOG(SP_NAME_NORMAL, "callback data response type [%d]", det->type);
+
+       switch (det->type) {
+       case WLAN_MANAGER_RESPONSE_TYPE_NONE:
+               ERROR_LOG(SP_NAME_ERR, "case NONE:");
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_OK:
+               INFO_LOG(SP_NAME_NORMAL, "case CONNECTION_OK:");
+
+               app_state->connection_result = VCONFKEY_WIFI_QS_WIFI_CONNECTED;
+               wifi_syspopup_destroy();
+
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_FAIL_IN_PROGRESS:
+               INFO_LOG(SP_NAME_NORMAL, "case CONNECTION FAIL:");
+
+               view_main_refresh();
+
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_FAIL_UNKNOWN:
+               INFO_LOG(SP_NAME_NORMAL, "case CONNECTION FAIL UNKNOWN:");
+
+               wlan_show_network_syspopup_message("Network connection popup", "unable to connect", NULL);
+               view_main_refresh();
+
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_FAIL_TIMEOUT:
+               INFO_LOG(SP_NAME_NORMAL, "case CONNECTION FAIL TIMEOUT:");
+
+               view_alerts_connection_fail_timeout_show();
+               view_main_refresh();
+
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_DISCONNECTION_OK:
+               ERROR_LOG(SP_NAME_NORMAL, "case DISCONNECTION OK:");
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_POWER_ON_OK:
+               INFO_LOG(SP_NAME_NORMAL, "case POWER ON OK:");
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_POWER_ON_NOT_SUPPORTED:
+               INFO_LOG(SP_NAME_NORMAL, "case POWER ON NOT SUPPORTED:");
+               wlan_show_network_syspopup_message("Network connection popup", "not support", NULL);
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_POWER_ON_RESTRICTED:
+               INFO_LOG(SP_NAME_NORMAL, "case POWER ON RESTRICTED:");
+               wlan_show_network_syspopup_message("Network connection popup", "wifi restricted", NULL);
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_POWER_OFF_OK:
+               INFO_LOG(SP_NAME_NORMAL, "case POWER OFF OK:");
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_SCAN_OK:
+               INFO_LOG(SP_NAME_NORMAL, "case SCAN OK:");
+               wlan_manager_scanned_profile_refresh(TRUE);
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_WPS_ENROLL_OK:
+               INFO_LOG(SP_NAME_NORMAL, "case WPS ENROLL OK:");
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_WPS_ENROLL_FAIL:
+               INFO_LOG(SP_NAME_NORMAL, "case WPS ENROLL FAIL:");
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_CANCEL_WPS_ENROLL_OK:
+               INFO_LOG(SP_NAME_NORMAL, "case CANCEL WPS ENROLL OK:");
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_CANCEL_WPS_ENROLL_FAIL:
+               INFO_LOG(SP_NAME_NORMAL, "case CANCEL WPS ENROLL FAIL:");
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_CONNECTION_IND:
+               INFO_LOG(SP_NAME_NORMAL, "case CONNECTION IND:");
+
+               const char *ssid = wlan_manager_get_connected_ssid();
+               wlan_show_network_syspopup_message("Network connection popup", "wifi connected", ssid);
+               app_state->connection_result = VCONFKEY_WIFI_QS_WIFI_CONNECTED;
+               wifi_syspopup_destroy();
+
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_DISCONNECTION_IND:
+               INFO_LOG(SP_NAME_NORMAL, "case DISCONNECTION IND:");
+               break;
+       case WLAN_MANAGER_RESPONSE_TYPE_SCAN_RESULT_IND:
+               INFO_LOG(SP_NAME_NORMAL, "case SCAN RESULT IND:");
+               wlan_manager_scanned_profile_refresh(TRUE);
+               break;
+       default:
+               ERROR_LOG(SP_NAME_ERR, "case Err [%d]", det->type);
+               break;
+       }
+
+       if (det) {
+               if (det->profile_name)
+                       g_free(det->profile_name);
+               g_free(det);
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return;
+}
+
+void wlan_engine_refresh_callback(void)
+{
+       __COMMON_FUNC_ENTER__;
+
+       if (NULL == app_state) {
+               INFO_LOG(SP_NAME_ERR, "app_state is NULL!! Is it test mode?");
+
+               __COMMON_FUNC_EXIT__;
+               return;
+       }
+
+       if (NULL == app_state->layout_main) {
+               /* Make System popup filled, if it was first launched */
+               if (NULL != app_state->alertpopup) {
+                       /* deallocate alert popup if it has allocated */
+                       evas_object_del(app_state->alertpopup);
+                       app_state->alertpopup = NULL;
+               }
+
+               INFO_LOG(SP_NAME_NORMAL, "Wi-Fi QS launch");
+               wifi_syspopup_create();
+       }
+
+       if (view_main_show() == FALSE) {
+               ERROR_LOG(SP_NAME_ERR, "view_main_show == FALSE");
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return;
+}
diff --git a/sources/wifi-syspopup/wifi-syspopup.c b/sources/wifi-syspopup/wifi-syspopup.c
new file mode 100644 (file)
index 0000000..a4a6f2b
--- /dev/null
@@ -0,0 +1,521 @@
+/*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+
+
+
+#include <syspopup.h>
+#include "common.h"
+#include "wlan_manager.h"
+#include "appcoreWrapper.h"
+#include "wifi-syspopup.h"
+#include "wifi-syspopup-engine-callback.h"
+#include "view-main.h"
+#include "view-alerts.h"
+#include "wifi-setting.h"
+#include "i18nmanager.h"
+
+
+wifi_object* app_state = NULL;
+
+/* static */
+static int myterm(bundle* b, void* data);
+static int mytimeout(bundle *b, void* data);
+static int wifi_syspopup_exit( void );
+static void _exit_cb(void *data, Evas_Object *obj, void *event_info);
+static int syspopup_support_set(const char* support);
+static int app_reset(bundle *b, void *data);
+static int app_init(void *data);
+static int app_exit(void *data);
+static int app_start(void *data);
+static int app_stop(void *data);
+static int _power_on (void);
+
+
+/* implements */
+static int myterm(bundle* b, void* data)
+{
+       __COMMON_FUNC_ENTER__;
+       wifi_syspopup_exit();
+
+       __COMMON_FUNC_EXIT__;
+       return FALSE;
+}
+
+static int mytimeout(bundle *b, void* data)
+{
+       __COMMON_FUNC_ENTER__;
+       __COMMON_FUNC_EXIT__;
+
+       return FALSE;
+}
+
+syspopup_handler handler = {
+       .def_term_fn = myterm,
+       .def_timeout_fn = mytimeout
+};
+
+static int wifi_syspopup_exit(void)
+{
+       __COMMON_FUNC_ENTER__;
+       view_main_destroy();
+       wlan_manager_destroy();
+
+       if (g_pending_call.is_handled) {
+               dbus_g_proxy_cancel_call(g_pending_call.proxy, g_pending_call.pending_call);
+               g_pending_call.is_handled = FALSE;
+               memset(&g_pending_call, 0, sizeof(wifi_pending_call_info_t));
+       }
+
+       if (VCONFKEY_WIFI_QS_WIFI_CONNECTED == app_state->connection_result) {
+               INFO_LOG(SP_NAME_NORMAL, "Result : WIFI");
+       } else if (VCONFKEY_WIFI_QS_3G == app_state->connection_result) {
+               INFO_LOG(SP_NAME_NORMAL, "Result : 3G");
+       } else {
+               WARN_LOG(SP_NAME_NORMAL, "Result : ?? [%d]", app_state->connection_result);
+               app_state->connection_result = VCONFKEY_WIFI_QS_3G;
+       }
+
+       wifi_setting_value_set("memory/wifi/wifi_qs_exit", app_state->connection_result);
+
+       elm_exit();
+
+       __COMMON_FUNC_EXIT__;
+
+       return TRUE;
+}
+
+static void _exit_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       __COMMON_FUNC_ENTER__;
+       wifi_syspopup_exit();
+       __COMMON_FUNC_EXIT__;
+}
+
+int wifi_syspopup_destroy(void)
+{
+       if (app_state->syspopup)
+               evas_object_del(app_state->syspopup);
+
+       if (app_state->layout_main)
+               evas_object_del(app_state->layout_main);
+
+       if (app_state->win_main)
+               evas_object_del(app_state->win_main);
+
+       wifi_syspopup_exit();
+
+       return TRUE;
+}
+
+int wifi_syspopup_create(void)
+{
+       __COMMON_FUNC_ENTER__;
+       app_state->layout_main = elm_layout_add(app_state->win_main);
+       assertm_if(NULL == app_state->layout_main, "layout_main is NULL!!");
+       evas_object_hide(app_state->layout_main);
+
+       app_state->syspopup = elm_popup_add(app_state->win_main);
+       assertm_if(NULL == app_state->syspopup, "syspopup is NULL!!");
+
+       elm_object_style_set(app_state->syspopup,"menustyle");
+       elm_object_part_text_set(app_state->syspopup, "title,text", sc(PACKAGE, I18N_TYPE_Select_network));
+       evas_object_size_hint_weight_set(app_state->syspopup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+       Evas_Object *btn_cancel = elm_button_add(app_state->syspopup);
+       elm_object_text_set(btn_cancel, sc(PACKAGE, I18N_TYPE_Cancel));
+       elm_object_part_content_set(app_state->syspopup, "button1", btn_cancel);
+       evas_object_smart_callback_add(btn_cancel, "clicked", _exit_cb, NULL);
+
+       elm_popup_orient_set(app_state->syspopup, ELM_POPUP_ORIENT_CENTER);
+       evas_object_show(app_state->syspopup);
+
+       Evas_Object *main_list = view_main_create(app_state->syspopup);
+       if (main_list == NULL)
+               return FALSE;
+
+       elm_object_content_set(app_state->syspopup, main_list);
+
+       memset(&g_pending_call, 0, sizeof(wifi_pending_call_info_t));
+
+       __COMMON_FUNC_EXIT__;
+
+       return TRUE;
+}
+
+int wifi_syspopup_init()
+{
+       __COMMON_FUNC_ENTER__;
+
+       wlan_manager_create();
+       wlan_manager_set_message_callback(wlan_engine_callback);
+       wlan_manager_set_refresh_callback(wlan_engine_refresh_callback);
+
+       int wlan_ret = wlan_manager_start(NULL);
+       switch (wlan_ret) {
+       case WLAN_MANAGER_ERR_NONE:
+               INFO_LOG(SP_NAME_NORMAL, "wlan_manager start complete" );
+               break;
+       case WLAN_MANAGER_ERR_ALREADY_REGISTERED:
+               ERROR_LOG(SP_NAME_ERR, "fail already register." );
+               break;
+       case WLAN_MANAGER_ERR_UNKNOWN:
+               ERROR_LOG(SP_NAME_ERR, "wlan fail communication." );
+               break;
+       default:
+               ERROR_LOG(SP_NAME_ERR, "wlan_manager start fail ret[%d]", wlan_ret );
+               break;
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return wlan_ret;
+}
+
+static int syspopup_support_set(const char* support) {
+       __COMMON_FUNC_ENTER__;
+
+       if(NULL == support) {
+               __COMMON_FUNC_EXIT__;
+               return FALSE;
+       }
+
+       if(strcmp("WIFI_SYSPOPUP_SUPPORT_QUICKPANEL",support) == 0) {
+               app_state->wifi_syspopup_support = WIFI_SYSPOPUP_SUPPORT_QUICKPANEL;
+       } else {
+               __COMMON_FUNC_EXIT__;
+               return FALSE;
+       }
+       __COMMON_FUNC_EXIT__;
+
+       return TRUE;
+}
+
+static void _mobilehotspot_disable_cb(DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data)
+{
+       __COMMON_FUNC_ENTER__;
+
+       GError *err = NULL;
+       guint type;
+       guint result;
+       DBusGConnection *bus = user_data;
+
+       dbus_g_proxy_end_call(proxy, call, &err, G_TYPE_UINT, &type,
+                                                       G_TYPE_UINT, &result, G_TYPE_INVALID);
+       if (err != NULL) {
+               INFO_LOG(SP_NAME_ERR, "Error occured [%s]\n", err->message);
+               g_error_free(err);
+       } else {
+               INFO_LOG(SP_NAME_NORMAL, "TYPE = %d,  Result = %d\n", type, result);
+               if (type == 1 && result == 0) {
+                       INFO_LOG(SP_NAME_NORMAL, "OK\n");
+                       int ret = wlan_manager_request_power_on();
+                       INFO_LOG(SP_NAME_NORMAL, "power_on ret[%d]", ret);
+               }
+       }
+
+       g_pending_call.is_handled = FALSE;
+
+       g_object_unref(proxy);
+       dbus_g_connection_unref(bus);
+       wifi_syspopup_exit();
+
+       __COMMON_FUNC_EXIT__;
+}
+
+static boolean _turn_off_mobile_hotspot(void)
+{
+       __COMMON_FUNC_ENTER__;
+
+       DBusGConnection *bus;
+       DBusGProxy *proxy;
+       GError *error= NULL;
+
+       bus = dbus_g_bus_get(DBUS_BUS_SYSTEM, &error);
+       if (error != NULL) {
+               INFO_LOG(SP_NAME_ERR, "Couldn't connect to the system bus");
+               g_error_free(error);
+               return FALSE;
+       }
+
+       proxy = dbus_g_proxy_new_for_name(bus,
+                                       "org.tizen.mobileap",
+                                       "/MobileAP",
+                                       "org.tizen.mobileap");
+       if (proxy == NULL) {
+               INFO_LOG(SP_NAME_ERR, "Couldn't create the proxy object");
+               dbus_g_connection_unref(bus);
+               return FALSE;
+       }
+
+       g_pending_call.pending_call = dbus_g_proxy_begin_call(proxy, "disable_wifi_tethering",
+                               _mobilehotspot_disable_cb, bus, NULL, G_TYPE_INVALID);
+
+       g_pending_call.proxy = proxy;
+       g_pending_call.is_handled = TRUE;
+
+       __COMMON_FUNC_EXIT__;
+       return TRUE;
+}
+
+static int _power_on_check(void)
+{
+       char profile_name[NET_PROFILE_NAME_LEN_MAX+1] = "";
+       switch (wlan_manager_state_get(profile_name)) {
+       case WLAN_MANAGER_OFF:
+               INFO_LOG(SP_NAME_NORMAL, "current state is wifi-off");
+               int wlan_ret = wlan_manager_request_power_on();
+
+               if (wlan_ret == WLAN_MANAGER_ERR_NONE) {
+                       view_alerts_powering_on_show();
+                       __COMMON_FUNC_EXIT__;
+                       return TRUE;
+               } else if (wlan_ret == WLAN_MANAGER_ERR_MOBILE_HOTSPOT_OCCUPIED) {
+                       __COMMON_FUNC_EXIT__;
+                       return TRUE;
+               } else {
+                       __COMMON_FUNC_EXIT__;
+                       return FALSE;
+               }
+               break;
+       case WLAN_MANAGER_UNCONNECTED:
+       case WLAN_MANAGER_CONNECTING:
+               __COMMON_FUNC_EXIT__;
+               return TRUE;
+       case WLAN_MANAGER_CONNECTED:
+               ERROR_LOG(SP_NAME_NORMAL, "current state is wifi-connected");
+               __COMMON_FUNC_EXIT__;
+               return FALSE;
+       case WLAN_MANAGER_ERROR:
+               ERROR_LOG(SP_NAME_NORMAL, "current state is wifi error");
+               __COMMON_FUNC_EXIT__;
+               return FALSE;
+       default:
+               ERROR_LOG(SP_NAME_NORMAL, "current state is wifi etc");
+               __COMMON_FUNC_EXIT__;
+               return FALSE;
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return TRUE;
+}
+
+static int _power_on(void)
+{
+       __COMMON_FUNC_ENTER__;
+
+       char profile_name[NET_PROFILE_NAME_LEN_MAX+1] = "";
+       switch (wlan_manager_state_get(profile_name)) {
+       case WLAN_MANAGER_OFF:
+               INFO_LOG(SP_NAME_NORMAL, "current state is wifi-off");
+               int wlan_ret = wlan_manager_request_power_on();
+
+               if(wlan_ret == WLAN_MANAGER_ERR_NONE) {
+                       view_alerts_powering_on_show();
+               } else if (wlan_ret == WLAN_MANAGER_ERR_MOBILE_HOTSPOT_OCCUPIED) {
+                       if (_turn_off_mobile_hotspot() == FALSE) {
+                           ERROR_LOG(SP_NAME_ERR, "Mobliehotspot deactivate Err!");
+                           __COMMON_FUNC_EXIT__;
+                               wifi_syspopup_exit();
+            }
+               } else {
+                       ERROR_LOG(SP_NAME_ERR, "wifid power on Err!! [%d]", wlan_ret);
+                       __COMMON_FUNC_EXIT__;
+                       wifi_syspopup_exit();
+               }
+               break;
+       case WLAN_MANAGER_UNCONNECTED:
+               INFO_LOG(SP_NAME_NORMAL, "current state is wifi-on");
+               break;
+       case WLAN_MANAGER_CONNECTING:
+               INFO_LOG(SP_NAME_NORMAL, "current state is wifi-connecting");
+               __COMMON_FUNC_EXIT__;
+               wifi_syspopup_exit();
+               break;
+       case WLAN_MANAGER_CONNECTED:
+               INFO_LOG(SP_NAME_NORMAL, "current state is wifi-connected");
+               __COMMON_FUNC_EXIT__;
+               wifi_syspopup_exit();
+               break;
+       case WLAN_MANAGER_ERROR:
+               ERROR_LOG(SP_NAME_ERR, "current state is wifi error");
+               __COMMON_FUNC_EXIT__;
+               wifi_syspopup_exit();
+               break;
+       default:
+               ERROR_LOG(SP_NAME_ERR, "current state is wifi etc");
+               __COMMON_FUNC_EXIT__;
+               wifi_syspopup_exit();
+               break;
+       }
+
+       __COMMON_FUNC_EXIT__;
+       return TRUE;
+}
+
+static int app_reset(bundle *b, void *data)
+{
+       __COMMON_FUNC_ENTER__;
+
+       const char* val = NULL;
+       int ret =0;
+       int w, h = 0;
+
+       assertm_if(NULL == data, "data param is NULL!!");
+       assertm_if(NULL == b, "bundle is NULL!!");
+
+       Evas_Object* win_main = appcore_create_win(PACKAGE);
+       assertm_if(NULL == win_main, "win_main is NULL!!");
+       Evas* evas = evas_object_evas_get(win_main);
+       assertm_if(NULL == evas, "evas is NULL!!");
+
+       app_state = data;
+       app_state->win_main = win_main;
+       app_state->evas = evas;
+       app_state->b = bundle_dup(b);
+
+       elm_win_alpha_set(app_state->win_main, EINA_TRUE); /* invisible window */
+       elm_win_borderless_set(app_state->win_main, EINA_TRUE); /* No borders */
+       elm_win_indicator_mode_set(app_state->win_main, ELM_WIN_INDICATOR_SHOW); /* indicator allow */
+       elm_win_conformant_set(app_state->win_main, TRUE); /* Popup autoscroll */
+
+       if( syspopup_has_popup(b)){
+               INFO_LOG(SP_NAME_NORMAL, "Wi-Fi Syspopup is already launched. So, no more.");
+               syspopup_reset(b);
+       } else {
+               const char* is_onoff = bundle_get_val(b, "-t");
+               INFO_LOG(SP_NAME_NORMAL, "is_onoff [%s]", is_onoff);
+               if (is_onoff != NULL) {
+                       wifi_syspopup_init();
+                       if (strcmp(is_onoff, "on") == 0) {
+                               INFO_LOG(SP_NAME_NORMAL, "request power on");
+                               ret = wlan_manager_request_power_on();
+                               INFO_LOG(SP_NAME_NORMAL, "* ret [%d]", ret);
+                       } else if (strcmp(is_onoff, "off") == 0) {
+                               INFO_LOG(SP_NAME_NORMAL, "request power off");
+                               ret = wlan_manager_request_power_off();
+                               INFO_LOG(SP_NAME_NORMAL, "* ret [%d]", ret);
+                       }
+                       wlan_manager_destroy();
+                       elm_exit();
+                       return 0;
+               } else {
+                       wifi_syspopup_init();
+                       if (_power_on_check() == FALSE) {
+                               wlan_manager_destroy();
+                               wifi_setting_value_set("memory/wifi/wifi_qs_exit", VCONFKEY_WIFI_QS_3G);
+                               __COMMON_FUNC_EXIT__;
+                               elm_exit();
+                       }
+               }
+
+               app_state->syspopup = elm_popup_add(app_state->win_main);
+               ret = syspopup_create(b, &handler, app_state->win_main, app_state);
+               if(ret != 0){
+                       ERROR_LOG(SP_NAME_ERR, "Syspopup create error!! return [%d]", ret );
+                       wlan_manager_destroy();
+                       elm_exit();
+               } else {
+                       val = bundle_get_val(b, "_INTERNAL_SYSPOPUP_NAME_");
+
+                       const char* support = bundle_get_val(b, "[Wi-Fi_syspopup wifi_syspopup_supports:support]");
+                       if(NULL != support) {
+                               syspopup_support_set(support);
+                       }
+
+                       ecore_x_window_size_get(ecore_x_window_root_first_get(), &w, &h);
+
+                       evas_object_show(app_state->win_main);
+                       wlan_manager_scanned_profile_refresh_with_count(5);
+               }
+       }
+       __COMMON_FUNC_EXIT__;
+
+       return 0;
+}
+
+static int app_init(void *data)
+{
+       __COMMON_FUNC_ENTER__;
+       bindtextdomain(PACKAGE, LOCALEDIR);
+       __COMMON_FUNC_EXIT__;
+
+       return 0;
+}
+
+static int app_exit(void *data)
+{
+               __COMMON_FUNC_ENTER__;
+               __COMMON_FUNC_EXIT__;
+
+               return 0;
+}
+
+static int app_start(void *data)
+{
+               __COMMON_FUNC_ENTER__;
+               ecore_idler_add((Ecore_Task_Cb)wlan_manager_scanned_profile_refresh_with_count, (void *)5);
+               __COMMON_FUNC_EXIT__;
+
+               return 0;
+}
+
+static int app_stop(void *data)
+{
+               __COMMON_FUNC_ENTER__;
+               __COMMON_FUNC_EXIT__;
+
+               return 0;
+}
+
+int main(int argc, char* argv[])
+{
+               __COMMON_FUNC_ENTER__;
+
+               INFO_LOG( SP_NAME_NORMAL, "argc [%d]", argc);
+
+               wifi_object ad;
+               memset(&ad, 0x0, sizeof(wifi_object));
+
+               ad.connection_result = VCONFKEY_WIFI_QS_3G;
+
+               ad.win_main = NULL;
+               ad.evas = NULL;
+               ad.b = NULL;
+               ad.syspopup = NULL;
+               ad.passpopup = NULL;
+               ad.alertpopup = NULL;
+
+               struct appcore_ops ops = {
+                               .create = app_init,
+                               .terminate = app_exit,
+                               .pause = app_stop,
+                               .resume = app_start,
+                               .reset = app_reset,
+               };
+
+               ops.data = &ad;
+
+               /* wlan init */
+               int wlan_ret = wifi_syspopup_init();
+               if (wlan_ret != WLAN_MANAGER_ERR_NONE) {
+                               wlan_manager_destroy();
+                               wifi_setting_value_set("memory/wifi/wifi_qs_exit", VCONFKEY_WIFI_QS_3G);
+                               __COMMON_FUNC_EXIT__;
+                               elm_exit();
+               }
+
+               __COMMON_FUNC_EXIT__;
+               return appcore_efl_main(PACKAGE, &argc, &argv, &ops);
+}