From: HyungKyu Song Date: Fri, 15 Feb 2013 15:00:54 +0000 (+0900) Subject: Tizen 2.0 Release X-Git-Tag: submit/tizen_2.0/20130215.191530^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen_2.0;p=apps%2Fcore%2Fpreloaded%2Fsettings.git Tizen 2.0 Release --- diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..d8071e1 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,2 @@ +Taesoo Jun +MyoungJune Park diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100755 index 0000000..ded09d1 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,76 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) +PROJECT(setting) + +SET(SETTING_PKG_NAME org.tizen.setting) + +SET(PREFIX "/usr/apps/org.tizen.setting") +SET(BINDIR "${PREFIX}/bin") +SET(RESDIR "${PREFIX}/res") +SET(DATADIR "${PREFIX}/data") +SET(LOCALEDIR "${RESDIR}/locale") +SET(ICONDIR "/usr/share/icons/default/small") +SET(EDJDIR "${RESDIR}/edje") +SET(IMAGEDIR "${RESDIR}/images") + +#set variable +SET(SETTING_PROFILE setting-profile) +SET(SETTING_CONNECTIVITY setting-connectivity) +SET(SETTING_SECURITY setting-security) +SET(SETTING_DISPLAY setting-display) +SET(SETTING_TIME setting-time) +SET(SETTING_PHONE setting-phone) +SET(SETTING_MEMORY setting-memory) +SET(SETTING_RESET setting-reset) +SET(SETTING_PASSWORD setting-password) +SET(SETTING_COMMON setting-common) +SET(SETTING_NETWORK setting-network) +SET(SETTING_ABOUT setting-about) +SET(SETTING_MENUSCREEN setting-menuscreen) +SET(SETTING_POWERSAVING setting-powersaving) +SET(SETTING_FONT setting-font) +SET(SETTING_STORAGE setting-storage) +SET(SETTING_FILEVIEW setting-fileview) + +SET(SETTING_PROFILE_UG ug-setting-profile-efl) +SET(SETTING_DEVELOPEROPTION_UG ug-setting-developeroption-efl) +SET(SETTING_MEMORY_UG ug-setting-memory-efl) +SET(SETTING_SECURITY_UG ug-setting-security-efl) +SET(SETTING_DISPLAY_UG ug-setting-display-efl) +SET(SETTING_TIME_UG ug-setting-time-efl) +SET(SETTING_PHONE_UG ug-setting-phone-efl) +SET(SETTING_RESET_UG ug-setting-reset-efl) +SET(SETTING_NETWORK_UG ug-setting-network-efl) +SET(SETTING_ABOUT_UG ug-setting-about-efl) +SET(SETTING_FILEVIEW_UG ug-setting-fileview-efl) +SET(SETTING_PASSWORD_UG ug-setting-password-efl) +SET(SETTING_MENUSCREEN_UG ug-setting-menuscreen-sel-efl) +SET(SETTING_POWERSAVING_UG ug-setting-powersaving-efl) +SET(SETTING_FONT_UG ug-setting-font-efl) +SET(SETTING_STORAGE_UG ug-setting-storage-efl) + +SET(LIB_SETTING_COMMON setting-common) + + +#setting main view build start +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + +ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}) +ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_STORAGE}) +ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_PHONE}) +ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_CONNECTIVITY}) +ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_DISPLAY}) +ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_MEMORY}) +ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_NETWORK}) +ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_PROFILE}) +ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_RESET}) +ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_SECURITY}) +ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_TIME}) +ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_ABOUT}) +ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_PASSWORD}) +ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_MENUSCREEN}) +ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_POWERSAVING}) +ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_FONT}) +ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_FILEVIEW}) +ADD_SUBDIRECTORY(src) + diff --git a/LICENSE.Flora b/LICENSE.Flora new file mode 100644 index 0000000..8b920ce --- /dev/null +++ b/LICENSE.Flora @@ -0,0 +1,207 @@ +Flora License + +Version 1.0, May, 2012 + +http://floralicense.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://floralicense.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/NOTICE b/NOTICE new file mode 100644 index 0000000..1c02720 --- /dev/null +++ b/NOTICE @@ -0,0 +1,4 @@ +Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved. +Except as noted, this software is licensed under Flora License, Version 1. +Please, see the LICENSE.Flora file for Flora License, Version 1 terms and conditions. + diff --git a/com.samsung.setting.desktop.in b/com.samsung.setting.desktop.in new file mode 100755 index 0000000..a4c9152 --- /dev/null +++ b/com.samsung.setting.desktop.in @@ -0,0 +1,26 @@ +Name=Settings +Name[en_US]=Settings +Name[ko_KR]=설정 +Name[de_DE]=Einstellungen +Name[el_GR]=Ρυθμίσεις +Name[en_GB]=Settings +Name[es_ES]=Ajustes +Name[fr_FR]=Paramètres +Name[it_IT]=Impostazioni +Name[ja_JP]=設定 +Name[nl_NL]=Instellingen +Name[pt_PT]=Definições +Name[ru_RU]=Настройки +Name[tk]=Ayarlar +Name[zh_CN]=設定 +Name[zh_HK]=設定 +Name[zh_TW]=設定 +Type=Application +Exec=${PREFIX}/bin/setting +Icon=org.tizen.setting.png +Comment=Beat Setting application +NoDisplay=False +Version=0.9.5 +X-TIZEN-TaskManage=True +X-TIZEN-Multiple=False +X-TIZEN-Removable=False diff --git a/debian/changelog b/debian/changelog new file mode 100755 index 0000000..1b5f55a --- /dev/null +++ b/debian/changelog @@ -0,0 +1,8120 @@ +setting (0.1.89-96ubuntu1) precise; urgency=low + + * release + + -- Yigang Jing Thu, 24 Jan 2013 21:20:09 +0900 + +setting (0.1.89-95ubuntu1) precise; urgency=low + + * release + + -- Heeyoung Shin Mon, 07 Jan 2013 14:34:43 +0900 + +setting (0.1.89-94ubuntu1) precise; urgency=low + + * release + + -- Yigang Jing Fir, 28 Dec 2012 16:40:56 +0800 + +setting (0.1.89-93ubuntu1) precise; urgency=low + + * release + + -- Heeyoung Shin Fir, 28 Dec 2012 15:49:25 +0900 + +setting (0.1.89-92ubuntu1) precise; urgency=low + + * release + + -- mjpark Wed, 26 Dec 2012 13:34:15 +0900 + +setting (0.1.89-92) unstable; urgency=low + + * Release + + -- Heeyoung Shin Fri, 21 Dec 2012 20:15:33 +0900 + +setting (0.1.89-91) unstable; urgency=low + + * Release + + -- Yigang Jing Fri, 21 Dec 2012 16:37:08 +0800 + +setting (0.1.89-90) unstable; urgency=low + + * Release + + -- Yigang Jing Tue, 11 Dec 2012 15:12:07 +0800 + +setting (0.1.89-89ubuntu1) precise; urgency=low + + * release + + -- mjpark Wed, 05 Dec 2012 20:44:51 +0900 + +setting (0.1.89-89) unstable; urgency=low + + * Release(Fix BS issue like N_SE-12078,N_SE-11793,N_SE-12271 etc,Fix performence issue P121026-4952) + + -- Yin Kairong Sat, 27 Oct 2012 19:42:26 +0800 + +setting (0.1.89-88) unstable; urgency=low + + * Release + + -- Yin Kairong Thu, 23 Oct 2012 20:34:52 -0700 + +setting (0.1.89-87) unstable; urgency=low + + * Release + + -- Yin Kairong Thu, 11 Oct 2012 22:34:52 -0700 + +setting (0.1.89-86) unstable; urgency=low + + * branch migration (2.0_beta -> master) + + -- MyoungJune Park Fri, 05 Oct 2012 15:31:07 +0900 + +setting (0.1.89-85) unstable; urgency=low + + * Release. + * Git: apps/home/settings + * Tag: setting_0.1.89-85 + + -- Yin Kairong Thu, 27 Sep 2012 14:01:06 -0700 + +setting (0.1.89-84) unstable; urgency=low + + * Release. + * Git: apps/home/settings + * Tag: setting_0.1.89-84 + + -- Yin Kairong Wed, 26 Sep 2012 18:10:52 -0700 + +setting (0.1.89-83) precise; urgency=low + + * release + + -- mjpark Tue, 25 Sep 2012 17:23:21 +0900 + +setting (0.1.89-82) precise; urgency=low + + * release + + -- mjpark Wed, 19 Sep 2012 18:51:14 +0900 + +setting (0.1.89-81) unstable; urgency=low + + * Upload. + * Git: apps/home/settings + * Tag: setting_0.1.89-81 + + -- Yin Kairong Wed, 19 Sep 2012 01:07:49 -0700 + +setting (0.1.89-80) precise; urgency=low + + * plugin model code - updating UI from AppSetting including the expanded list. + + -- MyoungJune Park Mon, 17 Sep 2012 17:49:37 +0900 + +setting (0.1.89-79) unstable; urgency=low + + * plugin model code - updating UI from AppSetting. + + -- MyoungJune Park Fri, 14 Sep 2012 19:43:07 +0900 + +setting (0.1.89-78) unstable; urgency=low + + * Fix brightness issues and add error handling for brightness. + * Git: apps/home/settings + * Tag: setting_0.1.89-78 + + -- Yin Kairong Thu, 13 Sep 2012 22:28:58 -0700 + +setting (0.1.89-77) unstable; urgency=low + + * Release for changing. + * Git: apps/home/settings + * Tag: setting_0.1.89-77 + + -- Yin Kairong Tue, 11 Sep 2012 18:46:06 -0700 + +setting (0.1.89-76) unstable; urgency=low + + * Release for bug fixing. + * Git: apps/home/settings + * Tag: setting_0.1.89-76 + + -- Yin Kairong Tue, 11 Sep 2012 18:35:05 -0700 + +setting (0.1.89-75) unstable; urgency=low + + * release + + -- MyoungJune Park Tue, 11 Sep 2012 14:42:21 +0900 + +setting (0.1.89-74) unstable; urgency=low + + * replaced Legacy API with CAPI + + -- MyoungJune Park Mon, 10 Sep 2012 18:02:41 +0900 + +setting (0.1.89-73) unstable; urgency=low + + * release for RSA + + -- MyoungJune Park Sat, 08 Sep 2012 17:55:40 +0900 + +setting (0.1.89-72) unstable; urgency=low + + * release for RSA + + -- MyoungJune Park Sat, 08 Sep 2012 14:24:24 +0900 + +setting (0.1.89-71) unstable; urgency=low + + * release for RSA + + -- MyoungJune Park Thu, 06 Sep 2012 18:48:46 +0900 + +setting (0.1.88-70) unstable; urgency=low + + * removed the unsed callback registration in Network + * draw underline of description + + -- MyoungJune Park Wed, 05 Sep 2012 16:08:03 +0900 + +setting (0.1.88-69) unstable; urgency=low + + * fixed many tizendev/bugs issues + * applied App Setting test (3rd party) + + -- MyoungJune Park Sat, 01 Sep 2012 16:26:35 +0900 + +setting (0.1.88-68) precise; urgency=low + + * release + * fixed SIM related bugs + * changed slider control style in Brightness + + -- mjpark Tue, 21 Aug 2012 22:59:36 +0900 + +setting (0.1.88-67) unstable; urgency=low + + * removed menuscreen vconf 2 + + -- mjpark Tue, 21 Aug 2012 15:13:32 +0900 + +setting (0.1.88-66) precise; urgency=low + + * removed menuscreen vconf + + -- mjpark Tue, 21 Aug 2012 14:45:02 +0900 + +setting (0.1.88-65) unstable; urgency=low + + * release + + -- mjpark Sat, 18 Aug 2012 16:50:49 +0900 + +setting (0.1.88-64) precise; urgency=low + + * release + + -- mjpark Fri, 17 Aug 2012 18:04:32 +0900 + +setting (0.1.88-63) unstable; urgency=low + + * updated Tizen UI + + -- MyoungJune Park Fri, 17 Aug 2012 12:34:16 +0900 + +setting (0.1.88-62) unstable; urgency=low + + * removed mobileap-api dependency + + -- MyoungJune Park Thu, 16 Aug 2012 19:59:39 +0900 + +setting (0.1.88-61) unstable; urgency=low + + * remove mdm dependency 2 + + -- MyoungJune Park Wed, 15 Aug 2012 15:14:52 +0900 + +setting (0.1.88-60) unstable; urgency=low + + * release + + -- MyoungJune Park Tue, 14 Aug 2012 16:14:34 +0900 + +setting (0.1.88-59) unstable; urgency=low + + * enabled menu-screen, certificate, the driving mode + * bug fix on Network UG, Reset, Sound + * adjust maximum datetime value + * applied new STMS strings + + -- MyoungJune Park Mon, 13 Aug 2012 19:39:32 +0900 + +setting (0.1.88-58) unstable; urgency=low + + * added app-control + * fixed some B/S issue on Setting About + * adjust UI layout for guide texts + + -- MyoungJune Park Sat, 11 Aug 2012 17:10:17 +0900 + +setting (0.1.88-57) unstable; urgency=low + + * release setting.cfg in statical way + + -- MyoungJune Park Mon, 06 Aug 2012 14:26:55 +0900 + +setting (0.1.88-56) unstable; urgency=low + + * applied static icon path for Application group + * Fixed some tizendev/bugs issues + * added code to draw after checking UG existence + + -- MyoungJune Park Sat, 04 Aug 2012 19:37:21 +0900 + +setting (0.1.88-55) unstable; urgency=low + + * applied getting cityname, GMT string in dynamic, not hard-coded (fixed issues - S1-3837) + + -- MyoungJune Park Wed, 01 Aug 2012 17:14:03 +0900 + +setting (0.1.88-54) unstable; urgency=low + + * added Driving mode UG + * updated Motion UI + * added XML manifest code + * added Display > Screen mode + * bug fix on Developer options > Usb-debugging toggle when put the jack in, pull it out. + + -- MyoungJune Park Tue, 31 Jul 2012 19:38:55 +0900 + +setting (0.1.88-53) unstable; urgency=low + + * release + + -- hyejin kim Fri, 27 Jul 2012 14:01:44 +0900 + +setting (0.1.88-52) unstable; urgency=low + + * release + + -- hyejin kim Thu, 26 Jul 2012 19:28:36 +0900 + +setting (0.1.88-51) unstable; urgency=low + + * release + * fixed PLM issue + * added Allshare cast Icon + * removed parential mode + + -- MyoungJune Park Wed, 25 Jul 2012 18:20:56 +0900 + +setting (0.1.88-50) unstable; urgency=low + + * release + * [security] add seperator and popup patchset2. add one more popup. + + -- MyoungJune Park Mon, 23 Jul 2012 13:35:12 +0900 + +setting (0.1.88-49) unstable; urgency=low + + * fix P120718-5242 + * add Nearby device + + -- MyoungJune Park Sat, 21 Jul 2012 18:17:44 +0900 + +setting (0.1.88-48) unstable; urgency=low + + * fix P120718-5242 + * add Nearby device + + -- MyoungJune Park Sat, 21 Jul 2012 14:10:47 +0900 + +setting (0.1.88-47) unstable; urgency=low + + * fixed bug of ui gadget migration issues. + * temp solution for Date/Time lockup issue. + + -- MyoungJune Park Fri, 20 Jul 2012 12:12:45 +0900 + +setting (0.1.88-46) unstable; urgency=low + + * release + + -- hyejin kim Wed, 18 Jul 2012 19:53:15 +0900 + +setting (0.1.88-45) unstable; urgency=low + + * change ui-gadget to ui-gadget-1 + + -- hyejin kim Wed, 18 Jul 2012 19:08:07 +0900 + +setting (0.1.88-44) unstable; urgency=low + + * added Factory Reset code (complete). + + -- MyoungJune Park Tue, 17 Jul 2012 13:19:20 +0900 + +setting (0.1.88-43) unstable; urgency=low + + * fixed Sound ug Issue - in regarding with Volume app crash. + + -- MyoungJune Park Mon, 16 Jul 2012 14:19:14 +0900 + +setting (0.1.88-42) unstable; urgency=low + + * added new UI + + -- MyoungJune Park Wed, 11 Jul 2012 13:21:14 +0900 + +setting (0.1.88-41) unstable; urgency=low + + * fix syntax error in postinst + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-41 + + -- hyejin kim Mon, 04 Jun 2012 17:45:18 +0900 + +setting (0.1.88-40) unstable; urgency=low + + * fix syntax error in postinst + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-40 + + -- hyejin kim Mon, 04 Jun 2012 16:31:34 +0900 + +setting (0.1.88-39) unstable; urgency=low + + * change vconfkey name of lcd timeout + * removed the unused vconf key that is unregistered. + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-39 + + -- hyejin kim Mon, 04 Jun 2012 15:12:46 +0900 + +setting (0.1.88-38) quantal; urgency=low + + * modified menu-screen to add password view on selecting cluster-home. + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-38 + + -- myoungjune park Fri, 01 Jun 2012 11:22:19 +0900 + +setting (0.1.88-37) unstable; urgency=low + + * removed the app termination code on language change + * modified the app icon path + * removed unused code of font change with X attributes + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-37 + + -- MyoungJune Park Thu, 31 May 2012 21:35:28 +0900 + +setting (0.1.88-36) unstable; urgency=low + + * release + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-36 + + -- Taeyoung Kim Wed, 30 May 2012 18:11:28 +0900 + +setting (0.1.88-35) unstable; urgency=low + + * Upload + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-35 + + -- Jing Yigang Mon, 28 May 2012 16:55:19 -0700 + +setting (0.1.88-34) unstable; urgency=low + + * Remove redefined vconf keys + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-34 + + -- Taeyoung Kim Fri, 25 May 2012 18:45:56 +0900 + +setting (0.1.88-32) unstable; urgency=low + + * Upload + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-32 + + -- Yin Kairong Thu, 24 May 2012 03:36:19 -0700 + +setting (0.1.88-31) unstable; urgency=low + + * change automatic brightness key + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-31 + + -- hyejin kim Wed, 23 May 2012 19:27:08 +0900 + +setting (0.1.88-30) unstable; urgency=low + + * release + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-30 + + -- MyoungJune Park Tue, 22 May 2012 21:44:35 +0900 + +setting (0.1.88-28) unstable; urgency=low + + * applied drm-client, drm-trusted, in place of drm-server. + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-28 + + -- MyoungJune Park Tue, 22 May 2012 20:07:20 +0900 + +setting (0.1.88-27) unstable; urgency=low + + * enabled Wi-Fi Direct + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-27 + + -- MyoungJune Park Mon, 21 May 2012 20:41:50 +0900 + +setting (0.1.88-26) unstable; urgency=low + + * enabled Diagnostics and Usage in Setting About. + * enabled Setting > Font + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-26 + + -- MyoungJune Park Mon, 21 May 2012 19:37:17 +0900 + +setting (0.1.88-25) unstable; urgency=low + + * Fix Developer option in setting.cfg + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-25 + + -- Taeyoung Kim Mon, 21 May 2012 15:56:55 +0900 + +setting (0.1.88-24) unstable; urgency=low + + * Fix menu title error of Developer option + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-24 + + -- Taeyoung Kim Mon, 21 May 2012 13:46:34 +0900 + +setting (0.1.88-23) unstable; urgency=low + + * fixed the bugs for menutree tests. + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-23 + + -- MyoungJune Park Mon, 21 May 2012 11:53:52 +0900 + +setting (0.1.88-22) unstable; urgency=low + + * updated postinst file, as vconf key string for Backlighttime changed. + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-22 + + -- MyoungJune Park Fri, 18 May 2012 20:48:41 +0900 + +setting (0.1.88-21) unstable; urgency=low + + * Upload pkg.. + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-21 + + -- Yin Kairong Fri, 18 May 2012 02:39:15 -0700 + +setting (0.1.88-20) unstable; urgency=low + + * remove TVOUT related keys + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-20 + + -- hyejin kim Thu, 17 May 2012 19:10:14 +0900 + +setting (0.1.88-19) unstable; urgency=low + + * Repackage. + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-19 + + -- Yin Kairong Wed, 16 May 2012 05:49:06 -0700 + +setting (0.1.88-18) unstable; urgency=low + + * Upload pkg to apply new changes. + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-18 + + -- Yin Kairong Wed, 16 May 2012 03:32:19 -0700 + +setting (0.1.88-17) unstable; urgency=low + + * support mdm + * fix nfc related issue + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-17 + + -- hyejin kim Wed, 16 May 2012 10:57:21 +0900 + +setting (0.1.88-16) unstable; urgency=low + + * rolled back the previous change, because of uploading media-data pkgs that has proper changes + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-16 + + -- MyoungJune Park Mon, 14 May 2012 10:31:51 +0900 + +setting (0.1.88-15) unstable; urgency=low + + * release + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-15 + + -- MyoungJune Park Mon, 14 May 2012 09:22:32 +0900 + +setting (0.1.88-13) unstable; urgency=low + + * fixed bug on auto-rotation screen menu, toggling the state which is not matched with other modules (quick panel, indicator) + * Implemented the 'Powersaving' menu according to Power saving UI V0.4 + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-13 + + -- MyoungJune Park Thu, 10 May 2012 17:17:37 +0900 + +setting (0.1.88-12) unstable; urgency=low + + * release + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-12 + + -- hyejin kim Fri, 04 May 2012 14:02:21 +0900 + +setting (0.1.88-11) unstable; urgency=low + + * remove unused vconfkey + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-11 + + -- hyejin kim Fri, 04 May 2012 11:08:20 +0900 + +setting (0.1.88-10) unstable; urgency=low + + * support setupwizard in language display view + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-10 + + -- hyejin kim Wed, 02 May 2012 17:51:20 +0900 + +setting (0.1.88-9) unstable; urgency=low + + * Change a term, rotation lock to auto-rotate screen + * Fix tizenbug : N_SE-646 + * Change event notification view + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-9 + + -- Taeyoung Kim Fri, 27 Apr 2012 17:23:56 +0900 + +setting (0.1.88-8) unstable; urgency=low + + * Change main view (support All, Requent menu option) + * Add Font menu + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-8 + + -- Taesoo Jun Sat, 21 Apr 2012 18:09:13 +0900 + +setting (0.1.88-7) unstable; urgency=low + + * Support languages of 40 countries + * Move heynoti publish to alarm-manager + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-7 + + -- Taeyoung Kim Thu, 19 Apr 2012 19:07:21 +0900 + +setting (0.1.88-6) unstable; urgency=low + + * Remove the usage of theme 'layout/application/searchbar' + * [wallpaper] remove build warnings + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-6 + + -- Taeyoung Kim Wed, 18 Apr 2012 11:57:43 +0900 + +setting (0.1.88-5) unstable; urgency=low + + * Remove unused vconf key + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-5 + + -- Taeyoung Kim Thu, 12 Apr 2012 17:32:17 +0900 + +setting (0.1.88-4) unstable; urgency=low + + * Remove definition of vconfkeys in a local header, they already exist in vconf-keys.h + * Fix codes when SDcard policy of MDM is restricted + * Fix a time problem in which time is not changed when time is changed manually and time difference is within one minute + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-4 + + -- Taeyoung Kim Mon, 09 Apr 2012 21:16:11 +0900 + +setting (0.1.88-3) unstable; urgency=low + + * upload pkg + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-3 + + -- hyejin kim Fri, 30 Mar 2012 15:32:48 +0900 + +setting (0.1.88-2) unstable; urgency=low + + * Upload pkg + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-2 + + -- Yin Kairong Thu, 29 Mar 2012 02:35:42 -0700 + +setting (0.1.88-1) unstable; urgency=low + + * Upload pkg to apply new changes + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-1 + + -- Yin Kairong Wed, 28 Mar 2012 05:35:07 -0700 + +setting (0.1.87-99) unstable; urgency=low + + * Upload pkg to fix password BS issue + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-99 + + -- Yin Kairong Thu, 22 Mar 2012 00:56:07 -0700 + +setting (0.1.87-98) unstable; urgency=low + + * Enable display bluetooth address in about phone + * Fix deprecated APIs of elm_web + * Process guidetext of entry unifiedly + * Change param of elm_win_indicator + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-98 + + -- Taeyoung Kim Wed, 21 Mar 2012 15:50:36 +0900 + +setting (0.1.87-97) unstable; urgency=low + + * aul_open_content() is replaced by appsvc APIs + * [About] fix unexpacted char of wifi address + * Fix to show sub items of security ug + * Fix to calculate timezone + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-97 + + -- Taeyoung Kim Mon, 19 Mar 2012 19:27:44 +0900 + +setting (0.1.87-96) unstable; urgency=low + + * SLP prefix in desktop file is changed to TIZEN + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-96 + + -- Taeyoung Kim Fri, 16 Mar 2012 14:33:31 +0900 + +setting (0.1.87-95) unstable; urgency=low + + * Upload pkg. + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-95 + + -- Yin Kairong Wed, 14 Mar 2012 23:18:30 -0700 + +setting (0.1.87-94) unstable; urgency=low + + * Apply EFL 1.0 migration + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-94 + + -- Yin Kairong Wed, 14 Mar 2012 07:07:26 -0700 + +setting (0.1.87-93) unstable; urgency=low + + * spec file is updated to build using OBS + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-93 + + -- Taeyoung Kim Tue, 13 Mar 2012 09:48:07 +0900 + +setting (0.1.87-92) unstable; urgency=low + + * retrieve menuscreen item + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-92 + + -- hyejin kim Sun, 11 Mar 2012 15:24:46 +0900 + +setting (0.1.87-91) unstable; urgency=low + + * support FOTA + * fix BOT-750 in JIRA : lock up when came back from network ug + * fix issue of device name requested by Mr.Shin + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-91 + + -- hyejin Kim Sun, 11 Mar 2012 09:38:41 +0900 + +setting (0.1.87-90) unstable; urgency=low + + * Fix STMS issues + * Support MDM enforce_password function + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-90 + + -- hyejin kim Tue, 06 Mar 2012 14:24:18 +0900 + +setting (0.1.87-89) unstable; urgency=low + + * Fix the miss-typing for the FM_Radio icon + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-89 + + -- Taeyoung Kim Fri, 02 Mar 2012 13:23:04 +0900 + +setting (0.1.87-88) unstable; urgency=low + + * Change elm_editfield* and elm_searchbar* APIs + * Fix NFC icon path and text + * Apply multi-national language of IDS_ST_BODY_REGIONAL_EXAMPLE + * Multilanguage of USB utilities help window is applied + * With [Use tilt]&[Use panning] [off], [sensitivity setting] group gets disable + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-88 + + -- Taeyoung Kim Fri, 02 Mar 2012 09:57:06 +0900 + +setting (0.1.87-87) unstable; urgency=low + + * Fix bluetooth API + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-87 + + -- Taesoo Jun Mon, 27 Feb 2012 17:59:48 +0900 + +setting (0.1.87-86) unstable; urgency=low + + * [Temp] Walk around the crash due to bluetooth_get_local_address() + * Check the popup text for [Learn about pick up] in Motions menu + * Change the default value for all the kinds of Motions + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-86 + + -- Taeyoung Kim Mon, 27 Feb 2012 17:12:16 +0900 + +setting (0.1.87-85) unstable; urgency=low + + * Multilanguage is supported when changing Timezone + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-85 + + -- Taeyoung Kim Fri, 24 Feb 2012 13:25:26 +0900 + +setting (0.1.87-84) unstable; urgency=low + + * remove "Menu Screen" item + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-84 + + -- hyejin kim Thu, 23 Feb 2012 10:25:10 +0900 + +setting (0.1.87-83) unstable; urgency=low + + * Fixing unchanged time problem when changing timezone manually + * The callback function for double tap(motion sensor) is blocked + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-83 + + -- Taeyoung Kim Mon, 20 Feb 2012 17:21:13 +0900 + +setting (0.1.87-82) unstable; urgency=low + + * Add missed changes for EFL-migration + * Add Allshare menu + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-82 + + -- hyejin kim Thu, 16 Feb 2012 14:35:40 +0900 + +setting (0.1.87-81) unstable; urgency=low + + * Apply EFL migration + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-81 + + -- Taeyoung Kim Thu, 16 Feb 2012 11:06:37 +0900 + +setting (0.1.87-80) unstable; urgency=low + + * Revive menuscreen item + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-80 + + -- Taeyoung Kim Wed, 15 Feb 2012 21:28:40 +0900 + +setting (0.1.87-79) unstable; urgency=low + + * Hide power-saving menu + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-79 + + -- Taesoo Jun Thu, 09 Feb 2012 11:23:56 +0900 + +setting (0.1.87-78) unstable; urgency=low + + * hide menu-screen menu temporarily for Orange binary + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-78 + + -- Taesoo Jun Wed, 08 Feb 2012 10:55:27 +0900 + +setting (0.1.87-77) unstable; urgency=low + + * Add NFC setting + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-77 + + -- Taesoo Jun Mon, 06 Feb 2012 19:54:38 +0900 + +setting (0.1.87-76) unstable; urgency=low + + * Default value of data roaming is 'on' + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-76 + + -- Taeyoung Kim Fri, 03 Feb 2012 21:03:36 +0900 + +setting (0.1.87-75) unstable; urgency=low + + * Fix S1-1046 and so on. + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-75 + + -- hyejin Kim Thu, 02 Feb 2012 23:27:32 +0900 + +setting (0.1.87-74) unstable; urgency=low + + * Release 0.1.87-74: MDM applied to network/password/memory/usb, JIRA issues(key grab during a reset) + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-74 + + -- Taesoo Jun Mon, 30 Jan 2012 22:17:04 +0900 + +setting (0.1.87-73) unstable; urgency=low + + * set the default menu-screen as the normal menu-screen, requested by HG Shin + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-73 + + -- Taesoo Jun Thu, 26 Jan 2012 14:53:58 +0900 + +setting (0.1.87-72) unstable; urgency=low + + * fixed menuscreen bug. + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-72 + + -- MyoungJune Park Wed, 25 Jan 2012 11:23:38 +0900 + +setting (0.1.87-71) unstable; urgency=low + + * added STMS strings in Network & Main - 2 + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-71 + + -- MyoungJune Park Fri, 20 Jan 2012 16:56:47 +0900 + +setting (0.1.87-70) unstable; urgency=low + + * added STMS strings in Network & Main + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-70 + + -- MyoungJune Park Fri, 20 Jan 2012 15:04:02 +0900 + +setting (0.1.87-69) unstable; urgency=low + + * modified Wifi-Direct ug name + * fixed B/S issue on terminating app itself + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-69 + + -- MyoungJune Park Thu, 19 Jan 2012 19:42:58 +0900 + +setting (0.1.87-68) unstable; urgency=low + + * added STMS strings in Accessibility settings + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-68 + + -- MyoungJune Park Wed, 18 Jan 2012 11:00:19 +0900 + +setting (0.1.87-67) unstable; urgency=low + + * added Wifi-Direct + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-67 + + -- MyoungJune Park Tue, 17 Jan 2012 19:33:24 +0900 + +setting (0.1.87-66) unstable; urgency=low + + * applied new STMS strings + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-66 + + -- MyoungJune Park Tue, 17 Jan 2012 13:12:53 +0900 + +setting (0.1.87-65) unstable; urgency=low + + * enabled Motion setting and deploy setting.cfg at installation + * add dependency pkg + * [passwordUG] apply changes of security-server version up + * Fixed bug on language change in Setting > Brightness + * Apply 'Double tap' event on genlist in 'main view' 'More settings' view and 'Motions' views + * Fix S1-742 + * optimized slider_value_change_cb to speed up + * Fixed: S1-332 Reset description strings i18n issue + * enabled Menu screen again + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-65 + + -- MyoungJune Park Fri, 13 Jan 2012 17:08:08 +0900 + +setting (0.1.87-64) unstable; urgency=low + + * updated STMS strings - usb setting + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-64 + + -- MyoungJune Park Mon, 09 Jan 2012 19:52:51 +0900 + +setting (0.1.87-63) unstable; urgency=low + + * Add listening for 'Brightness' + * updated STMS strings for i18n + * applied security-server APIs + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-63 + + -- MyoungJune Park Mon, 09 Jan 2012 15:58:34 +0900 + +setting (0.1.87-62) unstable; urgency=low + + * FIXED: S1-383 [SDK][Language]While boot up in date screen option is displayed in code + * usb-setting : fixed STMS string issue + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-62 + + -- MyoungJune Park Sat, 07 Jan 2012 16:23:22 +0900 + +setting (0.1.87-61) unstable; urgency=low + + * Clean the unused code about 'UG animation' + * Add low battery process of 'Brightness' menu + * rename Mobile hotspot Ththering and portable hotspots + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-61 + + -- MyoungJune Park Fri, 06 Jan 2012 10:38:01 +0900 + +setting (0.1.87-60) unstable; urgency=low + + * removed Menu-screen as it's only for Demo + * fixed elm_datefield was invisible + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-60 + + -- MyoungJune Park Thu, 05 Jan 2012 13:51:44 +0900 + +setting (0.1.87-59) unstable; urgency=low + + * code clean (About, Accessibility) + * applied STMS string 'Reset all' + * added webview in Setting > About > License + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-59 + + -- MyoungJune Park Wed, 04 Jan 2012 17:05:11 +0900 + +setting (0.1.87-58) unstable; urgency=low + + * apply STMS texts for flight mode + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-58 + + -- Hyejin Kim Wed, 28 Dec 2011 17:48:14 +0900 + +setting (0.1.87-57) unstable; urgency=low + + * added Diagnostics & Info in About. + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-57 + + -- MyoungJune Park Fri, 16 Dec 2011 14:20:48 +0900 + +setting (0.1.87-56) unstable; urgency=low + + * removed appcore_set_i18n. + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-56 + + -- MyoungJune Park Mon, 12 Dec 2011 17:23:44 +0900 + +setting (0.1.87-55) unstable; urgency=low + + * applied is_slp_binary on master. + * [Sound ug] change system tone + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-55 + + -- MyoungJune Park Sat, 10 Dec 2011 16:33:07 +0900 + +setting (0.1.87-54) unstable; urgency=low + + * added vconf null checker. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-54 + + -- MyoungJune Park Thu, 08 Dec 2011 20:30:28 +0900 + +setting (0.1.87-53) unstable; urgency=low + + * revert after Tzen updates + * fixed branch code & master branch. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-53 + + -- MyoungJune Park Thu, 08 Dec 2011 14:14:15 +0900 + +setting (0.1.87-52) unstable; urgency=low + + * Mass storage is blocked in Emulator ( Fixed H0100137718(CQ) and SLP001-81(JIRA) ) + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-52 + + -- Taeyoung Kim Wed, 07 Dec 2011 11:27:07 +0900 + +setting (0.1.87-51) unstable; urgency=low + + * Upload pkg to apply changes. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-51 + + -- Yin Kairong Mon, 05 Dec 2011 12:06:26 -0800 + +setting (0.1.87-50) unstable; urgency=low + + * fixed : H0100137769, H0100137767. + * [SecurityUG] fix wrong function name. + * Callback, which is called when radio btn is selected, is deleted. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-50 + + -- MyoungJune Park Mon, 05 Dec 2011 18:08:35 +0900 + +setting (0.1.87-49) unstable; urgency=low + + * fixed : H0100137768 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-49 + + -- MyoungJune Park Sun, 04 Dec 2011 22:17:11 +0900 + +setting (0.1.87-48) unstable; urgency=low + + * updated boiler plates. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-48 + + -- MyoungJune Park Fri, 02 Dec 2011 18:14:36 +0900 + +setting (0.1.87-47) unstable; urgency=low + + * Upload package for these changes: + 1.Fix the BS issue caused by elm_genlist_clear + 2.Apply new 'Motion' UI + 3.Apply 'Power saving mode' with macro closed + 4.Apply new main view with macro SUPPORT_MORE_ITEM_FUNCTION + 5.Upload for EFL APIs depricated + 6.Use new API for mmc mount/unmount/format. + 7.Apply some multi-language supporting strings. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-47 + + -- Yin Kairong Fri, 02 Dec 2011 00:03:44 -0800 + +setting (0.1.87-46) unstable; urgency=low + + * bug fix on Reset operation : H0100137383 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-46 + + -- MyoungJune Park Fri, 02 Dec 2011 12:19:36 +0900 + +setting (0.1.87-45) unstable; urgency=low + + * roll back to original mmc mount/unmount code. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-45 + + -- MyoungJune Park Thu, 01 Dec 2011 21:57:26 +0900 + +setting (0.1.87-44) unstable; urgency=low + + * applied new Connman library. 2 - due to build server issue. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-44 + + -- MyoungJune Park Tue, 29 Nov 2011 16:53:37 +0900 + +setting (0.1.87-43) unstable; urgency=low + + * applied new Connman library. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-43 + + -- MyoungJune Park Tue, 29 Nov 2011 13:50:41 +0900 + +setting (0.1.87-42) unstable; urgency=low + + * removed Facebook menu. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-42 + + -- MyoungJune Park Tue, 29 Nov 2011 12:59:10 +0900 + +setting (0.1.87-41) unstable; urgency=low + + * added new menuscreen UG. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-41 + + -- MyoungJune Park Tue, 29 Nov 2011 10:24:28 +0900 + +setting (0.1.87-40) unstable; urgency=low + + * bug fix when choosing language & region. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-40 + + -- MyoungJune Park Mon, 28 Nov 2011 16:01:38 +0900 + +setting (0.1.87-39) unstable; urgency=low + + * Delete Winset menu in SLP binary & I9200 binary. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-39 + + -- MyoungJune Park Mon, 28 Nov 2011 12:01:31 +0900 + +setting (0.1.87-38) unstable; urgency=low + + * Delete Winset menu in SLP binary + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-38 + + -- Taesoo Jun Sat, 26 Nov 2011 17:48:20 +0900 + +setting (0.1.87-37) unstable; urgency=low + + * Delete BT menu in SLP bin, Rollback flight mode UX scenario, Apply model name policy from HG Shin + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-37 + + -- Taesoo Jun Sat, 26 Nov 2011 17:04:36 +0900 + +setting (0.1.87-36) unstable; urgency=low + + * release. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-36 + + -- MyoungJune Park Fri, 25 Nov 2011 17:51:37 +0900 + +setting (0.1.87-35) unstable; urgency=low + + * updated popup-message ("Unspported function"), if ug is not loaded. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-35 + + -- MyoungJune Park Fri, 25 Nov 2011 11:30:33 +0900 + +setting (0.1.87-34) unstable; urgency=low + + * disabled Motion menu. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-34 + + -- MyoungJune Park Fri, 25 Nov 2011 10:25:25 +0900 + +setting (0.1.87-33) unstable; urgency=low + + * USB_NONE_MODE is added when USB cable is disconnected + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-33 + + -- Taeyoung Kim Thu, 24 Nov 2011 22:06:15 +0900 + +setting (0.1.87-32) unstable; urgency=low + + * release. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-32 + + -- MyoungJune Park Thu, 24 Nov 2011 20:38:32 +0900 + +setting (0.1.87-31) unstable; urgency=low + + * disabled Music player on SLP. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-31 + + -- MyoungJune Park Thu, 24 Nov 2011 20:26:18 +0900 +>>>>>>> efecc24059662b2cc87d0cf5813fd3ff5adb3d0e + +setting (0.1.87-30) unstable; urgency=low + + * disable Facebook, Twitter, Account, kies via wifi on SLP binary. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-30 + + -- MyoungJune Park Thu, 24 Nov 2011 18:31:12 +0900 + +setting (0.1.87-29) unstable; urgency=low + + * Upload pkg + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-29 + + -- Yin Kairong Thu, 24 Nov 2011 02:43:04 -0800 + +setting (0.1.87-28) unstable; urgency=low + + * disabled Menu screen. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-28 + + -- MyoungJune Park Thu, 24 Nov 2011 11:35:22 +0900 + +setting (0.1.87-27) unstable; urgency=low + + * enabled effect in Display setting. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-27 + + -- MyoungJune Park Thu, 24 Nov 2011 10:03:27 +0900 + +setting (0.1.87-26) unstable; urgency=low + + * fixed : H0100137336, H0100137322, H0100137326 :update code for genlist entry. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-26 + + -- MyoungJune Park Tue, 22 Nov 2011 22:07:48 +0900 + +setting (0.1.87-25) unstable; urgency=low + + * elm_naviframe_item_pop is used for view change. + * fixed : H0100137245 Manual brightness bar show automatic brightness level after reopening brightness; Display settings. + * Fix CQ, H0100137240,H0100137241,H0100137242: set word wrap mode in the label of popup. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-25 + + -- MyoungJune Park Tue, 22 Nov 2011 20:44:49 +0900 + +setting (0.1.87-24) unstable; urgency=low + + * Merge "fix CQ #H0100137170 : add to call elm_object_focus() on ug_start" + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-24 + + -- MyoungJune Park Mon, 21 Nov 2011 20:59:45 +0900 + +setting (0.1.87-23) unstable; urgency=low + + * release. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-23 + + -- Hyejin Kim Mon, 21 Nov 2011 17:52:39 +0900 + +setting (0.1.87-22) unstable; urgency=low + + * release3. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-22 + + -- MyoungJune Park Thu, 17 Nov 2011 20:30:58 +0900 + +setting (0.1.87-21) unstable; urgency=low + + * release2. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-21 + + -- Hyejin Kim Thu, 17 Nov 2011 18:43:36 +0900 + +setting (0.1.87-20) unstable; urgency=low + + * release. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-20 + + -- MyoungJune Park Thu, 17 Nov 2011 18:30:43 +0900 +>>>>>>> e7242e9d83c14c6c4d63fbf3247a517ee3458448 + +setting (0.1.87-19) unstable; urgency=low + + * updated slider control in setting-common. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-19 + + -- MyoungJune Park Wed, 16 Nov 2011 19:21:31 +0900 + +setting (0.1.87-18) unstable; urgency=low + + * Merge "set used pointers to NULL for UGs". + * In about phone, model name is shown in case of I9500 binary. + * update name of ringtone on resuming ug, after other apps change or remove it. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-18 + + -- MyoungJune Park Wed, 16 Nov 2011 19:21:31 +0900 + +setting (0.1.87-17) unstable; urgency=low + + * assign NULL to ug pointer when ug is destroyed + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-17 + + -- Hyejin Kim Wed, 16 Nov 2011 15:04:35 +0900 + +setting (0.1.87-16) unstable; urgency=low + + * fix animation effect. + * removed the unused code. + * Merge "Apply new 'Reset' UI according to the newest UI guildline". + * Merge "When time is automatically updated, disable 'Timezone' and 'Date and Time' menu". + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-16 + + -- MyoungJune Park Wed, 16 Nov 2011 11:10:40 +0900 + +setting (0.1.87-15) unstable; urgency=low + + * Disabled animation effect by caller, as UG supports it by callee + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-15 + + -- Taeyoung Kim Tue, 15 Nov 2011 20:09:41 +0900 + +setting (0.1.87-14) unstable; urgency=low + + * updated accessiblity icon. + * fix H0100136698 : modify operation of slider in sound ug. + * change style of controlbar in sound ug. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-14 + + -- MyoungJune Park Tue, 15 Nov 2011 17:16:39 +0900 + +setting (0.1.87-13) unstable; urgency=low + + * removed launch effect/image in display setting, it's feature for demo not release. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-13 + + -- MyoungJune Park Mon, 14 Nov 2011 19:50:16 +0900 + +setting (0.1.87-12) unstable; urgency=low + + * fix lockup when pre-listening removed tone file. + * fix H0100136550 : modify isEmptyStr() function. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-12 + + -- MyoungJune Park Fri, 11 Nov 2011 18:24:21 +0900 + +setting (0.1.87-11) unstable; urgency=low + + * modified bg image path (.png --> .jpg) + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-11 + + -- MyoungJune Park Fri, 11 Nov 2011 13:05:16 +0900 + +setting (0.1.87-10) unstable; urgency=low + + * fixed : H0100136428, removed Chiness language in case of SLP binary. + * fixed H0100136431 : popup window occurs in case of SLP binary instead of actual UG. + * add to check that ug is already loaded ( in Sound UG ) + * delete existing pointers before new entries are created in simple password mode. + * improve performance of sliderbars. + * Make lables on controlbar more operate-able. + * Fix view updating issues after language reset. + * Replacing buttons on controllbar with lables. + * Adding ICU timezone set. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-10 + + -- MyoungJune Park Thu, 10 Nov 2011 20:19:30 +0900 + +setting (0.1.87-9) unstable; urgency=low + + * removed duplicated vconf call on Flight mode. + * bug fix on accessibinity settings. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-9 + + -- MyoungJune Park Wed, 09 Nov 2011 22:22:50 +0900 + +setting (0.1.87-8) unstable; urgency=low + + * Update main genlist in UG unload or App resume without UG + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-8 + + -- Taesoo Jun Wed, 09 Nov 2011 00:59:38 +0900 + +setting (0.1.87-7) unstable; urgency=low + + * Apply new usage of the Naviframe. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-7 + + -- Yin Kairong Tue, 08 Nov 2011 02:32:47 -0800 + +setting (0.1.87-6) unstable; urgency=low + + * release + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-6 + + -- MyoungJune Park Tue, 08 Nov 2011 14:14:08 +0900 + +setting (0.1.87-5) unstable; urgency=low + + * Accessibility updates. + * added db/setting/timezone_id key. + * fix H0100136398 : fix that IME removes quickly in password ug. + * fixed STMS DB issues, some strings are ommited. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-5 + + -- MyoungJune Park Mon, 07 Nov 2011 20:28:12 +0900 + +setting (0.1.87-4) unstable; urgency=low + + * fixed compile error. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-4 + + -- MyoungJune Park Fri, 04 Nov 2011 16:26:56 +0900 + +setting (0.1.87-3) unstable; urgency=low + + * profile reset function in Network menu: CQ H0100135933. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-3 + + -- MyoungJune Park Fri, 04 Nov 2011 14:50:46 +0900 + +setting (0.1.87-2) unstable; urgency=low + + * profile reset function in Network menu: CQ H0100135933. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-2 + + -- MyoungJune Park Fri, 04 Nov 2011 07:51:09 +0900 + +setting (0.1.87-1) unstable; urgency=low + + * Release. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-1 + + -- Yin Kairong Thu, 03 Nov 2011 02:02:26 -0700 + +setting (0.1.86-101) unstable; urgency=low + + * fix H0100136263 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-101 + + -- Hyejin Kim Thu, 03 Nov 2011 17:01:47 +0900 + +setting (0.1.86-100) unstable; urgency=low + + * Upload pkg. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-100 + + -- Yin Kairong Wed, 02 Nov 2011 01:07:07 -0700 + +setting (0.1.86-99) unstable; urgency=low + + * Merge "Apply new GUI of Motions." + * fix H0100135740 + * add to handle RESET type in password ug when simple password option is on. + * fix H0100135906. + * fix H0100135876 and split callback function into each entry. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-99 + + -- MyoungJune Park Thu, 27 Oct 2011 18:31:21 +0900 + +setting (0.1.86-98) unstable; urgency=low + + * fixed : H0100135754. + * Make segment buttons bigger. + * Fix H0100135908: Line on the bottom of the screen in Events notifications screen. + * For device name, disable input space character and apply changes when entry lost the focus. + * Listen smart event 'maxlength,reached' to check the max lenght limitation. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-98 + + -- MyoungJune Park Thu, 27 Oct 2011 17:21:54 +0900 + +setting (0.1.86-97) unstable; urgency=low + + * Customize Lock screen -> Cusomi*s*e Lock screen - string update. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-97 + + -- MyoungJune Park Tue, 25 Oct 2011 13:35:15 +0900 + +setting (0.1.86-96) unstable; urgency=low + + * modified default brightness value. + * add default icon on error condition. + * replaced static icon path with AIL function to get icon paths. + * fixed bug on low battery. + * fix animation effect when creating mobile tracker ug. + * fix to set vconfkey of phonelock in case of phonelock view only. + * enabled GL engine. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-96 + + -- MyoungJune Park Mon, 24 Oct 2011 17:46:21 +0900 + +setting (0.1.86-95) unstable; urgency=low + + * dupload + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-95 + + -- MyoungJune Park Thu, 20 Oct 2011 20:12:47 +0900 + +setting (0.1.86-94) unstable; urgency=low + + * updated LANG_ --> SETTING_LANG_xxx. + * Fixed CQ:H0100135171. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-94 + + -- MyoungJune Park Thu, 20 Oct 2011 19:49:03 +0900 + +setting (0.1.86-93) unstable; urgency=low + + * added icons. + * apply SUPPORT_RCS_FOR_DEMO macro additionally. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-93 + + -- MyoungJune Park Wed, 19 Oct 2011 17:45:17 +0900 + +setting (0.1.86-92) unstable; urgency=low + + * disable 'Display' menu on low battery. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-92 + + -- MyoungJune Park Wed, 19 Oct 2011 10:34:10 +0900 + +setting (0.1.86-91) unstable; urgency=low + + * Upload pkg. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-91 + + -- Yin Kairong Mon, 17 Oct 2011 23:22:28 -0700 + +setting (0.1.86-90) unstable; urgency=low + + * update image. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-90 + + -- MyoungJune Park Sat, 15 Oct 2011 13:33:40 +0900 + +setting (0.1.86-89) unstable; urgency=low + + * update image for motion setting. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-89 + + -- MyoungJune Park Fri, 14 Oct 2011 21:30:41 +0900 + +setting (0.1.86-88) unstable; urgency=low + + * Upload pkg.. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-88 + + -- Yin Kairong Fri, 14 Oct 2011 02:16:15 -0700 + +setting (0.1.86-87) unstable; urgency=low + + * updated theme string from vconf, so UI code in setting also has been updated. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-87 + + -- MyoungJune Park Fri, 14 Oct 2011 17:40:34 +0900 + +setting (0.1.86-86) unstable; urgency=low + + * avoid B/S, in setting > sound. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-86 + + -- MyoungJune Park Thu, 13 Oct 2011 20:02:04 +0900 + +setting (0.1.86-85) unstable; urgency=low + + * enabled motion setting as default. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-85 + + -- MyoungJune Park Thu, 13 Oct 2011 18:14:04 +0900 + +setting (0.1.86-84) unstable; urgency=low + + * tested if new libicu has no issue in setting app. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-84 + + -- MyoungJune Park Thu, 13 Oct 2011 10:48:31 +0900 + +setting (0.1.86-83) unstable; urgency=low + + * apply black theme to simple password view. + * Enhance max character number in Device Name. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-83 + + -- MyoungJune Park Wed, 12 Oct 2011 21:37:58 +0900 + +setting (0.1.86-82) unstable; urgency=low + + * Upload pkg to apply changes. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-82 + + -- Yin Kairong Tue, 11 Oct 2011 23:38:59 -0700 + +setting (0.1.86-81) unstable; urgency=low + + * fixed Prevent issues. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-81 + + -- MyoungJune Park Mon, 10 Oct 2011 19:48:09 +0900 + +setting (0.1.86-80) unstable; urgency=low + + * Continue making adjustions on UI to meet with new HD resolution. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-80 + + -- Yin Kairong Sun, 09 Oct 2011 00:20:20 -0700 + +setting (0.1.86-79) unstable; urgency=low + + * Upload pkg to apply changes. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-79 + + -- Yin Kairong Sat, 08 Oct 2011 08:16:00 -0700 + +setting (0.1.86-78) unstable; urgency=low + + * Make a bit adjustion on UI to meet with new resolution. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-78 + + -- Yin Kairong Sat, 08 Oct 2011 08:13:32 -0700 + +setting (0.1.86-77) unstable; urgency=low + + * Adjust the text description of 'Licence->DivX@VOD->DivX de/registration', Add underline in URL, Add URL openning operation when clicking the URL. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-77 + + -- Yin Kairong Sat, 08 Oct 2011 07:10:40 -0700 + +setting (0.1.86-76) unstable; urgency=low + + * Replace navigationbar with naviframe. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-76 + + -- Yin Kairong Sat, 08 Oct 2011 06:56:48 -0700 + +setting (0.1.86-75) unstable; urgency=low + + * Referring to tester's opinion, immediately apply the motion sensitivity and fix H0100133022,H0100133023 ,H0100133027 and H0100133028. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-75 + + -- Yin Kairong Fri, 07 Oct 2011 19:38:40 -0700 + +setting (0.1.86-74) unstable; urgency=low + + * fixed Prevent issues. + * fixed DST time issue. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-74 + + -- MyoungJune Park Fri, 07 Oct 2011 17:51:32 +0900 + +setting (0.1.86-73) unstable; urgency=low + + * added NFC setting in application category. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-73 + + -- MyoungJune Park Thu, 06 Oct 2011 23:02:31 +0900 + +setting (0.1.86-72) unstable; urgency=low + + * modified usb-setting. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-72 + + -- MyoungJune Park Thu, 06 Oct 2011 22:49:53 +0900 + +setting (0.1.86-71) unstable; urgency=low + + * release + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-71 + + -- MyoungJune Park Thu, 06 Oct 2011 21:14:39 +0900 + +setting (0.1.86-70) unstable; urgency=low + + * fixed H0100133972. (Locations/Network/USB help contents headlines are not bold) + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-70 + + -- MyoungJune Park Thu, 06 Oct 2011 21:06:42 +0900 + +setting (0.1.86-69) unstable; urgency=low + + * In About phone > Version, the display format changed. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-69 + + -- Taesoo Jun Wed, 05 Oct 2011 13:38:40 +0900 + +setting (0.1.86-68) unstable; urgency=low + + * fixed DST time issue, preventing from infinite loop. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-68 + + -- MyoungJune Park Tue, 04 Oct 2011 15:38:02 +0900 + +setting (0.1.86-67) unstable; urgency=low + + * updated STMS strings. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-67 + + -- MyoungJune Park Sat, 01 Oct 2011 21:32:39 +0900 + +setting (0.1.86-66) unstable; urgency=low + + * on Reset, fixed mismatch language & index. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-66 + + -- MyoungJune Park Sat, 01 Oct 2011 20:37:03 +0900 + +setting (0.1.86-65) unstable; urgency=low + + * applied i18n Strings : 'All'. + * implemented "High Contrast" menu. + * implemented "Automatic answering" mode in connection with CISS. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-65 + + -- MyoungJune Park Sat, 01 Oct 2011 15:44:14 +0900 + +setting (0.1.86-64) unstable; urgency=low + + * fixed timezone error when user set a timezone to specific zone with DST(Daylight Saving Time). it may set the hour to 1 hour above correct time. + * Fix BS after activate 'Select all' in Settings + * fixed H0100134114, replaced "Locations" -> "Location" + * Fix the Crash occured when selecting GSM 900/1800 network band in settings + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-64 + + -- MyoungJune Park Fri, 30 Sep 2011 20:50:32 +0900 + +setting (0.1.86-63) unstable; urgency=low + + * Fix the Crash occured when selecting GSM 900/1800 network band in settings. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-63 + + -- Yin Kairong Thu, 29 Sep 2011 23:52:47 -0700 + +setting (0.1.86-62) unstable; urgency=low + + * USB-utilities is recovered to setting_0.1.86-59 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-62 + + -- Taeyoung Kim Fri, 30 Sep 2011 09:42:04 +0900 + +setting (0.1.86-61) unstable; urgency=low + + * remove tapi-priv dependency + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-61 + + -- Taesoo Jun Thu, 29 Sep 2011 21:37:22 +0900 + +setting (0.1.86-60) unstable; urgency=low + + * revert 'revert TAPI priv dep.' + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-60 + + -- MyoungJune Park Thu, 29 Sep 2011 18:02:42 +0900 + +setting (0.1.86-59) unstable; urgency=low + + * revert TAPI priv dep. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-59 + + -- MyoungJune Park Thu, 29 Sep 2011 14:50:54 +0900 + +setting (0.1.86-58) unstable; urgency=low + + * add sensor checking. + * delete timer when password ug is destroyed (H0100134173, H0100134174). + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-58 + + -- MyoungJune Park Thu, 29 Sep 2011 11:24:14 +0900 + +setting (0.1.86-57) unstable; urgency=low + + * apply design ID for text. + * reupload by git tag fail. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-57 + + -- MyoungJune Park Tue, 27 Sep 2011 15:33:25 +0900 + +setting (0.1.86-56) unstable; urgency=low + + * updated CMakeLists.txt, to put images for Settting > Motion. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-56 + + -- MyoungJune Park Tue, 27 Sep 2011 11:53:53 +0900 + +setting (0.1.86-55) unstable; urgency=low + + * fixed H0100133409. + * moved DEVICE_NAME to vconf, to share the name with other modules. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-55 + + -- MyoungJune Park Tue, 27 Sep 2011 08:51:29 +0900 + +setting (0.1.86-54) unstable; urgency=low + + * Remove the temp code for Event Propropagation Issue in NavigationBar. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-54 + + -- Yin Kairong Sun, 25 Sep 2011 23:12:45 -0700 + +setting (0.1.86-53) unstable; urgency=low + + * change eng String with STMS string. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-53 + + -- MyoungJune Park Sat, 24 Sep 2011 18:05:38 +0900 + +setting (0.1.86-52) unstable; urgency=low + + * added Certificated menu in setting > about. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-52 + + -- MyoungJune Park Fri, 23 Sep 2011 14:59:23 +0900 + +setting (0.1.86-51) unstable; urgency=low + + * diabled SMC test code. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-51 + + -- MyoungJune Park Thu, 22 Sep 2011 14:15:13 +0900 + +setting (0.1.86-50) unstable; urgency=low + + * diabled accessibility settings. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-50 + + -- MyoungJune Park Tue, 20 Sep 2011 19:14:47 +0900 + +setting (0.1.86-49) unstable; urgency=low + + * prevent vtmain & call from being terminated if language changes. + * removed vonf kyes after regstering them in libslp-setting(motion setting). + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-49 + + -- MyoungJune Park Mon, 19 Sep 2011 11:15:32 +0900 + +setting (0.1.86-48) unstable; urgency=low + + * Uplaod pkg to apply changes. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-48 + + -- Yin Kairong Sat, 17 Sep 2011 01:02:21 -0700 + +setting (0.1.86-47) unstable; urgency=low + + * fixed compile error. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-47 + + -- MyoungJune Park Fri, 16 Sep 2011 20:12:35 +0900 + +setting (0.1.86-46) unstable; urgency=low + + * db/setting/usb_mode is changed to memory/setting/usb_mode + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-46 + + -- Taeyoung Kim Fri, 16 Sep 2011 18:10:52 +0900 + +setting (0.1.86-45) unstable; urgency=low + + * removed HARDKEY(Back) handler. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-45 + + -- MyoungJune Park Fri, 16 Sep 2011 14:02:56 +0900 + +setting (0.1.86-44) unstable; urgency=low + + * removed HARDKEY(Back) handler. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-44 + + -- MyoungJune Park Thu, 15 Sep 2011 21:43:37 +0900 + +setting (0.1.86-43) unstable; urgency=low + + * disabled Internet menu. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-43 + + -- MyoungJune Park Wed, 14 Sep 2011 13:12:00 +0900 + +setting (0.1.86-42) unstable; urgency=low + + * Upload pkg to fix the gallery password lock issue. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-42 + + -- Yin Kairong Mon, 12 Sep 2011 18:26:12 -0700 + +setting (0.1.86-41) unstable; urgency=low + + * updated i18n strings from STMS. + * Help window of USB utilities is modified to apply an improved function(elm_genlist_height_for_width_mode_set()) + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-41 + + -- MyoungJune Park Fri, 09 Sep 2011 16:43:57 +0900 + +setting (0.1.86-40) unstable; urgency=low + + * updated i18n strings from STMS. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-40 + + -- MyoungJune Park Fri, 09 Sep 2011 11:47:18 +0900 + +setting (0.1.86-39) unstable; urgency=low + + * naming rules. + * fixed entry issue of simple password. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-39 + + -- MyoungJune Park Thu, 08 Sep 2011 11:47:17 +0900 + +setting (0.1.86-38) unstable; urgency=low + + * refactoring code. + * fixed entry issue of simple password. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-38 + + -- MyoungJune Park Thu, 08 Sep 2011 09:32:58 +0900 + +setting (0.1.86-37) unstable; urgency=low + + * Add special processes for 'Winset' theme resetting. + * Fix some mistake usage of g_strlcat. + * removed #if 0 ~ #if 1 and return -1. + * Add vconf listener in 'setting->memory->memory status'. + * Adjust the UI of 'Accessibility->Font style' according to UI document. + * Adjust the UI of 'Accessibility->Font size' according to UI document. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-37 + + -- MyoungJune Park Tue, 06 Sep 2011 19:42:22 +0900 + +setting (0.1.86-36) unstable; urgency=low + + * replaced strncat with g_strlcat. + * added Manage Applications menu(UG). + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-36 + + -- MyoungJune Park Mon, 05 Sep 2011 20:24:17 +0900 + +setting (0.1.86-35) unstable; urgency=low + + * fixed Douch string error at Setting/Rotation. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-35 + + -- MyoungJune Park Mon, 05 Sep 2011 17:33:09 +0900 + +setting (0.1.86-34) unstable; urgency=low + + * removed fms-util-dev + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-34 + + -- MyoungJune Park Fri, 02 Sep 2011 09:49:56 +0900 + +setting (0.1.86-33) unstable; urgency=low + + * Mobile hotspot mode is added to USB utilities and back button is disabled during mode change + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-33 + + -- Taeyoung Kim Thu, 01 Sep 2011 21:02:44 +0900 + +setting (0.1.86-32) unstable; urgency=low + + * disabled aul_listen_app_dead_signal call(because when setting app is deactivated,LANG changes.) + * Fix popup info display issue when changing language. + * replaced strncat with g_strlcat,as it's more secure. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-32 + + -- MyoungJune Park Thu, 01 Sep 2011 10:39:06 +0900 + +setting (0.1.86-31) unstable; urgency=low + + * Default USB connection mode is changed to KIES mode + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-31 + + -- Taeyoung Kim Wed, 31 Aug 2011 17:28:21 +0900 + +setting (0.1.86-30) unstable; urgency=low + + * removed 'LANG_CHANGED' heynoti, because of not in use. + * Fixed H0100133016. + * Fixed H0100133042: Option is named: 'Font style' but title inside is: 'Font selection' + * Added ug_send_event code to bypass the event to UG. + * Replaced old separator style with newer one. + * Added prefix 'pa(pointer of allocated ..) to alloced string, inorder to free. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-30 + + -- MyoungJune Park Wed, 31 Aug 2011 09:03:38 +0900 + +setting (0.1.86-29) unstable; urgency=low + + * Fix the vconf listening issue and remove the unused code in setting-network + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-29 + + -- MyoungJune Park Mon, 29 Aug 2011 15:28:42 +0900 + +setting (0.1.86-28) unstable; urgency=low + + * Fix the vconf listening issue and remove the unused code in setting-network + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-28 + + -- Yin Kairong Sun, 28 Aug 2011 22:07:07 -0700 + +setting (0.1.86-27) unstable; urgency=low + + * Re-implement 'Network mode' using expandable list + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-27 + + -- Yin Kairong Sun, 28 Aug 2011 22:04:51 -0700 + +setting (0.1.86-26) unstable; urgency=low + + * Fix the GUI checking issue of 'Wallpaper'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-26 + + -- Yin Kairong Sun, 28 Aug 2011 21:58:38 -0700 + +setting (0.1.86-25) unstable; urgency=low + + * added to moving to one-level up view after changing language + * added an additional filter by PID for setting app. after changing language + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-25 + + -- Taesoo Jun Mon, 29 Aug 2011 08:03:37 +0900 + +setting (0.1.86-24) unstable; urgency=low + + * fixed B/S issues on Reset settings. + * added i18n strings. + * remove icons on controlbar. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-24 + + -- MyoungJune Park Sat, 27 Aug 2011 17:52:08 +0900 + +setting (0.1.86-23) unstable; urgency=low + + * Upload pkg. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-23 + + -- Yin Kairong Fri, 26 Aug 2011 20:23:11 -0700 + +setting (0.1.86-22) unstable; urgency=low + + * added i18n string from STMS 2 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-22 + + -- MyoungJune Park Fri, 26 Aug 2011 18:02:21 +0900 + +setting (0.1.86-21) unstable; urgency=low + + * added i18n string from STMS. + * fixed password UG - workflow. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-21 + + -- MyoungJune Park Fri, 26 Aug 2011 13:29:19 +0900 + +setting (0.1.86-20) unstable; urgency=low + + * added i18n string from STMS. + * removed build warnings. + * added Facebook & Twitter UGs. + * changed icons of sound sliders. + * updated postinst file. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-20 + + -- MyoungJune Park Thu, 25 Aug 2011 19:29:27 +0900 + +setting (0.1.86-19) unstable; urgency=low + + * Apply 'Resetting' function for all UGs and Setting app itself. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-19 + + -- Yin Kairong Wed, 24 Aug 2011 19:09:20 -0700 + +setting (0.1.86-18) unstable; urgency=low + + * enabled Accessiblity setting. + * refined Reset setting (UI). + * applied 'Back' button guided by UX. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-18 + + -- MyoungJune Park Wed, 24 Aug 2011 17:57:29 +0900 + +setting (0.1.86-17) unstable; urgency=low + + * enabled Accessiblity setting. + * replaced LGPL header with Apache header. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-17 + + -- MyoungJune Park Wed, 24 Aug 2011 13:47:46 +0900 + +setting (0.1.86-16) unstable; urgency=low + + * Fix the BS issue when language being changed. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-16 + + -- MyoungJune Park Mon, 22 Aug 2011 18:12:02 +0900 + +setting (0.1.86-15) unstable; urgency=low + + * enabled Accessibility setting - vconf. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-15 + + -- MyoungJune Park Mon, 22 Aug 2011 11:16:27 +0900 + +setting (0.1.86-14) unstable; urgency=low + + * enabled Motion Setting. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-14 + + -- MyoungJune Park Sat, 20 Aug 2011 17:35:53 +0900 + +setting (0.1.86-13) unstable; urgency=low + + * disabled Exchange Server menu. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-13 + + -- MyoungJune Park Fri, 19 Aug 2011 11:37:53 +0900 + +setting (0.1.86-12) unstable; urgency=low + + * Upload package to apply changes. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-12 + + -- Yin Kairong Thu, 18 Aug 2011 02:28:58 -0700 + +setting (0.1.86-11) unstable; urgency=low + + * Change the View Managing strategy to improve Setting response speed and fix CQ H0100131629. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-11 + + -- Yin Kairong Wed, 17 Aug 2011 21:52:11 -0700 + +setting (0.1.86-10) unstable; urgency=low + + * Apply new 'Select network' UI to fix CQ H0100129289,H0100129846. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-10 + + -- Yin Kairong Wed, 17 Aug 2011 21:49:23 -0700 + +setting (0.1.86-9) unstable; urgency=low + + * Remove the Non-Const Global Variables and clear unused code in setting-memory. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-9 + + -- Yin Kairong Wed, 17 Aug 2011 01:04:25 -0700 + +setting (0.1.86-8) unstable; urgency=low + + * enabled 'Back' button (arrow) in main view. + * disabled the features of 'Motion settings' until UX team provides imgs. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-8 + + -- MyoungJune Park Fri, 12 Aug 2011 20:05:28 +0900 + +setting (0.1.86-7) unstable; urgency=low + + * applied battery percentage in Indicator. + * removed unused dir (wallpaper, lockscreen) in /opt/data/setting. + * enabled the features of 'Motion settings'. + * added setting_plugin_reset caller to all UGs. + * Add processbar after change language and killed all other apps. + * apply simple password. + * optimize on creating sound ug. + * .UTF8 -> .UTF-8 in region format vconf. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-7 + + -- MyoungJune Park Fri, 12 Aug 2011 17:19:44 +0900 + +setting (0.1.86-6) unstable; urgency=low + + * To perfect the features of 'Motion settings'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-6 + + -- Yin Kairong Thu, 11 Aug 2011 18:47:46 -0700 + +setting (0.1.86-5) unstable; urgency=low + + * Modify the usage of 'Nbeat Layout Style & elm_bg Usage Guide' + * added .UTF8 suffix at regionformat vconf value + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-5 + + -- Yin Kairong Thu, 11 Aug 2011 02:53:42 -0700 + +setting (0.1.86-4) unstable; urgency=low + + * applied new AIL library in place of old one + * added .UTF8 suffix at regionformat vconf value + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-4 + + -- MyoungJune Park Wed, 10 Aug 2011 14:36:03 +0900 + +setting (0.1.86-3) unstable; urgency=low + + * fixed Prevent issues. + * set new vconf initial value in .postinst (setting > Brightness). + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-3 + + -- MyoungJune Park Mon, 08 Aug 2011 20:38:13 +0900 + +setting (0.1.86-2) unstable; urgency=low + + * release + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-2 + + -- MyoungJune Park Mon, 08 Aug 2011 11:22:23 +0900 + +setting (0.1.86-1) stable; urgency=low + + * fixed Prevent issues. CID:45897, 55764 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-1 + + -- MyoungJune Park Thu, 04 Aug 2011 20:17:37 +0900 + +setting (0.1.85-99) unstable; urgency=low + + * sound > ringtone > ex_genlist & vconf set problem fix. + * Remove the WARRINGs and ERRORs reported by the indent tool. + * fixed Prevent issues. CID:45897, 55764 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-99 + + -- MyoungJune Park Wed, 03 Aug 2011 19:05:57 +0900 + +setting (0.1.85-98) unstable; urgency=low + + * Remove the WARRINGs and ERRORs reported by the indent tool. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-98 + + -- Yin Kairong Tue, 02 Aug 2011 20:15:23 -0700 + +setting (0.1.85-97) unstable; urgency=low + + * down-height of genlist entries, containing sliderbars. + * re-upload by tag-mismatch. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-97 + + -- MyoungJune Park Tue, 02 Aug 2011 21:03:36 +0900 + +setting (0.1.85-95) unstable; urgency=low + + * On simulator, brightness value is sometimes negative value. - exception handler. + * fixed Prevent issues. + * refined Setting > Reset by plugin-model with the libdl. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-95 + + -- MyoungJune Park Tue, 02 Aug 2011 11:09:43 +0900 + +setting (0.1.85-94) unstable; urgency=low + + * fixed the vconf pair for listen/unlisten in mobile hotspot. + * Redefine the exception handle when access /opt/data/setting/setting.cfg failed. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-94 + + -- MyoungJune Park Fri, 29 Jul 2011 09:35:04 +0900 + +setting (0.1.85-93) unstable; urgency=low + + * Remove the deprecated APIs. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-92 + + -- Yin Kairong Tue, 26 Jul 2011 22:24:49 -0700 + +setting (0.1.85-92) unstable; urgency=low + + * Make specialization words line feed automatically and fix the issue in 'Sound->Back'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-92 + + -- MyoungJune Park Tue, 26 Jul 2011 17:56:15 -0700 + +setting (0.1.85-91) unstable; urgency=low + + * Add a new UG called ug-motion-efl, and load it in 'Setting->Display->Motions'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-91 + + -- MyoungJune Park Mon, 25 Jul 2011 20:10:40 -0700 + +setting (0.1.85-90) unstable; urgency=low + + * To do formatting customizition of 'Help' diloge style in one place. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-90 + + -- Yin Kairong Mon, 25 Jul 2011 19:06:40 -0700 + +setting (0.1.85-89) unstable; urgency=low + + * Adjust the alignment of POPUP content. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-89 + + -- Yin Kairong Mon, 25 Jul 2011 19:01:42 -0700 + +setting (0.1.85-88) unstable; urgency=low + + * Optimize the code relate to ICU. + * Changing UI of usb utilities and solving a migration problem on the help page + * Fixed Battery, CPU usage - dispaly wrong values. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-88 + + -- MyoungJune Park Thu, 21 Jul 2011 17:43:30 +0900 + +setting (0.1.85-87) unstable; urgency=low + + * Fix the blunt issue during 'Sound' Tabs switching. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-87 + + -- Yin Kairong Tue, 19 Jul 2011 23:17:49 -0700 + +setting (0.1.85-86) unstable; urgency=low + + * Fixing emulator issue that application exits on changing volume of incoming call + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-86 + + -- Taeyoung Kim Tue, 19 Jul 2011 15:30:56 +0900 + +setting (0.1.85-85) unstable; urgency=low + + * enabled DLOG. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-85 + + -- MyoungJune Park Mon, 18 Jul 2011 20:29:51 +0900 + +setting (0.1.85-84) unstable; urgency=low + + * Re-define 'bool' type to be 'Eina_Bool'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-84 + + -- Yin Kairong Sun, 17 Jul 2011 21:35:32 -0700 + +setting (0.1.85-83) unstable; urgency=low + + * fixed vconf creation error for db/setting/lang. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-83 + + -- MyoungJune Park Mon, 18 Jul 2011 15:21:40 +0900 + +setting (0.1.85-82) unstable; urgency=low + + * Trival change to upload PKG + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-82 + + -- Taesoo Jun Sun, 17 Jul 2011 15:51:47 +0900 + +setting (0.1.85-81) unstable; urgency=low + + * Applying new UI of USB utilities + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-81 + + -- Taeyoung Kim Tue, 12 Jul 2011 17:48:06 +0900 + +setting (0.1.85-80) unstable; urgency=low + + * added ICU code in setting-time & code clean. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-80 + + -- MyoungJune Park Sun, 10 Jul 2011 17:44:47 +0900 + +setting (0.1.85-79) unstable; urgency=low + + * Fix the slider indicator-popup coverd issue(eg, Setting->Display->Brightness->flick the slider). + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-79 + + -- Yin Kairong Fri, 08 Jul 2011 00:32:48 -0700 + +setting (0.1.85-78) unstable; urgency=low + + * Apply ' language / region change / REDRAW all views instead of terminating app itself.'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-78 + + -- Yin Kairong Tue, 05 Jul 2011 18:09:18 -0700 + +setting (0.1.85-77) unstable; urgency=low + + * Upload package to apply changes. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-77 + + -- Yin Kairong Tue, 05 Jul 2011 01:29:22 -0700 + +setting (0.1.85-76) unstable; urgency=low + + * Apply animation effect when a UG loading ug-setting-password-efl or ug-mobile-tracker-efl + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-76 + + -- Yin Kairong Mon, 04 Jul 2011 23:15:14 -0700 + +setting (0.1.85-75) unstable; urgency=low + + * Fix the issue 'Not able to see what is written when more then 8 line of text is inputed in Device name; About phone'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-75 + + -- Yin Kairong Mon, 04 Jul 2011 19:39:19 -0700 + +setting (0.1.85-74) unstable; urgency=low + + * Re-arrange the API setting_layout_navi_bar_add_buttons ..etc + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-74 + + -- Yin Kairong Mon, 04 Jul 2011 19:30:28 -0700 + +setting (0.1.85-73) unstable; urgency=low + + * Fix the black screen issue when loading ug-gallery-efl. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-73 + + -- Yin Kairong Mon, 04 Jul 2011 19:13:06 -0700 + +setting (0.1.85-72) unstable; urgency=low + + * Add animation effect when loading UGs in 'Wallpaper'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-72 + + -- Yin Kairong Mon, 04 Jul 2011 19:04:28 -0700 + +setting (0.1.85-71) unstable; urgency=low + + * Abstract animation API for Setting APP and its UGs. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-71 + + -- Yin Kairong Mon, 04 Jul 2011 19:01:09 -0700 + +setting (0.1.85-70) unstable; urgency=low + + * Fix H0100123573 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-70 + + -- Tang Feng Fri, 02 Jul 2011 9:03:06 +0900 + +setting (0.1.85-69) unstable; urgency=low + + * added Customized lock screen menu in wallpaper UG. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-69 + + -- MyoungJune Park Fri, 01 Jul 2011 21:03:06 +0900 + +setting (0.1.85-68) unstable; urgency=low + + * refactoring code in setting-common. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-68 + + -- MyoungJune Park Fri, 01 Jul 2011 20:06:49 +0900 + +setting (0.1.85-67) unstable; urgency=low + + * To make Setting App well supportted black-skin. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-67 + + -- MyoungJune Park Tue, 28 Jun 2011 16:08:03 -0700 + +setting (0.1.85-66) unstable; urgency=low + + * Fix 'Navigation bar back key & option header & text alignment' + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-66 + + -- Yin Kairong Sun, 26 Jun 2011 22:14:51 -0700 + +setting (0.1.85-65) unstable; urgency=low + + * Apply 'Battery percentage'menu in 'Setting->Display' . + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-65 + + -- MyoungJune Park Thu, 23 Jun 2011 01:11:30 -0700 + +setting (0.1.85-64) unstable; urgency=low + + * Apply expandable list for Internet/MMS Auth type. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-64 + + -- Yin Kairong Tue, 21 Jun 2011 02:37:58 -0700 + +setting (0.1.85-63) unstable; urgency=low + + * Rename 'Theme' 'Skin color'. + * Recover Mobile app from removing it (mistake). + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-63 + + -- MyoungJune Park Mon, 20 Jun 2011 20:11:00 +0900 + +setting (0.1.85-62) unstable; urgency=low + + * choose 10 menus as default preffered menu. + * replaced ug_get_window() with ug_get_parent_layout(). + * AUI music source replacement. + * fix H0100128438. + * code clean & added doxygen @todo comment for futher work. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-62 + + -- MyoungJune Park Mon, 20 Jun 2011 17:12:00 +0900 + +setting (0.1.85-61) unstable; urgency=low + + * Fix ' Date/Time > Change Time forat 12<->24, it shows flickering at datefield above it ' + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-61 + -- Yin Kairong Thu, 16 Jun 2011 23:20:56 -0700 + +setting (0.1.85-60) unstable; urgency=low + + * removed the unused code (regarding old sound ui). + * added Launch Effect, Launch Image. + * fixed Svace code issues. + * avoid double touch issue by edc updates. + * corrected words, sentenses. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-60 + + -- MyoungJune Park Fri, 17 Jun 2011 09:43:25 +0900 + +setting (0.1.85-59) unstable; urgency=low + + * Upload pkg. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-59 + + -- Yin Kairong Wed, 15 Jun 2011 17:47:38 -0700 + +setting (0.1.85-58) unstable; urgency=low + + * Network > Auth type -> apply Expandable list. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-58 + + -- Yin Kairong Wed, 15 Jun 2011 08:41:51 -0700 + +setting (0.1.85-57) unstable; urgency=low + + * Fix the display issues in 'Setting->About phone'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-57 + + -- Yin Kairong Wed, 15 Jun 2011 08:39:09 -0700 + +setting (0.1.85-56) unstable; urgency=low + + * Add auto-hide operation of input pannel when genlist is pressed in 'ug-about' and 'ug-password'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-56 + + -- Yin Kairong Wed, 15 Jun 2011 04:15:23 -0700 + +setting (0.1.85-55) unstable; urgency=low + + * Fix the BS issue of network connection. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-55 + + -- Yin Kairong Wed, 15 Jun 2011 04:01:16 -0700 + +setting (0.1.85-54) unstable; urgency=low + + * Add process of constructing the first view of ringtone . + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-54 + + -- Yin Kairong Tue, 14 Jun 2011 01:15:05 -0700 + +setting (0.1.85-53) unstable; urgency=low + + * fix UX mismatches. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-53 + + -- MyoungJune Park Mon, 13 Jun 2011 11:20:18 +0900 + +setting (0.1.85-52) unstable; urgency=low + + * Fix [Setting] Password Hashing + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-52 + + -- Yin Kairong Fri, 10 Jun 2011 14:38:53 -0700 + +setting (0.1.85-51) unstable; urgency=low + + * release + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-51 + + -- MyoungJune Park Fri, 10 Jun 2011 17:18:26 +0900 + +setting (0.1.85-50) unstable; urgency=low + + * FIXED H0100125255 - No sound when changing level of Notification volume bar; + * FIXED H0100125264 - No preview of Touch sound level in Sounds touch feedback. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-50 + + -- MyoungJune Park Fri, 10 Jun 2011 13:58:35 +0900 + +setting (0.1.85-49) unstable; urgency=low + + * fix edc file build error + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-49 + + -- Yin Kairong Fri, 10 Jun 2011 03:55:48 -0700 + +setting (0.1.85-48) unstable; urgency=low + + * Add preview operation of vibration. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-48 + + -- Yin Kairong Thu, 09 Jun 2011 08:29:32 -0700 + +setting (0.1.85-47) unstable; urgency=low + + * Fix two UI display issues. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-47 + + -- Yin Kairong Thu, 09 Jun 2011 08:20:45 -0700 + +setting (0.1.85-46) unstable; urgency=low + + * added isInUGMode guard to avoid double execution of callback. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-46 + + -- MyoungJune Park Wed, 08 Jun 2011 20:25:05 +0900 + +setting (0.1.85-45) unstable; urgency=low + + * Fix SVace issues + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-45 + + -- Yin Kairong Tue, 07 Jun 2011 21:44:27 -0700 + +setting (0.1.85-44) unstable; urgency=low + + * Remove code warring info. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-44 + + -- Yin Kairong Tue, 07 Jun 2011 20:14:38 -0700 + +setting (0.1.85-43) unstable; urgency=low + + * Add the missed intialization of vconf 'db/setting/device_name'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-43 + + -- Yin Kairong Tue, 07 Jun 2011 19:16:34 -0700 + +setting (0.1.85-42) unstable; urgency=low + + * Fix the abnormal size of specilization words in network. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-42 + + -- Yin Kairong Tue, 07 Jun 2011 19:12:29 -0700 + +setting (0.1.85-41) unstable; urgency=low + + * Remove unused code in ug-about-efl. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-41 + + -- Yin Kairong Mon, 06 Jun 2011 23:24:55 -0700 + +setting (0.1.85-40) unstable; urgency=low + + * Add hiding operation of all entry-boxes in Setting(eg, about, network, password..etc).. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-40 + + -- Yin Kairong Mon, 06 Jun 2011 23:22:56 -0700 + +setting (0.1.85-39) unstable; urgency=low + + * modified menu name. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-39 + + -- MyoungJune Park Tue, 07 Jun 2011 13:45:03 +0900 + +setting (0.1.85-38) unstable; urgency=low + + * remove old codes. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-38 + + -- mjpark Tue, 07 Jun 2011 13:39:29 +0900 + +setting (0.1.85-37) unstable; urgency=low + + * enabled new Sound UI (it was old style UI by mistake). + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-37 + + -- MyoungJune Park Tue, 07 Jun 2011 10:19:52 +0900 + +setting (0.1.85-36) unstable; urgency=low + + * enabled new Sound UI (it was old style UI by mistake). + * FIXED - H0100125264 No preview of Touch sound level in Sounds touch feedback + * FIXED - H0100125255 No sound when changing level of Notification volume bar; Sounds settings + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-36 + + -- MyoungJune Park Sat, 04 Jun 2011 21:37:50 +0900 + +setting (0.1.85-35) unstable; urgency=low + + * disabled GL engine. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-35 + + -- MyoungJune Park Fri, 03 Jun 2011 22:00:59 +0900 + +setting (0.1.85-34) unstable; urgency=low + + * choose default 10 menus. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-34 + + -- MyoungJune Park Fri, 03 Jun 2011 19:36:42 +0900 + +setting (0.1.85-33) unstable; urgency=low + + * Apply new 'About phone' UI. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-33 + + -- Yin Kairong Fri, 03 Jun 2011 03:44:00 -0700 + +setting (0.1.85-32) unstable; urgency=low + + * Fix 'Coverity Prevent'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-32 + + -- MyoungJune Park Thu, 02 Jun 2011 20:01:58 -0700 + +setting (0.1.85-31) unstable; urgency=low + + * Remove unused code and build warring. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-31 + + -- Yin Kairong Thu, 02 Jun 2011 19:59:15 -0700 + +setting (0.1.85-30) unstable; urgency=low + + * Do redundent code clearring and to decrease memory alloc. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-30 + + -- Yin Kairong Tue, 07 Jun 2011 07:56:14 -0700 + +setting (0.1.85-29) unstable; urgency=low + + * Modify the wrong title of 'language'setting view in SetupWizard. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-29 + + -- MyoungJune Park Sat, 04 Jun 2011 13:14:07 -0700 + +setting (0.1.85-28) unstable; urgency=low + + * replace "db/wifi/connected_ap_name" and VCONFKEY_WIFI_DEVICE with VCONFKEY_WIFI_CONNECTED_AP_NAME + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-28 + + -- Yin Kairong Sat, 04 Jun 2011 12:46:03 -0700 + +setting (0.1.85-27) unstable; urgency=low + + * Remove rundent operation in ug-time-efl and improve the loading speed of time main view. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-27 + + -- Yin Kairong Sat, 04 Jun 2011 11:44:31 -0700 + +setting (0.1.85-26) unstable; urgency=low + + * fixed CQ (H0100127593,H0100127545). + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-26 + + -- MyoungJune Park Wed, 01 Jun 2011 15:09:19 +0900 + +setting (0.1.85-25) unstable; urgency=low + + * rollback to avoding killing quickpanel when changing language. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-25 + + -- MyoungJune Park Tue, 31 May 2011 09:34:12 +0900 + +setting (0.1.85-24) unstable; urgency=low + + * enabled New Sound menu + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-24 + + -- MyoungJune Park Mon, 30 May 2011 10:52:51 +0900 + +setting (0.1.85-23) unstable; urgency=low + + * enabled 'New exchange' menu + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-23 + + -- MyoungJune Park Thu, 26 May 2011 13:33:50 +0900 + +setting (0.1.85-22) unstable; urgency=low + + * Change the new Sound menu with controlbar strategy changeing. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-22 + + -- MyoungJune Park Sat, 04 Jun 2011 07:47:06 -0700 + +setting (0.1.85-21) unstable; urgency=low + + * Fix H0100127328.. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-21 + + -- Yin Kairong Sun, 29 May 2011 19:50:12 -0700 + +setting (0.1.85-20) unstable; urgency=low + + * Fix the loading speed issue of 'Network->internet/MMS connection'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-20 + + -- Yin Kairong Sun, 29 May 2011 12:51:43 -0700 + +setting (0.1.85-19) unstable; urgency=low + + * Upload package. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-19 + + -- Yin Kairong Tue, 24 May 2011 15:24:31 -0700 + +setting (0.1.85-18) unstable; urgency=low + + * Change two resource strings according new UI temply. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-18 + + -- Yin Kairong Tue, 24 May 2011 04:01:53 -0700 + +setting (0.1.85-17) unstable; urgency=low + + * added scrolling support for First Day of Week. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-17 + + -- MyoungJune Park Mon, 23 May 2011 18:56:16 +0900 + +setting (0.1.85-16) unstable; urgency=low + + * Re-implement the expandable style genist item and Fix H0100126957 ,H0100126988 ,and H0100127069.. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-16 + + -- Yin Kairong Mon, 23 May 2011 04:27:15 -0700 + +setting (0.1.85-15) unstable; urgency=low + + * Clear the struct of setting_main_appdata, remove two unused Macros and their relative code. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-15 + + -- Yin Kairong Mon, 23 May 2011 00:15:47 -0700 + +setting (0.1.85-14) unstable; urgency=low + + * Pass ringtone path to myfile-ug in 'Sound' menu. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-14 + + -- Yin Kairong Fri, 20 May 2011 18:38:31 -0700 + +setting (0.1.85-13) unstable; urgency=low + + * Fix the refreshing issue of mmc formating and clear the setting-cfg.c + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-13 + + -- Yin Kairong Thu, 19 May 2011 08:46:54 -0700 + +setting (0.1.85-12) unstable; urgency=low + + * Upload pkg. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-12 + + -- Feng Kai Tue, 17 May 2011 22:28:03 -0700 + +setting (0.1.85-11) unstable; urgency=low + + * Do code Clearing in Setting. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-11 + + -- Yin Kairong Wed, 18 May 2011 13:54:57 -0700 + +setting (0.1.85-10) unstable; urgency=low + + * re-upload. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-10 + + -- Yin Kairong Mon, 16 May 2011 05:43:50 -0700 + +setting (0.1.85-9) unstable; urgency=low + + * Upload package. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-9 + + -- Yin Kairong Mon, 16 May 2011 05:34:27 -0700 + +setting (0.1.85-8) unstable; urgency=low + + * Apply later-release of genlist itc for All UGs. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-8 + + -- Yin Kairong Mon, 16 May 2011 04:50:53 -0700 + +setting (0.1.85-7) unstable; urgency=low + + * avoid killing quickpanel when changing language. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-7 + + -- MyoungJune Park Mon, 16 May 2011 20:23:40 +0900 + +setting (0.1.85-6) unstable; urgency=low + + * libicu40 -> libicu + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-6 + + -- MyoungJune Park Mon, 16 May 2011 11:22:51 +0900 + +setting (0.1.85-5) unstable; urgency=low + + * release of itc, by evas_object_callback_add. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-5 + + -- MyoungJune Park Sat, 14 May 2011 16:36:02 +0900 + +setting (0.1.85-4) unstable; urgency=low + + * re upload. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-4 + + -- MyoungJune Park Fri, 13 May 2011 19:31:21 +0900 + +setting (0.1.85-3) unstable; urgency=low + + * Fix the BS caused by elm_genlist_clear in 'Sound' menu. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-3 + + -- Yin Kairong Fri, 13 May 2011 17:04:24 -0700 + +setting (0.1.85-2) unstable; urgency=low + + * Fix H0100126764. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-2 + + -- Yin Kairong Fri, 13 May 2011 11:44:04 -0700 + +setting (0.1.85-1) unstable; urgency=low + + * added ecore_event_handler_add/del pair. (for debugging). + * Apply safe string operation interfaces, such as safeStrNCmp,safeStrCmp,safeCopyStr,safeStrLen.. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-1 + + -- MyoungJune Park Thu, 12 May 2011 20:24:46 -0700 + +setting (0.1.84-103) unstable; urgency=low + + * Re-impliment the interface 'setting_create_Gendial_itc' and adjust the release squence. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-103 + + -- Yin Kairong Thu, 12 May 2011 19:09:28 -0700 + +setting (0.1.84-102) unstable; urgency=low + + * Fix some issue in 'Reset' Menu. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-102 + + -- Yin Kairong Thu, 12 May 2011 19:04:51 -0700 + +setting (0.1.84-101) unstable; urgency=low + + * implement the function of 'Brightness' auto saving. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-101 + + -- Yin Kairong Thu, 12 May 2011 19:02:42 -0700 + +setting (0.1.84-100) unstable; urgency=low + + * disable Exchange-efl + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-100 + + -- MyoungJune Park Thu, 12 May 2011 17:15:09 +0900 + +setting (0.1.84-99) unstable; urgency=low + + * fixed failing to load voicerecorder ug. + * Apply new UI of 'Date and time'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-99 + + -- MyoungJune Park Thu, 12 May 2011 17:01:47 +0900 + +setting (0.1.84-98) unstable; urgency=low + + * removed seven-email UG from Setting. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-98 + + -- MyoungJune Park Thu, 12 May 2011 10:52:41 +0900 + +setting (0.1.84-97) unstable; urgency=low + + * added B/S protection code. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-97 + + -- MyoungJune Park Wed, 11 May 2011 14:11:37 +0900 + +setting (0.1.84-96) unstable; urgency=low + + * added B/S protection code. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-96 + + -- MyoungJune Park Wed, 11 May 2011 12:56:28 +0900 + +setting (0.1.84-95) unstable; urgency=low + + * Modified the items needed to be reset in 'Reset' menu. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-95 + + -- Yin Kairong Tue, 10 May 2011 17:27:49 -0700 + +setting (0.1.84-94) unstable; urgency=low + + * Upload pkg. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-94 + + -- Feng Kai Tue, 10 May 2011 17:18:23 -0700 + +setting (0.1.84-93) unstable; urgency=low + + * Re-implement the UI of selecting-lists in 'Edir favourite', 'Reset', and 'Network->Preferred networks->Delete'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-93 + + -- Yin Kairong Tue, 10 May 2011 15:54:58 -0700 + +setting (0.1.84-92) unstable; urgency=low + + * Fix the <-' button missing issue on the navigate bar in 'Wallpaper' menu. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-92 + + -- Yin Kairong Tue, 10 May 2011 15:50:01 -0700 + +setting (0.1.84-91) unstable; urgency=low + + * Adjust the layout of wallpaper main view. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-91 + + -- Yin Kairong Mon, 09 May 2011 17:20:39 -0700 + +setting (0.1.84-90) unstable; urgency=low + + * Re-implement the expandable-list style of Setting, add annimation effect, Clear the unused code. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-90 + + -- Yin Kairong Mon, 09 May 2011 15:01:50 -0700 + +setting (0.1.84-89) unstable; urgency=low + + * Chnage the layout style of the navigatebar's buttons. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-89 + + -- Yin Kairong Fri, 06 May 2011 13:25:42 -0700 + +setting (0.1.84-88) unstable; urgency=low + + * Remove the background image of Display->Brightness, Add POPUP notify when user switch License->Expiry reminder. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-88 + + -- Yin Kairong Fri, 06 May 2011 13:21:14 -0700 + +setting (0.1.84-87) unstable; urgency=low + + * Adjust the font_size of POPUP text. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-87 + + -- Yin Kairong Fri, 06 May 2011 13:18:57 -0700 + +setting (0.1.84-86) unstable; urgency=low + + * Upload package to apply modifies. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-86 + + -- Yin Kairong Thu, 05 May 2011 08:54:21 -0700 + +setting (0.1.84-85) unstable; urgency=low + + * Upgrade security of Sound Playing and fix the screen-locked issues of playing 'Raising melody','vibration then melody','vibr.&rising melody'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-85 + + -- Yin Kairong Wed, 04 May 2011 08:23:16 -0700 + +setting (0.1.84-84) unstable; urgency=low + + * Make 'clicking text' and 'clicking buttton'of the expandable genlist item have the same effect. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-84 + + -- Yin Kairong Wed, 04 May 2011 08:18:14 -0700 + +setting (0.1.84-83) unstable; urgency=low + + * Change 'landscape mode' to be 'rotation lock' menu. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-83 + + -- Yin Kairong Tue, 03 May 2011 13:22:34 -0700 + +setting (0.1.84-82) unstable; urgency=low + + * Replace Setting icons with new ones. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-82 + + -- Yin Kairong Tue, 03 May 2011 13:20:07 -0700 + +setting (0.1.84-81) unstable; urgency=low + + * Apply help-dialoggroup style item in network menu. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-81 + + -- Yin Kairong Tue, 03 May 2011 13:16:08 -0700 + +setting (0.1.84-80) unstable; urgency=low + + * Perfect the new Sound UI according to the newest UI guildline and fix some issues in Sound. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-80 + + -- Yin Kairong Tue, 03 May 2011 11:09:00 -0700 + +setting (0.1.84-79) unstable; urgency=low + + * Clear text for edit field + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-79 + + -- MyoungJune Park Mon, 02 May 2011 21:03:15 +0200 + +setting (0.1.84-78) unstable; urgency=low + + * Clear text for edit field + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-78 + + -- Jungmin Kim Mon, 02 May 2011 17:44:20 +0900 + +setting (0.1.84-77) unstable; urgency=low + + * Upload pkg to apply changes. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-77 + + -- Yin Kairong Wed, 04 May 2011 23:36:11 -0700 + +setting (0.1.84-76) unstable; urgency=low + + * Apply new sound UI and remove the unused code. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-76 + + -- Yin Kairong Sun, 24 Apr 2011 15:12:40 -0700 + +setting (0.1.84-75) unstable; urgency=low + + * Upload pkg to apply changes. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-75 + + -- Yin Kairong Fri, 22 Apr 2011 03:07:28 -0700 + +setting (0.1.84-74) unstable; urgency=low + + * updated ringtone path. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-74 + + -- MyoungJune Park Fri, 22 Apr 2011 00:03:36 +0900 + +setting (0.1.84-73) unstable; urgency=low + + * Upload pkg. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-73 + + -- Yin Kairong Wed, 20 Apr 2011 18:41:58 +0800 + +setting (0.1.84-72) unstable; urgency=low + + * Fix all the blinking issues, such as H0100123769,H0100123787, H0100124825 + etc.. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-72 + + -- Yin Kairong Wed, 20 Apr 2011 16:55:46 +0800 + +setting (0.1.84-71) unstable; urgency=low + + * Replace old icons with new ones. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-71 + + -- Yin Kairong Wed, 20 Apr 2011 11:50:26 +0800 + +setting (0.1.84-70) unstable; urgency=low + + * Change backgroup color of Setting App and its UG to dialoggroup + style(brwon color) 2 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-70 + + -- MyoungJune Park Wed, 20 Apr 2011 00:18:50 +0900 + +setting (0.1.84-69) unstable; urgency=low + + * Change backgroup color of Setting App and its UG to dialoggroup + style(brwon color).. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-69 + + -- Yin Kairong Tue, 19 Apr 2011 15:47:52 +0800 + +setting (0.1.84-68) unstable; urgency=low + + * re-arrange the code of 'memory status'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-68 + + -- MyoungJune Park Tue, 19 Apr 2011 22:26:48 +0900 + +setting (0.1.84-67) unstable; urgency=low + + * fixed crash when moving from Sound to Account ug. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-67 + + -- MyoungJune Park Tue, 19 Apr 2011 20:43:51 +0900 + +setting (0.1.84-66) unstable; urgency=low + + * fixed 'lock up ' issue when touching Seven e-mail UG, becuase of lack of + exception handling code in Setting app. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-66 + + -- MyoungJune Park Tue, 19 Apr 2011 17:50:27 +0900 + +setting (0.1.84-65) unstable; urgency=low + + * set USB mode to KIES as default. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-65 + + -- MyoungJune Park Mon, 18 Apr 2011 22:20:15 +0900 + +setting (0.1.84-64) unstable; urgency=low + + * disabled new Sound menu to old Sound menu. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-64 + + -- MyoungJune Park Mon, 18 Apr 2011 18:52:04 +0900 + +setting (0.1.84-63) unstable; urgency=low + + * fixed the showing black screen, when setting home screen/lock screen + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-63 + + -- MyoungJune Park Sun, 17 Apr 2011 03:09:08 +0900 + +setting (0.1.84-62) unstable; urgency=low + + * added appnames, that shouldn't be terminated when choosing language. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-62 + + -- MyoungJune Park Sat, 16 Apr 2011 20:33:23 +0900 + +setting (0.1.84-60) unstable; urgency=low + + * set USB setting to 'debug mode' as default. 2 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-60 + + -- MyoungJune Park Fri, 15 Apr 2011 02:36:51 +0900 + +setting (0.1.84-59) unstable; urgency=low + + * set USB setting to 'debug mode' as default. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-59 + + -- MyoungJune Park Fri, 15 Apr 2011 02:32:10 +0900 + +setting (0.1.84-58) unstable; urgency=low + + * Apply genlist dialoggroup style in Setting App and its UGs. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-58 + + -- Yin Kairong Wed, 13 Apr 2011 11:43:42 +0800 + +setting (0.1.84-57) unstable; urgency=low + + * changed the package name form 'deb.com...' to 'com...' (removal of 'deb' prefix). 2 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-57 + + -- MyoungJune Park Wed, 13 Apr 2011 00:10:24 +0900 + +setting (0.1.84-56) unstable; urgency=low + + * changed the package name form 'deb.com...' to 'com...' (removal of 'deb' prefix). + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: com.samsung.setting_0.1.84-56 + + -- MyoungJune Park Tue, 12 Apr 2011 17:05:49 +0900 + +setting (0.1.84-54) unstable; urgency=low + + * Upload package. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-54 + + -- Yin Kairong Mon, 11 Apr 2011 19:38:24 +0800 + +deb.com.samsung.setting (0.1.84-53) unstable; urgency=low + + * Upload package to apply changes. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-53 + + -- Yin Kairong Fri, 08 Apr 2011 17:18:37 +0800 + +deb.com.samsung.setting (0.1.84-52) unstable; urgency=low + + * Fix H0100123920,H0100124096 and H0100123918(selecting items in settings over notification popup white bar appears) + Fix H0100123835 (Date Time > touch toggle of 'Automatic' > 'Cancel' - the toggle button changed, but it should not.) + Fix H0100123793 [EXP][Display Error] No title after opening Change wallpaper option. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-52 + + -- Yin Kairong Fri, 08 Apr 2011 13:55:15 +0800 + +deb.com.samsung.setting (0.1.84-51) unstable; urgency=low + + * Upload pkg to apply modifies for GCF. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-51 + + -- MyoungJune Park Thu, 07 Apr 2011 23:46:32 +0900 + +deb.com.samsung.setting (0.1.84-50) unstable; urgency=low + + * Upload pkg to apply modifies. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-50 + + -- Yin Kairong Tue, 17 May 2011 08:57:45 +0800 + +deb.com.samsung.setting (0.1.84-49) unstable; urgency=low + + * Fix some issue about memory and LCD dimmed, Raise the ability of + Fault-tolerant. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-49 + + -- Yin Kairong Sat, 02 Apr 2011 17:16:19 +0800 + +deb.com.samsung.setting (0.1.84-48) unstable; urgency=low + + * Make entry string notable when flicking genlist and Perfect the enabling + or disabling right button accordingly to entrys empty checking. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-48 + + -- Yin Kairong Thu, 31 Mar 2011 15:43:37 +0800 + +deb.com.samsung.setting (0.1.84-47) unstable; urgency=low + + * Add functions of automatic selecting toogle-checks, when genlist item being selected. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-47 + + -- Yin Kairong Thu, 31 Mar 2011 11:42:45 +0800 + +deb.com.samsung.setting (0.1.84-46) unstable; urgency=low + + * Add empty/select nothing checking in 'setting->edit favourite', + 'system-reset', 'system->memory->clear phone memory' and fix H0100123598, + H0100123407,H0100123405. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-46 + + + -- Yin Kairong Wed, 30 Mar 2011 23:54:00 +0800 + +deb.com.samsung.setting (0.1.84-45) unstable; urgency=low + + * Fix the build break and upload pkg again + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-45 + + -- Yin Kairong Tue, 29 Mar 2011 11:04:18 +0800 + +deb.com.samsung.setting (0.1.84-44) unstable; urgency=low + + * Upload pkg. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-44 + + -- Yin Kairong Mon, 28 Mar 2011 18:14:36 +0800 + +deb.com.samsung.setting (0.1.84-43) unstable; urgency=low + + * Perfect the layout of navigatebar subobjects and disable some reserved + menus. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-43 + + -- Yin Kairong Mon, 28 Mar 2011 16:13:59 +0800 + +deb.com.samsung.setting (0.1.84-42) unstable; urgency=low + + * Add functions of automatic selecting checks or radios, when genlist item being selected. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-42 + + -- Yin Kairong Mon, 28 Mar 2011 15:06:25 +0800 + +deb.com.samsung.setting (0.1.84-41) unstable; urgency=low + + * Upload package for apply some modifies. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-41 + + -- Yin Kairong Mon, 28 Mar 2011 05:54:21 +0800 + +deb.com.samsung.setting (0.1.84-40) unstable; urgency=low + + * Fix build break and upload pkg again. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-40 + + -- Yin Kairong Fri, 25 Mar 2011 18:50:51 +0800 + +deb.com.samsung.setting (0.1.84-39) unstable; urgency=low + + * Fixed some issues and upload package to apply them. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-39 + + -- Yin Kairong Thu, 24 Mar 2011 17:17:18 +0800 + +deb.com.samsung.setting (0.1.84-38) unstable; urgency=low + + * Add 'Landscape mode' menu in beat and nbeat theme(including sync with + quick panel). + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-38 + + -- Yin Kairong Thu, 24 Mar 2011 10:35:54 +0800 + +deb.com.samsung.setting (0.1.84-37) unstable; urgency=low + + * Add missed icon files and upload pkg to apply all the modifies. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-37 + + -- Yin Kairong Wed, 23 Mar 2011 16:33:45 +0800 + +deb.com.samsung.setting (0.1.84-36) unstable; urgency=low + + * Make Setting nbeat theme more humanable. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-36 + + -- Yin Kairong Wed, 23 Mar 2011 16:21:56 +0800 + +deb.com.samsung.setting (0.1.84-35) unstable; urgency=low + + * Apply nbeat style in view of system->memory->memory status. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-35 + + -- Yin Kairong Wed, 23 Mar 2011 16:14:23 +0800 + +deb.com.samsung.setting (0.1.84-34) unstable; urgency=low + + * Enable new Wallpaper UI. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-34 + + -- Yin Kairong Wed, 23 Mar 2011 16:10:15 +0800 + +deb.com.samsung.setting (0.1.84-33) unstable; urgency=low + + * repackage. 2 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-33 + + -- MyoungJune Park Wed, 23 Mar 2011 18:14:33 +0900 + +deb.com.samsung.setting (0.1.84-32) unstable; urgency=low + + * repackage. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-32 + + -- MyoungJune Park Wed, 23 Mar 2011 18:04:55 +0900 + +deb.com.samsung.setting (0.1.84-31) unstable; urgency=low + + * Finish all the remaining nbeat supporting work, such as applying nbeat in + views of menu 'network, tvout, display, sound, time, license'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-31 + + -- Yin Kairong Mon, 21 Mar 2011 21:15:39 +0800 + +deb.com.samsung.setting (0.1.84-30) unstable; urgency=low + + * Apply nbeat in some views of menu 'network/sound/license'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-30 + + -- Yin Kairong Fri, 18 Mar 2011 17:37:10 +0800 + +deb.com.samsung.setting (0.1.84-29) unstable; urgency=low + + * Apply nbeat in menu 'about/usb connection/tvout/font/home screen&lock + screen/memory/event notification/touch/language/reset/security/task + switch/menu screen/Menu and widgets'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-29 + + -- Yin Kairong Fri, 18 Mar 2011 17:33:33 +0800 + +deb.com.samsung.setting (0.1.84-28) unstable; urgency=low + + * Fix some bugs. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-28 + + -- Yin Kairong Wed, 16 Mar 2011 17:22:50 +0800 + +deb.com.samsung.setting (0.1.84-27) unstable; urgency=low + + * Apply the NBEAT UI and fix build warring. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-27 + + -- Yin Kairong Wed, 16 Mar 2011 16:36:59 +0800 + +deb.com.samsung.setting (0.1.84-26) unstable; urgency=low + + * Upload pkg. ( to support GCC 4.55 ) + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-26 + + -- MyoungJune Park Wed, 16 Mar 2011 01:15:47 +0900 + +deb.com.samsung.setting (0.1.84-25) unstable; urgency=low + + * Upload pkg. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-25 + + -- Yin Kairong Thu, 10 Mar 2011 08:42:48 +0800 + +deb.com.samsung.setting (0.1.84-24) unstable; urgency=low + + * Date/Time : removed warning messages at runtime. + * Sounds(new) : Rearrange parents of evas objects + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-24 + + -- MyoungJune Park Wed, 09 Mar 2011 17:13:42 +0900 + +deb.com.samsung.setting (0.1.84-23) unstable; urgency=low + + * . + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-23 + + -- Yin Kairong Tue, 08 Mar 2011 10:29:38 +0800 + +deb.com.samsung.setting (0.1.84-22) unstable; urgency=low + + * renewed System > Sound with disabled. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-22 + + -- MyoungJune Park Thu, 03 Mar 2011 23:18:20 +0900 + +deb.com.samsung.setting (0.1.84-21) unstable; urgency=low + + * refine code for preferred network list. 2 + * disabled Wallpaper to wait for stable condition. + * fixed set date/time code to change DST+. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-21 + + -- MyoungJune Park Tue, 01 Mar 2011 07:41:16 +0900 + +deb.com.samsung.setting (0.1.84-20) unstable; urgency=low + + * refine code for preferred network list. + * disabled Wallpaper to wait for stable condition. + * fixed set date/time code to change DST+. + * Tag: deb.com.samsung.setting_0.1.84-20 + + -- MyoungJune Park Mon, 28 Feb 2011 07:32:01 +0900 + +deb.com.samsung.setting (0.1.84-19) unstable; urgency=low + + * Fix H0100121402(Flight mode is damaged. User can turn it off and than it is still active.) 2 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-19 + + -- MyoungJune Park Sun, 27 Feb 2011 15:32:48 +0900 + +deb.com.samsung.setting (0.1.84-18) unstable; urgency=low + + * Fix H0100121402(Flight mode is damaged. User can turn it off and than it is still active.) + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-18 + + -- MyoungJune Park Sun, 27 Feb 2011 15:24:36 +0900 + +deb.com.samsung.setting (0.1.84-17) unstable; urgency=low + + * fixed H0100117283 again - it displayed wrong GMT string 2 + * fixed H0100121308. + * fixed H0100120712. + * Added selection info popup. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-17 + + -- MyoungJune Park Sun, 27 Feb 2011 13:10:08 +0900 + +deb.com.samsung.setting (0.1.84-16) unstable; urgency=low + + * fixed H0100117283 again - it displayed wrong GMT string. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-16 + + -- MyoungJune Park Sun, 27 Feb 2011 12:24:47 +0900 + +deb.com.samsung.setting (0.1.84-15) unstable; urgency=low + + * fixed H0100120892. + * replaced the depricated segmentcontrol APIs with new ones. + * Removed initDB for .setting.db + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-15 + + -- MyoungJune Park Fri, 25 Feb 2011 18:17:54 +0900 + +deb.com.samsung.setting (0.1.84-14) unstable; urgency=low + + * disabled Privacy Lock UI. + * fixed H0100121191, H0100121187 - toggle button for expandable list. + * Merge "refine add/edit preferred network UI update work flow" + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-14 + + -- MyoungJune Park Fri, 25 Feb 2011 15:09:55 +0900 + +deb.com.samsung.setting (0.1.84-13) unstable; urgency=low + + * Renew the wallpaper UI and debug the new main view(Favourite&All).. + * disabled 'Font' menu, as UX 0.9 removed 'Font' menu. + * fixed bugs on USB-setting. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-13 + + -- MyoungJune Park Tue, 22 Feb 2011 22:12:14 +0800 + +deb.com.samsung.setting (0.1.84-12) unstable; urgency=low + + * enabled 'Calendar' menu. + * disabled 'Font' menu. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-12 + + -- MyoungJune Park Wed, 23 Feb 2011 14:24:12 +0900 + +deb.com.samsung.setting (0.1.84-11) unstable; urgency=low + + * renew USB-setting + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-11 + + -- MyoungJune Park Wed, 23 Feb 2011 13:26:44 +0900 + +deb.com.samsung.setting (0.1.84-10) unstable; urgency=low + + * Improve the function of automatic language setting + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-10 + + -- Yin Kairong Sun, 20 Feb 2011 23:51:35 +0800 + +deb.com.samsung.setting (0.1.84-9) unstable; urgency=low + + * Apply the function of automatic language setting via sim card. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-9 + + -- Yin Kairong Sun, 20 Feb 2011 20:04:54 +0800 + +deb.com.samsung.setting (0.1.84-8) unstable; urgency=low + + * "add "Cancel" button in search popup". + * Fix CQ H0100121077, H0100121021,H0100120962, and H0100120970 . + * fixed Issues from Prevent. + * update path of default ringtone path. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-8 + + -- MyoungJune Park Fri, 18 Feb 2011 09:47:18 +0900 + +deb.com.samsung.setting (0.1.84-7) unstable; urgency=low + + * Resolve the ringtone playing BS issues occured after memory being cleared or format. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-7 + + -- Yin Kairong Thu, 17 Feb 2011 04:13:43 +0800 + +deb.com.samsung.setting (0.1.84-6) unstable; urgency=low + + * back key -> end key. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-6 + + -- Byungwook Jang Wed, 16 Feb 2011 21:41:10 +0900 + +deb.com.samsung.setting (0.1.84-5) unstable; urgency=low + + * Upload pkg for applying modifies. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-5 + + -- Yin Kairong Wed, 16 Feb 2011 17:33:30 +0800 + +deb.com.samsung.setting (0.1.84-4) unstable; urgency=low + + * Fix the hangs on issues when *.so file of a UG is not exist;Keep titles of + 'Lock screen' the same + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-4 + + -- Yin Kairong Wed, 16 Feb 2011 17:30:42 +0800 + +deb.com.samsung.setting (0.1.84-3) unstable; urgency=low + + * updated configuraiton + * - enabled USE_FAVOURITE_LIST_OPTION_TIMER, after fixing bugs. + * - enabled GL engine option. + * fixed H0100120191, H0100119891 + * fixed a bug that the indicator of slider control is invisible when expanding list + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-3 + + -- MyoungJune Park Mon, 14 Feb 2011 12:12:36 +0900 + +deb.com.samsung.setting (0.1.84-2) unstable; urgency=low + + * fixed H0100117283 & H0100117284. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-2 + + -- MyoungJune Park Thu, 10 Feb 2011 19:36:06 +0900 + +deb.com.samsung.setting (0.1.84-1) unstable; urgency=low + + * Fix CQs H0100117129 & H0100119887 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-1 + + -- Yin Kairong Wed, 09 Feb 2011 23:06:32 +0800 + +deb.com.samsung.setting (0.1.83-94) unstable; urgency=low + + * disabled the GL function for MWC demo. 2 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-94 + + -- MyoungJune Park Wed, 09 Feb 2011 14:14:56 +0900 + +deb.com.samsung.setting (0.1.83-93) unstable; urgency=low + + * disabled the GL function for MWC demo. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-93 + + -- MyoungJune Park Wed, 09 Feb 2011 11:56:38 +0900 + +deb.com.samsung.setting (0.1.83-92) unstable; urgency=low + + * enabled the indicator at top of window. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-92 + + -- MyoungJune Park Wed, 09 Feb 2011 10:03:15 +0900 + +deb.com.samsung.setting (0.1.83-91) unstable; urgency=low + + * added pm_api dependency. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-91 + + -- MyoungJune Park Wed, 09 Feb 2011 08:22:53 +0900 + +deb.com.samsung.setting (0.1.83-90) unstable; urgency=low + + * Change icon. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-90 + + -- MyoungJune Park Tue, 08 Feb 2011 19:23:03 +0900 + +deb.com.samsung.setting (0.1.83-89) unstable; urgency=low + + * on C210 device : + * 1. Setting app blocked after getting out USB connection menu , with favourite menu. + * 2. display > brightness, the window is overrapped with the indicator at top randomly. + * 3. display > brightness, the bg image is set too big. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-89 + + -- MyoungJune Park Tue, 08 Feb 2011 12:22:28 +0900 + +deb.com.samsung.setting (0.1.83-88) unstable; urgency=low + + * Change Vconf Path for seleted theme + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-88 + + -- MyoungJune Park Tue, 08 Feb 2011 11:33:10 +0900 + +deb.com.samsung.setting (0.1.83-87) unstable; urgency=low + + * disabled 'Back key' to 'End key'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-87 + + -- MyoungJune Park Mon, 07 Feb 2011 13:12:06 +0900 + +deb.com.samsung.setting (0.1.83-86) unstable; urgency=low + + * fixed H0100120053, H0100120054 - password-efl, added textdomain (~ ). + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-86 + + -- MyoungJune Park Sun, 06 Feb 2011 16:18:47 +0900 + +deb.com.samsung.setting (0.1.83-85) unstable; urgency=low + + * fixed a bug that after entering to plugin model and exit list is scrolled up. (H0100120257). + * fixed a bug that DST toggle button is able to set when Automatic time update is On. (H0100118760). + * fixed the typing error (H0100119997, H0100120001). + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-85 + + -- MyoungJune Park Sat, 05 Feb 2011 11:34:13 +0900 + +deb.com.samsung.setting (0.1.83-84) unstable; urgency=low + + * renew USB connection setting in progress - 2. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-84 + + -- MyoungJune Park Tue, 01 Feb 2011 17:54:07 +0900 + +deb.com.samsung.setting (0.1.83-83) unstable; urgency=low + + * renew USB connection setting in progress. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-83 + + -- MyoungJune Park Tue, 01 Feb 2011 16:52:27 +0900 + +deb.com.samsung.setting (0.1.83-82) unstable; urgency=low + + * added textdomain in timeug/language setting ug. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-82 + + -- MyoungJune Park Tue, 01 Feb 2011 16:29:05 +0900 + +deb.com.samsung.setting (0.1.83-81) unstable; urgency=low + + * fixed rpath problem. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-81 + + -- MyoungJune Park Mon, 31 Jan 2011 19:27:05 +0900 + +deb.com.samsung.setting (0.1.83-80) unstable; urgency=low + + * 1.Fix the BS issue of Setting >> Sound >> Normal >> move the volme gage >> + 'back' hard key >> select 'set' button >> BS (5 out of 8 trial) + 2.Fix the rollback issue of 'Display->Brightness->move the slider bar' + 3.Fix the rollback issue of 'Touch->move the slider bar'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-79 + + -- Yin Kairong Mon, 31 Jan 2011 15:29:52 +0800 + +deb.com.samsung.setting (0.1.83-79) unstable; urgency=low + + * Upload pkg to apply modifies. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-79 + + -- Yin Kairong Mon, 31 Jan 2011 09:40:52 +0800 + +deb.com.samsung.setting (0.1.83-78) unstable; urgency=low + + * To fix the issues of missing 'image-list' and 'memory status'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-78 + + -- Yin Kairong Sat, 29 Jan 2011 10:32:32 +0800 +deb.com.samsung.setting (0.1.83-76) unstable; urgency=low + + * Apply annimation effect in Setting main-view & Implement 'End key' process + in main-view. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-76 + + -- Yin Kairong Sat, 29 Jan 2011 08:39:39 +0800 + +deb.com.samsung.setting (0.1.83-75) unstable; urgency=low + + * disalbed vconf_set for language. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-75 + + -- MyoungJune Park Fri, 28 Jan 2011 12:24:04 +0900 + +deb.com.samsung.setting (0.1.83-74) unstable; urgency=low + + * disalbed pop-up at startup. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-74 + + -- MyoungJune Park Thu, 27 Jan 2011 21:52:12 +0900 + +deb.com.samsung.setting (0.1.83-73) unstable; urgency=low + + * applied new dir structure. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-73 + + -- MyoungJune Park Thu, 27 Jan 2011 18:12:09 +0900 + +deb.com.samsung.setting (0.1.83-72) unstable; urgency=low + + * avoid B/S caused by 'Back key' in Language Setting. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-72 + + -- MyoungJune Park Tue, 25 Jan 2011 15:35:52 +0900 + +deb.com.samsung.setting (0.1.83-71) unstable; urgency=low + + * modified SevenEmail icon path. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-71 + + -- MyoungJune Park Tue, 25 Jan 2011 08:18:19 +0900 + +deb.com.samsung.setting (0.1.83-70) unstable; urgency=low + + * 1.Re-implement 'End Key' process in all UGs + 2.Re-implement 'Annimation' effect in all UGs + 3.Add implement of 'Annimation' effect in some UGs, such as + memory/security/tvout/default-app + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-70 + + -- Yin Kairong Mon, 24 Jan 2011 17:00:26 +0800 + +deb.com.samsung.setting (0.1.83-69) unstable; urgency=low + + * Fix Code (Setting Password UG) ( fix popup callback fucntion ) + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-69 + + -- Junghyun Kim Mon, 24 Jan 2011 17:03:35 +0900 + +deb.com.samsung.setting (0.1.83-68) unstable; urgency=low + + * 'End Key' in date/time ug. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-68 + + -- MyoungJune Park Mon, 24 Jan 2011 16:47:49 +0900 + +deb.com.samsung.setting (0.1.83-67) unstable; urgency=low + + * Re-apply 'End Key' in ug-setting-network-efl. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-67 + + -- Yin Kairong Mon, 24 Jan 2011 14:46:33 +0800 + +deb.com.samsung.setting (0.1.83-66) unstable; urgency=low + + * fix bug (H0100118999) destory the popup when UG destory. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-66 + + -- MyoungJune Park Mon, 24 Jan 2011 13:20:15 +0900 + +deb.com.samsung.setting (0.1.83-65) unstable; urgency=low + + * Fix bugs such as H0100119050,H0100117461,H0100111404 etc.. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-65 + + -- Yin Kairong Sat, 22 Jan 2011 21:55:12 +0800 + +deb.com.samsung.setting (0.1.83-64) unstable; urgency=low + + * repackage. 3 + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-64 + + -- MyoungJune Park Fri, 21 Jan 2011 11:15:25 +0900 + +deb.com.samsung.setting (0.1.83-63) unstable; urgency=low + + * repackage. 2 + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-63 + + -- MyoungJune Park Fri, 21 Jan 2011 10:04:08 +0900 + +deb.com.samsung.setting (0.1.83-62) unstable; urgency=low + + * repackage. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-62 + + -- MyoungJune Park Fri, 21 Jan 2011 09:51:51 +0900 + +deb.com.samsung.setting (0.1.83-61) unstable; urgency=low + + * Add exceptional process of 'huge image' in ug-imagelist-efl. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-61 + + -- Yin Kairong Thu, 20 Jan 2011 03:01:06 +0800 + +deb.com.samsung.setting (0.1.83-60) unstable; urgency=low + + * store wallpaper and lockscreen in separate dir. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-60 + + -- Yin Kairong Thu, 20 Jan 2011 02:57:07 +0800 + +deb.com.samsung.setting (0.1.83-59) unstable; urgency=low + + * Add viewtype in setting password ug(for gallery) + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-59 + + -- Junghyun Kim Wed, 19 Jan 2011 14:42:24 +0900 + +deb.com.samsung.setting (0.1.83-58) unstable; urgency=low + + * added key check code. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-58 + + -- MyoungJune Park Wed, 19 Jan 2011 08:51:42 +0900 + +deb.com.samsung.setting (0.1.83-57) unstable; urgency=low + + * Fix display popup issue in setting-password-ug + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-57 + + -- Junghyun Kim Sat, 15 Jan 2011 15:32:20 +0900 + +deb.com.samsung.setting (0.1.83-56) unstable; urgency=low + + * Fix bug in password-ug ( failed to set password ) + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-56 + + -- Junghyun Kim Sat, 15 Jan 2011 14:10:02 +0900 + +deb.com.samsung.setting (0.1.83-55) unstable; urgency=low + + * To fix the vconfs listen failed issue(failed to set + wallpaper&lockscreen&..). + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-55 + + -- Yin Kairong Fri, 14 Jan 2011 17:14:56 +0800 + +deb.com.samsung.setting (0.1.83-54) unstable; urgency=low + + * animation effect. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-54 + + -- MyoungJune Park Fri, 14 Jan 2011 16:03:21 +0900 + +deb.com.samsung.setting (0.1.83-53) unstable; urgency=low + + * Apply Vconf DAC. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-53 + + -- Yin Kairong Fri, 14 Jan 2011 10:28:47 +0800 + +deb.com.samsung.setting (0.1.83-52) unstable; urgency=low + + * applied page to page animation ( basic navigation bar effect ). + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-52 + + -- MyoungJune Park Thu, 13 Jan 2011 22:27:08 +0900 + +deb.com.samsung.setting (0.1.83-51) unstable; urgency=low + + * applied new UI gadget to deal with 'END KEY' in ug. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-51 + + -- MyoungJune Park Thu, 13 Jan 2011 10:04:49 +0900 + +deb.com.samsung.setting (0.1.83-50) unstable; urgency=low + + * removed deprecated Elementary APIs. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-50 + + -- MyoungJune Park Wed, 12 Jan 2011 16:51:25 +0900 + +deb.com.samsung.setting (0.1.83-49) unstable; urgency=low + + * fix issue of setting_dialoggroup_list_mouse_up_ignore_checking is not working properly. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-49 + + -- Yin Kairong Wed, 12 Jan 2011 13:20:18 +0800 + +deb.com.samsung.setting (0.1.83-48) unstable; urgency=low + + * Adjust the view of 'memory status'. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-48 + + -- Yin Kairong Wed, 12 Jan 2011 13:17:39 +0800 + +deb.com.samsung.setting (0.1.83-47) unstable; urgency=low + + * Improve the self-translation of toggle + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-47 + + -- Yin Kairong Wed, 12 Jan 2011 13:13:07 +0800 + +deb.com.samsung.setting (0.1.83-46) unstable; urgency=low + + * applied patch from winset team - displaying state of Theme ug + * enable sweep style toggle button Automatic / DST in Date/Time + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-46 + + -- MyoungJune Park Tue, 11 Jan 2011 21:46:47 +0900 + +deb.com.samsung.setting (0.1.83-45) unstable; urgency=low + + * enabled GL engine. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-45 + + -- MyoungJune Park Tue, 11 Jan 2011 20:02:35 +0900 + +deb.com.samsung.setting (0.1.83-44) unstable; urgency=low + + * Upload package to fix some bugs. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-44 + + -- Yin Kairong Tue, 11 Jan 2011 15:57:34 +0800 + +deb.com.samsung.setting (0.1.83-43) unstable; urgency=low + + * Add 'exceptional checking' in ug-imagelist-efl. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-43 + + -- Yin Kairong Tue, 11 Jan 2011 15:36:50 +0800 + +deb.com.samsung.setting (0.1.83-42) unstable; urgency=low + + * Make Setting more stable. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-42 + + -- Yin Kairong Tue, 11 Jan 2011 15:32:40 +0800 + +deb.com.samsung.setting (0.1.83-41) unstable; urgency=low + + * repackage. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-41 + + -- MyoungJune Park Tue, 11 Jan 2011 16:07:11 +0900 + +deb.com.samsung.setting (0.1.83-40) unstable; urgency=low + + * made transparent bg window in Sound + * disalbed Font menu. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-40 + + -- MyoungJune Park Tue, 11 Jan 2011 15:51:06 +0900 + +deb.com.samsung.setting (0.1.83-39) unstable; urgency=low + + * moved Task Switcher to Connectivity + * disabled setting_dialoggroup_list_mouse_up_ignore_checking in Date/time. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-39 + + -- MyoungJune Park Sat, 08 Jan 2011 15:30:12 +0900 + +deb.com.samsung.setting (0.1.83-38) unstable; urgency=low + + * repackage + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-38 + + -- MyoungJune Park Sat, 08 Jan 2011 11:07:08 +0900 + +deb.com.samsung.setting (0.1.83-37) unstable; urgency=low + + * go back to old style UI. + * applied map buf technic (as disabled). + * removed Installation Settings menu. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-37 + + -- MyoungJune Park Fri, 07 Jan 2011 16:14:24 +0900 + +deb.com.samsung.setting (0.1.83-36) unstable; urgency=low + + * Upload package for applying the new UI according v0.8 UI Document + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-36 + + -- Yin Kairong Thu, 06 Jan 2011 21:10:46 +0800 + +deb.com.samsung.setting (0.1.83-35) unstable; urgency=low + + * 1. code optmize about dialoggroup and separator + 2. re-implement the 'Favourite&All' style + 3. re-implement the add-to-favourite check-list,eg,add icons in each item, add group info,add select-all check etc.. + 4. Enable and debug new font UI + 5. add response of user action "Tap&hold" + 6. Remove setting title, + Modify dialogue group tile, + Replace old icons with newer ones + + 7. Remove sub-text in 'home screen'and 'Locked screen' + 8. Adjust position of checkbox, add padding beween groups. + 9. Adjust position of radio buttons, + 10. Fix the bug H0100116848,H0100116894,etc.. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-35 + + -- Yin Kairong Thu, 06 Jan 2011 19:26:48 +0800 + +deb.com.samsung.setting (0.1.83-34) unstable; urgency=low + + * Inidicator time update after changing time & timezone set + * Fix strings + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-34 + + -- HyungKyu Song Thu, 06 Jan 2011 13:53:55 +0900 + +deb.com.samsung.setting (0.1.83-33) unstable; urgency=low + + * Fix some bugs. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-33 + + -- Yin Kairong Tue, 04 Jan 2011 15:13:32 +0800 + +deb.com.samsung.setting (0.1.83-32) unstable; urgency=low + + * removed temp code. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-32 + + -- MyoungJune Park Mon, 03 Jan 2011 19:36:38 +0900 + +deb.com.samsung.setting (0.1.83-31) unstable; urgency=low + + * fixed error on displying flight mode state. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-31 + + -- MyoungJune Park Mon, 03 Jan 2011 17:49:07 +0900 + +deb.com.samsung.setting (0.1.83-30) unstable; urgency=low + + * applied new animation effect. - debugging + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-30 + + -- MyoungJune Park Mon, 03 Jan 2011 17:34:33 +0900 + +deb.com.samsung.setting (0.1.83-29) unstable; urgency=low + + * applied new animation effect. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-29 + + -- MyoungJune Park Mon, 03 Jan 2011 11:59:08 +0900 + +deb.com.samsung.setting (0.1.83-28) unstable; urgency=low + + * applied Syncronise ug in place of Sync AUL + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-28 + + -- MyoungJune Park Mon, 03 Jan 2011 09:19:48 +0900 + +deb.com.samsung.setting (0.1.83-27) unstable; urgency=low + + * Upload package for new modifies. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-27 + + -- Yin Kairong Thu, 30 Dec 2010 16:55:08 +0800 + +deb.com.samsung.setting (0.1.83-26) unstable; urgency=low + + * when user click fastly between two menus, Setting should shiled the second + clicking action.. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-26 + + -- Yin Kairong Thu, 30 Dec 2010 16:50:11 +0800 + +deb.com.samsung.setting (0.1.83-25) unstable; urgency=low + + * Fix issue of H0100116375,H0100116374 ,H0100116370 , + H0100116364,H0100116362,H0100116357. That is to say, shield the user + action "mouse moving","double clicking","triple clicking" and "mouse + tap&hold" etc... + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-25 + + -- Yin Kairong Thu, 30 Dec 2010 16:39:53 +0800 + +deb.com.samsung.setting (0.1.83-24) unstable; urgency=low + + * 1.Fix the BS issues occurs in fast tapping between servel menus. + 2.Fix the view cannot be shown sucessful(due to animation effort) in fast tapping between servel + menus. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-24 + + -- Yin Kairong Thu, 30 Dec 2010 16:07:10 +0800 + +deb.com.samsung.setting (0.1.83-23) unstable; urgency=low + + * Applying new TAPI in Setting. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-23 + + -- Yin Kairong Thu, 30 Dec 2010 16:02:36 +0800 + +deb.com.samsung.setting (0.1.83-22) unstable; urgency=low + + * Adjust the UI of 'date and time' setting view. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-22 + + -- Yin Kairong Thu, 30 Dec 2010 15:47:27 +0800 + +deb.com.samsung.setting (0.1.83-21) unstable; urgency=low + + * repackage + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-21 + + -- MyoungJune Park Tue, 28 Dec 2010 12:09:21 +0900 + +deb.com.samsung.setting (0.1.83-20) unstable; urgency=low + + * 1. modified path name of ringtone. + * 2. Fix the removing isssue of 'Home Screen & Lock Screen'. + * 3. Re-implement the ug-image-list + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-20 + + -- Yin Kairong Tue, 28 Dec 2010 09:13:45 +0800 + +deb.com.samsung.setting (0.1.83-19) unstable; urgency=low + + * Animation effect for UG(bug fix - when getting back to Setting app from UG). + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-19 + + -- MyoungJune Park Thu, 23 Dec 2010 21:23:26 +0900 + +deb.com.samsung.setting (0.1.83-18) unstable; urgency=low + + * enabled Animation effect for UG. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-18 + + -- MyoungJune Park Thu, 23 Dec 2010 16:24:11 +0900 + +deb.com.samsung.setting (0.1.83-17) unstable; urgency=low + + * Fix some bugs. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-17 + + -- Yin Kairong Thu, 23 Dec 2010 13:17:18 +0800 + +deb.com.samsung.setting (0.1.83-16) unstable; urgency=low + + * change menuscreen library name + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-16 + + -- Junghyun Kim Thu, 23 Dec 2010 12:05:29 +0900 + +deb.com.samsung.setting (0.1.83-15) unstable; urgency=low + + * pkg. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-15 + + -- Yin Kairong Thu, 23 Dec 2010 08:23:51 +0800 + +deb.com.samsung.setting (0.1.83-14) unstable; urgency=low + + * Update for upload + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-14 + + -- Junghyun Kim Wed, 22 Dec 2010 19:20:50 +0900 + +deb.com.samsung.setting (0.1.83-13) unstable; urgency=low + + * Fix some network issues + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-13 + + -- Junghyun Kim Wed, 22 Dec 2010 18:54:54 +0900 + +deb.com.samsung.setting (0.1.83-12) unstable; urgency=low + + * Fix some network issues. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-12 + + -- Yin Kairong Wed, 22 Dec 2010 17:38:54 +0800 + +deb.com.samsung.setting (0.1.83-11) unstable; urgency=low + + * added Animation effect for UG. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-11 + + -- MyoungJune Park Wed, 22 Dec 2010 18:18:42 +0900 + +deb.com.samsung.setting (0.1.83-10) unstable; urgency=low + + * Re-implement the structure of 'Reset'. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-10 + + -- Yin Kairong Wed, 22 Dec 2010 15:26:13 +0800 + +deb.com.samsung.setting (0.1.83-9) unstable; urgency=low + + * 1.Fix the twice invoking issue of mouse_up event callback registered on + compsite buttons + 2.Fix the magic number in the Setting source code + 3.Add exceptional checking after invoking snprintf function + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-9 + + -- Yin Kairong Wed, 22 Dec 2010 15:12:56 +0800 + +deb.com.samsung.setting (0.1.83-8) unstable; urgency=low + + * removed tzdata dependency. 2 + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-8 + + -- MyoungJune Park Wed, 22 Dec 2010 15:05:12 +0900 + +deb.com.samsung.setting (0.1.83-6) unstable; urgency=low + + * removed tzdata dependency. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-6 + + -- MyoungJune Park Wed, 22 Dec 2010 14:46:00 +0900 + +deb.com.samsung.setting (0.1.83-5) unstable; urgency=low + + * disabledd the 'Add to Favorite' feature until discussion with UX team. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-5 + + -- MyoungJune Park Tue, 21 Dec 2010 17:10:18 +0900 + +deb.com.samsung.setting (0.1.83-4) unstable; urgency=low + + * Make the log of Setting more Precise and Readable. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-4 + + -- Yin Kairong Fri, 24 Dec 2010 11:17:13 +0800 + +deb.com.samsung.setting (0.1.83-3) unstable; urgency=low + + * Replace the icon 'Add to Favourite'. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-3 + + -- Yin Kairong Fri, 24 Dec 2010 09:17:04 +0800 + +deb.com.samsung.setting (0.1.83-2) unstable; urgency=low + + * Support the 'Favourite&All' menu style for demo. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-2 + + -- Yin Kairong Fri, 24 Dec 2010 08:51:22 +0800 + +deb.com.samsung.setting (0.1.83-1) unstable; urgency=low + + * 1.Divx info replace from 'About phone' to 'License'. + 2.To fix the issue of failed to reset volumn in 'Reset' menu. + 3.Continue to complete replacing from the 'check' to sweep style 'toggle'. + 4.Add error handling of config operation. + 5.To arrange the code.. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-1 + + -- Yin Kairong Mon, 20 Dec 2010 15:50:21 +0800 + +deb.com.samsung.setting (0.1.82-99) unstable; urgency=low + + * updated vconf group name. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-99 + + -- MyoungJune Park Fri, 17 Dec 2010 17:34:47 +0900 + +deb.com.samsung.setting (0.1.82-98) unstable; urgency=low + + * Adding code of un-listen the vconfs to avoid BSs. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-98 + + -- Yin Kairong Fri, 17 Dec 2010 15:38:10 +0800 + +deb.com.samsung.setting (0.1.82-97) unstable; urgency=low + + * Improve the rate of comments. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-97 + + -- Yin Kairong Fri, 17 Dec 2010 14:35:04 +0800 + +deb.com.samsung.setting (0.1.82-96) unstable; urgency=low + + * Fix the BS of evas_object_event_callback_del. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-96 + + -- Yin Kairong Fri, 17 Dec 2010 10:57:04 +0800 + +deb.com.samsung.setting (0.1.82-95) unstable; urgency=low + + * updated vconf (seven-email). + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-95 + + -- Yin Kairong Thu, 16 Dec 2010 21:07:59 +0900 + +deb.com.samsung.setting (0.1.82-94) unstable; urgency=low + + * Fix some issues and features. + * - image list chooses 1st image even if selected others. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-94 + + -- Yin Kairong Thu, 16 Dec 2010 17:33:49 +0800 + +deb.com.samsung.setting (0.1.82-93) unstable; urgency=low + + * updated 'sysman_set_datetime'. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-93 + + -- MyoungJune Park Thu, 16 Dec 2010 13:32:50 +0900 + +deb.com.samsung.setting (0.1.82-92) unstable; urgency=low + + * Fix the issue of 'cannot set mmc images as wallpaper'. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-92 + + -- Yin Kairong Wed, 15 Dec 2010 20:26:46 +0800 + +deb.com.samsung.setting (0.1.82-91) unstable; urgency=low + + * Fix the issue of missing subnail in ug-image-list and set duplicate tmp file + as the wallpaper&lockscreen. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-91 + + -- Yin Kairong Wed, 15 Dec 2010 19:37:37 +0800 + +deb.com.samsung.setting (0.1.82-90) unstable; urgency=low + + * change vconf prefix file -> db. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-89 + + -- MyoungJune Park Wed, 15 Dec 2010 20:12:30 +0900 + +deb.com.samsung.setting (0.1.82-89) unstable; urgency=low + + * added vconf group in postinst. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-89 + + -- MyoungJune Park Wed, 15 Dec 2010 20:05:07 +0900 + +deb.com.samsung.setting (0.1.82-88) unstable; urgency=low + + * rename conn_ssid -> connected_ap_name + * fixed error 'unary operator expected' + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-88 + + -- MyoungJune Park Wed, 15 Dec 2010 10:13:32 +0900 + +deb.com.samsung.setting (0.1.82-87) unstable; urgency=low + + * code static checking. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-87 + + -- Yin Kairong Tue, 14 Dec 2010 19:51:35 +0800 + +deb.com.samsung.setting (0.1.82-86) unstable; urgency=low + + * disabled SUPPORT_LCD_TIMEOUT_KEEPING. + * fixed wrong path in plugin-model. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-86 + + -- MyoungJune Park Tue, 14 Dec 2010 17:01:13 +0900 + +deb.com.samsung.setting (0.1.82-85) unstable; urgency=low + + * Applied the sweep style checkbox button. (bug fix 2) + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-85 + + -- MyoungJune Park Mon, 13 Dec 2010 22:48:01 +0900 + +deb.com.samsung.setting (0.1.82-84) unstable; urgency=low + + * Applied the sweep style checkbox button. (bug fix) + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-84 + + -- MyoungJune Park Mon, 13 Dec 2010 16:02:17 +0900 + +deb.com.samsung.setting (0.1.82-83) unstable; urgency=low + + * Applied the sweep style checkbox button. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-83 + + -- MyoungJune Park Mon, 13 Dec 2010 13:39:11 +0900 + +deb.com.samsung.setting (0.1.82-82) unstable; urgency=low + + * Remove unused Mobile Tracker Vconf keys. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-82 + + -- Junghyun Kim Mon, 13 Dec 2010 11:28:37 +0900 + +deb.com.samsung.setting (0.1.82-81) unstable; urgency=low + + * Fix the frequently BS of ug-image-list. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-81 + + -- Yin Kairong Fri, 10 Dec 2010 21:14:45 +0800 + +deb.com.samsung.setting (0.1.82-80) unstable; urgency=low + + * change Back button string + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-80 + + -- HyungKyu Song Fri, 10 Dec 2010 18:30:17 +0900 + +deb.com.samsung.setting (0.1.82-79) unstable; urgency=low + + * fixed some Crashes for Intergrating 'Backlight' and 'Brightness' menu into one, named 'Display' + * Finish applying expandable-list dialoggroup item in 'Sound' setting. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-79 + + -- MyoungJune Park Thu, 09 Dec 2010 06:00:17 +0900 + +deb.com.samsung.setting (0.1.82-78) unstable; urgency=low + + * Apply expandable-list dialoggroup item in 'Sound ->..-> alert type&vib'menu.. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-78 + + -- Yin Kairong Wed, 08 Dec 2010 18:44:09 +0800 + +deb.com.samsung.setting (0.1.82-77) unstable; urgency=low + + * Apply expandable-list dialoggroup item in 'License -> Roaming network' menu.. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-77 + + -- Yin Kairong Wed, 08 Dec 2010 18:41:53 +0800 + +deb.com.samsung.setting (0.1.82-76) unstable; urgency=low + + * Intergrate 'Backlight' and 'Brightness' menu into one, named 'Display'. + * and Apply expandable-list dialoggroup item in 'Display' menu.. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-76 + + -- Yin Kairong Wed, 08 Dec 2010 16:19:18 +0800 + +deb.com.samsung.setting (0.1.82-75) unstable; urgency=low + + * repackage. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-75 + + -- MyoungJune Park Wed, 08 Dec 2010 16:32:11 +0900 + +deb.com.samsung.setting (0.1.82-75) unstable; urgency=low + + * repackage. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-74 + + -- Yin Kairong Tue, 07 Dec 2010 22:12:28 +0900 + +deb.com.samsung.setting (0.1.82-73) unstable; urgency=low + + * Fix build break. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-73 + + -- Yin Kairong Tue, 07 Dec 2010 17:13:38 +0800 + +deb.com.samsung.setting (0.1.82-72) unstable; urgency=low + + * Apply expandable-list dialoggroup item in 'Date and time' menu. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-72 + + -- Yin Kairong Tue, 07 Dec 2010 16:29:08 +0800 + +deb.com.samsung.setting (0.1.82-71) unstable; urgency=low + + * disabled LDC_TIMEOUT_KEEPING + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-71 + + -- MyoungJune Park Fri, 03 Dec 2010 15:25:56 +0900 + +deb.com.samsung.setting (0.1.82-70) unstable; urgency=low + + * enabled the favourite menu with timer. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-70 + + -- MyoungJune Park Wed, 01 Dec 2010 23:16:32 +0900 + +deb.com.samsung.setting (0.1.82-69) unstable; urgency=low + + * Upload pkg for Applying 'Reset' function and 'Privacy lock' function. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-69 + + -- Yin Kairong Tue, 30 Nov 2010 12:24:04 +0800 + +deb.com.samsung.setting (0.1.82-68) unstable; urgency=low + + * Modify the privacy lock function and Making it take an effect. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-68 + + -- Yin Kairong Tue, 30 Nov 2010 06:29:27 +0800 + +deb.com.samsung.setting (0.1.82-67) unstable; urgency=low + + * Coutinue to adjust 'Reset' function. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-67 + + -- Yin Kairong Tue, 30 Nov 2010 04:38:50 +0800 + +deb.com.samsung.setting (0.1.82-66) unstable; urgency=low + + * repackage. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-66 + + -- MyoungJune Park Tue, 30 Nov 2010 21:33:44 +0900 + +deb.com.samsung.setting (0.1.82-65) unstable; urgency=low + + * repackage. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-65 + + -- Yin Kairong Tue, 30 Nov 2010 03:09:14 +0800 + +deb.com.samsung.setting (0.1.82-64) unstable; urgency=low + + * Fix some CQs. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-64 + + -- Yin Kairong Tue, 30 Nov 2010 03:06:13 +0800 + +deb.com.samsung.setting (0.1.82-63) unstable; urgency=low + + * Re-implement the 'Brightness' view. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-63 + + -- Yin Kairong Mon, 29 Nov 2010 15:47:23 +0800 + +deb.com.samsung.setting (0.1.82-62) unstable; urgency=low + + * update CMakeLists.txt + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-62 + + -- MyoungJune Park Mon, 29 Nov 2010 13:58:26 +0900 + +deb.com.samsung.setting (0.1.82-61) unstable; urgency=low + * Add process for vconf 'db/wifi/conn_ssid' changes. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-61 + + -- Yin Kairong Mon, 29 Nov 2010 12:49:36 +0800 + +deb.com.samsung.setting (0.1.82-60) unstable; urgency=low + + * Fix the wifi status decription in Setting menu list. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-60 + + -- Yin Kairong Mon, 29 Nov 2010 10:23:44 +0800 + +deb.com.samsung.setting (0.1.82-59) unstable; urgency=low + + * Modify button text of the menu 'Date and time'. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-59 + + -- Yin Kairong Mon, 29 Nov 2010 10:15:08 +0800 + +deb.com.samsung.setting (0.1.82-58) unstable; urgency=low + + * updated favorite menu, whenever getting back from each UG, not using + Timer(5 sec). + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-58 + + -- MyoungJune Park Sat, 27 Nov 2010 22:33:48 +0900 + +deb.com.samsung.setting (0.1.82-57) unstable; urgency=low + + * Package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-57 + + -- MyoungJune Park Sat, 27 Nov 2010 17:03:32 +0900 + +deb.com.samsung.setting (0.1.82-56) unstable; urgency=low + + * Package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-56 + + -- Tang Feng Fri, 26 Nov 2010 20:50:11 +0800 + +deb.com.samsung.setting (0.1.82-55) unstable; urgency=low + + * Package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-55 + + -- Chen Hanwu Fri, 26 Nov 2010 19:50:11 +0800 + +deb.com.samsung.setting (0.1.82-54) unstable; urgency=low + + * Package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-54 + + -- Yin Kairong Fri, 26 Nov 2010 17:30:11 +0800 + +deb.com.samsung.setting (0.1.82-53) unstable; urgency=low + + * fixed fault of naming rules for deb. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-53 + + -- MyoungJune Park Fri, 26 Nov 2010 15:48:26 +0900 + +deb.com.samsung.setting (0.1.82-52) unstable; urgency=low + + * Making Setting Wi-Fi menu display the wifi device name, when wifi is on. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-52 + + -- Yin Kairong Fri, 26 Nov 2010 11:41:27 +0800 + +deb.com.samsung.setting (0.1.82-51) unstable; urgency=low + + * Modify App String to System String + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-51 + + -- MyoungJune Park Thu, 25 Nov 2010 21:09:18 +0900 + +deb.com.samsung.setting (0.1.82-50) unstable; urgency=low + + * Support feature of Keeping the position after clicking the add favourite + button(+). + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-50 + + -- Yin Kairong Thu, 25 Nov 2010 17:48:51 +0800 + +deb.com.samsung.setting (0.1.82-49) unstable; urgency=low + + * adopt new naming rule for debian package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-49 + + -- MyoungJune Park Thu, 25 Nov 2010 17:15:21 +0900 + +deb.com.samsung.setting (0.1.82-48) unstable; urgency=low + * Fix the issue of main menu item icons missing. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-48 + + -- Yin Kairong Thu, 25 Nov 2010 16:12:02 +0800 + +deb.com.samsung.setting (0.1.82-47) unstable; urgency=low + + * repackage + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-47 + + -- MyoungJune Park Thu, 25 Nov 2010 15:04:44 +0900 + +deb.com.samsung.setting (0.1.82-46) unstable; urgency=low + + * set max of Brightness value with devman API. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-46 + + -- Tang Feng Thu, 25 Nov 2010 13:56:07 +0900 + +deb.com.samsung.setting (0.1.82-45) unstable; urgency=low + + * updated package name for new naming rule. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-45 + + -- Tang Feng Thu, 25 Nov 2010 13:18:56 +0900 + +deb.com.samsung.setting (0.1.82-44) unstable; urgency=low + + * Add image list, modified package, icon, desktop file name. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-44 + + -- Tang Feng Tur, 25 Nov 2010 10:55:38 +0900 + +deb.com.samsung.setting (0.1.82-43) unstable; urgency=low + + * Add image list, modified package, icon, desktop file name. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-43 + + -- Tang Feng Tur, 25 Nov 2010 10:51:38 +0900 + +setting (0.1.82-42) unstable; urgency=low + + * modified package, icon, desktop file name. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-42 + + -- MyoungJune Park Wed, 24 Nov 2010 20:51:38 +0900 + +setting (0.1.82-41) unstable; urgency=low + + * repackage + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-41 + + -- MyoungJune Park Wed, 24 Nov 2010 20:26:42 +0900 + +setting (0.1.82-40) unstable; urgency=low + + * modified package, icon, desktop file name. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-40 + + -- MyoungJune Park Wed, 24 Nov 2010 20:14:27 +0900 + +setting (0.1.82-39) unstable; urgency=low + + * Fix the issue of memory card formatting. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-39 + + -- Yin Kairong Wed, 24 Nov 2010 14:35:03 +0800 + +setting (0.1.82-38) unstable; urgency=low + + * support LCD timeout keeping feature when Setting is running in foreground. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-38 + + -- Yin Kairong Wed, 24 Nov 2010 14:31:12 +0800 + +setting (0.1.82-37) unstable; urgency=low + + * disabled the favourite list, due to 100% CPU usage. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-37 + + -- MyoungJune Park Mon, 22 Nov 2010 22:17:53 +0900 + +setting (0.1.82-36) unstable; urgency=low + + * fixed bug not storing Brightness number + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-36 + + -- MyoungJune Park Sat, 20 Nov 2010 18:11:21 +0900 + +setting (0.1.82-35) unstable; urgency=low + + * Fix Crash ( Time and Date UG ) + * Apply App String( Profile Menu ) + + -- Junghyun Kim Sat, 20 Nov 2010 14:15:27 +0900 + +setting (0.1.82-34) unstable; urgency=low + + * release after fixing UI issues, and favorite list (for DEMO) 2 + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-34 + + -- MyoungJune Park Fri, 19 Nov 2010 11:58:17 +0900 + +setting (0.1.82-33) unstable; urgency=low + + * release after fixing UI issues, and favorite list (for DEMO). + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-33 + + -- MyoungJune Park Fri, 19 Nov 2010 09:53:24 +0900 + +setting (0.1.82-32) unstable; urgency=low + + * Upload pkg to apply the feature of favourite-list. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-32 + + -- Yin Kairong Thu, 18 Nov 2010 11:38:52 +0800 + +setting (0.1.82-31) unstable; urgency=low + + * Complete Adding the feature of favourite-list. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-31 + + -- Yin Kairong Thu, 18 Nov 2010 11:30:38 +0800 + +setting (0.1.82-30) unstable; urgency=low + + * Add the favourite-list feature and Optmize the code implement + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-30 + + -- Yin Kairong Thu, 18 Nov 2010 11:24:06 +0800 + +setting (0.1.82-29) unstable; urgency=low + + * Remove the repeat callback handle when flight mode status is changed. + * Fix the issue of MobileAP status cannot update in time in Setting main view. + * Fix The time field cannot get the correct focus issue. + * renamed ciss-setting-efl setting-call-efl. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-29 + + -- MyoungJune Park Fri, 12 Nov 2010 21:15:15 +0900 + +setting (0.1.82-28) unstable; urgency=low + + * repackage + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-28 + + -- MyoungJune Park Thu, 11 Nov 2010 21:40:22 +0900 + +setting (0.1.82-27) unstable; urgency=low + + * repackage + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-27 + + -- Yin Kairong Thu, 11 Nov 2010 13:05:25 +0800 + +setting (0.1.82-26) unstable; urgency=low + + * Upload pkg to resolve CQ defects. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-26 + + -- Yin Kairong Thu, 11 Nov 2010 02:04:36 +0800 + +setting (0.1.82-25) unstable; urgency=low + + * removed drm-service dependency + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-25 + + -- MyoungJune Park Wed, 10 Nov 2010 22:28:43 +0900 + +setting (0.1.82-24) unstable; urgency=low + + * added MobileAP button showing On/Off. + * updated in Network menu. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-24 + + -- MyoungJune Park Wed, 10 Nov 2010 21:27:49 +0900 + +setting (0.1.82-23) unstable; urgency=low + + * Fix the sync issues between Setting's Sound setting and Volume App. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-23 + + -- Yin Kairong Wed, 10 Nov 2010 13:34:49 +0800 + +setting (0.1.82-22) unstable; urgency=low + + * fixed a bug setting timezone. - 2 + * updated Security menu following 0.6 UX guideline. + * removed FDN2 + * Set password popup, created Privacy password. + * fixed bugs on PUK1 confirmation code. + * in Memory, changed String at "Memory Card Details" + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-22 + + -- MyoungJune Park Tue, 09 Nov 2010 21:30:05 +0900 + +setting (0.1.82-21) unstable; urgency=low + + * fixed a bug setting timezone. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-21 + + -- MyoungJune Park Mon, 08 Nov 2010 21:55:17 +0900 + +setting (0.1.82-20) unstable; urgency=low + + * key changed from VCONFKEY_SETAPPL_USE_PACKET_DATA_BOOL to VCONFKEY_3G_ENABLE + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-20 + + -- MyoungJune Park Mon, 08 Nov 2010 15:07:56 +0900 + +setting (0.1.82-19) unstable; urgency=low + + * disabled 2G/3G network entry in Connectivity > Network. + * added vconf initialization over timezone at settings.postinst + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-19 + + -- MyoungJune Park Mon, 08 Nov 2010 13:38:39 +0900 + +setting (0.1.82-18) unstable; urgency=low + + * Add the demo code for sound alter type . + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-18 + + -- Yin Kairong Fri, 05 Nov 2010 15:10:39 +0800 + +setting (0.1.82-17) unstable; urgency=low + + * removed libapputil-dev dependancy + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-17 + + -- MyoungJune Park Thu, 04 Nov 2010 21:47:07 +0900 + +setting (0.1.82-16) unstable; urgency=low + + * updated voice recorder image + * updated 'fake image' code. + * fixed the issue that it seemed that it is launching twice when setting app is invoked after adding many application menu in Applications # Please enter the commit message for your changes. + * removed app-util dependancy + * Support kinds of chinese language. + * Remove depreciated files + * Finally Making Setting App supporting zh_CN, zh_HK and zh_TW + * updated i18n string, enabled USB connection menu, chaged string from OFF to Off + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-16 + + -- MyoungJune Park Thu, 04 Nov 2010 18:05:47 +0900 + +setting (0.1.82-15) unstable; urgency=low + + * Support kinds of chinese language. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-15 + + -- Yin Kairong Wed, 03 Nov 2010 17:21:54 +0800 + +setting (0.1.82-14) unstable; urgency=low + + * pkg. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-14 + + -- Yin Kairong Tue, 02 Nov 2010 20:32:48 +0800 + +setting (0.1.82-13) unstable; urgency=low + + * + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-13 + + -- MyoungJune Park Tue, 02 Nov 2010 21:26:11 +0900 + +setting (0.1.82-11) unstable; urgency=low + + * upload pkg. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-11 + + -- Yin Kairong Mon, 01 Nov 2010 18:02:48 +0800 + +setting (0.1.82-10) unstable; urgency=low + + * (CQ H0100111256) disabled heynoti callback to receive event when time changes + * (CQ H0100108569) updated the code calling set_date/set_time and idlecapture_remove code. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-10 + + -- MyoungJune Park Mon, 01 Nov 2010 11:22:42 +0900 + +setting (0.1.82-9) unstable; urgency=low + + * fixed H0100108569 + * fixed the issue that + * in System > Brightness > turning on/off 'Automatic', + * manual silder control disappeared, and not appear again, even if turn it on. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-9 + + -- MyoungJune Park Sat, 30 Oct 2010 18:16:46 +0900 + +setting (0.1.82-8) unstable; urgency=low + + * pasword ui-gadget modificaiton (modified where the change password pop-up is), + * moved TAPI callback functions to Password UI gadget side + * PIN lock, PUK lock have app string (i18n feature) + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-8 + + -- MyoungJune Park Fri, 29 Oct 2010 16:13:31 +0900 + +setting (0.1.82-7) unstable; urgency=low + + * remove Touch Panel auto-lock menu. it's not necessary. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-7 + + -- Yin Kairong Fri, 29 Oct 2010 18:03:21 +0800 + +setting (0.1.82-6) unstable; urgency=low + + * Applying the new Date/Time UI. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-6 + + -- Yin Kairong Fri, 29 Oct 2010 18:01:27 +0800 + +setting (0.1.82-5) unstable; urgency=low + + * Fix H0100111530(Ringtone plays at '0'). + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-5 + + -- Yin Kairong Fri, 29 Oct 2010 17:51:08 +0800 + +setting (0.1.82-4) unstable; urgency=low + + * Fix H0100111612(Set wallpaper failed). + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-4 + + -- Yin Kairong Fri, 29 Oct 2010 17:49:04 +0800 + +setting (0.1.82-3) unstable; urgency=low + + * fix H0100110892 + * ( mobile tracker on/off button issue ) + + -- JungHyun Kim Thu, 28 Oct 2010 21:39:51 +0900 + +setting (0.1.82-2) unstable; urgency=low + + * added devman api to control brightness. + * this api is only for root acess, now it's in disable. + * if it allows us to call the api, the code block will be enabled. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-2 + + -- MyoungJune Park Wed, 27 Oct 2010 17:44:49 +0900 + +setting (0.1.82-1) unstable; urgency=low + + * Fix some defects. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-1 + + -- Yin Kairong Wed, 27 Oct 2010 09:46:34 +0800 + +setting (0.1.81-92) unstable; urgency=low + + * fixed showing the 'searching' popup infintely. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-92 + + -- MyoungJune Park Tue, 26 Oct 2010 22:01:35 +0900 + +setting (0.1.81-91) unstable; urgency=low + + * Add function to support more languages(zh_HK,zh_CN,zh_TW,ru_RU and ja_JP). + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-91 + + -- Yin Kairong Tue, 26 Oct 2010 15:05:09 +0800 + +setting (0.1.81-90) unstable; urgency=low + + * added patch by winset team. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-90 + + -- MyoungJune Park Mon, 25 Oct 2010 17:17:28 +0900 + +setting (0.1.81-89) unstable; urgency=low + + * fixed time zone setting. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-89 + + -- MyoungJune Park Sat, 23 Oct 2010 15:44:35 +0900 + +setting (0.1.81-88) unstable; urgency=low + + * modified bgset file path in setting.postinst.2 + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-88 + + -- MyoungJune Park Thu, 21 Oct 2010 22:13:37 +0900 + +setting (0.1.81-87) unstable; urgency=low + + * modified bgset file path in setting.postinst. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-87 + + -- MyoungJune Park Thu, 21 Oct 2010 19:56:56 +0900 + +setting (0.1.81-86) unstable; urgency=low + + * add setting 'db/menu_widget/language' operation in postinst file + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-86 + + -- Yin Kairong Thu, 21 Oct 2010 14:02:06 +0800 + +setting (0.1.81-85) unstable; urgency=low + + * rocover the operation about language setting in postinst file + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-85 + + -- Yin Kairong Thu, 21 Oct 2010 13:55:34 +0800 + +setting (0.1.81-84) unstable; urgency=low + + * replace IDS_ST_POP_SET with IDS_COM_SK_SET + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-84 + + -- MyoungJune Park Wed, 20 Oct 2010 13:36:13 +0900 + +setting (0.1.81-83) unstable; urgency=low + + * Optmize the 0th/1st level of Setting Frame. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-83 + + -- Yin Kairong Tue, 19 Oct 2010 14:26:17 +0800 + +setting (0.1.81-82) unstable; urgency=low + + * remove all temp files on building source/binary package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-82 + + -- MyoungJune Park Mon, 18 Oct 2010 20:09:17 +0900 + +setting (0.1.81-81) unstable; urgency=low + + * contact ug setting updated + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-81 + + -- MyoungJune Park Mon, 18 Oct 2010 15:02:45 +0900 + +setting (0.1.81-80) unstable; urgency=low + + * Upload package for vconf type changing from 'file' to 'db'. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-80 + + -- Yin Kairong Mon, 18 Oct 2010 13:19:43 +0800 + +setting (0.1.81-79) unstable; urgency=low + + * changed from file/menu_widget/bgset to db/setting/bgset + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-79 + + -- MyoungJune Park Mon, 18 Oct 2010 14:07:37 +0900 + +setting (0.1.81-78) unstable; urgency=low + + * Upload package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-78 + + -- Yin Kairong Mon, 18 Oct 2010 11:41:02 +0800 + +setting (0.1.81-77) unstable; urgency=low + + * Modify the code of reading Wi-Fi Mac address. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-77 + + -- Yin Kairong Mon, 18 Oct 2010 11:29:54 +0800 + +setting (0.1.81-76) unstable; urgency=low + + * Fix the issues of Locked screen setting. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-76 + + -- Yin Kairong Mon, 18 Oct 2010 11:17:10 +0800 + +setting (0.1.81-75) unstable; urgency=low + + * Enable function of Divx de/regester. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-75 + + -- Yin Kairong Fri, 15 Oct 2010 02:26:30 +0800 + +setting (0.1.81-74) unstable; urgency=low + + * restore i18n feature. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-74 + + -- MyoungJune Park Fri, 15 Oct 2010 17:39:37 +0900 + +setting (0.1.81-73) unstable; urgency=low + + * modify get count function in memory status menu ( calendar, contact ) + * modify delete function in clear phone memory menu ( calendar ) + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-73 + + -- MyoungJune Park Fri, 15 Oct 2010 16:56:21 +0900 + +setting (0.1.81-72) unstable; urgency=low + + * updated changelog. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-72 + + -- MyoungJune Park Fri, 15 Oct 2010 16:20:23 +0900 + +setting (0.1.81-71) unstable; urgency=low + + * added setting.postinst to chwon inhouse:inouse /opt/data/setting. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-71 + + -- MyoungJune Park Fri, 15 Oct 2010 16:13:44 +0900 + +setting (0.1.81-70) unstable; urgency=low + + * add code of listening changs of Sound ringtone. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-70 + + -- Yin Kairong Thu, 14 Oct 2010 23:14:28 +0800 + +setting (0.1.81-69) unstable; urgency=low + + * applied Date/Time API from Sysman. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-69 + + -- MyoungJune Park Fri, 15 Oct 2010 13:35:22 +0900 + +setting (0.1.81-68) unstable; urgency=low + + * splited Wallpaper into Home screen and Locked Screen. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-68 + + -- MyoungJune Park Thu, 14 Oct 2010 14:38:49 +0900 + +setting (0.1.81-67) unstable; urgency=low + + * remove file-manager service dependancy. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-67 + + -- MyoungJune Park Thu, 14 Oct 2010 11:50:17 +0900 + +setting (0.1.81-66) unstable; urgency=low + + * modify setting.cfg path. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-66 + + -- MyoungJune Park Wed, 13 Oct 2010 22:40:19 +0900 + +setting (0.1.81-65) unstable; urgency=low + + * added Seven Email setting. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-65 + + -- MyoungJune Park Wed, 13 Oct 2010 20:28:51 +0900 + +setting (0.1.81-64) unstable; urgency=low + + * Fix issue of volumn setting invlaid. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-64 + + -- Yin Kairong Wed, 13 Oct 2010 15:21:28 +0800 + +setting (0.1.81-63) unstable; urgency=low + + * added Home icon to adopt 'home screen'. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-63 + + -- MyoungJune Park Wed, 13 Oct 2010 13:49:43 +0900 + +setting (0.1.81-61) unstable; urgency=low + + * applied patch from winset team. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-62 + + -- MyoungJune Park Tue, 12 Oct 2010 14:47:21 +0900 + +setting (0.1.81-60) unstable; urgency=low + + * Fix 'H0100109155 : in Sound setting, changing volumn, It makes BS.'. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-60 + + -- Yin Kairong Mon, 11 Oct 2010 22:46:22 +0800 + +setting (0.1.81-59) unstable; urgency=low + + * enabled reading 'open source licence.pdf'. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-59 + + -- MyoungJune Park Mon, 11 Oct 2010 21:46:08 +0900 + +setting (0.1.81-58) unstable; urgency=low + + * added 'Theme' menu and fixed bugs. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-58 + + -- MyoungJune Park Mon, 11 Oct 2010 21:05:31 +0900 + +setting (0.1.81-57) unstable; urgency=low + + * Remove the unuseful macros + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-57 + + -- Yin Kairong Sat, 09 Oct 2010 15:56:39 +0800 + +setting (0.1.81-56) unstable; urgency=low + + * added Voice recorder, FM radio menu in Applications. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-56 + + -- MyoungJune Park Sat, 09 Oct 2010 15:02:59 +0900 + +setting (0.1.81-55) unstable; urgency=low + + * rollback time&date setting + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-55 + + -- Byungwook Jang Fri, 08 Oct 2010 17:19:18 +0900 + +setting (0.1.81-54) unstable; urgency=low + + * applied time/date API + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-54 + + -- MyoungJune Park Wed, 06 Oct 2010 08:34:24 +0900 + +setting (0.1.81-53) unstable; urgency=low + + * added KiesOverWifi menu. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-53 + + -- MyoungJune Park Tue, 05 Oct 2010 17:12:34 +0900 + +setting (0.1.81-52) unstable; urgency=low + + * Disabled TV out, Photo uploads, Social network profile + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-52 + + -- MyoungJune Park Tue, 05 Oct 2010 14:28:47 +0900 + +setting (0.1.81-51) unstable; urgency=low + + * removed Mobile tracker src in build, as it is provided outside(ui-gadget)2. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-51 + + -- MyoungJune Park Fri, 01 Oct 2010 15:47:28 +0900 + +setting (0.1.81-50) unstable; urgency=low + + * removed Mobile tracker src in build, as it is provided outside(ui-gadget). + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-50 + + -- MyoungJune Park Fri, 01 Oct 2010 15:26:55 +0900 + +setting (0.1.81-49) unstable; urgency=low + + * removed including deprecated header files. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-49 + + -- MyoungJune Park Thu, 30 Sep 2010 15:17:56 +0900 + +setting (0.1.81-48) unstable; urgency=low + + * enabled wallpaper setting function. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-48 + + -- MyoungJune Park Wed, 29 Sep 2010 21:40:23 +0900 + +setting (0.1.81-47) unstable; urgency=low + + * bug fix on Language setting ( vconf setting ) + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-47 + + -- MyoungJune Park Wed, 29 Sep 2010 19:28:10 +0900 + +setting (0.1.81-46) unstable; urgency=low + + * bug fix on Language setting. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-46 + + -- MyoungJune Park Wed, 29 Sep 2010 15:12:01 +0900 + +setting (0.1.81-45) unstable; urgency=low + + * enabled ask-on-connection as default. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-45 + + -- MyoungJune Park Wed, 29 Sep 2010 13:29:16 +0900 + +setting (0.1.81-44) unstable; urgency=low + + * added Home Screen (Dynamic version by Min Young-Hun, Kim Chung-Hyun) + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-44 + + -- MyoungJune Park Tue, 28 Sep 2010 22:39:28 +0900 + +setting (0.1.81-43) unstable; urgency=low + + * fixed a typing error. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-43 + + -- MyoungJune Park Tue, 28 Sep 2010 19:39:59 +0900 + +setting (0.1.81-42) unstable; urgency=low + + * if Language changed, all apps are terminated except desktop-screen. + * disabled USB-connection menu. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-42 + + -- MyoungJune Park Tue, 28 Sep 2010 19:14:52 +0900 + +setting (0.1.81-41) unstable; urgency=low + + * Upload package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-41 + + -- Yin Kairong Tue, 28 Sep 2010 18:06:50 +0800 + +setting (0.1.81-40) unstable; urgency=low + + * Fix some problems. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-40 + + -- Yin Kairong Tue, 28 Sep 2010 15:33:04 +0800 + +setting (0.1.81-39) unstable; urgency=low + + * Applying Scalability Features + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-39 + + -- Yin Kairong Mon, 27 Sep 2010 14:44:29 +0800 + +setting (0.1.81-38) unstable; urgency=low + + * upload package + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-38 + + -- Yin Kairong Sat, 25 Sep 2010 17:23:12 +0800 + +setting (0.1.81-37) unstable; urgency=low + + * Enable idle capture, and add functions of listening bt/wifi status change + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-37 + + -- Yin Kairong Sat, 25 Sep 2010 01:08:14 +0800 + +setting (0.1.81-36) unstable; urgency=low + + * Adjust to support multilinguage in UGs + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-36 + + -- Byungwook Jang Fri, 24 Sep 2010 16:37:41 +0900 + +setting (0.1.81-35) unstable; urgency=low + + * Adjust to support multilinguage in UGs + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-35 + + -- Yin Kairong Tue, 21 Sep 2010 17:10:33 +0800 + +setting (0.1.81-34) unstable; urgency=low + + * changed font style from bold to thin + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-34 + + -- MyoungJune Park Mon, 20 Sep 2010 21:26:04 +0900 + +setting (0.1.81-33) unstable; urgency=low + + * Fix build break + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-33 + + -- Yin Kairong Mon, 20 Sep 2010 16:38:33 +0800 + +setting (0.1.81-32) unstable; urgency=low + + * Clear kessler winset; Enable Timezone check; Disable the landscape view of + Setting. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-32 + + -- Yin Kairong Mon, 20 Sep 2010 16:22:49 +0800 + +setting (0.1.81-31) unstable; urgency=low + + * Package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-31 + + -- Yin Kairong Mon, 20 Sep 2010 10:45:53 +0800 + +setting (0.1.81-30) unstable; urgency=low + + * Upload Package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-30 + + -- Yin Kairong Fri, 17 Sep 2010 17:34:12 +0800 + +setting (0.1.81-29) unstable; urgency=low + + * enabled email setting with bundle. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-29 + + -- MyoungJune Park Fri, 17 Sep 2010 11:54:49 +0900 + +setting (0.1.81-28) unstable; urgency=low + + * enabled browser setting. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-28 + + -- MyoungJune Park Fri, 17 Sep 2010 11:37:26 +0900 + +setting (0.1.81-27) unstable; urgency=low + + * enabled browser setting. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-27 + + -- MyoungJune Park Thu, 16 Sep 2010 18:01:51 +0900 + +setting (0.1.81-26) unstable; urgency=low + + * added task switcher & home screen. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-26 + + -- MyoungJune Park Thu, 16 Sep 2010 16:42:50 +0900 + +setting (0.1.81-25) unstable; urgency=low + + * Fix build break. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-25 + + -- Yin Kairong Thu, 16 Sep 2010 15:28:20 +0800 + +setting (0.1.81-24) unstable; urgency=low + + * applied demo style as default from now. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-24 + + -- MyoungJune Park Thu, 16 Sep 2010 14:32:54 +0900 + +setting (0.1.81-23) unstable; urgency=low + + * Upload package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-23 + + -- Yin Kairong Wed, 15 Sep 2010 15:53:16 +0800 + +setting (0.1.81-22) unstable; urgency=low + + * disabled SUPPORT_VIEW_TYPE. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-22 + + -- MyoungJune Park Tue, 14 Sep 2010 20:17:47 +0900 + +setting (0.1.81-21) unstable; urgency=low + + * Add code of Home Screen/Task Switcher menus, fix the issue of wallpaper + refresh after wallpaper-image deleted/moved. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-21 + + -- Yin Kairong Tue, 14 Sep 2010 03:36:26 +0800 + +setting (0.1.81-20) unstable; urgency=low + + * replace wallpaper + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-20 + + -- MyoungJune Park Tue, 14 Sep 2010 17:57:08 +0900 + +setting (0.1.81-19) unstable; urgency=low + + * Enable Location/Bluetooth/Call and Fix code about theme. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-19 + + -- Yin Kairong Mon, 13 Sep 2010 17:41:05 +0800 + +setting (0.1.81-18) unstable; urgency=low + + * Fix Issue of Launch Setting Failed + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-18 + + -- Yin Kairong Sat, 11 Sep 2010 21:22:26 +0800 + +setting (0.1.81-17) unstable; urgency=low + + * Enable the Memory module + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-17 + + -- Yin Kairong Sat, 11 Sep 2010 19:30:15 +0800 + +setting (0.1.81-16) unstable; urgency=low + + * Shield the Memory module to avoid the build break + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-16 + + -- Yin Kairong Sat, 11 Sep 2010 18:12:18 +0800 + +setting (0.1.81-15) unstable; urgency=low + + * repackage + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-15 + + -- Yin Kairong Sat, 11 Sep 2010 16:33:43 +0800 + +setting (0.1.81-14) unstable; urgency=low + + * Fix the issue occous in the process of clicking blank area of time/date + picker view. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-14 + + -- Yin Kairong Sat, 11 Sep 2010 15:44:39 +0800 + +setting (0.1.81-13) unstable; urgency=low + + * Upload package + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-13 + + -- Yin Kairong Sat, 11 Sep 2010 15:07:21 +0800 + +setting (0.1.81-12) unstable; urgency=low + + * added error handle code + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-12 + + -- MyoungJune Park Fri, 10 Sep 2010 18:31:25 +0900 + +setting (0.1.81-11) unstable; urgency=low + + * added error handle code + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-11 + + -- Yin Kairong Fri, 10 Sep 2010 17:43:12 +0900 + +setting (0.1.81-10) unstable; urgency=low + + * Fix code bugs and CQ bugs. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-10 + + -- Yin Kairong Thu, 09 Sep 2010 17:40:10 +0800 + +setting (0.1.81-9) unstable; urgency=low + + * Improve launching time. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-9 + + -- Yin Kairong Thu, 09 Sep 2010 09:03:52 +0800 + +setting (0.1.81-8) unstable; urgency=low + + * Testing the new UI Frame. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-8 + + -- Yin Kairong Tue, 07 Sep 2010 03:09:27 +0800 + +setting (0.1.81-7) unstable; urgency=low + + * upload package enabling mobileTracker and Memory. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-7 + + -- Yin Kairong Mon, 06 Sep 2010 16:52:06 +0800 + +setting (0.1.81-6) unstable; urgency=low + + * + * remove dependancies not in use. (disabled mobile tracker) + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-6 + + -- MyoungJune Park Mon, 06 Sep 2010 12:20:55 +0900 + +setting (0.1.81-5) unstable; urgency=low + + * remove dependancies not in use. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-5 + + -- MyoungJune Park Mon, 06 Sep 2010 11:54:54 +0900 + +setting (0.1.81-4) unstable; urgency=low + + * disabled memory widget to avoid compile error. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-4 + + -- MyoungJune Park Fri, 03 Sep 2010 20:48:37 +0900 + +setting (0.1.81-3) unstable; urgency=low + + * set Backright time from 10min to 15 sec. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-3 + + -- MyoungJune Park Fri, 03 Sep 2010 19:23:05 +0900 + +setting (0.1.81-2) unstable; urgency=low + + * set to a normal mode (not demo mode). + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-2 + + -- MyoungJune Park Fri, 03 Sep 2010 17:32:46 +0900 + +setting (0.1.81-1) unstable; urgency=low + + * upload package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-1 + + -- Yin Kairong Fri, 03 Sep 2010 09:39:50 +0800 + +setting (0.1.80-19) unstable; urgency=low + + * remove compile error. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-19 + + -- MyoungJune Park Thu, 02 Sep 2010 14:19:46 +0900 + +setting (0.1.80-18) unstable; urgency=low + + * remove including 'TelAPI_ext.h' + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-18 + + -- MyoungJune Park Thu, 02 Sep 2010 13:46:49 +0900 + +setting (0.1.80-17) unstable; urgency=low + + * changed wallpaper, added code/images for demo. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-17 + + -- MyoungJune Park Wed, 01 Sep 2010 19:35:22 +0900 + +setting (0.1.80-16) unstable; urgency=low + + * modified Menu name : Keyboard Language -> Keyboard. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-16 + + -- MyoungJune Park Mon, 30 Aug 2010 20:00:08 +0900 + +setting (0.1.80-15) unstable; urgency=low + + * removed compile warring,fixed defects in network ,fixed the issue of build + breake, and modified Setting log system. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-15 + + -- Yin Kairong Fri, 27 Aug 2010 17:39:10 +0800 + +setting (0.1.80-14) unstable; urgency=low + + * remove applog.h dependancy. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-14 + + -- MyoungJune Park Fri, 27 Aug 2010 13:09:49 +0900 + +setting (0.1.80-13) unstable; urgency=low + + * package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-13 + + -- Yin Kairong Thu, 26 Aug 2010 17:54:13 +0800 + +setting (0.1.80-12) unstable; urgency=low + + * enabled network/security in menu, Applying network/security and perfect app UI. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-12 + + -- MyoungJune Park Wed, 25 Aug 2010 15:37:13 +0900 + +setting (0.1.80-11) unstable; urgency=low + + * enabled network/security. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-11 + + -- MyoungJune Park Tue, 24 Aug 2010 13:05:27 +0900 + +setting (0.1.80-10) unstable; urgency=low + + * package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-10 + + -- Yin Kairong Fri, 20 Aug 2010 03:02:13 +0800 + +setting (0.1.80-9) unstable; urgency=low + + * Shield the ug loaders which have defect. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-9 + + -- Yin Kairong Fri, 20 Aug 2010 00:53:05 +0800 + +setting (0.1.80-8) unstable; urgency=low + + * Apply wifi/bluetooth/message/keyboard language/email/contact UI gadget + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-8 + + -- Yin Kairong Thu, 19 Aug 2010 17:42:18 +0800 + +setting (0.1.80-7) unstable; urgency=low + + * Package + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-7 + + -- Yin Kairong Thu, 19 Aug 2010 10:17:51 +0800 + +setting (0.1.80-6) unstable; urgency=low + + * Perfect UI appears + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-6 + + -- Yin Kairong Mon, 16 Aug 2010 18:08:09 +0800 + +setting (0.1.80-5) unstable; urgency=low + + * To apply passwd/memory/ and fix the defects in on/off check alternative + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-5 + + -- Yin Kairong Mon, 16 Aug 2010 18:08:09 +0800 + +setting (0.1.80-4) unstable; urgency=low + + * Fixed some UI defects. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-4 + + -- Yin Kairong Sat, 14 Aug 2010 02:39:44 +0800 + +setting (0.1.80-3) unstable; urgency=low + + * repackage. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-3 + + -- Yin Kairong Fri, 13 Aug 2010 18:44:45 +0800 + +setting (0.1.80-2) unstable; urgency=low + + * repackage. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-1 + + -- Yin Kairong Fri, 13 Aug 2010 18:33:37 +0800 + +setting (0.1.80-1) unstable; urgency=low + + * upload package. + * Git: 165.213.180.234:/git/slp/pkgs/setting + * Tag: setting_0.1.80-1 + + -- Yin Kairong Fri, 13 Aug 2010 17:46:15 +0800 + +setting (0.1.79-7) unstable; urgency=low + + * Applying UI gadget. + * Git: 165.213.180.234:/git/slp/pkgs/setting + * Tag: setting_0.1.79-7 + + -- Yin Kairong Thu, 12 Aug 2010 14:46:22 +0800 + +setting (0.1.79-6) unstable; urgency=low + + * Debug UI. + * Git: 165.213.180.234:/git/slp/pkgs/setting + * Tag: setting_0.1.79-6 + + -- Yin Kairong Wed, 11 Aug 2010 13:55:50 +0800 + +setting (0.1.79-5) unstable; urgency=low + + * Applying dialoguegroup for new UI. + * Git: 165.213.180.234:/git/slp/pkgs/setting + * Tag: setting_0.1.79-5 + + -- Yin Kairong Tue, 10 Aug 2010 01:04:59 +0800 + +setting (0.1.79-4) unstable; urgency=low + + * Fix the issue H0100106836 (mobile tracker setting) + + -- Han Xu Thu, 05 Aug 2010 14:53:30 +0800 + +setting (0.1.79-3) unstable; urgency=low + + * Build settings-beat depository. + * Git: 165.213.180.234:/git/slp/pkgs/setting + * Tag: setting_0.1.79-3 + + -- Yin Kairong Tue, 03 Aug 2010 17:10:05 +0800 + +setting (0.1.79-2) unstable; urgency=low + + * Convert Setting UI Style to BEAT Style. + * Git: 165.213.180.234:/git/slp/pkgs/setting + * Tag: setting_0.1.79-2 + + -- Yin Kairong Fri, 30 Jul 2010 13:47:12 +0800 + +setting (0.1.78-2) unstable; urgency=low + + * Fixed the problem of word twinkle. + * Git: 165.213.180.234:/git/slp/pkgs/setting + * Tag: setting_0.1.78-2 + + -- Yin Kairong Wed, 21 Jul 2010 09:52:37 +0800 + +setting (0.1.78-1) unstable; urgency=low + + * Fixed Setting button wrongly sets the Brightness value. + * Git: 165.213.180.234:/git/slp/pkgs/setting + * Tag: setting_0.1.78-1 + + -- Yin Kairong Mon, 19 Jul 2010 16:08:28 +0800 + +setting (0.1.77-6) unstable; urgency=low + + * re-package + * Git: 165.213.180.234:/git/slp/pkgs/setting + * Tag: setting_0.1.77-6 + + -- Yin Kairong Fri, 16 Jul 2010 11:23:04 +0800 + +setting (0.1.77-5) unstable; urgency=low + + * re-package + * Git: 165.213.180.234:/git/slp/pkgs/setting + * Tag: setting_0.1.77-5 + + -- MyoungJune Park Thu, 15 Jul 2010 18:05:28 +0800 + +setting (0.1.77-4) unstable; urgency=low + + * changed for Ecore_IMF. + * Git: 165.213.180.234:/git/slp/pkgs/setting + * Tag: setting_0.1.77-4 + + -- Tang Feng Thu, 15 Jul 2010 15:25:28 +0800 + +setting (0.1.77-3) unstable; urgency=low + + * changed an obsolute function in contact-db-engine. + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.77-3 + + -- MyoungJune Park Tue, 13 Jul 2010 17:37:53 +0900 + +setting (0.1.77-2) unstable; urgency=low + + * owner changed + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.77-2 + + -- MyoungJune Park Thu, 08 Jul 2010 16:11:46 +0900 + +setting (0.1.77-1) unstable; urgency=low + + * fix CQ H0100102586 + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.77-1 + + -- Gibyoung Kim Fri, 02 Jul 2010 17:00:53 +0900 + +setting (0.1.76-4) unstable; urgency=low + + * rebuild + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.76-4 + + -- JunYoung Kim Thu, 01 Jul 2010 16:52:48 +0900 + +setting (0.1.76-3) unstable; urgency=low + + * Added telephony header file + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.76-3 + + -- JunYoung Kim Thu, 01 Jul 2010 16:48:16 +0900 + +setting (0.1.76-2) unstable; urgency=low + + * changed telephony api + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.76-2 + + -- JunYoung Kim Thu, 01 Jul 2010 14:51:49 +0900 + +setting (0.1.76-1) unstable; urgency=low + + * fix CQ H0100102585 + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.76-1 + + -- Gibyoung Kim Tue, 29 Jun 2010 13:17:54 +0900 + +setting (0.1.75-1) unstable; urgency=low + + * Fixed mac addr string + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.75-1 + + -- JunYoung Kim Thu, 24 Jun 2010 17:12:02 +0900 + +setting (0.1.74-5) unstable; urgency=low + + * fixed setting.desktop.in & CMakeLists + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.74-5 + + -- JunYoung Kim Thu, 24 Jun 2010 10:54:33 +0900 + +setting (0.1.74-4) unstable; urgency=low + + * setting.desktop file rollback + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.74-4 + + -- JunYoung Kim Thu, 24 Jun 2010 09:14:40 +0900 + +setting (0.1.74-3) unstable; urgency=low + + * Remove old sharedgadget-model dependency at debin/control + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.74-3 + + -- Youngae Kang Wed, 23 Jun 2010 18:36:16 +0900 + +setting (0.1.74-2) unstable; urgency=low + + * remove BS related to network selection + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.74-2 + + -- Gibyoung Kim Tue, 22 Jun 2010 16:41:19 +0900 + +setting (0.1.74-1) unstable; urgency=low + + * remove BS related to flight mode + * blocking font changing in display menu + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.74-1 + + -- Gibyoung Kim Tue, 22 Jun 2010 15:02:49 +0900 + +setting (0.1.73-3) unstable; urgency=low + + * Fixed problem that don't launch about sg, network sg + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.73-3 + + -- JunYoung Kim Tue, 22 Jun 2010 10:56:57 +0900 + +setting (0.1.73-2) unstable; urgency=low + + * devide code for arm and i386 + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.73-2 + + -- Gibyoung Kim Mon, 21 Jun 2010 16:01:29 +0900 + +setting (0.1.73-1) unstable; urgency=low + + * add 2G/3G connection menu in network SG + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.73-1 + + -- Gibyoung Kim Mon, 21 Jun 2010 11:27:10 +0900 + +setting (0.1.72-3) unstable; urgency=low + + * fixed setting icon problem. + * fixed world clock SG problem + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.72-3 + + -- JunYoung Kim Fri, 18 Jun 2010 15:32:39 +0900 + +setting (0.1.72-2) unstable; urgency=low + + * change ciss setting SG + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.72-2 + + -- Gibyoung Kim Thu, 17 Jun 2010 19:28:51 +0900 + +setting (0.1.72-1) unstable; urgency=low + + * change location for new style SG + * apply change from haptic + * rebuilding for phonebook engine + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.72-1 + + -- Gibyoung Kim Thu, 17 Jun 2010 15:26:38 +0900 + +setting (0.1.71-1) unstable; urgency=low + + * Adjusted new dlog style + * Fixed BS problem in mobile tracker + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.71-1 + + -- Jun Young Kim Thu, 17 Jun 2010 13:28:28 +0900 + +setting (0.1.70-1) unstable; urgency=low + + * fix bug related pin2 change + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.70-1 + + -- Gibyoung Kim Tue, 15 Jun 2010 17:10:29 +0900 + +setting (0.1.69-2) unstable; urgency=low + + * change call setting, msg setting SG + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.69-2 + + -- Gibyoung Kim Tue, 15 Jun 2010 13:59:32 +0900 + +setting (0.1.69-1) unstable; urgency=low + + * apply new style SG + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.69-1 + + -- Gibyoung Kim Tue, 15 Jun 2010 09:55:30 +0900 + +setting (0.1.68-1) unstable; urgency=low + + * fix bug related with indicator + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.68-1 + + -- Gibyoung Kim Fri, 11 Jun 2010 18:08:04 +0900 + +setting (0.1.67-3) unstable; urgency=low + + * rebuilding for efl update + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.67-3 + + -- Gibyoung Kim Thu, 10 Jun 2010 23:06:20 +0900 + +setting (0.1.67-2) unstable; urgency=low + + * remove old API of telephony + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.67-2 + + -- Gibyoung Kim Wed, 09 Jun 2010 21:46:55 +0900 + +setting (0.1.67-1) unstable; urgency=low + + * modify changing flight mode + * code cleaning + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.67-1 + + -- Gibyoung Kim Wed, 09 Jun 2010 20:58:21 +0900 + +setting (0.1.66-1) unstable; urgency=low + + * remove widgets menu + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.66-1 + + -- Gibyoung Kim Mon, 07 Jun 2010 18:11:09 +0900 + +setting (0.1.65-3) unstable; urgency=low + + * apply change from AUL + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.65-3 + + -- Gibyoung Kim Mon, 07 Jun 2010 17:41:50 +0900 + +setting (0.1.65-2) unstable; urgency=low + + * fix bug related language change and remove build break + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.65-2 + + -- Gibyoung Kim Mon, 07 Jun 2010 11:11:19 +0900 + +setting (0.1.65-1) unstable; urgency=low + + * change appfwk as appcore + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.65-1 + + -- Gibyoung Kim Sat, 05 Jun 2010 17:02:03 +0900 + +setting (0.1.64-3) unstable; urgency=low + + * remove old package and api + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.64-3 + + -- Gibyoung Kim Fri, 04 Jun 2010 18:22:38 +0900 + +setting (0.1.64-2) unstable; urgency=low + + * code clean for setting-font + * remove build break related utilcore + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.64-2 + + -- Gibyoung Kim Fri, 04 Jun 2010 16:00:38 +0900 + +setting (0.1.64-1) unstable; urgency=low + + * apply changes from phonebook engine + * code cleaning + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.64-1 + + -- Gibyoung Kim Fri, 04 Jun 2010 13:24:05 +0900 + +setting (0.1.63-3) unstable; urgency=low + + * rebuilding for telephony framework + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.63-3 + + -- Gibyoung Kim Thu, 03 Jun 2010 15:56:19 +0900 + +setting (0.1.63-2) unstable; urgency=low + + * rebuilding for telephony framework and partial code cleaning + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.63-2 + + -- Gibyoung Kim Thu, 03 Jun 2010 15:21:40 +0900 + +setting (0.1.63-1) unstable; urgency=low + + * apply changes from system framework and heynoti + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.63-1 + + -- Gibyoung Kim Thu, 03 Jun 2010 11:22:19 +0900 + +setting (0.1.62-1) unstable; urgency=low + + * add system reboot API and memo clearing API + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.62-1 + + -- Gibyoung Kim Mon, 31 May 2010 22:53:26 +0900 + +setting (0.1.61-3) unstable; urgency=low + + * to remove BS in setting-security + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.61-3 + + -- Gibyoung Kim Mon, 31 May 2010 19:52:46 +0900 + +setting (0.1.61-2) unstable; urgency=low + + * to remove BS from setting-network + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.61-2 + + -- Gibyoung Kim Mon, 31 May 2010 17:48:40 +0900 + +setting (0.1.61-1) unstable; urgency=low + + * fix bug for setting-neetwork and code cleaning + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.61-1 + + -- Gibyoung Kim Mon, 31 May 2010 14:44:10 +0900 + +setting (0.1.60-1) unstable; urgency=low + + * apply changes from MMFW + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.60-1 + + -- Gibyoung Kim Mon, 31 May 2010 12:47:11 +0900 + +setting (0.1.59-2) unstable; urgency=low + + * to fix bug related with telephony changes + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.59-2 + + -- Gibyoung Kim Sat, 29 May 2010 18:11:38 +0900 + +setting (0.1.59-1) unstable; urgency=low + + * apply changes from telephony + * apply heynoti + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.59-1 + + -- Gibyoung Kim Sat, 29 May 2010 17:21:53 +0900 + +setting (0.1.58-1) unstable; urgency=low + + * Apply Dnet API changes + * code cleaning and bug fixing(H0100094425) + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.58-1 + + -- Gibyoung Kim Sat, 29 May 2010 00:19:38 +0900 + +setting (0.1.57-1) unstable; urgency=low + + * code cleaning(application, display, network, memory) + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.57-1 + + -- Gibyoung Kim Mon, 24 May 2010 22:41:39 +0900 + +setting (0.1.56-2) unstable; urgency=low + + * apply privilege control + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.56-2 + + -- Gibyoung Kim Wed, 19 May 2010 23:21:05 +0900 + +setting (0.1.55-1) unstable; urgency=low + + * code cleaning(common, application, connectivity) + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.55-1 + + -- Gibyoung Kim Mon, 17 May 2010 22:18:30 +0900 + +setting (0.1.54-1) unstable; urgency=low + + * from Sandeep : fix bugs related with vconf_get_str() (CQ H0100094842, H0100094844, H0100095961) + * apply changes from Emain framework + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.54-1 + + -- Gibyoung Kim Fri, 14 May 2010 16:46:53 +0900 + +setting (0.1.53-1) unstable; urgency=low + + * fixed bugs + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.53-1 + + -- JunYoung Kim Tue, 11 May 2010 21:41:05 +0900 + +setting (0.1.52-1) unstable; urgency=low + + * fixed mobile tracker + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.52-1 + + -- JunYoung Kim Thu, 06 May 2010 15:32:09 +0900 + +setting (0.1.51-1) unstable; urgency=low + + * fixed memory leak, picker error + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.51-1 + + -- JunYoung Kim Tue, 04 May 2010 14:09:41 +0900 + +setting (0.1.50-3) unstable; urgency=low + + * rebuild for DNET + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.50-3 + + -- JunYoung Kim Wed, 28 Apr 2010 14:18:49 +0900 + +setting (0.1.50-2) unstable; urgency=low + + * remove resource for setting-profile + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.50-2 + + -- Gibyoung Kim Tue, 27 Apr 2010 10:45:36 +0900 + +setting (0.1.50-1) unstable; urgency=low + + * enhance source code + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.50-1 + + -- JunYoung Kim Mon, 26 Apr 2010 23:56:45 +0900 + +setting (0.1.49-1) unstable; urgency=low + + * Fixed security bug + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.49:-1 + + -- JunYoung Kim Fri, 23 Apr 2010 11:28:22 +0900 + +setting (0.1.48-1) unstable; urgency=low + + * Size string for user memory storage is changed to use MB, GB + * Fixed postinst error + * Code cleanign setp 3 for setting memory + * Adjust DAC in setting + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.48-1 + + -- JunYoung Kim Wed, 21 Apr 2010 16:06:47 +0900 + +setting (0.1.47-1) unstable; urgency=low + + * Code cleaning of memory and sound profiles. + * Fix default value of Message alert vibration as the selected value by + user. + * Connectivity-main shows 'ask on connection' menu when user select it. + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.47-1 + + -- Youngae Kang Sat, 17 Apr 2010 12:28:14 +0900 + +setting (0.1.46-1) unstable; urgency=low + + * fixed the phone, profile setting + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.46-1 + + -- JunYoung Kim Thu, 15 Apr 2010 16:47:06 +0900 + +setting (0.1.45-2) unstable; urgency=low + + * rebuild - fixed problme which is default value + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.45-2 + + -- JunYoung Kim Wed, 14 Apr 2010 17:10:19 +0900 + +setting (0.1.45-1) unstable; urgency=low + + * removed fake image + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.45-1 + + -- JunYoung Kim Tue, 13 Apr 2010 16:53:24 +0900 + +setting (0.1.44-3) unstable; urgency=low + + * build failed. rebuild + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.44-3 + + -- JunYoung Kim Tue, 13 Apr 2010 09:19:14 +0900 + +setting (0.1.44-2) unstable; urgency=low + + * rebuild + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.44-2 + + -- JunYoung Kim Mon, 12 Apr 2010 14:40:20 +0900 + +setting (0.1.44-1) unstable; urgency=low + + * adjust avator, adjust usb setting + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.44-1 + + -- JunYoung Kim Mon, 12 Apr 2010 13:42:23 +0900 + +setting (0.1.43-1) unstable; urgency=low + + * Merge About module changed by Rajeesh. + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.43-1 + + -- Youngae Kang Fri, 09 Apr 2010 22:55:26 +0900 + +setting (0.1.42-2) unstable; urgency=low + + * Add tag description. + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.42-2 + + -- Youngae Kang Fri, 09 Apr 2010 20:13:07 +0900 + +setting (0.1.42-1) unstable; urgency=low + + * Fix the bug that checkbox of DST doesn't show ON even though DST is set ON when + a user taps on 'Back' softkey and return to 'Time and date' + + -- Youngae Kang Fri, 09 Apr 2010 19:58:58 +0900 + +setting (0.1.41-1) unstable; urgency=low + + * Fix two bugs. + * The first is to save password as the value of user_name. + * The second is to save HomeURL as the value of proxy address. + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.41-1 + + -- Youngae Kang Fri, 09 Apr 2010 18:22:35 +0900 + +setting (0.1.40-1) unstable; urgency=low + + * adjusted passwd SG in clear phone + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.40-1 + + -- JunYoung Kim Thu, 08 Apr 2010 22:56:00 +0900 + +setting (0.1.39-2) unstable; urgency=low + + * rebuild + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.39-2 + + -- JunYoung Kim Wed, 07 Apr 2010 11:06:49 +0900 + +setting (0.1.39-1) unstable; urgency=low + + * adjust default memory, fixed BS, added home url to mms connections, removed unused files + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.38-1 + + -- JunYoung Kim Wed, 07 Apr 2010 00:23:32 +0900 + +setting (0.1.38-1) unstable; urgency=low + + * Modify some language resources. + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.38-1 + + -- YoungAe Kang Mon, 05 Apr 2010 22:21:35 +0900 + +setting (0.1.37-1) unstable; urgency=low + + * adjust gray bg in connectivity menu + * fixed toggle button data roaming, auto lock + + -- JunYoung Kim Mon, 05 Apr 2010 22:16:37 +0900 + +setting (0.1.36-1) unstable; urgency=low + + * Modify memory status and code cleaning. + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.36-1 + + -- YoungAe Kang Mon, 05 Apr 2010 10:25:44 +0900 + +setting (0.1.35-1) unstable; urgency=low + + * Delete dependent codes on the previsou UI_ime packages. + * Modify codes wether mmc card exists or not. + * Git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag : setting_0.1.35-1 + + -- YoungAe Kang Fri, 02 Apr 2010 14:22:30 +0900 + +setting (0.1.34-1) unstable; urgency=low + + * Fix the defect that it exited after finishing Clear phone memory. + * Merge Memory status codes. + + -- YoungAe Kang Fri, 02 Apr 2010 03:22:47 +0900 + +setting (0.1.33-1) unstable; urgency=low + + * Merge codes of Time and date adopting modified UI. + + -- YoungAe Kang Thu, 01 Apr 2010 18:10:37 +0900 + +setting (0.1.32-1) unstable; urgency=low + + * Fix toggle bug of all items at General -> Ticker notification. + + -- YoungAe Kang Thu, 01 Apr 2010 17:32:11 +0900 + +setting (0.1.31-1) unstable; urgency=low + + * Insert #ifdef _A_PROJECT_ into Memory Status because of upgrading Email Service(Version 0.1.1-16). + + -- YoungAe Kang Wed, 31 Mar 2010 18:08:26 +0900 + +setting (0.1.30-1) unstable; urgency=low + + * Change Telephony header because of upgrading Telephony FW(Version 0.2.3). + + -- YoungAe Kang Wed, 31 Mar 2010 16:33:28 +0900 + +setting (0.1.29-1) unstable; urgency=low + + * Rollback header file to delay tomorrow. + * Add memory status modified by GiByoung. + + -- YoungAe Kang Tue, 30 Mar 2010 22:23:11 +0900 + +setting (0.1.28-1) unstable; urgency=low + + * Change Telephony header because of upgrading Telephony FW. + + -- YoungAe Kang Tue, 30 Mar 2010 18:23:50 +0900 + +setting (0.1.27-1) unstable; urgency=low + + * Fix BS of chaging Internet and MMS connections when User Name or Password is NULL. + + -- YoungAe Kang Tue, 30 Mar 2010 16:06:16 +0900 + +setting (0.1.26-1) unstable; urgency=low + + * Rollback setting_connection_create_connection() to orignal code. + + -- YoungAe Kang Tue, 30 Mar 2010 15:15:32 +0900 + +setting (0.1.25-1) unstable; urgency=low + + * Merge Preferred Network codes with master branch. + * Fix reset of Power on lock. + * Change to show "Please insert a SIM" message instead of "Invalid SIM" when there is no SIM. + * Change to keep SIM lock unchecked when there is no SIM. + + -- YoungAe Kang Tue, 30 Mar 2010 01:41:24 +0900 + +setting (0.1.24-1) unstable; urgency=low + + * Modified inital value of Brightness and Backlight time. + + -- YoungAe Kang Thu, 25 Mar 2010 23:24:11 +0900 + +setting (0.1.23-1) unstable; urgency=low + + * Modified wrong spell, "Ticker notification". + + -- YoungAe Kang Thu, 25 Mar 2010 23:24:11 +0900 + +setting (0.1.22-1) unstable; urgency=low + + * modified mobile tracker, adjusted SG in memory setting + + -- JunYoung Kim Fri, 26 Mar 2010 20:01:42 +0900 + +setting (0.1.21-1) unstable; urgency=low + + * CHANGE TOOLCHAIN from 2007q3 to 2009q3!!! + * DongHwan Ji + * calculate mmc max, free size master + * JunYoung Kim + * fixed problem what don't update checkbox + * Merge branch 'master' of jy0214.kim@165.213.180.234... + * added sim lock check routine in security + * modified default value + * adjust mobile tracker SG + * fixed reset all setting + * adjusted roaming network in license setting + * Jihoon Kim + * change the path of Xresources + + -- YoungAe Kang Thu, 25 Mar 2010 23:24:11 +0900 + +setting (0.1.20-1) unstable; urgency=low + + * Gibyoung + * change layout of volume slider + * junyoung + * fixed brightness problem + * junyoung + * rollback control file + * junyoung + * adjust SG in security + + -- YoungAe Kang Wed, 24 Mar 2010 22:03:52 +0900 + +setting (0.1.19-1) unstable; urgency=low + + * BS of TimeZone is fixed by + * Sound profile is modified by + * Clear Memory is modified by + * Add feature of Network profile is added by + * Preferred network is added by SISO + + -- YoungAe Kang Tue, 23 Mar 2010 16:10:49 +0900 + +setting (0.1.18-2) unstable; urgency=low + + * to resolve CQ H0100085701 + * to fix BS + * to fix locale value in language setting + * to fix memory problem + * to modify silent profile view(CQ H0100079119) + + -- JunYoung Kim Mon, 22 Mar 2010 21:05:23 +0900 + +setting (0.1.18-1) unstable; urgency=low + + * modified network profile policy & adjust license + + -- JunYoung Kim Fri, 19 Mar 2010 17:35:19 +0900 + +setting (0.1.17-1) unstable; urgency=low + + * adjusted korea language main, phone view + + -- junyoung kim Wed, 17 Mar 2010 20:08:51 +0900 + +setting (0.1.16-2) unstable; urgency=low + + * modified to get profile id in network setting + + -- junyoung Tue, 16 Mar 2010 22:34:06 +0900 + +setting (0.1.16-1) unstable; urgency=low + + * added password SG, fixed cq bug + + -- junyoung kim Tue, 16 Mar 2010 21:54:44 +0900 + +setting (0.1.15-1) unstable; urgency=low + + * adjusted new winset in time setting + + -- junyoung kim Mon, 15 Mar 2010 16:40:35 +0900 + +setting (0.1.13-2) unstable; urgency=low + + * rebuild + + -- junyoung kim Thu, 11 Mar 2010 16:08:57 +0900 + +setting (0.1.13-1) unstable; urgency=low + + * make setting_create_dial_field_xxx style draw widget + + -- junyoung kim Thu, 11 Mar 2010 15:59:59 +0900 + +setting (0.1.12-0) unstable; urgency=low + + * adjused new winset in tvout + + -- junyoung kim Wed, 10 Mar 2010 09:58:44 +0900 + +setting (0.1.11-3) unstable; urgency=low + + * rebuild + + -- junyoung kim Mon, 08 Mar 2010 23:40:20 +0900 + +setting (0.1.11-2) unstable; urgency=low + + * fixed display setting, added divx logic, enhance profile setting + + -- junyoung kim Mon, 08 Mar 2010 23:37:15 +0900 + +setting (0.1.11-1) unstable; urgency=low + + * Add haptic pattern vibration API + + -- junyoung kim Mon, 08 Mar 2010 14:10:10 +0900 + +setting (0.1.10-09) unstable; urgency=low + + * rebuild + + -- junyoung kim Fri, 05 Mar 2010 18:01:05 +0900 + +setting (0.1.10-08) unstable; urgency=low + + * adjused new winset + + -- root Fri, 05 Mar 2010 17:56:51 +0900 + +setting (0.1.10-07) unstable; urgency=low + + * cq bug fix + + -- junyoung kim Wed, 03 Mar 2010 14:48:05 +0900 + +setting (0.1.10-06) unstable; urgency=low + + * added help page in network setting & modified memory setting + + -- junyoung kim Sat, 27 Feb 2010 12:17:39 +0900 + +setting (0.1.10-05) unstable; urgency=low + + * change application setting code (use ciss shared gadget) + + -- siwoo Lee Fri, 26 Feb 2010 14:38:04 +0900 + +setting (0.1.10-04) unstable; urgency=low + + * fixed flight mode & added file-mgr API when user changed wallpaper + + -- junyoung kim Thu, 25 Feb 2010 20:53:45 +0900 + +setting (0.1.10-03) unstable; urgency=low + + * adjusted SG in connectivity & added home url in MMS profile + + -- junyoung kim Thu, 25 Feb 2010 13:55:29 +0900 + +setting (0.1.10-02) unstable; urgency=low + + * added help page in network setting + + -- junyoung kim Wed, 24 Feb 2010 00:38:54 +0900 + +setting (0.1.10-01) unstable; urgency=low + + * changed UI according to UI v1.5 + + -- junyoung kim Wed, 24 Feb 2010 00:36:21 +0900 + +setting (0.1.9-31) unstable; urgency=low + + * add vconf key + + -- siwoo Lee Mon, 22 Feb 2010 10:19:16 +0900 + +setting (0.1.9-30) unstable; urgency=low + + * added font SG, modified indicator policy, fixed mmplayer + + -- jun young kim Sat, 20 Feb 2010 17:44:09 +0900 + +setting (0.1.9-29) unstable; urgency=low + + * modified memory setting + + -- jun young kim Sat, 20 Feb 2010 14:23:42 +0900 + +setting (0.1.9-28) unstable; urgency=low + + * added phonebook-dev + + -- jun young kim Sat, 20 Feb 2010 10:54:04 +0900 + +setting (0.1.9-27) unstable; urgency=low + + * fixed picker, fixed to save profile, implemented SG in profile setting + + -- jun young kim Sat, 20 Feb 2010 10:24:50 +0900 + +setting (0.1.9-26) unstable; urgency=low + + * change mobile tracker code + + -- siwoo Lee Fri, 19 Feb 2010 20:39:27 +0900 + +setting (0.1.9-25) unstable; urgency=low + + * fix build error + + -- siwoo Lee Fri, 19 Feb 2010 19:28:21 +0900 + +setting (0.1.9-24) unstable; urgency=low + + * modify mobile tracker code + + -- siwoo Lee Fri, 19 Feb 2010 18:23:20 +0900 + +setting (0.1.9-23) unstable; urgency=low + + * bug fix multi entry issue + + -- siwoo Lee Thu, 18 Feb 2010 11:20:25 +0900 + +setting (0.1.9-22) unstable; urgency=low + + * changed launching method about open source license & removed widget disclaimer & modified security SIM related option + + -- jun young kim Wed, 17 Feb 2010 14:34:25 +0900 + +setting (0.1.9-21) unstable; urgency=low + + * Removed UI-ime library + + -- Sandeep Kumar Singh Tue, 16 Feb 2010 18:33:13 +0900 + +setting (0.1.9-21) unstable; urgency=low + + * Removed Widget Disclaimer, Modified Security items + + -- Sandeep Kumar Singh Tue, 16 Feb 2010 18:15:13 +0900 + +setting (0.1.9-20) unstable; urgency=low + + * fixed black screen for SG + + -- jun young kim Fri, 12 Feb 2010 20:06:13 +0900 + +setting (0.1.9-19) unstable; urgency=low + + * fixed datepicker, timepicker, fixed black screen. + + -- jun young kim Fri, 12 Feb 2010 18:18:34 +0900 + +setting (0.1.9-17) unstable; urgency=low + + * implemented memory setting + + -- jun young kim Fri, 12 Feb 2010 11:47:27 +0900 + +setting (0.1.9-16) unstable; urgency=low + + * adjust SG in time setting + + -- jun young kim Thu, 11 Feb 2010 23:58:32 +0900 + +setting (0.1.9-15) unstable; urgency=low + + * add phonebook shared gadget(application setting) + + -- siwoo Lee Thu, 11 Feb 2010 17:16:49 +0900 + +setting (0.1.9-14) unstable; urgency=low + + * modify password popup string + + -- siwoo Lee Thu, 11 Feb 2010 14:10:55 +0900 + +setting (0.1.9-13) unstable; urgency=low + + * modified control file to change architecture for my file + + -- jun young kim Wed, 10 Feb 2010 19:10:01 +0900 + +setting (0.1.9-12) unstable; urgency=low + + * adjust SG in application setting + + -- jun young kim Wed, 10 Feb 2010 18:56:38 +0900 + +setting (0.1.9-11) unstable; urgency=low + + * modified flight mode clicking problem + + -- jun young kim Wed, 10 Feb 2010 17:29:42 +0900 + +setting (0.1.9-10) unstable; urgency=low + + * adjust SG in display setting + + -- jun young kim Wed, 10 Feb 2010 11:30:10 +0900 + +setting (0.1.9-09) unstable; urgency=low + + * apply phonebook shared gadget + + -- siwoo Lee Wed, 10 Feb 2010 09:07:41 +0900 + +setting (0.1.9-08) unstable; urgency=low + + * modify control file + + -- siwoo Lee Tue, 09 Feb 2010 14:38:03 +0900 + +setting (0.1.9-07) unstable; urgency=low + + * modify changelog + + -- siwoo Lee Mon, 08 Feb 2010 10:41:15 +0900 + +setting (0.1.9-06) unstable; urgency=low + + * bug fix vconfkey value + + -- jun young kim Mon, 08 Feb 2010 10:08:07 +0900 + +setting (0.1.9-05) unstable; urgency=low + + * fixed sound profile path problem + + -- jun young kim Sat, 06 Feb 2010 10:56:34 +0900 + +setting (0.1.9-04) unstable; urgency=low + + * bug fix CQ & BS + + -- Siwoo Lee Fri, 05 Feb 2010 22:34:45 +0900 + +setting (0.1.9-03) unstable; urgency=low + + * rebuild + + -- jun young kim Fri, 05 Feb 2010 17:57:54 +0900 + +setting (0.1.9-02) unstable; urgency=low + + * modified D1NF type to possible list click + + -- jun young kim Fri, 05 Feb 2010 17:21:28 +0900 + +setting (0.1.9-00) unstable; urgency=low + + * modify security application code + + -- Siwoo Lee Thu, 04 Feb 2010 14:46:30 +0900 + +setting (0.1.8-14) unstable; urgency=low + + * upload test + + -- Siwoo Lee Thu, 04 Feb 2010 14:40:47 +0900 + +setting (0.1.8-13) unstable; urgency=low + + * fixed build error + + -- jun young kim Thu, 04 Feb 2010 13:18:44 +0900 + +setting (0.1.8-12) unstable; urgency=low + + * fixed build error + + -- root Thu, 04 Feb 2010 13:18:33 +0900 + +setting (0.1.8-11) unstable; urgency=low + + * fixed build error in time setting + + -- jun young kim Thu, 04 Feb 2010 11:54:38 +0900 + +setting (0.1.8-9) unstable; urgency=low + + * modified flight mode + + -- jun young kim Thu, 04 Feb 2010 00:07:13 +0900 + +setting (0.1.8-8) unstable; urgency=low + + * modified titlebar + + -- jun young kim Wed, 03 Feb 2010 17:13:27 +0900 + +setting (0.1.8-7) unstable; urgency=low + + * adjusted new winset (titlebar, indicator, softkey) + + -- root Tue, 02 Feb 2010 19:27:58 +0900 + +setting (0.1.8-6) unstable; urgency=low + + * rebuild + + -- jun young kim Sat, 30 Jan 2010 17:43:08 +0900 + +setting (0.1.8-5) unstable; urgency=low + + * fixed default image path in postinst, modified desktop Name option for multi language + + -- jun young kim Sat, 30 Jan 2010 15:20:32 +0900 + +setting (0.1.8-3) unstable; urgency=low + + * modified reset problem + + -- jun young kim Fri, 29 Jan 2010 20:49:14 +0900 + +setting (0.1.8-2) unstable; urgency=low + + * implemented mobile tracker + + -- jun young kim Fri, 29 Jan 2010 19:13:59 +0900 + +setting (0.1.8-1) unstable; urgency=low + + * changed SLP naming + + -- jun young kim Wed, 27 Jan 2010 15:56:14 +0900 + +setting (0.1.7-57) unstable; urgency=low + + * rebuild + + -- jun young kim Sat, 23 Jan 2010 18:09:12 +0900 + +setting (0.1.7-56) unstable; urgency=low + + * modified network connection section + + -- jun young kim Sat, 23 Jan 2010 18:03:21 +0900 + +setting (0.1.7-55) unstable; urgency=low + + * fixed problme when user enter open source license menu, raise BS + + -- jun young kim Sat, 23 Jan 2010 16:15:35 +0900 + +setting (0.1.7-54) unstable; urgency=low + + * fixed ringtone & modified setting name + + -- jun young kim Sat, 23 Jan 2010 14:08:15 +0900 + +setting (0.1.7-53) unstable; urgency=low + + * implemented ringtone and fixed time and date + + -- jun young kim Fri, 22 Jan 2010 19:56:18 +0900 + +setting (0.1.7-52) unstable; urgency=low + + * connected myfile shared gadget and timezone shared gadgety + + -- jun young kim Fri, 22 Jan 2010 11:14:20 +0900 + +setting (0.1.7-51) unstable; urgency=low + + * implement vibration feedback func + + -- jun young kim Thu, 21 Jan 2010 16:33:11 +0900 + +setting (0.1.7-50) unstable; urgency=low + + * implemented application setting except phonebook + + -- jun young kim Thu, 21 Jan 2010 12:02:33 +0900 + +setting (0.1.7-49) unstable; urgency=low + + * fixed vibration feedback scope (1-10 -> 0-5) + + -- jun young kim Thu, 21 Jan 2010 10:13:03 +0900 + +setting (0.1.7-48) unstable; urgency=low + + * implemented touch menu in phone setting + + -- jun young kim Thu, 21 Jan 2010 10:04:20 +0900 + +setting (0.1.7-47) unstable; urgency=low + + * rebuild to chang email + + -- jun young kim Wed, 20 Jan 2010 17:40:37 +0900 + +setting (0.1.7-46) unstable; urgency=low + + * rebuild + + -- jun young kim Wed, 20 Jan 2010 17:32:32 +0900 + +setting (0.1.7-45) unstable; urgency=low + + * implemented data-roaming + + -- jun young kim Wed, 20 Jan 2010 17:22:38 +0900 + +setting (0.1.7-44) unstable; urgency=low + + * fixed postinst bug + + -- jun young kim Tue, 19 Jan 2010 22:10:35 +0900 + +setting (0.1.7-43) unstable; urgency=low + + * modify postinst file : add #!/bin/bash + + -- Tai Hyung Kim Tue, 19 Jan 2010 21:47:57 +0900 + +setting (0.1.7-42) unstable; urgency=low + + * change mode postinst file + + -- Tai Hyung Kim Tue, 19 Jan 2010 21:14:42 +0900 + +setting (0.1.7-41) unstable; urgency=low + + * rebuild package because of fake image problem + + -- Tai Hyung Kim Tue, 19 Jan 2010 20:25:24 +0900 + +setting (0.1.7-40) unstable; urgency=low + + * added postinst files, fixed about fake image problem + + -- jun-young kim Tue, 19 Jan 2010 17:57:04 +0900 + +setting (0.1.7-39) unstable; urgency=low + + * removed smart unlock menu in phone setting + + -- jun-young kim Tue, 19 Jan 2010 13:48:37 +0900 + +setting (0.1.7-38) unstable; urgency=low + + * implemented text input menu and move data roaming menu from phone to network + + -- jun-young kim Tue, 19 Jan 2010 12:08:07 +0900 + +setting (0.1.7-37) unstable; urgency=low + + * set default value + + -- jun-young kim Sat, 16 Jan 2010 17:24:06 +0900 + +setting (0.1.7-36) unstable; urgency=low + + * implemented reset setting and network setting + + -- jun-young kim Sat, 16 Jan 2010 11:31:47 +0900 + +setting (0.1.7-35) unstable; urgency=low + + * implemented setting connectivity menu + + -- jun-young kim Fri, 15 Jan 2010 19:40:43 +0900 + +setting (0.1.7-34) unstable; urgency=low + + * implemented setting-connectivity menu + + -- root Fri, 15 Jan 2010 19:39:38 +0900 + +setting (0.1.7-33) unstable; urgency=low + + * rebuild + + -- jun-young kim Fri, 15 Jan 2010 15:38:25 +0900 + +setting (0.1.7-32) unstable; urgency=low + + * implemented click event in DCBS & time menu + + -- root Fri, 15 Jan 2010 15:35:36 +0900 + +setting (0.1.7-31) unstable; urgency=low + + * rebuild + + -- jun-young kim Thu, 14 Jan 2010 21:56:21 +0900 + +setting (0.1.7-30) unstable; urgency=low + + * rebuild + + -- junyoung kim Thu, 14 Jan 2010 21:51:42 +0900 + +setting (0.1.7-29) unstable; urgency=low + + * modified debian/control file + + -- root Thu, 14 Jan 2010 21:44:28 +0900 + +setting (0.1.7-28) unstable; urgency=low + + * rebuild again + + -- root Thu, 14 Jan 2010 21:25:36 +0900 + +setting (0.1.7-27) unstable; urgency=low + + * rebuild + + -- root Thu, 14 Jan 2010 21:25:09 +0900 + +setting (0.1.7-26) unstable; urgency=low + + * fixed menu widget + + -- jun-young kim Thu, 14 Jan 2010 19:42:28 +0900 + +setting (0.1.7-25) unstable; urgency=low + + * added default value in first time + + -- jun-young kim Thu, 14 Jan 2010 00:00:46 +0900 + +setting (0.1.7-24) unstable; urgency=low + + * fixed main view + + -- jun-young kim Wed, 13 Jan 2010 17:48:42 +0900 + +setting (0.1.7-23) unstable; urgency=low + + * architecture changed (armel -> any) + + -- jun-young kim Wed, 13 Jan 2010 15:02:43 +0900 + +setting (0.1.7-22) unstable; urgency=low + + * build again + + -- jun-young kim Wed, 13 Jan 2010 12:09:38 +0900 + +setting (0.1.7-21) unstable; urgency=low + + * added mesure time routine, modified fake image routine + + -- jun-young kim Wed, 13 Jan 2010 11:30:25 +0900 + +setting (0.1.7-20) unstable; urgency=low + + * added libtw3-popup-dev in control file + + -- jun-young kim Tue, 12 Jan 2010 09:01:06 +0900 + +setting (0.1.7-19) unstable; urgency=low + + * build again + + -- jun-young kim Tue, 12 Jan 2010 08:14:42 +0900 + +setting (0.1.7-18) unstable; urgency=low + + * build again + + -- jun-young kim Tue, 12 Jan 2010 08:07:07 +0900 + +setting (0.1.7-17) unstable; urgency=low + + * implement time-setting + rollback setting main veiw + + -- jun-young kim Mon, 11 Jan 2010 23:11:46 +0900 + +setting (0.1.7-16) unstable; urgency=low + + * fixed build error (added libtw3-popup-dev library in control file) + + -- jun-young kim Mon, 11 Jan 2010 12:24:48 +0900 + +setting (0.1.7-15) unstable; urgency=low + + * use list widget instead of setting-theme dialogue in setting-main.c + added measure source code in setting.c + added protected code in setting-display.c (wallpaper) + + -- jun-young kim Mon, 11 Jan 2010 12:15:28 +0900 + +setting (0.1.7-14) unstable; urgency=low + + * added space each dialogue filed + + -- jun-young kim Fri, 08 Jan 2010 17:47:19 +0900 + +setting (0.1.7-13) unstable; urgency=low + + * fixed touch problem and indicator problem + + -- jun-young kim Fri, 08 Jan 2010 14:54:17 +0900 + +setting (0.1.7-12) unstable; urgency=low + + * implement tv out2 + + -- jun-young kim Thu, 07 Jan 2010 19:42:51 +0900 + +setting (0.1.7-11) unstable; urgency=low + + * implement tv out + + -- jun-young kim Thu, 07 Jan 2010 19:42:29 +0900 + +setting (0.1.7-10) unstable; urgency=low + + * implement tv out & brightness + + -- jun-young kim Wed, 06 Jan 2010 20:28:55 +0900 + +setting (0.1.7-9) unstable; urgency=low + + * implement 2 depth menu except memory setting + + -- jun-young kim Wed, 06 Jan 2010 14:56:56 +0900 + +setting (0.1.7-8) unstable; urgency=low + + * implement 2 depth menu + + -- jun-young kim Mon, 04 Jan 2010 20:33:37 +0900 + +setting (0.1.7-7) unstable; urgency=low + + * fixed ELF drawing problem & implement flight mode + + -- jun-young kim Sat, 02 Jan 2010 16:20:21 +0900 + +setting (0.1.7-6) unstable; urgency=low + + * add new menu - menu and widgets + + -- jun-young kim Tue, 29 Dec 2009 22:10:20 +0900 + +setting (0.1.7-5) unstable; urgency=low + + * implement network setting + + -- jun-young kim Tue, 29 Dec 2009 18:54:20 +0900 + +setting (0.1.7-4) unstable; urgency=low + + * implement network setting + + -- jun-young kim Tue, 29 Dec 2009 15:55:54 +0900 + +setting (0.1.7-3) unstable; urgency=low + + * fixed build error + + -- jun-young kim Tue, 29 Dec 2009 14:21:32 +0900 + +setting (0.1.7-2) unstable; urgency=low + + * implement connectivity menu + + -- jun-young kim Tue, 29 Dec 2009 00:49:06 +0900 + +setting (0.1.7-1) unstable; urgency=low + + * implement wall paper + + -- jun-young kim Mon, 28 Dec 2009 23:00:47 +0900 + diff --git a/debian/com.samsung.setting.install.in b/debian/com.samsung.setting.install.in new file mode 100755 index 0000000..31d5d1b --- /dev/null +++ b/debian/com.samsung.setting.install.in @@ -0,0 +1,6 @@ +opt/* +#@PREFIX@/bin/* +# @PREFIX@/res/locale/* +#@PREFIX@/res/icons/* +#@PREFIX@/res/edje/* +#/opt/share/res/applications/* diff --git a/debian/com.samsung.setting.postinst b/debian/com.samsung.setting.postinst new file mode 100755 index 0000000..88ce8e2 --- /dev/null +++ b/debian/com.samsung.setting.postinst @@ -0,0 +1,509 @@ +#!/bin/sh +#This is setting postinst file + +GOPTION="" # Set without -g, -u options +if [ ${USER} == "root" ] +then + # Set vconf values with -g/-u options + GOPTION="-g 6514" +fi + +ECHO="echo" +################# shell paragrames ############## +FLIGHTMODE="flightmode" +NETWORK="network" +USBCON="usbconnectivity" + +SOUND="sounds" +WALLPAPER="wallpaper" +DISPLAY="display" + +MOTIONS="motions" +TILT_ZOOM="tilt_zoom" +TILT_SCROLL="tilt_scroll" +PANNING_MOVE="panning_move" +PANNING_BROWSER="panning_browser" +DOUBLETAP="double_tap" +TURNOVER="turn_over" +SHAKE="shake" +PICKUP_NOTIFIED="pickup_notified" +PICKUP_CALL="pickup_call" + +POWERSAVING="powersaving" +FONT="font" +ROTATIONLOCK="rotationLock" +TIMEDATE="timeAndData" +ACCESS="accessibility" +LANGREGION="language" +VIEWTYPE="viewtype" +TOUCH="touch" +LICENSE="license" + +NOTI="notification" +SECURITY="security" +MEMORY="memory" +ABOUT="about" +MENUWIDGET="menuwidget" +MENUSCREEN="menuscreen" + +resetMenuscreen() +{ + #vconftool $GOPTION set -t string db/setting/menuscreen/selected "com.samsung.cluster-home" + vconftool $GOPTION set -t string db/setting/menuscreen/package_name "com.samsung.menu-screen" +} + +#$ECHO $GOPTION + +#Flightmode +resetFlightmode() +{ + vconftool $GOPTION set -t bool db/setting/flight_mode "0" +} + +#network +resetNetwork() +{ + vconftool $GOPTION set -t int db/setting/select_network "0" + vconftool $GOPTION set -t int db/setting/network_mode "0" + vconftool $GOPTION set -t bool db/setting/3gEnabled "1" + vconftool $GOPTION set -t bool db/setting/data_roaming "1" +} + +#UsbConnectivity +resetUsbConnectivity() +{ + vconftool $GOPTION set -t int memory/setting/usb_mode "-1" -i -f + vconftool $GOPTION set -t int memory/setting/usb_sel_mode "0" -i -f + vconftool $GOPTION set -t int memory/setting/usb_in_mode_change "0" -i -f +} + +#sound profiles +resetSound() +{ + DEFAULT_CALL_TONE="/opt/share/settings/Ringtones/Over the horizon.mp3" + DEFAULT_NOTI_TONE="/opt/share/settings/Alerts/Whistle.mp3" + DEFAULT_MEDIA_TONE="/opt/share/settings/Previews/Over the horizon.mp3" + + vconftool $GOPTION set -t bool db/setting/sound/sound_on "1" + vconftool $GOPTION set -t bool db/setting/sound/vibration_on "1" + + vconftool $GOPTION set -t int db/setting/sound/call/ringtone_sound_volume "13" + vconftool $GOPTION set -t int db/setting/sound/noti/sound_volume "7" + vconftool $GOPTION set -t int db/setting/sound/media/sound_volume "7" + vconftool $GOPTION set -t int db/setting/sound/touch_feedback/sound_volume "5" + + vconftool $GOPTION set -t int db/setting/sound/noti/vibration_level "5" + vconftool $GOPTION set -t int db/setting/sound/touch_feedback/vibration_level "3" + vconftool $GOPTION set -t int db/setting/sound/touch_feedback/vibration_level_bak "3" ##private key + + vconftool $GOPTION set -t string db/setting/sound/call/ringtone_path "${DEFAULT_CALL_TONE}" + vconftool $GOPTION set -t int db/setting/sound/call/vibration_type "2" + + vconftool $GOPTION set -t string db/setting/sound/noti/msg_ringtone_path "${DEFAULT_NOTI_TONE}" + vconftool $GOPTION set -t int db/setting/sound/noti/msg_alert_rep_type "0" + + vconftool $GOPTION set -t string db/setting/sound/noti/email_ringtone_path "${DEFAULT_NOTI_TONE}" + vconftool $GOPTION set -t int db/setting/sound/noti/email_alert_rep_type "0" + + vconftool $GOPTION set -t bool db/setting/sound/sound_lock "1" +} + +#wallpaper +resetWallpaper() +{ + vconftool $GOPTION set -t string db/menu_widget/bgset "/opt/share/settings/Wallpapers/Home_default.jpg" + vconftool $GOPTION set -t string db/idle_lock/bgset "/opt/share/settings/Wallpapers/Home_default.jpg" +} + +#motions +resetTiltZoom() +{ + vconftool $GOPTION set -t bool db/setting/use_tilt "1" + vconftool $GOPTION set -t int db/setting/tilt_sensitivity "3" +} +resetTiltScroll() +{ + vconftool $GOPTION set -t bool db/setting/use_tilt_scroll "1" + vconftool $GOPTION set -t int db/setting/tilt_scroll_sensitivity "3" +} + +resetPanningMove() +{ + vconftool $GOPTION set -t bool db/setting/use_panning "1" + vconftool $GOPTION set -t int db/setting/panning_sensitivity "3" +} +resetPanningBrowser() +{ + vconftool $GOPTION set -t bool db/setting/use_panning_browser "1" + vconftool $GOPTION set -t int db/setting/panning_browser_sensitivity "3" +} +resetDoubleTap() +{ + vconftool $GOPTION set -t bool db/setting/use_double_tap "1" +} + +resetShake() +{ + vconftool $GOPTION set -t bool db/setting/use_shake "1" +} +resetPickupNotified() +{ + vconftool $GOPTION set -t bool db/setting/use_pick_up "1" +} +resetPickupCall() +{ + vconftool $GOPTION set -t bool db/setting/use_pick_up_call "1" +} + +resetTurnOver() +{ + vconftool $GOPTION set -t bool db/setting/use_turn_over "1" +} + +resetMotions() +{ + vconftool $GOPTION set -t bool db/setting/motion_active "1" + vconftool $GOPTION set -t bool db/setting/motion/palm_swipe_capture "1" + vconftool $GOPTION set -t bool db/setting/motion/palm_touch_mute "1" + + resetTiltZoom + resetTiltScroll + resetPanningMove + resetPanningBrowser + resetDoubleTap + resetTurnOver + resetShake + resetPickupNotified + resetPickupCall +} + +#display and light +resetDisplay() +{ + #backlight + vconftool $GOPTION set -t int db/setting/lcd_backlight_normal "30" + #vconftool $GOPTION set -t int db/setting/lcd_timeout_normal_backup "30" + + #brightness + vconftool $GOPTION set -t int db/setting/Brightness "-1" + vconftool $GOPTION set -t int db/setting/brightness_automatic "0" + + #battery + vconftool $GOPTION set -t bool db/setting/battery_percentage "0" + #launch + #vconftool $GOPTION set -t string db/menu_widget/launch_effect "0" +} + +resetPowersaving() +{ + vconftool $GOPTION set -t bool db/setting/pwrsv/system_mode/status "1" + vconftool $GOPTION set -t bool db/setting/pwrsv/system_mode/reminder "1" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/status "0" + + vconftool $GOPTION set -t int db/setting/pwrsv/custom_mode/at "30" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/wifi "1" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/bt "1" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/gps "1" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/data_sync "1" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/hotspot "1" + + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/brt/status "1" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/brt/auto/status "0" + vconftool $GOPTION set -t int db/setting/pwrsv/custom_mode/brt/value "10" + vconftool $GOPTION set -t int db/setting/pwrsv/custom_mode/backlight/time "15" + + #v0.4 + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/cpu "0" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/display "0" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/bg_color "0" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/screen_vib "0" +} + +#font +resetFont() +{ + vconftool $GOPTION set -t int db/setting/font_size "1" + vconftool $GOPTION set -t int db/setting/font_type "0" +} + +#RotationLock +resetRotationLock() +{ + vconftool $GOPTION set -t bool db/setting/rotate_lock "1" +} + +#time and date (zone) +resetTimeAndData() +{ + vconftool $GOPTION set -t bool db/setting/automatic_time_update "1" + + vconftool $GOPTION set -t int db/menu_widget/regionformat_time1224 "1" + vconftool $GOPTION set -t int db/setting/date_format "0" + vconftool $GOPTION set -t int db/setting/weekofday_format "0" + + vconftool $GOPTION set -t string db/setting/timezone "+9" + # to be removed + vconftool $GOPTION set -t string db/setting/cityname_id "IDS_WCL_BODY_CITYNAME_SEOUL" + + vconftool $GOPTION set -t string db/setting/timezone_id "Asia/Seoul" + + #if [ -f /opt/etc/localtime ] + #then + rm -f /opt/etc/localtime + ln -s /usr/share/zoneinfo/Asia/Seoul /opt/etc/localtime + #fi +} + +#accessibility +resetAccessibility() +{ + vconftool $GOPTION set -t bool db/setting/accessibility/accessibility "0" + vconftool $GOPTION set -t bool db/setting/accessibility/high_contrast "0" + vconftool $GOPTION set -t bool db/setting/accessibility/screen_zoom "1" + vconftool $GOPTION set -t int db/setting/accessibility/font_size "1" + #vconftool $GOPTION set -t int db/setting/accessibility/font_style "0" + vconftool $GOPTION set -t bool db/setting/accessibility/torch_light "0" + vconftool $GOPTION set -t bool db/setting/accessibility/mono_audio "0" + vconftool $GOPTION set -t int db/setting/accessibility/power_key_hold "1" + vconftool $GOPTION set -t bool db/setting/accessibility/led_notify "0" + + vconftool $GOPTION set -t bool db/ciss/call_answering_key "0" + vconftool $GOPTION set -t bool db/ciss/call_power_key_ends_call "0" + vconftool $GOPTION set -t int db/ciss/answering_mode "0" + vconftool $GOPTION set -t int db/ciss/answering_mode_time "3" + + vconftool $GOPTION set -t bool db/setting/accessibility/accept_call "0" + vconftool $GOPTION set -t bool db/setting/accessibility/enable_auto_answer "0" + vconftool $GOPTION set -t int db/setting/accessibility/auto_answer "1" + vconftool $GOPTION set -t bool db/setting/accessibility/powerkey_end_calls "0" + +} + +#language & region +resetLanguageAndRegion() +{ + vconftool $GOPTION set -t int db/setting/lang "2" + vconftool $GOPTION set -t string db/menu_widget/language "en_US.UTF-8" + vconftool $GOPTION set -t string db/menu_widget/regionformat "en_US.UTF-8" +} + +#viewtype +#resetViewtype() +#{ + #vconftool $GOPTION set -t int db/menuscreen/viewtype "0" + #vconftool $GOPTION set -t int db/taskswitcher/viewtype "0" +#} + +#License +resetLicense() +{ + vconftool $GOPTION set -t bool db/setting/transaction_tracking "0" + vconftool $GOPTION set -t bool db/setting/expiry_reminder "0" + vconftool $GOPTION set -t int db/setting/roaming_network "0" +} + +#Ticker notification +resetNotification() +{ + vconftool $GOPTION set -t bool db/setting/ticker_noti/messages "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/email "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/im "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/twitter "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/facebook "1" + + # display content + vconftool $GOPTION set -t bool db/setting/ticker_noti/display_content/messages "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/display_content/email "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/display_content/im "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/display_content/twitter "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/display_content/facebook "1" + + vconftool $GOPTION set -t bool db/setting/ticker_noti/badge/messages "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/badge/email "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/badge/im "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/badge/twitter "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/badge/facebook "1" +} + +#security +resetSecurity() +{ + rm -rf /opt/data/setting/set_info + + vconftool $GOPTION set -t bool db/setting/power_on_lock "0" + vconftool $GOPTION set -t bool db/setting/simple_password "1" + vconftool $GOPTION set -t bool db/setting/fmm/sim_change_alert "0" + vconftool $GOPTION set -t string db/setting/fmm/recipients "" + vconftool $GOPTION set -t string db/setting/fmm/sender "" + vconftool $GOPTION set -t string db/setting/fmm/alert_message "" + vconftool $GOPTION set -t bool db/setting/fmm/remote_control "0" + vconftool $GOPTION set -t bool db/setting/fmm/location_consent "0" + + # NOT USED NOW. + #vconftool $GOPTION set -t bool db/setting/rcs "0" + + vconftool $GOPTION set -t int db/setting/phone_lock_attempts_left "5" + vconftool $GOPTION set -t string db/setting/phone_lock_timestamp "" + vconftool $GOPTION set -t int db/setting/sim_lock_attempts_left "5" + vconftool $GOPTION set -t string db/setting/sim_lock_timestamp "" + + vconftool $GOPTION set -t bool db/setting/fixed_dialing_mode "0" +} + +#Memory +resetMemory() +{ + vconftool $GOPTION set -t int db/setting/default_memory/wap "0" + vconftool $GOPTION set -t int db/setting/default_memory/bluetooth "0" + vconftool $GOPTION set -t int db/setting/default_memory/camera "0" + vconftool $GOPTION set -t int db/setting/default_memory/voice_recorder "0" + vconftool $GOPTION set -t int db/setting/default_memory/fm_radio "0" + vconftool $GOPTION set -t int db/setting/default_memory/all_share "0" + vconftool $GOPTION set -t int db/setting/default_memory/adobe_air "0" + vconftool $GOPTION set -t int db/setting/default_memory/dvb_h "0" + + # format - system server + #vconftool $GOPTION -i set -t int memory/mmc/format "0" +} + +#about +resetAbout() +{ + vconftool $GOPTION set -t string db/setting/device_name "Redwood" +} + +########## invoke functions ####### + +if [ $1 == $FLIGHTMODE ]; then + resetFlightmode + +elif [ $1 == $NETWORK ]; then + resetNetwork + +elif [ $1 == $USBCON ]; then + resetUsbConnectivity + +elif [ $1 == $SOUND ]; then + resetSound + +elif [ $1 == $WALLPAPER ]; then + resetWallpaper + +elif [ $1 == $DISPLAY ]; then + resetDisplay + +elif [ $1 == $MOTIONS ]; then + resetMotions + +elif [ $1 == $TILT_ZOOM ]; then + resetTiltZoom + +elif [ $1 == $TILT_SCROLL ]; then + resetTiltScroll + +elif [ $1 == $PANNING_MOVE ]; then + resetPanningMove + +elif [ $1 == $PANNING_BROWSER ]; then + resetPanningBrowser + +elif [ $1 == $DOUBLETAP ]; then + resetDoubleTap + +elif [ $1 == $SHAKE ]; then + resetShake + +elif [ $1 == $PICKUP_NOTIFIED ]; then + resetPickupNotified + +elif [ $1 == $PICKUP_CALL ]; then + resetPickupCall + +elif [ $1 == $TURNOVER ]; then + resetTurnOver + +elif [ $1 == $FONT ]; then + resetFont + +elif [ $1 == $POWERSAVING ]; then + resetPowersaving + +elif [ $1 == $ROTATIONLOCK ]; then + resetRotationLock + +elif [ $1 == $TIMEDATE ]; then + resetTimeAndData + +elif [ $1 == $ACCESS ]; then + resetAccessibility + +elif [ $1 == $LANGREGION ]; then + resetLanguageAndRegion + +#elif [ $1 == $VIEWTYPE ]; then +# resetViewtype + +elif [ $1 == $LICENSE ]; then + resetLicense + +elif [ $1 == $NOTI ]; then + resetNotification + +elif [ $1 == $SECURITY ]; then + resetSecurity + +elif [ $1 == $MEMORY ]; then + resetMemory + +elif [ $1 == $ABOUT ]; then + resetAbout + +elif [ $1 == $MENUSCREEN ]; then + resetMenuscreen +else + resetFlightmode + resetNetwork + resetUsbConnectivity + resetSound + resetWallpaper + resetMotions + resetDisplay + resetPowersaving + resetFont + resetRotationLock + resetTimeAndData + resetAccessibility + resetLanguageAndRegion +# resetViewtype + resetLicense + resetNotification + resetSecurity + resetMemory + resetAbout + resetMenuscreen + + vconftool $GOPTION -i set -t int memory/setting/font_changed "0" + #vconftool $GOPTION -i set -t int memory/mobile_hotspot/skin_changed "0" +fi + +########## ending ####### + + +#create directory /opt/data/setting +if [ "${USER}" == "root" ] +then + if [ ! -d /opt/data/setting ] + then + mkdir -p /opt/data/setting + fi + +# if [ -f /opt/data/setting/setting.cfg ] +# then +# rm -rf /opt/data/setting/setting.cfg +# fi + chown 5000:5000 /opt/data/setting -R +fi + +#heynotitool set setting_time_changed -a +sync + diff --git a/debian/compat b/debian/compat new file mode 100755 index 0000000..7ed6ff8 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +5 diff --git a/debian/control b/debian/control new file mode 100755 index 0000000..a90b5ca --- /dev/null +++ b/debian/control @@ -0,0 +1,20 @@ +Source: setting +Section: misc +Priority: extra +Maintainer: Taesoo Jun , MyoungJune Park , Hyejin Kim , Taeyoung Kim +Uploaders: Taesoo Jun , MyoungJune Park , Hyejin Kim , Taeyoung Kim +Build-Depends: debhelper (>= 5), autotools-dev, libappcore-common-dev, libappcore-efl-dev, libelm-dev, libui-idlecapture-dev, libslp-setting-dev, libslp-tapi-dev, libslp-utilx-dev, libdevman-dev, libdevman-haptic-dev, libsvi-dev, capi-media-sound-manager-dev, libcontacts-service-dev, libslp-msg-service-dev, iniparser-dev, libslp-memo-dev, libslp-calendar-dev, libheynoti-dev, libslp-sysman, libslp-sysman-dev, libui-gadget-dev, libbundle-dev, libjson-glib-dev, dlog-dev, libaul-1-dev, libslp-pm-dev, libecore-dev, libeina-dev, libicu-dev, libail-0-dev, libnetwork-dev, capi-media-player-dev, drm-trusted-dev, drm-client-dev, libsvi-dev, libsecurity-server-client-dev, libmdm-dev, libelm-webview-dev, libbluetooth-frwk-dev, libappsvc-dev, libpango1.0-dev, capi-system-device-dev, capi-appfw-application-dev libcairo2-dev, libnotification-dev +Standards-Version: 0.1.0 + +Package: com.samsung.setting +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, libicu +Description: Setting application + Setting application + +Package: com.samsung.setting-dbg +Architecture: any +Depends: ${misc:Depends}, libicu +Description: Setting application debug package (unstripped) + Setting application debug package + diff --git a/debian/copyright b/debian/copyright new file mode 100755 index 0000000..6948dad --- /dev/null +++ b/debian/copyright @@ -0,0 +1,8 @@ +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + +This program is free software; you can redistribute it and/or modify +it under the terms of the Apache License version 2.0. + +The full text of the Apache 2.0 can be found in +/usr/share/common-licenses. + diff --git a/debian/dirs b/debian/dirs new file mode 100755 index 0000000..ca882bb --- /dev/null +++ b/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/sbin diff --git a/debian/docs b/debian/docs new file mode 100755 index 0000000..a0f0008 --- /dev/null +++ b/debian/docs @@ -0,0 +1 @@ +CMakeLists.txt diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..7b939ae --- /dev/null +++ b/debian/rules @@ -0,0 +1,136 @@ +#!/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 +CXXFLAGS += -Wall -g +LDFLAGS ?= +PREFIX ?= /opt/apps/com.samsung.setting +RESDIR ?= /opt/apps/com.samsung.setting/res +DATADIR ?= /opt/apps/com.samsung.setting/data + +# Reduce relative text symbols in library +CFLAGS += -fPIC +CXXFLAGS += -fPIC + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 + CXXFLAGS += -O0 +else + CFLAGS += -O2 + CXXFLAGS += -O2 +endif + +LDFLAGS += -Wl,--rpath,$(PREFIX)/lib -Wl,--hash-style=both -Wl,--as-needed + +CMAKE_TMP_DIR = $(CURDIR)/cmake_tmp + + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + mkdir -p $(CMAKE_TMP_DIR); + cd $(CMAKE_TMP_DIR); CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" cmake .. -DCMAKE_INSTALL_PREFIX=/opt/apps/com.samsung.setting + + touch configure-stamp + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + cd $(CMAKE_TMP_DIR) && $(MAKE) + #docbook-to-man debian/wavplayer.sgml > wavplayer.1 + + 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#@PREFIX@#$(RESDIR)#g" $${f%.in}; \ + sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \ + done + + + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + -cd $(CMAKE_TMP_DIR) && $(MAKE) clean + rm -rf $(CMAKE_TMP_DIR) + find . -name CMakeFiles | xargs rm -rf + find . -name *.so | xargs rm -rf + find . -name *.o | xargs rm -rf + find . -name Makefile | xargs rm -rf + find . -name cmake_install.cmake | xargs rm -rf + find . -name CMakeCache.txt | xargs rm -rf + find . -name CMakeFiles.txt | xargs rm -rf + rm -rf Makefile + rm -rf install_manifest.txt + rm -rf com.samsung.setting.desktop + rm -rf *.so + + for f in `find $(CURDIR)/debian/ -name "*.in"`; do \ + rm -f $${f%.in}; \ + done + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/wavplayer. + cd $(CMAKE_TMP_DIR) && $(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_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_python +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link +# dh_strip + dh_strip --dbg-package=com.samsung.setting-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/doxygen.conf b/doxygen.conf new file mode 100644 index 0000000..0c8ee36 --- /dev/null +++ b/doxygen.conf @@ -0,0 +1,1720 @@ +# Doxyfile 1.7.4 + + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" "). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = Setting + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer +# a quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify an logo or icon that is +# included in the documentation. The maximum height of the logo should not +# exceed 55 pixels and the maximum width should not exceed 200 pixels. +# Doxygen will copy the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful if your file system +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this +# tag. The format is ext=language, where ext is a file extension, and language +# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, +# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions +# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also makes the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and +# unions are shown inside the group in which they are included (e.g. using +# @ingroup) instead of on a separate page (for HTML and Man pages) or +# section (for LaTeX and RTF). + +INLINE_GROUPED_CLASSES = NO + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penalty. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will roughly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = YES + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespaces are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen +# will sort the (brief and detailed) documentation of class members so that +# constructors and destructors are listed first. If set to NO (the default) +# the constructors will appear in the respective orders defined by +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to +# do proper type resolution of all parameters of a function it will reject a +# match between the prototype and the implementation of a member function even +# if there is only one candidate or it is obvious which candidate to choose +# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen +# will still accept a match between prototype and implementation in such cases. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or macro consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and macros in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. The create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. +# You can optionally specify a file name after the option, if omitted +# DoxygenLayout.xml will be used as the name of the layout file. + +LAYOUT_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# The WARN_NO_PARAMDOC option can be enabled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = + + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh +# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py +# *.f90 *.f *.for *.vhd *.vhdl + +FILE_PATTERNS = *.txt *.c *.cpp *.h + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = ./sandbox + + + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty or if +# non of the patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) +# and it is also possible to disable source filtering for a specific pattern +# using *.ext= (so without naming a filter). This option only has effect when +# FILTER_SOURCE_FILES is enabled. + +FILTER_SOURCE_PATTERNS = + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = ../setting-doxygen + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. Note that when using a custom header you are responsible +# for the proper inclusion of any scripts and style sheets that doxygen +# needs, which is dependent on the configuration options used. +# It is adviced to generate a default header using "doxygen -w html +# header.html footer.html stylesheet.css YourConfigFile" and then modify +# that header. Note that the header is subject to change so you typically +# have to redo this when upgrading to a newer version of doxygen or when changing the value of configuration settings such as GENERATE_TREEVIEW! + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that +# the files will be copied as-is; there are no commands or markers available. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. +# Doxygen will adjust the colors in the stylesheet and background images +# according to this color. Hue is specified as an angle on a colorwheel, +# see http://en.wikipedia.org/wiki/Hue for more information. +# For instance the value 0 represents red, 60 is yellow, 120 is green, +# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. +# The allowed range is 0 to 359. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of +# the colors in the HTML output. For a value of 0 the output will use +# grayscales only. A value of 255 will produce the most vivid colors. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to +# the luminance component of the colors in the HTML output. Values below +# 100 gradually make the output lighter, whereas values above 100 make +# the output darker. The value divided by 100 is the actual gamma applied, +# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, +# and 100 does not change the gamma. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = YES + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated +# that can be used as input for Qt's qhelpgenerator to generate a +# Qt Compressed Help (.qch) of the generated HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to +# add. For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see +# +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's +# filter section matches. +# +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before +# the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values +# (range [0,1..20]) that doxygen will group on one line in the generated HTML +# documentation. Note that a value of 0 will completely suppress the enum +# values from appearing in the overview section. + +ENUM_VALUES_PER_LINE = 4 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open +# links to external symbols imported via tag files in a separate window. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are +# not supported properly for IE 6.0, but are supported on all modern browsers. +# Note that when changing this option you need to delete any form_*.png files +# in the HTML output before the changes have effect. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax +# (see http://www.mathjax.org) which uses client side Javascript for the +# rendering instead of using prerendered bitmaps. Use this if you do not +# have LaTeX installed or if you want to formulas look prettier in the HTML +# output. When enabled you also need to install MathJax separately and +# configure the path to it using the MATHJAX_RELPATH option. + +USE_MATHJAX = NO + +# When MathJax is enabled you need to specify the location relative to the +# HTML output directory using the MATHJAX_RELPATH option. The destination +# directory should contain the MathJax.js script. For instance, if the mathjax +# directory is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the +# mathjax.org site, so you can quickly see the result without installing +# MathJax, but it is strongly recommended to install a local copy of MathJax +# before deployment. + +MATHJAX_RELPATH = http://www.mathjax.org/mathjax + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets +# (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = YES + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a PHP enabled web server instead of at the web client +# using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server +# based approach is that it scales better to large projects and allows +# full text search. The disadvantages are that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4 + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for +# the generated latex document. The footer should contain everything after +# the last chapter. If it is left blank doxygen will generate a +# standard footer. Notice: only use this tag if you know what you are doing! + +LATEX_FOOTER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include +# source code with syntax highlighting in the LaTeX output. +# Note that which sources are shown also depends on other settings +# such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# pointed to by INCLUDE_PATH will be searched when a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition that +# overrules the definition found in the source code. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all references to function-like macros +# that are alone on a line, have an all uppercase name, and do not end with a +# semicolon, because these will confuse the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option also works with HAVE_DOT disabled, but it is recommended to +# install and use dot, since it yields more powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = YES + +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is +# allowed to run in parallel. When set to 0 (the default) doxygen will +# base this on the number of processors available in the system. You can set it +# explicitly to a value larger than 0 to get control over the balance +# between CPU load and processing speed. + +DOT_NUM_THREADS = 0 + +# By default doxygen will write a font called Helvetica to the output +# directory and reference it in all dot files that doxygen generates. +# When you want a differently looking font you can specify the font name +# using DOT_FONTNAME. You need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = Helvetica + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = YES + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = YES + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will generate a graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are svg, png, jpg, or gif. +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = /usr/bin/dot + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MSCFILE_DIRS tag can be used to specify one or more directories that +# contain msc files that are included in the documentation (see the +# \mscfile command). + +MSCFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = YES + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES diff --git a/gdbinfo.txt b/gdbinfo.txt new file mode 100644 index 0000000..b4077f2 --- /dev/null +++ b/gdbinfo.txt @@ -0,0 +1,17 @@ +directory ./src +directory ./setting-profile/src +directory ./setting-about/src +directory ./setting-common/src +directory ./setting-connectivity/src +directory ./setting-display/src +directory ./setting-font/src +directory ./setting-memory/src +directory ./setting-network/src +directory ./setting-password/src +directory ./setting-phone/src +directory ./setting-profile/src +directory ./setting-reset/src +directory ./setting-security/src +directory ./setting-time/src +directory ./setting-menuscreen/src + diff --git a/include/setting-debug.h b/include/setting-debug.h new file mode 100755 index 0000000..6e46eb1 --- /dev/null +++ b/include/setting-debug.h @@ -0,0 +1,251 @@ +/* + * setting + * Copyright (c) 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://floralicense.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. + */ +/** + * @defgroup setting-debug + * setting debug utility + */ + +#ifndef _SETTING_DEBUG_H_ +#define _SETTING_DEBUG_H_ +#include + +/*#define MTRACE_ENABLED*/ + +#define DISABLED_CODE 0 + +//#define DEBUG_CODE + +#define SETTING_USING_PLATFORM_DBG +#ifdef SETTING_USING_PLATFORM_DBG +#include +#ifdef LOG_TAG +#undef LOG_TAG +#endif + + +#define LOG_TAG "SETTING" +#endif + + +#if !defined(LOCALEDIR) +#define LOCALEDIR "/usr/apps/org.tizen.setting/res/locale" +#endif + +#if !defined(EDJDIR) +#define EDJDIR "/usr/apps/org.tizen.setting/res/edje" +#endif + +#define SUPPORT_BOTTOM_BTNS 1 +#define REMOVE_BACK_BUTTON_MAIN 0 +#define SUPPORT_GL_ENGINE 1 + + +/*macros to control program flow*/ +#define SUPPORT_MORE_ITEM_FUNCTION 1 + +// #define SUPPORT_MDM + +/*##menu options##*/ +#define SUPPORT_AllShare_Memory 0 +#define SUPPORT_FMradio 1 +#define SUPPORT_FONT 1 +#define SUPPORT_MENUSCREEN 1 +#define SUPPORT_WALLPAPER 1 +#define SUPPOR_SEPARATE_BRIGHTNESS 1 + +#define SUPPORT_RCS_FOR_DEMO 0 +#define SUPPORT_ACCESSIBILITY 1 +#define SUPPORT_CERTIFICATES 0 +#define SUPPORT_MOTIONS 1 +#define SUPPORT_POWERSAVING 1 +#define SUPPORT_RUN_SYSTEM_COMMAND 0 +#define SUPPORT_STORAGE 1 +#define SUPPORT_WIFI_DIRECT 1 +#define SUPPORT_DATA_USAGE 0 +#define SUPPORT_SECURITY 0 +#define SUPPORT_WEB_APPLICATION 0 + +/*#endif*/ + +#define SUPPORT_APP_ROATION 1 +#define SUPPORT_LCD_TIMEOUT_KEEPING 0 +#define USE_DEVICE_SET_DISPLAY_BRT 1 + +#define LOW_BATTERY_DO_NOTHING 1 /**< 1 : turn the low batter handlding off */ + +#define APPLIED_BACK_KEY_UG 0 + +#define APPLIED_DATATIME_FIRSTDAY_WEEK 0 +#define SUPPORT_DATEFIELD_DATE_FORMAT_AUTOSET 0 + +#define SUPPORT_FDN 0 +#define SUPPORT_PARENTAL_MODE 0 + +#define SETTING_ENABLE_TRACE + +#ifdef SETTING_ENABLE_TRACE + #ifdef SETTING_USING_PLATFORM_DBG + #define SETTING_TRACE_DEBUG(fmt, arg...) \ + do {\ + LOGD("\n\033[0;32mDEBUG: " fmt "\033[0m\t%s:%d\n", \ + ##arg, (char*)(strrchr(__FILE__, '/')+1), __LINE__);\ + }while(0); + + #define SETTING_TRACE(fmt, arg...) \ + do {\ + LOGI("\n\033[0;36m" fmt "\033[0m\t%s:%d\n", \ + ##arg, (char*)(strrchr(__FILE__, '/')+1), __LINE__);\ + }while(0); + + #define SETTING_TRACE_WARNING(fmt, arg...) \ + do {\ + LOGW("\033[0;33mWARRING: " fmt "\033[0m\t%s:%d\n", ##arg, (char*)(strrchr(__FILE__, '/')+1), __LINE__);\ + }while(0); + + #define SETTING_TRACE_ERROR(fmt, arg...) \ + do {\ + LOGE("\033[0;31mERROR: " fmt "\033[0m\t%s:%d\n", ##arg, (char*)(strrchr(__FILE__, '/')+1), __LINE__);\ + }while(0); + #define SETTING_TRACE_BEGIN do {\ + {\ + LOGD("\n\033[0;35mENTER FUNCTION: %s. \033[0m\t%s:%d\n", \ + __FUNCTION__, (char*)(strrchr(__FILE__, '/')+1), __LINE__);\ + }\ + }while(0); + + #define SETTING_TRACE_END do {\ + {\ + LOGD("\n\033[0;35mEXIT FUNCTION: %s. \033[0m\t%s:%d\n", \ + __FUNCTION__, (char*)(strrchr(__FILE__, '/')+1), __LINE__);\ + }\ + }while(0); + #else + #define SETTING_TRACE(fmt, arg...) \ + do {\ + printf("\n[SETTING]\033[0;36m" fmt "\033[0m\t%s:%d\n", \ + ##arg, (char*)(strrchr(__FILE__, '/')+1), __LINE__);\ + }while(0); + + + #define SETTING_TRACE_DEBUG(fmt, arg...) \ + do {\ + printf("\n[SETTING]\033[0;32mDEBUG: " fmt "\033[0m\t%s:%d\n", \ + ##arg, (char*)(strrchr(__FILE__, '/')+1), __LINE__);\ + }while(0); + + #define SETTING_TRACE_WARNING(fmt, arg...) \ + do {\ + {\ + printf("[SETTING]\033[0;33mWARRING: " fmt "\033[0m\t%s:%d\n", ##arg, (char*)(strrchr(__FILE__, '/')+1), __LINE__);}\ + }while(0); + + #define SETTING_TRACE_ERROR(fmt, arg...) \ + do {\ + {fprintf(stderr, "[SETTING]\033[0;31mERROR: " fmt "\033[0m\t%s:%d\n", ##arg, (char*)(strrchr(__FILE__, '/')+1), __LINE__);}\ + }while(0); + + #define SETTING_TRACE_BEGIN do {\ + {\ + printf("\n[SETTING]\033[0;35mENTER FUNCTION: %s. \033[0m\t%s:%d\n", \ + __FUNCTION__, (char*)(strrchr(__FILE__, '/')+1), __LINE__);\ + }\ + }while(0); + + #define SETTING_TRACE_END do {\ + {\ + printf("\n[SETTING]\033[0;35mEXIT FUNCTION: %s. \033[0m\t%s:%d\n", \ + __FUNCTION__, (char*)(strrchr(__FILE__, '/')+1), __LINE__);\ + }\ + }while(0); + #endif +#else + #define SETTING_TRACE(fmt, arg...) + #define SETTING_TRACE_DEBUG(fmt, arg...) + #define SETTING_TRACE_WARNING(fmt, arg...) + #define SETTING_TRACE_ERROR(fmt, arg...) + #define SETTING_TRACE_BEGIN + #define SETTING_TRACE_END +#endif + +#define setting_retvm_if(expr, val, fmt, arg...) do { \ + if(expr) { \ + SETTING_TRACE_ERROR(fmt, ##arg); \ + return (val); \ + } \ + } while (0); + +#define setting_retm_if(expr, fmt, arg...) do { \ + if(expr) { \ + SETTING_TRACE_ERROR(fmt, ##arg); \ + return; \ + } \ + } while (0); + +#ifndef retm_if +#define retm_if setting_retm_if +#endif +#ifndef retvm_if +#define retvm_if setting_retvm_if +#endif + +#ifndef retv_if +#define retv_if(expr, val) do { \ + if(expr) { \ + return (val); \ + } \ +} while (0) +#endif +#ifndef ret_if +#define ret_if(expr) do { \ + if(expr) { \ + return ; \ + } \ +} while (0) +#endif + +#define __FREE(del, arg) do { \ + if(arg) { \ + del((void *)(arg)); /*cast any argument to (void*) to avoid build warring*/\ + arg = NULL; \ + } \ + } while (0); +#define FREE(arg) __FREE(free, arg) +#define G_FREE(arg) __FREE(g_free, arg) + + +////// +//a trick:To manager back pointer. eg, +//For using genlist, whenever Setting side and Genlist side both keep pointers +//to a same block memory(here is genlis item data via calloc), must use __BACK_POINTER_SET to +//bind the Setting side point into the Genlist side pointer +#define __BACK_POINTER_SET(pData) do { \ + if (pData)\ + {\ + pData->pBack = (void **)(&(pData));\ + }\ + } while (0); + +#define __BACK_POINTER_UNSET(pData) do { \ + if (pData && pData->pBack)/*release Setting side poniter handlers*/\ + {\ + *(pData->pBack) = NULL;\ + }\ + } while (0); + + +#endif /* _SETTING_DEBUG_H_ */ + diff --git a/include/setting-main.h b/include/setting-main.h new file mode 100755 index 0000000..8d47223 --- /dev/null +++ b/include/setting-main.h @@ -0,0 +1,83 @@ +/* + * setting + * Copyright (c) 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://floralicense.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. + */ +/** + *@defgroup setting-main + *main page displaying list view at launch. + */ +#ifndef __SETTING_MAIN_H__ +#define __SETTING_MAIN_H__ +#include + +void setting_update_gl_item(void* data); + +void setting_main_list_mouse_up_cb(void *data, Evas_Object *eo, + void *event_info); + +void setting_main_sel_list_mouse_up_cb(void *data, Evas_Object *eo, + void *event_info); + +void setting_main_click_list_item_reset_data(void *data, + Evas_Object *obj); + +void setting_main_click_list_default_ug_cb(void *data, Evas_Object *obj, + void *event_info); + +void setting_main_click_list_ex_ug_cb(void *data, Evas_Object *obj, + void *event_info); +void +setting_main_click_list_plugin_cb(void *data, Evas_Object *obj, + void *event_info); +void setting_main_click_list_more_cb(void *data, Evas_Object *obj, void *event_info); + +void setting_main_click_list_usb_cb(void *data, Evas_Object *obj, + void *event_info); + +void setting_main_click_list_flight_mode_cb(void *data, + Evas_Object *obj, + void *event_info); + +void setting_main_click_list_wifi_mode_cb(void *data, + Evas_Object *obj, + void *event_info); + +void setting_main_click_list_bt_mode_cb(void *data, + Evas_Object *obj, + void *event_info); + +void setting_main_click_list_nfc_mode_cb(void *data, + Evas_Object *obj, + void *event_info); + +void setting_main_click_list_network_ug_cb(void *data, Evas_Object *obj, + void *event_info); + +void setting_try_save_check_list(void *data); + +void setting_main_click_edit_preferred_cb(void *data, Evas_Object *obj, + void *event_info); + +void setting_main_click_list_item_ug_cb(void *data, Evas_Object *obj, + char *ug_to_load, service_h svc, + struct ug_cbs *cbs); + +void setting_main_destroy_ug_cb(ui_gadget_h ug, void *priv); +void setting_main_result_ug_cb(ui_gadget_h ug, service_h service, + void *priv); +void setting_main_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode, + void *priv); + +#endif /* __SETTING_MAIN_H__ */ diff --git a/include/setting-more-menu.h b/include/setting-more-menu.h new file mode 100755 index 0000000..b14d257 --- /dev/null +++ b/include/setting-more-menu.h @@ -0,0 +1,26 @@ +/* + * setting + * Copyright (c) %{The first year of authorship} 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://floralicense.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 __SETTING_MORE_MENU_H__ +#define __SETTING_MORE_MENU_H__ + +#include + +static void setting_more_menu_click_softkey_cancel_cb(void *data, + Evas_Object *obj, + void *event_info); + +#endif /* __SETTING_MORE_MENU_H__ */ diff --git a/include/setting-plugin.h b/include/setting-plugin.h new file mode 100755 index 0000000..159b2c4 --- /dev/null +++ b/include/setting-plugin.h @@ -0,0 +1,77 @@ +#ifndef _SETTING_PLUGIN_H_ +#define _SETTING_PLUGIN_H_ + +#include +#include +#include + +#include +#include + +#ifndef bool +#define bool int +#define TRUE 1 +#define FALSE 0 +#endif + +#if 1 +#define PLUGIN_INIT( context ) \ +{\ + setting_drawer_list_init();\ + setting_dbus_handler_init( context );\ +} +#define PLUGIN_FINI \ +{\ + setting_dbus_handler_fini();\ + setting_drawer_list_fini();\ +} +#else + +#define PLUGIN_INIT +#define PLUGIN_FINI + +#endif + +extern int setting_dbus_handler_init(void* data); +extern int setting_dbus_handler_fini(void); +extern void setting_drawer_list_init(); +extern void setting_drawer_list_fini(); + +typedef void* (*drawer_fp)(void *data, xmlNode *xmlObj); + +// draw handler +typedef struct +{ + const char* type; // ui type + drawer_fp draw; +} Object_Drawer; + +// draw handler +typedef struct +{ + xmlDocPtr doc; + xmlNode *root; + + const char *cfg_file; + //Evas_Object *win_get; + Evas_Object *ly_main; + Evas_Object *scroller; + Evas_Object *navi_bar; +} Draw_Data; + +typedef struct PluginNode PluginNode; + + +struct PluginNode +{ + char* plugin_path; + Draw_Data *pd; + Eina_Hash *ui_list; // UI element to be udpated +}; + +extern PluginNode* setting_plugin_create(); +extern bool setting_plugin_load(PluginNode* context, const char *cfg_file); +extern void setting_plugin_destroy(PluginNode* node); + +#endif //_SETTING_PLUGIN_H_ + diff --git a/include/setting.h b/include/setting.h new file mode 100755 index 0000000..de33df0 --- /dev/null +++ b/include/setting.h @@ -0,0 +1,192 @@ +/* + * setting + * Copyright (c) 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://floralicense.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. + */ +/** + *@defgroup setting-app + *entry point of Setting application + */ +#ifndef __SETTING_H__ +#define __SETTING_H__ + +#include + +#include +#include + +/* TAPI*/ +#include +#include + +#include + +#define EDIT_PREFERRED_STR "IDS_ST_BUTTON2_EDIT_PREFERRED" +//#define PREFERRED_STR "IDS_ST_TAB_PREFERRED" +#define PREFERRED_STR "IDS_ST_BODY_FREQUENTLY_USED" +#define ALL_STR "IDS_ST_OPT_ALL" +#define SETTING_MAX_PID_LEN 128 + +#define NO_UG_FOUND_MSG _("Unsupported menu") +#define USB_NEED_OFF "Please turn USB tethering off first in Mobile hotspot" + +#define SETTING_NFC_DESC "IDS_ST_BODY_ALLOW_DATA_EXCHANGE_WHEN_DEVICE_TOUCHES_ANOTHER_DEVICE" +#define SETTING_WIFI_DIRECT_DESC "IDS_ST_BODY_SET_UP_PEER_TO_PEER_CONNECTIVITY_ABB" + +/** +* @brief +*/ +typedef enum _setting_view_type { + SETTING_VIEW_MAIN = 0, + SETTING_VIEW_CONNECTIVE_MORE, + SETTING_VIEW_SYSTEM_MORE, + SETTING_VIEW_ALL_CHECK = 9, +} Setting_View_Type; + +typedef void (*menu_list_load_fn) (void *data); +typedef void (*menu_list_load_fn2) (void *, Cfg_Item_Position, Evas_Object *); + +typedef enum _List_Load_Func_Type { + Func_Type_Connectivity = 0, + Func_Type_System = 1, + Func_Type_Apps = 2, + Func_Type_DownApp = 3, + Func_Type_MAX +} List_Load_Func_Type; + +typedef enum _MAIN_PROFILE_Type { + MAIN_PROFILE_PREFERRED = 0, + MAIN_PROFILE_ALL = 1, + MAIN_PROFILE_MAX +} MAIN_PROFILE_Type; + +/** + * enum for genlist item to be updated + * @see setting_update_gl_item + */ +typedef enum _Update_GL_Item_Type { + GL_ITEM_WIFI = 0, + GL_ITEM_BT, + GL_ITEM_NFC, + GL_ITEM_MAP, + GL_ITEM_USB, + + GL_ITEM_ROTATION, + GL_ITEM_FLIGHT, + + GL_ITEM_MAX +} Update_GL_Item_Type; + +typedef enum _FLIGHT_MODE_OPEARTION{ + FM_INVALID = 0,//There is no request waiting for processing + FM_ENTER = 1,//Some "flightmode enter" request is waiting for processing + FM_LEAVE,//Some "flightmode leave" request is waiting for processing +} FLIGHT_MODE_OPEARTION; + + +#define MAX_MORE_MENU_NUM 6 +/** +* @brief main view context +*/ +typedef struct _setting_main_appdata { + + ui_gadget_h ug; + TapiHandle *handle; + Evas_Object *popup; + Evas_Object *app_icon; + + Eina_Bool bAppPause; + Eina_Bool updateItems[GL_ITEM_MAX]; + + Ecore_Idler *refresh_idler; + + Evas *evas; + Evas_Object *win_main; + Evas_Object *controlbar; + + //Evas_Object *controllbar_all_check; + Evas_Object *gl_sel_all; + + menu_list_load_fn load_fns[Func_Type_MAX]; + MAIN_PROFILE_Type profile_type; + + Evas_Object *navibar_main; + + Evas_Object *ly_main; /**< seting view main */ + Setting_View_Type view_load; + Evas_Object *genlist_load; + + Elm_Object_Item *edit_item; + Elm_Object_Item *segment_all; + Elm_Object_Item *segment_preferred; + + bool isInUGMode; + + /* vars for flightmode */ + bool b_fm_requesting;//whether some request is processing. 1:yes, 0:no + FLIGHT_MODE_OPEARTION fm_waiting_op; + + + /* special layout */ + Setting_GenGroupItem_Data *data_flight; + Setting_GenGroupItem_Data *data_wifi; + Setting_GenGroupItem_Data *data_bt; + Setting_GenGroupItem_Data *data_rotationMode; + + Setting_GenGroupItem_Data *data_bright; + + Setting_GenGroupItem_Data *data_moreSystem; + Setting_GenGroupItem_Data *data_moreConnect; + Setting_GenGroupItem_Data *data_nfc; + + //following are not for update.. + Setting_GenGroupItem_Data *data_network; + + Setting_View_Type view_type; + + Evas_Object *main_genlist; /**< 'Setting main' in main page */ + Evas_Object *edit_preferred_genlist; /**< 'Edit preferred' page */ + + Elm_Genlist_Item_Class itc[GENDIAL_Type_MAX]; + + Eina_List *item_check_list; /**< in preferred view, store the selected items in the list. */ + Setting_GenGroupItem_Data *check_all_item; /**< genlist node for "Select all" */ + + Evas_Object *flight_popup; + Evas_Object *data_roaming_popup; + + // listen / unlisten code + Eina_List *listened_list; + sensor_h sf_handle; + + const char *more_connective_menus[MAX_MORE_MENU_NUM]; + const char *more_system_menus[MAX_MORE_MENU_NUM]; + + char* plugin_path; + void* plugin_node; + char* view_to_jump; + char cur_loaded_ug[MAX_DISPLAY_NAME_LEN_ON_UI]; + + Evas_Object *conform; + +} setting_main_appdata; + +/* launch view */ +extern setting_view setting_view_main; +extern setting_view setting_view_more_menu; +extern void __load_connectivity_menu_list(void *data, Cfg_Item_Position inputPos, Evas_Object *genlist); +extern void __load_system_menu_list(void *data, Cfg_Item_Position inputPos, Evas_Object *genlist); +extern void __gl_realized(void *data, Evas_Object *obj, void *event_info); + +#endif /* __SETTING_H__ */ diff --git a/manifest.xsd b/manifest.xsd new file mode 100644 index 0000000..c2ee06c --- /dev/null +++ b/manifest.xsd @@ -0,0 +1,168 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.tizen.setting.png b/org.tizen.setting.png new file mode 100755 index 0000000..c38e62f Binary files /dev/null and b/org.tizen.setting.png differ diff --git a/org.tizen.setting.xml b/org.tizen.setting.xml new file mode 100755 index 0000000..a420ab9 --- /dev/null +++ b/org.tizen.setting.xml @@ -0,0 +1,72 @@ + + + + MyoungJune Park + Setting Application + + org.tizen.setting.png + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ug-setting-font-efl.png + + + + + ug-setting-profile-efl.png + + + + + diff --git a/packaging/org.tizen.setting.spec b/packaging/org.tizen.setting.spec new file mode 100755 index 0000000..911f586 --- /dev/null +++ b/packaging/org.tizen.setting.spec @@ -0,0 +1,441 @@ +Name: org.tizen.setting +Summary: Setting application +Version: 0.1.87 +Release: 99 +Group: misc +License: Flora License, Version 1 +Source0: %{name}-%{version}.tar.gz +BuildRequires: pkgconfig(appcore-common) +BuildRequires: pkgconfig(appcore-efl) +BuildRequires: pkgconfig(elementary) +BuildRequires: pkgconfig(vconf) +BuildRequires: pkgconfig(tapi) +BuildRequires: pkgconfig(utilX) +BuildRequires: pkgconfig(devman) +BuildRequires: pkgconfig(haptic) +BuildRequires: pkgconfig(bluetooth-api) +BuildRequires: pkgconfig(mm-sound) +BuildRequires: pkgconfig(openssl) +BuildRequires: pkgconfig(ui-gadget-1) +BuildRequires: pkgconfig(json-glib-1.0) +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(dlog) +BuildRequires: pkgconfig(aul) +BuildRequires: pkgconfig(pmapi) +BuildRequires: pkgconfig(ecore-input) +BuildRequires: pkgconfig(eina) +BuildRequires: pkgconfig(icu-i18n) +BuildRequires: pkgconfig(ail) +BuildRequires: pkgconfig(sysman) +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(gthread-2.0) +BuildRequires: pkgconfig(dbus-glib-1) +BuildRequires: pkgconfig(ecore-imf) +BuildRequires: pkgconfig(ecore-x) +BuildRequires: pkgconfig(ecore) +BuildRequires: pkgconfig(ecore-file) +BuildRequires: pkgconfig(icu-io) +BuildRequires: pkgconfig(icu-le) +BuildRequires: pkgconfig(icu-lx) +BuildRequires: pkgconfig(icu-uc) +BuildRequires: pkgconfig(ewebkit2) +BuildRequires: pkgconfig(evas) +BuildRequires: pkgconfig(edje) +BuildRequires: pkgconfig(mm-player) +BuildRequires: pkgconfig(capi-network-connection) +#BuildRequires: pkgconfig(network) +#BuildRequires: pkgconfig(security-server) +BuildRequires: pkgconfig(svi) +BuildRequires: pkgconfig(appsvc) +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(notification) +BuildRequires: pkgconfig(pango) +BuildRequires: pkgconfig(capi-system-runtime-info) +BuildRequires: pkgconfig(capi-media-player) +BuildRequires: pkgconfig(capi-media-sound-manager) +BuildRequires: pkgconfig(capi-content-media-content) +BuildRequires: pkgconfig(capi-system-device) +BuildRequires: pkgconfig(capi-appfw-application) +BuildRequires: pkgconfig(capi-appfw-app-manager) +BuildRequires: pkgconfig(capi-system-sensor) +BuildRequires: pkgconfig(capi-system-info) +BuildRequires: pkgconfig(capi-system-system-settings) +BuildRequires: pkgconfig(capi-network-wifi) +BuildRequires: pkgconfig(capi-network-bluetooth) +BuildRequires: pkgconfig(capi-network-tethering) +BuildRequires: pkgconfig(capi-network-nfc) +BuildRequires: pkgconfig(ecore-evas) +BuildRequires: pkgconfig(pkgmgr) +BuildRequires: sysman-internal-devel +BuildRequires: cmake +BuildRequires: edje-tools +BuildRequires: gettext-tools +#Requires: org.tizen.phone +Requires: ug-bluetooth-efl +%description +Setting application + BEAT UI, Setting application. + + +%prep +%setup -q + +%build + +%define PREFIX "/usr/apps/org.tizen.setting" +%define RESDIR "/usr/apps/org.tizen.setting/res" +%define DATADIR "/usr/apps/org.tizen.setting/data" +CFLAGS+=" -fPIC";export CFLAGS +CXXFLAGS+=" -fPIC";export CFLAGS +LDFLAGS+="-Wl,--rpath=%{PREFIX}/lib -Wl,--hash-style=both -Wl,--as-needed";export LDFLAGS + +%ifarch %{arm} + cmake . -DCMAKE_INSTALL_PREFIX=%{PREFIX} -DARCH=arm +%else + cmake . -DCMAKE_INSTALL_PREFIX=%{PREFIX} -DARCH=x86 +%endif + +make + +%install +rm -rf %{buildroot} +%make_install + +mkdir -p %{buildroot}/opt/data/setting + +%clean + +%post + +# Set vconf values with -g/-u options +GOPTION="-g 6514" + +#resetMenuscreen + # menuscreen app will take this vconf + #vconftool $GOPTION set -t string db/setting/menuscreen/package_name "com.samsung.cluster-home" + + +#resetFlightmode + vconftool $GOPTION set -t bool db/telephony/flight_mode "0" -f + +#resetNetwork + vconftool $GOPTION set -t int db/setting/select_network "0" + vconftool $GOPTION set -t int db/setting/select_network_act "0" + vconftool $GOPTION set -t int db/setting/network_mode "0" + vconftool $GOPTION set -t bool db/setting/3gEnabled "1" + vconftool $GOPTION set -t bool db/setting/data_roaming "1" + +#resetUsbConnectivity + vconftool $GOPTION set -t int memory/setting/usb_mode "-1" -i -f + vconftool $GOPTION set -t int memory/setting/usb_sel_mode "0" -i -f + vconftool $GOPTION set -t int memory/setting/usb_in_mode_change "0" -i -f + vconftool $GOPTION set -t bool db/setting/debug_mode "1" -f + +#resetSound + DEFAULT_CALL_TONE="/opt/share/settings/Ringtones/ringtone_sdk.mp3" + DEFAULT_NOTI_TONE="/opt/share/settings/Alerts/General notification_sdk.wav" + + vconftool $GOPTION set -t bool db/setting/sound/sound_on "1" + vconftool $GOPTION set -t bool db/setting/sound/vibration_on "0" + + vconftool $GOPTION set -t int db/setting/sound/call/ringtone_sound_volume "13" + vconftool $GOPTION set -t int db/setting/sound/noti/sound_volume "7" + vconftool $GOPTION set -t int db/setting/sound/media/sound_volume "7" + vconftool $GOPTION set -t int db/setting/sound/touch_feedback/sound_volume "5" + + vconftool $GOPTION set -t int db/setting/sound/noti/vibration_level "5" + vconftool $GOPTION set -t int db/setting/sound/touch_feedback/vibration_level "3" + vconftool $GOPTION set -t int db/setting/sound/touch_feedback/vibration_level_bak "3" ##private key + + vconftool $GOPTION set -t string db/setting/sound/call/ringtone_path "${DEFAULT_CALL_TONE}" + vconftool $GOPTION set -t int db/setting/sound/call/vibration_type "2" + + vconftool $GOPTION set -t string db/setting/sound/noti/msg_ringtone_path "${DEFAULT_NOTI_TONE}" + vconftool $GOPTION set -t int db/setting/sound/noti/msg_alert_rep_type "0" + + vconftool $GOPTION set -t string db/setting/sound/noti/email_ringtone_path "${DEFAULT_NOTI_TONE}" + vconftool $GOPTION set -t int db/setting/sound/noti/email_alert_rep_type "0" + vconftool $GOPTION set -t bool db/setting/sound/touch_sounds "1" + vconftool $GOPTION set -t bool db/setting/sound/sound_lock "1" + +#resetWallpaper + vconftool $GOPTION set -t string db/menu_widget/bgset "/opt/share/settings/Wallpapers/Home_default.jpg" + vconftool $GOPTION set -t string db/idle_lock/bgset "/opt/share/settings/Wallpapers/Home_default.jpg" + +#resetTilt + vconftool $GOPTION set -t bool db/setting/use_tilt "1" + vconftool $GOPTION set -t int db/setting/tilt_sensitivity "3" + vconftool $GOPTION set -t bool db/setting/use_tilt_scroll "1" + vconftool $GOPTION set -t int db/setting/tilt_scroll_sensitivity "3" + +#resetPanning + vconftool $GOPTION set -t bool db/setting/use_panning "0" + vconftool $GOPTION set -t int db/setting/panning_sensitivity "3" + vconftool $GOPTION set -t bool db/setting/use_panning_browser "1" + vconftool $GOPTION set -t int db/setting/panning_browser_sensitivity "3" + +#resetDoubleTap + vconftool $GOPTION set -t bool db/setting/use_double_tap "1" + +#resetShake + vconftool $GOPTION set -t bool db/setting/use_shake "1" + +#resetPickup + vconftool $GOPTION set -t bool db/setting/use_pick_up "1" + vconftool $GOPTION set -t bool db/setting/use_pick_up_call "1" + +#resetTurnOver + vconftool $GOPTION set -t bool db/setting/use_turn_over "1" + +#resetMotions + vconftool $GOPTION set -t bool db/setting/motion_active "1" + vconftool $GOPTION set -t bool db/setting/motion/palm_swipe_capture "1" + vconftool $GOPTION set -t bool db/setting/motion/palm_touch_mute "1" + vconftool $GOPTION set -t bool db/setting/motion/tap_twist "1" + +#resetDisplay + #backlight +%ifarch %{arm} + vconftool $GOPTION set -t int db/setting/lcd_backlight_normal "30" +%else + vconftool $GOPTION set -t int db/setting/lcd_backlight_normal "600" +%endif + vconftool $GOPTION set -t int db/setting/lcd_timeout_normal_backup "30" + + #brightness + vconftool $GOPTION set -t int db/setting/Brightness "-1" + vconftool $GOPTION set -t int db/setting/brightness_automatic "0" + + #battery + vconftool $GOPTION set -t bool db/setting/battery_percentage "0" + #launch + #vconftool $GOPTION set -t string db/menu_widget/launch_effect "0" + + #smart screen + vconftool $GOPTION set -t int db/pm/smartstay_status "0" + vconftool $GOPTION set -t bool db/setting/smartscreen/smart_rotation "0" + vconftool $GOPTION set -t bool db/setting/auto_adjust_screen_tone "1" + vconftool $GOPTION set -t bool db/setting/smartscreen/smart_stay_r "1" + vconftool $GOPTION set -t bool db/setting/smartscreen/smart_rotation_r "1" + +#resetPowersaving + vconftool $GOPTION set -t bool db/setting/pwrsv/system_mode/status "0" + vconftool $GOPTION set -t bool db/setting/pwrsv/system_mode/reminder "1" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/status "0" + + vconftool $GOPTION set -t int db/setting/pwrsv/custom_mode/at "30" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/wifi "1" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/bt "1" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/gps "1" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/data_sync "1" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/hotspot "1" + + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/brt/status "1" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/brt/auto/status "0" + vconftool $GOPTION set -t int db/setting/pwrsv/custom_mode/brt/value "10" + vconftool $GOPTION set -t int db/setting/pwrsv/custom_mode/backlight/time "15" + + #v0.4 + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/cpu "0" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/display "0" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/bg_color "0" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/screen_vib "0" + +#resetFont + vconftool $GOPTION set -t int db/setting/font_size "1" + vconftool $GOPTION set -t int db/setting/font_type "0" + +#resetRotationLock + vconftool $GOPTION set -t bool db/setting/rotate_lock "1" + vconftool $GOPTION set -t bool db/setting/auto_rotate_screen "0" + #vconftool $GOPTION set -t bool memory/setting/rotate_hold "0" -i -f +#resetTimeAndData +%ifarch %{arm} + vconftool $GOPTION set -t bool db/setting/automatic_time_update "1" +%else + vconftool $GOPTION set -t bool db/setting/automatic_time_update "0" +%endif + + vconftool $GOPTION set -t int db/menu_widget/regionformat_time1224 "1" + vconftool $GOPTION set -t int db/setting/date_format "0" + vconftool $GOPTION set -t int db/setting/weekofday_format "0" + + vconftool $GOPTION set -t string db/setting/timezone "+9" + # to be removed + vconftool $GOPTION set -t string db/setting/cityname_id "IDS_WCL_BODY_CITYNAME_SEOUL" + + vconftool $GOPTION set -t string db/setting/timezone_id "Asia/Seoul" + + #if [ -f /opt/etc/localtime ] + #then + rm -f /opt/etc/localtime + ln -s /usr/share/zoneinfo/Asia/Seoul /opt/etc/localtime + #fi + + +#resetAccessibility + vconftool $GOPTION set -t bool db/setting/accessibility/accessibility "0" + vconftool $GOPTION set -t bool db/setting/accessibility/high_contrast "0" + vconftool $GOPTION set -t bool db/setting/accessibility/screen_zoom "1" + vconftool $GOPTION set -t int db/setting/accessibility/font_size "1" + #vconftool $GOPTION set -t int db/setting/accessibility/font_style "0" + vconftool $GOPTION set -t string db/setting/accessibility/font_name "HelveticaNeue" + vconftool $GOPTION set -t bool db/setting/accessibility/tts "0" + + vconftool $GOPTION set -t bool db/setting/accessibility/torch_light "0" + vconftool $GOPTION set -t bool db/setting/accessibility/mono_audio "0" + vconftool $GOPTION set -t int db/setting/accessibility/power_key_hold "1" + vconftool $GOPTION set -t bool db/setting/accessibility/led_notify "0" + + vconftool $GOPTION set -t bool db/ciss/call_answering_key "0" + vconftool $GOPTION set -t bool db/ciss/call_power_key_ends_call "0" + vconftool $GOPTION set -t int db/ciss/answering_mode "0" + vconftool $GOPTION set -t int db/ciss/answering_mode_time "3" + + vconftool $GOPTION set -t bool db/setting/accessibility/accept_call "0" + vconftool $GOPTION set -t bool db/setting/accessibility/enable_auto_answer "0" + vconftool $GOPTION set -t int db/setting/accessibility/auto_answer "1" + vconftool $GOPTION set -t bool db/setting/accessibility/powerkey_end_calls "0" + +#Driving Mode + vconftool $GOPTION set -t bool db/setting/drivingmode/drivingmode "1" + vconftool $GOPTION set -t bool db/setting/drivingmode/incomingcall "1" + vconftool $GOPTION set -t bool db/setting/drivingmode/message "1" + vconftool $GOPTION set -t bool db/setting/drivingmode/newemails "1" + vconftool $GOPTION set -t bool db/setting/drivingmode/newvoicemails "1" + vconftool $GOPTION set -t bool db/setting/drivingmode/alarm "1" + vconftool $GOPTION set -t bool db/setting/drivingmode/schedule "1" + vconftool $GOPTION set -t bool db/setting/drivingmode/unlockscreen "1" + +#resetLanguageAndRegion + vconftool $GOPTION set -t int db/setting/lang "9" + vconftool $GOPTION set -t string db/menu_widget/language "en_GB.UTF-8" + vconftool $GOPTION set -t string db/menu_widget/regionformat "en_GB.UTF-8" + +#resetViewtype + #vconftool $GOPTION set -t int db/menuscreen/viewtype "0" + #vconftool $GOPTION set -t int db/taskswitcher/viewtype "0" + +#resetTouch + #vconftool $GOPTION set -t int db/setting/vib_feedback "3" + #vconftool $GOPTION set -t bool db/setting/touch_panel_autolock "0" + +#resetLicense + vconftool $GOPTION set -t bool db/setting/transaction_tracking "0" + vconftool $GOPTION set -t bool db/setting/expiry_reminder "0" + vconftool $GOPTION set -t int db/setting/roaming_network "0" + +#resetNotification + vconftool $GOPTION set -t bool db/setting/ticker_noti/messages "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/email "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/im "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/twitter "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/facebook "1" + + # display content + vconftool $GOPTION set -t bool db/setting/ticker_noti/display_content/messages "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/display_content/email "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/display_content/im "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/display_content/twitter "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/display_content/facebook "1" + + vconftool $GOPTION set -t bool db/setting/ticker_noti/badge/messages "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/badge/email "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/badge/im "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/badge/twitter "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/badge/facebook "1" + +#resetSecurity + rm -rf /opt/data/setting/set_info + #vconftool $GOPTION set -t string db/setting/privacy_passwd "" + + vconftool $GOPTION set -t bool db/setting/power_on_lock "0" + vconftool $GOPTION set -t bool db/setting/simple_password "1" + vconftool $GOPTION set -t int db/setting/screen_lock_type "0" + vconftool $GOPTION set -t bool db/setting/fmm/sim_change_alert "0" + vconftool $GOPTION set -t string db/setting/fmm/recipients "" + vconftool $GOPTION set -t string db/setting/fmm/sender "" + vconftool $GOPTION set -t string db/setting/fmm/alert_message "" + vconftool $GOPTION set -t bool db/setting/fmm/remote_control "0" + vconftool $GOPTION set -t bool db/setting/fmm/location_consent "0" + + # NOT USED NOW. + #vconftool $GOPTION set -t bool db/setting/rcs "0" + + vconftool $GOPTION set -t int db/setting/phone_lock_attempts_left "5" + vconftool $GOPTION set -t string db/setting/phone_lock_timestamp "" + vconftool $GOPTION set -t int db/setting/sim_lock_attempts_left "5" + vconftool $GOPTION set -t string db/setting/sim_lock_timestamp "" + vconftool $GOPTION set -t bool db/setting/fixed_dialing_mode "0" +#resetMemory + vconftool $GOPTION set -t int db/setting/default_memory/wap "0" + vconftool $GOPTION set -t int db/setting/default_memory/bluetooth "0" + vconftool $GOPTION set -t int db/setting/default_memory/camera "0" + vconftool $GOPTION set -t int db/setting/default_memory/voice_recorder "0" + vconftool $GOPTION set -t int db/setting/default_memory/fm_radio "0" + vconftool $GOPTION set -t int db/setting/default_memory/all_share "0" + vconftool $GOPTION set -t int db/setting/default_memory/adobe_air "0" + vconftool $GOPTION set -t int db/setting/default_memory/dvb_h "0" + + # format - system server + #vconftool $GOPTION -i set -t int memory/mmc/format "0" + +#resetAbout + vconftool $GOPTION set -t string db/setting/device_name "Magnolia" + vconftool $GOPTION set -t string db/setting/selected_num "" +#resetMenuWidgets + vconftool $GOPTION -i set -t int memory/setting/font_changed "0" + #vconftool $GOPTION -i set -t int memory/mobile_hotspot/skin_changed "0" + +#resetDevoptions + vconftool $GOPTION -i set -t int db/setting/devoption/bgprocess "0" + +#resetDatausage + vconftool $GOPTION set -t bool db/setting/set_data_usage_limit "0" + vconftool $GOPTION set -t int db/setting/data_limit "0" + vconftool $GOPTION set -t int db/setting/data_usage_cycle "0" + vconftool $GOPTION set -t int db/setting/data_each_month "1" + +#resetDisplay + vconftool $GOPTION set -t string db/setting/screenmode/selected_name "Dynamic" + +#------------------------------------------ +#create directory /opt/data/setting +if [ ! -d /opt/data/setting ] +then + mkdir -p /opt/data/setting +fi + +# create setting.cfg at runtime right after installation +#/opt/apps/org.tizen.setting/bin/setting_conf_util +# After flashing, initialize timezone file +/usr/apps/org.tizen.setting/bin/setting_conf_util timezone_init +chown 5000:5000 /opt/data/setting -R +#------------------------------------------ +sync + +mkdir -p /usr/ug/bin/ +ln -sf /usr/bin/ug-client /usr/ug/bin/setting-font-efl +ln -sf /usr/bin/ug-client /usr/ug/bin/setting-profile-efl + +%files -n org.tizen.setting +%manifest settings.manifest +%defattr(-,root,root,-) +#%attr(-,inhouse,inhouse) %dir /opt/data/setting +%attr(-,app,app) %dir /opt/data/setting +/usr/apps/org.tizen.setting/bin/setting +/usr/apps/org.tizen.setting/bin/setting_conf_util +/opt/data/setting/setting.cfg + +/usr/share/packages/org.tizen.setting.xml + +/usr/share/icons/default/small/org.tizen.setting.png +/opt/share/settings/* +/usr/apps/org.tizen.setting/res/* +/usr/apps/org.tizen.setting/lib/* +/usr/apps/org.tizen.setting/data/* +/usr/ug/lib/* +/opt/data/setting/langlist.xml +/opt/data/setting/plugin-cfg/* +/opt/data/setting/plugin-xml/* +#/usr/apps/org.tizen.setting/bin/test_server diff --git a/packaging/settings.changes b/packaging/settings.changes new file mode 100644 index 0000000..9fbc48a --- /dev/null +++ b/packaging/settings.changes @@ -0,0 +1,16 @@ +* Tue Dec 11 2012 Brad Peters +- LCD backlight timeout is needed on IA as well as arm, or power-manager + does not properly manage backlight off/on until this vconf key + is overwritten by some other process + +* Sat Nov 24 2012 Jing Yigang +- Release + +* Tue Nov 19 2012 Taeyoung Kim +- SDB is enabled when debug mode is on + +* Tue Nov 6 2012 Jing Yigang +- Release + +* Fri Sept 14 2012 Brad Peters +- Fix setting_about_main_get_battery_string() to be platform specific diff --git a/resource/Open_Source_Announcement.html b/resource/Open_Source_Announcement.html new file mode 100755 index 0000000..4ad4cd6 --- /dev/null +++ b/resource/Open_Source_Announcement.html @@ -0,0 +1,4146 @@ + + + + + + + +

License: AFLv2.1, GPLv2
+Packages: dbus, libdbus-1-0, libdbus-glib-1-2 +

License: AFLv2, LGPLv2.0
+Packages: libxdgmime +

License: Apache License v2.0
+Packages: alarm-server, appsvc-tool, bluetooth-frwk-agent, bluetooth-frwk-test, bluetooth-share, boot-animation, capi-appfw-app-manager, capi-appfw-application, capi-base-common-dev, capi-content-media-content, capi-location-geocoder, capi-location-manager, capi-media-audio-io, capi-media-camera, capi-media-image-util, capi-media-player, capi-media-radio, capi-media-recorder, capi-media-sound-manager, capi-media-tone-player, capi-media-wav-player, capi-messaging-email, capi-messaging-mms, capi-messaging-sms, capi-network-bluetooth, capi-network-connection, capi-network-nfc, capi-social-calendar, capi-social-call-log, capi-social-contacts, capi-system-device, capi-system-haptic, capi-system-info, capi-system-power, capi-system-runtime-info, capi-system-sensor, capi-telephony-call, capi-telephony-network-info, capi-telephony-sim, capi-ui-efl-util, capi-uix-feedback, capi-uix-tts, cbhm, org.tizen.alert-3g-syspopup, org.tizen.app-selector, org.tizen.bluetooth, org.tizen.bluetooth-headers, org.tizen.bluetooth-share-ui, org.tizen.browser, org.tizen.bt-appsvc, org.tizen.bt-syspopup, org.tizen.calculator, org.tizen.calendar-viewer, org.tizen.call, org.tizen.ciss, org.tizen.clock, org.tizen.contacts, org.tizen.contacts-viewer, org.tizen.download-provider, org.tizen.efl-calendar, org.tizen.gallery, org.tizen.idle-lock, org.tizen.image-viewer, org.tizen.indicator, org.tizen.lowbat-syspopup, org.tizen.lowmem-syspopup, org.tizen.memo, org.tizen.menu-screen, org.tizen.music-player, org.tizen.phone, org.tizen.phone-lock, org.tizen.poweroff-syspopup, org.tizen.pwlock, org.tizen.quickpanel, org.tizen.setting, org.tizen.smartsearch, org.tizen.taskmgr, org.tizen.usb-syspopup, org.tizen.video-player, org.tizen.voicerecorder, org.tizen.volume, org.tizen.wifi-qs, contacts-service-bin, default-fonts-fc-sdk, default-fonts-sdk, dlogutil-bin, drm-service-0, efl-theme-tizen, efl-theme-tizen-black, efl-theme-tizen-black-hd, efl-theme-tizen-hd, gps-manager, ise-default, ise-engine-default, libail-0, libalarm-0, libapp-checker-0, libapp-checker-server-0, libappcore-common-0, libappcore-efl-0, libappsvc-0, libaudiosessionmgr-0, libaul-1, libaul-1-executable, libavsystem-0, libbluetooth-engine-0, libbluetooth-frwk-0, libbundle-0, libcamsrcjpegenc, libcamsrcjpegenc-sw-libjpeg, libcert-svc-0, libconnectivity-device-interface-0, libcontacts-service, libdevman-0, libdlog-0, libdownload-agent-0, libelm-webview, libheynoti-0, libmedia-service, libmedia-thumbnail, libmedia-utils, libmm-camcorder, libmm-common, libmm-fileinfo, libmm-imgp-gstcs, libmm-log, libmm-player, libmm-radio, libmm-session-0, libmm-sound-0, libmm-sound-tool, libmm-ta, libmm-utility, libnetwork-0, libnfc-common-lib-0, libnfc-manager-0, libopencore-amrnb, libopencore-amrwb, libpkgmgr-client-0, libpkgmgr-installer, libprivilege-control-0, librua-0, libsecurity-server-client-0, libsf-common-0, libslp-alarm-0, libslp-calendar-0, libslp-db-util-0, libslp-location, libslp-memo, libslp-mms-plugin, libslp-msg-service-0, libslp-pm-0, libslp-sensor-0, libslp-setting-0, libslp-shortcut-0, libslp-sms-plugin, libslp-sysman, libslp-tapi-0, libslp-utilx-0, libsppc-0, libss-client-0, libstt, libsvi-0, libsys-assert-0, libtts, libug-calendar-efl, libug-calendar-picker-efl, libug-contacts-efl, libug-gallery-efl-0, libug-image-viewer-efl, libug-memo-efl, libug-myfile-efl, libug-phone-efl, libug-setting-bluetooth-efl, libug-setting-call-efl, libug-setting-gallery-efl, libug-setting-location-efl, libug-setting-manage-applications-efl-0, libug-setting-theme-efl, libug-worldclock-efl, libui-gadget-0, libui-idlecapture-0, libuw-imap-toolkit-0, libvconf-0, location-geoclue-gpsd, location-geoclue-nominatim, location-gps-manager, media-data-sdk, media-server, media-thumbnail-server, menu-daemon, mm-fileinfo-tools, mmfw-sysconf-cleansdk-target, mmfw-sysconf-simulator, msg-service-tools, myaccount-0, rpm-installer, nitz, opengl-es, opengl-es-virtual-drv, pkgmgr-server, sdbd, security-server, sensor-framework, sonet0, spp-client-bin, spp-client-tool, ss-server, starter, svi-data-sdk, syspopup-0, syspopup-caller-0, system-server-bin, telephony-server, usb-setting-app, wifi-efl-ug, wrt, wrt-plugins-common, wrt-plugins-tizen, wrt-plugins-wac, wrt-test, openssh-client, openssh-server +

Licence: BSD
+Packages: libuuid1 +

License: New BSD
+Packages: gpsd, libelektra-dev, libgps19, libiri, libjpeg-turbo, libogg0, libspeex1, libspeexdsp1, libtheora0, libvorbis0a, libvorbisenc2, libvorbisfile3, speex, ssh, strace +

Licence: Simplified BSD
+Packages: e17, e17-data, e17-extra-modules, e17-misc, expedite, libecore, libecore-bin, libecore-con, libecore-config, libecore-data, libecore-doc, libecore-evas, libecore-fb, libecore-file, libecore-imf, libecore-input, libecore-ipc, libecore-x, libedbus, libedje, libedje-doc, libeet-bin, libeet-doc, libeet1, libefreet, libefreet-doc, libevas, libevas-doc, libevas-engines, libevas-engines-extras +

License: bzip2
+Packages: libbz2-1.0, bzip2 +

License: BSD, GPLv2
+Packages: wpasupplicant +

License: New BSD, GPLv3
+Packages: libcap2, libcap2-bin +

License: Simplified BSD, GPLv2
+Packages: libedje-bin +

License: Simplified BSD, Small/Pawn License +Packages: libembryo-bin, libembryo-doc, libembryo0 +

License: Simplified BSD, Motorola, New BSD +Packages: liboil0.3 +

License: Google, New BSD
+Packages: libpcre +

License: perl License
+Packages: libperl5.10, perl, perl-base, perl-debug, perl-doc, perl-modules, perl-suid +

License: GPLv2
+Packages: apt, bash, default-files-slp, login, mtd-utils, passwd, alsa-utils, base-files, base-passwd, bluez, busybox, busybox-symlinks-adduser, busybox-symlinks-adjtimex, busybox-symlinks-binutils, busybox-symlinks-bridge-utils, busybox-symlinks-bsdmainutils, busybox-symlinks-busybox, busybox-symlinks-bzip2, busybox-symlinks-console-tools, busybox-symlinks-cpio, busybox-symlinks-cron, busybox-symlinks-daemontools, busybox-symlinks-dc, busybox-symlinks-dnsutils, busybox-symlinks-dosfstools, busybox-symlinks-ed, busybox-symlinks-eject, busybox-symlinks-fbset, busybox-symlinks-fdflush, busybox-symlinks-hdparm, busybox-symlinks-ifupdown, busybox-symlinks-initscripts, busybox-symlinks-ipcalc, busybox-symlinks-iproute, busybox-symlinks-ipsvd, busybox-symlinks-iputils-arping, busybox-symlinks-iputils-ping, busybox-symlinks-klogd, busybox-symlinks-loadlin, busybox-symlinks-lrzsz, busybox-symlinks-lzma, busybox-symlinks-lzop, busybox-symlinks-module-init-tools, busybox-symlinks-mtd-utils, busybox-symlinks-net-tools, busybox-symlinks-openbsd-inetd, busybox-symlinks-passwd, busybox-symlinks-patch, busybox-symlinks-ppp, busybox-symlinks-procps, busybox-symlinks-psmisc, busybox-symlinks-rdate, busybox-symlinks-realpath, busybox-symlinks-rpm, busybox-symlinks-runit, busybox-symlinks-sharutils, busybox-symlinks-ssmtp, busybox-symlinks-sysklogd, busybox-symlinks-telnetd, busybox-symlinks-tftp, busybox-symlinks-time, busybox-symlinks-tofrodos, busybox-symlinks-udhcpc, busybox-symlinks-udhcpd, busybox-symlinks-unzip, busybox-symlinks-vlan, busybox-symlinks-vlock, busybox-symlinks-watchdog, busybox-symlinks-wget, busybox-symlinks-xterm, busybox-symlinks-zcip, connman, e2fsck-static, execstack, gnupg, gpgv, ifupdown, initscripts, insserv, iptables, lib64readline5, libbluetooth3, libc-bin, libc-dev-bin, libc6, libc6-i686, libc6-prof, libelfg0, libfuse-dev, libgstreamer-plugins-base0.10-0, libgudev-1.0-0, liblzo2-2, libpci3, libreadline5, libudev0, linux-base, linux-headers-2.6.36-trunk-all, linux-headers-2.6.36-trunk-all-armel, linux-headers-2.6.36-trunk-common, linux-headers-2.6.36-trunk-u1, linux-image-2.6.36-trunk-u1, linux-kbuild-2.6.36, linux-source-2.6.36, locales, lsb-base, ltrace, mawk, module-init-tools, netbase, obexd, oprofile, pciutils, pkg-config, prelink, procps, psmisc, ragel, rpm, readline-common, rlfe, locales-init, shared-mime-info, simulator-opengl, simulator-opengl-dev, smackutils, system-plugin-slp, sysv-rc, sysvinit, sysvinit-utils, u-boot, u-boot-tools, udev, usbutils, valgrind, tzdata-slp, fakeroot +

License: GPLv2, LGPLv2.1
+Packages: attr, acl, libacl1, libattr1 +

License: GPLv3
+Packages: fixincludes, gdb, gdbserver, binutils, binutils-gold, binutils-multiarch, cpp-4.5, g++-4.5, gcc-4.5, gcc-4.5-locales, gcc-4.5-source, libblkid1, libgcc1, libgomp1, libmpfr4, libmudflap0, boot-console-init, boot-telnet-init, uuid-runtime +

License: GPLv3, LGPLv2.1
+Packages: libidn11 +

License: GPLv3, LGPLv3
+Packages: libgmp10, libgmpxx4ldbl +

License: LGPLv2.0
+Packages: gconf-dbus-utils, geoclue, geoclue-gpsd, geoclue-nominatim, glib-networking, gstreamer-tools, gstreamer0.10-plugins-base, gstreamer0.10-plugins-base-apps, gstreamer0.10-plugins-ugly, gstreamer0.10-tools, gstreamer0.10-x, libfreealut, libfribidi0, libgconf-dbus, libgeoclue, libglib2.0-0, libglib2.0-0-refdbg, libglib2.0-bin, libglib2.0-data, libglib2.0-dev, libglib2.0-doc, libgstreamer0.10-0, libopenal-soft, libpango1.0, libpango1.0-common, libsoup2.4, rpm-libs +

License: LGPLv2.1
+Packages: alsa-scenario-scn-data-0, alsa-scenario-scn-data-0-base, alsa-scenario-scn-data-0-mc1n2, check, dialog, elm-misc, gstreamer0.10-alsa, gstreamer0.10-ffmpeg, gstreamer0.10-plugins-bad, gstreamer0.10-plugins-ext, gstreamer0.10-plugins-good, libaccounts-svc-0, libascenario-0, libasound2, libavcodec, libavformat, libavutil, libc6-dev, libeina, libeina-doc, libethumb, libethumb-bin, libexif12, libgcrypt11, libgnutls26, libgpg-error0, libisf-bin, libjson-glib, libmpc2, libnotification-0, libopenobex1, libpulse0, libsmack-0, libsndfile1, libsocial-service-0, libswscale, libug-picker-efl, libusb-0.1-4, libwbxml2-0, libwbxml2-utils, location-geoclue-pdr, location-geoclue-xps, pulseaudio, pulseaudio-module-bluetooth, pulseaudio-utils, sndfile-programs, sqlfs-bin, libelm, libelm-bin +

License: LGPLv2.1, Mozilla Public License 1.1 +Packages: libcairo2 +

License: libpng License
+Packages: libpng12-0, libpng3 +

License: ICU License
+Packages: icu-doc, libicu +

License: MIT/X Consortium License
+Packages: libexpat1, expat +

License: MIT License
+Packages: fontconfig, fontconfig-config, giflib-tools, libcurl, libcurl3, libdmx1, libdri2, libdrm-slp1, libdrm2, libfontconfig1, libfontenc1, libgif4, libharfbuzz, libice6, libkms1, liblua5.1-0, liboauth, libpciaccess0, libpixman-1-0, libpthread-stubs0, libsm6, libungif-bin, libungif4g, libx11-6, libx11-data, libx11-xcb1, libxau6, libxaw7, libxcb-atom1, libxcb-aux0, libxcb-composite0, libxcb-damage0, libxcb-dpms0, libxcb-dri2-0, libxcb-event1, libxcb-glx0, libxcb-icccm1, libxcb-image0, libxcb-keysyms1, libxcb-property1, libxcb-randr0, libxcb-record0, libxcb-render-util0, libxcb-render0, libxcb-reply1, libxcb-res0, libxcb-screensaver0, libxcb-shape0, libxcb-shm0, libxcb-sync0, libxcb-xevie0, libxcb-xf86dri0, libxcb-xfixes0, libxcb-xinerama0, libxcb-xprint0, libxcb-xtest0, libxcb-xv0, libxcb-xvmc0, libxcb1, libxcomposite1, libxcursor1, libxdamage1, libxdmcp6, libxext6, libxfixes3, libxfont1, libxft2, libxgesture0, libxi6, libxinerama1, libxkbfile1, libxml2, libxml2-0, libxml2-doc, libxml2-utils, libxmlsec1, libxmlsec1-openssl, libxmu-headers, libxmu6, libxmuu1, libxpm4, libxrandr2, libxrender1, libxres1, libxslt1.1, libxt6, libxtrap6, libxtst6, libxv1, libxxf86dga1, libxxf86misc1, libxxf86vm1, lua5.1, lua5.1-doc, python-xcbgen, x11-apps, x11-common, x11-utils, x11-xkb-utils, x11-xserver-utils, x11proto-bigreqs-dev, x11proto-composite-dev, x11proto-core-dev, x11proto-damage-dev, x11proto-dmx-dev, x11proto-dri2-dev, x11proto-fixes-dev, x11proto-fontcache-dev, x11proto-fonts-dev, x11proto-gesture-dev, x11proto-input-dev, x11proto-kb-dev, x11proto-randr-dev, x11proto-record-dev, x11proto-render-dev, x11proto-resource-dev, x11proto-scrnsaver-dev, x11proto-trap-dev, x11proto-video-dev, x11proto-xcmisc-dev, x11proto-xext-dev, x11proto-xf86bigfont-dev, x11proto-xf86dga-dev, x11proto-xf86dri-dev, x11proto-xf86misc-dev, x11proto-xf86vidmode-dev, x11proto-xinerama-dev, xbitmaps, xcb-proto, xfonts-utils, xinit, xinput, xkb-data, xkb-data-i18n, xpmutils, xrestop, xserver-common, xserver-xorg-core, xserver-xorg-input-evdev, xserver-xorg-input-evdev-multitouch, xserver-xorg-input-gesture, xserver-xorg-misc-emulfb, xserver-xorg-tools, xserver-xorg-video-emulfb, xtrans-dev, xutils-dev +

License: ISC(Internet Software Consortium) +Packages: rfkill +

License: MIT, ISC(Internet Software Consortium) +Packages: libc-ares2 +

License: BSD, LGPLv2.1, Mozilla, MIT
+Packages: libwebkit-engine +

License: OpenSSL License
+Packages: libssl-dev, libssl1.0.0, openssl +

License: Red Hat Software
+Packages: popt +

License: Zlib license
+Packages: zlib-bin, zlib1g, zlib1g-dev, libbullet-0 +

License: FreeType License or GPLv2
+Packages: libfreetype6 +

License: bzip2
+Packages: libbz2-1.0, bzip2 +

License: Flora license
+Packages: org.tizen.sat-ui, geoclue-pdr, geoclue-xps, libeas-common, libslp-telplugin-0, libslp-lbs-plugin-csr, boot-network-init +

License: Apachev2.0, MIT, CPOL
+Packages: wrt-commons +

License: libjpeg license
+Packages: libjpeg-progs +

License: ncurse license
+Packages: ncurses-bin, ncurses-term, ncurse license, libncurses5 +

License: GCC 4.5 License
+Packages: libstdc++6 +

License: No license
+Packages: ca-certificates +

+
+The Academic Free License v. 2.1 +

This Academic Free License (the "License") applies to any original work of authorship +(the "Original Work") whose owner (the "Licensor") has placed the following notice immediately +following the copyright notice for the Original Work: +

Licensed under the Academic Free License version 2.1 +

    +
  1. Grant of Copyright License. Licensor hereby grants You a +world-wide, royalty-free, non-exclusive, perpetual, sublicenseable +license to do the following:
  2. to reproduce the Original Work in copies;
  3. to prepare derivative works ("Derivative Works") based upon the Original Work;
  4. to distribute copies of the Original Work and Derivative Works to the public;
  5. to perform the Original Work publicly; and
  6. to display the Original Work publicly.
  7. Grant of Patent License. Licensor hereby grants You a world-wide, +royalty-free, non-exclusive, perpetual, sublicenseable license, under +patent claims owned or controlled by the Licensor that are embodied in +the Original Work as furnished by the Licensor, to make, use, sell and +offer for sale the Original Work and Derivative Works.
  8. Grant of Source Code License. The term "Source Code" means the +preferred form of the Original Work for making modifications to it and +all available documentation describing how to modify the Original +Work. Licensor hereby agrees to provide a machine-readable copy of the +Source Code of the Original Work along with each copy of the Original +Work that Licensor distributes. Licensor reserves the right to satisfy +this obligation by placing a machine-readable copy of the Source Code +in an information repository reasonably calculated to permit +inexpensive and convenient access by You for as long as Licensor +continues to distribute the Original Work, and by publishing the +address of that information repository in a notice immediately +following the copyright notice that applies to the Original Work.
  9. Exclusions From License Grant. Neither the names of Licensor, nor +the names of any contributors to the Original Work, nor any of their +trademarks or service marks, may be used to endorse or promote +products derived from this Original Work without express prior written +permission of the Licensor. Nothing in this License shall be deemed to +grant any rights to trademarks, copyrights, patents, trade secrets or +any other intellectual property of Licensor except as expressly stated +herein. No patent license is granted to make, use, sell or offer to +sell embodiments of any patent claims other than the licensed claims +defined in Section 2. No right is granted to the trademarks of +Licensor even if such marks are included in the Original Work. Nothing +in this License shall be interpreted to prohibit Licensor from +licensing under different terms from this License any Original Work +that Licensor otherwise would have a right to license.
  10. This section intentionally omitted.
  11. Attribution Rights. You must retain, in the Source Code of any +Derivative Works that You create, all copyright, patent or trademark +notices from the Source Code of the Original Work, as well as any +notices of licensing and any descriptive text identified therein as an +"Attribution Notice." You must cause the Source Code for any +Derivative Works that You create to carry a prominent Attribution +Notice reasonably calculated to inform recipients that You have +modified the Original Work.
  12. Warranty of Provenance and Disclaimer of Warranty. Licensor +warrants that the copyright in and to the Original Work and the patent +rights granted herein by Licensor are owned by the Licensor or are +sublicensed to You under the terms of this License with the permission +of the contributor(s) of those copyrights and patent rights. Except as +expressly stated in the immediately proceeding sentence, the Original +Work is provided under this License on an "AS IS" BASIS and WITHOUT +WARRANTY, either express or implied, including, without limitation, +the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL +WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential +part of this License. No license to Original Work is granted hereunder +except under this disclaimer.
  13. Limitation of Liability. Under no circumstances and under no legal +theory, whether in tort (including negligence), contract, or +otherwise, shall the Licensor be liable to any person for any direct, +indirect, special, incidental, or consequential damages of any +character arising as a result of this License or the use of the +Original Work including, without limitation, damages for loss of +goodwill, work stoppage, computer failure or malfunction, or any and +all other commercial damages or losses. This limitation of liability +shall not apply to liability for death or personal injury resulting +from Licensor's negligence to the extent applicable law prohibits such +limitation. Some jurisdictions do not allow the exclusion or +limitation of incidental or consequential damages, so this exclusion +and limitation may not apply to You.
  14. Acceptance and Termination. If You distribute copies of the +Original Work or a Derivative Work, You must make a reasonable effort +under the circumstances to obtain the express assent of recipients to +the terms of this License. Nothing else but this License (or another +written agreement between Licensor and You) grants You permission to +create Derivative Works based upon the Original Work or to exercise +any of the rights granted in Section 1 herein, and any attempt to do +so except under the terms of this License (or another written +agreement between Licensor and You) is expressly prohibited by +U.S. copyright law, the equivalent laws of other countries, and by +international treaty. Therefore, by exercising any of the rights +granted to You in Section 1 herein, You indicate Your acceptance of +this License and all of its terms and conditions.
  15. Termination for Patent Action. This License shall terminate +automatically and You may no longer exercise any of the rights granted +to You by this License as of the date You commence an action, +including a cross-claim or counterclaim, against Licensor or any +licensee alleging that the Original Work infringes a patent. This +termination provision shall not apply for an action alleging patent +infringement by combinations of the Original Work with other software +or hardware.
  16. Jurisdiction, Venue and Governing Law. Any action or suit relating +to this License may be brought only in the courts of a jurisdiction +wherein the Licensor resides or in which Licensor conducts its primary +business, and under the laws of that jurisdiction excluding its +conflict-of-law provisions. The application of the United Nations +Convention on Contracts for the International Sale of Goods is +expressly excluded. Any use of the Original Work outside the scope of +this License or after its termination shall be subject to the +requirements and penalties of the U.S. Copyright Act, 17 U.S.C. A§ 101 +et seq., the equivalent laws of other countries, and international +treaty. This section shall survive the termination of this License.
  17. Attorneys Fees. In any action to enforce the terms of this License +or seeking damages relating thereto, the prevailing party shall be +entitled to recover its costs and expenses, including, without +limitation, reasonable attorneys' fees and costs incurred in +connection with such action, including any appeal of such action. This +section shall survive the termination of this License.
  18. Miscellaneous. This License represents the complete agreement +concerning the subject matter hereof. If any provision of this License +is held to be unenforceable, such provision shall be reformed only to +the extent necessary to make it enforceable.
  19. Definition of "You" in This License. "You" throughout this +License, whether in upper or lower case, means an individual or a +legal entity exercising rights under, and complying with all of the +terms of, this License. For legal entities, "You" includes any entity +that controls, is controlled by, or is under common control with +you. For 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.
  20. Right to Use. You may use the Original Work in all ways not +otherwise restricted or conditioned by this License or by law, and +Licensor promises not to interfere with or be responsible for such +uses by You.
+

This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights +reserved. Permission is hereby granted to copy and distribute this +license without modification. This license may not be modified without +the express written permission of its copyright owner. +

+

--
+END OF ACADEMIC FREE LICENSE. The following is intended to describe the essential +differences between the Academic Free License (AFL) version 1.0 and other +open source licenses: +

The Academic Free License is similar to the BSD, MIT, UoI/NCSA and Apache +licenses in many respects but it is intended to solve a few problems with +those licenses. +

    +
  • The AFL is written so as to make it clear what software is being +licensed (by the inclusion of a statement following the copyright notice +in the software). This way, the license functions better than a template +license. The BSD, MIT and UoI/NCSA licenses apply to unidentified software.
  • The AFL contains a complete copyright grant to the software. The BSD +and Apache licenses are vague and incomplete in that respect.
  • The AFL contains a complete patent grant to the software. The BSD, MIT, +UoI/NCSA and Apache licenses rely on an implied patent license and contain +no explicit patent grant.
  • The AFL makes it clear that no trademark rights are granted to the +licensor's trademarks. The Apache license contains such a provision, but the +BSD, MIT and UoI/NCSA licenses do not.
  • The AFL includes the warranty by the licensor that it either owns the +copyright or that it is distributing the software under a license. None of +the other licenses contain that warranty. All other warranties are disclaimed, +as is the case for the other licenses.
  • The AFL is itself copyrighted (with the right granted to copy and distribute +without modification). This ensures that the owner of the copyright to the +license will control changes. The Apache license contains a copyright notice, +but the BSD, MIT and UoI/NCSA licenses do not. +
+
+Apache License v2.0 +
+                                    Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+

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. +

  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, + 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 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 in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions:

    (a) You must give any other recipients of the Work or +

    Derivative Works a copy of this License; and +

    (b) You must cause any modified files to carry prominent notices +

    stating that You changed the files; and +

    (c) 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 +

    (d) 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 Apache License to your work. +

+      To apply the Apache 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 Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at +

http://www.apache.org/licenses/LICENSE-2.0 +

Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +


+Mozilla Public License 1.1 +
+                          MOZILLA PUBLIC LICENSE
+                                Version 1.1
+                              ---------------
+
    +
  1. Definitions.
+

1.0.1. "Commercial Use" means distribution or otherwise making the + Covered Code available to a third party. +

1.1. "Contributor" means each entity that creates or contributes to + the creation of Modifications. +

1.2. "Contributor Version" means the combination of the Original + Code, prior Modifications used by a Contributor, and the Modifications + made by that particular Contributor. +

1.3. "Covered Code" means the Original Code or Modifications or the + combination of the Original Code and Modifications, in each case + including portions thereof. +

1.4. "Electronic Distribution Mechanism" means a mechanism generally + accepted in the software development community for the electronic + transfer of data. +

1.5. "Executable" means Covered Code in any form other than Source + Code. +

1.6. "Initial Developer" means the individual or entity identified + as the Initial Developer in the Source Code notice required by Exhibit + A. +

1.7. "Larger Work" means a work which combines Covered Code or + portions thereof with code not governed by the terms of this License. +

1.8. "License" means this document. +

1.8.1. "Licensable" means having the right to grant, to the maximum + extent possible, whether at the time of the initial grant or + subsequently acquired, any and all of the rights conveyed herein. +

1.9. "Modifications" means any addition to or deletion from the + substance or structure of either the Original Code or any previous + Modifications. When Covered Code is released as a series of files, a + Modification is: +

    +
  1. Any addition to or deletion from the contents of a file + containing Original Code or previous Modifications.
  2. Any new file that contains any part of the Original Code or + previous Modifications.
+

1.10. "Original Code" means Source Code of computer software code + which is described in the Source Code notice required by Exhibit A as + Original Code, and which, at the time of its release under this + License is not already Covered Code governed by this License. +

1.10.1. "Patent Claims" means any patent claim(s), now owned or + hereafter acquired, including without limitation, method, process, + and apparatus claims, in any patent Licensable by grantor. +

1.11. "Source Code" means the preferred form of the Covered Code for + making modifications to it, including all modules it contains, plus + any associated interface definition files, scripts used to control + compilation and installation of an Executable, or source code + differential comparisons against either the Original Code or another + well known, available Covered Code of the Contributor's choice. The + Source Code can be in a compressed or archival form, provided the + appropriate decompression or de-archiving software is widely available + for no charge. +

1.12. "You" (or "Your") means an individual or a legal entity + exercising rights under, and complying with all of the terms of, this + License or a future version of this License issued under Section 6.1. + For legal entities, "You" includes any entity which controls, is + controlled by, or is under common control with You. For purposes of + this definition, "control" means (a) the power, direct or indirect, + to cause the direction or management of such entity, whether by + contract or otherwise, or (b) ownership of more than fifty percent + (50%) of the outstanding shares or beneficial ownership of such + entity. +

2. Source Code License. +

2.1. The Initial Developer Grant.
+ The Initial Developer hereby grants You a world-wide, royalty-free, + non-exclusive license, subject to third party intellectual property +

+
claims
+
+

(a) under intellectual property rights (other than patent or + trademark) Licensable by Initial Developer to use, reproduce, + modify, display, perform, sublicense and distribute the Original + Code (or portions thereof) with or without Modifications, and/or + as part of a Larger Work; and +

(b) under Patents Claims infringed by the making, using or + selling of Original Code, to make, have made, use, practice, + sell, and offer for sale, and/or otherwise dispose of the + Original Code (or portions thereof). +

(c) the licenses granted in this Section 2.1(a) and (b) are + effective on the date Initial Developer first distributes + Original Code under the terms of this License. +

(d) Notwithstanding Section 2.1(b) above, no patent license is + granted: 1) for code that You delete from the Original Code; 2) + separate from the Original Code; or 3) for infringements caused + by: i) the modification of the Original Code or ii) the + combination of the Original Code with other software or devices. +

2.2. Contributor Grant.
+ Subject to third party intellectual property claims, each Contributor + hereby grants You a world-wide, royalty-free, non-exclusive license +

(a) under intellectual property rights (other than patent or + trademark) Licensable by Contributor, to use, reproduce, modify, + display, perform, sublicense and distribute the Modifications + created by such Contributor (or portions thereof) either on an + unmodified basis, with other Modifications, as Covered Code + and/or as part of a Larger Work; and +

(b) under Patent Claims infringed by the making, using, or + selling of Modifications made by that Contributor either alone + and/or in combination with its Contributor Version (or portions + of such combination), to make, use, sell, offer for sale, have + made, and/or otherwise dispose of: 1) Modifications made by that + Contributor (or portions thereof); and 2) the combination of + Modifications made by that Contributor with its Contributor + Version (or portions of such combination). +

(c) the licenses granted in Sections 2.2(a) and 2.2(b) are + effective on the date Contributor first makes Commercial Use of + the Covered Code. +

(d) Notwithstanding Section 2.2(b) above, no patent license is + granted: 1) for any code that Contributor has deleted from the + Contributor Version; 2) separate from the Contributor Version; + 3) for infringements caused by: i) third party modifications of + Contributor Version or ii) the combination of Modifications made + by that Contributor with other software (except as part of the + Contributor Version) or other devices; or 4) under Patent Claims + infringed by Covered Code in the absence of Modifications made by + that Contributor. +

3. Distribution Obligations. +

3.1. Application of License.
+ The Modifications which You create or to which You contribute are + governed by the terms of this License, including without limitation + Section 2.2. The Source Code version of Covered Code may be + distributed only under the terms of this License or a future version + of this License released under Section 6.1, and You must include a + copy of this License with every copy of the Source Code You + distribute. You may not offer or impose any terms on any Source Code + version that alters or restricts the applicable version of this + License or the recipients' rights hereunder. However, You may include + an additional document offering the additional rights described in + Section 3.5. +

3.2. Availability of Source Code.
+ Any Modification which You create or to which You contribute must be + made available in Source Code form under the terms of this License + either on the same media as an Executable version or via an accepted + Electronic Distribution Mechanism to anyone to whom you made an + Executable version available; and if made available via Electronic + Distribution Mechanism, must remain available for at least twelve (12) + months after the date it initially became available, or at least six + (6) months after a subsequent version of that particular Modification + has been made available to such recipients. You are responsible for + ensuring that the Source Code version remains available even if the + Electronic Distribution Mechanism is maintained by a third party. +

3.3. Description of Modifications.
+ You must cause all Covered Code to which You contribute to contain a + file documenting the changes You made to create that Covered Code and + the date of any change. You must include a prominent statement that + the Modification is derived, directly or indirectly, from Original + Code provided by the Initial Developer and including the name of the + Initial Developer in (a) the Source Code, and (b) in any notice in an + Executable version or related documentation in which You describe the + origin or ownership of the Covered Code. +

3.4. Intellectual Property Matters +

(a) Third Party Claims.
+ If Contributor has knowledge that a license under a third party's + intellectual property rights is required to exercise the rights + granted by such Contributor under Sections 2.1 or 2.2, + Contributor must include a text file with the Source Code + distribution titled "LEGAL" which describes the claim and the + party making the claim in sufficient detail that a recipient will + know whom to contact. If Contributor obtains such knowledge after + the Modification is made available as described in Section 3.2, + Contributor shall promptly modify the LEGAL file in all copies + Contributor makes available thereafter and shall take other steps + (such as notifying appropriate mailing lists or newsgroups) + reasonably calculated to inform those who received the Covered + Code that new knowledge has been obtained. +

(b) Contributor APIs.
+ If Contributor's Modifications include an application programming + interface and Contributor has knowledge of patent licenses which + are reasonably necessary to implement that API, Contributor must + also include this information in the LEGAL file. +

(c) Representations.
+ Contributor represents that, except as disclosed pursuant to + Section 3.4(a) above, Contributor believes that Contributor's + Modifications are Contributor's original creation(s) and/or + Contributor has sufficient rights to grant the rights conveyed by + this License. +

3.5. Required Notices.
+ You must duplicate the notice in Exhibit A in each file of the Source + Code. If it is not possible to put such notice in a particular Source + Code file due to its structure, then You must include such notice in a + location (such as a relevant directory) where a user would be likely + to look for such a notice. If You created one or more Modification(s) + You may add your name as a Contributor to the notice described in + Exhibit A. You must also duplicate this License in any documentation + for the Source Code where You describe recipients' rights or ownership + rights relating to Covered Code. You may choose to offer, and to + charge a fee for, warranty, support, indemnity or liability + obligations to one or more recipients of Covered Code. However, You + may do so only on Your own behalf, and not on behalf of the Initial + Developer or any Contributor. You must make it absolutely clear than + any such warranty, support, indemnity or liability obligation is + offered by You alone, and You hereby agree to indemnify the Initial + Developer and every Contributor for any liability incurred by the + Initial Developer or such Contributor as a result of warranty, + support, indemnity or liability terms You offer. +

3.6. Distribution of Executable Versions. + You may distribute Covered Code in Executable form only if the + requirements of Section 3.1-3.5 have been met for that Covered Code, + and if You include a notice stating that the Source Code version of + the Covered Code is available under the terms of this License, + including a description of how and where You have fulfilled the + obligations of Section 3.2. The notice must be conspicuously included + in any notice in an Executable version, related documentation or + collateral in which You describe recipients' rights relating to the + Covered Code. You may distribute the Executable version of Covered + Code or ownership rights under a license of Your choice, which may + contain terms different from this License, provided that You are in + compliance with the terms of this License and that the license for the + Executable version does not attempt to limit or alter the recipient's + rights in the Source Code version from the rights set forth in this + License. If You distribute the Executable version under a different + license You must make it absolutely clear that any terms which differ + from this License are offered by You alone, not by the Initial + Developer or any Contributor. You hereby agree to indemnify the + Initial Developer and every Contributor for any liability incurred by + the Initial Developer or such Contributor as a result of any such + terms You offer. +

3.7. Larger Works.
+ You may create a Larger Work by combining Covered Code with other code + not governed by the terms of this License and distribute the Larger + Work as a single product. In such a case, You must make sure the + requirements of this License are fulfilled for the Covered Code. +

4. Inability to Comply Due to Statute or Regulation. +

If it is impossible for You to comply with any of the terms of this + License with respect to some or all of the Covered Code due to + statute, judicial order, or regulation then You must: (a) comply with + the terms of this License to the maximum extent possible; and (b) + describe the limitations and the code they affect. Such description + must be included in the LEGAL file described in Section 3.4 and must + be included with all distributions of the Source Code. Except to the + extent prohibited by statute or regulation, such description must be + sufficiently detailed for a recipient of ordinary skill to be able to + understand it. +

5. Application of this License. +

This License applies to code to which the Initial Developer has + attached the notice in Exhibit A and to related Covered Code. +

6. Versions of the License. +

6.1. New Versions.
+ Netscape Communications Corporation ("Netscape") may publish revised + and/or new versions of the License from time to time. Each version + will be given a distinguishing version number. +

6.2. Effect of New Versions.
+ Once Covered Code has been published under a particular version of the + License, You may always continue to use it under the terms of that + version. You may also choose to use such Covered Code under the terms + of any subsequent version of the License published by Netscape. No one + other than Netscape has the right to modify the terms applicable to + Covered Code created under this License. +

6.3. Derivative Works.
+ If You create or use a modified version of this License (which you may + only do in order to apply it to code which is not already Covered Code + governed by this License), You must (a) rename Your license so that + the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", + "MPL", "NPL" or any confusingly similar phrase do not appear in your + license (except to note that your license differs from this License) + and (b) otherwise make it clear that Your version of the license + contains terms which differ from the Mozilla Public License and + Netscape Public License. (Filling in the name of the Initial + Developer, Original Code or Contributor in the notice described in + Exhibit A shall not of themselves be deemed to be modifications of + this License.) +

7. DISCLAIMER OF WARRANTY. +

COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF +DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. +THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE +IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, +YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE +COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER +OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF +ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. +

8. TERMINATION. +

8.1. This License and the rights granted hereunder will terminate + automatically if You fail to comply with terms herein and fail to cure + such breach within 30 days of becoming aware of the breach. All + sublicenses to the Covered Code which are properly granted shall + survive any termination of this License. Provisions which, by their + nature, must remain in effect beyond the termination of this License + shall survive. +

8.2. If You initiate litigation by asserting a patent infringement + claim (excluding declatory judgment actions) against Initial Developer + or a Contributor (the Initial Developer or Contributor against whom + You file such action is referred to as "Participant") alleging that: +

(a) such Participant's Contributor Version directly or indirectly + infringes any patent, then any and all rights granted by such + Participant to You under Sections 2.1 and/or 2.2 of this License + shall, upon 60 days notice from Participant terminate prospectively, + unless if within 60 days after receipt of notice You either: (i) + agree in writing to pay Participant a mutually agreeable reasonable + royalty for Your past and future use of Modifications made by such + Participant, or (ii) withdraw Your litigation claim with respect to + the Contributor Version against such Participant. If within 60 days + of notice, a reasonable royalty and payment arrangement are not + mutually agreed upon in writing by the parties or the litigation claim + is not withdrawn, the rights granted by Participant to You under + Sections 2.1 and/or 2.2 automatically terminate at the expiration of + the 60 day notice period specified above. +

(b) any software, hardware, or device, other than such Participant's + Contributor Version, directly or indirectly infringes any patent, then + any rights granted to You by such Participant under Sections 2.1(b) + and 2.2(b) are revoked effective as of the date You first made, used, + sold, distributed, or had made, Modifications made by that + Participant. +

8.3. If You assert a patent infringement claim against Participant + alleging that such Participant's Contributor Version directly or + indirectly infringes any patent where such claim is resolved (such as + by license or settlement) prior to the initiation of patent + infringement litigation, then the reasonable value of the licenses + granted by such Participant under Sections 2.1 or 2.2 shall be taken + into account in determining the amount or value of any payment or + license. +

8.4. In the event of termination under Sections 8.1 or 8.2 above, + all end user license agreements (excluding distributors and resellers) + which have been validly granted by You or any distributor hereunder + prior to termination shall survive termination. +

9. LIMITATION OF LIABILITY. +

UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT +(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL +DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, +OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR +ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY +CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, +WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER +COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN +INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF +LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY +RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW +PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE +EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO +THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. +

10. U.S. GOVERNMENT END USERS. +

The Covered Code is a "commercial item," as that term is defined in + 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer + software" and "commercial computer software documentation," as such + terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 + C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), + all U.S. Government End Users acquire Covered Code with only those + rights set forth herein. +

11. MISCELLANEOUS. +

This License represents the complete agreement concerning subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. This License shall be governed by + California law provisions (except to the extent applicable law, if + any, provides otherwise), excluding its conflict-of-law provisions. + With respect to disputes in which at least one party is a citizen of, + or an entity chartered or registered to do business in the United + States of America, any litigation relating to this License shall be + subject to the jurisdiction of the Federal Courts of the Northern + District of California, with venue lying in Santa Clara County, + California, with the losing party responsible for costs, including + without limitation, court costs and reasonable attorneys' fees and + expenses. The application of the United Nations Convention on + Contracts for the International Sale of Goods is expressly excluded. + Any law or regulation which provides that the language of a contract + shall be construed against the drafter shall not apply to this + License. +

12. RESPONSIBILITY FOR CLAIMS. +

As between Initial Developer and the Contributors, each party is + responsible for claims and damages arising, directly or indirectly, + out of its utilization of rights under this License and You agree to + work with Initial Developer and Contributors to distribute such + responsibility on an equitable basis. Nothing herein is intended or + shall be deemed to constitute any admission of liability. +

13. MULTIPLE-LICENSED CODE. +

Initial Developer may designate portions of the Covered Code as + "Multiple-Licensed". "Multiple-Licensed" means that the Initial + Developer permits you to utilize portions of the Covered Code under + Your choice of the NPL or the alternative licenses, if any, specified + by the Initial Developer in the file described in Exhibit A. +

EXHIBIT A -Mozilla Public License. +

``The contents of this file are subject to the Mozilla Public License + Version 1.1 (the "License"); you may not use this file except in + compliance with the License. You may obtain a copy of the License at + http://www.mozilla.org/MPL/ +

Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + License for the specific language governing rights and limitations + under the License. +

The Original Code is ______________________________________. +

The Initial Developer of the Original Code is ________________________. + Portions created by ______________________ are Copyright (C) ______ + _______________________. All Rights Reserved. +

Contributor(s): ______________________________________. +

Alternatively, the contents of this file may be used under the terms + of the _____ license (the "[___] License"), in which case the + provisions of [______] License are applicable instead of those + above. If you wish to allow use of your version of this file only + under the terms of the [____] License and not to allow others to use + your version of this file under the MPL, indicate your decision by + deleting the provisions above and replace them with the notice and + other provisions required by the [___] License. If you do not delete + the provisions above, a recipient may use your version of this file + under either the MPL or the [___] License." +

[NOTE: The text of this Exhibit A may differ slightly from the text of + the notices in the Source Code files of the Original Code. You should + use the text of this Exhibit A rather than the text found in the + Original Code Source Code for Your Modifications.] +


+LGPLv2.0 +
+                  GNU LIBRARY GENERAL PUBLIC LICENSE
+                       Version 2, June 1991
+

Copyright (C) 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. +

[This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] +

Preamble +

The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. +

This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, too. +

When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. +

To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the library, or if you modify it. +

For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. +

Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. +

Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, so that any problems introduced by others will not reflect on +the original authors' reputations. +

Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. +

Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. +

The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. +

Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. +

However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. +

The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. +

Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. +

GNU LIBRARY GENERAL PUBLIC LICENSE +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION +

0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". +

A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. +

The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) +

"Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. +

Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. +

    +
  1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library.
+

You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. +

2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: +

    +
  1. The modified work must itself be a software library.
  2. You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change.
  3. You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License.
  4. If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful.
+

(For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) +

These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. +

Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. +

In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. +

3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. +

Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. +

This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. +

4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. +

If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. +

5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. +

However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. +

When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. +

If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) +

Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. +

6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. +

You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: +

    +
  1. Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.)
  2. Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution.
  3. If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place.
  4. Verify that the user has already received a copy of these + materials or that you have already sent this user a copy.
+

For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the source code distributed need not include anything that is normally +distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. +

It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. +

7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: +

    +
  1. Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above.
  2. Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work.
  3. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance.
  4. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it.
  5. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License.
  6. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library.
+

If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. +

It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. +

This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. +

12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. +

13. The Free Software Foundation may publish revised and/or new +versions of the Library General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. +

Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. +

14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. +

NO WARRANTY +

15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. +

16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. +

END OF TERMS AND CONDITIONS +

How to Apply These Terms to Your New Libraries +

If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). +

To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. +

<one line to give the library's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> +

This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. +

This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. +

You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +

Also add information on how to contact you by electronic and paper mail. +

You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: +

Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. +

<signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice +

That's all there is to it! +


+LGPLv2.1 +
+                  GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 2.1, February 1999
+

Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. +

[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] +

Preamble +

The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. +

This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. +

When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. +

To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. +

For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. +

We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. +

To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. +

Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. +

Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. +

When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. +

We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. +

For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. +

In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. +

Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. +

The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. +

GNU LESSER GENERAL PUBLIC LICENSE +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION +

0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". +

A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. +

The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) +

"Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. +

Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. +

    +
  1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library.
+

You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. +

2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: +

    +
  1. The modified work must itself be a software library.
  2. You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change.
  3. You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License.
  4. If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful.
+

(For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) +

These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. +

Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. +

In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. +

3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. +

Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. +

This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. +

4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. +

If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. +

5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. +

However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. +

When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. +

If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) +

Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. +

6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. +

You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: +

    +
  1. Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.)
  2. Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with.
  3. Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution.
  4. If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place.
  5. Verify that the user has already received a copy of these + materials or that you have already sent this user a copy.
+

For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. +

It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. +

7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: +

    +
  1. Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above.
  2. Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work.
  3. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance.
  4. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it.
  5. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License.
  6. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library.
+

If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. +

It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. +

This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. +

12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. +

13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. +

Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. +

14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. +

NO WARRANTY +

15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. +

16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. +

END OF TERMS AND CONDITIONS +

How to Apply These Terms to Your New Libraries +

If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). +

To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. +

<one line to give the library's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> +

This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. +

This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. +

You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +

Also add information on how to contact you by electronic and paper mail. +

You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: +

Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. +

<signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice +

That's all there is to it! +


+LGPLv3 +
+                   GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+

Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. +

+

This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. +

0. Additional Definitions. +

As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. +

"The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. +

An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. +

A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". +

The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. +

The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. +

    +
  1. Exception to Section 3 of the GNU GPL.
+

You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. +

2. Conveying Modified Versions. +

If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: +

    +
  1. under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or
  2. under the GNU GPL, with none of the additional permissions of + this License applicable to that copy.
  3. Object Code Incorporating Material from Library Header Files.
+

The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: +

    +
  1. Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License.
  2. Accompany the object code with a copy of the GNU GPL and this license + document.
  3. Combined Works.
+

You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: +

    +
  1. Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License.
  2. Accompany the Combined Work with a copy of the GNU GPL and this license + document.
  3. For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document.
  4. Do one of the following:
+
+       0) Convey the Minimal Corresponding Source under the terms of this
+       License, and the Corresponding Application Code in a form
+       suitable for, and under terms that permit, the user to
+       recombine or relink the Application with a modified version of
+       the Linked Version to produce a modified Combined Work, in the
+       manner specified by section 6 of the GNU GPL for conveying
+       Corresponding Source.
+       1) Use a suitable shared library mechanism for linking with the
+       Library.  A suitable mechanism is one that (a) uses at run time
+       a copy of the Library already present on the user's computer
+       system, and (b) will operate properly with a modified version
+       of the Library that is interface-compatible with the Linked
+       Version.
+

e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) +

5. Combined Libraries. +

You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: +

    +
  1. Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License.
  2. Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work.
  3. Revised Versions of the GNU Lesser General Public License.
+

The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. +

Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. +

If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. +


+GPLv1 + +
+                    GNU GENERAL PUBLIC LICENSE
+                     Version 1, February 1989
+

Copyright (C) 1989 Free Software Foundation, Inc. +

51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +

Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. +

Preamble +

The license agreements of most software companies try to keep users +at the mercy of those companies. By contrast, our General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. The +General Public License applies to the Free Software Foundation's +software and to any other program whose authors commit to using it. +You can use it for your programs, too. +

When we speak of free software, we are referring to freedom, not +price. Specifically, the General Public License is designed to make +sure that you have the freedom to give away or sell copies of free +software, that you receive source code or can get it if you want it, +that you can change the software or use pieces of it in new free +programs; and that you know you can do these things. +

To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. +

For example, if you distribute copies of a such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must tell them their rights. +

We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. +

Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. +

The precise terms and conditions for copying, distribution and +modification follow. +

GNU GENERAL PUBLIC LICENSE +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION +

0. This License Agreement applies to any program or other work which +contains a notice placed by the copyright holder saying it may be +distributed under the terms of this General Public License. The +"Program", below, refers to any such program or work, and a "work based +on the Program" means either the Program or any work containing the +Program or a portion of it, either verbatim or with modifications. Each +licensee is addressed as "you". +

    +
  1. You may copy and distribute verbatim copies of the Program's source +code as you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this +General Public License and to the absence of any warranty; and give any +other recipients of the Program a copy of this General Public License +along with the Program. You may charge a fee for the physical act of +transferring a copy.
  2. You may modify your copy or copies of the Program or any portion of +it, and copy and distribute such modifications under the terms of Paragraph +1 above, provided that you also do the following:
      +
    1. cause the modified files to carry prominent notices stating that + you changed the files and the date of any change; and
    2. cause the whole of any work that you distribute or publish, that + in whole or in part contains the Program or any part thereof, either + with or without modifications, to be licensed at no charge to all + third parties under the terms of this General Public License (except + that you may choose to grant warranty protection to some or all + third parties, at your option).
    3. If the modified program normally reads commands interactively when + run, you must cause it, when started running for such interactive use + in the simplest and most usual way, to print or display an + announcement including an appropriate copyright notice and a notice + that there is no warranty (or else, saying that you provide a + warranty) and that users may redistribute the program under these + conditions, and telling the user how to view a copy of this General + Public License.
    4. You may charge a fee for the physical act of transferring a + copy, and you may at your option offer warranty protection in + exchange for a fee.
    +
+

Mere aggregation of another independent work with the Program (or its +derivative) on a volume of a storage or distribution medium does not bring +the other work under the scope of these terms. +

3. You may copy and distribute the Program (or a portion or derivative of +it, under Paragraph 2) in object code or executable form under the terms of +Paragraphs 1 and 2 above provided that you also do one of the following: +

    +
  1. accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of + Paragraphs 1 and 2 above; or,
  2. accompany it with a written offer, valid for at least three + years, to give any third party free (except for a nominal charge + for the cost of distribution) a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of + Paragraphs 1 and 2 above; or,
  3. accompany it with the information you received as to where the + corresponding source code may be obtained. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form alone.)
+

Source code for a work means the preferred form of the work for making +modifications to it. For an executable file, complete source code means +all the source code for all modules it contains; but, as a special +exception, it need not include source code for modules which are standard +libraries that accompany the operating system on which the executable +file runs, or for standard header files or definitions files that +accompany that operating system. +

4. You may not copy, modify, sublicense, distribute or transfer the +Program except as expressly provided under this General Public License. +Any attempt otherwise to copy, modify, sublicense, distribute or transfer +the Program is void, and will automatically terminate your rights to use +the Program under this License. However, parties who have received +copies, or rights to use copies, from you under this General Public +License will not have their licenses terminated so long as such parties +remain in full compliance. +

5. By copying, distributing or modifying the Program (or any work based +on the Program) you indicate your acceptance of this license to do so, +and all its terms and conditions. +

6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the original +licensor to copy, distribute or modify the Program subject to these +terms and conditions. You may not impose any further restrictions on the +recipients' exercise of the rights granted herein. +

7. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. +

Each version is given a distinguishing version number. If the Program +specifies a version number of the license which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +the license, you may choose any version ever published by the Free Software +Foundation. +

8. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. +

NO WARRANTY +

9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. +

10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. +

END OF TERMS AND CONDITIONS +

Appendix: How to Apply These Terms to Your New Programs +

If you develop a new program, and you want it to be of the greatest +possible use to humanity, the best way to achieve this is to make it +free software which everyone can redistribute and change under these +terms. +

To do so, attach the following notices to the program. It is safest to +attach them to the start of each source file to most effectively convey +the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. +

<one line to give the program's name and a brief idea of what it does.> + Copyright (C) 19yy <name of author> +

This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. +

This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. +

You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA +

+

Also add information on how to contact you by electronic and paper mail. +

If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: +

Gnomovision version 69, Copyright (C) 19xx name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. +

The hypothetical commands `show w' and `show c' should show the +appropriate parts of the General Public License. Of course, the +commands you use may be called something other than `show w' and `show +c'; they could even be mouse-clicks or menu items--whatever suits your +program. +

You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here a sample; alter the names: +

Yoyodyne, Inc., hereby disclaims all copyright interest in the + program `Gnomovision' (a program to direct compilers to make passes + at assemblers) written by James Hacker. +

<signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice +

That's all there is to it! +


+GPLv2 +
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 2, June 1991
+

Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. +

Preamble +

The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. +

When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. +

To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. +

For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. +

We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. +

Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. +

Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. +

The precise terms and conditions for copying, distribution and +modification follow. +

GNU GENERAL PUBLIC LICENSE +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION +

0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". +

Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. +

    +
  1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program.
+

You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. +

2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: +

    +
  1. You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change.
  2. You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License.
  3. If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.)
+

These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. +

Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. +

In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. +

3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: +

    +
  1. Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or,
  2. Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or,
  3. Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.)
+

The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. +

If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. +

4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. +

5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. +

6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. +

7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. +

If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. +

It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. +

This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. +

8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. +

9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. +

Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. +

10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. +

NO WARRANTY +

11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. +

12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. +

END OF TERMS AND CONDITIONS +

How to Apply These Terms to Your New Programs +

If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. +

To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. +

<one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> +

This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. +

This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. +

You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +

Also add information on how to contact you by electronic and paper mail. +

If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: +

Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. +

The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. +

You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: +

Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. +

<signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice +

This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. +


+GPLv3 +
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+

Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. +

Preamble +

The GNU General Public License is a free, copyleft license for +software and other kinds of works. +

The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. +

When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. +

To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. +

For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. +

Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. +

For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. +

Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. +

Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. +

The precise terms and conditions for copying, distribution and +modification follow. +

TERMS AND CONDITIONS +

0. Definitions. +

"This License" refers to version 3 of the GNU General Public License. +

"Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. +

"The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. +

To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. +

A "covered work" means either the unmodified Program or a work based +on the Program. +

To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. +

To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. +

An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. +

    +
  1. Source Code.
+

The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. +

A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. +

The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. +

The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. +

The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. +

The Corresponding Source for a work in source code form is that +same work. +

2. Basic Permissions. +

All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. +

You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. +

Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. +

3. Protecting Users' Legal Rights From Anti-Circumvention Law. +

No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. +

When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. +

4. Conveying Verbatim Copies. +

You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. +

You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. +

5. Conveying Modified Source Versions. +

You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: +

    +
  1. The work must carry prominent notices stating that you modified + it, and giving a relevant date.
  2. The work must carry prominent notices stating that it is + released under this License and any conditions added under section +
  3. This requirement modifies the requirement in section 4 to + "keep intact all notices".
  4. You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it.
  5. If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so.
+

A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. +

6. Conveying Non-Source Forms. +

You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: +

    +
  1. Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange.
  2. Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge.
  3. Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b.
  4. Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements.
  5. Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d.
+

A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. +

A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. +

"Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. +

If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). +

The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. +

Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. +

7. Additional Terms. +

"Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. +

When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. +

Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: +

    +
  1. Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or
  2. Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or
  3. Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or
  4. Limiting the use for publicity purposes of names of licensors or + authors of the material; or
  5. Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or
  6. Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors.
+

All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. +

If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. +

Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. +

8. Termination. +

You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). +

However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. +

Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. +

Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. +

9. Acceptance Not Required for Having Copies. +

You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. +

10. Automatic Licensing of Downstream Recipients. +

Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. +

An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. +

You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. +

11. Patents. +

A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". +

A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. +

Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. +

In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. +

If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. +

If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. +

A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. +

Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. +

12. No Surrender of Others' Freedom. +

If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. +

13. Use with the GNU Affero General Public License. +

Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. +

14. Revised Versions of this License. +

The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. +

Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. +

If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. +

Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. +

15. Disclaimer of Warranty. +

THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. +

16. Limitation of Liability. +

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. +

17. Interpretation of Sections 15 and 16. +

If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. +

END OF TERMS AND CONDITIONS +

How to Apply These Terms to Your New Programs +

If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. +

To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. +

<one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> +

This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. +

This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. +

You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +

Also add information on how to contact you by electronic and paper mail. +

If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: +

<program> Copyright (C) <year> <name of author> + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. +

The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". +

You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<http://www.gnu.org/licenses/>. +

The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<http://www.gnu.org/philosophy/why-not-lgpl.html>. +


+OpenSSL License + +

LICENSE ISSUES +


+

The OpenSSL toolkit stays under a dual license, i.e. both the conditions of + the OpenSSL License and the original SSLeay license apply to the toolkit. + See below for the actual license texts. Actually both licenses are BSD-style + Open Source licenses. In case of any license issues related to OpenSSL + please contact openssl-core@openssl.org. +

OpenSSL License

+

/* ==================================================================== +

    +
  • Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. + * +
  • Redistribution and use in source and binary forms, with or without +
  • modification, are permitted provided that the following conditions +
  • are met: + * +
  • 1. Redistributions of source code must retain the above copyright +
  • notice, this list of conditions and the following disclaimer. + * +
  • 2. Redistributions in binary form must reproduce the above copyright +
  • notice, this list of conditions and the following disclaimer in +
  • the documentation and/or other materials provided with the +
  • distribution. + * +
  • 3. All advertising materials mentioning features or use of this +
  • software must display the following acknowledgment: +
  • "This product includes software developed by the OpenSSL Project +
  • for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * +
  • 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to +
  • endorse or promote products derived from this software without +
  • prior written permission. For written permission, please contact +
  • openssl-core@openssl.org. + * +
  • 5. Products derived from this software may not be called "OpenSSL" +
  • nor may "OpenSSL" appear in their names without prior written +
  • permission of the OpenSSL Project. + * +
  • 6. Redistributions of any form whatsoever must retain the following +
  • acknowledgment: +
  • "This product includes software developed by the OpenSSL Project +
  • for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * +
  • THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY +
  • EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +
  • IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +
  • PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR +
  • ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
  • SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +
  • NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +
  • LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +
  • HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +
  • STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +
  • ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +
  • OF THE POSSIBILITY OF SUCH DAMAGE. +
    + * +
  • This product includes cryptographic software written by Eric Young +
  • (eay@cryptsoft.com). This product includes software written by Tim +
  • Hudson (tjh@cryptsoft.com). + * + */
+

Original SSLeay License

+

/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) +

    +
  • All rights reserved. + * +
  • This package is an SSL implementation written +
  • by Eric Young (eay@cryptsoft.com). +
  • The implementation was written so as to conform with Netscapes SSL. + * +
  • This library is free for commercial and non-commercial use as long as +
  • the following conditions are aheared to. The following conditions +
  • apply to all code found in this distribution, be it the RC4, RSA, +
  • lhash, DES, etc., code; not just the SSL code. The SSL documentation +
  • included with this distribution is covered by the same copyright terms +
  • except that the holder is Tim Hudson (tjh@cryptsoft.com). + * +
  • Copyright remains Eric Young's, and as such any Copyright notices in +
  • the code are not to be removed. +
  • If this package is used in a product, Eric Young should be given attribution +
  • as the author of the parts of the library used. +
  • This can be in the form of a textual message at program startup or +
  • in documentation (online or textual) provided with the package. + * +
  • Redistribution and use in source and binary forms, with or without +
  • modification, are permitted provided that the following conditions +
  • are met: +
  • 1. Redistributions of source code must retain the copyright +
  • notice, this list of conditions and the following disclaimer. +
  • 2. Redistributions in binary form must reproduce the above copyright +
  • notice, this list of conditions and the following disclaimer in the +
  • documentation and/or other materials provided with the distribution. +
  • 3. All advertising materials mentioning features or use of this software +
  • must display the following acknowledgement: +
  • "This product includes cryptographic software written by +
  • Eric Young (eay@cryptsoft.com)" +
  • The word 'cryptographic' can be left out if the rouines from the library +
  • being used are not cryptographic related :-). +
  • 4. If you include any Windows specific code (or a derivative thereof) from +
  • the apps directory (application code) you must include an acknowledgement: +
  • "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * +
  • THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND +
  • ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +
  • IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +
  • ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +
  • FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +
  • DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +
  • OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +
  • HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +
  • LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +
  • OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +
  • SUCH DAMAGE. + * +
  • The licence and distribution terms for any publically available version or +
  • derivative of this code cannot be changed. i.e. this code cannot simply be +
  • copied and put under another distribution licence +
  • [including the GNU Public Licence.] + */ +
+
+Artistic License +

The "Artistic License" +

Preamble +

The intent of this document is to state the conditions under which a +Package may be copied, such that the Copyright Holder maintains some +semblance of artistic control over the development of the package, +while giving the users of the package the right to use and distribute +the Package in a more-or-less customary fashion, plus the right to make +reasonable modifications. +

+
Definitions
+
+

"Package" refers to the collection of files distributed by the +Copyright Holder, and derivatives of that collection of files +created through textual modification. +

"Standard Version" refers to such a Package if it has not been +modified, or has been modified in accordance with the wishes +of the Copyright Holder as specified below. +

"Copyright Holder" is whoever is named in the copyright or +copyrights for the package. +

"You" is you, if you're thinking about copying or distributing +this Package. +

"Reasonable copying fee" is whatever you can justify on the +basis of media cost, duplication charges, time of people involved, +and so on. (You will not be required to justify it to the +Copyright Holder, but only to the computing community at large +as a market that must bear the fee.) +

"Freely Available" means that no fee is charged for the item +itself, though there may be fees involved in handling the item. +It also means that recipients of the item may redistribute it +under the same conditions they received it. +

    +
  1. You may make and give away verbatim copies of the source form of the +Standard Version of this Package without restriction, provided that you +duplicate all of the original copyright notices and associated disclaimers.
  2. You may apply bug fixes, portability fixes and other modifications +derived from the Public Domain or from the Copyright Holder. A Package +modified in such a way shall still be considered the Standard Version.
  3. You may otherwise modify your copy of this Package in any way, provided +that you insert a prominent notice in each changed file stating how and +when you changed that file, and provided that you do at least ONE of the +following:
      +
    1. place your modifications in the Public Domain or otherwise make them + Freely Available, such as by posting said modifications to Usenet or + an equivalent medium, or placing the modifications on a major archive + site such as uunet.uu.net, or by allowing the Copyright Holder to include + your modifications in the Standard Version of the Package.
    2. use the modified Package only within your corporation or organization.
    3. rename any non-standard executables so the names do not conflict + with standard executables, which must also be provided, and provide + a separate manual page for each non-standard executable that clearly + documents how it differs from the Standard Version.
    4. make other distribution arrangements with the Copyright Holder.
    +
  4. You may distribute the programs of this Package in object code or +executable form, provided that you do at least ONE of the following:
      +
    1. distribute a Standard Version of the executables and library files, + together with instructions (in the manual page or equivalent) on where + to get the Standard Version.
    2. accompany the distribution with the machine-readable source of + the Package with your modifications.
    3. give non-standard executables non-standard names, and clearly + document the differences in manual pages (or equivalent), together + with instructions on where to get the Standard Version.
    4. make other distribution arrangements with the Copyright Holder.
    +
  5. You may charge a reasonable copying fee for any distribution of this +Package. You may charge any fee you choose for support of this +Package. You may not charge a fee for this Package itself. However, +you may distribute this Package in aggregate with other (possibly +commercial) programs as part of a larger (possibly commercial) software +distribution provided that you do not advertise this Package as a +product of your own. You may embed this Package's interpreter within +an executable of yours (by linking); this shall be construed as a mere +form of aggregation, provided that the complete Standard Version of the +interpreter is so embedded.
  6. The scripts and library files supplied as input to or produced as +output from the programs of this Package do not automatically fall +under the copyright of this Package, but belong to whoever generated +them, and may be sold commercially, and may be aggregated with this +Package. If such scripts or library files are aggregated with this +Package via the so-called "undump" or "unexec" methods of producing a +binary executable image, then distribution of such an image shall +neither be construed as a distribution of this Package nor shall it +fall under the restrictions of Paragraphs 3 and 4, provided that you do +not represent such an executable image as a Standard Version of this +Package.
  7. C subroutines (or comparably compiled subroutines in other +languages) supplied by you and linked into this Package in order to +emulate subroutines and variables of the language defined by this +Package shall not be considered part of this Package, but are the +equivalent of input as in Paragraph 6, provided these subroutines do +not change the language in any way that would cause it to fail the +regression tests for the language.
  8. Aggregation of this Package with a commercial distribution is always +permitted provided that the use of this Package is embedded; that is, +when no overt attempt is made to make this Package's interfaces visible +to the end user of the commercial distribution. Such use shall not be +construed as a distribution of this Package.
  9. The name of the Copyright Holder may not be used to endorse or promote +products derived from this software without specific prior written permission.
  10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+

The End +


+bzip2 License +

This program, "bzip2" and associated library "libbzip2", are copyright (C) 1996-2000 Julian R Seward. All rights reserved. +

Redistribution and use in source and binary forms, with or without modification, are permitted +provided that the following conditions are met: +

    +
  1. Redistributions of source code must retain the above copyright notice, this list of conditions +and the following disclaimer.
  2. he origin of this software must not be misrepresented; you must not claim that you wrote +the original software. If you use this software in a product, an acknowledgment in the product +documentation would be appreciated but is not required.
  3. Altered source versions must be plainly marked as such, and must not be misrepresented +as being the original software.
  4. The name of the author may not be used to endorse or promote products derived from this +software without specific prior written permission.
+

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +


+ICU License +

COPYRIGHT AND PERMISSION NOTICE +

Copyright (c) 1995-2011 International Business Machines Corporation and others +

All rights reserved. +

Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished +to do so, provided that the above copyright notice(s) and this permission +notice appear in all copies of the Software and that both the above copyright +notice(s) and this permission notice appear in supporting documentation. +

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE +COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE +FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA +OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH +THE USE OR PERFORMANCE OF THIS SOFTWARE. +

Except as contained in this notice, the name of a copyright holder shall +not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization of the +copyright holder. +


+Red Hat Software License +

Copyright (c) 1998 Red Hat Software +

Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +

The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. +

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +

Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. +


+libpng license +

This copy of the libpng notices is provided for your convenience. In case of +any discrepancy between this copy and the notices in the file png.h that is +included in the libpng distribution, the latter shall prevail. +

COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: +

If you modify libpng you may insert additional notices immediately following +this sentence. +

This code is released under the libpng license. +

libpng versions 1.2.6, August 15, 2004, through 1.2.46, July 9, 2011, are +Copyright (c) 2004, 2006-2009 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-1.2.5 +with the following individual added to the list of Contributing Authors +

Cosmin Truta +

libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are +Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-1.0.6 +with the following individuals added to the list of Contributing Authors +

Simon-Pierre Cadieux
+ Eric S. Raymond
+ Gilles Vollant +

and with the following additions to the disclaimer: +

There is no warranty against interference with your enjoyment of the + library or against infringement. There is no warranty that our + efforts or the library will fulfill any of your particular purposes + or needs. This library is provided with all faults, and the entire + risk of satisfactory quality, performance, accuracy, and effort is with + the user. +

libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are +Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-0.96, +with the following individuals added to the list of Contributing Authors: +

Tom Lane
+ Glenn Randers-Pehrson
+ Willem van Schaik +

libpng versions 0.89, June 1996, through 0.96, May 1997, are +Copyright (c) 1996, 1997 Andreas Dilger +Distributed according to the same disclaimer and license as libpng-0.88, +with the following individuals added to the list of Contributing Authors: +

John Bowler
+ Kevin Bracey
+ Sam Bushell
+ Magnus Holmgren
+ Greg Roelofs
+ Tom Tanner +

libpng versions 0.5, May 1995, through 0.88, January 1996, are +Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. +

For the purposes of this copyright and license, "Contributing Authors" +is defined as the following set of individuals: +

Andreas Dilger
+ Dave Martindale
+ Guy Eric Schalnat
+ Paul Schmidt
+ Tim Wegner +

The PNG Reference Library is supplied "AS IS". The Contributing Authors +and Group 42, Inc. disclaim all warranties, expressed or implied, +including, without limitation, the warranties of merchantability and of +fitness for any purpose. The Contributing Authors and Group 42, Inc. +assume no liability for direct, indirect, incidental, special, exemplary, +or consequential damages, which may result from the use of the PNG +Reference Library, even if advised of the possibility of such damage. +

Permission is hereby granted to use, copy, modify, and distribute this +source code, or portions hereof, for any purpose, without fee, subject +to the following restrictions: +

    +
  1. The origin of this source code must not be misrepresented.
  2. Altered versions must be plainly marked as such and must not + be misrepresented as being the original source.
  3. This Copyright notice may not be removed or altered from any + source or altered source distribution.
+

The Contributing Authors and Group 42, Inc. specifically permit, without +fee, and encourage the use of this source code as a component to +supporting the PNG file format in commercial products. If you use this +source code in a product, acknowledgment is not required but would be +appreciated. +

+

A "png_get_copyright" function is available, for convenient use in "about" +boxes and the like: +

printf("%s",png_get_copyright(NULL)); +

Also, the PNG logo (in PNG format, of course) is supplied in the +files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). +

Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a +certification mark of the Open Source Initiative. +

Glenn Randers-Pehrson
+glennrp at users.sourceforge.net
+July 9, 2011 +


+X Consortium license +

Copyright (C) 1996 X Consortium +

Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: +

The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. +

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +


+MIT license +

Copyright (C) <year> <copyright holders> +

Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: +

The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +


+Zlib license +

Copyright (c) <''year''> <''copyright holders''> +

This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. +

Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: +

    +
  1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required.
  2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software.
  3. This notice may not be removed or altered from any source + distribution.
+
+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. +

+
+libjpeg License +

This is Debian's prepackaged version of the `jpeg library' by the Independent +JPEG Group. +

This package was created by Mark Mickan <mmickan@debian.org> from sources +which can be found at ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz +

It is partly based on the libjpeg6a package originally put together by +Andy Guy <awpguy@acs.ucalgary.ca> and later maintained by Mark Mickan. +

Current Debian maintainer is Bill Allombert <ballombe@debian.org>. +

LEGAL ISSUES [ from README supplied with source - MM ]

+

In plain English: +

    +
  1. We don't promise that this software works. (But if you find any bugs, + please let us know!) +
  2. You can use this software for whatever you want. You don't have to pay us. +
  3. You may not pretend that you wrote this software. If you use it in a + program, you must acknowledge somewhere in your documentation that + you've used the IJG code.
+

In legalese: +

The authors make NO WARRANTY or representation, either express or implied, +with respect to this software, its quality, accuracy, merchantability, or +fitness for a particular purpose. This software is provided "AS IS", and you, +its user, assume the entire risk as to its quality and accuracy. +

This software is copyright (C) 1991-2009, Thomas G. Lane, Guido Vollbeding. +All Rights Reserved except as specified below. +

Permission is hereby granted to use, copy, modify, and distribute this +software (or portions thereof) for any purpose, without fee, subject to these +conditions:
+(1) If any part of the source code for this software is distributed, then this +README file must be included, with this copyright and no-warranty notice +unaltered; and any additions, deletions, or changes to the original files +must be clearly indicated in accompanying documentation. +(2) If only executable code is distributed, then the accompanying +documentation must state that "this software is based in part on the work of +the Independent JPEG Group".
+(3) Permission for use of this software is granted only if the user accepts +full responsibility for any undesirable consequences; the authors accept +NO LIABILITY for damages of any kind. +

These conditions apply to any software derived from or based on the IJG code, +not just to the unmodified library. If you use our work, you ought to +acknowledge us. +

Permission is NOT granted for the use of any IJG author's name or company name +in advertising or publicity relating to this software or products derived from +it. This software may be referred to only as "the Independent JPEG Group's +software". +

We specifically permit and encourage the use of this software as the basis of +commercial products, provided that all warranty or liability claims are +assumed by the product vendor. +

+

ansi2knr.c is included in this distribution by permission of L. Peter Deutsch, +sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA. +ansi2knr.c is NOT covered by the above copyright and conditions, but instead +by the usual distribution terms of the Free Software Foundation; principally, +that you must include source code if you redistribute it. (See the file +ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part +of any program generated from the IJG code, this does not limit you more than +the foregoing paragraphs do. +

The Unix configuration script "configure" was produced with GNU Autoconf. +It is copyright by the Free Software Foundation but is freely distributable. +The same holds for its supporting scripts (config.guess, config.sub, +ltconfig, ltmain.sh). Another support script, install-sh, is copyright +by M.I.T. but is also freely distributable. +

It appears that the arithmetic coding option of the JPEG spec is covered by +patents owned by IBM, AT&T, and Mitsubishi. Hence arithmetic coding cannot +legally be used without obtaining one or more licenses. For this reason, +support for arithmetic coding has been removed from the free JPEG software. +(Since arithmetic coding provides only a marginal gain over the unpatented +Huffman mode, it is unlikely that very many implementations will support it.) +So far as we are aware, there are no patent restrictions on the remaining +code. +

The IJG distribution formerly included code to read and write GIF files. +To avoid entanglement with the Unisys LZW patent, GIF reading support has +been removed altogether, and the GIF writer has been simplified to produce +"uncompressed GIFs". This technique does not use the LZW algorithm; the +resulting GIF files are larger than usual, but are readable by all standard +GIF decoders. +

We are required to state that +

"The Graphics Interchange Format(c) is the Copyright property of + CompuServe Incorporated. GIF(sm) is a Service Mark property of + CompuServe Incorporated." +


+ncurse License +

This is the Debian prepackaged version of the ncurses +library and terminfo utilities. ncurses/terminfo was originally written +by Pavel Curtis and Zeyd M. Ben-Halim <zmbenhal@netcom.com>, and is +currently held by the Free Software Foundation. +

This package was put together by Vaidhyanathan G Mayilrangam +<vaidhy@debian.org> and Joel Klecker <espy@debian.org>, using sources +obtained from ftp://ftp.gnu.org/gnu/ncurses/ncurses-5.0.tar.gz. +

It is based somewhat on work done by Bruce Perens <Bruce@Pixar.com>, +David Engel <david@elo.ods.com>. Michael Alan Dorman +<mdorman@debian.org>, Richard Braakman <dark@xs4all.nl>, James Troup +<jjtroup@comp.brad.ac.uk>, J.H.M. Dassen (Ray) +<jdassen@wi.LeidenUniv.nl>, and Galen Hazelwood <galenh@micron.net> +over various years. +

+
+
Changes
+
    +
  • added Debian package maintenance system files +
  • changed Makefile.in's to compile with -D_REENTRANT +
  • changed configure.in to support proper compilation of debugging libraries +
  • Fixed tget{flag,num,str} in lib_termcap ("long" strings work now)
+
+

Changes to terminfo.src: +

    +
  • Removed ich(1) from linux, screen, vt320
+

/**************************************************************************** +

    +
  • Copyright (c) 1998 Free Software Foundation, Inc. +
  • +
  • Permission is hereby granted, free of charge, to any person obtaining a * +
  • copy of this software and associated documentation files (the * +
  • "Software"), to deal in the Software without restriction, including * +
  • without limitation the rights to use, copy, modify, merge, publish, * +
  • distribute, distribute with modifications, sublicense, and/or sell * +
  • copies of the Software, and to permit persons to whom the Software is * +
  • furnished to do so, subject to the following conditions: +
  • +
  • The above copyright notice and this permission notice shall be included * +
  • in all copies or substantial portions of the Software. +
  • +
  • THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +
  • OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +
  • MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +
  • IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +
  • DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +
  • OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +
  • THE USE OR OTHER DEALINGS IN THE SOFTWARE. +
  • +
  • Except as contained in this notice, the name(s) of the above copyright * +
  • holders shall not be used in advertising or otherwise to promote the * +
  • sale, use or other dealings in this Software without prior written * +
  • authorization. + ***************************************************************************/ +
+
+GCC 4.5 License +

This is the Debian GNU/Linux prepackaged version of the GNU compiler +collection, containing Ada, C, C++, Fortran 95, Java, Objective-C, +Objective-C++, and Treelang compilers, documentation, and support +libraries. In addition, Debian provides the gdc compiler, either in +the same source package, or built from a separate same source package. +Packaging is done by the Debian GCC Maintainers +<debian-gcc@lists.debian.org>, with sources obtained from: +

ftp://gcc.gnu.org/pub/gcc/releases/ (for full releases) +

+  svn://gcc.gnu.org/svn/gcc/           (for prereleases)
+  http://bitbucket.org/goshawk/gdc     (for D)
+

The current gcc-4.5 source package is taken from the SVN gcc-4_5-branch. +

Changes: See changelog.Debian.gz +

Debian splits the GNU Compiler Collection into packages for each language, +library, and documentation as follows: +

Language Compiler package Library package Documentation

+
+Ada            gnat-4.5          libgnat-4.5        gnat-4.5-doc
+C              gcc-4.5                              gcc-4.5-doc
+C++            g++-4.5           libstdc++6         libstdc++6-4.5-doc
+D              gdc-4.5
+Fortran 95     gfortran-4.5      libgfortran3       gfortran-4.5-doc
+Java           gcj-4.5           libgcj10           libgcj-doc
+Objective C    gobjc-4.5         libobjc2
+
+

Objective C++ gobjc++-4.5 +

For some language run-time libraries, Debian provides source files, +development files, debugging symbols and libraries containing positionindependent +code in separate packages: +

Language Sources Development Debugging Position-Independent

+
+C++                                  libstdc++6-4.5-dbg  libstdc++6-4.5-pic
+D         libphobos-4.5-dev
+Java      libgcj10-src libgcj10-dev  libgcj10-dbg
+

Additional packages include: +

All languages: +

+libgcc1, libgcc2, libgcc4       GCC intrinsics (platform-dependent)
+gcc-4.5-base                    Base files common to all compilers
+gcc-4.5-soft-float              Software floating point (ARM only)
+gcc-4.5-source                  The sources with patches
+
+
Ada
+
libgnatvsn-dev, libgnatvsn4.5 GNAT version library +libgnatprj-dev, libgnatprj4.5 GNAT Project Manager library
+

C:
+cpp-4.5, cpp-4.5-doc GNU C Preprocessor +libmudflap0-dev, libmudflap0 Library for instrumenting pointers +

+libssp0-dev, libssp0            GCC stack smashing protection library
+fixincludes                     Fix non-ANSI header files
+protoize                        Create/remove ANSI prototypes from C code
+
+
Java
+
gij The Java bytecode interpreter and VM +libgcj-common Common files for the Java run-time +libgcj10-awt The Abstract Windowing Toolkit +libgcj10-jar Java ARchive for the Java run-time
+

C, C++ and Fortran 95:
+libgomp1-dev, libgomp1 GCC OpenMP (GOMP) support library +

Biarch support: On some 64-bit platforms which can also run 32-bit code, +Debian provides additional packages containing 32-bit versions of some +libraries. These packages have names beginning with 'lib32' instead of +'lib', for example lib32stdc++6. Similarly, on some 32-bit platforms which +can also run 64-bit code, Debian provides additional packages with names +beginning with 'lib64' instead of 'lib'. These packages contain 64-bit +versions of the libraries. (At this time, not all platforms and not all +libraries support biarch.) The license terms for these lib32 or lib64 +packages are identical to the ones for the lib packages. +

+

COPYRIGHT STATEMENTS AND LICENSING TERMS +

+

GCC is Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, +1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +2008 Free Software Foundation, Inc. +

GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. +

GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. +

Files that have exception clauses are licensed under the terms of the +GNU General Public License; either version 3, or (at your option) any +later version. +

On Debian GNU/Linux systems, the complete text of the GNU General +Public License is in `/usr/share/common-licenses/GPL', version 3 of this +license in `/usr/share/common-licenses/GPL-3'. +

The following runtime libraries are licensed under the terms of the +GNU General Public License (v3 or later) with version 3.1 of the GCC +Runtime Library Exception (included in this file): +

    +
  • libgcc (libgcc/, gcc/libgcc2.[ch], gcc/unwind, gcc/gthr, + gcc/coretypes.h, gcc/crtstuff.c, gcc/defaults.h, gcc/dwarf2.h, + gcc/emults.c, gcc/gbl-ctors.h, gcc/gcov-io.h, gcc/libgcov.c, + gcc/tsystem.h, gcc/typeclass.h). +
  • libdecnumber +
  • libgomp +
  • libssp +
  • libstdc++-v3 +
  • libobjc +
  • libmudflap +
  • libgfortran +
  • The libgnat-4.5 Ada support library and libgnatvsn library. +
  • Various config files in gcc/config/ used in runtime libraries.
+

In contrast, libgnatprj is licensed under the terms of the pure GNU +General Public License. +

The libgcj library is licensed under the terms of the GNU General +Public License, with a special exception: +

Linking this library statically or dynamically with other modules + is making a combined work based on this library. Thus, the terms + and conditions of the GNU General Public License cover the whole + combination. +

As a special exception, the copyright holders of this library give + you permission to link this library with independent modules to + produce an executable, regardless of the license terms of these + independent modules, and to copy and distribute the resulting + executable under terms of your choice, provided that you also + meet, for each linked independent module, the terms and conditions + of the license of that module. An independent module is a module + which is not derived from or based on this library. If you modify + this library, you may extend this exception to your version of the + library, but you are not obligated to do so. If you do not wish + to do so, delete this exception statement from your version. +

The libffi library is licensed under the following terms: +

libffi - Copyright (c) 1996-2003 Red Hat, Inc. +

Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + ``Software''), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: +

The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. +

THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. +

+

The documentation is licensed under the GNU Free Documentation License (v1.2). +On Debian GNU/Linux systems, the complete text of this license is in +`/usr/share/common-licenses/GFDL-1.2'. +

+

GCC RUNTIME LIBRARY EXCEPTION +

Version 3.1, 31 March 2009 +

Copyright (C) 2009 Free Software Foundation, Inc. <http://fsf.org/> +

Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. +

This GCC Runtime Library Exception ("Exception") is an additional +permission under section 7 of the GNU General Public License, version +3 ("GPLv3"). It applies to a given file (the "Runtime Library") that +bears a notice placed by the copyright holder of the file stating that +the file is governed by GPLv3 along with this Exception. +

When you use GCC to compile a program, GCC may combine portions of +certain GCC header files and runtime libraries with the compiled +program. The purpose of this Exception is to allow compilation of +non-GPL (including proprietary) programs to use, in this way, the +header files and runtime libraries covered by this Exception. +

0. Definitions. +

A file is an "Independent Module" if it either requires the Runtime +Library for execution after a Compilation Process, or makes use of an +interface provided by the Runtime Library, but is not otherwise based +on the Runtime Library. +

"GCC" means a version of the GNU Compiler Collection, with or without +modifications, governed by version 3 (or a specified later version) of +the GNU General Public License (GPL) with the option of using any +subsequent versions published by the FSF. +

"GPL-compatible Software" is software whose conditions of propagation, +modification and use would permit combination with GCC in accord with +the license of GCC. +

"Target Code" refers to output from any compiler for a real or virtual +target processor architecture, in executable form or suitable for +input to an assembler, loader, linker and/or execution +phase. Notwithstanding that, Target Code does not include data in any +format that is used as a compiler intermediate representation, or used +for producing a compiler intermediate representation. +

The "Compilation Process" transforms code entirely represented in +non-intermediate languages designed for human-written code, and/or in +Java Virtual Machine byte code, into Target Code. Thus, for example, +use of source code generators and preprocessors need not be considered +part of the Compilation Process, since the Compilation Process can be +understood as starting with the output of the generators or +preprocessors. +

A Compilation Process is "Eligible" if it is done using GCC, alone or +with other GPL-compatible software, or if it is done without using any +work based on GCC. For example, using non-GPL-compatible Software to +optimize any GCC intermediate representations would not qualify as an +Eligible Compilation Process. +

    +
  1. Grant of Additional Permission.
+

You have permission to propagate a work of Target Code formed by +combining the Runtime Library with Independent Modules, even if such +propagation would otherwise violate the terms of GPLv3, provided that +all Target Code was generated by Eligible Compilation Processes. You +may then convey such a combination under terms of your choice, +consistent with the licensing of the Independent Modules. +

2. No Weakening of GCC Copyleft. +

The availability of this Exception does not imply any general +presumption that third-party software is unaffected by the copyleft +requirements of the license of GCC. +

+

D: +

+gdc-4.5                         GNU D Compiler
+libphobos-4.5-dev               D standard runtime library
+

The D source package is made up of the following components. +

The D front-end for GCC: +

    +
  • d/*
+

Copyright (C) 2004-2007 David Friedman
+Modified by Vincenzo Ampolo, Michael Parrot, Iain Buclaw, (C) 2009, 2010 +

This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. +

On Debian GNU/Linux systems, the complete text of the GNU General +Public License is in `/usr/share/common-licenses/GPL', version 2 of this +license in `/usr/share/common-licenses/GPL-2'. +

+

The DMD Compiler implementation of the D programming language: +

    +
  • d/dmd/*
+

Copyright (c) 1999-2010 by Digital Mars +All Rights Reserved
+written by Walter Bright
+http://www.digitalmars.com
+License for redistribution is by either the Artistic License or +the GNU General Public License (v1). +

On Debian GNU/Linux systems, the complete text of the GNU General +Public License is in `/usr/share/common-licenses/GPL', the Artistic +license in `/usr/share/common-licenses/Artistic'. +

+

The Zlib data compression library: +

    +
  • d/phobos/etc/c/zlib/*
+

(C) 1995-2004 Jean-loup Gailly and Mark Adler +

This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. +

Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: +

    +
  1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +
  2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +
  3. This notice may not be removed or altered from any source distribution. +
+

The Phobos standard runtime library: +

    +
  • d/phobos/*
+

Unless otherwise marked within the file, each file in the source +is under the following licenses: +

Copyright (C) 2004-2005 by Digital Mars, www.digitalmars.com +Written by Walter Bright +

This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. +

Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, in both source and binary form, subject to the following +restrictions: +

    +
  • The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +
  • Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. +
  • This notice may not be removed or altered from any source + distribution.
+

By plainly marking modifications, something along the lines of adding to each +file that has been changed a "Modified by Foo Bar" line +underneath the "Written by" line would be adequate. +


+perl License +

This package was debianized by Brendan O'Dea <bod@debian.org> on +Thu, 17 Aug 2000 16:10:54 +1000. +

It was downloaded from: +

http://www.perl.com/CPAN/src/5.0/ +

Upstream Authors: +

Larry Wall et. al. (see /usr/share/doc/perl/AUTHORS). +

+
Copyright
+
+

Copyright 1989-2001, Larry Wall All rights reserved. +

This program is free software; you can redistribute it and/or modify + it under the terms of either: +

    +
  1. the GNU General Public License as published by the Free Software + Foundation; either version 1, or (at your option) any later + version, or
  2. the "Artistic License" which comes with Perl.
+

On Debian GNU/Linux systems, the complete text of the GNU General + Public License can be found in `/usr/share/common-licenses/GPL' and + the Artistic Licence in `/usr/share/common-licenses/Artistic'. +


+

The zlib library in ext/Compress-Raw-Zlib/zlib-src has the following +copyright and license: +

Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler +

This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. +

Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: +

    +
  1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +
  2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +
  3. This notice may not be removed or altered from any source distribution.
+
+

The Unicode database files in lib/unicore/*.txt are +Copyright (c) 1991-2006 Unicode, Inc. +

Their license information is given as
+ For terms of use, see http://www.unicode.org/terms_of_use.html + +

The corresponding license is as follows: +

EXHIBIT 1
+UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE +

Unicode Data Files include all data files under the directories + http://www.unicode.org/Public/, http://www.unicode.org/reports/, + and http://www.unicode.org/cldr/data/ . Unicode Software includes any + source code published in the Unicode Standard or under the directories + http://www.unicode.org/Public/, http://www.unicode.org/reports/, + and http://www.unicode.org/cldr/data/. +

+      NOTICE TO USER: Carefully read the following legal agreement. BY
+      DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE
+      INC.'S DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), YOU
+      UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE TERMS AND
+      CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT DOWNLOAD,
+      INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
+      COPYRIGHT AND PERMISSION NOTICE
+      Copyright ⓒ 1991-2008 Unicode, Inc. All rights
+      reserved. Distributed under the Terms of Use in
+      http://www.unicode.org/copyright.html.
+      Permission is hereby granted, free of charge, to any person
+      obtaining a copy of the Unicode data files and any associated
+      documentation (the "Data Files") or Unicode software and any
+      associated documentation (the "Software") to deal in the Data Files
+      or Software without restriction, including without limitation
+      the rights to use, copy, modify, merge, publish, distribute,
+      and/or sell copies of the Data Files or Software, and to permit
+      persons to whom the Data Files or Software are furnished to do so,
+      provided that (a) the above copyright notice(s) and this permission
+      notice appear with all copies of the Data Files or Software,
+      (b) both the above copyright notice(s) and this permission notice
+      appear in associated documentation, and (c) there is clear notice
+      in each modified Data File or in the Software as well as in the
+      documentation associated with the Data File(s) or Software that
+      the data or software has been modified.
+      THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY
+      OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+      WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+      AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE
+      COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE
+      FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
+      OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+      PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+      TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+      PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+      Except as contained in this notice, the name of a copyright holder
+      shall not be used in advertising or otherwise to promote the sale,
+      use or other dealings in these Data Files or Software without
+      prior written authorization of the copyright holder.
+
+

The file lib/Cwd.pm has the following copyright and license: +

Copyright (c) 2004 by the Perl 5 Porters. All rights reserved. +

This program is free software; you can redistribute it and/or modify + it under the same terms as Perl itself. +

Portions of the C code in this library are copyright (c) 1994 by the + Regents of the University of California. All rights reserved. The + license on this code is compatible with the licensing of the rest of + the distribution - please see the source code in F<Cwd.xs> for the + details. +

The file referenced above, ext/Cwd/Cwd.xs, has the following copyright: +

    +
  • Copyright (c) 1994 +
  • The Regents of the University of California. All rights reserved. + * +
  • This code is derived from software contributed to Berkeley by +
  • Jan-Simon Pendry.
+

and is licensed with the standard 3-clause BSD license. On Debian GNU/Linux +systems, this license can be found in `/usr/share/common-licenses/BSD'. +


+

The C parts of File::Glob in ext/File-Glob/bsd_glob.[ch] hav the +following copyright: +

    +
  • Copyright (c) 1989, 1993 +
  • The Regents of the University of California. All rights reserved. + * +
  • This code is derived from software contributed to Berkeley by +
  • Guido van Rossum.
+

and are licensed with the standard 3-clause BSD license. On Debian GNU/Linux +systems, this license can be found in `/usr/share/common-licenses/BSD'. +


+

The bzip2 library in ext/Compress-Raw-Bzip2/bzip2-src has the following +copyright and license: +

This program, "bzip2", the associated library "libbzip2", and all + documentation, are copyright (C) 1996-2007 Julian R Seward. All + rights reserved. + +

Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + +

    +
  1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +
  2. The origin of this software must not be misrepresented; you must + not claim that you wrote the original software. If you use this + software in a product, an acknowledgment in the product + documentation would be appreciated but is not required. + +
  3. Altered source versions must be plainly marked as such, and must + not be misrepresented as being the original software. + +
  4. The name of the author may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +
+

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +

Julian Seward, jseward@bzip.org
+ bzip2/libbzip2 version 1.0.5 of 10 December 2007 + +


+

The Text::Tabs module in lib/Text/Tabs.pm has the following +copyright and license: +

Copyright (C) 1996-2002,2005,2006 David Muir Sharnoff. + Copyright (C) 2005 Aristotle Pagaltzis + This module may be modified, used, copied, and redistributed at your own risk. + Publicly redistributed modified versions must use a different name. +


+

Portions of the Debian packaging are
+ Copyright 2008-2010 Niko Tyni <ntyni@debian.org> +The other people listed in debian/changelog are most probably +copyright holders too, but they have not included explicit copyright +or licensing information. +

The portions by Niko Tyni may be redistributed and/or modified under +the same terms as Perl itself. It is assumed that other contributors +have placed their contributions under a compatible license. +


+
+BSD License +

Copyright (c) <year>, <copyright holder> +All rights reserved. +

Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright +

notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +

notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. All advertising materials mentioning features or use of this software +

must display the following acknowledgement: + This product includes software developed by the <organization>. +4. Neither the name of the <organization> nor the +

names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. +

THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ''AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +


+New BSD License +

Copyright (c) <year>, <copyright holder> +All rights reserved. +

Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +

    +
  • Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +
  • Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +
  • Neither the name of the <organization> nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission.
+

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +


+Simplified BSD License +

Copyright <year> <copyright holder>. All rights reserved. +

Redistribution and use in source and binary forms, with or without modification, are +permitted provided that the following conditions are met: +

    +
  1. Redistributions of source code must retain the above copyright notice, this list of + conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list + of conditions and the following disclaimer in the documentation and/or other materials + provided with the distribution.
+

THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ''AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +

The views and conclusions contained in the software and documentation are those of the +authors and should not be interpreted as representing official policies, either expressed +or implied, of <copyright holder>. +


+Small/Pawn License +

Copyright (c) ITB CompuPhase, 1997-2003 +

This software is provided "as-is", without any express or implied warranty. +In no event will the authors be held liable for any damages arising from +the use of this software. +

Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: +

    +
  1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software in + a product, an acknowledgment in the product documentation would be + appreciated but is not required. +
  2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +
  3. This notice may not be removed or altered from any source distribution.
+
+Motorola License +

Copyright Motorola, Inc. 2003
+ALL RIGHTS RESERVED +

You are hereby granted a copyright license to use, modify, and + distribute the SOFTWARE so long as this entire notice is retained + without alteration in any modified and/or redistributed versions, + and that such modified versions are clearly identified as such. + No licenses are granted by implication, estoppel or otherwise under + any patents or trademarks of Motorola, Inc. +

The SOFTWARE is provided on an "AS IS" basis and without warranty. + To the maximum extent permitted by applicable law, MOTOROLA DISCLAIMS +ALL WARRANTIES WHETHER EXPRESS OR IMPLIED, INCLUDING IMPLIED +WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR +PURPOSE AND ANY WARRANTY AGAINST INFRINGEMENT WITH +REGARD TO THE SOFTWARE (INCLUDING ANY MODIFIED VERSIONS +THEREOF) AND ANY ACCOMPANYING WRITTEN MATERIALS. +

To the maximum extent permitted by applicable law, IN NO EVENT SHALL +MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER +(INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF +BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS +INFORMATION, OR OTHER PECUNIARY LOSS) ARISING OF THE USE OR + INABILITY TO USE THE SOFTWARE. Motorola assumes no responsibility + for the maintenance and support of the SOFTWARE. +


+Google License +

THE C++ WRAPPER FUNCTIONS

+

Contributed by: Google Inc. +

Copyright (c) 2007-2008, Google Inc.
+All rights reserved. +


+ISC(Internet Software Consortium) License +

Copyright ⓒ 2004-2011 by Internet Systems Consortium, Inc. ("ISC") +Copyright ⓒ 1995-2003 by Internet Software Consortium +

Permission to use, copy, modify, and/or distribute this +software for any purpose with or without fee is hereby +granted, provided that the above copyright notice and +this permission notice appear in all copies. +

THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO +EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, +OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING +FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. +


+CPOL(The Code Project Open License) +

THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CODE PROJECT +OPEN LICENSE ("LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER +APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS +LICENSE OR COPYRIGHT LAW IS PROHIBITED. +

BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HEREIN, YOU ACCEPT AND AGREE TO +BE BOUND BY THE TERMS OF THIS LICENSE. THE AUTHOR GRANTS YOU THE RIGHTS +CONTAINED HEREIN IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND +CONDITIONS. IF YOU DO NOT AGREE TO ACCEPT AND BE BOUND BY THE TERMS OF THIS +LICENSE, YOU CANNOT MAKE ANY USE OF THE WORK. +

    +
  1. Definitions. +
      +
    1. "Articles" means, collectively, all articles written by Author which describes + how the Source Code and Executable Files for the Work may be used by a user. +
    2. "Author" means the individual or entity that offers the Work under the terms of + this License. +
    3. "Derivative Work" means a work based upon the Work or upon the Work and + other pre-existing works. +
    4. "Executable Files" refer to the executables, binary files, configuration and any + required data files included in the Work. +
    5. "Publisher" means the provider of the website, magazine, CD-ROM, DVD or + other medium from or by which the Work is obtained by You. +
    6. "Source Code" refers to the collection of source code and configuration files + used to create the Executable Files. +
    7. "Standard Version" refers to such a Work if it has not been modified, or has + been modified in accordance with the consent of the Author, such consent + being in the full discretion of the Author. +
    8. "Work" refers to the collection of files distributed by the Publisher, including + the Source Code, Executable Files, binaries, data files, documentation, + whitepapers and the Articles. +
    9. "You" is you, an individual or entity wishing to use the Work and exercise your + rights under this License. +
    +
  2. Fair Use/Fair Use Rights. Nothing in this License is intended to reduce, limit, or + restrict any rights arising from fair use, fair dealing, first sale or other limitations on + the exclusive rights of the copyright owner under copyright law or other applicable laws. +
  3. License Grant. Subject to the terms and conditions of this License, the Author + hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the + duration of the applicable copyright) license to exercise the rights in the Work as + stated below: +
      +
    1. You may use the standard version of the Source Code or Executable Files in + Your own applications. +
    2. You may apply bug fixes, portability fixes and other modifications obtained from + the Public Domain or from the Author. A Work modified in such a way shall still + be considered the standard version and will be subject to this License. +
    3. You may otherwise modify Your copy of this Work (excluding the Articles) in any + way to create a Derivative Work, provided that You insert a prominent notice in + each changed file stating how, when and where You changed that file. +
    4. You may distribute the standard version of the Executable Files and Source + Code or Derivative Work in aggregate with other (possibly commercial) programs + as part of a larger (possibly commercial) software distribution. +
    5. The Articles discussing the Work published in any form by the author may not + be distributed or republished without the Author's consent. The author retains + copyright to any such Articles. You may use the Executable Files and Source + Code pursuant to this License but you may not repost or republish or otherwise + distribute or make available the Articles, without the prior written consent of the Author. + Any subroutines or modules supplied by You and linked into the Source Code or + Executable Files of this Work shall not be considered part of this Work and will not be + subject to the terms of this License. +
    +
  4. Patent License. Subject to the terms and conditions of this License, each Author + 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, import, and otherwise transfer the Work. +
  5. Restrictions. The license granted in Section 3 above is expressly made subject to + and limited by the following restrictions: +
      +
    1. You agree not to remove any of the original copyright, patent, trademark, and + attribution notices and associated disclaimers that may appear in the Source + Code or Executable Files. +
    2. You agree not to advertise or in any way imply that this Work is a product of + Your own. +
    3. The name of the Author may not be used to endorse or promote products + derived from the Work without the prior written consent of the Author. +
    4. You agree not to sell, lease, or rent any part of the Work. This does not restrict + you from including the Work or any part of the Work inside a larger software + distribution that itself is being sold. The Work by itself, though, cannot be sold, + leased or rented. +
    5. You may distribute the Executable Files and Source Code only under the terms + of this License, and You must include a copy of, or the Uniform Resource + Identifier for, this License with every copy of the Executable Files or Source + Code You distribute and ensure that anyone receiving such Executable Files and + Source Code agrees that the terms of this License apply to such Executable + Files and/or Source Code. You may not offer or impose any terms on the Work + that alter or restrict the terms of this License or the recipients' exercise of the + rights granted hereunder. You may not sublicense the Work. You must keep + intact all notices that refer to this License and to the disclaimer of warranties. + You may not distribute the Executable Files or Source Code with any + technological measures that control access or use of the Work in a manner + inconsistent with the terms of this License. +
    6. You agree not to use the Work for illegal, immoral or improper purposes, or on + pages containing illegal, immoral or improper material. The Work is subject to + applicable export laws. You agree to comply with all such laws and regulations + that may apply to the Work after Your receipt of the Work. +
    +
  6. Representations, Warranties and Disclaimer. THIS WORK IS PROVIDED "AS IS", +"WHERE IS" AND "AS AVAILABLE", WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES +OR CONDITIONS OR GUARANTEES. YOU, THE USER, ASSUME ALL RISK IN ITS USE, +INCLUDING COPYRIGHT INFRINGEMENT, PATENT INFRINGEMENT, SUITABILITY, ETC. +AUTHOR EXPRESSLY DISCLAIMS ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES +OR CONDITIONS, INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF +MERCHANTABILITY, MERCHANTABLE QUALITY OR FITNESS FOR A PARTICULAR +PURPOSE, OR ANY WARRANTY OF TITLE OR NON-INFRINGEMENT, OR THAT THE WORK +(OR ANY PORTION THEREOF) IS CORRECT, USEFUL, BUG-FREE OR FREE OF VIRUSES. +YOU MUST PASS THIS DISCLAIMER ON WHENEVER YOU DISTRIBUTE THE WORK OR +DERIVATIVE WORKS. +
  7. Indemnity. You agree to defend, indemnify and hold harmless the Author and the + Publisher from and against any claims, suits, losses, damages, liabilities, costs, and + expenses (including reasonable legal or attorneys? fees) resulting from or relating to + any use of the Work by You. +
  8. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN +NO EVENT WILL THE AUTHOR OR THE PUBLISHER BE LIABLE TO YOU ON ANY LEGAL +THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY +DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK OR OTHERWISE, +EVEN IF THE AUTHOR OR THE PUBLISHER HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. +
  9. Termination. +
      +
    1. This License and the rights granted hereunder will terminate automatically upon + any breach by You of any term of this License. Individuals or entities who have + received Derivative Works from You under this License, however, will not have + their licenses terminated provided such individuals or entities remain in full + compliance with those licenses. Sections 1, 2, 6, 7, 8, 9, 10 and 11 will survive + any termination of this License. +
    2. If You bring a copyright, trademark, patent or any other infringement claim + against any contributor over infringements You claim are made by the Work, + your License from such contributor to the Work ends automatically. +
    3. Subject to the above terms and conditions, this License is perpetual (for the + duration of the applicable copyright in the Work). Notwithstanding the above, + the Author reserves the right to release the Work under different license terms + or to stop distributing the Work at any time; provided, however that any such + election will not serve to withdraw this License (or any other license that has + been, or is required to be, granted under the terms of this License), and this + License will continue in full force and effect unless terminated as stated above. +
    +
  10. Publisher. The parties hereby confirm that the Publisher shall not, under any + circumstances, be responsible for and shall not have any liability in respect of the + subject matter of this License. The Publisher makes no warranty whatsoever in + connection with the Work and shall not be liable to You or any party on any legal + theory for any damages whatsoever, including without limitation any general, special, + incidental or consequential damages arising in connection to this license. The + Publisher reserves the right to cease making the Work available to You at any time + without notice +
  11. Miscellaneous +
      +
    1. This License shall be governed by the laws of the location of the head office of + the Author or if the Author is an individual, the laws of location of the principal + place of residence of the Author. +
    2. If any provision of this License is invalid or unenforceable under applicable law, + it shall not affect the validity or enforceability of the remainder of the terms of + this License, and without further action by the parties to this License, such + provision shall be reformed to the minimum extent necessary to make such + provision valid and enforceable. +
    3. No term or provision of this License shall be deemed waived and no breach + consented to unless such waiver or consent shall be in writing and signed by + the party to be charged with such waiver or consent. +
    4. This License constitutes the entire agreement between the parties with respect + to the Work licensed herein. There are no understandings, agreements or + representations with respect to the Work not specified herein. The Author shall + not be bound by any additional provisions that may appear in any + communication from You. This License may not be modified without the mutual + written agreement of the Author and You. +
    +
+
+ + + + + diff --git a/resource/Open_Source_Announcement.txt b/resource/Open_Source_Announcement.txt new file mode 100755 index 0000000..b589279 --- /dev/null +++ b/resource/Open_Source_Announcement.txt @@ -0,0 +1,5112 @@ +License: AFLv2.1, GPLv2 +Packages: dbus, libdbus-1-0, libdbus-glib-1-2 + +License: AFLv2, LGPLv2.0 +Packages: libxdgmime + +License: Apache License v2.0 +Packages: alarm-server, appsvc-tool, bluetooth-frwk-agent, bluetooth-frwk-test, bluetooth-share, boot-animation, capi-appfw-app-manager, capi-appfw-application, capi-base-common-dev, capi-content-media-content, capi-location-geocoder, capi-location-manager, capi-media-audio-io, capi-media-camera, capi-media-image-util, capi-media-player, capi-media-radio, capi-media-recorder, capi-media-sound-manager, capi-media-tone-player, capi-media-wav-player, capi-messaging-email, capi-messaging-mms, capi-messaging-sms, capi-network-bluetooth, capi-network-connection, capi-network-nfc, capi-social-calendar, capi-social-call-log, capi-social-contacts, capi-system-device, capi-system-haptic, capi-system-info, capi-system-power, capi-system-runtime-info, capi-system-sensor, capi-telephony-call, capi-telephony-network-info, capi-telephony-sim, capi-ui-efl-util, capi-uix-feedback, capi-uix-tts, cbhm, org.tizen.alert-3g-syspopup, org.tizen.app-selector, org.tizen.bluetooth, org.tizen.bluetooth-headers, org.tizen.bluetooth-share-ui, org.tizen.browser, org.tizen.bt-appsvc, org.tizen.bt-syspopup, org.tizen.calculator, org.tizen.calendar-viewer, org.tizen.call, org.tizen.ciss, org.tizen.clock, org.tizen.contacts, org.tizen.contacts-viewer, org.tizen.download-provider, org.tizen.efl-calendar, org.tizen.gallery, org.tizen.idle-lock, org.tizen.image-viewer, org.tizen.indicator, org.tizen.lowbat-syspopup, org.tizen.lowmem-syspopup, org.tizen.memo, org.tizen.menu-screen, org.tizen.music-player, org.tizen.phone, org.tizen.phone-lock, org.tizen.poweroff-syspopup, org.tizen.pwlock, org.tizen.quickpanel, org.tizen.setting, org.tizen.smartsearch, org.tizen.taskmgr, org.tizen.usb-syspopup, org.tizen.video-player, org.tizen.voicerecorder, org.tizen.volume, org.tizen.wifi-qs, contacts-service-bin, default-fonts-fc-sdk, default-fonts-sdk, dlogutil-bin, drm-service-0, efl-theme-tizen, efl-theme-tizen-black, efl-theme-tizen-black-hd, efl-theme-tizen-hd, gps-manager, ise-default, ise-engine-default, libail-0, libalarm-0, libapp-checker-0, libapp-checker-server-0, libappcore-common-0, libappcore-efl-0, libappsvc-0, libaudiosessionmgr-0, libaul-1, libaul-1-executable, libavsystem-0, libbluetooth-engine-0, libbluetooth-frwk-0, libbundle-0, libcamsrcjpegenc, libcamsrcjpegenc-sw-libjpeg, libcert-svc-0, libconnectivity-device-interface-0, libcontacts-service, libdevman-0, libdlog-0, libdownload-agent-0, libelm-webview, libheynoti-0, libmedia-service, libmedia-thumbnail, libmedia-utils, libmm-camcorder, libmm-common, libmm-fileinfo, libmm-imgp-gstcs, libmm-log, libmm-player, libmm-radio, libmm-session-0, libmm-sound-0, libmm-sound-tool, libmm-ta, libmm-utility, libnetwork-0, libnfc-common-lib-0, libnfc-manager-0, libopencore-amrnb, libopencore-amrwb, libpkgmgr-client-0, libpkgmgr-installer, libprivilege-control-0, librua-0, libsecurity-server-client-0, libsf-common-0, libslp-alarm-0, libslp-calendar-0, libslp-db-util-0, libslp-location, libslp-memo, libslp-mms-plugin, libslp-msg-service-0, libslp-pm-0, libslp-sensor-0, libslp-setting-0, libslp-shortcut-0, libslp-sms-plugin, libslp-sysman, libslp-tapi-0, libslp-utilx-0, libsppc-0, libss-client-0, libstt, libsvi-0, libsys-assert-0, libtts, libug-calendar-efl, libug-calendar-picker-efl, libug-contacts-efl, libug-gallery-efl-0, libug-image-viewer-efl, libug-memo-efl, libug-myfile-efl, libug-phone-efl, libug-setting-bluetooth-efl, libug-setting-call-efl, libug-setting-gallery-efl, libug-setting-location-efl, libug-setting-manage-applications-efl-0, libug-setting-theme-efl, libug-worldclock-efl, libui-gadget-0, libui-idlecapture-0, libuw-imap-toolkit-0, libvconf-0, location-geoclue-gpsd, location-geoclue-nominatim, location-gps-manager, media-data-sdk, media-server, media-thumbnail-server, menu-daemon, mm-fileinfo-tools, mmfw-sysconf-cleansdk-target, mmfw-sysconf-simulator, msg-service-tools, myaccount-0, rpm-installer, nitz, opengl-es, opengl-es-virtual-drv, pkgmgr-server, sdbd, security-server, sensor-framework, sonet0, spp-client-bin, spp-client-tool, ss-server, starter, svi-data-sdk, syspopup-0, syspopup-caller-0, system-server-bin, telephony-server, usb-setting-app, wifi-efl-ug, wrt, wrt-plugins-common, wrt-plugins-tizen, wrt-plugins-wac, wrt-test, openssh-client, openssh-server + +Licence: BSD +Packages: libuuid1 + +License: New BSD +Packages: gpsd, libelektra-dev, libgps19, libiri, libjpeg-turbo, libogg0, libspeex1, libspeexdsp1, libtheora0, libvorbis0a, libvorbisenc2, libvorbisfile3, speex, ssh, strace + +Licence: Simplified BSD +Packages: e17, e17-data, e17-extra-modules, e17-misc, expedite, libecore, libecore-bin, libecore-con, libecore-config, libecore-data, libecore-doc, libecore-evas, libecore-fb, libecore-file, libecore-imf, libecore-input, libecore-ipc, libecore-x, libedbus, libedje, libedje-doc, libeet-bin, libeet-doc, libeet1, libefreet, libefreet-doc, libevas, libevas-doc, libevas-engines, libevas-engines-extras + +License: bzip2 +Packages: libbz2-1.0, bzip2 + +License: BSD, GPLv2 +Packages: wpasupplicant + +License: New BSD, GPLv3 +Packages: libcap2, libcap2-bin + +License: Simplified BSD, GPLv2 +Packages: libedje-bin + +License: Simplified BSD, Small/Pawn License +Packages: libembryo-bin, libembryo-doc, libembryo0 + +License: Simplified BSD, Motorola, New BSD +Packages: liboil0.3 + +License: Google, New BSD +Packages: libpcre + +License: perl License +Packages: libperl5.10, perl, perl-base, perl-debug, perl-doc, perl-modules, perl-suid + +License: GPLv2 +Packages: apt, bash, default-files-slp, login, mtd-utils, passwd, alsa-utils, base-files, base-passwd, bluez, busybox, busybox-symlinks-adduser, busybox-symlinks-adjtimex, busybox-symlinks-binutils, busybox-symlinks-bridge-utils, busybox-symlinks-bsdmainutils, busybox-symlinks-busybox, busybox-symlinks-bzip2, busybox-symlinks-console-tools, busybox-symlinks-cpio, busybox-symlinks-cron, busybox-symlinks-daemontools, busybox-symlinks-dc, busybox-symlinks-dnsutils, busybox-symlinks-dosfstools, busybox-symlinks-ed, busybox-symlinks-eject, busybox-symlinks-fbset, busybox-symlinks-fdflush, busybox-symlinks-hdparm, busybox-symlinks-ifupdown, busybox-symlinks-initscripts, busybox-symlinks-ipcalc, busybox-symlinks-iproute, busybox-symlinks-ipsvd, busybox-symlinks-iputils-arping, busybox-symlinks-iputils-ping, busybox-symlinks-klogd, busybox-symlinks-loadlin, busybox-symlinks-lrzsz, busybox-symlinks-lzma, busybox-symlinks-lzop, busybox-symlinks-module-init-tools, busybox-symlinks-mtd-utils, busybox-symlinks-net-tools, busybox-symlinks-openbsd-inetd, busybox-symlinks-passwd, busybox-symlinks-patch, busybox-symlinks-ppp, busybox-symlinks-procps, busybox-symlinks-psmisc, busybox-symlinks-rdate, busybox-symlinks-realpath, busybox-symlinks-rpm, busybox-symlinks-runit, busybox-symlinks-sharutils, busybox-symlinks-ssmtp, busybox-symlinks-sysklogd, busybox-symlinks-telnetd, busybox-symlinks-tftp, busybox-symlinks-time, busybox-symlinks-tofrodos, busybox-symlinks-udhcpc, busybox-symlinks-udhcpd, busybox-symlinks-unzip, busybox-symlinks-vlan, busybox-symlinks-vlock, busybox-symlinks-watchdog, busybox-symlinks-wget, busybox-symlinks-xterm, busybox-symlinks-zcip, connman, e2fsck-static, execstack, gnupg, gpgv, ifupdown, initscripts, insserv, iptables, lib64readline5, libbluetooth3, libc-bin, libc-dev-bin, libc6, libc6-i686, libc6-prof, libelfg0, libfuse-dev, libgstreamer-plugins-base0.10-0, libgudev-1.0-0, liblzo2-2, libpci3, libreadline5, libudev0, linux-base, linux-headers-2.6.36-trunk-all, linux-headers-2.6.36-trunk-all-armel, linux-headers-2.6.36-trunk-common, linux-headers-2.6.36-trunk-u1, linux-image-2.6.36-trunk-u1, linux-kbuild-2.6.36, linux-source-2.6.36, locales, lsb-base, ltrace, mawk, module-init-tools, netbase, obexd, oprofile, pciutils, pkg-config, prelink, procps, psmisc, ragel, rpm, readline-common, rlfe, locales-init, shared-mime-info, simulator-opengl, simulator-opengl-dev, smackutils, system-plugin-slp, sysv-rc, sysvinit, sysvinit-utils, u-boot, u-boot-tools, udev, usbutils, valgrind, tzdata-slp, fakeroot + +License: GPLv2, LGPLv2.1 +Packages: attr, acl, libacl1, libattr1 + +License: GPLv3 +Packages: fixincludes, gdb, gdbserver, binutils, binutils-gold, binutils-multiarch, cpp-4.5, g++-4.5, gcc-4.5, gcc-4.5-locales, gcc-4.5-source, libblkid1, libgcc1, libgomp1, libmpfr4, libmudflap0, boot-console-init, boot-telnet-init, uuid-runtime + +License: GPLv3, LGPLv2.1 +Packages: libidn11 + +License: GPLv3, LGPLv3 +Packages: libgmp10, libgmpxx4ldbl + +License: LGPLv2.0 +Packages: gconf-dbus-utils, geoclue, geoclue-gpsd, geoclue-nominatim, glib-networking, gstreamer-tools, gstreamer0.10-plugins-base, gstreamer0.10-plugins-base-apps, gstreamer0.10-plugins-ugly, gstreamer0.10-tools, gstreamer0.10-x, libfreealut, libfribidi0, libgconf-dbus, libgeoclue, libglib2.0-0, libglib2.0-0-refdbg, libglib2.0-bin, libglib2.0-data, libglib2.0-dev, libglib2.0-doc, libgstreamer0.10-0, libopenal-soft, libpango1.0, libpango1.0-common, libsoup2.4, rpm-libs + +License: LGPLv2.1 +Packages: alsa-scenario-scn-data-0, alsa-scenario-scn-data-0-base, alsa-scenario-scn-data-0-mc1n2, check, dialog, elm-misc, gstreamer0.10-alsa, gstreamer0.10-ffmpeg, gstreamer0.10-plugins-bad, gstreamer0.10-plugins-ext, gstreamer0.10-plugins-good, libaccounts-svc-0, libascenario-0, libasound2, libavcodec, libavformat, libavutil, libc6-dev, libeina, libeina-doc, libethumb, libethumb-bin, libexif12, libgcrypt11, libgnutls26, libgpg-error0, libisf-bin, libjson-glib, libmpc2, libnotification-0, libopenobex1, libpulse0, libsmack-0, libsndfile1, libsocial-service-0, libswscale, libug-picker-efl, libusb-0.1-4, libwbxml2-0, libwbxml2-utils, location-geoclue-pdr, location-geoclue-xps, pulseaudio, pulseaudio-module-bluetooth, pulseaudio-utils, sndfile-programs, sqlfs-bin, libelm, libelm-bin + +License: LGPLv2.1, Mozilla Public License 1.1 +Packages: libcairo2 + +License: libpng License +Packages: libpng12-0, libpng3 + +License: ICU License +Packages: icu-doc, libicu + +License: MIT/X Consortium License +Packages: libexpat1, expat + +License: MIT License +Packages: fontconfig, fontconfig-config, giflib-tools, libcurl, libcurl3, libdmx1, libdri2, libdrm-slp1, libdrm2, libfontconfig1, libfontenc1, libgif4, libharfbuzz, libice6, libkms1, liblua5.1-0, liboauth, libpciaccess0, libpixman-1-0, libpthread-stubs0, libsm6, libungif-bin, libungif4g, libx11-6, libx11-data, libx11-xcb1, libxau6, libxaw7, libxcb-atom1, libxcb-aux0, libxcb-composite0, libxcb-damage0, libxcb-dpms0, libxcb-dri2-0, libxcb-event1, libxcb-glx0, libxcb-icccm1, libxcb-image0, libxcb-keysyms1, libxcb-property1, libxcb-randr0, libxcb-record0, libxcb-render-util0, libxcb-render0, libxcb-reply1, libxcb-res0, libxcb-screensaver0, libxcb-shape0, libxcb-shm0, libxcb-sync0, libxcb-xevie0, libxcb-xf86dri0, libxcb-xfixes0, libxcb-xinerama0, libxcb-xprint0, libxcb-xtest0, libxcb-xv0, libxcb-xvmc0, libxcb1, libxcomposite1, libxcursor1, libxdamage1, libxdmcp6, libxext6, libxfixes3, libxfont1, libxft2, libxgesture0, libxi6, libxinerama1, libxkbfile1, libxml2, libxml2-0, libxml2-doc, libxml2-utils, libxmlsec1, libxmlsec1-openssl, libxmu-headers, libxmu6, libxmuu1, libxpm4, libxrandr2, libxrender1, libxres1, libxslt1.1, libxt6, libxtrap6, libxtst6, libxv1, libxxf86dga1, libxxf86misc1, libxxf86vm1, lua5.1, lua5.1-doc, python-xcbgen, x11-apps, x11-common, x11-utils, x11-xkb-utils, x11-xserver-utils, x11proto-bigreqs-dev, x11proto-composite-dev, x11proto-core-dev, x11proto-damage-dev, x11proto-dmx-dev, x11proto-dri2-dev, x11proto-fixes-dev, x11proto-fontcache-dev, x11proto-fonts-dev, x11proto-gesture-dev, x11proto-input-dev, x11proto-kb-dev, x11proto-randr-dev, x11proto-record-dev, x11proto-render-dev, x11proto-resource-dev, x11proto-scrnsaver-dev, x11proto-trap-dev, x11proto-video-dev, x11proto-xcmisc-dev, x11proto-xext-dev, x11proto-xf86bigfont-dev, x11proto-xf86dga-dev, x11proto-xf86dri-dev, x11proto-xf86misc-dev, x11proto-xf86vidmode-dev, x11proto-xinerama-dev, xbitmaps, xcb-proto, xfonts-utils, xinit, xinput, xkb-data, xkb-data-i18n, xpmutils, xrestop, xserver-common, xserver-xorg-core, xserver-xorg-input-evdev, xserver-xorg-input-evdev-multitouch, xserver-xorg-input-gesture, xserver-xorg-misc-emulfb, xserver-xorg-tools, xserver-xorg-video-emulfb, xtrans-dev, xutils-dev + +License: ISC(Internet Software Consortium) +Packages: rfkill + +License: MIT, ISC(Internet Software Consortium) +Packages: libc-ares2 + +License: BSD, LGPLv2.1, Mozilla, MIT +Packages: libwebkit-engine + +License: OpenSSL License +Packages: libssl-dev, libssl1.0.0, openssl + +License: Red Hat Software +Packages: popt + +License: Zlib license +Packages: zlib-bin, zlib1g, zlib1g-dev, libbullet-0 + +License: FreeType License or GPLv2 +Packages: libfreetype6 + +License: bzip2 +Packages: libbz2-1.0, bzip2 + +License: Flora license +Packages: org.tizen.sat-ui, geoclue-pdr, geoclue-xps, libeas-common, libslp-telplugin-0, libslp-lbs-plugin-csr, boot-network-init + +License: Apachev2.0, MIT, CPOL +Packages: wrt-commons + +License: libjpeg license +Packages: libjpeg-progs + +License: ncurse license +Packages: ncurses-bin, ncurses-term, ncurse license, libncurses5 + +License: GCC 4.5 License +Packages: libstdc++6 + +License: No license +Packages: ca-certificates + + +============================================================================================ +The Academic Free License v. 2.1 + +This Academic Free License (the "License") applies to any original work of authorship +(the "Original Work") whose owner (the "Licensor") has placed the following notice immediately +following the copyright notice for the Original Work: + +Licensed under the Academic Free License version 2.1 + +1) Grant of Copyright License. Licensor hereby grants You a +world-wide, royalty-free, non-exclusive, perpetual, sublicenseable +license to do the following: + +a) to reproduce the Original Work in copies; + +b) to prepare derivative works ("Derivative Works") based upon the Original Work; + +c) to distribute copies of the Original Work and Derivative Works to the public; + +d) to perform the Original Work publicly; and + +e) to display the Original Work publicly. + +2) Grant of Patent License. Licensor hereby grants You a world-wide, +royalty-free, non-exclusive, perpetual, sublicenseable license, under +patent claims owned or controlled by the Licensor that are embodied in +the Original Work as furnished by the Licensor, to make, use, sell and +offer for sale the Original Work and Derivative Works. + +3) Grant of Source Code License. The term "Source Code" means the +preferred form of the Original Work for making modifications to it and +all available documentation describing how to modify the Original +Work. Licensor hereby agrees to provide a machine-readable copy of the +Source Code of the Original Work along with each copy of the Original +Work that Licensor distributes. Licensor reserves the right to satisfy +this obligation by placing a machine-readable copy of the Source Code +in an information repository reasonably calculated to permit +inexpensive and convenient access by You for as long as Licensor +continues to distribute the Original Work, and by publishing the +address of that information repository in a notice immediately +following the copyright notice that applies to the Original Work. + +4) Exclusions From License Grant. Neither the names of Licensor, nor +the names of any contributors to the Original Work, nor any of their +trademarks or service marks, may be used to endorse or promote +products derived from this Original Work without express prior written +permission of the Licensor. Nothing in this License shall be deemed to +grant any rights to trademarks, copyrights, patents, trade secrets or +any other intellectual property of Licensor except as expressly stated +herein. No patent license is granted to make, use, sell or offer to +sell embodiments of any patent claims other than the licensed claims +defined in Section 2. No right is granted to the trademarks of +Licensor even if such marks are included in the Original Work. Nothing +in this License shall be interpreted to prohibit Licensor from +licensing under different terms from this License any Original Work +that Licensor otherwise would have a right to license. + +5) This section intentionally omitted. + +6) Attribution Rights. You must retain, in the Source Code of any +Derivative Works that You create, all copyright, patent or trademark +notices from the Source Code of the Original Work, as well as any +notices of licensing and any descriptive text identified therein as an +"Attribution Notice." You must cause the Source Code for any +Derivative Works that You create to carry a prominent Attribution +Notice reasonably calculated to inform recipients that You have +modified the Original Work. + +7) Warranty of Provenance and Disclaimer of Warranty. Licensor +warrants that the copyright in and to the Original Work and the patent +rights granted herein by Licensor are owned by the Licensor or are +sublicensed to You under the terms of this License with the permission +of the contributor(s) of those copyrights and patent rights. Except as +expressly stated in the immediately proceeding sentence, the Original +Work is provided under this License on an "AS IS" BASIS and WITHOUT +WARRANTY, either express or implied, including, without limitation, +the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL +WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential +part of this License. No license to Original Work is granted hereunder +except under this disclaimer. + +8) Limitation of Liability. Under no circumstances and under no legal +theory, whether in tort (including negligence), contract, or +otherwise, shall the Licensor be liable to any person for any direct, +indirect, special, incidental, or consequential damages of any +character arising as a result of this License or the use of the +Original Work including, without limitation, damages for loss of +goodwill, work stoppage, computer failure or malfunction, or any and +all other commercial damages or losses. This limitation of liability +shall not apply to liability for death or personal injury resulting +from Licensor's negligence to the extent applicable law prohibits such +limitation. Some jurisdictions do not allow the exclusion or +limitation of incidental or consequential damages, so this exclusion +and limitation may not apply to You. + +9) Acceptance and Termination. If You distribute copies of the +Original Work or a Derivative Work, You must make a reasonable effort +under the circumstances to obtain the express assent of recipients to +the terms of this License. Nothing else but this License (or another +written agreement between Licensor and You) grants You permission to +create Derivative Works based upon the Original Work or to exercise +any of the rights granted in Section 1 herein, and any attempt to do +so except under the terms of this License (or another written +agreement between Licensor and You) is expressly prohibited by +U.S. copyright law, the equivalent laws of other countries, and by +international treaty. Therefore, by exercising any of the rights +granted to You in Section 1 herein, You indicate Your acceptance of +this License and all of its terms and conditions. + +10) Termination for Patent Action. This License shall terminate +automatically and You may no longer exercise any of the rights granted +to You by this License as of the date You commence an action, +including a cross-claim or counterclaim, against Licensor or any +licensee alleging that the Original Work infringes a patent. This +termination provision shall not apply for an action alleging patent +infringement by combinations of the Original Work with other software +or hardware. + +11) Jurisdiction, Venue and Governing Law. Any action or suit relating +to this License may be brought only in the courts of a jurisdiction +wherein the Licensor resides or in which Licensor conducts its primary +business, and under the laws of that jurisdiction excluding its +conflict-of-law provisions. The application of the United Nations +Convention on Contracts for the International Sale of Goods is +expressly excluded. Any use of the Original Work outside the scope of +this License or after its termination shall be subject to the +requirements and penalties of the U.S. Copyright Act, 17 U.S.C. A§ 101 +et seq., the equivalent laws of other countries, and international +treaty. This section shall survive the termination of this License. + +12) Attorneys Fees. In any action to enforce the terms of this License +or seeking damages relating thereto, the prevailing party shall be +entitled to recover its costs and expenses, including, without +limitation, reasonable attorneys' fees and costs incurred in +connection with such action, including any appeal of such action. This +section shall survive the termination of this License. + +13) Miscellaneous. This License represents the complete agreement +concerning the subject matter hereof. If any provision of this License +is held to be unenforceable, such provision shall be reformed only to +the extent necessary to make it enforceable. + +14) Definition of "You" in This License. "You" throughout this +License, whether in upper or lower case, means an individual or a +legal entity exercising rights under, and complying with all of the +terms of, this License. For legal entities, "You" includes any entity +that controls, is controlled by, or is under common control with +you. For 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. + +15) Right to Use. You may use the Original Work in all ways not +otherwise restricted or conditioned by this License or by law, and +Licensor promises not to interfere with or be responsible for such +uses by You. + +This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights +reserved. Permission is hereby granted to copy and distribute this +license without modification. This license may not be modified without +the express written permission of its copyright owner. + + +-- +END OF ACADEMIC FREE LICENSE. The following is intended to describe the essential +differences between the Academic Free License (AFL) version 1.0 and other +open source licenses: + +The Academic Free License is similar to the BSD, MIT, UoI/NCSA and Apache +licenses in many respects but it is intended to solve a few problems with +those licenses. + +* The AFL is written so as to make it clear what software is being +licensed (by the inclusion of a statement following the copyright notice +in the software). This way, the license functions better than a template +license. The BSD, MIT and UoI/NCSA licenses apply to unidentified software. + +* The AFL contains a complete copyright grant to the software. The BSD +and Apache licenses are vague and incomplete in that respect. + +* The AFL contains a complete patent grant to the software. The BSD, MIT, +UoI/NCSA and Apache licenses rely on an implied patent license and contain +no explicit patent grant. + +* The AFL makes it clear that no trademark rights are granted to the +licensor's trademarks. The Apache license contains such a provision, but the +BSD, MIT and UoI/NCSA licenses do not. + +* The AFL includes the warranty by the licensor that it either owns the +copyright or that it is distributing the software under a license. None of +the other licenses contain that warranty. All other warranties are disclaimed, +as is the case for the other licenses. + +* The AFL is itself copyrighted (with the right granted to copy and distribute +without modification). This ensures that the owner of the copyright to the +license will control changes. The Apache license contains a copyright notice, +but the BSD, MIT and UoI/NCSA licenses do not. + + +================================================================================ +Apache License v2.0 + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + 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. + + 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, + 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 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 in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) 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 + + (d) 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 Apache License to your work. + + To apply the Apache 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 Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +============================================================================================ +Mozilla Public License 1.1 + + MOZILLA PUBLIC LICENSE + Version 1.1 + + --------------- + +1. Definitions. + + 1.0.1. "Commercial Use" means distribution or otherwise making the + Covered Code available to a third party. + + 1.1. "Contributor" means each entity that creates or contributes to + the creation of Modifications. + + 1.2. "Contributor Version" means the combination of the Original + Code, prior Modifications used by a Contributor, and the Modifications + made by that particular Contributor. + + 1.3. "Covered Code" means the Original Code or Modifications or the + combination of the Original Code and Modifications, in each case + including portions thereof. + + 1.4. "Electronic Distribution Mechanism" means a mechanism generally + accepted in the software development community for the electronic + transfer of data. + + 1.5. "Executable" means Covered Code in any form other than Source + Code. + + 1.6. "Initial Developer" means the individual or entity identified + as the Initial Developer in the Source Code notice required by Exhibit + A. + + 1.7. "Larger Work" means a work which combines Covered Code or + portions thereof with code not governed by the terms of this License. + + 1.8. "License" means this document. + + 1.8.1. "Licensable" means having the right to grant, to the maximum + extent possible, whether at the time of the initial grant or + subsequently acquired, any and all of the rights conveyed herein. + + 1.9. "Modifications" means any addition to or deletion from the + substance or structure of either the Original Code or any previous + Modifications. When Covered Code is released as a series of files, a + Modification is: + A. Any addition to or deletion from the contents of a file + containing Original Code or previous Modifications. + + B. Any new file that contains any part of the Original Code or + previous Modifications. + + 1.10. "Original Code" means Source Code of computer software code + which is described in the Source Code notice required by Exhibit A as + Original Code, and which, at the time of its release under this + License is not already Covered Code governed by this License. + + 1.10.1. "Patent Claims" means any patent claim(s), now owned or + hereafter acquired, including without limitation, method, process, + and apparatus claims, in any patent Licensable by grantor. + + 1.11. "Source Code" means the preferred form of the Covered Code for + making modifications to it, including all modules it contains, plus + any associated interface definition files, scripts used to control + compilation and installation of an Executable, or source code + differential comparisons against either the Original Code or another + well known, available Covered Code of the Contributor's choice. The + Source Code can be in a compressed or archival form, provided the + appropriate decompression or de-archiving software is widely available + for no charge. + + 1.12. "You" (or "Your") means an individual or a legal entity + exercising rights under, and complying with all of the terms of, this + License or a future version of this License issued under Section 6.1. + For legal entities, "You" includes any entity which controls, is + controlled by, or is under common control with You. For purposes of + this definition, "control" means (a) the power, direct or indirect, + to cause the direction or management of such entity, whether by + contract or otherwise, or (b) ownership of more than fifty percent + (50%) of the outstanding shares or beneficial ownership of such + entity. + +2. Source Code License. + + 2.1. The Initial Developer Grant. + The Initial Developer hereby grants You a world-wide, royalty-free, + non-exclusive license, subject to third party intellectual property + + claims: + + (a) under intellectual property rights (other than patent or + trademark) Licensable by Initial Developer to use, reproduce, + modify, display, perform, sublicense and distribute the Original + Code (or portions thereof) with or without Modifications, and/or + as part of a Larger Work; and + + (b) under Patents Claims infringed by the making, using or + selling of Original Code, to make, have made, use, practice, + sell, and offer for sale, and/or otherwise dispose of the + Original Code (or portions thereof). + + (c) the licenses granted in this Section 2.1(a) and (b) are + effective on the date Initial Developer first distributes + Original Code under the terms of this License. + + (d) Notwithstanding Section 2.1(b) above, no patent license is + granted: 1) for code that You delete from the Original Code; 2) + separate from the Original Code; or 3) for infringements caused + by: i) the modification of the Original Code or ii) the + combination of the Original Code with other software or devices. + + 2.2. Contributor Grant. + Subject to third party intellectual property claims, each Contributor + hereby grants You a world-wide, royalty-free, non-exclusive license + + (a) under intellectual property rights (other than patent or + trademark) Licensable by Contributor, to use, reproduce, modify, + display, perform, sublicense and distribute the Modifications + created by such Contributor (or portions thereof) either on an + unmodified basis, with other Modifications, as Covered Code + and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, using, or + selling of Modifications made by that Contributor either alone + and/or in combination with its Contributor Version (or portions + of such combination), to make, use, sell, offer for sale, have + made, and/or otherwise dispose of: 1) Modifications made by that + Contributor (or portions thereof); and 2) the combination of + Modifications made by that Contributor with its Contributor + Version (or portions of such combination). + + (c) the licenses granted in Sections 2.2(a) and 2.2(b) are + effective on the date Contributor first makes Commercial Use of + the Covered Code. + + (d) Notwithstanding Section 2.2(b) above, no patent license is + granted: 1) for any code that Contributor has deleted from the + Contributor Version; 2) separate from the Contributor Version; + 3) for infringements caused by: i) third party modifications of + Contributor Version or ii) the combination of Modifications made + by that Contributor with other software (except as part of the + Contributor Version) or other devices; or 4) under Patent Claims + infringed by Covered Code in the absence of Modifications made by + that Contributor. + +3. Distribution Obligations. + + 3.1. Application of License. + The Modifications which You create or to which You contribute are + governed by the terms of this License, including without limitation + Section 2.2. The Source Code version of Covered Code may be + distributed only under the terms of this License or a future version + of this License released under Section 6.1, and You must include a + copy of this License with every copy of the Source Code You + distribute. You may not offer or impose any terms on any Source Code + version that alters or restricts the applicable version of this + License or the recipients' rights hereunder. However, You may include + an additional document offering the additional rights described in + Section 3.5. + + 3.2. Availability of Source Code. + Any Modification which You create or to which You contribute must be + made available in Source Code form under the terms of this License + either on the same media as an Executable version or via an accepted + Electronic Distribution Mechanism to anyone to whom you made an + Executable version available; and if made available via Electronic + Distribution Mechanism, must remain available for at least twelve (12) + months after the date it initially became available, or at least six + (6) months after a subsequent version of that particular Modification + has been made available to such recipients. You are responsible for + ensuring that the Source Code version remains available even if the + Electronic Distribution Mechanism is maintained by a third party. + + 3.3. Description of Modifications. + You must cause all Covered Code to which You contribute to contain a + file documenting the changes You made to create that Covered Code and + the date of any change. You must include a prominent statement that + the Modification is derived, directly or indirectly, from Original + Code provided by the Initial Developer and including the name of the + Initial Developer in (a) the Source Code, and (b) in any notice in an + Executable version or related documentation in which You describe the + origin or ownership of the Covered Code. + + 3.4. Intellectual Property Matters + + (a) Third Party Claims. + If Contributor has knowledge that a license under a third party's + intellectual property rights is required to exercise the rights + granted by such Contributor under Sections 2.1 or 2.2, + Contributor must include a text file with the Source Code + distribution titled "LEGAL" which describes the claim and the + party making the claim in sufficient detail that a recipient will + know whom to contact. If Contributor obtains such knowledge after + the Modification is made available as described in Section 3.2, + Contributor shall promptly modify the LEGAL file in all copies + Contributor makes available thereafter and shall take other steps + (such as notifying appropriate mailing lists or newsgroups) + reasonably calculated to inform those who received the Covered + Code that new knowledge has been obtained. + + (b) Contributor APIs. + If Contributor's Modifications include an application programming + interface and Contributor has knowledge of patent licenses which + are reasonably necessary to implement that API, Contributor must + also include this information in the LEGAL file. + + (c) Representations. + Contributor represents that, except as disclosed pursuant to + Section 3.4(a) above, Contributor believes that Contributor's + Modifications are Contributor's original creation(s) and/or + Contributor has sufficient rights to grant the rights conveyed by + this License. + + 3.5. Required Notices. + You must duplicate the notice in Exhibit A in each file of the Source + Code. If it is not possible to put such notice in a particular Source + Code file due to its structure, then You must include such notice in a + location (such as a relevant directory) where a user would be likely + to look for such a notice. If You created one or more Modification(s) + You may add your name as a Contributor to the notice described in + Exhibit A. You must also duplicate this License in any documentation + for the Source Code where You describe recipients' rights or ownership + rights relating to Covered Code. You may choose to offer, and to + charge a fee for, warranty, support, indemnity or liability + obligations to one or more recipients of Covered Code. However, You + may do so only on Your own behalf, and not on behalf of the Initial + Developer or any Contributor. You must make it absolutely clear than + any such warranty, support, indemnity or liability obligation is + offered by You alone, and You hereby agree to indemnify the Initial + Developer and every Contributor for any liability incurred by the + Initial Developer or such Contributor as a result of warranty, + support, indemnity or liability terms You offer. + + 3.6. Distribution of Executable Versions. + You may distribute Covered Code in Executable form only if the + requirements of Section 3.1-3.5 have been met for that Covered Code, + and if You include a notice stating that the Source Code version of + the Covered Code is available under the terms of this License, + including a description of how and where You have fulfilled the + obligations of Section 3.2. The notice must be conspicuously included + in any notice in an Executable version, related documentation or + collateral in which You describe recipients' rights relating to the + Covered Code. You may distribute the Executable version of Covered + Code or ownership rights under a license of Your choice, which may + contain terms different from this License, provided that You are in + compliance with the terms of this License and that the license for the + Executable version does not attempt to limit or alter the recipient's + rights in the Source Code version from the rights set forth in this + License. If You distribute the Executable version under a different + license You must make it absolutely clear that any terms which differ + from this License are offered by You alone, not by the Initial + Developer or any Contributor. You hereby agree to indemnify the + Initial Developer and every Contributor for any liability incurred by + the Initial Developer or such Contributor as a result of any such + terms You offer. + + 3.7. Larger Works. + You may create a Larger Work by combining Covered Code with other code + not governed by the terms of this License and distribute the Larger + Work as a single product. In such a case, You must make sure the + requirements of this License are fulfilled for the Covered Code. + +4. Inability to Comply Due to Statute or Regulation. + + If it is impossible for You to comply with any of the terms of this + License with respect to some or all of the Covered Code due to + statute, judicial order, or regulation then You must: (a) comply with + the terms of this License to the maximum extent possible; and (b) + describe the limitations and the code they affect. Such description + must be included in the LEGAL file described in Section 3.4 and must + be included with all distributions of the Source Code. Except to the + extent prohibited by statute or regulation, such description must be + sufficiently detailed for a recipient of ordinary skill to be able to + understand it. + +5. Application of this License. + + This License applies to code to which the Initial Developer has + attached the notice in Exhibit A and to related Covered Code. + +6. Versions of the License. + + 6.1. New Versions. + Netscape Communications Corporation ("Netscape") may publish revised + and/or new versions of the License from time to time. Each version + will be given a distinguishing version number. + + 6.2. Effect of New Versions. + Once Covered Code has been published under a particular version of the + License, You may always continue to use it under the terms of that + version. You may also choose to use such Covered Code under the terms + of any subsequent version of the License published by Netscape. No one + other than Netscape has the right to modify the terms applicable to + Covered Code created under this License. + + 6.3. Derivative Works. + If You create or use a modified version of this License (which you may + only do in order to apply it to code which is not already Covered Code + governed by this License), You must (a) rename Your license so that + the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", + "MPL", "NPL" or any confusingly similar phrase do not appear in your + license (except to note that your license differs from this License) + and (b) otherwise make it clear that Your version of the license + contains terms which differ from the Mozilla Public License and + Netscape Public License. (Filling in the name of the Initial + Developer, Original Code or Contributor in the notice described in + Exhibit A shall not of themselves be deemed to be modifications of + this License.) + +7. DISCLAIMER OF WARRANTY. + + COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF + DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. + THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE + IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, + YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE + COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER + OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF + ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +8. TERMINATION. + + 8.1. This License and the rights granted hereunder will terminate + automatically if You fail to comply with terms herein and fail to cure + such breach within 30 days of becoming aware of the breach. All + sublicenses to the Covered Code which are properly granted shall + survive any termination of this License. Provisions which, by their + nature, must remain in effect beyond the termination of this License + shall survive. + + 8.2. If You initiate litigation by asserting a patent infringement + claim (excluding declatory judgment actions) against Initial Developer + or a Contributor (the Initial Developer or Contributor against whom + You file such action is referred to as "Participant") alleging that: + + (a) such Participant's Contributor Version directly or indirectly + infringes any patent, then any and all rights granted by such + Participant to You under Sections 2.1 and/or 2.2 of this License + shall, upon 60 days notice from Participant terminate prospectively, + unless if within 60 days after receipt of notice You either: (i) + agree in writing to pay Participant a mutually agreeable reasonable + royalty for Your past and future use of Modifications made by such + Participant, or (ii) withdraw Your litigation claim with respect to + the Contributor Version against such Participant. If within 60 days + of notice, a reasonable royalty and payment arrangement are not + mutually agreed upon in writing by the parties or the litigation claim + is not withdrawn, the rights granted by Participant to You under + Sections 2.1 and/or 2.2 automatically terminate at the expiration of + the 60 day notice period specified above. + + (b) any software, hardware, or device, other than such Participant's + Contributor Version, directly or indirectly infringes any patent, then + any rights granted to You by such Participant under Sections 2.1(b) + and 2.2(b) are revoked effective as of the date You first made, used, + sold, distributed, or had made, Modifications made by that + Participant. + + 8.3. If You assert a patent infringement claim against Participant + alleging that such Participant's Contributor Version directly or + indirectly infringes any patent where such claim is resolved (such as + by license or settlement) prior to the initiation of patent + infringement litigation, then the reasonable value of the licenses + granted by such Participant under Sections 2.1 or 2.2 shall be taken + into account in determining the amount or value of any payment or + license. + + 8.4. In the event of termination under Sections 8.1 or 8.2 above, + all end user license agreements (excluding distributors and resellers) + which have been validly granted by You or any distributor hereunder + prior to termination shall survive termination. + +9. LIMITATION OF LIABILITY. + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT + (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL + DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, + OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR + ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY + CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, + WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER + COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN + INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF + LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY + RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW + PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE + EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO + THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +10. U.S. GOVERNMENT END USERS. + + The Covered Code is a "commercial item," as that term is defined in + 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer + software" and "commercial computer software documentation," as such + terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 + C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), + all U.S. Government End Users acquire Covered Code with only those + rights set forth herein. + +11. MISCELLANEOUS. + + This License represents the complete agreement concerning subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. This License shall be governed by + California law provisions (except to the extent applicable law, if + any, provides otherwise), excluding its conflict-of-law provisions. + With respect to disputes in which at least one party is a citizen of, + or an entity chartered or registered to do business in the United + States of America, any litigation relating to this License shall be + subject to the jurisdiction of the Federal Courts of the Northern + District of California, with venue lying in Santa Clara County, + California, with the losing party responsible for costs, including + without limitation, court costs and reasonable attorneys' fees and + expenses. The application of the United Nations Convention on + Contracts for the International Sale of Goods is expressly excluded. + Any law or regulation which provides that the language of a contract + shall be construed against the drafter shall not apply to this + License. + +12. RESPONSIBILITY FOR CLAIMS. + + As between Initial Developer and the Contributors, each party is + responsible for claims and damages arising, directly or indirectly, + out of its utilization of rights under this License and You agree to + work with Initial Developer and Contributors to distribute such + responsibility on an equitable basis. Nothing herein is intended or + shall be deemed to constitute any admission of liability. + +13. MULTIPLE-LICENSED CODE. + + Initial Developer may designate portions of the Covered Code as + "Multiple-Licensed". "Multiple-Licensed" means that the Initial + Developer permits you to utilize portions of the Covered Code under + Your choice of the NPL or the alternative licenses, if any, specified + by the Initial Developer in the file described in Exhibit A. + +EXHIBIT A -Mozilla Public License. + + ``The contents of this file are subject to the Mozilla Public License + Version 1.1 (the "License"); you may not use this file except in + compliance with the License. You may obtain a copy of the License at + http://www.mozilla.org/MPL/ + + Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + License for the specific language governing rights and limitations + under the License. + + The Original Code is ______________________________________. + + The Initial Developer of the Original Code is ________________________. + Portions created by ______________________ are Copyright (C) ______ + _______________________. All Rights Reserved. + + Contributor(s): ______________________________________. + + Alternatively, the contents of this file may be used under the terms + of the _____ license (the "[___] License"), in which case the + provisions of [______] License are applicable instead of those + above. If you wish to allow use of your version of this file only + under the terms of the [____] License and not to allow others to use + your version of this file under the MPL, indicate your decision by + deleting the provisions above and replace them with the notice and + other provisions required by the [___] License. If you do not delete + the provisions above, a recipient may use your version of this file + under either the MPL or the [___] License." + + [NOTE: The text of this Exhibit A may differ slightly from the text of + the notices in the Source Code files of the Original Code. You should + use the text of this Exhibit A rather than the text found in the + Original Code Source Code for Your Modifications.] + +============================================================================================ +LGPLv2.0 + + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, so that any problems introduced by others will not reflect on +the original authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. + + Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. + + Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the source code distributed need not include anything that is normally +distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Library General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + +============================================================================================ +LGPLv2.1 + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + +============================================================================================ +LGPLv3 + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. + +============================================================================================ +GPLv1 + + + GNU GENERAL PUBLIC LICENSE + Version 1, February 1989 + + Copyright (C) 1989 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The license agreements of most software companies try to keep users +at the mercy of those companies. By contrast, our General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. The +General Public License applies to the Free Software Foundation's +software and to any other program whose authors commit to using it. +You can use it for your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Specifically, the General Public License is designed to make +sure that you have the freedom to give away or sell copies of free +software, that you receive source code or can get it if you want it, +that you can change the software or use pieces of it in new free +programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of a such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must tell them their rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any program or other work which +contains a notice placed by the copyright holder saying it may be +distributed under the terms of this General Public License. The +"Program", below, refers to any such program or work, and a "work based +on the Program" means either the Program or any work containing the +Program or a portion of it, either verbatim or with modifications. Each +licensee is addressed as "you". + + 1. You may copy and distribute verbatim copies of the Program's source +code as you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this +General Public License and to the absence of any warranty; and give any +other recipients of the Program a copy of this General Public License +along with the Program. You may charge a fee for the physical act of +transferring a copy. + + 2. You may modify your copy or copies of the Program or any portion of +it, and copy and distribute such modifications under the terms of Paragraph +1 above, provided that you also do the following: + + a) cause the modified files to carry prominent notices stating that + you changed the files and the date of any change; and + + b) cause the whole of any work that you distribute or publish, that + in whole or in part contains the Program or any part thereof, either + with or without modifications, to be licensed at no charge to all + third parties under the terms of this General Public License (except + that you may choose to grant warranty protection to some or all + third parties, at your option). + + c) If the modified program normally reads commands interactively when + run, you must cause it, when started running for such interactive use + in the simplest and most usual way, to print or display an + announcement including an appropriate copyright notice and a notice + that there is no warranty (or else, saying that you provide a + warranty) and that users may redistribute the program under these + conditions, and telling the user how to view a copy of this General + Public License. + + d) You may charge a fee for the physical act of transferring a + copy, and you may at your option offer warranty protection in + exchange for a fee. + +Mere aggregation of another independent work with the Program (or its +derivative) on a volume of a storage or distribution medium does not bring +the other work under the scope of these terms. + + 3. You may copy and distribute the Program (or a portion or derivative of +it, under Paragraph 2) in object code or executable form under the terms of +Paragraphs 1 and 2 above provided that you also do one of the following: + + a) accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of + Paragraphs 1 and 2 above; or, + + b) accompany it with a written offer, valid for at least three + years, to give any third party free (except for a nominal charge + for the cost of distribution) a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of + Paragraphs 1 and 2 above; or, + + c) accompany it with the information you received as to where the + corresponding source code may be obtained. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form alone.) + +Source code for a work means the preferred form of the work for making +modifications to it. For an executable file, complete source code means +all the source code for all modules it contains; but, as a special +exception, it need not include source code for modules which are standard +libraries that accompany the operating system on which the executable +file runs, or for standard header files or definitions files that +accompany that operating system. + + 4. You may not copy, modify, sublicense, distribute or transfer the +Program except as expressly provided under this General Public License. +Any attempt otherwise to copy, modify, sublicense, distribute or transfer +the Program is void, and will automatically terminate your rights to use +the Program under this License. However, parties who have received +copies, or rights to use copies, from you under this General Public +License will not have their licenses terminated so long as such parties +remain in full compliance. + + 5. By copying, distributing or modifying the Program (or any work based +on the Program) you indicate your acceptance of this license to do so, +and all its terms and conditions. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the original +licensor to copy, distribute or modify the Program subject to these +terms and conditions. You may not impose any further restrictions on the +recipients' exercise of the rights granted herein. + + 7. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of the license which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +the license, you may choose any version ever published by the Free Software +Foundation. + + 8. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to humanity, the best way to achieve this is to make it +free software which everyone can redistribute and change under these +terms. + + To do so, attach the following notices to the program. It is safest to +attach them to the start of each source file to most effectively convey +the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19xx name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the +appropriate parts of the General Public License. Of course, the +commands you use may be called something other than `show w' and `show +c'; they could even be mouse-clicks or menu items--whatever suits your +program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + program `Gnomovision' (a program to direct compilers to make passes + at assemblers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +That's all there is to it! + +============================================================================================ +GPLv2 + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. + +============================================================================================ +GPLv3 + + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. + +============================================================================================ +OpenSSL License + + + LICENSE ISSUES + ============== + + The OpenSSL toolkit stays under a dual license, i.e. both the conditions of + the OpenSSL License and the original SSLeay license apply to the toolkit. + See below for the actual license texts. Actually both licenses are BSD-style + Open Source licenses. In case of any license issues related to OpenSSL + please contact openssl-core@openssl.org. + + OpenSSL License + --------------- + +/* ==================================================================== + * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * ==================================================================== + * + * This product includes cryptographic software written by Eric Young + * (eay@cryptsoft.com). This product includes software written by Tim + * Hudson (tjh@cryptsoft.com). + * + */ + + Original SSLeay License + ----------------------- + +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ + + +============================================================================================ +Artistic License + + The "Artistic License" + + Preamble + +The intent of this document is to state the conditions under which a +Package may be copied, such that the Copyright Holder maintains some +semblance of artistic control over the development of the package, +while giving the users of the package the right to use and distribute +the Package in a more-or-less customary fashion, plus the right to make +reasonable modifications. + +Definitions: + +"Package" refers to the collection of files distributed by the +Copyright Holder, and derivatives of that collection of files +created through textual modification. + +"Standard Version" refers to such a Package if it has not been +modified, or has been modified in accordance with the wishes +of the Copyright Holder as specified below. + +"Copyright Holder" is whoever is named in the copyright or +copyrights for the package. + +"You" is you, if you're thinking about copying or distributing +this Package. + +"Reasonable copying fee" is whatever you can justify on the +basis of media cost, duplication charges, time of people involved, +and so on. (You will not be required to justify it to the +Copyright Holder, but only to the computing community at large +as a market that must bear the fee.) + +"Freely Available" means that no fee is charged for the item +itself, though there may be fees involved in handling the item. +It also means that recipients of the item may redistribute it +under the same conditions they received it. + +1. You may make and give away verbatim copies of the source form of the +Standard Version of this Package without restriction, provided that you +duplicate all of the original copyright notices and associated disclaimers. + +2. You may apply bug fixes, portability fixes and other modifications +derived from the Public Domain or from the Copyright Holder. A Package +modified in such a way shall still be considered the Standard Version. + +3. You may otherwise modify your copy of this Package in any way, provided +that you insert a prominent notice in each changed file stating how and +when you changed that file, and provided that you do at least ONE of the +following: + + a) place your modifications in the Public Domain or otherwise make them + Freely Available, such as by posting said modifications to Usenet or + an equivalent medium, or placing the modifications on a major archive + site such as uunet.uu.net, or by allowing the Copyright Holder to include + your modifications in the Standard Version of the Package. + + b) use the modified Package only within your corporation or organization. + + c) rename any non-standard executables so the names do not conflict + with standard executables, which must also be provided, and provide + a separate manual page for each non-standard executable that clearly + documents how it differs from the Standard Version. + + d) make other distribution arrangements with the Copyright Holder. + +4. You may distribute the programs of this Package in object code or +executable form, provided that you do at least ONE of the following: + + a) distribute a Standard Version of the executables and library files, + together with instructions (in the manual page or equivalent) on where + to get the Standard Version. + + b) accompany the distribution with the machine-readable source of + the Package with your modifications. + + c) give non-standard executables non-standard names, and clearly + document the differences in manual pages (or equivalent), together + with instructions on where to get the Standard Version. + + d) make other distribution arrangements with the Copyright Holder. + +5. You may charge a reasonable copying fee for any distribution of this +Package. You may charge any fee you choose for support of this +Package. You may not charge a fee for this Package itself. However, +you may distribute this Package in aggregate with other (possibly +commercial) programs as part of a larger (possibly commercial) software +distribution provided that you do not advertise this Package as a +product of your own. You may embed this Package's interpreter within +an executable of yours (by linking); this shall be construed as a mere +form of aggregation, provided that the complete Standard Version of the +interpreter is so embedded. + +6. The scripts and library files supplied as input to or produced as +output from the programs of this Package do not automatically fall +under the copyright of this Package, but belong to whoever generated +them, and may be sold commercially, and may be aggregated with this +Package. If such scripts or library files are aggregated with this +Package via the so-called "undump" or "unexec" methods of producing a +binary executable image, then distribution of such an image shall +neither be construed as a distribution of this Package nor shall it +fall under the restrictions of Paragraphs 3 and 4, provided that you do +not represent such an executable image as a Standard Version of this +Package. + +7. C subroutines (or comparably compiled subroutines in other +languages) supplied by you and linked into this Package in order to +emulate subroutines and variables of the language defined by this +Package shall not be considered part of this Package, but are the +equivalent of input as in Paragraph 6, provided these subroutines do +not change the language in any way that would cause it to fail the +regression tests for the language. + +8. Aggregation of this Package with a commercial distribution is always +permitted provided that the use of this Package is embedded; that is, +when no overt attempt is made to make this Package's interfaces visible +to the end user of the commercial distribution. Such use shall not be +construed as a distribution of this Package. + +9. The name of the Copyright Holder may not be used to endorse or promote +products derived from this software without specific prior written permission. + +10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + The End + +============================================================================================ +bzip2 License + +This program, "bzip2" and associated library "libbzip2", are copyright (C) 1996-2000 Julian R Seward. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted +provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions +and the following disclaimer. + +2. he origin of this software must not be misrepresented; you must not claim that you wrote +the original software. If you use this software in a product, an acknowledgment in the product +documentation would be appreciated but is not required. + +3. Altered source versions must be plainly marked as such, and must not be misrepresented +as being the original software. + +4. The name of the author may not be used to endorse or promote products derived from this +software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +============================================================================================ +ICU License + +COPYRIGHT AND PERMISSION NOTICE + +Copyright (c) 1995-2011 International Business Machines Corporation and others + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished +to do so, provided that the above copyright notice(s) and this permission +notice appear in all copies of the Software and that both the above copyright +notice(s) and this permission notice appear in supporting documentation. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE +COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE +FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA +OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH +THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Except as contained in this notice, the name of a copyright holder shall +not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization of the +copyright holder. + +============================================================================================ +Red Hat Software License + +Copyright (c) 1998 Red Hat Software + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +============================================================================================ +libpng license + +This copy of the libpng notices is provided for your convenience. In case of +any discrepancy between this copy and the notices in the file png.h that is +included in the libpng distribution, the latter shall prevail. + +COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: + +If you modify libpng you may insert additional notices immediately following +this sentence. + +This code is released under the libpng license. + +libpng versions 1.2.6, August 15, 2004, through 1.2.46, July 9, 2011, are +Copyright (c) 2004, 2006-2009 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-1.2.5 +with the following individual added to the list of Contributing Authors + + Cosmin Truta + +libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are +Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-1.0.6 +with the following individuals added to the list of Contributing Authors + + Simon-Pierre Cadieux + Eric S. Raymond + Gilles Vollant + +and with the following additions to the disclaimer: + + There is no warranty against interference with your enjoyment of the + library or against infringement. There is no warranty that our + efforts or the library will fulfill any of your particular purposes + or needs. This library is provided with all faults, and the entire + risk of satisfactory quality, performance, accuracy, and effort is with + the user. + +libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are +Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-0.96, +with the following individuals added to the list of Contributing Authors: + + Tom Lane + Glenn Randers-Pehrson + Willem van Schaik + +libpng versions 0.89, June 1996, through 0.96, May 1997, are +Copyright (c) 1996, 1997 Andreas Dilger +Distributed according to the same disclaimer and license as libpng-0.88, +with the following individuals added to the list of Contributing Authors: + + John Bowler + Kevin Bracey + Sam Bushell + Magnus Holmgren + Greg Roelofs + Tom Tanner + +libpng versions 0.5, May 1995, through 0.88, January 1996, are +Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. + +For the purposes of this copyright and license, "Contributing Authors" +is defined as the following set of individuals: + + Andreas Dilger + Dave Martindale + Guy Eric Schalnat + Paul Schmidt + Tim Wegner + +The PNG Reference Library is supplied "AS IS". The Contributing Authors +and Group 42, Inc. disclaim all warranties, expressed or implied, +including, without limitation, the warranties of merchantability and of +fitness for any purpose. The Contributing Authors and Group 42, Inc. +assume no liability for direct, indirect, incidental, special, exemplary, +or consequential damages, which may result from the use of the PNG +Reference Library, even if advised of the possibility of such damage. + +Permission is hereby granted to use, copy, modify, and distribute this +source code, or portions hereof, for any purpose, without fee, subject +to the following restrictions: + +1. The origin of this source code must not be misrepresented. + +2. Altered versions must be plainly marked as such and must not + be misrepresented as being the original source. + +3. This Copyright notice may not be removed or altered from any + source or altered source distribution. + +The Contributing Authors and Group 42, Inc. specifically permit, without +fee, and encourage the use of this source code as a component to +supporting the PNG file format in commercial products. If you use this +source code in a product, acknowledgment is not required but would be +appreciated. + + +A "png_get_copyright" function is available, for convenient use in "about" +boxes and the like: + + printf("%s",png_get_copyright(NULL)); + +Also, the PNG logo (in PNG format, of course) is supplied in the +files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). + +Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a +certification mark of the Open Source Initiative. + +Glenn Randers-Pehrson +glennrp at users.sourceforge.net +July 9, 2011 + +============================================================================================ +X Consortium license + +Copyright (C) 1996 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +============================================================================================ +MIT license + +Copyright (C) + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +============================================================================================ +Zlib license + +Copyright (c) <''year''> <''copyright holders''> + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +============================================================================================ +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. + + +============================================================================================ +libjpeg License + +This is Debian's prepackaged version of the `jpeg library' by the Independent +JPEG Group. + +This package was created by Mark Mickan from sources +which can be found at ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz + +It is partly based on the libjpeg6a package originally put together by +Andy Guy and later maintained by Mark Mickan. + +Current Debian maintainer is Bill Allombert . + +LEGAL ISSUES [ from README supplied with source - MM ] +============ + +In plain English: + +1. We don't promise that this software works. (But if you find any bugs, + please let us know!) +2. You can use this software for whatever you want. You don't have to pay us. +3. You may not pretend that you wrote this software. If you use it in a + program, you must acknowledge somewhere in your documentation that + you've used the IJG code. + +In legalese: + +The authors make NO WARRANTY or representation, either express or implied, +with respect to this software, its quality, accuracy, merchantability, or +fitness for a particular purpose. This software is provided "AS IS", and you, +its user, assume the entire risk as to its quality and accuracy. + +This software is copyright (C) 1991-2009, Thomas G. Lane, Guido Vollbeding. +All Rights Reserved except as specified below. + +Permission is hereby granted to use, copy, modify, and distribute this +software (or portions thereof) for any purpose, without fee, subject to these +conditions: +(1) If any part of the source code for this software is distributed, then this +README file must be included, with this copyright and no-warranty notice +unaltered; and any additions, deletions, or changes to the original files +must be clearly indicated in accompanying documentation. +(2) If only executable code is distributed, then the accompanying +documentation must state that "this software is based in part on the work of +the Independent JPEG Group". +(3) Permission for use of this software is granted only if the user accepts +full responsibility for any undesirable consequences; the authors accept +NO LIABILITY for damages of any kind. + +These conditions apply to any software derived from or based on the IJG code, +not just to the unmodified library. If you use our work, you ought to +acknowledge us. + +Permission is NOT granted for the use of any IJG author's name or company name +in advertising or publicity relating to this software or products derived from +it. This software may be referred to only as "the Independent JPEG Group's +software". + +We specifically permit and encourage the use of this software as the basis of +commercial products, provided that all warranty or liability claims are +assumed by the product vendor. + + +ansi2knr.c is included in this distribution by permission of L. Peter Deutsch, +sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA. +ansi2knr.c is NOT covered by the above copyright and conditions, but instead +by the usual distribution terms of the Free Software Foundation; principally, +that you must include source code if you redistribute it. (See the file +ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part +of any program generated from the IJG code, this does not limit you more than +the foregoing paragraphs do. + +The Unix configuration script "configure" was produced with GNU Autoconf. +It is copyright by the Free Software Foundation but is freely distributable. +The same holds for its supporting scripts (config.guess, config.sub, +ltconfig, ltmain.sh). Another support script, install-sh, is copyright +by M.I.T. but is also freely distributable. + +It appears that the arithmetic coding option of the JPEG spec is covered by +patents owned by IBM, AT&T, and Mitsubishi. Hence arithmetic coding cannot +legally be used without obtaining one or more licenses. For this reason, +support for arithmetic coding has been removed from the free JPEG software. +(Since arithmetic coding provides only a marginal gain over the unpatented +Huffman mode, it is unlikely that very many implementations will support it.) +So far as we are aware, there are no patent restrictions on the remaining +code. + +The IJG distribution formerly included code to read and write GIF files. +To avoid entanglement with the Unisys LZW patent, GIF reading support has +been removed altogether, and the GIF writer has been simplified to produce +"uncompressed GIFs". This technique does not use the LZW algorithm; the +resulting GIF files are larger than usual, but are readable by all standard +GIF decoders. + +We are required to state that + "The Graphics Interchange Format(c) is the Copyright property of + CompuServe Incorporated. GIF(sm) is a Service Mark property of + CompuServe Incorporated." + +============================================================================================ +ncurse License + +This is the Debian prepackaged version of the ncurses +library and terminfo utilities. ncurses/terminfo was originally written +by Pavel Curtis and Zeyd M. Ben-Halim , and is +currently held by the Free Software Foundation. + +This package was put together by Vaidhyanathan G Mayilrangam + and Joel Klecker , using sources +obtained from ftp://ftp.gnu.org/gnu/ncurses/ncurses-5.0.tar.gz. + +It is based somewhat on work done by Bruce Perens , +David Engel . Michael Alan Dorman +, Richard Braakman , James Troup +, J.H.M. Dassen (Ray) +, and Galen Hazelwood +over various years. + + +Changes: + * added Debian package maintenance system files + * changed Makefile.in's to compile with -D_REENTRANT + * changed configure.in to support proper compilation of debugging libraries + * Fixed tget{flag,num,str} in lib_termcap ("long" strings work now) + +Changes to terminfo.src: + * Removed ich(1) from linux, screen, vt320 + +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + + +============================================================================================ +GCC 4.5 License + +This is the Debian GNU/Linux prepackaged version of the GNU compiler +collection, containing Ada, C, C++, Fortran 95, Java, Objective-C, +Objective-C++, and Treelang compilers, documentation, and support +libraries. In addition, Debian provides the gdc compiler, either in +the same source package, or built from a separate same source package. +Packaging is done by the Debian GCC Maintainers +, with sources obtained from: + + ftp://gcc.gnu.org/pub/gcc/releases/ (for full releases) + svn://gcc.gnu.org/svn/gcc/ (for prereleases) + http://bitbucket.org/goshawk/gdc (for D) + +The current gcc-4.5 source package is taken from the SVN gcc-4_5-branch. + +Changes: See changelog.Debian.gz + +Debian splits the GNU Compiler Collection into packages for each language, +library, and documentation as follows: + +Language Compiler package Library package Documentation +--------------------------------------------------------------------------- +Ada gnat-4.5 libgnat-4.5 gnat-4.5-doc +C gcc-4.5 gcc-4.5-doc +C++ g++-4.5 libstdc++6 libstdc++6-4.5-doc +D gdc-4.5 +Fortran 95 gfortran-4.5 libgfortran3 gfortran-4.5-doc +Java gcj-4.5 libgcj10 libgcj-doc +Objective C gobjc-4.5 libobjc2 +Objective C++ gobjc++-4.5 + +For some language run-time libraries, Debian provides source files, +development files, debugging symbols and libraries containing position- +independent code in separate packages: + +Language Sources Development Debugging Position-Independent +------------------------------------------------------------------------------ +C++ libstdc++6-4.5-dbg libstdc++6-4.5-pic +D libphobos-4.5-dev +Java libgcj10-src libgcj10-dev libgcj10-dbg + +Additional packages include: + +All languages: +libgcc1, libgcc2, libgcc4 GCC intrinsics (platform-dependent) +gcc-4.5-base Base files common to all compilers +gcc-4.5-soft-float Software floating point (ARM only) +gcc-4.5-source The sources with patches + +Ada: +libgnatvsn-dev, libgnatvsn4.5 GNAT version library +libgnatprj-dev, libgnatprj4.5 GNAT Project Manager library + +C: +cpp-4.5, cpp-4.5-doc GNU C Preprocessor +libmudflap0-dev, libmudflap0 Library for instrumenting pointers +libssp0-dev, libssp0 GCC stack smashing protection library +fixincludes Fix non-ANSI header files +protoize Create/remove ANSI prototypes from C code + +Java: +gij The Java bytecode interpreter and VM +libgcj-common Common files for the Java run-time +libgcj10-awt The Abstract Windowing Toolkit +libgcj10-jar Java ARchive for the Java run-time + +C, C++ and Fortran 95: +libgomp1-dev, libgomp1 GCC OpenMP (GOMP) support library + +Biarch support: On some 64-bit platforms which can also run 32-bit code, +Debian provides additional packages containing 32-bit versions of some +libraries. These packages have names beginning with 'lib32' instead of +'lib', for example lib32stdc++6. Similarly, on some 32-bit platforms which +can also run 64-bit code, Debian provides additional packages with names +beginning with 'lib64' instead of 'lib'. These packages contain 64-bit +versions of the libraries. (At this time, not all platforms and not all +libraries support biarch.) The license terms for these lib32 or lib64 +packages are identical to the ones for the lib packages. + + +COPYRIGHT STATEMENTS AND LICENSING TERMS + + +GCC is Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, +1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +2008 Free Software Foundation, Inc. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Files that have exception clauses are licensed under the terms of the +GNU General Public License; either version 3, or (at your option) any +later version. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License is in `/usr/share/common-licenses/GPL', version 3 of this +license in `/usr/share/common-licenses/GPL-3'. + +The following runtime libraries are licensed under the terms of the +GNU General Public License (v3 or later) with version 3.1 of the GCC +Runtime Library Exception (included in this file): + + - libgcc (libgcc/, gcc/libgcc2.[ch], gcc/unwind*, gcc/gthr*, + gcc/coretypes.h, gcc/crtstuff.c, gcc/defaults.h, gcc/dwarf2.h, + gcc/emults.c, gcc/gbl-ctors.h, gcc/gcov-io.h, gcc/libgcov.c, + gcc/tsystem.h, gcc/typeclass.h). + - libdecnumber + - libgomp + - libssp + - libstdc++-v3 + - libobjc + - libmudflap + - libgfortran + - The libgnat-4.5 Ada support library and libgnatvsn library. + - Various config files in gcc/config/ used in runtime libraries. + +In contrast, libgnatprj is licensed under the terms of the pure GNU +General Public License. + +The libgcj library is licensed under the terms of the GNU General +Public License, with a special exception: + + Linking this library statically or dynamically with other modules + is making a combined work based on this library. Thus, the terms + and conditions of the GNU General Public License cover the whole + combination. + + As a special exception, the copyright holders of this library give + you permission to link this library with independent modules to + produce an executable, regardless of the license terms of these + independent modules, and to copy and distribute the resulting + executable under terms of your choice, provided that you also + meet, for each linked independent module, the terms and conditions + of the license of that module. An independent module is a module + which is not derived from or based on this library. If you modify + this library, you may extend this exception to your version of the + library, but you are not obligated to do so. If you do not wish + to do so, delete this exception statement from your version. + +The libffi library is licensed under the following terms: + + libffi - Copyright (c) 1996-2003 Red Hat, Inc. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + ``Software''), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + +The documentation is licensed under the GNU Free Documentation License (v1.2). +On Debian GNU/Linux systems, the complete text of this license is in +`/usr/share/common-licenses/GFDL-1.2'. + + +GCC RUNTIME LIBRARY EXCEPTION + +Version 3.1, 31 March 2009 + +Copyright (C) 2009 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + +This GCC Runtime Library Exception ("Exception") is an additional +permission under section 7 of the GNU General Public License, version +3 ("GPLv3"). It applies to a given file (the "Runtime Library") that +bears a notice placed by the copyright holder of the file stating that +the file is governed by GPLv3 along with this Exception. + +When you use GCC to compile a program, GCC may combine portions of +certain GCC header files and runtime libraries with the compiled +program. The purpose of this Exception is to allow compilation of +non-GPL (including proprietary) programs to use, in this way, the +header files and runtime libraries covered by this Exception. + +0. Definitions. + +A file is an "Independent Module" if it either requires the Runtime +Library for execution after a Compilation Process, or makes use of an +interface provided by the Runtime Library, but is not otherwise based +on the Runtime Library. + +"GCC" means a version of the GNU Compiler Collection, with or without +modifications, governed by version 3 (or a specified later version) of +the GNU General Public License (GPL) with the option of using any +subsequent versions published by the FSF. + +"GPL-compatible Software" is software whose conditions of propagation, +modification and use would permit combination with GCC in accord with +the license of GCC. + +"Target Code" refers to output from any compiler for a real or virtual +target processor architecture, in executable form or suitable for +input to an assembler, loader, linker and/or execution +phase. Notwithstanding that, Target Code does not include data in any +format that is used as a compiler intermediate representation, or used +for producing a compiler intermediate representation. + +The "Compilation Process" transforms code entirely represented in +non-intermediate languages designed for human-written code, and/or in +Java Virtual Machine byte code, into Target Code. Thus, for example, +use of source code generators and preprocessors need not be considered +part of the Compilation Process, since the Compilation Process can be +understood as starting with the output of the generators or +preprocessors. + +A Compilation Process is "Eligible" if it is done using GCC, alone or +with other GPL-compatible software, or if it is done without using any +work based on GCC. For example, using non-GPL-compatible Software to +optimize any GCC intermediate representations would not qualify as an +Eligible Compilation Process. + +1. Grant of Additional Permission. + +You have permission to propagate a work of Target Code formed by +combining the Runtime Library with Independent Modules, even if such +propagation would otherwise violate the terms of GPLv3, provided that +all Target Code was generated by Eligible Compilation Processes. You +may then convey such a combination under terms of your choice, +consistent with the licensing of the Independent Modules. + +2. No Weakening of GCC Copyleft. + +The availability of this Exception does not imply any general +presumption that third-party software is unaffected by the copyleft +requirements of the license of GCC. + + +D: +gdc-4.5 GNU D Compiler +libphobos-4.5-dev D standard runtime library + +The D source package is made up of the following components. + +The D front-end for GCC: + - d/* + +Copyright (C) 2004-2007 David Friedman +Modified by Vincenzo Ampolo, Michael Parrot, Iain Buclaw, (C) 2009, 2010 + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License is in `/usr/share/common-licenses/GPL', version 2 of this +license in `/usr/share/common-licenses/GPL-2'. + + +The DMD Compiler implementation of the D programming language: + - d/dmd/* + +Copyright (c) 1999-2010 by Digital Mars +All Rights Reserved +written by Walter Bright +http://www.digitalmars.com +License for redistribution is by either the Artistic License or +the GNU General Public License (v1). + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License is in `/usr/share/common-licenses/GPL', the Artistic +license in `/usr/share/common-licenses/Artistic'. + + +The Zlib data compression library: + - d/phobos/etc/c/zlib/* + + (C) 1995-2004 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + +The Phobos standard runtime library: + - d/phobos/* + +Unless otherwise marked within the file, each file in the source +is under the following licenses: + +Copyright (C) 2004-2005 by Digital Mars, www.digitalmars.com +Written by Walter Bright + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, in both source and binary form, subject to the following +restrictions: + + o The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + o Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. + o This notice may not be removed or altered from any source + distribution. + +By plainly marking modifications, something along the lines of adding to each +file that has been changed a "Modified by Foo Bar" line +underneath the "Written by" line would be adequate. + +============================================================================================ +perl License + +This package was debianized by Brendan O'Dea on +Thu, 17 Aug 2000 16:10:54 +1000. + +It was downloaded from: + + + +Upstream Authors: + + Larry Wall et. al. (see /usr/share/doc/perl/AUTHORS). + +Copyright: + + Copyright 1989-2001, Larry Wall All rights reserved. + + This program is free software; you can redistribute it and/or modify + it under the terms of either: + + a) the GNU General Public License as published by the Free Software + Foundation; either version 1, or (at your option) any later + version, or + + b) the "Artistic License" which comes with Perl. + + On Debian GNU/Linux systems, the complete text of the GNU General + Public License can be found in `/usr/share/common-licenses/GPL' and + the Artistic Licence in `/usr/share/common-licenses/Artistic'. + +---------------------------------------------------------------------- + +The zlib library in ext/Compress-Raw-Zlib/zlib-src has the following +copyright and license: + + Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + +---------------------------------------------------------------------- + +The Unicode database files in lib/unicore/*.txt are +Copyright (c) 1991-2006 Unicode, Inc. + +Their license information is given as + For terms of use, see http://www.unicode.org/terms_of_use.html + +The corresponding license is as follows: + + EXHIBIT 1 + UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE + + Unicode Data Files include all data files under the directories + http://www.unicode.org/Public/, http://www.unicode.org/reports/, + and http://www.unicode.org/cldr/data/ . Unicode Software includes any + source code published in the Unicode Standard or under the directories + http://www.unicode.org/Public/, http://www.unicode.org/reports/, + and http://www.unicode.org/cldr/data/. + + NOTICE TO USER: Carefully read the following legal agreement. BY + DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE + INC.'S DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), YOU + UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE TERMS AND + CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT DOWNLOAD, + INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE. + + COPYRIGHT AND PERMISSION NOTICE + + Copyright ⓒ 1991-2008 Unicode, Inc. All rights + reserved. Distributed under the Terms of Use in + http://www.unicode.org/copyright.html. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of the Unicode data files and any associated + documentation (the "Data Files") or Unicode software and any + associated documentation (the "Software") to deal in the Data Files + or Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, + and/or sell copies of the Data Files or Software, and to permit + persons to whom the Data Files or Software are furnished to do so, + provided that (a) the above copyright notice(s) and this permission + notice appear with all copies of the Data Files or Software, + (b) both the above copyright notice(s) and this permission notice + appear in associated documentation, and (c) there is clear notice + in each modified Data File or in the Software as well as in the + documentation associated with the Data File(s) or Software that + the data or software has been modified. + + THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY + OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE + AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE + COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE + FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, + OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THE DATA FILES OR SOFTWARE. + + Except as contained in this notice, the name of a copyright holder + shall not be used in advertising or otherwise to promote the sale, + use or other dealings in these Data Files or Software without + prior written authorization of the copyright holder. + +---------------------------------------------------------------------- + +The file lib/Cwd.pm has the following copyright and license: + + Copyright (c) 2004 by the Perl 5 Porters. All rights reserved. + + This program is free software; you can redistribute it and/or modify + it under the same terms as Perl itself. + + Portions of the C code in this library are copyright (c) 1994 by the + Regents of the University of California. All rights reserved. The + license on this code is compatible with the licensing of the rest of + the distribution - please see the source code in F for the + details. + +The file referenced above, ext/Cwd/Cwd.xs, has the following copyright: + + * Copyright (c) 1994 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry. + +and is licensed with the standard 3-clause BSD license. On Debian GNU/Linux +systems, this license can be found in `/usr/share/common-licenses/BSD'. + +---------------------------------------------------------------------- + +The C parts of File::Glob in ext/File-Glob/bsd_glob.[ch] hav the +following copyright: + + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Guido van Rossum. + +and are licensed with the standard 3-clause BSD license. On Debian GNU/Linux +systems, this license can be found in `/usr/share/common-licenses/BSD'. + +---------------------------------------------------------------------- + +The bzip2 library in ext/Compress-Raw-Bzip2/bzip2-src has the following +copyright and license: + + This program, "bzip2", the associated library "libbzip2", and all + documentation, are copyright (C) 1996-2007 Julian R Seward. All + rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. The origin of this software must not be misrepresented; you must + not claim that you wrote the original software. If you use this + software in a product, an acknowledgment in the product + documentation would be appreciated but is not required. + + 3. Altered source versions must be plainly marked as such, and must + not be misrepresented as being the original software. + + 4. The name of the author may not be used to endorse or promote + products derived from this software without specific prior written + permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + Julian Seward, jseward@bzip.org + bzip2/libbzip2 version 1.0.5 of 10 December 2007 + +-------------------------------------------------------------------------- + +The Text::Tabs module in lib/Text/Tabs.pm has the following +copyright and license: + + Copyright (C) 1996-2002,2005,2006 David Muir Sharnoff. + Copyright (C) 2005 Aristotle Pagaltzis + This module may be modified, used, copied, and redistributed at your own risk. + Publicly redistributed modified versions must use a different name. + +-------------------------------------------------------------------------- + +Portions of the Debian packaging are + Copyright 2008-2010 Niko Tyni +The other people listed in debian/changelog are most probably +copyright holders too, but they have not included explicit copyright +or licensing information. + +The portions by Niko Tyni may be redistributed and/or modified under +the same terms as Perl itself. It is assumed that other contributors +have placed their contributions under a compatible license. + +-------------------------------------------------------------------------- + +============================================================================================ +BSD License + +Copyright (c) , +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. All advertising materials mentioning features or use of this software + must display the following acknowledgement: + This product includes software developed by the . +4. Neither the name of the nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY ''AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +============================================================================================ +New BSD License + +Copyright (c) , +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +============================================================================================ +Simplified BSD License + +Copyright . All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are +permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this list of + conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list + of conditions and the following disclaimer in the documentation and/or other materials + provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY ''AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The views and conclusions contained in the software and documentation are those of the +authors and should not be interpreted as representing official policies, either expressed +or implied, of . + +============================================================================================ +Small/Pawn License + +Copyright (c) ITB CompuPhase, 1997-2003 + +This software is provided "as-is", without any express or implied warranty. +In no event will the authors be held liable for any damages arising from +the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software in + a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + +============================================================================================ +Motorola License + + Copyright Motorola, Inc. 2003 + ALL RIGHTS RESERVED + + You are hereby granted a copyright license to use, modify, and + distribute the SOFTWARE so long as this entire notice is retained + without alteration in any modified and/or redistributed versions, + and that such modified versions are clearly identified as such. + No licenses are granted by implication, estoppel or otherwise under + any patents or trademarks of Motorola, Inc. + + The SOFTWARE is provided on an "AS IS" basis and without warranty. + To the maximum extent permitted by applicable law, MOTOROLA DISCLAIMS + ALL WARRANTIES WHETHER EXPRESS OR IMPLIED, INCLUDING IMPLIED + WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR + PURPOSE AND ANY WARRANTY AGAINST INFRINGEMENT WITH + REGARD TO THE SOFTWARE (INCLUDING ANY MODIFIED VERSIONS + THEREOF) AND ANY ACCOMPANYING WRITTEN MATERIALS. + + To the maximum extent permitted by applicable law, IN NO EVENT SHALL + MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER + (INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF + BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS + INFORMATION, OR OTHER PECUNIARY LOSS) ARISING OF THE USE OR + INABILITY TO USE THE SOFTWARE. Motorola assumes no responsibility + for the maintenance and support of the SOFTWARE. + +============================================================================================ +Google License + +THE C++ WRAPPER FUNCTIONS +------------------------- + +Contributed by: Google Inc. + +Copyright (c) 2007-2008, Google Inc. +All rights reserved. + +============================================================================================ +ISC(Internet Software Consortium) License + +Copyright ⓒ 2004-2011 by Internet Systems Consortium, Inc. ("ISC") +Copyright ⓒ 1995-2003 by Internet Software Consortium + +Permission to use, copy, modify, and/or distribute this +software for any purpose with or without fee is hereby +granted, provided that the above copyright notice and +this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO +EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, +OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING +FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +============================================================================================ +CPOL(The Code Project Open License) + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CODE PROJECT +OPEN LICENSE ("LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER +APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS +LICENSE OR COPYRIGHT LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HEREIN, YOU ACCEPT AND AGREE TO +BE BOUND BY THE TERMS OF THIS LICENSE. THE AUTHOR GRANTS YOU THE RIGHTS +CONTAINED HEREIN IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND +CONDITIONS. IF YOU DO NOT AGREE TO ACCEPT AND BE BOUND BY THE TERMS OF THIS +LICENSE, YOU CANNOT MAKE ANY USE OF THE WORK. + +1. Definitions. + a. "Articles" means, collectively, all articles written by Author which describes + how the Source Code and Executable Files for the Work may be used by a user. + b. "Author" means the individual or entity that offers the Work under the terms of + this License. + c. "Derivative Work" means a work based upon the Work or upon the Work and + other pre-existing works. + d. "Executable Files" refer to the executables, binary files, configuration and any + required data files included in the Work. + e. "Publisher" means the provider of the website, magazine, CD-ROM, DVD or + other medium from or by which the Work is obtained by You. + f. "Source Code" refers to the collection of source code and configuration files + used to create the Executable Files. + g. "Standard Version" refers to such a Work if it has not been modified, or has + been modified in accordance with the consent of the Author, such consent + being in the full discretion of the Author. + h. "Work" refers to the collection of files distributed by the Publisher, including + the Source Code, Executable Files, binaries, data files, documentation, + whitepapers and the Articles. + i. "You" is you, an individual or entity wishing to use the Work and exercise your + rights under this License. +2. Fair Use/Fair Use Rights. Nothing in this License is intended to reduce, limit, or + restrict any rights arising from fair use, fair dealing, first sale or other limitations on + the exclusive rights of the copyright owner under copyright law or other applicable laws. +3. License Grant. Subject to the terms and conditions of this License, the Author + hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the + duration of the applicable copyright) license to exercise the rights in the Work as + stated below: + a. You may use the standard version of the Source Code or Executable Files in + Your own applications. + b. You may apply bug fixes, portability fixes and other modifications obtained from + the Public Domain or from the Author. A Work modified in such a way shall still + be considered the standard version and will be subject to this License. + c. You may otherwise modify Your copy of this Work (excluding the Articles) in any + way to create a Derivative Work, provided that You insert a prominent notice in + each changed file stating how, when and where You changed that file. + d. You may distribute the standard version of the Executable Files and Source + Code or Derivative Work in aggregate with other (possibly commercial) programs + as part of a larger (possibly commercial) software distribution. + e. The Articles discussing the Work published in any form by the author may not + be distributed or republished without the Author's consent. The author retains + copyright to any such Articles. You may use the Executable Files and Source + Code pursuant to this License but you may not repost or republish or otherwise + distribute or make available the Articles, without the prior written consent of the Author. + Any subroutines or modules supplied by You and linked into the Source Code or + Executable Files of this Work shall not be considered part of this Work and will not be + subject to the terms of this License. +4. Patent License. Subject to the terms and conditions of this License, each Author + 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, import, and otherwise transfer the Work. +5. Restrictions. The license granted in Section 3 above is expressly made subject to + and limited by the following restrictions: + a. You agree not to remove any of the original copyright, patent, trademark, and + attribution notices and associated disclaimers that may appear in the Source + Code or Executable Files. + b. You agree not to advertise or in any way imply that this Work is a product of + Your own. + c. The name of the Author may not be used to endorse or promote products + derived from the Work without the prior written consent of the Author. + d. You agree not to sell, lease, or rent any part of the Work. This does not restrict + you from including the Work or any part of the Work inside a larger software + distribution that itself is being sold. The Work by itself, though, cannot be sold, + leased or rented. + e. You may distribute the Executable Files and Source Code only under the terms + of this License, and You must include a copy of, or the Uniform Resource + Identifier for, this License with every copy of the Executable Files or Source + Code You distribute and ensure that anyone receiving such Executable Files and + Source Code agrees that the terms of this License apply to such Executable + Files and/or Source Code. You may not offer or impose any terms on the Work + that alter or restrict the terms of this License or the recipients' exercise of the + rights granted hereunder. You may not sublicense the Work. You must keep + intact all notices that refer to this License and to the disclaimer of warranties. + You may not distribute the Executable Files or Source Code with any + technological measures that control access or use of the Work in a manner + inconsistent with the terms of this License. + f. You agree not to use the Work for illegal, immoral or improper purposes, or on + pages containing illegal, immoral or improper material. The Work is subject to + applicable export laws. You agree to comply with all such laws and regulations + that may apply to the Work after Your receipt of the Work. +6. Representations, Warranties and Disclaimer. THIS WORK IS PROVIDED "AS IS", + "WHERE IS" AND "AS AVAILABLE", WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES + OR CONDITIONS OR GUARANTEES. YOU, THE USER, ASSUME ALL RISK IN ITS USE, + INCLUDING COPYRIGHT INFRINGEMENT, PATENT INFRINGEMENT, SUITABILITY, ETC. + AUTHOR EXPRESSLY DISCLAIMS ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES + OR CONDITIONS, INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF + MERCHANTABILITY, MERCHANTABLE QUALITY OR FITNESS FOR A PARTICULAR + PURPOSE, OR ANY WARRANTY OF TITLE OR NON-INFRINGEMENT, OR THAT THE WORK + (OR ANY PORTION THEREOF) IS CORRECT, USEFUL, BUG-FREE OR FREE OF VIRUSES. + YOU MUST PASS THIS DISCLAIMER ON WHENEVER YOU DISTRIBUTE THE WORK OR + DERIVATIVE WORKS. +7. Indemnity. You agree to defend, indemnify and hold harmless the Author and the + Publisher from and against any claims, suits, losses, damages, liabilities, costs, and + expenses (including reasonable legal or attorneys? fees) resulting from or relating to + any use of the Work by You. +8. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN + NO EVENT WILL THE AUTHOR OR THE PUBLISHER BE LIABLE TO YOU ON ANY LEGAL + THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY + DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK OR OTHERWISE, + EVEN IF THE AUTHOR OR THE PUBLISHER HAS BEEN ADVISED OF THE POSSIBILITY OF + SUCH DAMAGES. +9. Termination. + a. This License and the rights granted hereunder will terminate automatically upon + any breach by You of any term of this License. Individuals or entities who have + received Derivative Works from You under this License, however, will not have + their licenses terminated provided such individuals or entities remain in full + compliance with those licenses. Sections 1, 2, 6, 7, 8, 9, 10 and 11 will survive + any termination of this License. + b. If You bring a copyright, trademark, patent or any other infringement claim + against any contributor over infringements You claim are made by the Work, + your License from such contributor to the Work ends automatically. + c. Subject to the above terms and conditions, this License is perpetual (for the + duration of the applicable copyright in the Work). Notwithstanding the above, + the Author reserves the right to release the Work under different license terms + or to stop distributing the Work at any time; provided, however that any such + election will not serve to withdraw this License (or any other license that has + been, or is required to be, granted under the terms of this License), and this + License will continue in full force and effect unless terminated as stated above. +10. Publisher. The parties hereby confirm that the Publisher shall not, under any + circumstances, be responsible for and shall not have any liability in respect of the + subject matter of this License. The Publisher makes no warranty whatsoever in + connection with the Work and shall not be liable to You or any party on any legal + theory for any damages whatsoever, including without limitation any general, special, + incidental or consequential damages arising in connection to this license. The + Publisher reserves the right to cease making the Work available to You at any time + without notice +11. Miscellaneous + a. This License shall be governed by the laws of the location of the head office of + the Author or if the Author is an individual, the laws of location of the principal + place of residence of the Author. + b. If any provision of this License is invalid or unenforceable under applicable law, + it shall not affect the validity or enforceability of the remainder of the terms of + this License, and without further action by the parties to this License, such + provision shall be reformed to the minimum extent necessary to make such + provision valid and enforceable. + c. No term or provision of this License shall be deemed waived and no breach + consented to unless such waiver or consent shall be in writing and signed by + the party to be charged with such waiver or consent. + d. This License constitutes the entire agreement between the parties with respect + to the Work licensed herein. There are no understandings, agreements or + representations with respect to the Work not specified herein. The Author shall + not be bound by any additional provisions that may appear in any + communication from You. This License may not be modified without the mutual + written agreement of the Author and You. + + +============================================================================================ + + diff --git a/resource/icons/00_brightness_left.png b/resource/icons/00_brightness_left.png new file mode 100755 index 0000000..3f44b8f Binary files /dev/null and b/resource/icons/00_brightness_left.png differ diff --git a/resource/icons/00_brightness_left_gray.png b/resource/icons/00_brightness_left_gray.png new file mode 100755 index 0000000..7d43d75 Binary files /dev/null and b/resource/icons/00_brightness_left_gray.png differ diff --git a/resource/icons/00_brightness_right.png b/resource/icons/00_brightness_right.png new file mode 100755 index 0000000..06cf04f Binary files /dev/null and b/resource/icons/00_brightness_right.png differ diff --git a/resource/icons/00_brightness_right_gray.png b/resource/icons/00_brightness_right_gray.png new file mode 100755 index 0000000..09b23d2 Binary files /dev/null and b/resource/icons/00_brightness_right_gray.png differ diff --git a/resource/icons/00_input_bg_black.png b/resource/icons/00_input_bg_black.png new file mode 100755 index 0000000..d5c11f5 Binary files /dev/null and b/resource/icons/00_input_bg_black.png differ diff --git a/resource/icons/00_input_bg_white.png b/resource/icons/00_input_bg_white.png new file mode 100755 index 0000000..562314f Binary files /dev/null and b/resource/icons/00_input_bg_white.png differ diff --git a/resource/icons/00_list_expand_closed_arrow.png b/resource/icons/00_list_expand_closed_arrow.png new file mode 100755 index 0000000..32a2fb9 Binary files /dev/null and b/resource/icons/00_list_expand_closed_arrow.png differ diff --git a/resource/icons/00_list_expand_opened_arrow.png b/resource/icons/00_list_expand_opened_arrow.png new file mode 100755 index 0000000..ec41be0 Binary files /dev/null and b/resource/icons/00_list_expand_opened_arrow.png differ diff --git a/resource/icons/00_search_input_field_bg.png b/resource/icons/00_search_input_field_bg.png new file mode 100644 index 0000000..f5aaa5e Binary files /dev/null and b/resource/icons/00_search_input_field_bg.png differ diff --git a/resource/icons/01_header_icon_add.png b/resource/icons/01_header_icon_add.png new file mode 100644 index 0000000..43c4984 Binary files /dev/null and b/resource/icons/01_header_icon_add.png differ diff --git a/resource/icons/01_header_icon_cancel.png b/resource/icons/01_header_icon_cancel.png new file mode 100644 index 0000000..4fb54c3 Binary files /dev/null and b/resource/icons/01_header_icon_cancel.png differ diff --git a/resource/icons/01_header_icon_done.png b/resource/icons/01_header_icon_done.png new file mode 100644 index 0000000..d771640 Binary files /dev/null and b/resource/icons/01_header_icon_done.png differ diff --git a/resource/icons/01_header_icon_others.png b/resource/icons/01_header_icon_others.png new file mode 100644 index 0000000..4fc9dfa Binary files /dev/null and b/resource/icons/01_header_icon_others.png differ diff --git a/resource/icons/21_slider_btn_volume01.png b/resource/icons/21_slider_btn_volume01.png new file mode 100644 index 0000000..fd3b72d Binary files /dev/null and b/resource/icons/21_slider_btn_volume01.png differ diff --git a/resource/icons/21_slider_btn_volume02.png b/resource/icons/21_slider_btn_volume02.png new file mode 100644 index 0000000..8b3afb2 Binary files /dev/null and b/resource/icons/21_slider_btn_volume02.png differ diff --git a/resource/icons/68_icon_vibration_01.png b/resource/icons/68_icon_vibration_01.png new file mode 100755 index 0000000..dd36262 Binary files /dev/null and b/resource/icons/68_icon_vibration_01.png differ diff --git a/resource/icons/68_icon_vibration_02.png b/resource/icons/68_icon_vibration_02.png new file mode 100755 index 0000000..327ac97 Binary files /dev/null and b/resource/icons/68_icon_vibration_02.png differ diff --git a/resource/icons/A01-1_controlbar_icon_ringtones.png b/resource/icons/A01-1_controlbar_icon_ringtones.png new file mode 100644 index 0000000..86b0ea1 Binary files /dev/null and b/resource/icons/A01-1_controlbar_icon_ringtones.png differ diff --git a/resource/icons/A01-1_controlbar_icon_volume.png b/resource/icons/A01-1_controlbar_icon_volume.png new file mode 100644 index 0000000..3df3cb9 Binary files /dev/null and b/resource/icons/A01-1_controlbar_icon_volume.png differ diff --git a/resource/icons/A01-1_icon_About_phone.png b/resource/icons/A01-1_icon_About_phone.png new file mode 100755 index 0000000..d0273ef Binary files /dev/null and b/resource/icons/A01-1_icon_About_phone.png differ diff --git a/resource/icons/A01-1_icon_Accounts.png b/resource/icons/A01-1_icon_Accounts.png new file mode 100755 index 0000000..5ea4014 Binary files /dev/null and b/resource/icons/A01-1_icon_Accounts.png differ diff --git a/resource/icons/A01-1_icon_ActiveSync.png b/resource/icons/A01-1_icon_ActiveSync.png new file mode 100755 index 0000000..a6e1186 Binary files /dev/null and b/resource/icons/A01-1_icon_ActiveSync.png differ diff --git a/resource/icons/A01-1_icon_Allshare_cast.png b/resource/icons/A01-1_icon_Allshare_cast.png new file mode 100755 index 0000000..1164590 Binary files /dev/null and b/resource/icons/A01-1_icon_Allshare_cast.png differ diff --git a/resource/icons/A01-1_icon_Bluetooth.png b/resource/icons/A01-1_icon_Bluetooth.png new file mode 100755 index 0000000..74ada1c Binary files /dev/null and b/resource/icons/A01-1_icon_Bluetooth.png differ diff --git a/resource/icons/A01-1_icon_Brightness.png b/resource/icons/A01-1_icon_Brightness.png new file mode 100755 index 0000000..1b4e535 Binary files /dev/null and b/resource/icons/A01-1_icon_Brightness.png differ diff --git a/resource/icons/A01-1_icon_Choose_default.png b/resource/icons/A01-1_icon_Choose_default.png new file mode 100755 index 0000000..163490c Binary files /dev/null and b/resource/icons/A01-1_icon_Choose_default.png differ diff --git a/resource/icons/A01-1_icon_Data_Roaming.png b/resource/icons/A01-1_icon_Data_Roaming.png new file mode 100755 index 0000000..78dd444 Binary files /dev/null and b/resource/icons/A01-1_icon_Data_Roaming.png differ diff --git a/resource/icons/A01-1_icon_Date_and_time.png b/resource/icons/A01-1_icon_Date_and_time.png new file mode 100755 index 0000000..d1843a5 Binary files /dev/null and b/resource/icons/A01-1_icon_Date_and_time.png differ diff --git a/resource/icons/A01-1_icon_Display.png b/resource/icons/A01-1_icon_Display.png new file mode 100755 index 0000000..4556f70 Binary files /dev/null and b/resource/icons/A01-1_icon_Display.png differ diff --git a/resource/icons/A01-1_icon_Display_Language.png b/resource/icons/A01-1_icon_Display_Language.png new file mode 100755 index 0000000..b932d20 Binary files /dev/null and b/resource/icons/A01-1_icon_Display_Language.png differ diff --git a/resource/icons/A01-1_icon_Driving_mode.png b/resource/icons/A01-1_icon_Driving_mode.png new file mode 100755 index 0000000..b12fe51 Binary files /dev/null and b/resource/icons/A01-1_icon_Driving_mode.png differ diff --git a/resource/icons/A01-1_icon_Events_Notifications.png b/resource/icons/A01-1_icon_Events_Notifications.png new file mode 100755 index 0000000..2fc7555 Binary files /dev/null and b/resource/icons/A01-1_icon_Events_Notifications.png differ diff --git a/resource/icons/A01-1_icon_Flight_Mode.png b/resource/icons/A01-1_icon_Flight_Mode.png new file mode 100755 index 0000000..9c82cce Binary files /dev/null and b/resource/icons/A01-1_icon_Flight_Mode.png differ diff --git a/resource/icons/A01-1_icon_Font.png b/resource/icons/A01-1_icon_Font.png new file mode 100755 index 0000000..2a301ce Binary files /dev/null and b/resource/icons/A01-1_icon_Font.png differ diff --git a/resource/icons/A01-1_icon_Kies_via_Wifi.png b/resource/icons/A01-1_icon_Kies_via_Wifi.png new file mode 100755 index 0000000..1b9f081 Binary files /dev/null and b/resource/icons/A01-1_icon_Kies_via_Wifi.png differ diff --git a/resource/icons/A01-1_icon_License.png b/resource/icons/A01-1_icon_License.png new file mode 100755 index 0000000..b568c4f Binary files /dev/null and b/resource/icons/A01-1_icon_License.png differ diff --git a/resource/icons/A01-1_icon_Location.png b/resource/icons/A01-1_icon_Location.png new file mode 100755 index 0000000..6bceac2 Binary files /dev/null and b/resource/icons/A01-1_icon_Location.png differ diff --git a/resource/icons/A01-1_icon_Manage_Application.png b/resource/icons/A01-1_icon_Manage_Application.png new file mode 100755 index 0000000..83bf600 Binary files /dev/null and b/resource/icons/A01-1_icon_Manage_Application.png differ diff --git a/resource/icons/A01-1_icon_Memory.png b/resource/icons/A01-1_icon_Memory.png new file mode 100755 index 0000000..a000573 Binary files /dev/null and b/resource/icons/A01-1_icon_Memory.png differ diff --git a/resource/icons/A01-1_icon_Menu.png b/resource/icons/A01-1_icon_Menu.png new file mode 100755 index 0000000..b57953f Binary files /dev/null and b/resource/icons/A01-1_icon_Menu.png differ diff --git a/resource/icons/A01-1_icon_Motion.png b/resource/icons/A01-1_icon_Motion.png new file mode 100755 index 0000000..64d0c01 Binary files /dev/null and b/resource/icons/A01-1_icon_Motion.png differ diff --git a/resource/icons/A01-1_icon_Network.png b/resource/icons/A01-1_icon_Network.png new file mode 100755 index 0000000..5f3dc2f Binary files /dev/null and b/resource/icons/A01-1_icon_Network.png differ diff --git a/resource/icons/A01-1_icon_Phone.png b/resource/icons/A01-1_icon_Phone.png new file mode 100755 index 0000000..3974c41 Binary files /dev/null and b/resource/icons/A01-1_icon_Phone.png differ diff --git a/resource/icons/A01-1_icon_Power_saving_mode.png b/resource/icons/A01-1_icon_Power_saving_mode.png new file mode 100755 index 0000000..aae6a5f Binary files /dev/null and b/resource/icons/A01-1_icon_Power_saving_mode.png differ diff --git a/resource/icons/A01-1_icon_Reset.png b/resource/icons/A01-1_icon_Reset.png new file mode 100755 index 0000000..38feefd Binary files /dev/null and b/resource/icons/A01-1_icon_Reset.png differ diff --git a/resource/icons/A01-1_icon_Rotation_lock.png b/resource/icons/A01-1_icon_Rotation_lock.png new file mode 100755 index 0000000..b1d526f Binary files /dev/null and b/resource/icons/A01-1_icon_Rotation_lock.png differ diff --git a/resource/icons/A01-1_icon_Security.png b/resource/icons/A01-1_icon_Security.png new file mode 100755 index 0000000..0e68781 Binary files /dev/null and b/resource/icons/A01-1_icon_Security.png differ diff --git a/resource/icons/A01-1_icon_Sound.png b/resource/icons/A01-1_icon_Sound.png new file mode 100755 index 0000000..2f502ab Binary files /dev/null and b/resource/icons/A01-1_icon_Sound.png differ diff --git a/resource/icons/A01-1_icon_USB_Connection.png b/resource/icons/A01-1_icon_USB_Connection.png new file mode 100755 index 0000000..2a0fa5b Binary files /dev/null and b/resource/icons/A01-1_icon_USB_Connection.png differ diff --git a/resource/icons/A01-1_icon_USB_Theme.png b/resource/icons/A01-1_icon_USB_Theme.png new file mode 100755 index 0000000..3454a46 Binary files /dev/null and b/resource/icons/A01-1_icon_USB_Theme.png differ diff --git a/resource/icons/A01-1_icon_Wallpaper.png b/resource/icons/A01-1_icon_Wallpaper.png new file mode 100755 index 0000000..9d80377 Binary files /dev/null and b/resource/icons/A01-1_icon_Wallpaper.png differ diff --git a/resource/icons/A01-1_icon_Wi-Fi.png b/resource/icons/A01-1_icon_Wi-Fi.png new file mode 100755 index 0000000..17327d2 Binary files /dev/null and b/resource/icons/A01-1_icon_Wi-Fi.png differ diff --git a/resource/icons/A01-1_icon_Wi-Fi_direct.png b/resource/icons/A01-1_icon_Wi-Fi_direct.png new file mode 100755 index 0000000..6a9420c Binary files /dev/null and b/resource/icons/A01-1_icon_Wi-Fi_direct.png differ diff --git a/resource/icons/A01-1_icon_apps_information.png b/resource/icons/A01-1_icon_apps_information.png new file mode 100755 index 0000000..8fdcf6b Binary files /dev/null and b/resource/icons/A01-1_icon_apps_information.png differ diff --git a/resource/icons/A01-1_icon_color_Audio.png b/resource/icons/A01-1_icon_color_Audio.png new file mode 100755 index 0000000..8b75424 Binary files /dev/null and b/resource/icons/A01-1_icon_color_Audio.png differ diff --git a/resource/icons/A01-1_icon_color_applications.png b/resource/icons/A01-1_icon_color_applications.png new file mode 100755 index 0000000..62681bc Binary files /dev/null and b/resource/icons/A01-1_icon_color_applications.png differ diff --git a/resource/icons/A01-1_icon_color_available.png b/resource/icons/A01-1_icon_color_available.png new file mode 100755 index 0000000..3ca0f08 Binary files /dev/null and b/resource/icons/A01-1_icon_color_available.png differ diff --git a/resource/icons/A01-1_icon_color_downloads.png b/resource/icons/A01-1_icon_color_downloads.png new file mode 100755 index 0000000..1f893ef Binary files /dev/null and b/resource/icons/A01-1_icon_color_downloads.png differ diff --git a/resource/icons/A01-1_icon_color_miscellaneous_files.png b/resource/icons/A01-1_icon_color_miscellaneous_files.png new file mode 100755 index 0000000..14c6951 Binary files /dev/null and b/resource/icons/A01-1_icon_color_miscellaneous_files.png differ diff --git a/resource/icons/A01-1_icon_color_pictures.png b/resource/icons/A01-1_icon_color_pictures.png new file mode 100755 index 0000000..7b51238 Binary files /dev/null and b/resource/icons/A01-1_icon_color_pictures.png differ diff --git a/resource/icons/A01-1_icon_keyboard.png b/resource/icons/A01-1_icon_keyboard.png new file mode 100755 index 0000000..09752a7 Binary files /dev/null and b/resource/icons/A01-1_icon_keyboard.png differ diff --git a/resource/icons/A01-1_icon_mobileAP.png b/resource/icons/A01-1_icon_mobileAP.png new file mode 100755 index 0000000..4d8f3b4 Binary files /dev/null and b/resource/icons/A01-1_icon_mobileAP.png differ diff --git a/resource/icons/A01-1_img_screen_mode.png b/resource/icons/A01-1_img_screen_mode.png new file mode 100755 index 0000000..b488ea2 Binary files /dev/null and b/resource/icons/A01-1_img_screen_mode.png differ diff --git a/resource/icons/A01-1_input_bg.png b/resource/icons/A01-1_input_bg.png new file mode 100755 index 0000000..2e4bdf3 Binary files /dev/null and b/resource/icons/A01-1_input_bg.png differ diff --git a/resource/icons/A01-1_list_progress_sound_max.png b/resource/icons/A01-1_list_progress_sound_max.png new file mode 100644 index 0000000..7716deb Binary files /dev/null and b/resource/icons/A01-1_list_progress_sound_max.png differ diff --git a/resource/icons/A01-1_list_progress_sound_min.png b/resource/icons/A01-1_list_progress_sound_min.png new file mode 100644 index 0000000..2d51b59 Binary files /dev/null and b/resource/icons/A01-1_list_progress_sound_min.png differ diff --git a/resource/icons/A01-1_list_progress_vibration_max.png b/resource/icons/A01-1_list_progress_vibration_max.png new file mode 100644 index 0000000..da4d891 Binary files /dev/null and b/resource/icons/A01-1_list_progress_vibration_max.png differ diff --git a/resource/icons/A01-1_list_progress_vibration_min.png b/resource/icons/A01-1_list_progress_vibration_min.png new file mode 100644 index 0000000..022061c Binary files /dev/null and b/resource/icons/A01-1_list_progress_vibration_min.png differ diff --git a/resource/icons/A01-9_controlbar_icon_Next.png b/resource/icons/A01-9_controlbar_icon_Next.png new file mode 100755 index 0000000..036bf0d Binary files /dev/null and b/resource/icons/A01-9_controlbar_icon_Next.png differ diff --git a/resource/icons/A01-9_controlbar_icon_Previous.png b/resource/icons/A01-9_controlbar_icon_Previous.png new file mode 100755 index 0000000..ee40496 Binary files /dev/null and b/resource/icons/A01-9_controlbar_icon_Previous.png differ diff --git a/resource/icons/Accessibility.png b/resource/icons/Accessibility.png new file mode 100755 index 0000000..0436924 Binary files /dev/null and b/resource/icons/Accessibility.png differ diff --git a/resource/icons/AddFavourite.png b/resource/icons/AddFavourite.png new file mode 100755 index 0000000..7eb1e5f Binary files /dev/null and b/resource/icons/AddFavourite.png differ diff --git a/resource/icons/AllShare.png b/resource/icons/AllShare.png new file mode 100755 index 0000000..1d57535 Binary files /dev/null and b/resource/icons/AllShare.png differ diff --git a/resource/icons/B04_slider_btn_Vibration01.png b/resource/icons/B04_slider_btn_Vibration01.png new file mode 100755 index 0000000..8783cb6 Binary files /dev/null and b/resource/icons/B04_slider_btn_Vibration01.png differ diff --git a/resource/icons/B04_slider_btn_Vibration02.png b/resource/icons/B04_slider_btn_Vibration02.png new file mode 100755 index 0000000..f89881d Binary files /dev/null and b/resource/icons/B04_slider_btn_Vibration02.png differ diff --git a/resource/icons/B04_slider_btn_Volume01.png b/resource/icons/B04_slider_btn_Volume01.png new file mode 100755 index 0000000..2d9f384 Binary files /dev/null and b/resource/icons/B04_slider_btn_Volume01.png differ diff --git a/resource/icons/B04_slider_btn_Volume02.png b/resource/icons/B04_slider_btn_Volume02.png new file mode 100755 index 0000000..a28bfc4 Binary files /dev/null and b/resource/icons/B04_slider_btn_Volume02.png differ diff --git a/resource/icons/BT_device_mobile.png b/resource/icons/BT_device_mobile.png new file mode 100755 index 0000000..0ef6064 Binary files /dev/null and b/resource/icons/BT_device_mobile.png differ diff --git a/resource/icons/Data-32.png b/resource/icons/Data-32.png new file mode 100755 index 0000000..3f7fff1 Binary files /dev/null and b/resource/icons/Data-32.png differ diff --git a/resource/icons/DefaultIcon.png b/resource/icons/DefaultIcon.png new file mode 100755 index 0000000..d01993f Binary files /dev/null and b/resource/icons/DefaultIcon.png differ diff --git a/resource/icons/Dialing.png b/resource/icons/Dialing.png new file mode 100755 index 0000000..1154155 Binary files /dev/null and b/resource/icons/Dialing.png differ diff --git a/resource/icons/FMRadio.png b/resource/icons/FMRadio.png new file mode 100755 index 0000000..0e5a533 Binary files /dev/null and b/resource/icons/FMRadio.png differ diff --git a/resource/icons/Gesture.png b/resource/icons/Gesture.png new file mode 100755 index 0000000..833a844 Binary files /dev/null and b/resource/icons/Gesture.png differ diff --git a/resource/icons/Home.png b/resource/icons/Home.png new file mode 100755 index 0000000..3b73dc3 Binary files /dev/null and b/resource/icons/Home.png differ diff --git a/resource/icons/Image_browser.png b/resource/icons/Image_browser.png new file mode 100755 index 0000000..6b4b8f2 Binary files /dev/null and b/resource/icons/Image_browser.png differ diff --git a/resource/icons/Internet.png b/resource/icons/Internet.png new file mode 100755 index 0000000..5367f59 Binary files /dev/null and b/resource/icons/Internet.png differ diff --git a/resource/icons/Music.png b/resource/icons/Music.png new file mode 100755 index 0000000..93674e1 Binary files /dev/null and b/resource/icons/Music.png differ diff --git a/resource/icons/SevenEmail.png b/resource/icons/SevenEmail.png new file mode 100755 index 0000000..0a89263 Binary files /dev/null and b/resource/icons/SevenEmail.png differ diff --git a/resource/icons/SmartScreen.png b/resource/icons/SmartScreen.png new file mode 100755 index 0000000..1d3f8c7 Binary files /dev/null and b/resource/icons/SmartScreen.png differ diff --git a/resource/icons/Touch.png b/resource/icons/Touch.png new file mode 100755 index 0000000..9312683 Binary files /dev/null and b/resource/icons/Touch.png differ diff --git a/resource/icons/VoiceInOut.png b/resource/icons/VoiceInOut.png new file mode 100644 index 0000000..5716413 Binary files /dev/null and b/resource/icons/VoiceInOut.png differ diff --git a/resource/icons/VoiceRecorder.png b/resource/icons/VoiceRecorder.png new file mode 100755 index 0000000..4160261 Binary files /dev/null and b/resource/icons/VoiceRecorder.png differ diff --git a/resource/icons/com.samsung.traf-control.png b/resource/icons/com.samsung.traf-control.png new file mode 100755 index 0000000..d1f4f97 Binary files /dev/null and b/resource/icons/com.samsung.traf-control.png differ diff --git a/resource/icons/horz_scrollbar.png b/resource/icons/horz_scrollbar.png new file mode 100755 index 0000000..afcf5bb Binary files /dev/null and b/resource/icons/horz_scrollbar.png differ diff --git a/resource/icons/motions/browsing panning/B15_browsing_panning_01.png b/resource/icons/motions/browsing panning/B15_browsing_panning_01.png new file mode 100755 index 0000000..8d6b9c6 Binary files /dev/null and b/resource/icons/motions/browsing panning/B15_browsing_panning_01.png differ diff --git a/resource/icons/motions/browsing panning/B15_browsing_panning_02.png b/resource/icons/motions/browsing panning/B15_browsing_panning_02.png new file mode 100755 index 0000000..4c0caf6 Binary files /dev/null and b/resource/icons/motions/browsing panning/B15_browsing_panning_02.png differ diff --git a/resource/icons/motions/browsing panning/B15_browsing_panning_03.png b/resource/icons/motions/browsing panning/B15_browsing_panning_03.png new file mode 100755 index 0000000..66cf060 Binary files /dev/null and b/resource/icons/motions/browsing panning/B15_browsing_panning_03.png differ diff --git a/resource/icons/motions/browsing panning/B15_browsing_panning_04.png b/resource/icons/motions/browsing panning/B15_browsing_panning_04.png new file mode 100755 index 0000000..c90fd17 Binary files /dev/null and b/resource/icons/motions/browsing panning/B15_browsing_panning_04.png differ diff --git a/resource/icons/motions/browsing panning/B15_browsing_panning_05.png b/resource/icons/motions/browsing panning/B15_browsing_panning_05.png new file mode 100755 index 0000000..481244b Binary files /dev/null and b/resource/icons/motions/browsing panning/B15_browsing_panning_05.png differ diff --git a/resource/icons/motions/browsing panning/B15_browsing_panning_06.png b/resource/icons/motions/browsing panning/B15_browsing_panning_06.png new file mode 100755 index 0000000..b1d6587 Binary files /dev/null and b/resource/icons/motions/browsing panning/B15_browsing_panning_06.png differ diff --git a/resource/icons/motions/browsing panning/B15_browsing_panning_07.png b/resource/icons/motions/browsing panning/B15_browsing_panning_07.png new file mode 100755 index 0000000..4fad9f3 Binary files /dev/null and b/resource/icons/motions/browsing panning/B15_browsing_panning_07.png differ diff --git a/resource/icons/motions/direct call/B15_direct_call_01.png b/resource/icons/motions/direct call/B15_direct_call_01.png new file mode 100755 index 0000000..bcaffa7 Binary files /dev/null and b/resource/icons/motions/direct call/B15_direct_call_01.png differ diff --git a/resource/icons/motions/direct call/B15_direct_call_02.png b/resource/icons/motions/direct call/B15_direct_call_02.png new file mode 100755 index 0000000..dda1041 Binary files /dev/null and b/resource/icons/motions/direct call/B15_direct_call_02.png differ diff --git a/resource/icons/motions/direct call/B15_direct_call_03.png b/resource/icons/motions/direct call/B15_direct_call_03.png new file mode 100755 index 0000000..560da8c Binary files /dev/null and b/resource/icons/motions/direct call/B15_direct_call_03.png differ diff --git a/resource/icons/motions/double tap/B15_double_tap_01.png b/resource/icons/motions/double tap/B15_double_tap_01.png new file mode 100755 index 0000000..29e094a Binary files /dev/null and b/resource/icons/motions/double tap/B15_double_tap_01.png differ diff --git a/resource/icons/motions/double tap/B15_double_tap_02.png b/resource/icons/motions/double tap/B15_double_tap_02.png new file mode 100755 index 0000000..289e908 Binary files /dev/null and b/resource/icons/motions/double tap/B15_double_tap_02.png differ diff --git a/resource/icons/motions/panning/B15_panning_01.png b/resource/icons/motions/panning/B15_panning_01.png new file mode 100755 index 0000000..598c219 Binary files /dev/null and b/resource/icons/motions/panning/B15_panning_01.png differ diff --git a/resource/icons/motions/panning/B15_panning_02.png b/resource/icons/motions/panning/B15_panning_02.png new file mode 100755 index 0000000..8992a53 Binary files /dev/null and b/resource/icons/motions/panning/B15_panning_02.png differ diff --git a/resource/icons/motions/panning/B15_panning_03.png b/resource/icons/motions/panning/B15_panning_03.png new file mode 100755 index 0000000..04efb07 Binary files /dev/null and b/resource/icons/motions/panning/B15_panning_03.png differ diff --git a/resource/icons/motions/panning/B15_panning_04.png b/resource/icons/motions/panning/B15_panning_04.png new file mode 100755 index 0000000..c4356b5 Binary files /dev/null and b/resource/icons/motions/panning/B15_panning_04.png differ diff --git a/resource/icons/motions/panning/panning_center.png b/resource/icons/motions/panning/panning_center.png new file mode 100755 index 0000000..208929a Binary files /dev/null and b/resource/icons/motions/panning/panning_center.png differ diff --git a/resource/icons/motions/shake/B15_shake_01.png b/resource/icons/motions/shake/B15_shake_01.png new file mode 100755 index 0000000..1b7cb2d Binary files /dev/null and b/resource/icons/motions/shake/B15_shake_01.png differ diff --git a/resource/icons/motions/shake/B15_shake_02.png b/resource/icons/motions/shake/B15_shake_02.png new file mode 100755 index 0000000..3a14896 Binary files /dev/null and b/resource/icons/motions/shake/B15_shake_02.png differ diff --git a/resource/icons/motions/shake/B15_shake_03.png b/resource/icons/motions/shake/B15_shake_03.png new file mode 100755 index 0000000..45fa2b4 Binary files /dev/null and b/resource/icons/motions/shake/B15_shake_03.png differ diff --git a/resource/icons/motions/shake/B15_shake_04.png b/resource/icons/motions/shake/B15_shake_04.png new file mode 100755 index 0000000..e39278f Binary files /dev/null and b/resource/icons/motions/shake/B15_shake_04.png differ diff --git a/resource/icons/motions/smart alert/B15_smart_alert_01.png b/resource/icons/motions/smart alert/B15_smart_alert_01.png new file mode 100755 index 0000000..aa95e23 Binary files /dev/null and b/resource/icons/motions/smart alert/B15_smart_alert_01.png differ diff --git a/resource/icons/motions/smart alert/B15_smart_alert_02.png b/resource/icons/motions/smart alert/B15_smart_alert_02.png new file mode 100755 index 0000000..2226176 Binary files /dev/null and b/resource/icons/motions/smart alert/B15_smart_alert_02.png differ diff --git a/resource/icons/motions/smart alert/B15_smart_alert_03.png b/resource/icons/motions/smart alert/B15_smart_alert_03.png new file mode 100755 index 0000000..26cbf0d Binary files /dev/null and b/resource/icons/motions/smart alert/B15_smart_alert_03.png differ diff --git a/resource/icons/motions/tilt to zoom/B15_tilt_to_zoom_01.png b/resource/icons/motions/tilt to zoom/B15_tilt_to_zoom_01.png new file mode 100755 index 0000000..bce759a Binary files /dev/null and b/resource/icons/motions/tilt to zoom/B15_tilt_to_zoom_01.png differ diff --git a/resource/icons/motions/tilt to zoom/B15_tilt_to_zoom_02.png b/resource/icons/motions/tilt to zoom/B15_tilt_to_zoom_02.png new file mode 100755 index 0000000..fb0f5ca Binary files /dev/null and b/resource/icons/motions/tilt to zoom/B15_tilt_to_zoom_02.png differ diff --git a/resource/icons/motions/tilt to zoom/B15_tilt_to_zoom_03.png b/resource/icons/motions/tilt to zoom/B15_tilt_to_zoom_03.png new file mode 100755 index 0000000..f863ae6 Binary files /dev/null and b/resource/icons/motions/tilt to zoom/B15_tilt_to_zoom_03.png differ diff --git a/resource/icons/motions/turn over/B15_turn_over_01.png b/resource/icons/motions/turn over/B15_turn_over_01.png new file mode 100755 index 0000000..1fcacc5 Binary files /dev/null and b/resource/icons/motions/turn over/B15_turn_over_01.png differ diff --git a/resource/icons/motions/turn over/B15_turn_over_02.png b/resource/icons/motions/turn over/B15_turn_over_02.png new file mode 100755 index 0000000..a556d41 Binary files /dev/null and b/resource/icons/motions/turn over/B15_turn_over_02.png differ diff --git a/resource/icons/motions/turn over/B15_turn_over_03.png b/resource/icons/motions/turn over/B15_turn_over_03.png new file mode 100755 index 0000000..ff61269 Binary files /dev/null and b/resource/icons/motions/turn over/B15_turn_over_03.png differ diff --git a/resource/icons/personal_vibration/B16-10_Vibration_bar.png b/resource/icons/personal_vibration/B16-10_Vibration_bar.png new file mode 100755 index 0000000..a93e342 Binary files /dev/null and b/resource/icons/personal_vibration/B16-10_Vibration_bar.png differ diff --git a/resource/icons/personal_vibration/B16-10_Vibration_bg.png b/resource/icons/personal_vibration/B16-10_Vibration_bg.png new file mode 100755 index 0000000..4c6147d Binary files /dev/null and b/resource/icons/personal_vibration/B16-10_Vibration_bg.png differ diff --git a/resource/icons/personal_vibration/B16-10_Vibration_btn.png b/resource/icons/personal_vibration/B16-10_Vibration_btn.png new file mode 100755 index 0000000..237a1b1 Binary files /dev/null and b/resource/icons/personal_vibration/B16-10_Vibration_btn.png differ diff --git a/resource/icons/personal_vibration/B16-10_Vibration_btn_press.png b/resource/icons/personal_vibration/B16-10_Vibration_btn_press.png new file mode 100755 index 0000000..a1c081f Binary files /dev/null and b/resource/icons/personal_vibration/B16-10_Vibration_btn_press.png differ diff --git a/resource/icons/personal_vibration/B16-10_Vibration_icon_play.png b/resource/icons/personal_vibration/B16-10_Vibration_icon_play.png new file mode 100755 index 0000000..2906053 Binary files /dev/null and b/resource/icons/personal_vibration/B16-10_Vibration_icon_play.png differ diff --git a/resource/icons/personal_vibration/B16-10_Vibration_icon_play_press.png b/resource/icons/personal_vibration/B16-10_Vibration_icon_play_press.png new file mode 100755 index 0000000..8eb232b Binary files /dev/null and b/resource/icons/personal_vibration/B16-10_Vibration_icon_play_press.png differ diff --git a/resource/icons/personal_vibration/B16-10_Vibration_icon_rec.png b/resource/icons/personal_vibration/B16-10_Vibration_icon_rec.png new file mode 100755 index 0000000..881f91d Binary files /dev/null and b/resource/icons/personal_vibration/B16-10_Vibration_icon_rec.png differ diff --git a/resource/icons/personal_vibration/B16-10_Vibration_icon_stop.png b/resource/icons/personal_vibration/B16-10_Vibration_icon_stop.png new file mode 100755 index 0000000..872cc0d Binary files /dev/null and b/resource/icons/personal_vibration/B16-10_Vibration_icon_stop.png differ diff --git a/resource/icons/personal_vibration/B16-10_Vibration_icon_stop_press.png b/resource/icons/personal_vibration/B16-10_Vibration_icon_stop_press.png new file mode 100755 index 0000000..03b0bf7 Binary files /dev/null and b/resource/icons/personal_vibration/B16-10_Vibration_icon_stop_press.png differ diff --git a/resource/icons/personal_vibration/B16-10_Vibration_recording_touch.png b/resource/icons/personal_vibration/B16-10_Vibration_recording_touch.png new file mode 100755 index 0000000..487787c Binary files /dev/null and b/resource/icons/personal_vibration/B16-10_Vibration_recording_touch.png differ diff --git a/resource/icons/phoneCalling.png b/resource/icons/phoneCalling.png new file mode 100755 index 0000000..df195fa Binary files /dev/null and b/resource/icons/phoneCalling.png differ diff --git a/resource/icons/robert.png b/resource/icons/robert.png new file mode 100755 index 0000000..a91c21d Binary files /dev/null and b/resource/icons/robert.png differ diff --git a/resource/icons/robert_lift.png b/resource/icons/robert_lift.png new file mode 100755 index 0000000..b29fb6f Binary files /dev/null and b/resource/icons/robert_lift.png differ diff --git a/resource/langlist.xml b/resource/langlist.xml new file mode 100755 index 0000000..fc6fd1d --- /dev/null +++ b/resource/langlist.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resource/media-data-sdk/settings/Alerts/General notification_sdk.wav b/resource/media-data-sdk/settings/Alerts/General notification_sdk.wav new file mode 100644 index 0000000..6b0cca4 Binary files /dev/null and b/resource/media-data-sdk/settings/Alerts/General notification_sdk.wav differ diff --git a/resource/media-data-sdk/settings/Ringtones/ringtone_sdk.mp3 b/resource/media-data-sdk/settings/Ringtones/ringtone_sdk.mp3 new file mode 100755 index 0000000..f159e35 Binary files /dev/null and b/resource/media-data-sdk/settings/Ringtones/ringtone_sdk.mp3 differ diff --git a/resource/media-data-sdk/settings/Wallpapers/Default.jpg b/resource/media-data-sdk/settings/Wallpapers/Default.jpg new file mode 100755 index 0000000..10f4b14 Binary files /dev/null and b/resource/media-data-sdk/settings/Wallpapers/Default.jpg differ diff --git a/resource/media-data-sdk/settings/Wallpapers/Home_default.jpg b/resource/media-data-sdk/settings/Wallpapers/Home_default.jpg new file mode 100755 index 0000000..3875a3d Binary files /dev/null and b/resource/media-data-sdk/settings/Wallpapers/Home_default.jpg differ diff --git a/resource/setting-genlist-theme.edc b/resource/setting-genlist-theme.edc new file mode 100755 index 0000000..002eecd --- /dev/null +++ b/resource/setting-genlist-theme.edc @@ -0,0 +1,234 @@ + +#define BEAT_GENLIST_PART_BASE( param_item_height ) \ + part { name: "base"; \ + type: RECT; \ + repeat_events: 1; \ + scale: 1; \ + description { state: "default" 0.0; \ + min: 0 param_item_height; \ + color: 0 0 0 0; \ + } \ + } + +#define BEAT_GENLIST_PART_BG_IMAGE \ + part { name: "bg_image"; \ + clip_to: "disclip"; \ + mouse_events: 0; \ + description { state: "default" 0.0; \ + visible: 0; \ + } \ + description { state: "selected" 0.0; \ + inherit: "default" 0.0; \ + visible: 1; \ + } \ + } + +#define BEAT_GENLIST_PART_BOTTOM_LINE \ + part { name: "bottom_line"; \ + type: RECT; \ + clip_to: "disclip"; \ + mouse_events: 0; \ + description { state: "default" 0.0; \ + min: 0 1; \ + fixed: 0 1; \ + visible: 1; \ + color: 212 212 212 255; \ + rel1 { \ + relative: 0.0 1.0; \ + offset: 0 -1; \ + } \ + } \ + } + +#define BEAT_GENLIST_PART_PADDING_TOP( param_padding_size ) \ + part { name: "elm.padding.top"; \ + type: RECT; \ + scale: 1; \ + description { \ + state: "default" 0.0; \ + min: 0 param_padding_size; \ + fixed: 0 1; \ + visible: 0; \ + rel2.relative: 1.0 0.0; \ + align: 0.0 0.0; \ + } \ + } + +#define BEAT_GENLIST_PART_PADDING_BOTTOM( param_padding_size ) \ + part { name: "elm.padding.bottom"; \ + type: RECT; \ + scale: 1; \ + description { \ + state: "default" 0.0; \ + min: 0 param_padding_size; \ + fixed: 0 1; \ + visible: 0; \ + rel1.relative: 0.0 1.0; \ + align: 0.0 1.0; \ + } \ + } + +#define BEAT_GENLIST_PART_PADDING_LEFT( param_padding_size ) \ + part { name: "elm.padding.left"; \ + type: RECT; \ + scale: 1; \ + description { \ + state: "default" 0.0; \ + min: param_padding_size 0; \ + fixed: 1 0; \ + visible: 0; \ + rel2.relative: 0.0 1.0; \ + align: 0.0 0.0; \ + } \ + } + +#define BEAT_GENLIST_PART_PADDING_RIGHT( param_padding_size ) \ + part { name: "elm.padding.right"; \ + type: RECT; \ + scale: 1; \ + description { state: "default" 0.0; \ + min: param_padding_size 0; \ + fixed: 1 0; \ + visible: 0; \ + rel1.relative: 1.0 0.0; \ + align: 1.0 0.0; \ + } \ + } + +#define BEAT_GENLIST_PART_DISCLIP \ + part { name: "disclip"; \ + type: RECT; \ + description { state: "default" 0.0; \ + rel1.to: "base"; \ + rel2.to: "base"; \ + } \ + description { state: "disabled" 0.0; \ + inherit: "default" 0.0; \ + color: 255 255 255 64; \ + } \ + } + +collections { + styles { + style { name: "textblock_style_variable_height"; + base: "font=SLP:style=Roman font_size=35 align=left color=#FFFFFF wrap=word text_class=list_item ellipsis=1.0"; + tag: "br" "\n"; + tag: "hilight" "+ font=SLP:style=Bold"; + tag: "b" "+ font=SLP:style=Bold"; + tag: "tab" "\t"; + } + } + + group { name: "elm/genlist/item/setting/variable_height/default"; + alias: "elm/genlist/item_odd/setting/variable_height/default"; + + data.item: "stacking" "above"; + data.item: "selectraise" "on"; + data.item: "texts" "elm.text"; + data.item: "contents" "elm.icon elm.label"; + data.item: "treesize" "20"; + + parts { + BEAT_GENLIST_PART_BASE( 0 ) + BEAT_GENLIST_PART_BG_IMAGE + BEAT_GENLIST_PART_PADDING_LEFT( 15 ) + BEAT_GENLIST_PART_PADDING_RIGHT( 15 ) + BEAT_GENLIST_PART_PADDING_TOP( 10 ) + BEAT_GENLIST_PART_PADDING_BOTTOM( 10 ) + + part { name: "elm.text"; + clip_to: "disclip"; + type: TEXTBLOCK; + mouse_events: 0; + scale: 1; + description { state: "default" 0.0; + align: 0.0 0.5; + min: 0 0; + fixed: 1 1; + rel1 { + relative: 1 1.0; + to_x: "elm.padding.left"; + to_y: "elm.padding.top"; + } + rel2 { + relative: 1 0.0; + to_x: "elm.padding.left"; + to_y: "elm.padding.bottom"; + } + text { + style: textblock_style_variable_height; + min: 1 1; + align: 0 0.5; + } + } + } + part { name: "elm.icon"; + clip_to: "disclip"; + type: SWALLOW; + mouse_events: 1; + scale: 1; + description { state: "default" 0.0; + align: 0.5 0.5; + rel1 { + relative: 1 1; + to_x: "elm.padding.left"; + to_y: "elm.padding.top"; + } + rel2 { + relative: 0 0; + to_x: "elm.padding.right"; + to_y: "elm.padding.bottom"; + } + } + } + part { name: "elm.label"; + clip_to: "disclip"; + type: SWALLOW; + mouse_events: 1; + scale: 1; + description { state: "default" 0.0; + align: 0.0 0.5; + rel1 { + relative: 1 1; + to_x: "elm.padding.left"; + to_y: "elm.padding.top"; + } + rel2 { + relative: 1 0; + to_x: "elm.padding.left"; + to_y: "elm.padding.bottom"; + } + } + } + BEAT_GENLIST_PART_DISCLIP + } + programs { + program { name: "go_active"; + signal: "elm,state,selected"; + source: "elm"; + action: STATE_SET "selected" 0.0; + target: "bg_image"; + } + program { name: "go_passive"; + signal: "elm,state,unselected"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "bg_image"; + transition: LINEAR 0.1; + } + program { name: "go_disabled"; + signal: "elm,state,disabled"; + source: "elm"; + action: STATE_SET "disabled" 0.0; + target: "disclip"; + } + program { name: "go_enabled"; + signal: "elm,state,enabled"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "disclip"; + } + } + } + +} diff --git a/resource/setting-theme.edc b/resource/setting-theme.edc new file mode 100755 index 0000000..7d98859 --- /dev/null +++ b/resource/setting-theme.edc @@ -0,0 +1,945 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 "../setting-common/include/setting-common-data-edj-define.h" + +images +{ +} + +collections +{ + styles + { + style + { + name: "textblock_style"; + base: "font=HelveN_Asia font_size=30 align=left color=#ffffff wrap=char"; + tag: "br" "\n"; + tag: "hilight" "+ font=HelveN_Asia:style=Bold"; + tag: "b" "+ font=HelveN_Asia:style=Bold"; + tag: "whitecolor" "+ color=#ffffff"; + tag: "tab" "\t"; + } + style + { + name: "description_style"; + base: "font=SLP:style=Roman font_size=24 align=left color=#ff0000 wrap=mixed"; + tag: "br" "\n"; + tag: "hilight" "+ font=SLP:style=Regular"; + tag: "b" "+ font=SLP:style=Regular"; + tag: "whitecolor" "+ color=#ffffff"; + tag: "tab" "\t"; + } + } + group { + name: "search_layout"; + + parts { + /* background */ + part { + name: "bg"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + rel1 { relative: 0.0 0.0; offset: 0 0;} + rel2 { relative: 1.0 1.0; offset: 0 0;} + color: 0 0 0 0; + } + } + part { + name: "bg_swallow"; + type: SWALLOW; + mouse_events: 0; + scale: 1; + description { + state: "default" 0.0; + rel1 { relative: 0.0 0.0; offset: 0 0; to: "bg";} + rel2 { relative: 1.0 1.0; offset: 0 0; to: "bg";} + } + } + + /******Begin adding middle icon and its text*******/ + part { name: "middle_icon_text";/*middle allign*/ + type: TEXT; + scale: 1; + description { state: "default" 0.0; + align: 0.5 1.0; + rel1 { relative: 0.0 0.54; offset: 0 0; to: "bg"; } + rel2 { relative: 1.0 0.6; offset: 0 0; to: "bg"; } + + color: 0 255 0 255; + text + { + font: "SLP:style=Regular"; + text_class:"slp_regular"; + size: 32; + min: 0 0; + align: 0.5 0.5; + } + } + } + + part { + name: "middle_icon"; + type: SWALLOW; + mouse_events: 1; + scale: 1; + description { + state: "default" 0.0; + //min: 130 116; + fixed: 1 1; + align: 0.5 0.5; + rel1 { relative: 0.33 0.6; offset: 0 0; to: "bg"; } + rel2 { relative: 0.66 0.8; offset: 0 0; to: "bg"; } + } + } + + /******End adding middle icon and its text*******/ + + /* search area swallow */ + part { + name: "search_bar"; + type: SWALLOW; + mouse_events: 1; + scale: 1; + description { + state: "default" 0.0; + min: 0 ITEM_Y_DEN; + fixed: 1 1; + align: 0.0 0.0; + rel1 { relative: 0.0 0.0; offset: 0 0; to: "bg"; } + rel2 { relative: 1.0 0.0; offset: 0 0; to: "bg"; } + } + } + + /* genlist swallow */ + part { + name: "search_list"; + type: SWALLOW; + mouse_events: 1; + scale: 1; + description { + state: "default" 0.0; + align: 0.0 0.0; + //rel1 { relative: 0.0 1.0; offset: 0 0; to: "search_bar"; } + rel1 { relative: 0.0 1.0; offset: 0 1; to: "search_bar"; } + rel2 { relative: 1.0 1.0; offset: 0 0; to: "bg"; } + } + } + + part { + name: "search_list2"; + type: SWALLOW; + mouse_events: 1; + scale: 1; + description { + state: "default" 0.0; + align: 0.0 0.0; + rel1 { relative: 0.0 0.0; offset: 0 0; to: "bg"; } + rel2 { relative: 1.0 1.0; offset: 0 0; to: "bg"; } + + } + } + + } // end of parts + } + + group + { + name:"thumbnail_icon2"; + min: 110 50; + max: 121 55; + parts + { + part + { + name:"checkbox"; + type:SWALLOW; + scale: 1; + description + { + state: "default" 0.0; + rel1 { relative: 0.0 0.0; offset: 0 0;} + rel2 { relative: 0.45 1.0; offset: 0 0;} + } + } + part + { + name: "space"; + type: RECT; + scale: 1; + description + { state: "default" 0.0; + min: 45 0; + fixed: 1 0; + rel1 + { + relative: 1.0 0.0; + to_x: "checkbox"; + } + rel2.to_x: "checkbox"; + color: 0 0 0 0; + align: 0.0 0.0; + } + + } + part + { + name:"thumbnail"; + type:SWALLOW; + scale: 1; + description + { + state: "default" 0.0; + rel1 { relative: 0.45 0.0; offset: 0 0;} + rel2 { relative: 1.0 1.0; offset: 0 0;} + } + } + } + } + + group { + name: "wallpaper_layout"; + #define FONT_SIZE 24 + parts { + /* background */ + part { + name: "bg"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + rel1 { relative: 0.0 0.0; offset: 0 0;} + rel2 { relative: 1.0 1.0; offset: 0 0;} + color: 0 0 0 0; + } + } + part { + name: "bg_swallow"; + type: SWALLOW; + mouse_events: 0; + scale: 1; + description { + state: "default" 0.0; + align: 0.0 0.0; + rel1 { relative: 0.0 0.0; offset: 0 0;} + rel2 { relative: 1.0 1.0; offset: 0 0;} + //color: 0 0 0 0; + } + } + + part { + name: "left_swallow_bg"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + rel1 { relative: 16/720 30/WALLPAPER_LAYOUT_H; offset: 0 0; to: "bg"; } + rel2 { relative: 352/720 630/WALLPAPER_LAYOUT_H; offset: 0 0; to: "bg"; } + color: 0 0 0 0; + } + /* + description { + state: "pressed" 0.0; + inherit: "default" 0.0; + color: 255 102 28 255; + }*/ + } + + part { + name: "left_swallow"; + type: SWALLOW; + mouse_events: 1; + scale: 1; + description { + state: "default" 0.0; + align: 0.5 0.5; + rel1 { relative: 0.0 0.0; offset: 0 0; to: "left_swallow_bg"; } + rel2 { relative: 1.0 1.0; offset: 0 0; to: "left_swallow_bg"; } + + } + } + part { name: "left_text"; + type: TEXT; + scale: 1; + description { state: "default" 0.0; + align: 0.5 0.5; + rel1 { relative: 16/720 652/WALLPAPER_LAYOUT_H; offset: 0 0; to: "bg"; } + rel2 { relative: 352/720 690/WALLPAPER_LAYOUT_H; offset: 0 0; to: "bg"; } + + color: 0 0 0 255; + text + { + font: "SLP:style=Regular"; + text_class:"slp_regular"; + size: FONT_SIZE; + min: 0 0; + align: 0.5 0.5; + } + } + /*Support other theme display*/ + description { + state: "white" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255;//white color + } + + } + + part { + name: "right_swallow_bg"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + rel1 { relative: 368/720 30/WALLPAPER_LAYOUT_H; offset: 0 0; to: "bg"; } + rel2 { relative: 704/720 630/WALLPAPER_LAYOUT_H; offset: 0 0; to: "bg"; } + color: 0 0 0 0; + } + /*description { + state: "pressed" 0.0; + inherit: "default" 0.0; + color: 255 102 28 255; + }*/ + } + + part { + name: "right_swallow"; + type: SWALLOW; + mouse_events: 1; + scale: 1; + description { + state: "default" 0.0; + align: 0.5 0.5; + rel1 { relative: 0.0 0.0; offset: 0 0; to: "right_swallow_bg"; } + rel2 { relative: 1.0 1.0; offset: 0 0; to: "right_swallow_bg"; } + } + } + part { name: "right_text"; + type: TEXT; + scale: 1; + description { state: "default" 0.0; + align: 0.5 0.5; + rel1 { relative: 368/720 652/WALLPAPER_LAYOUT_H; offset: 0 0; to: "bg"; } + rel2 { relative: 704/720 690/WALLPAPER_LAYOUT_H; offset: 0 0; to: "bg"; } + + color: 0 0 0 255; + text + { + font: "SLP:style=Regular"; + text_class:"slp_regular"; + size: FONT_SIZE; + min: 0 0; + align: 0.5 0.5; + } + } + description { + state: "white" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255;//white color + } + } + + part { + name: "btn"; + type: SWALLOW; + mouse_events: 1; + scale: 1; + description { + state: "default" 0.0; + align: 0.0 0.0; + rel1 { relative: 16/720 712/WALLPAPER_LAYOUT_H; offset: 0 0; to: "bg"; } + rel2 { relative: 704/720 786/WALLPAPER_LAYOUT_H; offset: 0 0; to: "bg"; } + } + } + + part { + name: "lock_btn"; + type: SWALLOW; + mouse_events: 1; + scale: 1; + description { + state: "default" 0.0; + align: 0.0 0.0; + rel1 { relative: 16/720 818/WALLPAPER_LAYOUT_H; offset: 0 0; to: "bg"; } + rel2 { relative: 704/720 892/WALLPAPER_LAYOUT_H; offset: 0 0; to: "bg"; } + } + } + + } // end of parts + programs { + program { name: "left_mouse_press,"; + signal: "mouse,down,1"; + source: "left_swallow_bg"; + //action: STATE_SET "default" 0.0; + script { + set_state(PART:"right_swallow_bg", "default", 0.0); + set_state(PART:"left_swallow_bg", "pressed", 0.0); + } + } + + program { name: "right_mouse_press,"; + signal: "mouse,down,1"; + source: "right_swallow_bg"; + //action: STATE_SET "default" 0.0; + script { + set_state(PART:"right_swallow_bg", "pressed", 0.0); + set_state(PART:"left_swallow_bg", "default", 0.0); + } + } + + /*Support other theme display*/ + program {//black theme need white text + name: "Change_non_white_theme"; + signal: "change,non-white,theme"; + source: "elm"; + action: STATE_SET "white" 0.0; + target: "left_text"; + target: "right_text"; + } + + + } + + } + + group + { + name: "selinfo_bottom"; + + parts { + part { + name: "background"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + rel1 { relative: 0.0 0.0; } + rel2 { relative: 1.0 1.0; } + color: 0 0 0 0; + } + } + + part { + name: "elm.swallow.contents"; + type: SWALLOW; + scale: 1; + description { + state: "default" 0.0; + rel1 { relative: 0.0 0.0; to: "background"; } + rel2 { relative: 1.0 0.0; to_x: "background"; to_y:"bottom_padding"; } + } + } + + part { + name: "bottom_padding"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + min: 0 0; + fixed: 0 1; + align: 0.5 1.0; + rel1 { relative: 0.0 1.0; to: "background"; } + rel2 { relative: 1.0 1.0; to: "background"; } + color: 0 0 0 0; + } + description { + state: "padding" 0.0; + inherit: "default" 0.0; + min: 0 5; // 66+4+12 + } + } + } + + programs { + program { + name: "bottom_padding_content_area"; + signal: "elm,layout,content,bottom_padding"; + source: "layout"; + action: STATE_SET "padding" 0.0; + target: "bottom_padding"; + } + program { + name: "default_content_area"; + signal: "elm,layout,content,default"; + source: "layout"; + action: STATE_SET "default" 0.0; + target: "bottom_padding"; + } + } + } + + group { name: "popup_checkview"; + parts{ + part { name: "pad_t"; + scale : 1; + mouse_events: 0; + repeat_events: 1; + description { state: "default" 0.0; + align: 0.5 0.0; + min: 0 22; + fixed: 0 1; + rel1 { + relative: 1.0 0.0;to_x: "pad_l"; + } + rel2 { + relative: 0.0 0.0;to_x: "pad_r"; + } + } + } + part { name: "pad_l"; + scale: 1; + description { state: "default" 0.0; + min : 16 0; + fixed: 1 0; + rel1 { + relative: 0.0 0.0; + } + rel2 { + relative: 0.0 1.0; + } + align: 0.0 0.0; + } + } + part { name: "pad_r"; + scale: 1; + description { state: "default" 0.0; + min : 16 0; + fixed: 1 0; + rel1 { + relative: 1.0 0.0; + } + rel2 { + relative: 1.0 1.0; + } + align: 1.0 0.0; + } + } + part{ name:"elm.swallow.content"; + type: SWALLOW; + scale : 1; + description { state: "default" 0.0; + min: 380 0; + align: 0.5 0.5; + fixed: 1 0; + rel1 { + relative: 0.5 1.0; + to: "pad_t"; + } + rel2 { + relative: 0.5 0.0; + to: "pad_b"; + } + } + } + part { name: "pad_b"; + scale : 1; + mouse_events: 0; + description { state: "default" 0.0; + align: 0.5 1.0; + min: 0 66; + fixed: 0 1; + rel1 { + relative: 1.0 1.0;to_x: "pad_l"; + } + rel2 { + relative: 0.0 1.0;to_x: "pad_r"; + } + } + } + part { name: "elm.swallow.end"; + type: SWALLOW; + scale : 1; + mouse_events: 1; + repeat_events: 1; + description { state: "default" 0.0; + align: 0.0 0.5; + rel1 { + relative: 0.18 0.0; + to: "pad_b"; + } + rel2 { + relative: 1.0 1.0; + to: "pad_b"; + } + } + } + part { name: "elm.text"; + type: TEXT; + scale : 1; + description { state: "default" 0.0; + text { + font: "SLP:style=Medium"; + size: 24; + min: 0 0; + align: 0.5 0.5; + } + color: 0 0 0 255; + align: 0.0 0.5; + rel1 { + relative: 0.0 0.0; + to: "pad_b"; + } + rel2 { + relative: 1.0 1.0; + to: "pad_b"; + } + } + } + } + } + + group { name: "popup_checkview_image"; + parts { + part { name: "pad_t"; + scale: 1; + mouse_events: 0; + repeat_events: 1; + description { state: "default" 0.0; + align: 0.5 0.0; + min: 0 2; + fixed: 0 1; + rel1 { + relative: 1.0 0.0;to_x: "pad_l"; + } + rel2 { + relative: 0.0 0.0;to_x: "pad_r"; + } + } + } + part { name: "pad_l"; + scale: 1; + description { state: "default" 0.0; + min : 2 0; + fixed: 1 0; + rel1 { + relative: 0.0 0.0; + } + rel2 { + relative: 0.0 1.0; + } + align: 0.0 0.0; + } + } + part { name: "pad_r"; + scale: 1; + description { state: "default" 0.0; + min : 2 0; + fixed: 1 0; + rel1 { + relative: 1.0 0.0; + } + rel2 { + relative: 1.0 1.0; + } + align: 1.0 0.0; + } + } + part { name:"elm.swallow.content"; + type: SWALLOW; + scale : 1; + mouse_events: 1; + repeat_events: 1; + description { state: "default" 0.0; + min: 0 350; + align: 0.5 1.0; + fixed: 1 0; + rel1 { + relative: 0.0 1.0; + to: "pad_t"; + } + rel2 { + relative: 1.0 0.0; + to: "pad_b"; + } + } + } + part { name: "pad_b"; + scale : 1; + mouse_events: 0; + type: RECT; + description { state: "default" 0.0; + align: 0.5 1.0; + min: 0 40; + visible: 0; + fixed: 0 1; + rel1 { + relative: 1.0 1.0;to_x: "pad_l"; + } + rel2 { + relative: 0.0 1.0;to_x: "pad_r"; + } + } + } + part { name: "elm.swallow.end"; + type: SWALLOW; + scale : 1; + mouse_events: 1; + repeat_events: 1; + description { state: "default" 0.0; + align: 0.0 0.5; + min: 42 42; + max: 42 42; + fixed: 1 1; + rel1 { + relative: 0.0 0.0; + to: "pad_b"; + } + rel2 { + relative: 0.0 1.0; + to: "pad_b"; + } + } + } + part { name: "elm.text"; + type: TEXT; + scale : 1; + description { state: "default" 0.0; + text { + font: "SLP:style=Medium"; + size: 38; + min: 0 0; + align: 0.0 0.5; + } + color: 0 0 0 255; + align: 0.0 0.5; + rel1 { + relative: 1.0 0.0; + to_x:"elm.swallow.end"; to_y: "pad_b"; + } + rel2 { + relative: 1.0 1.0; + to: "pad_b"; + } + } + } + } + } + + group { + name: "screen_mode"; + + parts { + part { + name: "bg"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + rel1 { relative: 0.0 0.0; offset: 0 0;} + rel2 { relative: 1.0 1.0; offset: 0 0;} + color: 0 0 0 0; + } + } + part { + name: "elm.padding.top"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + min: 0 16; + fixed: 0 1; + visible: 0; + rel2.relative: 1.0 0.0; + align: 0.0 0.0; + } + } + part { + name: "elm.padding.bottom"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + min: 0 16; + fixed: 0 1; + visible: 0; + rel1.relative: 0.0 1.0; + align: 0.0 1.0; + } + } + part { + name: "elm.padding.left"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + min: 16 0; + fixed: 1 0; + visible: 0; + rel2.relative: 0.0 1.0; + align: 0.0 0.0; + } + } + part { + name: "elm.padding.right"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + min: 16 0; + fixed: 1 0; + visible: 0; + rel1.relative: 1.0 0.0; + align: 1.0 0.0; + } + } + part { + name: "content"; + type: SWALLOW; + mouse_events: 1; + scale: 1; + description { + state: "default" 0.0; + align: 0.5 0.5; + rel1 { + relative: 1 1; + to_x: "elm.padding.left"; + to_y: "elm.padding.top"; + } + rel2 { + relative: 0 0; + to_x: "elm.padding.right"; + to_y: "elm.padding.bottom"; + } + } + } + } + } + group { + name: "custom_popup"; + parts{ + part { + name: "left_padding"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + fixed: 1 0; + visible: 0; + align: 0.0 0.5; + min: 32 0; + rel1 { + relative: 0.0 0.0; + } + rel2 { + relative: 0.0 1.0; + } + } + } + part{ + name:"content"; + type: SWALLOW; + scale : 1; + description { + state: "default" 0.0; + min: 1 1; + align: 0.0 0.5; + fixed: 1 0; + rel1 { + relative: 1.0 0.0; + to_x: "left_padding"; + } + rel2 { + relative: 0.0 1.0; + to_x: "right_padding"; + } + } + } + part{ + name:"content2"; + type: SWALLOW; + scale : 1; + description { + state: "default" 0.0; + min: 1 1; + align: 0.0 0.0; + fixed: 1 0; + rel1 { + relative: 1.0 1.0; + to_x: "left_padding"; + to_y: "content"; + } + rel2 { + relative: 0.0 1.0; + to_x: "right_padding"; + to_y: "content"; + } + } + } + part { + name: "right_padding"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + fixed: 1 0; + visible: 0; + align: 1.0 0.5; + min: 32 0; + rel1 { + relative: 1.0 0.0; + } + rel2 { + relative: 1.0 1.0; + } + } + } + } + } + + group { + name: "silder_text_layout"; + parts { + part { + name: "padding1"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + min: 0 1; + fixed: 0 1; + align: 0.5 0.0; + rel1 { relative: 0 0; } + rel2 { relative: 1 0; } + color: 0 0 0 0; + } + } + part { + name: "text1"; + type: TEXT; + scale: 1; + description { + state: "default" 0.0; + min: 0 60; + fixed: 0 1; + align: 0.5 0.0; + rel1 { relative: 0 1; to: padding1; } + rel2 { relative: 1 1; to: padding1; } + color: 0 0 0 255; + text { + font: "SLP:style=Roman"; + size: 36; + min: 1 0; + align: 0.0 0.5; + } + } + } + } + } +} diff --git a/resource/setting.cfg b/resource/setting.cfg new file mode 100755 index 0000000..58cca5f --- /dev/null +++ b/resource/setting.cfg @@ -0,0 +1,270 @@ +[ + { + "name" : "IDS_ST_BODY_CONNECTIVITY", + "menu" : [ + { + "key_name" : "IDS_COM_BODY_WI_FI", + "icon_path" : "/usr/apps/org.tizen.setting/res/icons/A01-1_icon_Wi-Fi.png", + "ug_args" : "wifi-efl-UG", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_MOBILEAP_BODY_TETHERING", + "icon_path" : "/usr/apps/org.tizen.setting/res/icons/A01-1_icon_mobileAP.png", + "ug_args" : "setting-mobile-ap-ug", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_COM_BODY_LOCATION", + "icon_path" : "/usr/apps/org.tizen.setting/res/icons/A01-1_icon_Location.png", + "ug_args" : "setting-location-efl", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_ST_BODY_NETWORK", + "icon_path" : "/usr/apps/org.tizen.setting/res/icons/A01-1_icon_Network.png", + "ug_args" : "setting-network-efl", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_COM_BODY_BLUETOOTH", + "icon_path" : "/usr/apps/org.tizen.setting/res/icons/A01-1_icon_Bluetooth.png", + "ug_args" : "setting-bluetooth-efl", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_COM_BODY_NFC", + "icon_path" : "/usr/ug/res/icons/ug-setting-nfc-efl/setting-nfc.png", + "ug_args" : "setting-nfc-efl|type:nfc", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_ST_HEADER_WI_FI_DIRECT", + "icon_path" : "/usr/apps/org.tizen.setting/res/icons/A01-1_icon_Wi-Fi_direct.png", + "ug_args" : "setting-wifidirect-efl", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 0 + } + ] + }, + { + "name" : "IDS_COM_BODY_SYSTEM", + "menu" : [ + { + "key_name" : "IDS_ST_BODY_FLIGHT_MODE", + "icon_path" : "/usr/apps/org.tizen.setting/res/icons/A01-1_icon_Flight_Mode.png", + "ug_args" : "(null)", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_COM_BODY_WALLPAPER", + "icon_path" : "/usr/apps/org.tizen.setting/res/icons/A01-1_icon_Wallpaper.png", + "ug_args" : "setting-display-efl|viewtype:wallpaper", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_COM_BODY_SOUNDS", + "icon_path" : "/usr/apps/org.tizen.setting/res/icons/A01-1_icon_Sound.png", + "ug_args" : "setting-profile-efl", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_COM_OPT_BRIGHTNESS", + "icon_path" : "/usr/apps/org.tizen.setting/res/icons/A01-1_icon_Brightness.png", + "ug_args" : "setting-display-efl|viewtype:brightness", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_ST_BODY_POWER_SAVING_MODE", + "icon_path" : "/usr/apps/org.tizen.setting/res/icons/A01-1_icon_Power_saving_mode.png", + "ug_args" : "setting-powersaving-efl", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_COM_BODY_FONT", + "icon_path" : "/usr/apps/org.tizen.setting/res/icons/A01-1_icon_Font.png", + "ug_args" : "setting-font-efl", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_ST_BODY_DISPLAY", + "icon_path" : "/usr/apps/org.tizen.setting/res/icons/A01-1_icon_Display.png", + "ug_args" : "setting-display-efl|viewtype:main", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_ST_HEADER_HOME_SCREEN_ABB", + "icon_path" : "/usr/apps/org.tizen.setting/res/icons/A01-1_icon_Menu.png", + "ug_args" : "setting-homescreen-efl", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_ST_HEADER_AUTO_ROTATE_SCREEN_ABB", + "icon_path" : "/usr/apps/org.tizen.setting/res/icons/A01-1_icon_Rotation_lock.png", + "ug_args" : "(null)", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_ST_BODY_DATE_AND_TIME", + "icon_path" : "/usr/apps/org.tizen.setting/res/icons/A01-1_icon_Date_and_time.png", + "ug_args" : "setting-time-efl", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_ST_BODY_LANGUAGE_AND_REGION_ABB", + "icon_path" : "/usr/apps/org.tizen.setting/res/icons/A01-1_icon_Display_Language.png", + "ug_args" : "setting-phone-efl|viewtype:language", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_ST_BODY_KEYBOARD", + "icon_path" : "/usr/apps/org.tizen.setting/res/icons/A01-1_icon_keyboard.png", + "ug_args" : "isfsetting-efl", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_ST_BODY_STORAGE", + "icon_path" : "/usr/apps/org.tizen.setting/res/icons/DefaultIcon.png", + "ug_args" : "setting-storage-efl", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_ST_BODY_MANAGE_APPLICATIONS", + "icon_path" : "/usr/apps/org.tizen.setting/res/icons/A01-1_icon_Manage_Application.png", + "ug_args" : "setting-manage-applications-efl|viewtype:manage-applications", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_ST_BODY_MEMORY", + "icon_path" : "/usr/apps/org.tizen.setting/res/icons/A01-1_icon_Memory.png", + "ug_args" : "setting-memory-efl", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_COM_BODY_RESET", + "icon_path" : "/usr/apps/org.tizen.setting/res/icons/A01-1_icon_Reset.png", + "ug_args" : "setting-reset-efl", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_ST_BODY_DEVELOPER_OPTIONS", + "icon_path" : "/usr/apps/org.tizen.setting/res/icons/A01-1_icon_USB_Connection.png", + "ug_args" : "setting-developeroption-efl|viewtype:usb", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_ST_BODY_ABOUT_PHONE", + "icon_path" : "/usr/apps/org.tizen.setting/res/icons/A01-1_icon_About_phone.png", + "ug_args" : "setting-about-efl", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 1 + } + ] + }, + { + "name" : "IDS_COM_BODY_APPLICATIONS", + "menu" : [ + { + "key_name" : "IDS_COM_BODY_CALL", + "icon_path" : "/usr/share/icons/default/small/org.tizen.phone.png", + "ug_args" : "setting-call-efl", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_COM_BODY_MESSAGES", + "icon_path" : "/usr/share/icons/default/small/org.tizen.message.png", + "ug_args" : "msg-setting-efl", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_COM_BODY_EMAIL", + "icon_path" : "/usr/share/icons/default/small/org.tizen.email.png", + "ug_args" : "email-setting-efl|VIEW_TYPE:main-view", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_COM_BODY_CONTACTS", + "icon_path" : "/usr/share/icons/default/small/org.tizen.contacts.png", + "ug_args" : "contacts-settings-efl|request_type:71", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_COM_BODY_CALENDAR", + "icon_path" : "/usr/share/icons/default/small/org.tizen.calendar.png", + "ug_args" : "calendar-settings-efl", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_COM_BODY_GALLERY", + "icon_path" : "/usr/share/icons/default/small/org.tizen.gallery.png", + "ug_args" : "setting-gallery-efl", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 0 + } + ] + }, + { + "name" : "IDS_ST_BODY_DOWNLOADED_APPLICATIONS", + "menu" : [ + ] + } +] diff --git a/resource/ug-setting-accessibility-efl.xml b/resource/ug-setting-accessibility-efl.xml new file mode 100644 index 0000000..c6d3d50 --- /dev/null +++ b/resource/ug-setting-accessibility-efl.xml @@ -0,0 +1,11 @@ + + + + MyoungJune Park + Setting Font Size Panel + + ug-setting-accessibility-efl.png + + + + diff --git a/resource/ug-setting-font-efl.xml b/resource/ug-setting-font-efl.xml new file mode 100644 index 0000000..a2ed34f --- /dev/null +++ b/resource/ug-setting-font-efl.xml @@ -0,0 +1,11 @@ + + + + MyoungJune Park + Setting Font Panel + + ug-setting-font-efl.png + + + + diff --git a/setting-about/CMakeLists.txt b/setting-about/CMakeLists.txt new file mode 100755 index 0000000..4ea3e20 --- /dev/null +++ b/setting-about/CMakeLists.txt @@ -0,0 +1,39 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) + +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_about REQUIRED + elementary appcore-common appcore-efl + ui-gadget-1 + capi-appfw-application capi-appfw-app-manager evas ecore + tapi bluetooth-api json-glib-1.0 capi-system-info capi-system-system-settings capi-network-bluetooth) + +FOREACH(flag ${pkgs_about_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") +ADD_DEFINITIONS("-fpie") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") + +ADD_LIBRARY(${SETTING_ABOUT_UG} SHARED + src/setting-about.c + src/setting-about-main.c +) + +TARGET_LINK_LIBRARIES(${SETTING_ABOUT_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON}/ -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_ABOUT_UG} ${pkgs_about_LDFLAGS}) + +INSTALL(TARGETS ${SETTING_ABOUT_UG} DESTINATION /usr/ug/lib) diff --git a/setting-about/include/setting-about-main.h b/setting-about/include/setting-about-main.h new file mode 100755 index 0000000..becb777 --- /dev/null +++ b/setting-about/include/setting-about-main.h @@ -0,0 +1,46 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_ABOUT_MAIN_H__ +#define __SETTING_ABOUT_MAIN_H__ + +#include + +// #define SUPPORT_FOTA + +#define SETTING_ABOUT_MACINFO_PATH "/opt/etc/.mac.info" +#define SETTING_ABOUT_POWER_SUPPLY_PATH "/sys/class/power_supply" +#define SETTING_ABOUT_BD_ADDR_PATH "/opt/etc/.bd_addr" +#define SETTING_ABOUT_STAT_PATH "/proc/stat" + +#define SETTING_ABOUT_NEVER_TURN_WIFI_ON_STR "Never Turn WI-FI ON" +#define SETTING_ABOUT_DEVICE_INFO_STR "IDS_ST_BODY_DEVICE_INFO" +#define SETTING_ABOUT_DEVICE_NAME_STR "IDS_ST_BODY_NAME" +#define SETTING_ABOUT_MY_NUMBER_STR "IDS_ST_BODY_MY_NUMBER" +#define SETTING_ABOUT_MODEL_STR "IDS_COM_BODY_FILEDETAIL_MODEL" +#define SETTING_ABOUT_VERSION_STR "IDS_COM_POP_VERSION" +#define SETTING_ABOUT_BLUETOOTH_STR KeyStr_Bluetooth +#define SETTING_ABOUT_WIFI_STR _("IDS_ST_HEADER_WI_FI") +#define SETTING_ABOUT_BATTERY_STR _("IDS_ST_BODY_BATTERY") +#define SETTING_ABOUT_CPU_USAGE_STR _("IDS_ST_BODY_CPU_USAGE") + +#define SETTING_ABOUT_SLP_STR "SLP" +#define SETTING_ABOUT_SLP_STR_LEN 3 + +void setting_about_main_get_bluetooth_address_string(char *str, int size); +void setting_about_main_get_wifi_mac_address_string(char *str, int size); + +#endif /* __SETTING_ABOUT_MAIN_H__ */ diff --git a/setting-about/include/setting-about.h b/setting-about/include/setting-about.h new file mode 100755 index 0000000..e8df25c --- /dev/null +++ b/setting-about/include/setting-about.h @@ -0,0 +1,98 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_ABOUT_H__ +#define __SETTING_ABOUT_H__ + +#include +#include +#include + +#include + +// #include + +#include +#include + +#include +#include +#include + +#define MAX_DISPLAY_STR_LEN_ON_PHONE_INFO 256 + +#define SETTING_ABOUT_PROGRESSBAR_TIMEOUT 10 +//#define SETTING_ABOUT_MOBILE_AP_TURNED_OFF "Mobile hotspot will be turned off." +#define SETTING_ABOUT_MOBILE_AP_TURNED_OFF "Wi-Fi hotspot will be turned off if Device name is changed." + +#define SETTING_ABOUT_MY_NUMBERS_LEN 3 +#define SETTING_ABOUT_WIFI_MAC_STR_LEN 17 +#define SETTING_ABOUT_DEFAULT_DEVICE_NAME "Magnolia" + +typedef struct _SettingAboutUG SettingAboutUG; + +/** + * Setting About UG context + * all UG function has void* as an agument. this is casted back to SettingAboutUG + * and the functions access app context. + */ +struct _SettingAboutUG { + ui_gadget_h ug; + TapiHandle *handle; + bool tapi_responsed; + bool pause_flag; + + setting_view *view_to_load; + + Elm_Genlist_Item_Class itc_1text; + Elm_Genlist_Item_Class itc_2text_2; + Elm_Genlist_Item_Class itc_seperator; + Elm_Genlist_Item_Class itc_group_item; + Elm_Genlist_Item_Class itc_2text_3_parent; + Elm_Genlist_Item_Class itc_1icon_1text_sub; + Elm_Genlist_Item_Class itc_help_style; + + /* add more variables here (move your appdata to here) */ + Evas *evas; + Evas_Object *win_main_layout; + Evas_Object *win_get; + + ui_gadget_h ug_loading; + + Evas_Object *navi_bar; + Evas_Object *ly_main; + Evas_Object *genlsit; + Elm_Object_Item *navi_item; + + Ecore_Timer *update_timer; + Setting_GenGroupItem_Data *item_dev_name; + Setting_GenGroupItem_Data *item_data_cpu; + Setting_GenGroupItem_Data *item_data_battery; + Setting_GenGroupItem_Data *item_data_bt; + Setting_GenGroupItem_Data *item_data_wifi; + Evas_Object *popup; + bool empty_flag; + //char *my_numbers[SETTING_ABOUT_MY_NUMBERS_LEN]; + TelSimMsisdnList_t my_numbers; + bool popup_showed_flag; /** if popup has been showed, do not show again*/ +}; + +extern setting_view setting_view_about_main; +extern int setting_about_generate_genlist(void *data); +void setting_about_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode, void *priv); +void setting_about_main_exp_cb(void *data, Evas_Object *obj, void *event_info); + +#endif /* __SETTING_ABOUT_H__ */ diff --git a/setting-about/src/setting-about-main.c b/setting-about/src/setting-about-main.c new file mode 100755 index 0000000..93d481b --- /dev/null +++ b/setting-about/src/setting-about-main.c @@ -0,0 +1,1210 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include +#include +#include +#include +#include +//#include + +#include + +#include +#include + +#define DEVNAME_BLOCK_SPACE 0 + +/** @todo : need to handle unicode encoded input characters */ + +#define MAX_DEVICE_NAME_LEN 24 +#define EMPTY_LIMITATION_STR "The Name cannot be empty or composited by spaces"//"IDS_ST_BODY_THE_NAME_FIELD_CANNOT_BE_EMPTY" + +static int setting_about_main_create(void *cb); +static int setting_about_main_destroy(void *cb); +static int setting_about_main_update(void *cb); +static int setting_about_main_cleanup(void *cb); + +setting_view setting_view_about_main = { + .create = setting_about_main_create, + .destroy = setting_about_main_destroy, + .update = setting_about_main_update, + .cleanup = setting_about_main_cleanup, +}; +/** +* Do process when clicking '<-' button +* +* @param data +* @param obj +* @param event_info +*/ +static void setting_about_main_click_softkey_back_cb(void *data, + Evas_Object *obj, + void *event_info); + +/** +* Do process when clicking on some genlist item +* +* @param data +* @param obj +* @param event_info +*/ +static void setting_about_main_mouse_up_Gendial_list_cb(void *data, + Evas_Object *obj, + void *event_info); + +static void _input_panel_event_cb(void *data, Ecore_IMF_Context *ctx, int value); +static void __setting_about_main_certificates_clicked(void *data); +static void __setting_about_main_device_name_clicked(void *data, Evas_Object *obj); +/* *************************************************** + * + *basic func + * + ***************************************************/ + +static void __about_popup_rsp_cb(void *data, Evas_Object *obj, void *event_info) +{ + SettingAboutUG *ad = data; + if (obj) { + evas_object_del(obj); + obj = NULL; + } + ad->popup = NULL; +} + +static void __error_popup_response_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = data; + if (list_item->notify) { + evas_object_del(list_item->notify); + list_item->notify = NULL; + } +} + +static void __device_name_changed_cb(void *data, Evas_Object *obj) +{ + retm_if(!data || !obj, "Data parameter is NULL"); + //return if entry is not focused too + SETTING_TRACE_BEGIN; + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + SettingAboutUG *ad = list_item->userdata; + retm_if(ad == NULL, "Data parameter is NULL"); + + const char *entry_str = elm_entry_entry_get(obj); + int entry_len = safeStrLen(entry_str); + SETTING_TRACE("entry_str:[%s], lenght:%d", entry_str, entry_len); + + SETTING_TRACE("maxLengthReachFlag:[%d], enterKeyPressFlag:%d", list_item->maxLengthReachFlag, list_item->enterKeyPressFlag); + /* show the popup if the text already reaches max length and the input character is not the enter key */ + if (list_item->maxLengthReachFlag && list_item->enterKeyPressFlag == FALSE) { + if (!list_item->notify) { + list_item->notify = setting_create_popup_without_btn(list_item, list_item->win_main, + NULL, _(EXCEED_LIMITATION_STR), + __error_popup_response_cb, + POPUP_INTERVAL, FALSE, FALSE); + elm_object_focus_set(list_item->eo_check, EINA_FALSE); + } else { + //postpone 2 seconds again + elm_popup_timeout_set(list_item->notify, POPUP_INTERVAL); + } + } + list_item->maxLengthReachFlag = false; + list_item->enterKeyPressFlag = false; + +#if DEVNAME_BLOCK_SPACE + //block 'Space' key + if (entry_len > 0 && NULL != strstr(entry_str, " ")) {//cancel the effect of input 'space character' + SETTING_TRACE("Cannot input the 'space' key or 'enter' key"); + + int i = 0; + int j = 0; + char *tmp = (char *)g_strdup(entry_str); + for (; tmp[i];) { + if (tmp[i] == ' ') { + for (j = i; tmp[j]; j++) { + tmp[j] = tmp[j + 1]; + } + } else { + i++; + } + } + G_FREE(list_item->sub_desc); + list_item->sub_desc = (char *)g_strdup(tmp); + G_FREE(tmp); + SETTING_TRACE("sub_desc:[%s]", list_item->sub_desc); + + elm_entry_entry_set(obj, list_item->sub_desc); + elm_entry_cursor_end_set(obj); + } +#endif + //for genlist update + G_FREE(list_item->sub_desc);//release first + list_item->sub_desc = (char *)g_strdup(entry_str); + + if (isSpaceStr(entry_str)) { + if (!ad->empty_flag) + { + ad->empty_flag = TRUE; + //elm_entry_context_menu_disabled_set(obj, TRUE); //disable the copy&paste&search popup + //elm_entry_magnifier_disabled_set(obj, TRUE); +/* + Elm_Object_Item *navi_it = elm_naviframe_top_item_get(ad->navi_bar); + if (navi_it) + { + Evas_Object *back_btn = elm_object_item_part_content_get(navi_it, "prev_btn"); + if(back_btn) + { + setting_disable_evas_object(back_btn); + setting_dim_evas_object(back_btn, TRUE); + } + + Evas_Object *top_r_btn = elm_object_item_part_content_get(navi_it, "title_right_btn"); + if(top_r_btn) + { + setting_disable_evas_object(top_r_btn); + setting_dim_evas_object(top_r_btn, TRUE); + } + } +*/ + } + } else { + if (ad->empty_flag) + { + ad->empty_flag = FALSE; + //elm_entry_context_menu_disabled_set(obj, FALSE); //enable the copy&paste&search popup + //elm_entry_magnifier_disabled_set(obj, FALSE); +/* + Elm_Object_Item *navi_it = elm_naviframe_top_item_get(ad->navi_bar); + if (navi_it) + { + Evas_Object *back_btn = elm_object_item_part_content_get(navi_it, "prev_btn"); + if(back_btn) + { + setting_enable_evas_object(back_btn); + setting_undo_dim_evas_object(back_btn, TRUE); + } + + Evas_Object *top_r_btn = elm_object_item_part_content_get(navi_it, "title_right_btn"); + if(top_r_btn) + { + setting_enable_evas_object(top_r_btn); + setting_undo_dim_evas_object(top_r_btn, TRUE); + } + } +*/ + } + } + +} + +static void +__setting_about_device_name_changed_cb(void *data, Evas_Object *obj, + void *event_info) +{ + __device_name_changed_cb(data, obj); +} + + +/** + * Model Name: + * - No ini: Unavailable + * - I9500 @ target: GT-I9500 + * - I9500 @ emul: SDK + * - SLP @ target: GT-SLP + * - SLP @ emul: SDK + */ +void setting_about_main_get_phone_model_name(char* szStr, int nSize) +{ + retm_if(szStr == NULL, "szStr parameter is NULL"); + + char *value = NULL; + int ret = system_info_get_value_string(SYSTEM_INFO_KEY_MODEL, &value); + SETTING_TRACE("value : %s", value); + if (ret != SYSTEM_INFO_ERROR_NONE) { + SETTING_TRACE_ERROR("fail to call system_info_get_value_string"); + FREE(value); + snprintf(szStr, nSize, "%s", _("IDS_ST_HEADER_UNAVAILABLE")); + return; + } + + if (value) { + snprintf(szStr, nSize, "%s", value); + } else { + snprintf(szStr, nSize, "%s", _("IDS_ST_HEADER_UNAVAILABLE")); + } + + FREE(value); +} + +void setting_about_main_get_sw_version(char* szStr, int nSize) +{ + retm_if(szStr == NULL, "szStr parameter is NULL"); + + char *version = NULL; + int ret = system_info_get_value_string(SYSTEM_INFO_KEY_TIZEN_VERSION, &version); + if (ret != SYSTEM_INFO_ERROR_NONE) { + SETTING_TRACE_ERROR("fail to call system_info_get_value_string"); + FREE(version); + snprintf(szStr, nSize, "%s", _("IDS_ST_HEADER_UNAVAILABLE")); + return; + } + + char *build_info = NULL; + ret = system_info_get_value_string(SYSTEM_INFO_KEY_BUILD_STRING, &build_info); + if (ret != SYSTEM_INFO_ERROR_NONE) { + SETTING_TRACE_ERROR("fail to call system_info_get_value_string"); + FREE(version); + FREE(build_info); + snprintf(szStr, nSize, "%s", _("IDS_ST_HEADER_UNAVAILABLE")); + return; + } + + snprintf(szStr, nSize, "TIZEN %s (%s)", version, build_info); + + FREE(version); + FREE(build_info); +} + +void setting_about_main_get_wifi_mac_address_string(char *str, int size) +{ + setting_retm_if(str == NULL, "str parameter is NULL"); + setting_retm_if(size < SETTING_ABOUT_WIFI_MAC_STR_LEN+1, "size parameter is wrong"); + + FILE *p = fopen(SETTING_ABOUT_MACINFO_PATH, "r"); + + if (p) { + int size = fread(str, sizeof(char), SETTING_ABOUT_WIFI_MAC_STR_LEN, p); + if (size != SETTING_ABOUT_WIFI_MAC_STR_LEN) { + SETTING_TRACE_ERROR("fail to call fread"); + } + fclose(p); + p = NULL; + } else { + perror("open failed!"); + } + + SETTING_TRACE_DEBUG("get_wifi_mac_address : %s", str); + + int wifi_state = VCONFKEY_WIFI_OFF; + vconf_get_int(VCONFKEY_WIFI_STATE, &wifi_state); + + if((safeStrLen(str) == 0) || (wifi_state == VCONFKEY_WIFI_OFF)) + snprintf(str, size, "%s (%s)", _("IDS_ST_HEADER_UNAVAILABLE"), _(SETTING_ABOUT_NEVER_TURN_WIFI_ON_STR)); +} + +void setting_about_main_get_battery_string(char *str, int size) +{ + setting_retm_if(str == NULL, "str parameter is NULL"); + + int val = -1; + char file[MAX_DISPLAY_STR_LEN_ON_PHONE_INFO] = { 0, }; + snprintf(file, MAX_DISPLAY_STR_LEN_ON_PHONE_INFO, + "%s/%s/%s", SETTING_ABOUT_POWER_SUPPLY_PATH, "battery", "capacity"); + + char buf[MAX_DISPLAY_STR_LEN_ON_PHONE_INFO] = { 0, }; + int fd = 0; + int r = 0; + + fd = open(file, O_RDONLY); + if (fd != -1) { + r = read(fd, buf, MAX_DISPLAY_STR_LEN_ON_PHONE_INFO); + if ((r >= 0) && (r < MAX_DISPLAY_STR_LEN_ON_PHONE_INFO)) { + buf[r] = '\0'; + val = atoi(buf); + snprintf(str, size, "%d%s", val, "\%"); + } else { + SETTING_TRACE_ERROR("read file fail"); + snprintf(str, size, "%s", _("IDS_ST_HEADER_UNAVAILABLE")); + } + + close(fd); + } else { + SETTING_TRACE_ERROR("open file fail"); + snprintf(str, size, "%s", _("IDS_ST_HEADER_UNAVAILABLE")); + } +} + +void setting_about_main_get_bluetooth_address_string(char *str, int size) +{ + setting_retm_if(str == NULL, "str parameter is NULL"); + + int ret = 0; + + ret = bt_initialize(); + setting_retm_if(ret != 0, "bluetooth initialization failed"); + + char *local_address = NULL; + ret = bt_adapter_get_address(&local_address); + + bt_deinitialize(); + + if (ret < 0) { + snprintf(str, size, "%s", _("IDS_ST_HEADER_UNAVAILABLE")); + SETTING_TRACE_DEBUG("bt address : %s", str); + } else { + SETTING_TRACE_DEBUG("bt address : %s", local_address); + snprintf(str, size, "%s", local_address); + } + + if (local_address) { + free(local_address); + } +} + +int __stat_get_cpuinfo(float *usr_pct, float *sys_pct) +{ + setting_retvm_if(usr_pct == NULL, -ENOENT, "param usr_pct is null"); + setting_retvm_if(sys_pct == NULL, -ENOENT, "param sys_pct is null"); + + /* default value */ + *usr_pct = 0.0; + *sys_pct = 0.0; + static unsigned long long usr_time = 0, nice_time = 0, sys_time = 0; + static unsigned long long old_usr = 0, old_nice = 0, old_sys = 0; + static struct timeval old_tv, cur_tv; + unsigned long long elapsed_tick; + long tick_per_sec; + long cpu_num; + FILE *fp = NULL; + int ret = 0; + + tick_per_sec = sysconf(_SC_CLK_TCK); + cpu_num = sysconf(_SC_NPROCESSORS_ONLN); + + if (cpu_num < 1) + cpu_num = 1; + + gettimeofday(&cur_tv, NULL); + fp = fopen(SETTING_ABOUT_STAT_PATH, "r"); + if (fp == NULL) { + SETTING_TRACE_ERROR("fp == NULL"); + return -ENOENT; + } + + char cpu_info[MAX_COMMON_BUFFER_LEN] = {0,}; + char *cpu_info_p = fgets(cpu_info, MAX_COMMON_BUFFER_LEN, fp); + + if(cpu_info_p == NULL) { + SETTING_TRACE_ERROR("fgets failed"); + fclose(fp); // free - code + return -ENOENT; + } + + char *substr = NULL; + unsigned long long tmp_long = 0; + int i = 0; + /* split cpu_info, get 3 numbers headmost*/ + while ((substr = strsep(&cpu_info_p, " \t")) != NULL) { + char* endptr = NULL; + tmp_long = strtoull(substr, &endptr, 10); + if (tmp_long != 0 && tmp_long != ULLONG_MAX) { + switch (i) { + case 0: + usr_time = tmp_long; + break; + case 1: + nice_time = tmp_long; + break; + case 2: + sys_time = tmp_long; + break; + default: + break; + } + i++; + } + if (i >= 3) { + break; + } + } + + fclose(fp); + fp = NULL; + if (old_usr == 0) { + ret = -EAGAIN; + SETTING_TRACE_ERROR("old_usr == 0"); + goto out; + } + + elapsed_tick = (cur_tv.tv_sec - old_tv.tv_sec) * tick_per_sec + + ((cur_tv.tv_usec - old_tv.tv_usec) * tick_per_sec) / 1000000; + + /* REMOVE BS */ + if (elapsed_tick != 0) + *usr_pct = + ((float)(usr_time - old_usr) * 100 / elapsed_tick) / + cpu_num; + else + *usr_pct = 0; + /* REMOVE BS */ + if (elapsed_tick != 0) + *sys_pct = + ((float)(sys_time - old_sys) * 100 / elapsed_tick) / + cpu_num; + else + *sys_pct = 0; + + out: + old_usr = usr_time; + old_nice = nice_time; + old_sys = sys_time; + old_tv = cur_tv; + + return ret; +} + +static Eina_Bool __timer_update_cb(const void *data) +{ + retv_if(data == NULL, TRUE); + SettingAboutUG *ad = (SettingAboutUG *) data; + + char str[MAX_DISPLAY_STR_LEN_ON_PHONE_INFO] = { 0, }; + if (ad->item_data_cpu) { + float usr, sys; + int ret = __stat_get_cpuinfo(&usr, &sys); + if (ret == -ENOENT) { + SETTING_TRACE_ERROR("call __stat_get_cpuinfo fail"); + snprintf(str, sizeof(str), "%s", _("IDS_ST_HEADER_UNAVAILABLE")); + } else { + snprintf(str, sizeof(str), "%.0f%s", usr + sys, "\%"); + } + + ad->item_data_cpu->sub_desc = (char *)g_strdup(str); + elm_object_item_data_set(ad->item_data_cpu->item, ad->item_data_cpu); + elm_genlist_item_update(ad->item_data_cpu->item); + } + + if (ad->item_data_battery) { + setting_about_main_get_battery_string(str, sizeof(str)); + /*SETTING_TRACE("str:%s", str);*/ + ad->item_data_battery->sub_desc = (char *)g_strdup(str); + elm_object_item_data_set(ad->item_data_battery->item, ad->item_data_battery); + elm_genlist_item_update(ad->item_data_battery->item); + } + return TRUE; +} + +static void +__about_main_gl_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event) +{ + SETTING_TRACE_BEGIN; + ret_if(!data); + SettingAboutUG *ad = (SettingAboutUG *) data; + retm_if(event == NULL, "Invalid argument: event info is NULL"); + Evas_Event_Mouse_Up *ev = (Evas_Event_Mouse_Up *)event; + + if (ad->item_dev_name) { + Elm_Object_Item *selected_item = elm_genlist_at_xy_item_get(ad->genlsit, ev->output.x, ev->output.y, NULL); + if (ad->item_dev_name->item == selected_item) { + if (elm_object_focus_get(ad->item_dev_name->eo_check)) { + Ecore_IMF_Context *imf_context = (Ecore_IMF_Context *)elm_entry_imf_context_get(ad->item_dev_name->eo_check); + if (imf_context) { + ecore_imf_context_input_panel_show(imf_context); + } + return; + } + } + + elm_object_focus_set(ad->item_dev_name->eo_check, EINA_FALSE);//to make inputing words input + } +} + +static void __entry_unfocus_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(!data || !obj, "Data parameter is NULL"); + + Evas_Object *entry_container = elm_object_parent_widget_get(obj); + if (entry_container) { + //whe entry unfocused, its guidetext will becomes "Input here" + elm_object_part_text_set(entry_container, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT")); + if (elm_entry_is_empty(obj)) + elm_object_signal_emit(entry_container, "elm,state,guidetext,show", "elm"); + elm_object_signal_emit(entry_container, "elm,state,eraser,hide", "elm"); + } + + //Setting_GenGroupItem_Data *list_item = data; + const char *entry_str = elm_entry_entry_get(obj); + char *entry_str_utf8 = NULL; + entry_str_utf8 = elm_entry_markup_to_utf8(entry_str); + SETTING_TRACE("To store \"%s\" into vconf[%s]", entry_str_utf8, VCONFKEY_SETAPPL_DEVICE_NAME_STR); + + //ecore_idler_add(__check_on_idler, ad); + Setting_GenGroupItem_Data *item_dev_name = data; + SettingAboutUG *ad = item_dev_name->userdata; + __device_name_changed_cb(item_dev_name, item_dev_name->eo_check); +#if 0 + //after unfocus,need updating.. + elm_object_item_data_set(item_dev_name->item, item_dev_name); + elm_genlist_item_update(item_dev_name->item); +#endif + + if(ad->navi_item + && elm_object_item_part_content_get(ad->navi_item, "title_right_btn")) { + Evas_Object *btn = elm_object_item_part_content_unset(ad->navi_item, "title_right_btn"); + evas_object_del(btn); + } + setting_hide_input_pannel_cb(item_dev_name->eo_check); + if (item_dev_name) { + if (ad->empty_flag) { + FREE(entry_str_utf8); + return; + } else { + } + } + + + if (0 != vconf_set_str(VCONFKEY_SETAPPL_DEVICE_NAME_STR, entry_str_utf8)) { + SETTING_TRACE_ERROR("Set vconf[%s] failed", + VCONFKEY_SETAPPL_DEVICE_NAME_STR); + } + + FREE(entry_str_utf8); + +} + +static void __entry_key_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + ret_if(data == NULL); + SettingAboutUG *ad = (SettingAboutUG*)data; + Evas_Event_Key_Down *ev = (Evas_Event_Key_Down *)event_info; + SETTING_TRACE_DEBUG("ev->key : %s", ev->key); + if(safeStrCmp(ev->key, "KP_Enter") == 0 //it is for Japanese keyboard to fix N_SE-10719 + || safeStrCmp(ev->key, "Return") == 0) + { + // if entry has 1 char at list, hide ime. + if(isSpaceStr(elm_entry_entry_get(obj))) + { + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, NULL, _(EMPTY_LIMITATION_STR), + __about_popup_rsp_cb, POPUP_INTERVAL, FALSE, FALSE); + } + } +} + +static void __max_len_reached(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + retm_if(!elm_object_focus_get(obj), "Entry is not focused");//notify only when entry is being focused on. + + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + list_item->maxLengthReachFlag = true; +} + +static void __setting_about_main_vconf_change_cb(keynode_t *key, void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == key, "key is NULL"); + setting_retm_if(NULL == data, "data is NULL"); + SettingAboutUG *ad = (SettingAboutUG *)data; + + int status = vconf_keynode_get_int(key); + char *vconf_name = vconf_keynode_get_name(key); + + if (!safeStrCmp(vconf_name, VCONFKEY_WIFI_STATE)) { + SETTING_TRACE("status:%d", status); + char str[MAX_DISPLAY_STR_LEN_ON_PHONE_INFO] = {0,}; + setting_about_main_get_wifi_mac_address_string(str, sizeof(str)); + if (ad->item_data_wifi) { + G_FREE(ad->item_data_wifi->sub_desc); + ad->item_data_wifi->sub_desc = (char *)g_strdup(str); + elm_object_item_data_set(ad->item_data_wifi->item, ad->item_data_wifi); + elm_genlist_item_update(ad->item_data_wifi->item); + } + } else { + SETTING_TRACE_ERROR("vconf_name is error"); + } +} + +int setting_about_generate_genlist(void *data) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingAboutUG *ad = (SettingAboutUG *) data; + bool is_emul_bin = isEmulBin(); + + Evas_Object *scroller = ad->genlsit; + Elm_Object_Item *item = NULL; + Setting_GenGroupItem_Data *item_data = NULL; + char str[MAX_DISPLAY_STR_LEN_ON_PHONE_INFO] = { 0, }; + (void)setting_create_Gendial_field_titleItem(scroller, + &(ad->itc_group_item), + SETTING_ABOUT_DEVICE_INFO_STR, NULL); + /* Device name */ + char *name_value = vconf_get_str(VCONFKEY_SETAPPL_DEVICE_NAME_STR); + char *pa_sub_desc = elm_entry_utf8_to_markup(name_value); + FREE(name_value); + + ad->empty_flag = FALSE; + if (NULL == pa_sub_desc || '\0' == pa_sub_desc[0]) + { + ad->empty_flag = TRUE; +/* Elm_Object_Item *navi_it = elm_naviframe_top_item_get(ad->navi_bar); + if (navi_it) + { + Evas_Object *back_btn = elm_object_item_part_content_get(navi_it, "prev_btn"); + setting_disable_evas_object(back_btn); + setting_dim_evas_object(back_btn, TRUE); + } +*/ + } + + + // [UI] Device name + char *app_name = NULL; + int ret_get_app_name = app_manager_get_app_name("com.samsung.oma-dm", &app_name); + if (ret_get_app_name == APP_MANAGER_ERROR_INVALID_PACKAGE ) + { + SETTING_TRACE(">>>>>>>>>>>>>>>>>> UNINSTALLED PACKAGE"); + ad->item_dev_name = NULL; + } else { + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *)calloc(1, sizeof(Setting_GenGroupItem_Data)); + if (!item_data) + FREE(pa_sub_desc); + + setting_retvm_if(!item_data, NULL, "calloc failed"); + + item_data->keyStr = (char *)g_strdup(SETTING_ABOUT_DEVICE_NAME_STR); + item_data->sub_desc = (char *)g_strdup(pa_sub_desc); + item_data->swallow_type = SWALLOW_Type_LAYOUT_ENTRY; + item_data->chk_status = 0; + item_data->chk_change_cb = __setting_about_device_name_changed_cb; + item_data->userdata = ad; + item_data->isSinglelineFlag = TRUE; + item_data->maxlength_reached_cb = __max_len_reached; + item_data->start_change_cb = (setting_call_back_func)__entry_key_down_cb; + item_data->stop_change_cb = __entry_unfocus_cb; + item_data->x_callback_cb = _input_panel_event_cb; + + item_data->limit_filter_data = calloc(1, sizeof(Elm_Entry_Filter_Limit_Size)); + if (item_data->limit_filter_data) { + //max byte len is 31 not 31+1 + //ad->item_dev_name->limit_filter_data->max_byte_count = MAX_DEVICE_NAME_LEN + OFFESET_ENTRY_FILTER; + item_data->limit_filter_data->max_byte_count = MAX_DEVICE_NAME_LEN; + item_data->win_main = ad->win_get; + } + + item_data->input_panel_disable_flag = EINA_TRUE; + + item_data->item = elm_genlist_item_append(scroller, &(itc_1icon), item_data, NULL, ELM_GENLIST_ITEM_NONE, + setting_about_main_mouse_up_Gendial_list_cb, ad); + + ad->item_dev_name = item_data; + if (ad->item_dev_name) { + elm_genlist_item_select_mode_set(ad->item_dev_name->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("ad->item_dev_name is NULL"); + } + } + FREE(pa_sub_desc); + + // [UI] My number + int err; + char sel_num[TAPI_SIM_XDN_DIALING_NUMBER_LEN + 1] = { 0, }; + setting_get_string_slp_key(STR_SLP_SETTING_SELECT_NUM, sel_num, &err); + + SETTING_TRACE("ad->my_numbers.count[%d]", ad->my_numbers.count); + if (ad->my_numbers.count == 1) { + item_data = + setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), + NULL, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, SETTING_ABOUT_MY_NUMBER_STR, + sel_num, NULL); + if (item_data) { + elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("item_data is NULL"); + } + } else if (ad->my_numbers.count > 1){ + setting_enable_expandable_genlist(scroller, ad, + setting_about_main_exp_cb, NULL); + item_data = setting_create_Gendial_exp_parent_field(scroller, + &(ad->itc_2text_3_parent), + NULL, NULL, + SWALLOW_Type_INVALID, + SETTING_ABOUT_MY_NUMBER_STR, + sel_num); + if (item_data) { + item_data->int_slp_setting_binded = STR_SLP_SETTING_SELECT_NUM; + } else { + SETTING_TRACE_ERROR("ad->data_wap is NULL"); + } + } else if (ad->my_numbers.count == 0 ){ + // _("IDS_ST_HEADER_UNAVAILABLE") + SETTING_TRACE_ERROR("don't have my number"); + item_data = + setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), + NULL, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, SETTING_ABOUT_MY_NUMBER_STR, + _("IDS_ST_HEADER_UNAVAILABLE"), NULL); + if (item_data) { + elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("item_data is NULL"); + } + } + + // [UI] Phone model + memset(str, 0x00, sizeof(str)); + setting_about_main_get_phone_model_name(str, sizeof(str)); + item_data = + setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), NULL, + NULL, SWALLOW_Type_INVALID, NULL, + NULL, 0, SETTING_ABOUT_MODEL_STR, str, NULL); + if (item_data) { + elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("item_data is NULL"); + } + + // [UI] SW version + memset(str, 0x00, sizeof(str)); + setting_about_main_get_sw_version(str, sizeof(str)); + item_data = + setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), NULL, + NULL, SWALLOW_Type_INVALID, NULL, + NULL, 0, SETTING_ABOUT_VERSION_STR, str, NULL); + if (item_data) { + elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("item_data is NULL"); + } + + // [UI] Bluetooth address + if ( ! is_emul_bin) { // requested by DI Kim due to BT BS on 11/26 + memset(str, 0x00, sizeof(str)); + setting_about_main_get_bluetooth_address_string(str, sizeof(str)); + ad->item_data_bt = + setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), NULL, + NULL, SWALLOW_Type_INVALID, NULL, + NULL, 0, SETTING_ABOUT_BLUETOOTH_STR, str, NULL); + if (ad->item_data_bt) { + elm_genlist_item_select_mode_set(ad->item_data_bt->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("item_data is NULL"); + } + } + + // [UI] MAC address + memset(str, 0x00, sizeof(str)); + setting_about_main_get_wifi_mac_address_string(str, sizeof(str)); + + SETTING_TRACE_DEBUG("[about main] get_wifi_mac_address : %s", str); + + ad->item_data_wifi = + setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), NULL, + NULL, SWALLOW_Type_INVALID, NULL, + NULL, 0, SETTING_ABOUT_WIFI_STR, str, NULL); + if (ad->item_data_wifi) { + elm_genlist_item_select_mode_set(ad->item_data_wifi->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("item_data is NULL"); + } + + // [UI] Battery + memset(str, 0x00, sizeof(str)); + setting_about_main_get_battery_string(str, sizeof(str)); + item_data = + setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), NULL, + NULL, SWALLOW_Type_INVALID, NULL, + NULL, 0, SETTING_ABOUT_BATTERY_STR, str, NULL); + if (item_data) { + elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + ad->item_data_battery = item_data; + } else { + SETTING_TRACE_ERROR("item_data is NULL"); + } + + // [UI] CPU Info + memset(str, 0x00, sizeof(str)); + float usr, sys; + int ret = __stat_get_cpuinfo(&usr, &sys); + if (ret == -ENOENT) { + SETTING_TRACE_ERROR("call __stat_get_cpuinfo fail"); + snprintf(str, sizeof(str), "%s", _("IDS_ST_HEADER_UNAVAILABLE")); + } else { + snprintf(str, sizeof(str), "%.0f%s", usr + sys, "\%"); + } + + ad->item_data_cpu = item_data = + setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), NULL, + NULL, SWALLOW_Type_INVALID, NULL, + NULL, 0, SETTING_ABOUT_CPU_USAGE_STR, str, NULL); + if (item_data) { + elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("item_data is NULL"); + } + + // [UI] separator + item = + elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + // [UI] Certificates + // implementation is in progress. + setting_create_Gendial_field_def(scroller, &(ad->itc_1text), + setting_about_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, NULL, + 0, "IDS_COM_BODY_CERTIFICATES", NULL, NULL); + + item = elm_genlist_item_append(scroller, &itc_bottom_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + ad->update_timer = + ecore_timer_add(2, (Ecore_Task_Cb) __timer_update_cb, ad); + + return SETTING_RETURN_SUCCESS; +} + +static int setting_about_main_create(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingAboutUG *ad = (SettingAboutUG *) cb; + + Evas_Object *scroller = elm_genlist_add(ad->win_main_layout); + retvm_if(scroller == NULL, SETTING_DRAW_ERR_FAIL_SCROLLER, + "Cannot set scroller object as contento of layout"); + elm_object_style_set(scroller, "dialogue"); + elm_genlist_clear(scroller); /* first to clear list */ + + ad->genlsit = scroller; + + ad->ly_main = + setting_create_layout_navi_bar(ad->win_main_layout, ad->win_get, + _(KeyStr_AboutPhone), + _("IDS_COM_BODY_BACK"), NULL, NULL, + setting_about_main_click_softkey_back_cb, + NULL, NULL, ad, scroller, + &ad->navi_bar, NULL); + + evas_object_event_callback_add(scroller, EVAS_CALLBACK_MOUSE_UP, + __about_main_gl_mouse_up, ad); + + ad->navi_item = elm_naviframe_top_item_get(ad->navi_bar); + + int value, err; + setting_get_int_slp_key(INT_SLP_SETTING_SIM_SLOT, &value, &err); + if (VCONFKEY_TELEPHONY_SIM_INSERTED != value) { + setting_about_generate_genlist((void *)ad); + } + + int ret = vconf_notify_key_changed(VCONFKEY_WIFI_STATE, + __setting_about_main_vconf_change_cb, ad); + if (ret != 0) { + SETTING_TRACE_ERROR("call vconf_notify_key_changed failed"); + } + + setting_view_about_main.is_create = 1; + SETTING_TRACE_END; + return SETTING_RETURN_SUCCESS; +} + +static int setting_about_main_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingAboutUG *ad = (SettingAboutUG *) cb; + + int ret = vconf_ignore_key_changed(VCONFKEY_WIFI_STATE, + __setting_about_main_vconf_change_cb); + if (ret != 0) { + SETTING_TRACE_ERROR("call vconf_ignore_key_changed failed"); + } + + + if (ad->update_timer) { + ecore_timer_del(ad->update_timer); + ad->update_timer = NULL; + } + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + + if (ad->ly_main != NULL) { + evas_object_del(ad->ly_main); + ad->ly_main = NULL; + } + + setting_view_about_main.is_create = 0; + return SETTING_RETURN_SUCCESS; +} + +static int setting_about_main_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingAboutUG *ad = (SettingAboutUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_show(ad->ly_main); + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_about_main_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingAboutUG *ad = (SettingAboutUG *) cb; + + if (ad->ly_main != NULL) { + /* evas_object_hide(ad->ly_main); */ + } + + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void +setting_about_main_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + + SettingAboutUG *ad = (SettingAboutUG *) data; + if (ad->empty_flag) { + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, NULL, _(EMPTY_LIMITATION_STR), + __about_popup_rsp_cb, POPUP_INTERVAL, FALSE, FALSE); + if (ad->item_dev_name) { + elm_object_focus_set(ad->item_dev_name->eo_check, EINA_TRUE); + } + return; + } + + //imf must be hided before view is destroyed. + //Following code is just to improve the hiding speed. If not add these code, + //the input pannel will also be hided with the view destroyed,but it works too slow. + if (ad->item_dev_name) { + elm_object_focus_set(ad->item_dev_name->eo_check, EINA_FALSE); + setting_hide_input_pannel_cb(ad->item_dev_name->eo_check); + } + + /* Send destroy request */ + ug_destroy_me(ad->ug); + + SETTING_TRACE_END; +} + +/** +* @brief +* +* @param data +* @param obj +* @param event_info +*/ +static void +setting_about_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + SettingAboutUG *ad = (SettingAboutUG *) data; + + SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); + if (!safeStrCmp("IDS_ST_BODY_OPEN_SOURCE_LICENCES", list_item->keyStr)) { + + //setting_view_change(&setting_view_about_main, &setting_view_about_licences, data); + + } else if (!safeStrCmp("IDS_COM_BODY_CERTIFICATES", list_item->keyStr)) { + Elm_Object_Item *navi_it = elm_naviframe_top_item_get(ad->navi_bar); + if (navi_it) { + Evas_Object *back_btn = elm_object_item_part_content_get(navi_it, "prev_btn"); + elm_object_focus_set(back_btn, TRUE); + } + __setting_about_main_certificates_clicked(data); + } else if (!safeStrCmp(SETTING_ABOUT_DEVICE_NAME_STR, list_item->keyStr)) { + __setting_about_main_device_name_clicked(data, list_item->eo_check); + } +} + +static void __destroy_certificates_ug_cb(ui_gadget_h ug, void *priv) +{ + SETTING_TRACE_BEGIN; + + /* restore the '<-' button on the navigate bar */ + ret_if(!priv); + SettingAboutUG *ad = (SettingAboutUG *) priv; /* ad is point to priv */ + + if (ug) { + ug_destroy(ug); + ad->ug_loading = NULL; + } + +} + +static void __setting_about_main_certificates_clicked(void *data) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + SettingAboutUG *ad = (SettingAboutUG *)data; + + struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs)); + if (!cbs) { + return; + } + + cbs->layout_cb = setting_about_layout_ug_cb; + cbs->result_cb = NULL; + cbs->destroy_cb = __destroy_certificates_ug_cb; + cbs->priv = (void *)ad; + + ad->ug_loading = + ug_create(ad->ug, "setting-manage-certificates-efl", UG_MODE_FULLVIEW, NULL, cbs); + + if (NULL == ad->ug_loading) { /* error handling */ + SETTING_TRACE_ERROR("NULL == ad->ug_loading"); + } + FREE(cbs); +} + +static void __top_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + + SettingAboutUG *ad = (SettingAboutUG *) data; + + if (ad->item_dev_name) + setting_hide_input_pannel_cb(ad->item_dev_name->eo_check); + + SETTING_TRACE_END; +} + +static Eina_Bool __delay_remove(void *data) +{ + SETTING_TRACE_BEGIN; + SettingAboutUG *ad = data; + if (ad->popup) + { + evas_object_del(ad->popup); + ad->popup = NULL; + } + return FALSE; +} +static void _input_panel_event_cb(void *data, Ecore_IMF_Context *ctx, int value) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + retm_if(ctx == NULL, "obj parameter is NULL"); + SettingAboutUG *ad = (SettingAboutUG *)data; + + if(value == ECORE_IMF_INPUT_PANEL_STATE_SHOW) + { + SETTING_TRACE("value == ECORE_IMF_INPUT_PANEL_STATE_SHOW"); + if(ad->navi_item && !elm_object_item_part_content_get(ad->navi_item, "title_right_btn")) + { + Evas_Object *r_button = setting_create_button(ad->navi_bar, + dgettext("sys_string", "IDS_COM_BODY_BACK"), + NAVI_BACK_BUTTON_STYLE, + __top_back_cb, + ad); + + elm_object_item_part_content_set(ad->navi_item, "title_right_btn", r_button); +/* + if (ad->empty_flag) + { + setting_disable_evas_object(r_button); + setting_dim_evas_object(r_button, TRUE); + } +*/ + } + } + else if(value == ECORE_IMF_INPUT_PANEL_STATE_HIDE) + { + SETTING_TRACE("value == ECORE_IMF_INPUT_PANEL_STATE_HIDE"); + if(ad->navi_item && elm_object_item_part_content_get(ad->navi_item, "title_right_btn")) { + + Evas_Object *btn = elm_object_item_part_content_unset(ad->navi_item, "title_right_btn"); + evas_object_del(btn); + } + + if (ad->item_dev_name) { + elm_object_focus_set(ad->item_dev_name->eo_check, EINA_FALSE); + } + //if Setting is overlapped by other app,the entry will lost its focus, + //the input pannel will be hided and any popup should be removed to fix blinking issue. + if (ad->pause_flag) + ecore_idler_add(__delay_remove, ad); + } +} + +static void __setting_about_main_device_name_clicked(void *data, Evas_Object *obj) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + retm_if(obj == NULL, "obj parameter is NULL"); + SettingAboutUG *ad = (SettingAboutUG *)data; + + if (!elm_object_focus_get(obj)) { + elm_object_focus_set(obj, EINA_TRUE); + } +} + + + diff --git a/setting-about/src/setting-about.c b/setting-about/src/setting-about.c new file mode 100755 index 0000000..9aa8247 --- /dev/null +++ b/setting-about/src/setting-about.c @@ -0,0 +1,561 @@ +/* + * setting + * Copyright (c) 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://floralicense.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. + */ + +/** + *@defgroup setting-about + *UG creation code for setting-about + * + * - Device Info + * - Name + * - My number + * - Get info from SIM card and display it. + * - if there's no phone number, it shows 'unavailable'. + * - Model + * - Version + * - Bluetooth + * - Wi-Fi + * - Battery + * - CPU usage + * - Software update + * - Certificates + */ +#include +#include + +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif + +/** +* Event process when the sizeof UG view changes +* +* @param data +* @param e +* @param obj +* @param event_info +*/ +static void setting_about_ug_cb_resize(void *data, Evas *e, Evas_Object *obj, + void *event_info) +{ + SettingAboutUG *ad = (SettingAboutUG *) data; + setting_view_update(&setting_view_about_main, ad); +} + +/** +* on_create function of the UG +* +* @param ug +* @param mode +* @param data +* @param priv +* +* @return +*/ +static void *setting_about_ug_on_create(ui_gadget_h ug, enum ug_mode mode, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if((NULL == priv), NULL, "NULL == priv"); + SettingAboutUG *aboutUG = priv; + aboutUG->ug = ug; + + aboutUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug); + aboutUG->win_get = (Evas_Object *) ug_get_window(); + evas_object_show(aboutUG->win_main_layout); + aboutUG->evas = evas_object_evas_get(aboutUG->win_main_layout); + + setting_retvm_if(aboutUG->win_main_layout == NULL, NULL, + "cannot get main window "); + + setting_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR); + + /* register view node table */ + setting_view_node_table_intialize(); + setting_view_node_table_register(&setting_view_about_main, NULL); + + /* setting_view_node_table_register(&setting_view_about_about_view, &setting_view_about_main); */ + + /* creating a view. */ + setting_create_Gendial_itc("dialogue/1text", &(aboutUG->itc_1text)); + setting_create_Gendial_itc("dialogue/multiline/2text", &(aboutUG->itc_2text_2)); + setting_create_Gendial_itc("dialogue/title", &(aboutUG->itc_group_item)); + setting_create_Gendial_itc("dialogue/2text.3/expandable", &(aboutUG->itc_2text_3_parent)); + setting_create_Gendial_itc("dialogue/1text.1icon/expandable2", &(aboutUG->itc_1icon_1text_sub)); + setting_create_Gendial_itc("multiline/1text", &(aboutUG->itc_help_style)); + + aboutUG->itc_seperator.item_style = "dialogue/separator"; + aboutUG->itc_seperator.func.text_get = NULL; + aboutUG->itc_seperator.func.content_get = NULL; + aboutUG->itc_seperator.func.state_get = NULL; + aboutUG->itc_seperator.func.del = NULL; + + setting_view_node_set_cur_view(&setting_view_about_main); + setting_view_create(&setting_view_about_main, (void *)aboutUG); + evas_object_event_callback_add(aboutUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_about_ug_cb_resize, aboutUG); + + aboutUG->popup_showed_flag = FALSE; + return aboutUG->ly_main; +} + +static void setting_about_ug_on_start(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_about_ug_on_pause(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + SettingAboutUG *SettingAboutUG = priv; + SettingAboutUG->pause_flag = TRUE; +} + +static void setting_about_ug_on_resume(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if((!priv), "!priv"); + SettingAboutUG *aboutUG = priv; + aboutUG->pause_flag = FALSE; + + char str[MAX_DISPLAY_STR_LEN_ON_PHONE_INFO] = { 0, }; + + memset(str, 0x00, MAX_DISPLAY_STR_LEN_ON_PHONE_INFO); + if(aboutUG->item_data_wifi) + { + setting_about_main_get_wifi_mac_address_string(str, MAX_DISPLAY_STR_LEN_ON_PHONE_INFO); + aboutUG->item_data_wifi->sub_desc = (char*)g_strdup(str); + elm_object_item_data_set(aboutUG->item_data_wifi->item, aboutUG->item_data_wifi); + elm_genlist_item_update(aboutUG->item_data_wifi->item); + } + memset(str, 0x00, MAX_DISPLAY_STR_LEN_ON_PHONE_INFO); + if(aboutUG->item_data_bt) + { + setting_about_main_get_bluetooth_address_string(str, MAX_DISPLAY_STR_LEN_ON_PHONE_INFO); + aboutUG->item_data_bt->sub_desc = (char*)g_strdup(str); + elm_object_item_data_set(aboutUG->item_data_bt->item, aboutUG->item_data_bt); + elm_genlist_item_update(aboutUG->item_data_bt->item); + } +} + +/** +* on_destroy function of the UG +* +* @param ug +* @param data +* @param priv +*/ +static void setting_about_ug_on_destroy(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if((!priv), "!priv"); + SettingAboutUG *aboutUG = priv; + + evas_object_event_callback_del(aboutUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_about_ug_cb_resize); /* fix flash issue for gallery */ + aboutUG->ug = ug; + + /* delete the allocated objects. */ + setting_view_destroy(&setting_view_about_main, aboutUG); + if (NULL != ug_get_layout(aboutUG->ug)) { + evas_object_hide((Evas_Object *) ug_get_layout(aboutUG->ug)); + evas_object_del((Evas_Object *) ug_get_layout(aboutUG->ug)); + } + + SETTING_TRACE_END; +} + +static void setting_about_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; +} + +static void setting_about_ug_on_event(ui_gadget_h ug, enum ug_event event, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + 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; + case UG_EVENT_REGION_CHANGE: + break; + default: + break; + } +} + +static void setting_about_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + SettingAboutUG *ad = (SettingAboutUG *) priv; + if (!ug) + return; + + switch (event) { + case UG_KEY_EVENT_END: + { + if (elm_naviframe_top_item_get(ad->navi_bar) == + elm_naviframe_bottom_item_get(ad->navi_bar)) { + ug_destroy_me(ug); + } else { + /* elm_naviframe_item_pop(ad->navi_bar); */ + setting_view_cb_at_endKey(ad); + } + } + break; + default: + break; + } +} + +static void __about_gl_sel_expand(void *data, Evas_Object *obj, + void *event_info) +{ + /* SETTING_TRACE_BEGIN; */ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + bool status = !elm_genlist_item_expanded_get(item); + elm_genlist_item_expanded_set(item, status); +} + +/** + * @see __on_sim_get_msisdn (caller) + */ +Eina_Bool __insert_item_idler(void *data) +{ + SETTING_TRACE_BEGIN; + retv_if(!data, FALSE); + SettingAboutUG *ad = data; + if (ad->item_dev_name) //the genlist exists already. + { + SETTING_TRACE("Beging to insert items..."); + // [UI] My number + int err; + char sel_num[TAPI_SIM_XDN_DIALING_NUMBER_LEN + 1] = { 0, }; + setting_get_string_slp_key(STR_SLP_SETTING_SELECT_NUM, sel_num, &err); + + Setting_GenGroupItem_Data *item_data = NULL; + if (ad->my_numbers.count == 1) { + item_data = calloc(1, sizeof(Setting_GenGroupItem_Data)); + setting_retvm_if(!item_data, FALSE, "calloc item_data failed"); + item_data->keyStr = (char *)g_strdup("IDS_ST_BODY_MY_NUMBER"); + item_data->sub_desc = (char *)g_strdup(sel_num); + item_data->swallow_type = SWALLOW_Type_INVALID; + + item_data->item = elm_genlist_item_insert_after(ad->genlsit, &(ad->itc_2text_2), + item_data, NULL, + ad->item_dev_name->item, + ELM_GENLIST_ITEM_NONE, + NULL, NULL); + elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + } else if (ad->my_numbers.count > 1) { + setting_enable_expandable_genlist(ad->genlsit, ad, + setting_about_main_exp_cb, NULL); + item_data = calloc(1, sizeof(Setting_GenGroupItem_Data)); + setting_retvm_if(!item_data, FALSE, "calloc item_data failed"); + item_data->keyStr = (char *)g_strdup("IDS_ST_BODY_MY_NUMBER"); + item_data->sub_desc = (char *)g_strdup(sel_num); + item_data->swallow_type = SWALLOW_Type_INVALID; + + item_data->int_slp_setting_binded = STR_SLP_SETTING_SELECT_NUM; + item_data->item = elm_genlist_item_insert_after(ad->genlsit, &(ad->itc_2text_3_parent), + item_data, NULL, + ad->item_dev_name->item, + ELM_GENLIST_ITEM_TREE, + __about_gl_sel_expand, NULL); + } + } + + return FALSE; +} + +/** + * called at initialization of About UG + * @see tel_get_sim_msisdn + */ +static void __on_sim_get_msisdn(TapiHandle *handle, int result, void *data, void *user_data) +{ + SETTING_TRACE_BEGIN; + ret_if(!user_data || !data); + SettingAboutUG *ad = user_data; + TelSimAccessResult_t access_rt = result; + //TelSimMsisdnList_t *list = data; + int i =0; + + SETTING_TRACE("access_rt[%d]", access_rt); + + //#define TEST + #ifndef TEST + memcpy(&(ad->my_numbers), data, sizeof(TelSimMsisdnList_t)); + #else + TelSimMsisdnList_t r_numbers; + r_numbers.count = 3; + safeCopyStr(r_numbers.list[0].name, "n1", 30); + safeCopyStr(r_numbers.list[1].name, "n2", 30); + safeCopyStr(r_numbers.list[2].name, "n3", 30); + safeCopyStr(r_numbers.list[0].num, "1111111111", 30); + safeCopyStr(r_numbers.list[1].num, "2222222222", 30); + safeCopyStr(r_numbers.list[2].num, "3333333333", 30); + memcpy(&(ad->my_numbers), &r_numbers, sizeof(TelSimMsisdnList_t)); + #endif + + int err; + char sel_num[TAPI_SIM_XDN_DIALING_NUMBER_LEN + 1] = { 0, }; + setting_get_string_slp_key(STR_SLP_SETTING_SELECT_NUM, sel_num, &err); + + bool isFound = FALSE; + SETTING_TRACE("ad->my_numbers.count[%d]", ad->my_numbers.count); + + for (i = 0; i < ad->my_numbers.count && i < SETTING_ABOUT_MY_NUMBERS_LEN; i++) { + SETTING_TRACE("index[%d] - name[%s], num[%s]", i, ad->my_numbers.list[i].name, ad->my_numbers.list[i].num); + if (0 == safeStrCmp(sel_num, ad->my_numbers.list[i].num)) { + isFound = TRUE; + } + } + if (!isFound && ad->my_numbers.count > 0) {//if not found, set as the first num of returned-list + SETTING_TRACE("Selected-num hasn't been found, to let the first one as defalut one"); + setting_set_string_slp_key(STR_SLP_SETTING_SELECT_NUM, ad->my_numbers.list[0].num, &err); + } + + ad->tapi_responsed = TRUE; + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + setting_about_generate_genlist((void *)ad); +} + +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + SettingAboutUG *aboutUG = calloc(1, sizeof(SettingAboutUG)); + setting_retvm_if(!aboutUG, -1, "Create SettingAboutUG obj failed"); + + ops->create = setting_about_ug_on_create; + ops->start = setting_about_ug_on_start; + ops->pause = setting_about_ug_on_pause; + ops->resume = setting_about_ug_on_resume; + ops->destroy = setting_about_ug_on_destroy; + ops->message = setting_about_ug_on_message; + ops->event = setting_about_ug_on_event; + ops->key_event = setting_about_ug_on_key_event; + ops->priv = aboutUG; + ops->opt = UG_OPT_INDICATOR_ENABLE; + + // init aboutUG + + int err = 0; + int value; + setting_get_int_slp_key(INT_SLP_SETTING_SIM_SLOT, &value, &err); + if (VCONFKEY_TELEPHONY_SIM_INSERTED == value)//There is a sim card, so do display to user + { + aboutUG->handle = tel_init(NULL); + + + SETTING_TRACE("aboutUG->handle:%p", aboutUG->handle); + if (aboutUG->handle) { + SETTING_TRACE("tel_init sucessed, and there is at least one sim card, now trying to get misidns"); + if (tel_get_sim_msisdn(aboutUG->handle, __on_sim_get_msisdn, aboutUG) == TAPI_API_SUCCESS) { + SETTING_TRACE("tel_get_sim_msisdn sent"); + } + } + } + else + { + SETTING_TRACE_DEBUG("There is no sim card, so skip getting misidns"); + } + return 0; +} + +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + SettingAboutUG *aboutUG; + setting_retm_if(!ops, "ops == NULL"); + + aboutUG = ops->priv; + if (aboutUG) { + if (aboutUG->handle + && tel_deinit(aboutUG->handle) == TAPI_API_SUCCESS) { + SETTING_TRACE("tel_deinit sucessed"); + } + FREE(aboutUG); + } +} + +/* *************************************************** + ** + **general func + ** + ****************************************************/ +void setting_about_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode, + void *priv) +{ + SettingAboutUG *ad = (SettingAboutUG *) priv; + Evas_Object *base; + + if (!priv) + return; + SETTING_TRACE_BEGIN; + + base = (Evas_Object *) ug_get_layout(ug); + if (!base) + return; + + switch (mode) { + case UG_MODE_FULLVIEW: + evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + //elm_win_resize_object_add(ad->win_get, base); + evas_object_show(base); + break; + default: + break; + } + + SETTING_TRACE_END; +} + +static void __setting_about_sub_list_sel_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *subitem = (Elm_Object_Item *) event_info; + Elm_Object_Item *parentItem = elm_genlist_item_parent_get(subitem); + elm_genlist_item_selected_set(subitem, 0); + Setting_GenGroupItem_Data *data_subItem = elm_object_item_data_get(subitem); + Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); /* parent data */ + ret_if(NULL == data_subItem || NULL == data_parentItem); + + + int err; + setting_set_string_slp_key(data_parentItem->int_slp_setting_binded, data_subItem->keyStr, &err); + setting_retm_if(0 != err, "Set vconf error[%d]",data_parentItem->int_slp_setting_binded); + + data_parentItem->sub_desc = (char *)g_strdup(_(data_subItem->keyStr)); + elm_object_item_data_set(data_parentItem->item, data_parentItem); + elm_genlist_item_update(data_parentItem->item); + elm_radio_value_set(data_subItem->rgd, data_subItem->chk_status); +} + +static void __setting_about_sub_list_rd_change(void *data, Evas_Object *obj, void *event_info) + +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + + Elm_Object_Item *subItem = list_item->item; + Elm_Object_Item *parentItem = elm_genlist_item_parent_get(subItem); + + Setting_GenGroupItem_Data *data_subItem = elm_object_item_data_get(subItem); /* subItem data */ + Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); /* parent data */ + ret_if(NULL == data_subItem || NULL == data_parentItem); + + int err; + setting_set_string_slp_key(data_parentItem->int_slp_setting_binded, data_subItem->keyStr, &err); + + ret_if(0 != err); + data_parentItem->sub_desc = (char *)g_strdup(_(data_subItem->keyStr)); + elm_object_item_data_set(data_parentItem->item, data_parentItem); + elm_genlist_item_update(data_parentItem->item); + elm_radio_value_set(obj, data_subItem->chk_status); +} + +void setting_about_main_exp_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + setting_retm_if(event_info == NULL, "event_info parameter is NULL"); + + SettingAboutUG *ad = (SettingAboutUG *) data; + Elm_Object_Item *parentItem = event_info; /* parent item */ + Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); + Evas_Object *scroller = elm_object_item_widget_get(parentItem); + + Evas_Object *rgd = elm_radio_add(scroller); + elm_radio_value_set(rgd, -1); + + int err; + char sel_num[TAPI_SIM_XDN_DIALING_NUMBER_LEN + 1] = { 0, }; + setting_get_string_slp_key(data_parentItem->int_slp_setting_binded, sel_num, &err); + SETTING_TRACE("binded: %d, checked: %s, err: %d", data_parentItem->int_slp_setting_binded, sel_num, err); + + int i = 0; + int sel_idx = -1; + Setting_GenGroupItem_Data *item_data = NULL; + + for(; i < ad->my_numbers.count; i++) { + if (ad->my_numbers.list[i].num[0] == '\0') { + break; + } + + if (sel_idx == -1 && 0 == safeStrCmp(sel_num, ad->my_numbers.list[i].num)) { + sel_idx = i; + } + item_data = setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + __setting_about_sub_list_sel_cb, ad, parentItem, + SWALLOW_Type_1RADIO, rgd, + i, + ad->my_numbers.list[i].num, __setting_about_sub_list_rd_change); + if (item_data) { + item_data->userdata = ad; + } else { + SETTING_TRACE_ERROR("item_data is NULL"); + } + } + + elm_radio_value_set(rgd, sel_idx); +} + + +/** +* Reset function to 'reset' the settings of the UG, it will be invoked by 'Reset' UG +* +* @param[in] data +* @param[in] priv +*/ +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; +#if SUPPORT_RUN_SYSTEM_COMMAND + return excuteCmd(SETTING_POSTINST_FILE, 1, "about"); +#else + return vconf_set_str(VCONFKEY_SETAPPL_DEVICE_NAME_STR, SETTING_ABOUT_DEFAULT_DEVICE_NAME); +#endif +} + + diff --git a/setting-common/CMakeLists.txt b/setting-common/CMakeLists.txt new file mode 100755 index 0000000..0091f48 --- /dev/null +++ b/setting-common/CMakeLists.txt @@ -0,0 +1,68 @@ +#set variable +# LIB_SETTING_COMMON_RESOURCE - setting-common-resource +# LIB_SETTING_COMMON_DRAW_WIDGET - setting-common-draw-widget +# LIB_SETTING_COMMON_VIEW - setting-common-view +# LIB_SETTING_COMMON_DATA - setting-common-data + +#add sub directory +#ADD_SUBDIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/${LIB_SETTING_COMMON_RESOURCE}) +#ADD_SUBDIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/${LIB_SETTING_COMMON_DRAW_WIDGET}) +#ADD_SUBDIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/${LIB_SETTING_COMMON_VIEW}) +#ADD_SUBDIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/${LIB_SETTING_COMMON_DATA}) + +#INSTALL( +# DIRECTORY "include" DESTINATION /usr/local/include +# FILES_MATCHING +# PATTERN "*.h" +# ) + + +# LIB_SETTING_COMMON - setting-common + +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) +PROJECT(${LIB_SETTING_COMMON}) + +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_common_data REQUIRED utilX appcore-efl elementary vconf openssl evas ecore ecore-imf json-glib-1.0 edje glib-2.0 libxml-2.0 ui-gadget-1 capi-appfw-application capi-system-info capi-system-system-settings) + +FOREACH(flag ${pkgs_common_data_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") +ADD_DEFINITIONS("-fpie") + +#SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl, --rpath=/usr/lib") + +#make lib-${LIB_SETTING_COMMON}.so files +ADD_LIBRARY(${LIB_SETTING_COMMON} SHARED + ./src/setting-common-data-slp-setting.c + ./src/setting-common-resource.c + ./src/setting-common-view.c + ./src/setting-common-draw-widget.c + ./src/setting-common-draw-searchbar.c + ./src/setting-common-draw-popup.c + ./src/setting-common-draw-naviframe.c + ./src/setting-common-draw-genlist.c + ./src/setting-common-general-func.c + ./src/setting-cfg.c +) + +TARGET_LINK_LIBRARIES(${LIB_SETTING_COMMON} ${pkgs_common_data_LDFLAGS}) +SET_TARGET_PROPERTIES(${LIB_SETTING_COMMON} PROPERTIES VERSION 0.1.0 SOVERSION 1) +INSTALL(TARGETS ${LIB_SETTING_COMMON} DESTINATION /usr/apps/${SETTING_PKG_NAME}/lib) + + + + diff --git a/setting-common/include/setting-cfg.h b/setting-common/include/setting-cfg.h new file mode 100755 index 0000000..8b37275 --- /dev/null +++ b/setting-common/include/setting-cfg.h @@ -0,0 +1,132 @@ +/* + * setting + * Copyright (c) 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://floralicense.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. + */ +/** + *@defgroup setting-cfg + *configuration file management. + *Setting app is based on JSON scripting for configuration management. + */ + +#ifndef __SETTING_CFG_H__ +#define __SETTING_CFG_H__ + +#include +#include +#include +#include + +/*****/ +typedef enum _Cfg_Item_Type { + Cfg_Item_Pos_Uninstall = -1, + Cfg_Item_Pos_Level0 = 0, + Cfg_Item_Pos_Level1 = 1, + Cfg_Item_Pos_Level_All = 2, +} Cfg_Item_Position; + + +typedef enum _Cfg_Item_Reset_Type { + Cfg_Item_unResetable = 0, + Cfg_Item_Resetable = 1, +} Cfg_Item_Reset_Type; + +typedef enum _cfg_error_type { + Cfg_Error_Type_Sucess = 0, + Cfg_Error_Type_CreateCfg_Failed = -1, + Cfg_Error_Type_Mkdir_Failed = -2, + Cfg_Error_Type_RemoveCfg_Failed = -3, + Cfg_Error_Type_ReadCfg_Failed = -4, + Cfg_Error_Type_DirPermissionDenied = -5, + Cfg_Error_Type_FilePermissionDenied = -6, +} Cfg_Error_Type; + +typedef struct { + char *key_name; + char *item_name; + char *icon_path; + char *ug_args; + int pos; + int click_times; +} Setting_Cfg_Node_T; + + +int setting_cfg_create(void); + +void setting_cfg_print(void); + +char* setting_cfg_get_path(); + +int setting_cfg_init(void); + +void setting_cfg_exit(void); + +int setting_cfg_file_update(void); + +int setting_cfg_get_category_length(void); + +char *setting_cfg_get_category_name(int category_index); + +char *setting_cfg_get_category_display_name(int category_index); + +void setting_cfg_set_category_display_name(int category_index, char *newstring); + +int setting_cfg_get_menu_length(int category_index); + +char *setting_cfg_get_string_field_idx(int category_index, int menu_index, + char *field_name); + +int setting_cfg_get_int_field_idx(int category_index, int menu_index, + char *field_name); + +char *setting_cfg_get_icon_path_idx(int category_index, int menu_index); + +char *setting_cfg_get_ug_args_idx(int category_index, int menu_index); + +char *setting_cfg_get_keyname_idx(int category_index, int menu_index); + +char *setting_cfg_get_ugpath_idx(int category_index, int menu_index); + +char *setting_cfg_get_ugpath(char *keyname); + +int setting_cfg_get_pos_idx(int category_index, int menu_index); + +int setting_cfg_get_pos(char *keyname); + +void setting_cfg_set_pos_idx(int category_index, int menu_index, int pos); + +void setting_cfg_set_pos(char *keyname, int pos); + +int setting_cfg_get_click_times_idx(int category_index, int menu_index); + +int setting_cfg_get_click_times(char *keyname); + +void setting_cfg_set_click_times_idx(int category_index, int menu_index, + int click_times); + +void setting_cfg_set_click_times(char *keyname, int click_times); + +int setting_cfg_get_resetable_flag_idx(int category_index, int menu_index); + +void setting_cfg_add_downloaded_app(char *keyname, char *icon_path, + char *ug_args, int pos); + +void setting_cfg_remove_downloaded_app(char *keyname); + + +extern char *get_ug_path_from_ug_args(void *data); +extern service_h get_bundle_from_ug_args(void *data); +extern bool is_ug_installed_by_ug_args(void *data); + +#endif diff --git a/setting-common/include/setting-common-data-edj-define.h b/setting-common/include/setting-common-data-edj-define.h new file mode 100755 index 0000000..7b9ecd5 --- /dev/null +++ b/setting-common/include/setting-common-data-edj-define.h @@ -0,0 +1,35 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_COMMON_DATA_EDJ_DEFINE_H__ +#define __SETTING_COMMON_DATA_EDJ_DEFINE_H__ +//Cnnot be fixed when select multiple resolution +#define ITEM_X_DEN (480.0) +#define ITEM_Y_DEN (90.0) +#define ITEM_Y_DEN2 (60.0) +#define MAIN_Y_DEN (800.0) + +//wallpaper +#define TITLE_AREA_H 150 +#define BOTTOM_BAR_AREA_H 114 +#define HD_HEIGHT 1280 +#define WALLPAPER_LAYOUT_H ((HD_HEIGHT)-(TITLE_AREA_H)-(BOTTOM_BAR_AREA_H)) + +//"personal_vib_layout" +#define TOP_AREA_H 158 +#define PERSONAL_VIBRATION_LAYOUT_H ((HD_HEIGHT)-(TOP_AREA_H)-(BOTTOM_BAR_AREA_H)) + +#endif /* __SETTING_COMMON_DATA_EDJ_DEFINE_H__ */ diff --git a/setting-common/include/setting-common-data-error.h b/setting-common/include/setting-common-data-error.h new file mode 100755 index 0000000..a1cf872 --- /dev/null +++ b/setting-common/include/setting-common-data-error.h @@ -0,0 +1,102 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_COMMON_DATA_ERROR_H__ +#define __SETTING_COMMON_DATA_ERROR_H__ + +#define SETTING_RETURN_SUCCESS 1 +#define SETTING_RETURN_FAIL -1 + +/* general error (start 2)*/ +typedef enum { + SETTING_GENERAL_ERR_WRONG_PARAMETER = 2, + SETTING_GENERAL_ERR_NOT_FIND_VALUE_SWITCH, + SETTING_GENERAL_ERR_NULL_DATA_PARAMETER, + SETTING_GENERAL_ERR_SGCONTROLLER_NULL +} setting_general_error; + +/* draw error (start 100)*/ +typedef enum { + SETTING_DRAW_ERR_FAIL_LOAD_EDJ = 100, + SETTING_DRAW_ERR_FAIL_TITLEBAR, + SETTING_DRAW_ERR_FAIL_SCROLLER, + SETTING_DRAW_ERR_FAIL_CLIENTBOX, + SETTING_DRAW_ERR_FAIL_SOFTKEY, + SETTING_DRAW_ERR_FAIL_LIST, + + SETTING_ENTRY_RETURN_NULL_STR_ERR, + SETTING_ENTRY_NOT_MATCH_CURRENT_PW, + SETTING_ENTRY_NOT_MATCH_NEW_CONF_PW, + SETTING_ENTRY_REQUIRED_4_TO_8_DIGIT_PW, + SETTING_ENTRY_REQUIRED_CORRECT_DIGIT_PW, +} setting_draw_error; + +/* time error (start 200)*/ + +/* ps & view error (start 300)*/ +typedef enum { + SETTING_PS_FORK_ERR = 300, + SETTING_PS_EXECV_ERR +} setting_ps_view_error; + +/* file IO error (start 400)*/ +typedef enum { + SETTING_IO_NOT_OPEN_FILE = 400, + SETTING_IO_IOCTL_ERR +} setting_IO_error; + +/* network error (start 500)*/ +typedef enum { + SETTING_TAPI_SIM_TYPE_ERR = 500, + SETTING_TAPI_INIT_ECORE_ERR, + SETTING_TAPI_DEINIT_ECORE_ERR, + SETTING_TAPI_REG_EVENT_ECORE_ERR, + SETTING_TAPI_DEREG_EVENT_ECORE_ERR, + SETTING_TAPI_UNKNOWN_SIM_TYPE, + SETTING_TAPI_SIM_GET_PIN1_ERR, + SETTING_TAPI_SIM_GET_PIN2_ERR, + SETTING_TAPI_SIM_PIN1_STATUS_ERR, + SETTING_DNET_RETURN_NULL_ACCESS_NAME, + SETTING_DNET_RETURN_NULL_USER_NAME, + SETTING_DNET_RETURN_NULL_PASSWORD, + SETTING_DNET_RETURN_NULL_PROXY_ADDR, + SETTING_DNET_RETURN_NULL_PROXY_PORT, + SETTING_DNET_RETURN_NULL_HOMEURL, + SETTING_DNET_RETURN_ERR, + SETTING_DNET_RETURN_INVALID_PROXY_ADDR +} setting_net_error; + +/* vconf error (start 600)*/ +typedef enum { + SETTING_VCONF_ERR_RETURN_STR_NULL = 600, + SETTING_VCONF_ERR_RETURN_INVALID_INT +} setting_vconf_error; + +/* multi media error (start 700)*/ +typedef enum { + SETTING_MMPLAYER_STOP_ERR = 700, + SETTING_MMPLAYER_UNREALIZE_ERR, + SETTING_MMPLAYER_DESTROY_ERR, + SETTING_MMPLAYER_CREATE_ERR, + SETTING_MMPLAYER_SETATTRS_ERR, + SETTING_MMPLAYER_REALIZE_ERR, + SETTING_MMPLAYER_START_ERR, + SETTING_MMPLAYER_SET_VOLUME_ERR, + SETTING_MMPLAYER_NOT_FOUND_SOUND_FILE +} setting_mm_error; + +#endif /* __SETTING_COMMON_DATA_ERROR_H__ */ diff --git a/setting-common/include/setting-common-data-slp-setting.h b/setting-common/include/setting-common-data-slp-setting.h new file mode 100755 index 0000000..306e8f5 --- /dev/null +++ b/setting-common/include/setting-common-data-slp-setting.h @@ -0,0 +1,242 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_COMMON_DATA_SLP_SETTING_H__ +#define __SETTING_COMMON_DATA_SLP_SETTING_H__ + +#include +#include + +#define SETTING_STR_SLP_LEN 256 +#define VCONFKEY_SETAPPL_USE_PACKET_DATA_BOOL VCONFKEY_SETAPPL_PREFIX"/use_packet_data" +#define VCONFKEY_LCD_TIMEOUT_NORMAL_BACKUP VCONFKEY_SETAPPL_PREFIX"/lcd_timeout_normal_backup" +#define VCONFKEY_SETAPPL_SIM_LANGUAGE_STR "memory/setting/sim_language" + +#define VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME "db/setting/accessibility/font_name" +#define VCONFKEY_SETAPPL_ACCESSIBILITY_TTS "db/setting/accessibility/tts" + + +//intenel +#define VCONFKEY_SETAPPL_SELECT_OLD_NT_ACT "db/setting/select_network_act" + +/** @todo verify if the below keys need to be added in libslp-setting*/ + +// added 11.07.11 +#define VCONFKEY_SETAPPL_STATE_PARENTAL_MODE_BOOL VCONFKEY_SETAPPL_PREFIX"/parental_mode" + +#define VCONFKEY_SETAPPL_SET_DATA_USAGE_LIMIT_BOOL VCONFKEY_SETAPPL_PREFIX"/set_data_usage_limit" +#define VCONFKEY_SETAPPL_DATA_LIMIT_INT VCONFKEY_SETAPPL_PREFIX"/data_limit" +#define VCONFKEY_SETAPPL_DATA_USAGE_CYCLE_INT VCONFKEY_SETAPPL_PREFIX"/data_usage_cycle" +#define VCONFKEY_SETAPPL_DATA_EACH_MONTH_INT VCONFKEY_SETAPPL_PREFIX"/data_each_month" + +#define VCONFKEY_SETAPPL_TAP_TWIST VCONFKEY_SETAPPL_PREFIX"/motion/tap_twist" + +// Screen Mode +#define VCONFKEY_SETAPPL_SCREENMODE_SELNAME VCONFKEY_SETAPPL_PREFIX"/screenmode/selected_name" + +//Smart actions +#define VCONFKEY_SETAPPL_BOOL_AUTO_ADJUST_SCREEN_TONE VCONFKEY_SETAPPL_PREFIX"/auto_adjust_screen_tone" + +//Driving Mode(DM) +#define VCONFKEY_SETAPPL_DM_DRIVING_MODE VCONFKEY_SETAPPL_PREFIX"/drivingmode/drivingmode" +#define VCONFKEY_SETAPPL_DM_INCOMING_CALL VCONFKEY_SETAPPL_PREFIX"/drivingmode/incomingcall" +#define VCONFKEY_SETAPPL_DM_MESSAGE VCONFKEY_SETAPPL_PREFIX"/drivingmode/message" +#define VCONFKEY_SETAPPL_DM_EMAIL VCONFKEY_SETAPPL_PREFIX"/drivingmode/newemails" +#define VCONFKEY_SETAPPL_DM_VOICEMAIL VCONFKEY_SETAPPL_PREFIX"/drivingmode/newvoicemails" +#define VCONFKEY_SETAPPL_DM_ALARM VCONFKEY_SETAPPL_PREFIX"/drivingmode/alarm" +#define VCONFKEY_SETAPPL_DM_SCHEDULE VCONFKEY_SETAPPL_PREFIX"/drivingmode/schedule" +#define VCONFKEY_SETAPPL_DM_UNLOCK_SCREEN VCONFKEY_SETAPPL_PREFIX"/drivingmode/unlockscreen" + +// Smart screen -> smart rotation +#define VCONFKEY_SETAPPL_SMARTSCREEN_SMART_ROTATION VCONFKEY_SETAPPL_PREFIX"/smartscreen/smart_rotation" +#define VCONFKEY_SETAPPL_SMARTSCREEN_SMARTSTAY_STATUS_REMINDER VCONFKEY_SETAPPL_PREFIX"/smartscreen/smart_stay_r" +#define VCONFKEY_SETAPPL_SMARTSCREEN_SMARTROTATE_STATUS_REMINDER VCONFKEY_SETAPPL_PREFIX"/smartscreen/smart_rotation_r" + +//about phone ug +#define VCONFKEY_SETAPPL_SELECTED_NUM VCONFKEY_SETAPPL_PREFIX"/selected_num" + +typedef enum { + /* display and light */ + INT_SLP_SETTING_LCD_BRIGHTNESS = 0, /* the value set by manul */ + INT_SLP_SETTING_LCD_TIMEOUT_NORMAL, + INT_SLP_SETTING_LCD_TIMEOUT_NORMAL_BACKUP, + + INT_SLP_SETTING_AUTOMATIC_BRIGHTNESS, /* set by manul or not. 0:manul, 1:not */ + + INT_SLP_SETTING_SELECT_NETWORK, + INT_SLP_SETTING_NETWORK_MODE, + INT_SLP_SETTING_REGIONFORMAT_TIME1224, + INT_SLP_SETTING_DATE_FORMAT, + INT_SLP_SETTING_WEEK_FORMAT, + /* CALL_ALERT_TYPE */ + //INT_SLP_SETTING_CALL_ALERT_TYPE, + //INT_SLP_SETTING_NORMAL_CALL_ALERT_TYPE, + //INT_SLP_SETTING_SILENT_CALL_ALERT_TYPE, + //INT_SLP_SETTING_DRIVING_CALL_ALERT_TYPE, + //INT_SLP_SETTING_MEETING_CALL_ALERT_TYPE, + //INT_SLP_SETTING_OUTDOOR_CALL_ALERT_TYPE, + /* CALL_ALERT_VIB */ + INT_SLP_SETTING_CALL_ALERT_VIB, + //INT_SLP_SETTING_NORMAL_CALL_ALERT_VIB, + //INT_SLP_SETTING_SILENT_CALL_ALERT_VIB, + //INT_SLP_SETTING_DRIVING_CALL_ALERT_VIB, + //INT_SLP_SETTING_MEETING_CALL_ALERT_VIB, + //INT_SLP_SETTING_OUTDOOR_CALL_ALERT_VIB, + + /*****/ + //INT_SLP_SETTING_CALL_ALERT_VOLUME, + /* MSG_ALERT_TYPE */ + //INT_SLP_SETTING_MSG_ALERT_TYPE, + //INT_SLP_SETTING_NORMAL_MSG_ALERT_TYPE, + //INT_SLP_SETTING_SILENT_MSG_ALERT_TYPE, + //INT_SLP_SETTING_DRIVING_MSG_ALERT_TYPE, + //INT_SLP_SETTING_MEETING_MSG_ALERT_TYPE, + //INT_SLP_SETTING_OUTDOOR_MSG_ALERT_TYPE, + /* MSG_ALERT_VIB */ + //INT_SLP_SETTING_MSG_ALERT_VIB, + //INT_SLP_SETTING_NORMAL_MSG_ALERT_VIB, + //INT_SLP_SETTING_SILENT_MSG_ALERT_VIB, + //INT_SLP_SETTING_DRIVING_MSG_ALERT_VIB, + //INT_SLP_SETTING_MEETING_MSG_ALERT_VIB, + //INT_SLP_SETTING_OUTDOOR_MSG_ALERT_VIB, + + /*****/ + INT_SLP_SETTING_MSG_ALERT_REPEAT, + INT_SLP_SETTING_EMAIL_ALERT_REPEAT, + + /*****/ + //INT_SLP_SETTING_MSG_ALERT_VOLUME, + //INT_SLP_SETTING_SYS_TOUCH_SOUND, + //INT_SLP_SETTING_SYS_TOUCH_SOUND_VOLUME, + INT_SLP_SETTING_FONT_SIZE, + INT_SLP_SETTING_FONT_TYPE, + INT_SLP_SETTING_LANG, + INT_SLP_SETTING_BT_STATUS, + INT_SLP_SETTING_WIFI_STATUS, + INT_SLP_SETTING_ROAMING_NETWORK, + INT_SLP_SETTING_USB_MODE, +#ifdef UNUSED_VCONFKEY + INT_SLP_SETTING_TASKSWITCHER_VIEWTYPE, +#endif + /* memory */ + INT_SLP_SETTING_DEFAULT_MEM_WAP, + INT_SLP_SETTING_DEFAULT_MEM_BLUETOOTH, + INT_SLP_SETTING_DEFAULT_MEM_CAMERA, + INT_SLP_SETTING_DEFAULT_MEM_VOICE_RECORDER, + INT_SLP_SETTING_DEFAULT_MEM_FM_RADIO, + INT_SLP_SETTING_DEFAULT_MEM_ALL_SHARE, + INT_SLP_SETTING_DEFAULT_MEM_ADOBE_AIR, + INT_SLP_SETTING_DEFAULT_MEM_DVB_H, + + /* other module */ + INT_SLP_SETTING_SIM_SLOT, + INT_SLP_SETTING_PHONE_LOCK_ATTEMPTS_LEFT, + INT_SLP_SETTING_SIM_LOCK_ATTEMPTS_LEFT, + + // accessibility setting + INT_SLP_SETTING_ACCESSIBILITY_ENABLE_AUTO_ANSWER, + INT_SLP_SETTING_ACCESSIBILITY_FONT_SIZE, +#if SUPPORT_FONT_STYLE + INT_SLP_SETTING_ACCESSIBILITY_FONT_STYLE, +#endif + INT_SLP_SETTING_ACCESSIBILITY_AUTO_ANSWER, + INT_SLP_SETTING_ACCESSIBILITY_POWER_KEY_HOLD, + + //powersaving + INT_SLP_SETTING_POWERSAVING_AT, + INT_SLP_SETTING_POWERSAVING_SCREEN_TIMEOUT, + + // developer option > Limit background process + INT_SLP_SETTING_DEVOPTION_BGPROCESS, + + INT_SLP_SETTING_DATAUSAGE_DATA_EACH_MONTH_INT, + SETTING_INT_SLP_LIST_MAX +} setting_int_slp_list; + +typedef enum { + + BOOL_SLP_SETTING_POWER_ON_LOCK = 0, + BOOL_SLP_SETTING_SIMPLE_PASSWORD, + + BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE, + + BOOL_SLP_SETTING_TRANSACTION_TRACKING, + BOOL_SLP_SETTING_EXPIRY_REMINDER, + + BOOL_SLP_SETTING_FLIGHT_MODE, + BOOL_SLP_SETTING_DATA_ROAMING, + BOOL_SLP_SETTING_NFC_STATUS, + BOOL_SLP_SETTING_USE_PACKET_DATA, + + BOOL_SLP_SETTING_ACCESSIBILITY_HIGH_CONTRAST, + BOOL_SLP_SETTING_ACCESSIBILITY_SCREEN_ZOOM, + BOOL_SLP_SETTING_ACCESSIBILITY_ASSISTIVE_LIGHT, + BOOL_SLP_SETTING_ACCESSIBILITY_MONO_AUDIO, + BOOL_SLP_SETTING_ACCESSIBILITY_LED_NOTIFY, + BOOL_SLP_SETTING_ACCESSIBILITY_ACCEPT_CALL, + BOOL_SLP_SETTING_ACCESSIBILITY_POWERKEY_END_CALLS, + + /* end */ + SETTING_BOOL_SLP_LIST_MAX +} setting_bool_slp_list; + +typedef enum { + STR_SLP_LIST_PHONE_PASSWORD = 0, + STR_SLP_SETTING_PHONE_LOCK_TIMESTAMP, + STR_SLP_SETTING_SIM_LOCK_TIMESTAMP, + STR_SLP_SETTING_SELECT_NUM, + STR_SLP_LIST_MAX +} setting_str_slp_list; + +typedef struct _Vconf_Change_Node +{ + const char *in_key; + vconf_callback_fn cb; + void *cb_data; +}Vconf_Change_Node; +#define DEREGISTER_VCONFS(listened_list) setting_destory_listen_list(&(listened_list)) +#define REGISTER_VCONF_NODE(listened_list,vconf,cb,data) setting_add_listen_node(&(listened_list),vconf,cb,data) + +extern void setting_destory_listen_list(Eina_List **listened_list); +extern bool setting_add_listen_node(Eina_List **listened_list,const char *vconf, vconf_callback_fn cb, void *data); + +extern int setting_set_int_slp_key(setting_int_slp_list key, int value, + int *err); +extern int setting_get_int_slp_key(setting_int_slp_list key, int *value, + int *err); +extern int setting_set_bool_slp_key(setting_bool_slp_list key, int value, + int *err); +extern int setting_get_bool_slp_key(setting_bool_slp_list key, int *value, + int *err); +extern int setting_set_string_slp_key(setting_str_slp_list key, char *value, + int *err); +extern int setting_get_string_slp_key(setting_str_slp_list key, char *value, + int *err); +extern int setting_store_init_password(char *in); +extern int setting_read_password(char *md_result); +extern int setting_compare_password(char *md_result, const char *in_later); +extern setting_lang_entry* setting_get_language_table(); +extern Eina_List* setting_get_language_list(); +extern void setting_get_language_list_destroy(); + +// export function +typedef int (*status_handler_fp)(int total, int current, void* data); +extern void setting_export(status_handler_fp fp, void* data); +extern void setting_import(status_handler_fp fp, void* data); + +#endif /* __SETTING_COMMON_DATA_SLP_SETTING_H__ */ diff --git a/setting-common/include/setting-common-data-type.h b/setting-common/include/setting-common-data-type.h new file mode 100755 index 0000000..7cc3dc9 --- /dev/null +++ b/setting-common/include/setting-common-data-type.h @@ -0,0 +1,350 @@ +/* + * setting + * Copyright (c) 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://floralicense.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. + */ + +/** + *@defgroup common-data-type + *common data type + */ + +#ifndef __SETTING_COMMON_DATA_TYPE_H__ +#define __SETTING_COMMON_DATA_TYPE_H__ + +#include /* including Elementary lib */ +#include /* including debuging type */ +#include /* including one class of data type */ +#include /* including another class of data type */ + +#ifndef PREFIX +#define PREFIX "/opt" +#endif + +#ifndef bool +#define bool Eina_Bool +#endif +#define PWD_FILE "/opt/data/setting/set_info" +//#define PLUGIN_CFG_DIR "/opt/data/setting/plugin-cfg" +#define PLUGIN_CFG_DIR "/opt/data/setting/plugin-xml" + +#define SETTING_POSTINST_FILE "/var/lib/dpkg/info/org.tizen.setting.postinst" +#define SETTING_PACKAGE "setting" +#define SYSTEM_PACKAGE "sys_string" +#define SETTING_LOCALEDIR "/usr/apps/org.tizen.setting/res/locale" + +#define SYSTEM_ICON_PATH "/usr/apps/org.tizen.setting/res/icons" +#define SETTING_ICON_PATH "/usr/apps/org.tizen.setting/res/icons" +#define SETTING_UG_ICON_PATH "/usr/ug/res/icon/org.tizen.setting" +#define SETTING_UG_PATH "/usr/ug/lib" +#define SETTING_UG_PATH_USR "/usr/ug/lib" + +#define SETTING_UG_PATH_OPT "/opt/ug/lib" +#define SETTING_UG_PATH_USR_OPT "/opt/ug/lib" + +#define SETTING_EDJ_PATH EDJDIR +#define SETTING_MEMORY_EDJ_NAME SETTING_EDJ_PATH"/setting-memory.edj" +#define SETTING_THEME_EDJ_NAME SETTING_EDJ_PATH"/setting-theme.edj" +#define SETTING_SOUND_EDJ_NAME SETTING_EDJ_PATH"/setting-sound.edj" + +/* inoti (broadcasting without data */ +#define SETTING_TIME_CHANGED "setting_time_changed" + +/* anci c color type */ +#define SETTING_FONT_RED "\033[31m" +#define SETTING_FONT_BLACK "\033[0m" +#define SETTING_FONT_BGREEN "\033[36m" + +#define THEME_STYLE "beat" + +#define IMG_EC_ARROW_OPEN SETTING_ICON_PATH"/00_button_expand_opened.png" +#define IMG_EC_ARROW_CLOSE SETTING_ICON_PATH"/00_button_expand_closed.png" + +#define SETTING_IDLE_IMAGE_PATH "/etc/idle_image/" + +#define NAVI_DEF_BUTTON_STYLE "naviframe/toolbar/default"//"naviframe_control/default" +#define NAVI_BACK_BUTTON_STYLE "naviframe/back_btn/default" + +#define NAVI_CONTROLBAR_PART "controlbar" + +#define BTN_STYLE_DEF "naviframe/title/default" +#define NAVI_BTN_STYLE_LEFT "title_left_btn" +#define NAVI_BTN_STYLE_RIGHT "title_right_btn" +#define NAVI_BTN_STYLE_MORE "title_more_btn" +#define NAVI_BTN_STYLE_PREV "prev_btn" + +#define SETTING_FONT_CONF_FILE "/opt/etc/fonts/conf.avail/99-slp.conf" + + +//#define GENLIST_LIST_SUB_TEXT_SETTINGS_COLOR_STYLE "#3B73B6FF" +#define BLUE_COLOR "#3B73B6" //3B73B6FF <== 59 115 182 255 +#define GRAY_COLOR "#7B7B7B" +#define RED_COLOR "#FF0000" + +/** +* @brief slider, button, and etc. +* +* @param data application context +* @param obj Evas Object +* @param event_info even type +* +* @return vo return +*/ +typedef void (*setting_call_back_func) (void *data, Evas_Object *obj, void *event_info); + +#define WIDGET_SCALE_FACTOR (get_widgets_factor()) +#define SETTING_PADDING_WIDTH (8 * WIDGET_SCALE_FACTOR) +#define SETTING_PADDING_HEIGHT (8 * WIDGET_SCALE_FACTOR) +#define SETTING_HALF_SCREEN_WIDTH \ + (SETTING_PADDING_WIDTH * 22 * WIDGET_SCALE_FACTOR) + +#define SYS_NOTI_NAME_LEN 128 +#define MAX_DISPLAY_NAME_LEN_ON_UI 128 +#define MAX_COMMON_BUFFER_LEN 1024 + +#define MAX_SEARCH_STR_LEN 20 + +#define HELP_MSG_BUFF_SIZE 1000 +#define MAX_SPECIALIZITION_LEN 1000 +#define SPECIALIZITION_FONT 25 +#define HELP_TITLE_SIZE 30 +#define HELP_CONTENT_SIZE 28 + +#define PHONE_LOCK_ATTEMPS_MAX 5 +#define SIM_LOCK_ATTEMPS_MAX 5 +#define PHONE_LOCK_BLOCK_SECONDS 30 +#define SIM_LOCK_BLOCK_SECONDS 30 +#define LOCK_TIMESTAMP_LEN 64 +#define MAX_DATETIME_FORMAT_LEN 64 +#define MAX_DATE_FORMAT_LEN 10 + +#define SMALL_FONT_DPI (-80) +#define MIDDLE_FONT_DPI (-100) +#define LARGE_FONT_DPI (-144) +#define HUGE_FONT_DPI (-184) +#define GIANT_FONT_DPI (-240) + +#define LABEL_FONT_SIZE_SMALL 24 +#define LABEL_FONT_SIZE_NORMAL 35 +#define LABEL_FONT_SIZE_LARGE 55 +#define LABEL_FONT_SIZE_HUGE 75 +#define LABEL_FONT_SIZE_GIANT 92 + +#define __STR_EMUL "emul" +#define __LEN_STR_EMUL 4 + +#define MAX_SYSTEM_SERVICE_NUM 30 +#define SYSTEM_SERVICE_LIST_PATH "/opt/osp/system/configuration/system-services.list" +#define MAX_PKG_NAME_LEN 128 + +typedef struct +{ + char* locale; // ex) "en_US.UTF" + char* title; // "United Kingdom" + int number; // no - UI +} setting_lang_entry; + + + +typedef enum _Theme_Type { + Theme_Invalid = -1, + Theme_Tizen = 0, + Theme_Tizen_Black = 1, + Theme_Tizen_Blue, + Theme_ERROR +} Theme_Type; + +typedef enum _GENDIAL_Type { + GENDIAL_Type_1text_1icon_2 = 0, + GENDIAL_Type_1text_2icon = 1, + GENDIAL_Type_1icon_2text = 2, + GENDIAL_Type_2text_2icon_4 = 3, + GENDIAL_Type_1text_2icon_2 = 4, + GENDIAL_Type_2text_2icon_3 = 5, + GENDIAL_Type_sel_all, + + GENDIAL_Type_1line_icontext, + GENDIAL_Type_group_item, + GENDIAL_Type_2text_3, + GENDIAL_Type_MAX +} GENDIAL_Type; + +typedef enum _SWALLOW_Type { + SWALLOW_Type_INVALID = -1, + SWALLOW_Type_2ICON = 0, + SWALLOW_Type_1ICON_1CHECK = 1, + SWALLOW_Type_1ICON_1RADIO = 2, + SWALLOW_Type_1CHECK = 3, + SWALLOW_Type_1CHECKICON = 4, + SWALLOW_Type_1RADIO = 5, + SWALLOW_Type_1TOGGLE = 6, + SWALLOW_Type_1ICON_1PROCESS, + SWALLOW_Type_MULTILINE_1TOGGLE, + + SWALLOW_Type_1ICON_1IMAGE, + SWALLOW_Type_1BUTTON, + SWALLOW_Type_1PROCESS, + + SWALLOW_Type_1RADIO_SUB, + SWALLOW_Type_1RADIO_1PROCESS, + SWALLOW_Type_1RADIO_1SEARCH, + SWALLOW_Type_1RADIO_1LABLE, + SWALLOW_Type_1SEARCH, + + SWALLOW_Type_1LINE_LAYOUT = 20, + SWALLOW_Type_1LINE_LAYOUT_1RADIO, + SWALLOW_Type_1LINE_LAYOUT_1TOGGLE, + SWALLOW_Type_1LINE_LAYOUT_1CHECK, + SWALLOW_Type_LAYOUT_ENTRY, + SWALLOW_Type_LAYOUT_SIMPLE_PASSWORD, // for simple password + SWALLOW_Type_LAYOUT_DATEFIELD, + SWALLOW_Type_LAYOUT_SLIDER, + SWALLOW_Type_LAYOUT_SPECIALIZTION, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X,//extension + + SWALLOW_Type_MAX +} SWALLOW_Type; + +typedef enum { + UNDEFINED_LIB_SYMBOL = -2,/* undefined symbol : -2 */ + LOAD_LIB_FAILED = -1,/* load failed : -1 */ + OPERATE_LIB_SUCESS = 0, +} OPERATE_LIB_ERROR; + +typedef enum _POPUP_BTN_RESPONSE_TYPE{ + POPUP_RESPONSE_INVALID = -1, + POPUP_RESPONSE_OK = 0, + POPUP_RESPONSE_CANCEL = 1, +} POPUP_BTN_RESPONSE_TYPE; + +typedef enum { + SETTING_GROUP_STYLE_NONE = 0, + SETTING_GROUP_STYLE_TOP, + SETTING_GROUP_STYLE_CENTER, + SETTING_GROUP_STYLE_BOTTOM +} setting_group_style; + +/** + *an item node in genlist + * @todo begings_to is requried? + * @todo isItemDisableFlag is required? + * @todo isSinglelineFlag is requred? + */ +typedef struct _Setting_GenGroupItem_Data { + + void **pBack; + + Elm_Object_Item *item; + SWALLOW_Type swallow_type; + const char *l_swallow_path; + const char *r_swallow_path; + /* for shortcut item */ + const char *exec_path; + + Evas_Object *win_main; + Evas *evas; + + /* radio button */ + Evas_Object *rgd; /**< radio button */ + int usb_index; /**< usb_index number of radio buttons, ex) USB setting */ + + /* output */ + Evas_Object *eo_check; /**< slider, button, check, editfield, datefield */ + setting_call_back_func chk_change_cb; + + int chk_status; /**< represent check value, slider value, datefield value etc.. */ + char *keyStr; /**< title */ + char *sub_desc; /**< sub text */ + + /* to swallow a whole layout (genlist item is 1line-layout or 2line-layout) */ + char *item_style; /**< itc style name */ + + /* for slider control */ + bool isIndicatorVisible; /**< indicator option (displaying number) */ + double slider_min; /**< to swallow a slider */ + double slider_max; /**< to swallow a slider */ + setting_call_back_func start_change_cb; + setting_call_back_func stop_change_cb; + setting_call_back_func maxlength_reached_cb; + void *x_callback_cb; + + /* sound/vibration */ + int belongs_to; /**< 1: slider belongs to sound group. 0: slider belongs to vibration group */ + + /* input panel */ + Elm_Input_Panel_Layout input_type; /**< input panel type */ + bool input_panel_disable_flag; /** do not show the input panel automatically when the widget is clicked or has focus*/ + + void *userdata; /**< just a reference, do not need release. */ + + bool isPasswordFlag; + bool isFocusFlag; + bool isItemDisableFlag; /**< date/time UG only */ + bool isSinglelineFlag; + bool maxLengthReachFlag; + bool enterKeyPressFlag; + + int int_slp_setting_binded; /**< its relative vconf value must increase from 0, and step is 1. eg, 0, 1, 2, 3.. */ + + + /* popup */ + Evas_Object *notify; /**< act as any popup to show user any message */ + + Elm_Entry_Filter_Accept_Set *digits_filter_data; + Elm_Entry_Filter_Limit_Size *limit_filter_data; + + Eina_List* childs; /**< child nodes if this has child nodes for handling radio buttons */ + + setting_group_style group_style; +} Setting_GenGroupItem_Data; + +typedef enum { + SETTING_VCONF_INT_TYPE = 0, + SETTING_VCONF_BOOL_TYPE, + SETTING_VCONF_STR_TYPE +} setting_vconf_type; + +#define MAX_RESET_MENU_NUM 50 + +typedef struct _item_table { + char *item_name; /* pointer to the key string */ + char *ug_args; + Setting_GenGroupItem_Data *data_GenItem; +} Item_Table; + +/** + * @todo is 50 sufficient value? + */ +typedef struct _Setting_Done_List_Data { + /* external input arguements */ + Evas_Object *win_main; + void *UG_data; + Evas_Object *ly_parent; + Evas_Object *controllbar; + Elm_Object_Item *navi_it; + + /* internal output%input arguements */ + Item_Table chk_items[MAX_RESET_MENU_NUM]; + int cur_item_num; + Evas_Object *selInfoPop; + Evas_Object *selInfoPop_layout; + Elm_Genlist_Item_Class itc_1text_1icon; + Elm_Genlist_Item_Class itc_seperator; + Elm_Genlist_Item_Class itc_sel_all; + Evas_Object *select_all_checkbox; + Eina_Bool select_all_checked; + Eina_List *list; +} Setting_Done_List_Data; + +#endif /* __SETTING_COMMON_DATA_TYPE_H__ */ diff --git a/setting-common/include/setting-common-draw-widget.h b/setting-common/include/setting-common-draw-widget.h new file mode 100755 index 0000000..85c724a --- /dev/null +++ b/setting-common/include/setting-common-draw-widget.h @@ -0,0 +1,830 @@ +/* + * setting + * Copyright (c) 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://floralicense.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. + */ +/** + *default group setting-common-draw-widget + *common UI code for reuse + */ +#ifndef __SETTING_COMMON_DRAW_WIDGET_H__ +#define __SETTING_COMMON_DRAW_WIDGET_H__ +#include /* including all the data structure */ +#include /* including one class of common functions */ +#include /* including another class of common functions */ + +#define SETTING_COMMON_DRAW_WIDGET_CONTROLBAR_ITEM_LEN 3 +#define POPUP_INTERVAL 2.0 + +extern const Elm_Genlist_Item_Class itc_seperator; +extern const Elm_Genlist_Item_Class itc_bottom_seperator; +extern const Elm_Genlist_Item_Class itc_sep_line; + +extern const Elm_Genlist_Item_Class itc_1text; +extern const Elm_Genlist_Item_Class itc_1text_1icon_2; + +extern const Elm_Genlist_Item_Class itc_1icon; +extern const Elm_Genlist_Item_Class itc_1icon_1text_sub; +extern const Elm_Genlist_Item_Class itc_1text_1icon; +extern const Elm_Genlist_Item_Class itc_1text_2icon; +extern const Elm_Genlist_Item_Class itc_1text_2icon_2; + +extern const Elm_Genlist_Item_Class itc_2text_2; +extern const Elm_Genlist_Item_Class itc_2text; +extern const Elm_Genlist_Item_Class itc_multiline_2text_1icon; +extern const Elm_Genlist_Item_Class itc_2text_1icon_3; +extern const Elm_Genlist_Item_Class itc_2text_1icon_6; +extern const Elm_Genlist_Item_Class itc_2text_1icon_7; + +extern const Elm_Genlist_Item_Class itc_2text_3_parent; +extern const Elm_Genlist_Item_Class itc_2text_3; +extern const Elm_Genlist_Item_Class itc_2text_2icon_3; + +extern const Elm_Genlist_Item_Class itc_multiline_text; +extern const Elm_Genlist_Item_Class itc_1text_1icon_3_tb; +extern const Elm_Genlist_Item_Class itc_cm_1text_1icon_2; +extern const Elm_Genlist_Item_Class itc_sel_all; +extern const Elm_Genlist_Item_Class itc_bg_1icon; +extern const Elm_Genlist_Item_Class itc_group_item; + + +/** + * Do process when clicking radio in subitem of expandable item + */ +extern void setting_sub_list_rd_change(void *data, Evas_Object *obj, + void *event_info); + +/** + * Hide the input pannel + */ +extern void setting_hide_input_pannel_cb(Evas_Object *entry); + +/** + * Do process when clicking on subitem of expandable item + */ +extern void setting_sub_list_sel_cb(void *data, Evas_Object *obj, + void *event_info); + +/** + * Do process when clicking on a common genlist item + */ +extern void setting_mouse_up_Gendial_list_radio_cb(void *data, + Evas_Object *obj, + void *event_info); + +/** + * To intialize an Elm_Genlist_Item_Class, according to item style + */ +extern bool setting_create_Gendial_itc(const char *item_style, + Elm_Genlist_Item_Class *itc); + +/** + * Create group style item + * @return a pointer to Setting_GenGroupItem_Data + */ +extern Setting_GenGroupItem_Data *setting_create_Gendial_field_group_titleItem(Evas_Object *genlist, + const Elm_Genlist_Item_Class *itc, + Elm_Object_Item *parent, + Elm_Genlist_Item_Type flag, /* ELM_GENLIST_ITEM_GROUP or ELM_GENLIST_ITEM_NONE */ + const char *keyStr, + setting_call_back_func gl_sel); + +/** + * Create separator style item with title + * @return a pointer to Setting_GenGroupItem_Data + */ +extern Setting_GenGroupItem_Data *setting_create_Gendial_field_titleItem( + Evas_Object *genlist, + const Elm_Genlist_Item_Class *itc, + const char *keyStr, + setting_call_back_func gl_sel); + +/** + * Create 1radion-1text style item + * @return a pointer to Setting_GenGroupItem_Data + */ +extern Setting_GenGroupItem_Data *setting_create_Gendial_field_1radio( + Evas_Object *genlist, + const Elm_Genlist_Item_Class *itc, + setting_call_back_func gl_sel, + void *sel_data, + SWALLOW_Type swallow_type, + Evas_Object *rgd, int chk_status, + const char *keyStr, + setting_call_back_func chk_change_cb); +/** + * Create 2radion style item + * @return a pointer to Setting_GenGroupItem_Data + */ +extern Setting_GenGroupItem_Data *setting_create_Gendial_field_2radio( + Evas_Object *genlist, + const Elm_Genlist_Item_Class *itc, + setting_call_back_func gl_sel, + void *sel_data, + SWALLOW_Type swallow_type, + Evas_Object *rgd, int chk_status, + const char *keyStr, + const char *sub_desc, + setting_call_back_func chk_change_cb); + +/** + * Create common style item with menu icon + * @return a pointer to Setting_GenGroupItem_Data + */ +extern Setting_GenGroupItem_Data *setting_create_Gendial_field_groupitem( + Evas_Object *genlist, + const Elm_Genlist_Item_Class *itc, + Elm_Object_Item *parent, + setting_call_back_func gl_sel, + void *sel_data, + SWALLOW_Type swallow_type, + char *l_icon_path, + char *r_icon_path, int chk_status, + const char *keyStr, char *sub_desc, + setting_call_back_func + chk_change_cb); + +/** + * Common function to create a genlist item + * @return a pointer to Setting_GenGroupItem_Data + */ +extern Setting_GenGroupItem_Data *setting_create_Gendial_field_def(Evas_Object * + genlist, + const Elm_Genlist_Item_Class *itc, + setting_call_back_func gl_sel, + void *sel_data, + SWALLOW_Type swallow_type, + char *l_icon_path, + char *r_icon_path, + int chk_status, + const char *keyStr, + char *sub_desc, + setting_call_back_func chk_change_cb); + +/** + * Create 1entry style item + * @return a pointer to Setting_GenGroupItem_Data + */ +extern Setting_GenGroupItem_Data *setting_create_Gendial_field_entry(Evas_Object *genlist, + const Elm_Genlist_Item_Class *itc, + setting_call_back_func gl_sel, + void *sel_data, + SWALLOW_Type swallow_type, + char *l_icon_path, + char *r_icon_path, + int chk_status, + const char *keyStr, + char *sub_desc, + setting_call_back_func chk_change_cb, + Elm_Input_Panel_Layout input_type, + bool isPasswordFlag, + bool isFocusFlag, + int max_char_count, + int max_byte_count, + char *accepted, + char *rejected); + +/** + * Create 1entry style item + * @return a pointer to Setting_GenGroupItem_Data + */ +extern Setting_GenGroupItem_Data *setting_create_Gendial_field_entry_fo(Evas_Object *genlist, + const Elm_Genlist_Item_Class *itc, + setting_call_back_func gl_sel, + void *sel_data, + SWALLOW_Type swallow_type, + char *l_icon_path, + char *r_icon_path, + int chk_status, + const char *keyStr, + char *sub_desc, + setting_call_back_func chk_change_cb, + setting_call_back_func chk_focus_out_cb, + Elm_Input_Panel_Layout input_type, + bool isPasswordFlag, + bool isFocusFlag, + int max_char_count, + int max_byte_count, + char *accepted, + char *rejected); + + +/** + * General function to create a subitem of expandable item + * + * @return a pointer to Setting_GenGroupItem_Data + */ +extern Setting_GenGroupItem_Data *setting_create_Gendial_exp_sub_field( + Evas_Object *genlist, + const Elm_Genlist_Item_Class *itc, + setting_call_back_func gl_sel, + void *sel_data, + Elm_Object_Item *parent, + SWALLOW_Type swallow_type, + Evas_Object *rgd, int chk_status, + const char *keyStr, + setting_call_back_func + chk_change_cb); + +/** + * General function to create a parent item of expandable item + * + * @return a pointer to Setting_GenGroupItem_Data + */ +extern Setting_GenGroupItem_Data *setting_create_Gendial_exp_parent_field( + Evas_Object *genlist, + const Elm_Genlist_Item_Class *itc, + setting_call_back_func gl_sel, + void *sel_data, + SWALLOW_Type swallow_type, + const char *keyStr, + char *sub_desc); + +/** + * To make genlist support expandable style item + */ +extern void setting_enable_expandable_genlist(Evas_Object *genlist, void *data, + setting_call_back_func gl_exp_cb, + setting_call_back_func + gl_smart_cb); + +/** +* The API to let an item which with processbar go into "processing" +* @return +*/ +extern void setting_begin_progress_genlist_item(Setting_GenGroupItem_Data * + data_item); +/** +* The API to let an item which with processbar go into "processed" +* @return +*/ +extern void setting_finish_progress_genlist_item(Setting_GenGroupItem_Data * + data_item); + +/** + * To create slider object of a genlist item + * @return a slider container object + */ +extern Evas_Object *setting_create_slider(Evas_Object *win_main, Evas *evas, + const char *l_swallow_path, + const char *r_swallow_path, + double value, + bool indicator, + double slider_min, + double slider_max, + setting_call_back_func + slider_change_cb, + setting_call_back_func + slider_start_change_cb, + setting_call_back_func + slider_stop_change_cb, void *cb_data); + +/** + * The main implement body of create a certain size icon + */ +extern void create_image_box_add_ex(void *data, Evas_Object *win_main, + Evas *evas, char *img_path, int img_w, + int img_h, + Evas_Object_Event_Cb mouse_down_cb, + Evas_Object_Event_Cb mouse_up_cb, + Evas_Object **image_box, + Evas_Object **img); + +/** + * To create a size fixed icon + * @return a image container object + */ +extern Evas_Object *create_image_box_add(void *data, Evas_Object *win_main, + Evas *evas, char *img_path, int img_w, + int img_h, + Evas_Object_Event_Cb mouse_down_cb, + Evas_Object_Event_Cb mouse_up_cb); + +/** +* @ To create a size specialized icon +* @return a image container object +*/ +extern Evas_Object *create_bgimage_box_add(void *data, Evas_Object *win_main, + Evas *evas, char *img_path, + int img_w, int img_h, + Evas_Object_Event_Cb mouse_down_cb, + Evas_Object_Event_Cb mouse_up_cb); + +/** +* @ create a box container +* +* @param[in] win_main +* +* @return a box container +*/ +extern Evas_Object *setting_create_client_bx(Evas_Object *win_main); + +/** +* The API to Create a lable +* @return a lable +*/ +extern Evas_Object *setting_create_lable(Evas_Object *parent, const char *text,const char *style, const char *align); + +/** +* The API to Create an object to show an image +* @return an object to show an image +*/ +extern Evas_Object *setting_create_image(Evas_Object *parent, const char *img_path); + +/** +* The API to Create an object to show anamition image +* @return an object to show anamition image +*/ +extern Evas_Object *setting_create_gif(Evas_Object *parent, const char **png_list); + +/** +* @ create a popup window which contents a progressbar +* @return a popup window which contents a progressbar +*/ +extern Evas_Object *setting_create_popup_with_progressbar(void *data, + Evas_Object *parent, + char *progressbar_style, + char *title, + char *text, + setting_call_back_func response_cb, + int timeout, + bool blocked_flag, + bool keygrab_flag); +/** +* The general API to create a certain popup window with more than one button. +* @return a certain popup window +*/ +extern Evas_Object *setting_create_popup_with_btn(void *data, + Evas_Object *parent, + char *title, + char *text, + setting_call_back_func response_cb, + int timeout, + int btn_num, ...); +/** +* The general API to create a certain popup window +* @return a certain popup window +*/ +extern Evas_Object *setting_create_popup_without_btn(void *data, + Evas_Object *parent, + char *title, + char *text, + setting_call_back_func response_cb, + int timeout, + bool blocked_flag, + bool keygrab_flag); +/** +* The API to create a certain popup window with title +* @return a certain popup window with title +*/ +extern int setting_create_simple_popup(void *data, + Evas_Object *parent, + char *title, + char *text); +/** +* The API to create a certain popup window with a gif and some buttons +* @return a certain popup window with title +*/ +extern Evas_Object *setting_create_popup_with_gif(void *data, + Evas_Object *parent, + char *title, + char *text, + const char **png_list,//array end with 'NULL'. + setting_call_back_func response_cb, + int timeout, + int btn_num, ...); + +/** +* The API to create a certain popup window with a check +* @return a certain popup window with title +*/ +extern Evas_Object *setting_create_popup_with_checkview(Evas_Object *parent, + char *title, + char *check_str, + Evas_Object *checkview_content, + const char *checkview_style, + Evas_Object **check, + int timeout); + +/** +* The API to create a certain popup window with a image, a check and some buttons +* @return a certain popup window with title +*/ +extern Evas_Object *setting_create_popup_with_image_check(void *data, + Evas_Object *parent, + char *title, + char *text1, + char *text2, + char *icon_path, + char *check_str, + Evas_Object **check, + setting_call_back_func response_cb, + int timeout, + int btn_num, ...); +/** +* Alternate the check object status and its binded vcof value via original vcofn value +*/ +extern int setting_draw_onoff_status(Evas_Object *obj, + setting_bool_slp_list key); + +/** +* Set the vconf value via its binded check object. +* @return 0: sucess, other: failed +*/ +extern int setting_reset_slp_key_by_status(Evas_Object *obj, + setting_bool_slp_list key); + +/** +* Set the status of check object via its binded vconf value. +* @return 0: sucess, other: failed +*/ +extern int setting_check_onoff_status(Evas_Object *obj, + setting_bool_slp_list key); + +/** +* Set the status of radio group object via its binded vconf value. +* @return 0: sucess, other: failed +*/ +extern int setting_update_chk_status(Evas_Object *chk, + setting_int_slp_list type); + +/** +* Create a size specilized rectangle object +* @return a size specilized rectangle object +*/ +extern Evas_Object *setting_create_blank_rect_customize(Evas_Object *layout, + int w, int h); + +/** +* Create a size fixed rectangle object +* @param[in] layout +* @return a size fixed rectangle object +*/ +extern Evas_Object *setting_create_blank_rect(Evas_Object *layout); + +/** +* The API to Create an editfiled object +* @return an editfiled object +*/ +extern Evas_Object *setting_create_editfiled(Evas_Object *win_main, + char *title, char *def_str); +/** +* The API to Create a standard layout +* @return a standard layout +*/ +extern Evas_Object *setting_create_win_layout(Evas_Object *win_layout, + Evas_Object *win_obj); +/** +* The API to Create a naviframe +* @return a naviframe +*/ +extern Evas_Object *setting_create_navi_bar(Evas_Object *layout); + +/** +* The API to Create a button +* @return a button +*/ +extern Evas_Object *setting_create_button(Evas_Object *parent, const char *btn_str, + const char *btn_style, + setting_call_back_func btn_click_cb, + void *cb_data); + +/** +* The API to Create top buttons onto naviframe +* @return a naviframe item +*/ +extern Elm_Object_Item * setting_create_navi_bar_top_buttons(char *title_str, + char *lbutton_str, + char *rbutton_str, + char *mbutton_str, + setting_call_back_func lbutton_click_cb, + setting_call_back_func rbutton_click_cb, + setting_call_back_func mbutton_click_cb, + void *cb_data, Evas_Object *eo_view,/*any container obj */ + Evas_Object *navigate_bar ); + +/** +* Create buttons on the specialized navigation bar +* @param[in] eo_view navigation bar's content +* @param[in] controlbar title obj of navigation bar +*/ +extern void +setting_create_navi_bar_buttons(char *title_str, + char *lbutton_str, char *rbutton_str, + char *mbutton_str, + setting_call_back_func lbutton_click_cb, + setting_call_back_func rbutton_click_cb, + setting_call_back_func mbutton_click_cb, + void *cb_data, Evas_Object *eo_view, + Evas_Object *navigate_bar, + Evas_Object *titleobj); + +/** +* The general API to create a layout with navigation bar, +* which contents any evas container object(@param[eo_view]) as its content +* +* @param[in] eo_view navigation bar's content +* @param[out] titleobj title obj of navigation bar +* +* return main layout of UG or App.. +*/ + +Evas_Object *setting_create_layout_navi_bar(Evas_Object *win_layout, + Evas_Object *win_obj, + char *title_str, + char *lbutton_str, + char *rbutton_str, + char *mbutton_str, + setting_call_back_func lbutton_click_cb, + setting_call_back_func rbutton_click_cb, + setting_call_back_func mbutton_click_cb, + void *cb_data, + Evas_Object *eo_view, + Evas_Object **navi_bar, + Evas_Object **titleobj); + +/** +* The API to create a layout with navigation bar, +* which contents a scroller object as its content +* +* @param[out] scroller navigation bar's content +* +* @return a layout with a special navigation bar and at most 2 buttons +*/ +extern Evas_Object *setting_create_layout_navi_bar_scroller(Evas_Object * win_layout, + Evas_Object * win_obj, + char *title_str, + char *lbutton_str, + char *rbutton_str, + setting_call_back_func lbutton_click_cb, + setting_call_back_func rbutton_click_cb, + void *cb_data, + Evas_Object ** scroller, + Evas_Object ** navi_bar); + +/** +* The API to create a layout with navigation bar, +* which contents a genlist object as its content +* +* @return a layout with a special navigation bar and at most 2 buttons +*/ +extern Evas_Object *setting_create_layout_navi_bar_genlist(Evas_Object * win_layout, + Evas_Object * win_obj, + char *title_str, + char *lbutton_str, + char *rbutton_str, + setting_call_back_func lbutton_click_cb, + setting_call_back_func rbutton_click_cb, + void *cb_data, + Evas_Object ** genlist, + Evas_Object ** navi_bar); + +/** +* The general API to push any evas object(@param[in][eo_view]) to the specialized navi_bar, +* which contents at most 3 buttons +*/ +extern Elm_Object_Item *setting_push_layout_navi_bar(char *title_str, + char *lbutton_str, char *rbutton_str, + char *mbutton_str, + setting_call_back_func lbutton_click_cb, + setting_call_back_func rbutton_click_cb, + setting_call_back_func mbutton_click_cb, + void *cb_data, + Evas_Object *eo_view, + Evas_Object *navi_bar, + Evas_Object **titleobj); + +/** +* The API to push a scroller object(@param[in][scroller]) to the specialized navi_bar, +* which contents at most 2 buttons +*/ +extern void setting_push_layout_navi_bar_scroller(Evas_Object *win_main, + char *title_str, + char *lbutton_str, + char *rbutton_str, + setting_call_back_func lbutton_click_cb, + setting_call_back_func rbutton_click_cb, + void *cb_data, + Evas_Object **scroller, + Evas_Object *navi_bar); + +/** +* The API to push a genlist object(@param[in][genlist]) to the specialized navi_bar, +* which contents at most 2 buttons +*/ +extern void +setting_push_layout_navi_bar_genlist(Evas_Object *win_layout, + Evas_Object *win_obj, + char *title_str, + char *lbutton_str, + char *rbutton_str, + setting_call_back_func lbutton_click_cb, + setting_call_back_func rbutton_click_cb, + void *cb_data, + Evas_Object **genlist, + Evas_Object *navi_bar); + +/** +* Create a text box, which cannot be edited +* @return a text box, which cannot be edited +*/ +extern Evas_Object *setting_create_textbox(Evas_Object *parent, + const char *content); + +/****done_list****/ + +/** +* Create selectinfo popup +*/ +extern void setting_create_sel_info_popup(Evas_Object *parent, + Evas_Object **selInfoPop_layout, + Evas_Object **selInfoPop); + +/** +* Check if some item is selected in done-list +* +* @param[in] list_data +* @return +*/ +extern bool setting_done_list_is_some_item_selected(Setting_Done_List_Data * + list_data); + +/** +* Do process when clicking the check object in the done-list item +*/ +extern void setting_done_list_Gendial_chk_btn_cb(void *data, Evas_Object *obj, + void *event_info); + +/** +* The API to create done-list. +* @param[in] list_data +* @return a done-list +*/ +extern Evas_Object *setting_create_done_list(Setting_Done_List_Data * + list_data); + +/** +* Get searchbar text and register redraw_cb by idler. +* +* @param[in] data +* @param[in] search_bar +* @param[in] search_text +* @param[in] search_idler +* @param[in] redraw_cb +*/ +extern int setting_searchbar_redraw(void *data, + Evas_Object *search_bar, + char *search_text, + Ecore_Idler **search_idler, + Ecore_Task_Cb redraw_cb); + +/** +* Create searchar, register change cb and cancel cb. +* +* @param[in] data +* @param[in] parent +* @param[in] change_cb +* @param[in] cancel_cb +*/ +extern Evas_Object *setting_create_searchbar(void *data, Evas_Object *parent, + Evas_Smart_Cb change_cb, + Evas_Smart_Cb cancel_cb); + +#if APPLIED_BACK_KEY_UG + +/** +* Get the toppest popup in current evas, cross through all the APP and UGs. +* +* @param[in] evas +* +* @return the toppest popup in current evas +*/ +extern Evas_Object *get_toppest_popup_window(Evas *evas); +#endif + +/** +* Make it no effect when clicking on a evas object, such as, layout, genlist +* +*/ +extern void setting_disable_evas_object(Evas_Object *obj); + +/** +* Make it normal acting when clicking on a evas object, such as, layout, genlist +* +*/ +extern void setting_enable_evas_object(Evas_Object *obj); + +/** +* To disable a specialized genlist item +* +*/ +extern void setting_disable_genlist_item(Elm_Object_Item *item); + +/** +* To enable a specialized genlist item +* +*/ +extern void setting_enable_genlist_item(Elm_Object_Item *item); + +/** +* To resize a evas object, such as, icon, button.. +* +*/ +extern void setting_resize_object(Evas_Object *obj, Evas_Coord w, Evas_Coord h); + +/** +* To create a bg object +* +*/ +extern Evas_Object *setting_create_bg(Evas_Object *parent,Evas_Object *win, const char *bg_style); + +/** +* To make an object which is operated by setting_dim_evas_object normal color +* +* @param[in] obj +* @param[in] b_transparenct: +* 1:the appearence of obj is made up of transparent backgroud color. +* 0:the appearence of obj is made up of non transparent color. +*/ +extern void setting_undo_dim_evas_object(Evas_Object *obj, bool b_transparenct); + +/** +* To make an object dim color +* +* @param[in] obj +* @param[in] b_transparenct: +* 1:the appearence of obj is made up of transparent backgroud color. +* 0:the appearence of obj is made up of non transparent color. +*/ +extern void setting_dim_evas_object(Evas_Object *obj, bool b_transparenct); + +/** +* To make an object looks clickable: if pressed, it is dim color;if unpressed, it is normal color; +* +* @param[in] obj +*/ +extern void setting_make_evas_object_clickable(Evas_Object *obj); +/** +* To create an icon which looks clickable(if pressed, it is dim color;if unpressed, it is normal color) +* +* @param[in] parent +* @param[in] img_path +* @param[in] up_cb +* @param[in] down_cb +* @param[in] move_cb +* @param[in] data +*/ +extern Evas_Object *setting_create_icon(Evas_Object *parent, const char *img_path, + Evas_Object_Event_Cb up_cb, + Evas_Object_Event_Cb down_cb, + Evas_Object_Event_Cb move_cb, + void *data); +/** +* to make sbu-obj the same size as parent-obj.Notice: subobj is the only sub-obj @parent wants to display +* +* @param[in] parent +* @param[in] subobj +*/ + +/** +* To create a button which only has a image and looks clickable +* (if pressed, it is dim color;if unpressed, it is normal color) +* @param[in] parent +* @param[in] img_path +* @param[in] up_cb +* @param[in] down_cb +* @param[in] move_cb +* @param[in] data +*/ +extern Evas_Object *setting_create_image_button(Evas_Object *parent, + const char *btn_img, + setting_call_back_func clicked_cb, + setting_call_back_func unpressed_cb, + void *data); + +/* +* set font_size, color or align(right, left, middle),if need, you +* can add , or to controll a segment words; or else +* the text will take the same effect until the end of text. +*/ +extern char *setting_customize_text(const char *input_str, const int font_size, + const char *color, const char *align); + +/* +* To go to top of list in top view of navibar. +* @param[in] navibar +*/ +extern void setting_go_to_navibar_list_top(Evas_Object *navibar); + +#endif /* __SETTING_COMMON_DRAW_WIDGET_H__ */ diff --git a/setting-common/include/setting-common-general-func.h b/setting-common/include/setting-common-general-func.h new file mode 100755 index 0000000..23c4e6d --- /dev/null +++ b/setting-common/include/setting-common-general-func.h @@ -0,0 +1,108 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_COMMON_GENERAL_FUNC_H__ +#define __SETTING_COMMON_GENERAL_FUNC_H__ + +#ifdef _ +#undef _ +#undef N_ +#undef S_ +#endif + +#include + +#ifdef _ +#undef _ +#undef N_ +#undef S_ +#endif + +#include +#include +#include + +#ifndef _EDJ +#define _EDJ(o) elm_layout_edje_get(o) +#endif + +#ifdef _ +#undef _ +#undef N_ +#undef S_ +#endif +#define _(s) setting_gettext(s) +#define S_(s) setting_gettext(s) + +#define btn_type(obj) get_popup_btn_response_type(elm_object_text_get(obj)) + +extern char *setting_file_basename(char *path); + +/*****/ +extern char *get_brightness_mode_str(); +extern char *get_pa_backlight_time_str(); +extern char *get_pa_powersaving_at_str(); +extern char *get_pa_screen_timeout_str(); +extern char *get_pa_display_language_str(); +extern char *get_pa_Wi_Fi_on_off_str(); +extern char *get_BT_on_off_str(); +extern char *get_NFC_on_off_str(); + +extern char *get_pa_time_format_str(); +extern char *get_pa_date_format_str(); +extern char *get_pa_week_format_str(); +extern char *get_pa_roaming_network_str(); +extern char *get_pa_select_network(); +extern double get_widgets_factor(); +extern char *setting_gettext(const char *s); +extern bool is_digital_str(const char *cstr); +extern bool is_substr_ncase(const char *parentstr, const char *substr); + +/* check if partern belongs to array..*/ +extern bool is_string_belong_to_array(const char *partern, const char **array, + int array_num); +extern int safeStrCmp(const char *s1, const char *s2); +extern int safeStrNCmp(const char *s1, const char *s2, int len); +extern char *safeStrNCat(char *dst, const char *src, int maxlen); +extern char *safeCopyStr(char *dst, const char *src, int maxlen); +extern bool isEmptyStr(const char *str); +extern bool isSpaceStr(const char *str); +extern char *remove_first_substring(const char *parent, const char *pat); +extern int safeStrLen(const char *str); +extern bool get_substring_int(const char **ipStr, int *ipValue, char delim); +extern bool is_ip_string(const char *ipstr); +extern int setting_invoke_reset_function(char *ug_name, service_h service, void *ext); +extern int excuteCmd(char* exec_path, int option_num, ...); +extern void create_fontlink(const char *linkpath, const char *linkname, + const char *fontfilepath, const char *fontfilename); + +extern char* get_icon_path(const char *package); + +extern int is_slp_binary(); +extern bool isEmulBin(); +extern int get_popup_btn_response_type(const char *btn_str); +extern void clear_system_service_data(); + +extern char *cur_font_get(); +extern void font_config_set(char *font_name); +extern void font_size_set(); + +extern int setting_set_i18n(char* pkgname, char* localedir); +extern void app_launcher(char* pkg_name); +extern char* substring(const char* str, size_t begin, size_t len); +extern void set_defaultLangICU(); + +#endif /* __SETTING_COMMON_GENERAL_FUNC_H__ */ diff --git a/setting-common/include/setting-common-resource.h b/setting-common/include/setting-common-resource.h new file mode 100755 index 0000000..2a411c7 --- /dev/null +++ b/setting-common/include/setting-common-resource.h @@ -0,0 +1,320 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_COMMON_RESOURCE +#define __SETTING_COMMON_RESOURCE + +#define EXCEED_LIMITATION_STR "The content is too long" + +#define SETTING_ICON_PATH_CFG "/usr/apps/org.tizen.setting/res/icons/" +#define SETTING_IMAGE_PATH_CFG "/usr/apps/org.tizen.setting/res/images/" +#define SETTING_OPEN_SOURCE_LICENSE_PATH "file:///opt/apps/org.tizen.setting/data/Open_Source_Announcement.html" +//#define SETTING_OPEN_SOURCE_LICENSE_PATH "file:///usr/share/license.html" + +#define KeyStr_Emulator "Emulator" // be used to compare with model_str from system_info_get_value_string(SYSTEM_INFO_KEY_MODEL, &model_str) + +#define KeyStr_Joyn "joyn" + /* connectivity keyStr*/ +#define KeyStr_Connectivity "IDS_ST_BODY_CONNECTIVITY" +#define KeyStr_FlightMode "IDS_ST_BODY_FLIGHT_MODE" +#define KeyStr_WiFi "IDS_COM_BODY_WI_FI" +#define KeyStr_WiFiDirect "IDS_ST_HEADER_WI_FI_DIRECT" +#define KeyStr_Bluetooth "IDS_COM_BODY_BLUETOOTH" +#define KeyStr_MobileAP "IDS_MOBILEAP_BODY_TETHERING" + +#define KeyStr_AllShare "IDS_COM_BODY_ALLSHARE" + +#define KeyStr_Location "IDS_COM_BODY_LOCATION" +#define KeyStr_Network "IDS_ST_BODY_NETWORK" +#define KeyStr_DataRoaming "IDS_ST_BODY_DATA_ROAMING" +#define KeyStr_UsePacketData "IDS_ST_BODY_USE_PACKET_DATA" + +#define KeyStr_USBconnection "IDS_ST_HEADER_USB_UTILITIES" +#define KeyStr_DeveloperOption "IDS_ST_BODY_DEVELOPER_OPTIONS" + +/* system keyStr*/ +#define KeyStr_System "IDS_COM_BODY_SYSTEM" + +#define KeyStr_Menuscreen "IDS_ST_HEADER_HOME_SCREEN_ABB" +#define KeyStr_Homescreen "IDS_ST_HEADER_HOME_SCREEN_ABB" + +#define KeyStr_Theme "IDS_ST_BODY_WINSET" +#define KeyStr_Sounds "IDS_COM_BODY_SOUNDS" + +#define KeyStr_Wallpaper "IDS_COM_BODY_WALLPAPER" +#define KeyStr_HomeScreen "IDS_ST_HEADER_HOME_SCREEN_ABB" + +#define KeyStr_LockedScreen "IDS_ST_HEADER_LOCK_SCREEN" + + +#define KeyStr_Font "IDS_COM_BODY_FONT" +#define KeyStr_Powersaving "IDS_ST_BODY_POWER_SAVING_MODE" + +#define KeyStr_Display "IDS_ST_BODY_DISPLAY" +#define KeyStr_Brightness "IDS_COM_OPT_BRIGHTNESS" +#define KeyStr_BacklightTime "IDS_ST_BODY_BACKLIGHT_TIME" +#define KeyStr_Landscape "IDS_ST_HEADER_AUTO_ROTATE_SCREEN_ABB" + +#define KeyStr_DateTime "IDS_ST_BODY_DATE_AND_TIME" +#define KeyStr_DisplayLanguage "IDS_ST_HEADER_DISPLAY_LANGUAGE" + +#define KeyStr_LanguageRegion "IDS_ST_BODY_LANGUAGE_AND_REGION_ABB" + +/*#define KeyStr_KeyboradLanguage "keyborad language"*/ +#define KeyStr_KeyboradLanguage "IDS_ST_BODY_KEYBOARD" +#define KeyStr_Gestures "IDS_ST_BODY_GESTURES" +#define KeyStr_Touch "IDS_ST_BODY_TOUCH" +#define KeyStr_Security "IDS_ST_BODY_SECURITY" +#define KeyStr_Memory "IDS_ST_BODY_MEMORY" +#define KeyStr_Reset "IDS_COM_BODY_RESET" +#define KeyStr_AboutPhone "IDS_ST_BODY_ABOUT_PHONE" +#define KeyStr_MenuWidgets "IDS_ST_BODY_MENU_AND_WIDGETS" +#define KeyStr_Screen_reader "IDS_ST_MBODY_SCREEN_READER_HTTS" + +/* applications keyStr*/ +#define KeyStr_Applications "IDS_COM_BODY_APPLICATIONS" + +#define KeyStr_Call "IDS_COM_BODY_CALL" +#define KeyStr_Gallery "IDS_COM_BODY_GALLERY" + +#define KeyStr_Messages "IDS_COM_BODY_MESSAGES" +#define KeyStr_Email "IDS_COM_BODY_EMAIL" +#define KeyStr_SevenEmail "Samsung Email" +#define KeyStr_Contacts "IDS_COM_BODY_CONTACTS" +#define KeyStr_Calendar "IDS_COM_BODY_CALENDAR" +#define KeyStr_Internet "IDS_COM_BODY_INTERNET" + +/* #define KeyStr_MediaPlayer "IDS_ST_BODY_MEDIA_PLAYER"*/ +#define KeyStr_MediaPlayer "IDS_COM_BODY_MUSIC" + +#define KeyStr_SamsungApps "IDS_ST_HEADER_SAMSUNG_APPS" +#define KeyStr_PhotoUpload "IDS_ST_BODY_PHOTO_UPLOAD_SETTINGS" +#define KeyStr_SocialNetwork "IDS_ST_BODY_SOCIAL_NETWORK_PROFILES" +#define KeyStr_Installation "IDS_ST_BODY_INSTALLATION_SETTINGS" + +/* #define KeyStr_HomeScreen "Home screen"*/ +#define KeyStr_TaskSwitcher "IDS_ST_BODY_TASK_SWITCHER" +#define KeyStr_VoiceRecorder "IDS_COM_BODY_VOICE_RECORDER" +#define KeyStr_FMRadio "IDS_COM_BODY_FM_RADIO" +#define KeyStr_Twitter "IDS_COM_BODY_TWITTER" +#define KeyStr_NFC "IDS_COM_BODY_NFC" +#define KeyStr_Facebook "IDS_ST_BODY_FACEBOOK" + +#define KeyStr_DataUsage "IDS_MOBILEAP_MBODY_DATA_USAGE" +#define KeyStr_Storage "IDS_ST_BODY_STORAGE" + +/* applications keyStr*/ +#define KeyStr_DownloadedAPPs "IDS_ST_BODY_DOWNLOADED_APPLICATIONS" +#define KeyStr_AppsInformation "IDS_ST_BODY_APPLICATION_INFO" +#define KeyStr_ManageApps "IDS_ST_BODY_MANAGE_APPLICATIONS" +#define KeyStr_WebApps "IDS_ST_BODY_WEB_APPLICATIONS" + +#define KeyStr_MoreConnect "IDS_ST_BODY_MORE_CONNECTIVITY_SETTINGS" +#define KeyStr_MoreSystem "IDS_ST_BODY_MORE_SYSTEM_SETTINGS" + +#define KeyStr_Save "Save" + +/* certificates keyStr*/ +//#define KeyStr_CertUI "IDS_COM_BODY_CERTIFICATE_INFO" +#define KeyStr_CertUI "Certificate" + +////////////////Common Strings/////////////// +#define KeyStr_Item_Sel "Item(s) Selected" +#define UNSUPPORTED_FUNCTION "Cannot support this function" +#define KeyStr_Select_All "IDS_COM_BODY_SELECT_ALL" +#define KeyStr_INFO "IDS_COM_BODY_INFO" +/*****/ + +#define IMG_DefaultIcon SETTING_ICON_PATH_CFG"DefaultIcon.png" +#define IMG_Joyn "/usr/share/ims/joyn_notification.png" +/* connectivity IMG*/ +#define IMG_FlightMode SETTING_ICON_PATH_CFG"A01-1_icon_Flight_Mode.png" +#define IMG_WiFi SETTING_ICON_PATH_CFG"A01-1_icon_Wi-Fi.png" +#define IMG_WiFiDirect SETTING_ICON_PATH_CFG"A01-1_icon_Wi-Fi_direct.png" +#define IMG_Bluetooth SETTING_ICON_PATH_CFG"A01-1_icon_Bluetooth.png" +#define IMG_Location SETTING_ICON_PATH_CFG"A01-1_icon_Location.png" +#define IMG_Network SETTING_ICON_PATH_CFG"A01-1_icon_Network.png" +#define IMG_DataRoaming SETTING_ICON_PATH_CFG"A01-1_icon_Data_Roaming.png" +#define IMG_UsePacketData SETTING_ICON_PATH_CFG"Data-32.png" +#define IMG_USBconnection SETTING_ICON_PATH_CFG"A01-1_icon_USB_Connection.png" +#define IMG_TVout SETTING_ICON_PATH_CFG"TVout.png" +#define IMG_MobileAP SETTING_ICON_PATH_CFG"A01-1_icon_mobileAP.png" + +/* system IMG*/ +#define IMG_Menuscreen SETTING_ICON_PATH_CFG"A01-1_icon_Menu.png" +#define IMG_Sounds SETTING_ICON_PATH_CFG"A01-1_icon_Sound.png" +#define IMG_Wallpaper SETTING_ICON_PATH_CFG"A01-1_icon_Wallpaper.png" +#define IMG_Font SETTING_ICON_PATH_CFG"A01-1_icon_Font.png" +#define IMG_Brightness SETTING_ICON_PATH_CFG"A01-1_icon_Brightness.png" +#define IMG_BacklightTime SETTING_ICON_PATH_CFG"BacklightTime.png" +#define IMG_Dispaly SETTING_ICON_PATH_CFG"A01-1_icon_Display.png" +#define IMG_Landscape SETTING_ICON_PATH_CFG"A01-1_icon_Rotation_lock.png" + +#define IMG_Powersaving SETTING_ICON_PATH_CFG"A01-1_icon_Power_saving_mode.png" + +#define IMG_DateTime SETTING_ICON_PATH_CFG"A01-1_icon_Date_and_time.png" +#define IMG_DisplayLanguage SETTING_ICON_PATH_CFG"A01-1_icon_Display_Language.png" +#define IMG_ChooseDefApps SETTING_ICON_PATH_CFG"A01-1_icon_Choose_default.png" +#define IMG_KeyboradLanguage SETTING_ICON_PATH_CFG"A01-1_icon_keyboard.png" +#define IMG_Gestures SETTING_ICON_PATH_CFG"Gesture.png" +#define IMG_Touch SETTING_ICON_PATH_CFG"Touch.png" +#define IMG_License SETTING_ICON_PATH_CFG"A01-1_icon_License.png" +#define IMG_Security SETTING_ICON_PATH_CFG"A01-1_icon_Security.png" +#define IMG_Memory SETTING_ICON_PATH_CFG"A01-1_icon_Memory.png" +#define IMG_Reset SETTING_ICON_PATH_CFG"A01-1_icon_Reset.png" +#define IMG_AboutPhone SETTING_ICON_PATH_CFG"A01-1_icon_About_phone.png" +#define IMG_Theme SETTING_ICON_PATH_CFG"A01-1_icon_USB_Theme.png" + +#define IMG_StorageIcon SETTING_ICON_PATH_CFG"storage.png" + +/* applications IMG*/ +#define IMG_Call "/usr/share/icons/default/small/org.tizen.phone.png" +#define IMG_Messages "/usr/share/icons/default/small/org.tizen.message.png" +#define IMG_Email "/usr/share/icons/default/small/org.tizen.email.png" +#define IMG_Contacts "/usr/share/icons/default/small/org.tizen.contacts.png" +#define IMG_Calendar "/usr/share/icons/default/small/org.tizen.calendar.png" +#define IMG_Gallery "/usr/share/icons/default/small/org.tizen.gallery.png" +#define IMG_VoiceRecorder "/usr/share/icons/default/small/org.tizen.voicerecorder.png" +#define IMG_NFC "/usr/ug/res/icons/ug-setting-nfc-efl/setting-nfc.png" +#define IMG_DataUsage SETTING_ICON_PATH_CFG"org.tizen.traf-control.png" + +#define IMG_Web_Apps "/opt/usr/ug/res/images/ug-webapp-common-efl/WebApplication.png" + +#define IMG_PhoneCalling SETTING_ICON_PATH_CFG"phoneCalling.png" + +#define IMG_VoiceTalk vconf_get_str(VCONFKEY_BGSET) + +#define IMG_PANNING_CENTER SETTING_ICON_PATH_CFG "motions/panning/panning_center.png" + +#define IMG_Panning SETTING_ICON_PATH_CFG"horz_scrollbar.png" + +#define IMG_Tilt IMG_Panning //vconf_get_str(VCONFKEY_BGSET) + + +/* display UG IMG*/ +#define IMG_BRIGTHNESS_LEFT SETTING_ICON_PATH_CFG"00_brightness_left.png" +#define IMG_BRIGHTNESS_RIGHT SETTING_ICON_PATH_CFG"00_brightness_right.png" + +/* SOUND IMG*/ +#define IMG_SLIDER_BTN_VOLUME01 \ + SETTING_ICON_PATH_CFG"A01-1_list_progress_sound_min.png" + +#define IMG_SLIDER_BTN_VOLUME02 \ + SETTING_ICON_PATH_CFG"A01-1_list_progress_sound_max.png" + +/* touch IMG*/ +#define IMG_VIBRATION_ICON_01 \ + SETTING_ICON_PATH_CFG"A01-1_list_progress_vibration_min.png" +#define IMG_VIBRATION_ICON_02 \ + SETTING_ICON_PATH_CFG"A01-1_list_progress_vibration_max.png" + +/* Sensitivity IMG*/ +#define IMG_SENSITIVITY_ICON_01 \ + SETTING_ICON_PATH_CFG"68_icon_vibration_01.png" +#define IMG_SENSITIVITY_ICON_02 \ + SETTING_ICON_PATH_CFG"68_icon_vibration_02.png" + +/* pdf */ +#define PDF_SOURCE_ANNOUNCEMENT \ + "/usr/apps/org.tizen.setting/data/Open_Source_Announcement.pdf" + +/* home screen*/ +#define IMG_DEFAULT_HOME_SCREEN \ + "/opt/share/settings/Wallpapers/Home_default.jpg" + +/* */ +#define IMG_AddFavourite \ + SETTING_ICON_PATH_CFG"AddFavourite.png" +/* add */ +#define IMG_ADD \ + SETTING_ICON_PATH_CFG"01_header_icon_add.png" +/* Save, OK, Done */ +#define IMG_DONE \ + SETTING_ICON_PATH_CFG"01_header_icon_done.png" + +/* Cancel, Delete, back */ +#define IMG_CANCEL \ + SETTING_ICON_PATH_CFG"01_header_icon_cancel.png" +/* others */ +#define IMG_OTHERS \ + SETTING_ICON_PATH_CFG"01_header_icon_cancel.png" + +/* Next */ +#define IMG_NEXT SETTING_ICON_PATH_CFG"A01-9_controlbar_icon_Next.png" + +/* Previous */ +#define IMG_PREVIOUS SETTING_ICON_PATH_CFG"A01-9_controlbar_icon_Previous.png" + + +/* setting image list*/ +#define IMG_SYSTEM_MYFILE_FILE SYSTEM_ICON_PATH"/60_myfiles_file_etc.png" +#define IMG_SYSTEM_MYFILE_MP3 SYSTEM_ICON_PATH"/60_myfiles_file_mp3_b.png" +#define IMG_SYSTEM_MYFILE_VOICE SYSTEM_ICON_PATH"/60_myfiles_file_amr.png" +#define IMG_SYSTEM_MYFILE_MP4 SYSTEM_ICON_PATH"/60_myfiles_file_mp4_b.png" +#define IMG_SYSTEM_MYFILE_ICON SYSTEM_ICON_PATH"/myfile_icon_etc.png" + +/* plug in*/ +#define IMG_GREEN_SWITCH SETTING_ICON_PATH_CFG"green_switch-32.png" +#define IMG_APPS_INFORMATION SETTING_ICON_PATH_CFG"A01-1_icon_apps_information.png" +#define IMG_MANAGE_APPS SETTING_ICON_PATH_CFG"A01-1_icon_Manage_Application.png" +#define IMG_NEW_EXCHANGE "/usr/res/icons/default/small/sync-config.png" +#define IMG_ICON_EMAIL "/usr/share/images/icon_email.png" +#define IMG_ICON_SPLITBER_HOR "/usr/share/images/splitbar_hor.png" + +#define IMG_SCREEN_MODE SETTING_ICON_PATH_CFG"A01-1_img_screen_mode.png" + +/*****/ + +/****Others****/ + +/* sound profile*/ +extern const char *STR_SETTING_NORMAL; + +/* security*/ +extern const char *STR_SETTING_OPERATION_FAILED; + +/* network*/ +extern const char *STR_SETTING_MMS_CONNECTIONS; +extern const char *STR_SETTING_NEW_CONNECTIONS; +extern const char *STR_SETTING_GSM_900_1800; +extern const char *STR_SETTING_GSM_850_1900; +extern const char *STR_SETTING_UMTS; +extern const char *STR_SETTING_NETWORK_LIST; + +/* phone > langauge*/ +extern const char *STR_SETTING_LANG_ENGLISH; +extern const char *STR_SETTING_LANG_GERMAN; +extern const char *STR_SETTING_LANG_DUTCH; +extern const char *STR_SETTING_LANG_SPAINISH; +extern const char *STR_SETTING_LANG_PORTUGUESE; +extern const char *STR_SETTING_LANG_GREEK; +extern const char *STR_SETTING_LANG_ITALIAN; +extern const char *STR_SETTING_LANG_FRENCH; +extern const char *STR_SETTING_LANG_TURKISH; +extern const char *STR_SETTING_LANG_KOREAN; +extern const char *STR_SETTING_LANG_JAPAN; +extern const char *STR_SETTING_LANG_CHINA; +extern const char *STR_SETTING_LANG_CANTONESE; +extern const char *STR_SETTING_LANG_TAIWAN; +extern const char *STR_SETTING_LANG_RUSSIAN; + +/* connectivity > tvout*/ +extern const char *STR_SETTING_NTSC; +extern const char *STR_SETTING_PAL; +extern const char *STR_SETTING_WIDE; + +#endif /* end of __SETTING_COMMON_RESOURCE */ diff --git a/setting-common/include/setting-common-view.h b/setting-common/include/setting-common-view.h new file mode 100755 index 0000000..5d6402b --- /dev/null +++ b/setting-common/include/setting-common-view.h @@ -0,0 +1,49 @@ +/* + * setting + * Copyright (c) 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://floralicense.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. + */ +/** + *@defgroup setting-common-view + *each UG is able to have multiple views. + */ +#ifndef __SETTING_COMMON_VIEW_H__ +#define __SETTING_COMMON_VIEW_H__ + +typedef struct _setting_view { + int (*create) (void *cb); + int (*destroy) (void *cb); + int (*update) (void *cb); + int (*cleanup) (void *cb); + + int is_create; /* 1:exist */ + +} setting_view; + +int setting_view_node_set_cur_view(setting_view *view); +setting_view *setting_view_node_get_cur_view(); +int setting_view_node_table_intialize(); +int setting_view_node_table_register(setting_view *view, + setting_view *topview); +int setting_view_cb_at_endKey(void *cb); +setting_view *setting_view_get_topview(setting_view *view); +extern void setting_view_update_topview(setting_view *view, setting_view *topview); +extern int setting_view_create(setting_view *view, void *cb); +extern int setting_view_update(setting_view *view, void *cb); +extern int setting_view_destroy(setting_view *view, void *cb); +extern int setting_view_cleanup(setting_view *view, void *cb); +extern int setting_view_change(setting_view *from_view, setting_view *to_view, + void *cb); + +#endif /* __SETTING_COMMON_VIEW_H__ */ diff --git a/setting-common/src/setting-cfg.c b/setting-common/src/setting-cfg.c new file mode 100755 index 0000000..005738a --- /dev/null +++ b/setting-common/src/setting-cfg.c @@ -0,0 +1,814 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include +#include +#include +#include +#include + +#define CFG_FILE_DIR_PATH "/opt/data/setting/" +#define CFG_FILE_PATH CFG_FILE_DIR_PATH"setting.cfg" + +JsonParser* parser; +JsonNode* root; /* category_list */ + +char* setting_cfg_get_path() +{ + return CFG_FILE_PATH; +} + +int setting_cfg_file_write( JsonNode * node ); + +#define __create_an_item(item_name, icon_path, ug_args, defaultPos, is_resetable) do\ +{\ + if (!is_ug_installed_by_ug_args(ug_args)) break;\ + menu_item = json_node_new(JSON_NODE_OBJECT); \ + object = json_object_new(); \ + json_node_take_object(menu_item, object); \ + json_object_set_string_member(object, "key_name", item_name); \ + json_object_set_string_member(object, "icon_path", icon_path); \ + json_object_set_string_member(object, "ug_args", ug_args); \ + json_object_set_int_member(object, "pos", defaultPos); \ + json_object_set_int_member(object, "click_times", 0); \ + json_object_set_int_member(object, "is_resetable", is_resetable); \ + json_array_add_element(menu, menu_item); \ +} while(0);\ + +#define __create_an_item_by_pkg(item_name, pkg_name, ug_args, defaultPos, is_resetable) do\ +{\ + if (!is_ug_installed_by_ug_args(ug_args)) break;\ + menu_item = json_node_new(JSON_NODE_OBJECT); \ + object = json_object_new(); \ + char* __temp_##item_name = get_icon_path(pkg_name); \ + json_node_take_object(menu_item, object); \ + json_object_set_string_member(object, "key_name", item_name); \ + json_object_set_string_member(object, "icon_path", __temp_##item_name); \ + json_object_set_string_member(object, "ug_args", ug_args); \ + json_object_set_int_member(object, "pos", defaultPos); \ + json_object_set_int_member(object, "click_times", 0); \ + json_object_set_int_member(object, "is_resetable", is_resetable); \ + json_array_add_element(menu, menu_item); \ + free(__temp_##item_name); __temp_##item_name = NULL; \ +} while(0);\ + + +#define __create_a_menu(menu_name)\ +{\ + category = json_node_new( JSON_NODE_OBJECT );\ + object = json_object_new();\ + json_node_take_object ( category, object );\ + json_object_set_string_member( object, "name", menu_name );\ + menu = json_array_new();\ + json_object_set_array_member( object, "menu", menu );\ + json_array_add_element( json_node_get_array( category_list ), category );\ +} + +void setting_cfg_print( void ) +{ + JsonNode * node = root; + + JsonGenerator *generator = json_generator_new (); + g_object_set( generator, "pretty", TRUE, NULL ); + json_generator_set_root ( generator, node ); + gchar *data = json_generator_to_data ( generator, NULL ); + SETTING_TRACE( "%s", (char *)data ); + + g_free(data); + g_object_unref(generator); +} + +/* create config file from scratch */ +int setting_cfg_create(void) +{ + JsonNode *category_list, *category, *menu_item; + JsonArray *menu; + JsonObject *object; + + /* Category list */ + category_list = json_node_new (JSON_NODE_ARRAY); + json_node_take_array ( category_list, json_array_new () ); + + /* Connectivity */ + __create_a_menu(KeyStr_Connectivity); + + __create_an_item(KeyStr_WiFi, IMG_WiFi, "wifi-efl-UG", Cfg_Item_Pos_Level0, Cfg_Item_Resetable); + __create_an_item(KeyStr_MobileAP, IMG_MobileAP, "setting-mobile-ap-ug", Cfg_Item_Pos_Level0, Cfg_Item_Resetable); + __create_an_item(KeyStr_Location, IMG_Location, "setting-location-efl", Cfg_Item_Pos_Level0, Cfg_Item_Resetable); + __create_an_item(KeyStr_Network, IMG_Network, "setting-network-efl", Cfg_Item_Pos_Level0, Cfg_Item_Resetable); + __create_an_item(KeyStr_Bluetooth, IMG_Bluetooth, "setting-bluetooth-efl", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); + __create_an_item(KeyStr_NFC, IMG_NFC, "setting-nfc-efl|type:nfc", Cfg_Item_Pos_Level1, Cfg_Item_unResetable); + +#if SUPPORT_DATA_USAGE + __create_an_item(KeyStr_DataUsage, IMG_DataUsage, "setting-datausage-efl", Cfg_Item_Pos_Level1, Cfg_Item_unResetable); +#endif + +#if SUPPORT_WIFI_DIRECT + __create_an_item(KeyStr_WiFiDirect, IMG_WiFiDirect, "setting-wifidirect-efl", Cfg_Item_Pos_Level1, Cfg_Item_unResetable); +#endif + + /* System */ + __create_a_menu(KeyStr_System); + /* a new group.. */ + __create_an_item(KeyStr_FlightMode, IMG_FlightMode, NULL, Cfg_Item_Pos_Level0, Cfg_Item_unResetable); + + // Wallpaper -- here +#if SUPPORT_WALLPAPER + /* kinds of wallpaper version.. */ + __create_an_item(KeyStr_Wallpaper, IMG_Wallpaper, "setting-display-efl|viewtype:wallpaper", Cfg_Item_Pos_Level0, Cfg_Item_Resetable); +#endif + + __create_an_item(KeyStr_Sounds, IMG_Sounds, "setting-profile-efl", Cfg_Item_Pos_Level0, Cfg_Item_Resetable); + +#if SUPPOR_SEPARATE_BRIGHTNESS + __create_an_item(KeyStr_Brightness, IMG_Brightness, "setting-display-efl|viewtype:brightness", Cfg_Item_Pos_Level0, Cfg_Item_Resetable); +#endif + +#if SUPPORT_SECURITY + __create_an_item(KeyStr_Security, IMG_Security, "setting-security-efl", Cfg_Item_Pos_Level0, Cfg_Item_Resetable); +#endif + +#if SUPPORT_POWERSAVING + __create_an_item(KeyStr_Powersaving, IMG_Powersaving, "setting-powersaving-efl", Cfg_Item_Pos_Level0, Cfg_Item_unResetable); +#endif + +#if SUPPORT_FONT + __create_an_item(KeyStr_Font, IMG_Font, "setting-font-efl", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); +#endif + + __create_an_item(KeyStr_Display, IMG_Dispaly, "setting-display-efl|viewtype:main", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); +#if SUPPORT_MENUSCREEN + __create_an_item(KeyStr_Menuscreen, IMG_Menuscreen, "setting-homescreen-efl", Cfg_Item_Pos_Level1, Cfg_Item_unResetable); +#endif + __create_an_item(KeyStr_Landscape, IMG_Landscape, NULL, Cfg_Item_Pos_Level1, Cfg_Item_Resetable); + __create_an_item(KeyStr_DateTime, IMG_DateTime, "setting-time-efl", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); + __create_an_item(KeyStr_LanguageRegion, IMG_DisplayLanguage, "setting-phone-efl|viewtype:language", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); + __create_an_item(KeyStr_KeyboradLanguage, IMG_KeyboradLanguage, "isfsetting-efl", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); + +#if SUPPORT_STORAGE + __create_an_item(KeyStr_Storage, IMG_DefaultIcon, "setting-storage-efl", Cfg_Item_Pos_Level1, Cfg_Item_unResetable); +#endif + __create_an_item(KeyStr_ManageApps, IMG_MANAGE_APPS, "setting-manage-applications-efl|viewtype:manage-applications", Cfg_Item_Pos_Level1, + Cfg_Item_Resetable); + +#if SUPPORT_WEB_APPLICATION + __create_an_item(KeyStr_WebApps, IMG_Web_Apps, "webapp-common-efl", Cfg_Item_Pos_Level1, Cfg_Item_unResetable); +#endif + +#if SUPPORT_CERTIFICATES + __create_an_item(KeyStr_CertUI, IMG_MANAGE_APPS, "setting-manage-certificates-efl", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); +#endif + + __create_an_item(KeyStr_Memory, IMG_Memory, "setting-memory-efl", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); + __create_an_item(KeyStr_Reset, IMG_Reset, "setting-reset-efl", Cfg_Item_Pos_Level1, Cfg_Item_unResetable); + __create_an_item(KeyStr_DeveloperOption, IMG_USBconnection, "setting-developeroption-efl|viewtype:usb", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); + __create_an_item(KeyStr_AboutPhone, IMG_AboutPhone, "setting-about-efl", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); + + /* Applications */ + __create_a_menu(KeyStr_Applications); + + __create_an_item(KeyStr_Call, IMG_Call, "setting-call-efl", Cfg_Item_Pos_Level0, Cfg_Item_unResetable); + __create_an_item(KeyStr_Messages, IMG_Messages, "msg-setting-efl", Cfg_Item_Pos_Level0, Cfg_Item_unResetable); + __create_an_item(KeyStr_Email, IMG_Email, "email-setting-efl|VIEW_TYPE:main-view", Cfg_Item_Pos_Level0, Cfg_Item_unResetable); + __create_an_item(KeyStr_Contacts, IMG_Contacts, "contacts-settings-efl|request_type:71", Cfg_Item_Pos_Level0, Cfg_Item_unResetable); + + __create_an_item(KeyStr_Calendar, IMG_Calendar, "calendar-settings-efl", Cfg_Item_Pos_Level0, Cfg_Item_unResetable); + + __create_an_item(KeyStr_Gallery, IMG_Gallery, "setting-gallery-efl", Cfg_Item_Pos_Level0, Cfg_Item_unResetable); + __create_an_item(KeyStr_VoiceRecorder, IMG_VoiceRecorder, "setting-voicerecorder-efl", Cfg_Item_Pos_Level0, Cfg_Item_unResetable); + +#if SUPPORT_FMradio + // FMradio setting + __create_an_item_by_pkg(KeyStr_FMRadio, "org.tizen.fm-radio", "setting-fmradio-efl", Cfg_Item_Pos_Level0, Cfg_Item_unResetable); + SETTING_TRACE_DEBUG("Added FMRadio"); +#endif + + + + + + +#if DISABLED_CODE + __create_an_item_by_pkg(KeyStr_NFC, "com.samsung.nfc-app", "setting-nfc-efl", Cfg_Item_Pos_Level0, Cfg_Item_unResetable); +#endif + + /* Downloaded App */ + __create_a_menu(KeyStr_DownloadedAPPs); + + /* write to file */ + int ret = setting_cfg_file_write( category_list ); + + json_node_free( category_list ); + + return ret; +} + + +/* load file */ +int setting_cfg_file_read( void ) +{ +#if DISABLED_CODE + if (access( CFG_FILE_PATH, R_OK|F_OK ) !=0 ) + { + SETTING_TRACE("file [%s] not legal, need to check your file-system.[%s:%d]\n", CFG_FILE_PATH, __FILE__, __LINE__); + //return Cfg_Error_Type_FilePermissionDenied; + return FALSE; + } +#endif + parser = json_parser_new (); /* to be freed on exit */ + + /* file -> parser */ + GError *error = NULL; + gboolean ret = json_parser_load_from_file( parser, CFG_FILE_PATH, &error ); + + if( FALSE == ret ) + { + return FALSE; +#if DISABLED_CODE + SETTING_TRACE_ERROR("error->message:%s", (char*)(error->message)); + + /* The file is existing and can be accessed normally, but it was + * loaded failed as a json script, it means setting.cfg is + * damaged(not the normal formatting ), we need to remove + * the file and recreate in next running time*/ + SETTING_TRACE_ERROR("The file[%s] is existing and can be accessed "\ + "normally, but it was loaded failed as a json "\ + "script, it means setting.cfg is damaged (the "\ + "formatting ia abnormal), we need to remove the"\ + " file and recreate in next running time!", + CFG_FILE_PATH); + + SETTING_TRACE("Trying to removing the damaged file."); + if (remove(CFG_FILE_PATH) != 0) + { + SETTING_TRACE_ERROR("Error to remove the damaged file"); + return FALSE; + } + + if( FALSE == setting_cfg_create() ) + { + SETTING_TRACE_ERROR("Error to create a new config file"); + return FALSE; + } + /*if the failed is caused by reading the file recursively invoking */ + return setting_cfg_file_read(); +#endif + } + + /* parser -> root */ + root = json_parser_get_root( parser ); /* to be freed on exit*/ + return TRUE; +} + +/** +* @brief dump JSON to file +*/ +int setting_cfg_file_write( JsonNode * node ) +{ + GError *error = NULL; + JsonGenerator *generator = json_generator_new (); + json_generator_set_root ( generator, node ); + g_object_set( generator, "pretty", TRUE, NULL ); //write file in indent format + gboolean ret = json_generator_to_file( generator, CFG_FILE_PATH, &error ); + g_object_unref(generator); + + /* ***BEGIN*** DAC black screen SAMSUNG 2010/8/9 add + *add read permission + *chown -R inhouse:inhouse /home/inhouse/setting.cfg + */ + if( FALSE == ret ) + { + SETTING_TRACE_ERROR("Error writing file %s!", CFG_FILE_PATH ); + return FALSE; + } + return TRUE; +} + +/* public functions */ +#if DISABLED_CODE +int setting_cfg_init( void ) +{ + g_type_init (); + + struct stat st; + //int ret = -1; + + if (access( CFG_FILE_DIR_PATH, R_OK|W_OK|F_OK ) !=0 ) + { + SETTING_TRACE_ERROR("dir [%s] not legal, need to check your file-system.[%s:%d]\n", CFG_FILE_DIR_PATH, __FILE__, __LINE__); + return Cfg_Error_Type_DirPermissionDenied; + } + if( stat(CFG_FILE_DIR_PATH, &st) != 0)/* to make more stable */ + { + /* if (0 != system("sudo mkdir /opt/data/setting/")); */ + /* if (EINA_TRUE != ecore_file_mkpath(CFG_FILE_DIR_PATH)); */ + if (EINA_TRUE != ecore_file_mkdir(CFG_FILE_DIR_PATH)); + { + perror("mkdir"); + return Cfg_Error_Type_Mkdir_Failed; + } + } + + if( stat(CFG_FILE_PATH, &st) != 0) + { + SETTING_TRACE_ERROR("Config file doesn't exist. Create it!"); + if( FALSE == setting_cfg_create() ) + { + /* perror("setting_cfg_create"); */ + return Cfg_Error_Type_CreateCfg_Failed; + } + stat(CFG_FILE_PATH, &st); + } + /* ***BEGIN*** error handle(caused by unstable file system) SAMSUNG 2010/9/10 add*/ + else if (0 == st.st_size || + 0 != access( CFG_FILE_PATH, R_OK|F_OK )) + { + SETTING_TRACE("the %s is 0 Byte, we need to recreate it.", CFG_FILE_PATH); + /* delete the file */ + if (remove(CFG_FILE_PATH) != 0) + { + perror("remove"); + return Cfg_Error_Type_RemoveCfg_Failed; + } + if( FALSE == setting_cfg_create() ) + { + /* perror("setting_cfg_create"); */ + return Cfg_Error_Type_CreateCfg_Failed; + } + + } + /* ****END**** error handle(caused by unstable file system) SAMSUNG 2010/9/10 add + * cfg file exists but invalid -> re-create + * load file into parser + */ + if( FALSE == setting_cfg_file_read() ) + { + /* remove current setting file */ + if (remove(CFG_FILE_PATH) != 0) + { + /* perror("remove"); */ + return Cfg_Error_Type_RemoveCfg_Failed; + } + return Cfg_Error_Type_ReadCfg_Failed; + } + + return Cfg_Error_Type_Sucess; +} +#endif + +int setting_cfg_init( void ) +{ + g_type_init (); + + if (!access(CFG_FILE_PATH, R_OK|W_OK|F_OK )) { // succeed to access + if(!setting_cfg_file_read()) { // return FALSE + if (remove(CFG_FILE_PATH)) { + return Cfg_Error_Type_RemoveCfg_Failed; + } + return Cfg_Error_Type_ReadCfg_Failed; + } + + return Cfg_Error_Type_Sucess; + } else { // fail to access + switch (errno) { + // file non-existing case + case ENOENT: + SETTING_TRACE_ERROR("non-existing file/dir"); + ecore_file_mkdir(CFG_FILE_DIR_PATH); + if (!setting_cfg_create()) { // return FALSE + SETTING_TRACE_ERROR("Error to create a new config file"); + return Cfg_Error_Type_CreateCfg_Failed; + } + if(!setting_cfg_file_read() ) { // return FALSE + if (remove(CFG_FILE_PATH)) { + return Cfg_Error_Type_RemoveCfg_Failed; + } + return Cfg_Error_Type_ReadCfg_Failed; + } + + return Cfg_Error_Type_Sucess; + // other cases + case EACCES: + case EROFS: + default: + return Cfg_Error_Type_DirPermissionDenied; + } + } +} + +void setting_cfg_exit( void ) +{ + json_node_free(root); + g_object_unref (parser); +} + +int setting_cfg_file_update( void ) +{ + if (access( CFG_FILE_PATH, W_OK|F_OK ) !=0 ) + { + return FALSE; + } + return setting_cfg_file_write( root ); +} + +int setting_cfg_get_category_length( void ) +{ + return json_array_get_length( json_node_get_array( root ) ); +} + +char* setting_cfg_get_category_name( int category_index ) +{ + JsonObject * category_obj = json_array_get_object_element( json_node_get_array( root ), category_index ); + return (char*)json_object_get_string_member( category_obj, "name" ); +} + +int setting_cfg_get_menu_length( int category_index ) +{ + JsonObject * category_obj = json_array_get_object_element( json_node_get_array( root ), category_index ); + JsonArray * menu = json_object_get_array_member( category_obj, "menu" ); + return json_array_get_length( menu ); +} + +char * setting_cfg_get_keyname_idx( int category_index, int menu_index ) +{ + JsonObject * category_obj = json_array_get_object_element( json_node_get_array( root ), category_index ); + JsonArray * menu = json_object_get_array_member( category_obj, "menu" ); + JsonObject * menu_item = json_array_get_object_element( menu, menu_index ); + return (char*)json_object_get_string_member( menu_item, "key_name" ); +} + +char * setting_cfg_get_string_field_idx( int category_index, int menu_index, char *field_name) +{ + JsonObject * category_obj = json_array_get_object_element( json_node_get_array( root ), category_index ); + JsonArray * menu = json_object_get_array_member( category_obj, "menu" ); + JsonObject * menu_item = json_array_get_object_element( menu, menu_index ); + + char *data = (char *)json_object_get_string_member( menu_item, field_name ); + if (!safeStrCmp(data, "(null)"))/* pass NULL to ug_args when create setting.cfg. */ + { + return NULL; + } + return data; +} + +int setting_cfg_get_int_field_idx( int category_index, int menu_index , char *field_name) +{ + JsonObject * category_obj = json_array_get_object_element( json_node_get_array( root ), category_index ); + JsonArray * menu = json_object_get_array_member( category_obj, "menu" ); + JsonObject * menu_item = json_array_get_object_element( menu, menu_index ); + return json_object_get_int_member( menu_item, field_name ); +} + +char * setting_cfg_get_icon_path_idx( int category_index, int menu_index ) +{ + return setting_cfg_get_string_field_idx(category_index, menu_index, "icon_path"); +} + +char * setting_cfg_get_ug_args_idx( int category_index, int menu_index ) +{ + return setting_cfg_get_string_field_idx(category_index, menu_index, "ug_args"); +} + +char * setting_cfg_get_ugpath_idx( int category_index, int menu_index ) +{ + return setting_cfg_get_string_field_idx(category_index, menu_index, "ug_path"); +} + +char * setting_cfg_get_ugpath( char * keyname ) +{ + int i, j; + for( i = 0; i < setting_cfg_get_category_length(); i++ ) + { + for( j = 0; j < setting_cfg_get_menu_length( i ); j++ ) + { + if( safeStrCmp( setting_cfg_get_keyname_idx( i, j ), keyname ) == 0 ) + return setting_cfg_get_ugpath_idx( i, j ); + } + } + return NULL; +} + +int setting_cfg_get_pos_idx( int category_index, int menu_index ) +{ + return setting_cfg_get_int_field_idx(category_index, menu_index, "pos"); +} + +int setting_cfg_get_pos( char * keyname ) +{ + int i, j; + for( i = 0; i < setting_cfg_get_category_length(); i++ ) + { + for( j = 0; j < setting_cfg_get_menu_length( i ); j++ ) + { + if( safeStrCmp( setting_cfg_get_keyname_idx( i, j ), keyname ) == 0 ) + return setting_cfg_get_pos_idx( i, j ); + } + } + return 0; +} + +void setting_cfg_set_pos_idx( int category_index, int menu_index, int pos ) +{ + JsonObject * category_obj = json_array_get_object_element( json_node_get_array( root ), category_index ); + JsonArray * menu = json_object_get_array_member( category_obj, "menu" ); + JsonObject * menu_item = json_array_get_object_element( menu, menu_index ); + json_object_remove_member( menu_item, "pos" ); + json_object_set_int_member( menu_item, "pos", pos ); +} + +void setting_cfg_set_pos( char * keyname, int pos ) +{ + int i, j; + for( i = 0; i < setting_cfg_get_category_length(); i++ ) + { + for( j = 0; j < setting_cfg_get_menu_length( i ); j++ ) + { + if( safeStrCmp( setting_cfg_get_keyname_idx( i, j ), keyname ) == 0 ) + { + setting_cfg_set_pos_idx( i, j, pos ); + return ; + } + } + } + +} + +int setting_cfg_get_click_times_idx( int category_index, int menu_index ) +{ + return setting_cfg_get_int_field_idx(category_index, menu_index, "click_times"); +} + +int setting_cfg_get_click_times( char * keyname ) +{ + int i, j; + for( i = 0; i < setting_cfg_get_category_length(); i++ ) + { + for( j = 0; j < setting_cfg_get_menu_length( i ); j++ ) + { + if( safeStrCmp( setting_cfg_get_keyname_idx( i, j ), keyname ) == 0 ) + return setting_cfg_get_click_times_idx( i, j ); + } + } + return 0; +} + +void setting_cfg_set_click_times_idx( int category_index, int menu_index, int click_times ) +{ + JsonObject * category_obj = json_array_get_object_element( json_node_get_array( root ), category_index ); + JsonArray * menu = json_object_get_array_member( category_obj, "menu" ); + JsonObject * menu_item = json_array_get_object_element( menu, menu_index ); + json_object_remove_member( menu_item, "click_times" ); + json_object_set_int_member( menu_item, "click_times", click_times ); +} + +void setting_cfg_set_click_times( char * keyname, int click_times ) +{ + int i, j; + for( i = 0; i < setting_cfg_get_category_length(); i++ ) + { + for( j = 0; j < setting_cfg_get_menu_length( i ); j++ ) + { + if( safeStrCmp( setting_cfg_get_keyname_idx( i, j ), keyname ) == 0 ) + { + setting_cfg_set_click_times_idx( i, j, click_times ); + return ; + } + } + } + +} + +int setting_cfg_get_resetable_flag_idx(int category_index, int menu_index) +{ + return setting_cfg_get_int_field_idx(category_index, menu_index, + "is_resetable"); +} + +void setting_cfg_add_downloaded_app( char *keyname, char *icon_path, char *ug_args, int pos) +{ + int i; + JsonNode *menu_item; + JsonObject *object; + JsonArray *menu; + + for( i=0; i +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +#define EXPORT_FILE "/opt/data/setting/setting_export.xml" + + +//#include + +typedef enum +{ + eBOOL, + eINT, + eSTRING, +}vconftype; + +typedef union { + int i; + bool b; + char* c; +} vconfval; + + +typedef struct VconfNode VconfNode; +struct VconfNode +{ + int key; /** vconf id definded in Setting app */ + const char* vconf_key; /** vconf string defined in libslp-setting */ + vconftype type; /** BOOL, INT, STRING */ + vconfval value; /** variable by union */ + void (*export)(VconfNode* pnode, xmlNodePtr* root_node); /** method for exporting current state */ + void (*import)(VconfNode* pnode, xmlNodePtr* root_node); /** method for importing state from cloud */ +}; + +int get_vconf(VconfNode node, VconfNode* result); + +// export function for each vconf key +void export_default(VconfNode* node, xmlNodePtr* root_node) +{ + if (node) + { + char *val = NULL; + char *type = NULL; + + char arr[1024]; + if(node->vconf_key == NULL) return; /* NO DOTHING IF null */ + VconfNode result; + switch(node->type) + { + case eBOOL: + SETTING_TRACE("EXPORTING key : %s : %d : %d",node->vconf_key, node->type, node->value.b); + // call vconf_get + + get_vconf(*node, &result); + + val = "boolval"; + type = "bool"; + if (result.value.b) + val = "true"; + else + val = "false"; + + break; + case eINT: + SETTING_TRACE("EXPORTING key : %s : %d : %d",node->vconf_key, node->type, node->value.i); + // call vconf_get + get_vconf(*node, &result); + type = "int"; + + SETTING_TRACE(">>(%d)<<",result.value.i); + sprintf(arr, "%d", result.value.i); + //node->value.i + val = arr; + break; + case eSTRING: + SETTING_TRACE("EXPORTING key : %s : %d : %s",node->vconf_key, node->type, node->value.c); + // call vconf_get + get_vconf(*node, &result); + val = result.value.c; + type = "string"; + break; + } + + xmlNodePtr xmlnode = xmlNewChild(*root_node, NULL, BAD_CAST "config", BAD_CAST val); + xmlNewProp(xmlnode, BAD_CAST "key", BAD_CAST node->vconf_key); + xmlNewProp(xmlnode, BAD_CAST "type", BAD_CAST type); + xmlAddChild(*root_node, xmlnode); + } +} + +static void __tree_walk_exported_file(xmlNodePtr cur, + status_handler_fp fp, void* data) +{ + SETTING_TRACE_BEGIN; + xmlNode *cur_node = NULL; + char* key; + char* type; + + // how to get the all size of elements + int total = 0; + for (cur_node = cur; cur_node;cur_node = cur_node->next) { + char* temp = xmlGetProp(cur_node, (const xmlChar *)"key"); + // count only if key is not NULL + if (temp) + total += 1; + } + + int count; + for (count=0, cur_node = cur; cur_node;cur_node = cur_node->next) { + if (cur_node->type == XML_ELEMENT_NODE) { + + char* temp = xmlGetProp(cur_node, (const xmlChar *)"key"); + if (temp) + { + key = (char *)g_strdup((char*)xmlGetProp(cur_node, (const xmlChar *)"key")); + type = (char *)g_strdup((char*) xmlGetProp(cur_node, (const xmlChar *)"type")); + + SETTING_TRACE(" key=%s type=%s value=%s \n", xmlGetProp(cur_node, (const xmlChar *)"key"), + xmlGetProp(cur_node, (const xmlChar *)"type"), + xmlNodeGetContent(cur_node)); + + count += 1; + if (fp) + { + fp(total, count, data); + } + + } + } + } +} + +// /opt/data/setting/aaa.xml +// import function for each vconf key +void import_default(VconfNode* node, xmlNodePtr* root_node) +{ + switch(node->type) + { + case eBOOL: + SETTING_TRACE("IMPORTING key : %s : %d : %d",node->vconf_key, node->type, node->value); + break; + case eINT: + SETTING_TRACE("IMPORTING key : %s : %d : %d",node->vconf_key, node->type, node->value); + break; + case eSTRING: + SETTING_TRACE("IMPORTING key : %s : %d : %s",node->vconf_key, node->type, node->value); + break; + } +} + +/** bool vconf table */ +static VconfNode g_btable[] = { + + {BOOL_SLP_SETTING_POWER_ON_LOCK, VCONFKEY_SETAPPL_STATE_POWER_ON_LOCK_BOOL, eBOOL, {0}, export_default, import_default}, // node[0] + {BOOL_SLP_SETTING_SIMPLE_PASSWORD, VCONFKEY_SETAPPL_STATE_SIMPLE_PASSWORD_BOOL, eBOOL, {0}, export_default, import_default}, // node[0] + + {BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE, VCONFKEY_SETAPPL_STATE_AUTOMATIC_TIME_UPDATE_BOOL, eBOOL,{0}, export_default, import_default}, + + + {BOOL_SLP_SETTING_TRANSACTION_TRACKING, VCONFKEY_SETAPPL_STATE_TRANSACTION_TRACKING_BOOL, eBOOL,{0}, export_default, import_default}, + + + {BOOL_SLP_SETTING_EXPIRY_REMINDER, VCONFKEY_SETAPPL_STATE_EXPIRY_REMINDER_BOOL, eBOOL,{0}, export_default, import_default}, + + //{BOOL_SLP_SETTING_FLIGHT_MODE, VCONFKEY_SETAPPL_FLIGHT_MODE_BOOL, eBOOL,{0}, export_default, import_default}, + {BOOL_SLP_SETTING_FLIGHT_MODE, VCONFKEY_TELEPHONY_FLIGHT_MODE, eBOOL,{0}, export_default, import_default}, + {BOOL_SLP_SETTING_DATA_ROAMING, VCONFKEY_SETAPPL_STATE_DATA_ROAMING_BOOL, eBOOL,{0}, export_default, import_default}, + {BOOL_SLP_SETTING_NFC_STATUS,VCONFKEY_NFC_STATE, eBOOL, {0}, export_default, import_default}, + + {BOOL_SLP_SETTING_USE_PACKET_DATA, VCONFKEY_3G_ENABLE, eBOOL,{0}, export_default, import_default}, + {BOOL_SLP_SETTING_ACCESSIBILITY_HIGH_CONTRAST, VCONFKEY_SETAPPL_ACCESSIBILITY_HIGH_CONTRAST, eBOOL,{0}, export_default, import_default}, + {BOOL_SLP_SETTING_ACCESSIBILITY_SCREEN_ZOOM, VCONFKEY_SETAPPL_ACCESSIBILITY_SCREEN_ZOOM, eBOOL,{0}, export_default, import_default}, + {BOOL_SLP_SETTING_ACCESSIBILITY_ASSISTIVE_LIGHT, VCONFKEY_SETAPPL_ACCESSIBILITY_TORCH_LIGHT, eBOOL,{0}, export_default, import_default}, + {BOOL_SLP_SETTING_ACCESSIBILITY_MONO_AUDIO, VCONFKEY_SETAPPL_ACCESSIBILITY_MONO_AUDIO, eBOOL,{0}, export_default, import_default}, + //{BOOL_SLP_SETTING_ACCESSIBILITY_TURN_OFF_ALL_SOUNDS, VCONFKEY_SETAPPL_TURN_OFF_ALL_SOUNDS_BOOL, eBOOL,{0}, export_default, import_default}, + {BOOL_SLP_SETTING_ACCESSIBILITY_LED_NOTIFY, VCONFKEY_SETAPPL_ACCESSIBILITY_LED_NOTIFY, eBOOL,{0}, export_default, import_default}, + {BOOL_SLP_SETTING_ACCESSIBILITY_ACCEPT_CALL, VCONFKEY_CISSAPPL_ANSWERING_KEY_BOOL, eBOOL,{0}, export_default, import_default}, + {BOOL_SLP_SETTING_ACCESSIBILITY_POWERKEY_END_CALLS, VCONFKEY_CISSAPPL_POWER_KEY_ENDS_CALL_BOOL, eBOOL,{0}, export_default, import_default}, + + //------------------------------------------------------------------------------------------------ + {SETTING_BOOL_SLP_LIST_MAX, NULL, eBOOL, {0}, export_default, import_default}, +}; + + +/** int vconf table */ +static VconfNode g_itable[] = { + {INT_SLP_SETTING_LCD_BRIGHTNESS, VCONFKEY_SETAPPL_LCD_BRIGHTNESS, eINT, {0}, export_default, import_default}, + {INT_SLP_SETTING_LCD_TIMEOUT_NORMAL,VCONFKEY_SETAPPL_LCD_TIMEOUT_NORMAL, eINT, {0}, export_default, import_default}, + {INT_SLP_SETTING_LCD_TIMEOUT_NORMAL_BACKUP,VCONFKEY_LCD_TIMEOUT_NORMAL_BACKUP, eINT, {0}, export_default, import_default}, + + {INT_SLP_SETTING_AUTOMATIC_BRIGHTNESS, VCONFKEY_SETAPPL_BRIGHTNESS_AUTOMATIC_INT, eINT,{0}, export_default, import_default}, + + {INT_SLP_SETTING_SELECT_NETWORK,VCONFKEY_SETAPPL_SELECT_NETWORK_INT, eINT, {0}, export_default, import_default}, + {INT_SLP_SETTING_NETWORK_MODE,VCONFKEY_SETAPPL_NETWORK_MODE_INT, eINT, {0}, export_default, import_default}, + {INT_SLP_SETTING_REGIONFORMAT_TIME1224,VCONFKEY_REGIONFORMAT_TIME1224, eINT, {0}, export_default, import_default}, + {INT_SLP_SETTING_DATE_FORMAT,VCONFKEY_SETAPPL_DATE_FORMAT_INT, eINT, {0}, export_default, import_default}, + {INT_SLP_SETTING_WEEK_FORMAT,VCONFKEY_SETAPPL_WEEKOFDAY_FORMAT_INT, eINT, {0}, export_default, import_default}, + /* CALL_ALERT_TYPE */ +// {INT_SLP_SETTING_CALL_ALERT_TYPE, NULL, eINT, {0}, export_default, import_default}, +// {INT_SLP_SETTING_NORMAL_CALL_ALERT_TYPE, NULL, eINT, {0}, export_default, import_default}, +// {INT_SLP_SETTING_SILENT_CALL_ALERT_TYPE, NULL, eINT, {0}, export_default, import_default}, +// {INT_SLP_SETTING_DRIVING_CALL_ALERT_TYPE, NULL, eINT, {0}, export_default, import_default}, +// {INT_SLP_SETTING_MEETING_CALL_ALERT_TYPE, NULL, eINT, {0}, export_default, import_default}, +// {INT_SLP_SETTING_OUTDOOR_CALL_ALERT_TYPE, NULL, eINT, {0}, export_default, import_default}, + /* CALL_ALERT_VIB */ + {INT_SLP_SETTING_CALL_ALERT_VIB, VCONFKEY_SETAPPL_CALL_VIBRATION_PATTERN_INT, eINT, {0}, export_default, import_default}, +// {INT_SLP_SETTING_NORMAL_CALL_ALERT_VIB, NULL, eINT, {0}, export_default, import_default}, +// {INT_SLP_SETTING_SILENT_CALL_ALERT_VIB, NULL, eINT, {0}, export_default, import_default}, +// {INT_SLP_SETTING_DRIVING_CALL_ALERT_VIB, NULL, eINT, {0}, export_default, import_default}, +// {INT_SLP_SETTING_MEETING_CALL_ALERT_VIB, NULL, eINT, {0}, export_default, import_default}, +// {INT_SLP_SETTING_OUTDOOR_CALL_ALERT_VIB, NULL, eINT, {0}, export_default, import_default}, + + /*****/ +// {INT_SLP_SETTING_CALL_ALERT_VOLUME, NULL, eINT, {0}, export_default, import_default}, + /* MSG_ALERT_TYPE */ +// {INT_SLP_SETTING_MSG_ALERT_TYPE, NULL, eINT, {0}, export_default, import_default}, +// {INT_SLP_SETTING_NORMAL_MSG_ALERT_TYPE, NULL, eINT, {0}, export_default, import_default}, +// {INT_SLP_SETTING_SILENT_MSG_ALERT_TYPE, NULL, eINT, {0}, export_default, import_default}, +// {INT_SLP_SETTING_DRIVING_MSG_ALERT_TYPE, NULL, eINT, {0}, export_default, import_default}, +// {INT_SLP_SETTING_MEETING_MSG_ALERT_TYPE, NULL, eINT, {0}, export_default, import_default}, +// {INT_SLP_SETTING_OUTDOOR_MSG_ALERT_TYPE, NULL, eINT, {0}, export_default, import_default}, +// /* MSG_ALERT_VIB */ +// {INT_SLP_SETTING_MSG_ALERT_VIB, NULL, eINT, {0}, export_default, import_default}, +// {INT_SLP_SETTING_NORMAL_MSG_ALERT_VIB, NULL, eINT, {0}, export_default, import_default}, +// {INT_SLP_SETTING_SILENT_MSG_ALERT_VIB, NULL, eINT, {0}, export_default, import_default}, +// {INT_SLP_SETTING_DRIVING_MSG_ALERT_VIB, NULL, eINT, {0}, export_default, import_default}, +// {INT_SLP_SETTING_MEETING_MSG_ALERT_VIB, NULL, eINT, {0}, export_default, import_default}, +// {INT_SLP_SETTING_OUTDOOR_MSG_ALERT_VIB, NULL, eINT, {0}, export_default, import_default}, + + /*****/ + {INT_SLP_SETTING_MSG_ALERT_REPEAT,VCONFKEY_SETAPPL_NOTI_MSG_ALERT_REP_TYPE_INT, eINT, {0}, export_default, import_default}, + {INT_SLP_SETTING_EMAIL_ALERT_REPEAT,VCONFKEY_SETAPPL_NOTI_EMAIL_ALERT_REP_TYPE_INT, eINT, {0}, export_default, import_default}, + + /*****/ +// {INT_SLP_SETTING_MSG_ALERT_VOLUME, NULL, eINT, {0}, export_default, import_default}, +// {INT_SLP_SETTING_SYS_TOUCH_SOUND, NULL, eINT, {0}, export_default, import_default}, +// {INT_SLP_SETTING_SYS_TOUCH_SOUND_VOLUME, NULL, eINT, {0}, export_default, import_default}, + {INT_SLP_SETTING_FONT_SIZE,VCONFKEY_SETAPPL_FONT_SIZE_INT, eINT, {0}, export_default, import_default}, + {INT_SLP_SETTING_FONT_TYPE,VCONFKEY_SETAPPL_FONT_TYPE_INT, eINT, {0}, export_default, import_default}, + {INT_SLP_SETTING_LANG,VCONFKEY_SETAPPL_LANG_INT, eINT, {0}, export_default, import_default}, + {INT_SLP_SETTING_BT_STATUS,VCONFKEY_BT_STATUS, eINT, {0}, export_default, import_default}, + {INT_SLP_SETTING_WIFI_STATUS,VCONFKEY_WIFI_STATE, eINT, {0}, export_default, import_default}, + //{INT_SLP_SETTING_MOBILE_AP_STATUS,VCONFKEY_MOBILE_HOTSPOT_MODE, eINT, {0}, export_default, import_default}, + {INT_SLP_SETTING_ROAMING_NETWORK,VCONFKEY_SETAPPL_ROAMING_NETWORK_INT, eINT, {0}, export_default, import_default}, + {INT_SLP_SETTING_USB_MODE,VCONFKEY_SETAPPL_USB_MODE_INT, eINT, {0}, export_default, import_default}, +#ifdef UNUSED_VCONFKEY + {INT_SLP_SETTING_TASKSWITCHER_VIEWTYPE,VCONFKEY_TASKSWITCHER_VIEWTYPE, eINT, {0}, export_default, import_default}, +#endif + /* memory */ + {INT_SLP_SETTING_DEFAULT_MEM_WAP,VCONFKEY_SETAPPL_DEFAULT_MEM_WAP_INT, eINT, {0}, export_default, import_default}, + {INT_SLP_SETTING_DEFAULT_MEM_BLUETOOTH,VCONFKEY_SETAPPL_DEFAULT_MEM_BLUETOOTH_INT, eINT, {0}, export_default, import_default}, + {INT_SLP_SETTING_DEFAULT_MEM_CAMERA,VCONFKEY_SETAPPL_DEFAULT_MEM_CAMERA_INT, eINT, {0}, export_default, import_default}, + {INT_SLP_SETTING_DEFAULT_MEM_VOICE_RECORDER,VCONFKEY_SETAPPL_DEFAULT_MEM_VOICE_RECORDER_INT, eINT, {0}, export_default, import_default}, + {INT_SLP_SETTING_DEFAULT_MEM_FM_RADIO,VCONFKEY_SETAPPL_DEFAULT_MEM_FM_RADIO_INT, eINT, {0}, export_default, import_default}, + {INT_SLP_SETTING_DEFAULT_MEM_ALL_SHARE,VCONFKEY_SETAPPL_DEFAULT_MEM_ALL_SHARE_INT, eINT, {0}, export_default, import_default}, + {INT_SLP_SETTING_DEFAULT_MEM_ADOBE_AIR,VCONFKEY_SETAPPL_DEFAULT_MEM_ADOBE_AIR_INT, eINT, {0}, export_default, import_default}, + {INT_SLP_SETTING_DEFAULT_MEM_DVB_H,VCONFKEY_SETAPPL_DEFAULT_MEM_DVB_H_INT, eINT, {0}, export_default, import_default}, + + /* other module */ + {INT_SLP_SETTING_SIM_SLOT,VCONFKEY_TELEPHONY_SIM_SLOT, eINT, {0}, export_default, import_default}, + {INT_SLP_SETTING_PHONE_LOCK_ATTEMPTS_LEFT,VCONFKEY_SETAPPL_PHONE_LOCK_ATTEMPTS_LEFT_INT, eINT, {0}, export_default, import_default}, + {INT_SLP_SETTING_SIM_LOCK_ATTEMPTS_LEFT,VCONFKEY_SETAPPL_SIM_LOCK_ATTEMPTS_LEFT_INT, eINT, {0}, export_default, import_default}, + + // accessibility setting + {INT_SLP_SETTING_ACCESSIBILITY_ENABLE_AUTO_ANSWER, VCONFKEY_CISSAPPL_ANSWERING_MODE_INT, eINT,{0}, export_default, import_default}, + {INT_SLP_SETTING_ACCESSIBILITY_FONT_SIZE, VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, eINT, {0}, export_default, import_default}, +#if SUPPORT_FONT_STYLE + {INT_SLP_SETTING_ACCESSIBILITY_FONT_STYLE,VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_STYLE, eINT, {0}, export_default, import_default}, +#endif + {INT_SLP_SETTING_ACCESSIBILITY_AUTO_ANSWER, VCONFKEY_CISSAPPL_ANSWERING_MODE_TIME_INT, eINT, {0}, export_default, import_default}, + {INT_SLP_SETTING_ACCESSIBILITY_POWER_KEY_HOLD, VCONFKEY_SETAPPL_ACCESSIBILITY_POWER_KEY_HOLD, eINT, {0}, export_default, import_default}, + + //powersaving + {INT_SLP_SETTING_POWERSAVING_AT, VCONFKEY_SETAPPL_PWRSV_CUSTMODE_AT, eINT, {0}, export_default, import_default}, + {INT_SLP_SETTING_POWERSAVING_SCREEN_TIMEOUT, VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BLTIME, eINT, {0}, export_default, import_default}, + {INT_SLP_SETTING_DEVOPTION_BGPROCESS, VCONFKEY_SETAPPL_DEVOPTION_BGPROCESS, eINT, {0}, export_default, import_default}, + + // data usage + {INT_SLP_SETTING_DATAUSAGE_DATA_EACH_MONTH_INT, VCONFKEY_SETAPPL_DATA_EACH_MONTH_INT, eINT, {0}, export_default, import_default}, + {SETTING_INT_SLP_LIST_MAX, NULL, eINT, {0}, export_default, import_default}, +}; + + +/** string vconf table */ +static VconfNode g_stable[] = { + /* password code - special processing */ + { STR_SLP_LIST_PHONE_PASSWORD, NULL, eSTRING,{0}, export_default, import_default }, + { STR_SLP_SETTING_PHONE_LOCK_TIMESTAMP,VCONFKEY_SETAPPL_PHONE_LOCK_TIMESTAMP_STR, eSTRING,{0}, export_default, import_default }, + { STR_SLP_SETTING_SIM_LOCK_TIMESTAMP,VCONFKEY_SETAPPL_SIM_LOCK_TIMESTAMP_STR, eSTRING,{0}, export_default, import_default }, + { STR_SLP_SETTING_SELECT_NUM,VCONFKEY_SETAPPL_SELECTED_NUM, eSTRING,{0}, export_default, import_default }, + { STR_SLP_LIST_MAX, NULL, eSTRING, {0}, export_default, import_default}, +}; + + +/** + * export + */ +int sync_adapter_backup_get_data(void **data, unsigned long long *size) +{ + char *hello_string = "Hello World"; + + *data = strdup(hello_string); + *size = strlen(hello_string); + + return 0; +} + +/** + * import + */ +int sync_adapter_restore_set_data(void *data, unsigned long long size) +{ + + if(size <= 0) + printf("error\n"); + + printf("%s: data is %s\n", __func__, (char *)data); + printf("%s: size is %lld\n", __func__, size); + return 0; +} + + +/** + * cloud --> setting + */ +void setting_import(status_handler_fp fp, void* data) +{ + xmlDocPtr doc; + xmlNodePtr cur; + doc = xmlParseFile(EXPORT_FILE); + + if (doc == NULL ) { + fprintf(stderr,"Document not parsed successfully. \n"); + return; + } + + cur = xmlDocGetRootElement(doc); + if (cur == NULL) { + fprintf(stderr,"empty document\n"); + xmlFreeDoc(doc); + return; + } + + printf("ROOT NODE : %s \n", cur->name); + // make sure root node is "settings" + if (xmlStrcmp(cur->name, (const xmlChar *) "settingconf")) { + SETTING_TRACE("document of the wrong type, root node != settings"); + xmlFreeDoc(doc); + return; + } + + cur = cur->xmlChildrenNode; + + __tree_walk_exported_file(cur, fp, data); + + /* save tree to file */ + if (doc != NULL) { + //xmlSaveFormatFile (docname, doc, 1); + xmlFreeDoc(doc); + } +} + + + + +/** + * setting --> cloud + * + * int status_handler(int total, int current, void* data); + */ +void setting_export(status_handler_fp fp, void* data) +{ + // int sync_adapter_backup_get_data(void **data, unsigned long long *size) + xmlDocPtr doc = NULL; /* document pointer */ + xmlNodePtr root_node = NULL;/* node pointers */ + //xmlDtdPtr dtd = NULL; /* DTD pointer */ + + LIBXML_TEST_VERSION; + + doc = xmlNewDoc(BAD_CAST "1.0"); + root_node = xmlNewNode(NULL, BAD_CAST "settingconf"); + //assert(doc == NULL); + xmlDocSetRootElement(doc, root_node); + + int icount = sizeof(g_itable)/ sizeof(g_itable[0]); + int bcount = sizeof(g_btable)/ sizeof(g_btable[0]); + int scount = sizeof(g_stable)/ sizeof(g_stable[0]); + + int total = icount + bcount + scount; + +#if 1 + int i = 0; + for (i=0;i store data into XML + g_btable[i].export(&g_btable[i], &root_node); + if (fp) + { + fp(total, i, NULL); + } + } + else { + total -= 1; + } + } + + int j=0; + for (j=0;j store data into XML + g_stable[j].export(&g_stable[j], &root_node); + if (fp) + { + fp(total, i+j, NULL); + } + } + else { + total -= 1; + } + } + + int k=0; + for (k=0;k store data into XML + g_itable[k].export(&g_itable[k], &root_node); + if (fp) + { + fp(total, i+j+k, NULL); + } + } + else { + total -= 1; + } + } + +#endif + + // Dumping document to stdio or file + // ./new_tree aaa.xml + //xmlSaveFormatFileEnc(argc > 1 ? argv[1] : "-", doc, "UTF-8", 1); + if (doc == NULL) + { + SETTING_TRACE("doc is NULL "); + } + xmlSaveFormatFileEnc(EXPORT_FILE, doc, "UTF-8", 1); + + // free the document + xmlFreeDoc(doc); + + // Free the global variables that may + // have been allocated by the parser. + xmlCleanupParser(); + + // this is to debug memory for regression tests + xmlMemoryDump(); + + // idea + // create xml file buffer + // data <- the xml buffer + // int sync_adapter_backup_get_data(void **data, unsigned long long *size) +} + + +int set_vconf(VconfNode node,VconfNode *result) +{ + SETTING_TRACE_BEGIN; + int ret = -1 ; + //node.key + //node.vconf_key + *result = node; + switch(node.type) + { + case eBOOL: + SETTING_TRACE("begin case eBOOL[%s=\"%d\"]", node.vconf_key, node.value.b); + ret = vconf_set_bool(node.vconf_key, node.value.b); + result->type = eBOOL; + result->value.b = node.value.b; + break; + case eINT: + SETTING_TRACE("begin case eINT[%s=\"%d\"]", node.vconf_key, node.value.i); + ret = vconf_set_int(node.vconf_key, node.value.i); + result->type = eINT; + result->value.i = node.value.i; + break; + case eSTRING: + if (node.key == STR_SLP_LIST_PHONE_PASSWORD) { + ret = setting_store_init_password(node.value.c); + } else { + SETTING_TRACE("begin case eSTRING[%s=\"%s\"]", node.vconf_key, node.value.c); + ret = vconf_set_str(node.vconf_key, node.value.c); + } + result->type = eSTRING; + result->value.c = node.value.c; + break; + default: + SETTING_TRACE_ERROR(">>>>>>>>>> node.type is NOT DEFINED"); + break; + } + + if (0 != ret) + { + SETTING_TRACE_ERROR(">>>>>>>>>> Failed to set vconf[%s]", node.vconf_key); + } + //SETTING_TRACE("KEY:%d VCONF_KEY=%s TYPE=%d VALUE=%d ", result->key, result->vconf_key, result->type, result->value.i); + return ret; +} + + +int get_vconf(VconfNode node, VconfNode* result) +{ + int ret = -1 ; + + char md_result[SHA256_DIGEST_LENGTH]; + memset(md_result, 0x0, SHA256_DIGEST_LENGTH); + + + *result = node; + + switch(node.type) + { + case eBOOL: + ret = vconf_get_bool(node.vconf_key, (int *)(&(node.value.b))); + result->type = eBOOL; + result->value.b = node.value.b; + break; + case eINT: + ret = vconf_get_int(node.vconf_key, &(node.value.i)); + result->type = eINT; + result->value.i = node.value.i; + break; + case eSTRING: + if (node.key == STR_SLP_LIST_PHONE_PASSWORD) + { + node.value.c = (char*)malloc(sizeof(char) * SHA256_DIGEST_LENGTH); + if (node.value.c) { + memset(node.value.c, 0x0, SHA256_DIGEST_LENGTH); + } else { + SETTING_TRACE_ERROR(" malloc filed : eSTRING, node.value.c "); + ret = SETTING_RETURN_FAIL; + goto endtag; + } + + if (setting_read_password(md_result) == 0) { + memcpy(node.value.c, md_result, SHA256_DIGEST_LENGTH); /* un-safe */ + + result->type = eSTRING; + result->value.c = node.value.c; + ret = SETTING_RETURN_SUCCESS; + } else { + /*do nothing */ + ret = SETTING_RETURN_FAIL; + goto endtag; + } + } else { + node.value.c = vconf_get_str(node.vconf_key); + SETTING_TRACE("string type ---> %s ", node.value.c); + result->type = eSTRING; + result->value.c = node.value.c; + ret = SETTING_RETURN_SUCCESS; + } + break; + default: + SETTING_TRACE_ERROR(">>>>>>>>>>>>>>>>>>>>>>> get vconf ERROR : %s ", node.vconf_key ); + } +endtag: + return ret; +} + +int setting_set_bool_slp_key(setting_bool_slp_list key, int value, int *err) +{ + //SETTING_TRACE_BEGIN; + int ret = SETTING_RETURN_FAIL; + + /* error check */ + if (key < 0 || key >= SETTING_BOOL_SLP_LIST_MAX) { + *err = SETTING_GENERAL_ERR_WRONG_PARAMETER; + return ret; + } + + VconfNode result; + g_btable[key].value.b = value; + ret = set_vconf(g_btable[key],&result); + + SETTING_TRACE("setting_set_bool ::: KEY:%d VCONF_KEY=%s TYPE=%d VALUE=%d ", result.key, result.vconf_key, result.type, result.value.b); + return ret; +} + +int setting_get_bool_slp_key(setting_bool_slp_list key, int *value, int *err) +{ + //SETTING_TRACE_BEGIN; + int ret = SETTING_RETURN_FAIL; + + /* error check */ + if (key < 0 || key >= SETTING_BOOL_SLP_LIST_MAX) { + *err = SETTING_GENERAL_ERR_WRONG_PARAMETER; + SETTING_TRACE_ERROR(" <<<<<<<< key is invalid >>>>>>>>>>>>> "); + return ret; + } + VconfNode result; + ret = get_vconf(g_btable[key], &result); + //*value = g_btable[key].value.b; + *value = result.value.b; + return ret; +} + +int setting_set_int_slp_key(setting_int_slp_list key, int value, int *err) +{ + //SETTING_TRACE_BEGIN; + int ret = SETTING_RETURN_FAIL; + + /* error check */ + if (key < 0 || key >= SETTING_INT_SLP_LIST_MAX) { + *err = SETTING_GENERAL_ERR_WRONG_PARAMETER; + SETTING_TRACE(">>> key is invalid "); + return ret; + } + + VconfNode result; + g_itable[key].value.i = value; + ret = set_vconf(g_itable[key],&result); + *err = ret; + SETTING_TRACE("setting_set_int ::: KEY:%d VCONF_KEY=%s TYPE=%d VALUE=%d ", result.key, result.vconf_key, result.type, result.value.i); + return ret; +} + +/* return -1: fail cannot use err to check the result, return value instead*/ +int setting_get_int_slp_key(setting_int_slp_list key, int *value, int *err) +{ + //SETTING_TRACE_BEGIN; + int ret = SETTING_RETURN_FAIL; + + /* error check */ + if (key < 0 || key >= SETTING_INT_SLP_LIST_MAX) { + *err = SETTING_GENERAL_ERR_WRONG_PARAMETER; + return ret; + } + + VconfNode result; + ret = get_vconf(g_itable[key], &result); + //*value = g_itable[key].value.i; + *value = result.value.i; + + *err = ret; + return ret; +} + +int setting_get_string_slp_key(setting_str_slp_list key, char *value, int *err) +{ + //SETTING_TRACE_BEGIN; + int ret = SETTING_RETURN_FAIL; + + /* error check */ + if (key < 0 || key >= STR_SLP_LIST_MAX || NULL == value) { + *err = SETTING_GENERAL_ERR_WRONG_PARAMETER; + return ret; + } + + /** @todo check memory leack when passwork checking */ + VconfNode result; + ret = get_vconf(g_stable[key], &result); + + if (ret >= 0) + { + safeCopyStr(value, result.value.c, strlen(result.value.c)); + SETTING_TRACE(">>>>>>>> %s <<<<<<<<", value); + FREE(result.value.c); + } else { + SETTING_TRACE("get_vconf is failed"); + } + *err = ret; + return ret; +} + +int setting_set_string_slp_key(setting_str_slp_list key, char *value, int *err) +{ + int ret = SETTING_RETURN_FAIL; + + /* error check */ + if (key < 0 || key >= STR_SLP_LIST_MAX) { + *err = SETTING_GENERAL_ERR_WRONG_PARAMETER; + return ret; + } + + VconfNode result; + g_stable[key].value.c = value; + ret = set_vconf(g_stable[key], &result); + g_stable[key].value.c = ""; + + SETTING_TRACE("setting_set_str ::: KEY:%d VCONF_KEY=%s TYPE=%d VALUE=%d ", result.key, result.vconf_key, result.type, result.value.c); + *err = ret; + return ret; +} + +/** @todo don't use i18n string directly. */ +static const setting_lang_entry lang_table[] = { + { "auto", "Automatic"}, + { "ko_KR.UTF-8", "한국어"}, + { "en_US.UTF-8", "English"}, + { "zh_CN.UTF-8", "简体中文"}, + { "zh_HK.UTF-8", "繁體中文(香港)"}, + { "zh_TW.UTF-8", "繁體中文(台灣)"}, + { "de_DE.UTF-8", "Deutsch"}, + { "nl_NL.UTF-8", "Nederlands"}, + { "es_ES.UTF-8", "Español"}, + { "pt_PT.UTF-8", "Português"}, + { "el_GR.UTF-8", "Eλληνικά"}, + { "it_IT.UTF-8", "Italiano"}, + { "fr_FR.UTF-8", "Français"}, + { "tr_TR.UTF-8", "Türkçe"}, + { "ja_JP.UTF-8", "にほんご"}, + { "ru_RU.UTF-8", "Россию"}, +}; + +setting_lang_entry* setting_get_language_table() +{ + return (setting_lang_entry*)lang_table; +} + + +#define LANGLIST_FILE_DIR_PATH "/opt/data/setting/" +#define LANGLIST_FILE_PATH LANGLIST_FILE_DIR_PATH"langlist.xml" + +static void _parseLangListXML(char* docname); // internal +static void __tree_walk_langlist(xmlNodePtr cur); // internal + +static Eina_List* s_langlist; // internal + +// do it once +int _langlist_load() +{ + SETTING_TRACE_BEGIN; + + if (!s_langlist) + { + _parseLangListXML(LANGLIST_FILE_PATH); + } + + return 0; +} + +// singleton +Eina_List* setting_get_language_list() +{ + if (NULL == s_langlist) + { + _langlist_load(); + } + + return s_langlist; +} + +int _langlist_destroy() +{ + SETTING_TRACE_BEGIN; + Eina_List *li = s_langlist; + setting_lang_entry* node; + while (li) { + node = (setting_lang_entry*) eina_list_data_get(li); + if (node) + { + SETTING_TRACE("destroy nodes : locale : %s title : %s", node->locale, node->title); + G_FREE(node->locale); + G_FREE(node->title); + FREE(node); + } + li = eina_list_next(li); + } + s_langlist = eina_list_free(s_langlist); // returns NULL + + return 0; +} + +void setting_get_language_list_destroy() +{ + _langlist_destroy(); +} + +static void _parseLangListXML(char* docname) +{ + SETTING_TRACE_BEGIN; + xmlDocPtr doc; + xmlNodePtr cur; + + doc = xmlParseFile(docname); + + if (doc == NULL ) { + fprintf(stderr,"Document not parsed successfully. \n"); + return; + } + + cur = xmlDocGetRootElement(doc); + if (cur == NULL) { + fprintf(stderr,"empty document\n"); + xmlFreeDoc(doc); + return; + } + + printf("ROOT NODE : %s \n", cur->name); + // make sure root node is "settings" + if (xmlStrcmp(cur->name, (const xmlChar *) "langlist")) { + SETTING_TRACE("document of the wrong type, root node != settings"); + xmlFreeDoc(doc); + return; + } + + cur = cur->xmlChildrenNode; + __tree_walk_langlist(cur); + + /* save tree to file */ + if (doc != NULL) { + //xmlSaveFormatFile (docname, doc, 1); + xmlFreeDoc(doc); + } + //xmlFreeDoc(doc); + return; +} + +static void __tree_walk_langlist(xmlNodePtr cur) +{ + SETTING_TRACE_BEGIN; + xmlNode *cur_node = NULL; + char* id; + char* string; + int number; + + for (cur_node = cur; cur_node;cur_node = cur_node->next) { + if (cur_node->type == XML_ELEMENT_NODE) { + + SETTING_TRACE(" name=%s title=%s number=%s \n", xmlGetProp(cur_node, (const xmlChar *)"id"), xmlGetProp(cur_node, (const xmlChar *)"string"), xmlGetProp(cur_node, (const xmlChar *)"no")); + id = (char *)g_strdup((char*)xmlGetProp(cur_node, (const xmlChar *)"id")); + string = (char *)g_strdup((char*) xmlGetProp(cur_node, (const xmlChar *)"string")); + number = atoi((char*) xmlGetProp(cur_node, (const xmlChar *)"no")); + SETTING_TRACE(">>>> locale: %s title: %s", (char*)id, (char*)string); + + setting_lang_entry* pitem = (setting_lang_entry*)calloc(1, sizeof(setting_lang_entry)); + pitem->locale = id; + pitem->title = string; + pitem->number = number; + + s_langlist = eina_list_append(s_langlist, pitem); + } + } +} +//----------------------------------------------------------------------------------------------- +//----------------------------------------------------------------------------------------------- + +//setting_lang_entry* + +////////////////////////////////////////////////////////////////////////////////////////// +int setting_store_init_password(char *in) +{ + + SHA256_CTX context; + char md[SHA256_DIGEST_LENGTH] = {0,}; + /* int i = 0; */ + int ret = SETTING_RETURN_FAIL; + + SHA256_Init(&context); + SHA256_Update(&context, (char *)in, strlen(in)); + SHA256_Final((unsigned char *)md, &context); + +#ifdef DEBUG + SETTING_TRACE("input: [%s]\n", in); + SETTING_TRACE("output: ["); + for (i = 0; i < SHA256_DIGEST_LENGTH; i++) + SETTING_TRACE("%02x", md[i]); + SETTING_TRACE("]\n"); +#endif + + /* create a file or store a data */ + /* store_password */ + FILE *fp = NULL; + int ret_fw = 0; + fp = fopen(PWD_FILE, "w+"); + if (fp) { + ret_fw = fwrite(md, 1, SHA256_DIGEST_LENGTH, fp); + SETTING_TRACE_DEBUG("fwrite() wrote %d chars.", ret_fw); + if(ret_fw == SHA256_DIGEST_LENGTH) + { + fflush(fp); + fsync(fp->_fileno); + ret = SETTING_RETURN_SUCCESS; + } + fclose(fp); + } else { + SETTING_TRACE("ERR: pwd file is not exist \n"); + } + + return ret; +} + +int setting_read_password(char *md_result) +{ + SETTING_TRACE_BEGIN; + /* int i; */ + FILE *fp = NULL; + fp = fopen(PWD_FILE, "r"); + if (fp) { + int size = fread(md_result, sizeof(char), SHA256_DIGEST_LENGTH, fp); + if (size != SHA256_DIGEST_LENGTH) { + SETTING_TRACE_ERROR("fread failed"); + } + fclose(fp); + } else { + SETTING_TRACE("ERR: pwd file is not exist \n"); + return SETTING_RETURN_FAIL; + } + +#ifdef DEBUG + SETTING_TRACE("output from file: ["); + for (i = 0; i < SHA256_DIGEST_LENGTH; i++) + SETTING_TRACE("%02x", md_result[i]); + SETTING_TRACE("]\n"); +#endif + SETTING_TRACE_END; + return 0; +} + +int setting_compare_password(char *md_result, const char *in_later) +{ + SETTING_TRACE_BEGIN; + SHA256_CTX context_later; + char md_later[SHA256_DIGEST_LENGTH]; + int ret = SETTING_RETURN_FAIL; + + SHA256_Init(&context_later); + SHA256_Update(&context_later, (char *)in_later, strlen(in_later)); + SHA256_Final((unsigned char *)md_later, &context_later); + + SETTING_TRACE(" :[ %25s ]", in_later); + + if (0 == memcmp(md_later, md_result, SHA256_DIGEST_LENGTH)) { + SETTING_TRACE("two passwords are same \n"); + ret = 0; + } else { + SETTING_TRACE("two passwords are different \n"); + } + return ret; +} + +void setting_destory_listen_list(Eina_List **listened_list) +{ + if (listened_list && *listened_list) + { + Vconf_Change_Node *node = NULL; + Eina_List *li = *listened_list; + while (li) { + node = (Vconf_Change_Node *) eina_list_data_get(li); + if (node) + { + //SETTING_TRACE("Deregister callback[%p] of %s", node->cb, node->in_key); + if (node->in_key && node->cb) { + (void)vconf_ignore_key_changed(node->in_key, node->cb); + FREE(node); + } + } + li = eina_list_next(li); + } + *listened_list = eina_list_free(*listened_list); + } +} + +bool setting_add_listen_node(Eina_List **listened_list,const char *vconf, vconf_callback_fn cb, void *data) +{ + Vconf_Change_Node *node = calloc(1, sizeof(Vconf_Change_Node)); + bool ret = TRUE; + if (node && vconf && cb) + { + node->in_key = vconf; + node->cb = cb; + node->cb_data = data; + + if(0 == vconf_notify_key_changed(vconf, cb, data)) + { + //SETTING_TRACE("Register callback[%p] of %s", node->cb, node->in_key); + *listened_list = eina_list_append(*listened_list, node); + } + else + { + SETTING_TRACE_ERROR("Failed to register callback[%p] of %s", node->cb, node->in_key); + ret = FALSE; + } + } + // FREE(node); /* list node will be freed at the destory function */ + return ret; +} + + diff --git a/setting-common/src/setting-common-draw-genlist.c b/setting-common/src/setting-common-draw-genlist.c new file mode 100755 index 0000000..d2f351e --- /dev/null +++ b/setting-common/src/setting-common-draw-genlist.c @@ -0,0 +1,1794 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include +#include +#include +#include + +static Evas_Object *_gl_Gendial_content_get(void *data, Evas_Object *obj, const char *part); +static char *_gl_Gendial_text_get(void *data, Evas_Object *obj, const char *part); +static void _gl_Gendial_del(void *data, Evas_Object *obj); +const Elm_Genlist_Item_Class itc_seperator = { + .item_style = "dialogue/separator", + .func.text_get = NULL, + .func.content_get = NULL, + .func.state_get = NULL, + .func.del = NULL, +}; + +const Elm_Genlist_Item_Class itc_bottom_seperator = { + .item_style = "dialogue/separator", + .func.text_get = NULL, + .func.content_get = NULL, + .func.state_get = NULL, + .func.del = NULL, +}; + +const Elm_Genlist_Item_Class itc_sep_line = { + .item_style = "dialogue/separator", + .func.text_get = _gl_Gendial_text_get, + .func.content_get = NULL, + .func.state_get = NULL, + .func.del = NULL, +}; + +#define DEFINE_ITC1(style, name) \ +const Elm_Genlist_Item_Class name = {\ + .item_style = style,\ + .func.text_get = _gl_Gendial_text_get,\ + .func.content_get = _gl_Gendial_content_get,\ + .func.state_get = NULL,\ + .func.del = _gl_Gendial_del,\ +}; + +DEFINE_ITC1("dialogue/1text", itc_1text); +DEFINE_ITC1("dialogue/1text.1icon.2", itc_1text_1icon_2); + +DEFINE_ITC1("dialogue/1icon", itc_1icon); +DEFINE_ITC1("dialogue/1text.1icon/expandable2", itc_1icon_1text_sub); +DEFINE_ITC1("dialogue/1text.1icon", itc_1text_1icon); +DEFINE_ITC1("dialogue/1text.2icon", itc_1text_2icon); +DEFINE_ITC1("dialogue/1text.2icon.2", itc_1text_2icon_2); + +DEFINE_ITC1("dialogue/2text.2", itc_2text_2); +DEFINE_ITC1("dialogue/2text", itc_2text); +DEFINE_ITC1("multiline/2text.1icon", itc_multiline_2text_1icon); +DEFINE_ITC1("dialogue/2text.1icon.3", itc_2text_1icon_3); +DEFINE_ITC1("dialogue/2text.1icon.6", itc_2text_1icon_6); +DEFINE_ITC1("dialogue/2text.1icon.10.tb", itc_2text_1icon_7); + +DEFINE_ITC1("dialogue/2text.3/expandable", itc_2text_3_parent); +DEFINE_ITC1("dialogue/2text.3", itc_2text_3); +DEFINE_ITC1("dialogue/2text.2icon.3", itc_2text_2icon_3); + +DEFINE_ITC1("multiline/1text", itc_multiline_text); +DEFINE_ITC1("1text.1icon.3", itc_1text_1icon_3_tb); +DEFINE_ITC1("1text.1icon.2", itc_cm_1text_1icon_2); +DEFINE_ITC1("select_all", itc_sel_all); +//DEFINE_ITC1("dialogue/bg/1icon", itc_bg_1icon); +DEFINE_ITC1("1icon", itc_bg_1icon); +DEFINE_ITC1("dialogue/title", itc_group_item); + +/** + * Do process when clicking on a common genlist item + */ +void setting_mouse_up_Gendial_list_radio_cb(void *data, Evas_Object *obj, + void *event_info) +{ + /* error check */ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + setting_retm_if(data == NULL, "Data parameter is NULL"); + Evas_Object *radio = data; + elm_radio_value_set(radio, list_item->chk_status); +} + +static void __radio_changed(void *data, Evas_Object *obj, void *event_info) +{ + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + list_item->chk_status = elm_radio_value_get(obj); /* for update */ +} + +static void __entry_changed(void *data, Evas_Object *obj, void *event_info) +{ + retm_if(data == NULL, "Data parameter is NULL"); + SETTING_TRACE_BEGIN; + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + list_item->sub_desc = (char *)g_strdup(elm_entry_entry_get(obj)); + Evas_Object *entry_container = elm_object_parent_widget_get(obj); + if (entry_container) + { + if (elm_entry_is_empty(obj)) + { + elm_object_signal_emit(entry_container, "elm,state,guidetext,show", "elm"); + elm_object_signal_emit(entry_container, "elm,state,eraser,hide", "elm"); + } + else + { + elm_object_signal_emit(entry_container, "elm,state,guidetext,hide", "elm"); + if (elm_object_focus_get(obj)) //only do when entry is focused + { + elm_object_signal_emit(entry_container, "elm,state,eraser,show", "elm"); + } + } + } +} + +static void __entry_unfocused(void *data, Evas_Object *obj, void *event_info) // Unfocused callback will show guidetext and hide X marked button. +{ + ret_if(!data); + SETTING_TRACE_BEGIN; + Evas_Object *entry_container = data; + //whe entry unfocused, its guidetext will becomes "Input here" + elm_object_part_text_set(entry_container, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT")); + if (elm_entry_is_empty(obj)) + elm_object_signal_emit(entry_container, "elm,state,guidetext,show", "elm"); + elm_object_signal_emit(entry_container, "elm,state,eraser,hide", "elm"); +} +static void __entry_focused(void *data, Evas_Object *obj, void *event_info) // Focused callback will show X marked button and hide guidetext. +{ + ret_if(!data); + SETTING_TRACE_BEGIN; + Evas_Object *entry_container = data; + //whe entry focused, its guidetext will becomes "Input here" + elm_object_part_text_set(entry_container, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT")); + if (!elm_entry_is_empty(obj)) + elm_object_signal_emit(entry_container, "elm,state,eraser,show", "elm"); + elm_object_signal_emit(entry_container, "elm,state,guidetext,hide", "elm"); + + Ecore_IMF_Context *imf_context = (Ecore_IMF_Context *)elm_entry_imf_context_get(obj); + if (imf_context) ecore_imf_context_input_panel_show(imf_context); +} +static void __eraser_clicked(void *data, Evas_Object *obj, const char *emission, const char *source) // When X marked button is clicked, empty entry's contents. +{ + ret_if(!data); + SETTING_TRACE_BEGIN; + Evas_Object *entry = data; + elm_entry_entry_set(entry, ""); + elm_object_focus_set(entry, EINA_TRUE); +} + +static void __chk_changed(void *data, Evas_Object *obj, void *event_info) +{ + retm_if(data == NULL, "Data parameter is NULL"); + SETTING_TRACE_BEGIN; + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + list_item->chk_status = elm_check_state_get(obj); /* for update */ +} + +static void __error_popup_response_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = data; + if (list_item->notify) { + evas_object_del(list_item->notify); + list_item->notify = NULL; + } +} + +static void __max_len_reached(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + retm_if(!elm_object_focus_get(obj), "Entry is not focused");//notify only when entry is being focused on. + + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + if (!list_item->notify) + { + list_item->notify = setting_create_popup_without_btn(list_item, list_item->win_main, + NULL, _(EXCEED_LIMITATION_STR), + __error_popup_response_cb, + POPUP_INTERVAL, FALSE, FALSE); + elm_object_focus_set(list_item->eo_check, EINA_FALSE); + } else { + //postpone 2 seconds again + elm_popup_timeout_set(list_item->notify, POPUP_INTERVAL); + } + +} + +static void __entry_keydown(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + retm_if(data == NULL, "Data parameter is NULL"); + retm_if(event_info == NULL, "event_info is NULL"); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + Evas_Event_Key_Down *ev = (Evas_Event_Key_Down *)event_info; + SETTING_TRACE_BEGIN; + if(safeStrCmp(ev->key, "KP_Enter") == 0 //it is for Japanese keyboard to fix N_SE-10719 + || safeStrCmp(ev->key, "Return") == 0) //to disable the 'Enter' orginal function + { + SETTING_TRACE("ENTER %s ev->key:%s", __FUNCTION__, ev->key); + list_item->enterKeyPressFlag = true; + //hide the eraser button + //format like:xx
+ if (list_item->isSinglelineFlag == FALSE) { + const char *entry_str = remove_first_substring(elm_entry_entry_get(obj), "
"); + elm_entry_entry_set(obj, entry_str); + FREE(entry_str); + elm_entry_cursor_end_set(obj); + } + setting_hide_input_pannel_cb(obj); + } else { + list_item->enterKeyPressFlag = false; + Evas_Object *entry_container = elm_object_parent_widget_get(obj); + if(safeStrLen(elm_entry_entry_get(obj)) > 0) { + elm_object_signal_emit(entry_container, "elm,state,guidetext,hide", "elm"); + } else { + elm_object_signal_emit(entry_container, "elm,state,guidetext,show", "elm"); + } + } + +} + +/** + * Do process when clicking radio in subitem of expandable item + */ +void setting_sub_list_rd_change(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + list_item->chk_status = elm_radio_value_get(obj); /* for update */ + + Elm_Object_Item *subItem = list_item->item; + Elm_Object_Item *parentItem = elm_genlist_item_parent_get(subItem); + + Setting_GenGroupItem_Data *data_subItem = elm_object_item_data_get(subItem); /* subItem data */ + Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); /* parent data */ + + ret_if(NULL == data_subItem || NULL == data_parentItem); + int err; + setting_set_int_slp_key(data_parentItem->int_slp_setting_binded, + list_item->chk_status, &err); + ret_if(0 != err); + data_parentItem->sub_desc = (char *)g_strdup(_(data_subItem->keyStr)); + elm_object_item_data_set(data_parentItem->item, data_parentItem); + elm_genlist_item_update(data_parentItem->item); +} + +/** + * Do process when clicking on subitem of expandable item + */ +void setting_sub_list_sel_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *subitem = (Elm_Object_Item *) event_info; + Elm_Object_Item *parentItem = elm_genlist_item_parent_get(subitem); + elm_genlist_item_selected_set(subitem, 0); + Setting_GenGroupItem_Data *data_subItem = + elm_object_item_data_get(subitem); + Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); /* parent data */ + ret_if(NULL == data_subItem || NULL == data_parentItem); + + elm_radio_value_set(data_subItem->rgd, data_subItem->chk_status); + int err; + setting_set_int_slp_key(data_parentItem->int_slp_setting_binded, + data_subItem->chk_status, &err); + setting_retm_if(0 != err, "Set vconf error[%d]",data_parentItem->int_slp_setting_binded); + + data_parentItem->sub_desc = (char *)g_strdup(_(data_subItem->keyStr)); + elm_object_item_data_set(data_parentItem->item, data_parentItem); + elm_genlist_item_update(data_parentItem->item); +} + +static void __exp_list_smart_cb(void *data, Evas_Object *obj, void *event_info) +{ + ret_if(data == NULL || event_info == NULL); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + char *cb_type = data; + + if (0 == safeStrCmp(cb_type, "drag") + || 0 == safeStrCmp(cb_type, "longpressed")) { + //Evas_Object *base_view = (Evas_Object *) elm_genlist_item_object_get(item); + //edje_object_signal_emit(base_view, "mouse,out", "touch_arrow"); + } else if (0 == safeStrCmp(cb_type, "contracted")) { + elm_genlist_item_subitems_clear(item); + } +} + +static void _gl_Gendial_sel(void *data, Evas_Object *obj, void *event_info) +{ + /* SETTING_TRACE_BEGIN; */ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); +} + +static void _gl_Gendial_sel_expand(void *data, Evas_Object *obj, + void *event_info) +{ + /* SETTING_TRACE_BEGIN; */ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + bool status = !elm_genlist_item_expanded_get(item); + elm_genlist_item_expanded_set(item, status); +} + +static char *_gl_Gendial_text_get(void *data, Evas_Object *obj, + const char *part) +{ + /* SETTING_TRACE_BEGIN; */ + Setting_GenGroupItem_Data *item_data = + (Setting_GenGroupItem_Data *) data; + /* SETTING_TRACE("part:%s", part); */ + if (SWALLOW_Type_LAYOUT_ENTRY == item_data->swallow_type) { /* no need to create 'text' part */ + return NULL; + } + + /* for font size view */ + if (SWALLOW_Type_1RADIO_1LABLE == item_data->swallow_type) { + char speciliztion[MAX_SPECIALIZITION_LEN] = {0,}; + int font_size = -1; + SETTING_TRACE("item_data->chk_status:%d", item_data->chk_status); + if (SYSTEM_SETTINGS_FONT_SIZE_SMALL == item_data->chk_status) { + font_size = LABEL_FONT_SIZE_SMALL; + } else if (SYSTEM_SETTINGS_FONT_SIZE_LARGE == item_data->chk_status) { + font_size = LABEL_FONT_SIZE_LARGE; + } else if (SYSTEM_SETTINGS_FONT_SIZE_HUGE == item_data->chk_status) { + font_size = LABEL_FONT_SIZE_HUGE; + } else if (SYSTEM_SETTINGS_FONT_SIZE_GIANT == item_data->chk_status) { + font_size = LABEL_FONT_SIZE_GIANT; + } else { + font_size = LABEL_FONT_SIZE_NORMAL; + } + SETTING_TRACE("font_size:%d", font_size); + snprintf(speciliztion, sizeof(speciliztion), "%s", + font_size, _(item_data->keyStr)); + return (char *)g_strdup(speciliztion); + } + + if (!safeStrCmp(part, "elm.text") || !safeStrCmp(part, "elm.text.1")) { /* title */ + if (item_data->keyStr) { + return (char *)g_strdup(_(item_data->keyStr)); /* use item_data->keyStr */ + } + + } else if (!safeStrCmp(part, "elm.text.2")) { /* bottom or right */ + if (item_data->sub_desc) { + return (char *)g_strdup(item_data->sub_desc); + } + } + + return NULL; +} + +static Evas_Object *__add_check(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent, NULL); + Evas_Object *check = elm_check_add(parent); + elm_check_state_set(check, item_data->chk_status); + evas_object_show(check); + evas_object_pass_events_set(check, 1); + evas_object_propagate_events_set(check, 0); + + item_data->eo_check = check; + + if (item_data->chk_change_cb) { + evas_object_smart_callback_add(check,"changed",item_data->chk_change_cb,item_data); + } else { + evas_object_smart_callback_add(check,"changed", __chk_changed, item_data); + } + return check; +} +static Evas_Object *__add_check_icon(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent, NULL); + Evas_Object *check = __add_check(item_data, parent); + + Evas_Object *thumb = NULL; + if (item_data->r_swallow_path) { + thumb = elm_icon_add(parent); + elm_icon_file_set(thumb, + item_data->r_swallow_path, + NULL); + evas_object_size_hint_aspect_set(thumb, + EVAS_ASPECT_CONTROL_VERTICAL, + 1, 1); + } + + Evas_Object *layout = elm_layout_add(parent); + elm_layout_file_set(layout, SETTING_THEME_EDJ_NAME, + "thumbnail_icon2"); + evas_object_size_hint_weight_set(layout, + EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + elm_object_part_content_set(layout, "checkbox", check); + elm_object_part_content_set(layout, "thumbnail", thumb); + evas_object_show(layout); + return layout; +} +static Evas_Object *__add_toggle(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent, NULL); + Evas_Object *check = __add_check(item_data, parent); + elm_object_style_set(check, "on&off"); + return check; +} +static Evas_Object *__add_multiline_toggle(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent, NULL); + Evas_Object *chk = __add_toggle(item_data, parent); + elm_object_style_set(chk, "on&off"); + return chk; +} + +static Evas_Object *__add_radio(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent, NULL); + if (!item_data->rgd) { /* exceptional handling */ + item_data->rgd = elm_radio_add(parent); + elm_radio_state_value_set(item_data->rgd, -1); + } + Evas_Object *radio = elm_radio_add(parent); + elm_radio_state_value_set(radio, + item_data->chk_status); + elm_radio_group_add(radio, item_data->rgd); + evas_object_show(radio); + item_data->eo_check = radio; + if (item_data->chk_change_cb) { + evas_object_smart_callback_add(radio, + "changed", + item_data->chk_change_cb, + item_data); + } else { + evas_object_smart_callback_add(radio, + "changed", + __radio_changed, + item_data); + } + return radio; +} +static Evas_Object *__add_button(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent, NULL); + Evas_Object *btn = elm_button_add(parent); + evas_object_show(btn); + if (item_data->r_swallow_path) + { + elm_object_style_set(btn, item_data->r_swallow_path); + } + if (item_data->keyStr) + { + elm_object_text_set(btn, _(item_data->keyStr)); + } + evas_object_propagate_events_set(btn, EINA_FALSE); + if (item_data->chk_change_cb) + evas_object_smart_callback_add(btn, + "clicked", + item_data->chk_change_cb, + item_data); + return btn; +} + +static Evas_Object *__add_entry(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent, NULL); + elm_genlist_mode_set(parent, ELM_LIST_COMPRESS); /* resolve abnormal height issue */ + Evas_Object *ed_name = + setting_create_editfiled(parent, _(item_data->keyStr), item_data->sub_desc); + evas_object_pass_events_set(ed_name, 1); + evas_object_propagate_events_set(ed_name, 0); + Evas_Object *entry = elm_object_part_content_get(ed_name, "elm.swallow.content"); + item_data->eo_check = entry; + elm_entry_input_panel_layout_set(entry, item_data->input_type); + + if (item_data->isSinglelineFlag) { + elm_entry_scrollable_set(entry, EINA_TRUE); + elm_entry_single_line_set(entry, EINA_TRUE); + } + + if (item_data->isPasswordFlag) { + elm_entry_single_line_set(entry, EINA_TRUE); + elm_entry_password_set(entry, EINA_TRUE); + } + + if (item_data->limit_filter_data) { + elm_entry_markup_filter_append + (entry, + elm_entry_filter_limit_size, + item_data->limit_filter_data); + + if (item_data->maxlength_reached_cb) { + evas_object_smart_callback_add(entry, + "maxlength,reached", + item_data->maxlength_reached_cb, + item_data); + } else { + evas_object_smart_callback_add(entry, + "maxlength,reached", + __max_len_reached, + item_data); + } + } + if (item_data->stop_change_cb) {//invoked when stop focusing on + evas_object_smart_callback_add(entry, + "unfocused", + item_data->stop_change_cb, + item_data); + } + else + { + evas_object_smart_callback_add(entry, + "unfocused", + __entry_unfocused, + ed_name); + } + if (item_data->digits_filter_data) { + elm_entry_markup_filter_append + (entry, + elm_entry_filter_accept_set, + item_data->digits_filter_data); + } + + /* for Setting App, All the entrys's context popup shouldn't be able */ + /* to insert images, text is the only one can be inserted. */ + elm_entry_cnp_mode_set(entry, ELM_CNP_MODE_PLAINTEXT); + + if (item_data->chk_change_cb) { + evas_object_smart_callback_add + (entry, + "changed", item_data->chk_change_cb, + item_data); + } + //default handle + evas_object_smart_callback_add(entry, "changed", __entry_changed, item_data); + evas_object_smart_callback_add(entry, "focused", __entry_focused, ed_name); + elm_object_signal_callback_add(ed_name, "elm,eraser,clicked", "elm", __eraser_clicked, entry); + + if (item_data->start_change_cb) { + evas_object_event_callback_add(entry, EVAS_CALLBACK_KEY_DOWN, (Evas_Object_Event_Cb)(item_data->start_change_cb), item_data->userdata); + } + evas_object_event_callback_add(entry, EVAS_CALLBACK_KEY_DOWN, __entry_keydown, item_data); + + Ecore_IMF_Context *imf_context = (Ecore_IMF_Context *)elm_entry_imf_context_get(entry); + if (imf_context) ecore_imf_context_input_panel_event_callback_add(imf_context, ECORE_IMF_INPUT_PANEL_STATE_EVENT, item_data->x_callback_cb, item_data->userdata); + + if (item_data->input_panel_disable_flag) { + elm_entry_input_panel_enabled_set(entry, EINA_FALSE); + } + return ed_name; +} +static Evas_Object *__add_slider(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent, NULL); + Evas_Object *li_slider = + setting_create_slider(parent, item_data->evas, + item_data->l_swallow_path, + item_data->r_swallow_path, + item_data->chk_status, + item_data->isIndicatorVisible, + item_data->slider_min, + item_data->slider_max, + item_data->chk_change_cb, + item_data->start_change_cb, + item_data->stop_change_cb, + item_data); + evas_object_pass_events_set(li_slider, 1); + evas_object_propagate_events_set(li_slider, 0); + item_data->eo_check = li_slider; + return li_slider; +} + +static Evas_Object *__add_datefield(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent, NULL); + /* **********create time/date field */ + Evas_Object *datetimefield = item_data->eo_check = elm_datetime_add(parent); + evas_object_size_hint_weight_set(datetimefield, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(datetimefield, EVAS_HINT_FILL, 0.5); + evas_object_show(datetimefield); + + evas_object_pass_events_set(datetimefield, 1); + evas_object_propagate_events_set(datetimefield, 0); + + char date_format[MAX_DATETIME_FORMAT_LEN + 1] = {0, }; + const char *time_format = NULL; + if (item_data->chk_status)//12 hours + { + time_format = "%I : %M %p"; + } else { //24 hours + time_format = "%H : %M"; + } + +#if SUPPORT_DATEFIELD_DATE_FORMAT_AUTOSET //Get date-format from datefiled itself, if elm_datetime_add() supports set date-format via ICU. + char *old_format = elm_datetime_format_get(datetimefield); + snprintf(date_format, MAX_DATE_FORMAT_LEN + 1, //add one space " " + "%s", old_format); + safeStrNCat(date_format, time_format, MAX_DATETIME_FORMAT_LEN); + FREE(old_format); + SETTING_TRACE("datefield_format:%s", date_format); +#else + snprintf(date_format, MAX_DATETIME_FORMAT_LEN, + "%s %s", item_data->sub_desc, time_format); +#endif + elm_datetime_format_set(datetimefield, date_format); + + // min : 1970 1, 01, Thursday 00:00:00 + // max : 2038 1, 19, Thursday 03:14:07 + struct tm ts_ret; + memset(&ts_ret, 0, sizeof(struct tm)); + ts_ret.tm_year = 138; + ts_ret.tm_mon = 1; + ts_ret.tm_mday = 19; + elm_datetime_value_max_set(datetimefield, &ts_ret); + + ts_ret.tm_year = 70; + ts_ret.tm_mon = 0; + ts_ret.tm_mday = 1; + elm_datetime_value_min_set(datetimefield, &ts_ret); + + + time_t ctime = time(NULL); + //struct tm ts_ret; + struct tm *ts = localtime_r(&ctime, &ts_ret); + retv_if(!ts, NULL); + + elm_datetime_value_set(datetimefield, &ts_ret); + + if (item_data->chk_change_cb) { + evas_object_smart_callback_add(datetimefield, + "changed", + item_data->chk_change_cb, + item_data); + } + + if (item_data->isItemDisableFlag) { + setting_disable_evas_object(datetimefield); + } + return datetimefield; +} +static Evas_Object *__add_radio_search(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent, NULL); + Evas_Object *box = elm_box_add(parent); + elm_box_horizontal_set(box, 1); + + //a.radio.. + Evas_Object *radio = __add_radio(item_data, parent); + setting_disable_evas_object(radio); + elm_box_pack_end(box, radio); + + //b.separator.. + Evas_Object *separator = + setting_create_blank_rect_customize(box, + SETTING_HALF_SCREEN_WIDTH, + SETTING_PADDING_HEIGHT); + elm_box_pack_end(box, separator); + + //c.progressbar.. + Evas_Object *progressbar = elm_progressbar_add(parent); + elm_object_style_set(progressbar, "list_process"); + evas_object_size_hint_align_set(progressbar, + EVAS_HINT_FILL, 0.5); + evas_object_size_hint_weight_set(progressbar, + EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + elm_progressbar_pulse(progressbar, EINA_TRUE); + evas_object_show(progressbar); + elm_box_pack_end(box, progressbar); + + evas_object_show(box); + return box; +} +static Evas_Object *__add_search(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent, NULL); + // added by JTS: CQ H0100135171 + Evas_Object *box = elm_box_add(parent); + elm_box_horizontal_set(box, 1); + + //b.separator.. + Evas_Object *separator = + setting_create_blank_rect_customize(box, + SETTING_HALF_SCREEN_WIDTH, SETTING_PADDING_HEIGHT); + elm_box_pack_end(box, separator); + + //c.progressbar.. + Evas_Object *progressbar = elm_progressbar_add(parent); + elm_object_style_set(progressbar, "list_process"); + evas_object_size_hint_align_set(progressbar, EVAS_HINT_FILL, 0.5); + evas_object_size_hint_weight_set(progressbar, + EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_progressbar_pulse(progressbar, EINA_TRUE); + evas_object_show(progressbar); + elm_box_pack_end(box, progressbar); + + evas_object_show(box); + return box; + +} +static Evas_Object *__add_process(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent, NULL); + Evas_Object *progressbar = elm_progressbar_add(parent); + elm_object_style_set(progressbar, "list_process"); + evas_object_size_hint_align_set(progressbar, + EVAS_HINT_FILL, 0.5); + evas_object_size_hint_weight_set(progressbar, + EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + elm_progressbar_pulse(progressbar, EINA_TRUE); + evas_object_show(progressbar); + return progressbar; +} + +static Evas_Object *__add_radio_lable(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent, NULL); + + //a.radio.. + Evas_Object *radio = __add_radio(item_data, parent); + + return radio; +} + +static Evas_Object *__add_left_default(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent || !item_data->l_swallow_path, NULL); + Evas_Object *icon = elm_icon_add(parent); + elm_icon_file_set(icon, item_data->l_swallow_path,NULL); + evas_object_size_hint_aspect_set(icon,EVAS_ASPECT_CONTROL_VERTICAL,1, 1); + return icon; +} +static Evas_Object *__add_right_default(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent || !item_data->r_swallow_path, NULL); + Evas_Object *icon = elm_icon_add(parent); + elm_icon_file_set(icon, item_data->r_swallow_path,NULL); + evas_object_size_hint_aspect_set(icon,EVAS_ASPECT_CONTROL_VERTICAL,1, 1); + return icon; +} + +// draw handler +typedef Evas_Object * (*__drawer_fp)(Setting_GenGroupItem_Data *item_data, Evas_Object *parent); +typedef struct +{ + SWALLOW_Type type; // ui type + __drawer_fp draw; +} __Content_Drawer; +static __Content_Drawer __cd_left[SWALLOW_Type_MAX] = { + //base objects + {SWALLOW_Type_1CHECK, __add_check}, + {SWALLOW_Type_1TOGGLE, __add_toggle}, + {SWALLOW_Type_1RADIO, __add_radio}, + {SWALLOW_Type_1BUTTON, __add_button}, + + //base objects in an layout + {SWALLOW_Type_LAYOUT_ENTRY, __add_entry}, + {SWALLOW_Type_LAYOUT_SLIDER, __add_slider}, + {SWALLOW_Type_LAYOUT_DATEFIELD, __add_datefield}, + + //other compelx objects + {SWALLOW_Type_1SEARCH, __add_search}, + {SWALLOW_Type_1PROCESS, __add_process}, + {SWALLOW_Type_MULTILINE_1TOGGLE, __add_multiline_toggle}, + {SWALLOW_Type_1CHECKICON, __add_check_icon}, + {SWALLOW_Type_1RADIO_1SEARCH, __add_radio_search}, + {SWALLOW_Type_1RADIO_1LABLE, __add_radio_lable}, + + //left part object of the type + {SWALLOW_Type_1ICON_1RADIO, __add_left_default}, + {SWALLOW_Type_1ICON_1PROCESS, __add_left_default}, + {SWALLOW_Type_1RADIO_1PROCESS, __add_radio}, +}; +static __Content_Drawer __cd_right[SWALLOW_Type_MAX] = { + //right part object of the type + {SWALLOW_Type_1ICON_1RADIO, __add_toggle}, + {SWALLOW_Type_1ICON_1PROCESS, __add_process}, + {SWALLOW_Type_1RADIO_1PROCESS, __add_process}, +}; + +static __Content_Drawer __cd_end[SWALLOW_Type_MAX] = { + //end part object of the type + {SWALLOW_Type_1RADIO, __add_radio}, +}; +/*static __Part_Drawer __pd[__MAX_PART_NUM] = { + {"elm.icon", __cd_left}, + {"elm.icon.1", __cd_left}, + {"elm.icon.2", __cd_right}, + {"elm.swallow.end", __cd_end}, +};*/ + +static Evas_Object *_gl_Gendial_content_get(void *data, Evas_Object *obj, + const char *part) +{ + retv_if(!data, NULL); + Setting_GenGroupItem_Data *item_data = data; + retv_if(!data, NULL); + __Content_Drawer *cd_list = NULL; + __drawer_fp fp = NULL; + if (!safeStrCmp(part, "elm.icon") || !safeStrCmp(part, "elm.icon.1")) + { + fp = __add_left_default; //hold default drawer + cd_list = __cd_left; + } + else if (!safeStrCmp(part, "elm.icon.2")) + { + fp = __add_right_default; //hold default drawer + cd_list = __cd_right; + } + else if (!safeStrCmp(part, "elm.swallow.end")) + { + //the default value of fp is NULL here + cd_list = __cd_end; + } + if (!cd_list) return NULL;//invalid part + + int idx = 0; + for (; idx < SWALLOW_Type_MAX; idx++) + { + if (item_data->swallow_type == cd_list[idx].type)//match using swallow type + { + fp = cd_list[idx].draw; + break; + } + } + return fp ? fp(item_data, obj) : NULL; +} + +static void _gl_Gendial_del(void *data, Evas_Object *obj) +{ + /* SETTING_TRACE_BEGIN; */ + Setting_GenGroupItem_Data *item_data = + (Setting_GenGroupItem_Data *) data; + if (item_data) { + G_FREE(item_data->keyStr); + G_FREE(item_data->sub_desc); + G_FREE((item_data->l_swallow_path)); + G_FREE((item_data->r_swallow_path)); + G_FREE(item_data->item_style); + + + if (item_data->digits_filter_data) + { + G_FREE(item_data->digits_filter_data->accepted); + G_FREE(item_data->digits_filter_data->rejected); + FREE(item_data->digits_filter_data); + + } + + if (item_data->notify) { + evas_object_del(item_data->notify); + item_data->notify = NULL; + } + + FREE(item_data->limit_filter_data); + __BACK_POINTER_UNSET(item_data); + FREE(item_data); + } + /* SETTING_TRACE_END; */ +} + +/** + * To intialize an Elm_Genlist_Item_Class, according to item style + * + * @param[in] item_style + * @param[in/out] itc + */ +bool setting_create_Gendial_itc(const char *item_style, + Elm_Genlist_Item_Class *itc) +{ + itc->item_style = item_style; + itc->func.text_get = _gl_Gendial_text_get; + itc->func.content_get = _gl_Gendial_content_get; + itc->func.state_get = NULL; + itc->func.del = _gl_Gendial_del; /* _gl_Gendial_del; */ + return TRUE; +} + +/** + * Create group style item + * + * @return a pointer to Setting_GenGroupItem_Data + */ +Setting_GenGroupItem_Data *setting_create_Gendial_field_group_titleItem(Evas_Object *genlist, + const Elm_Genlist_Item_Class *itc, + Elm_Object_Item *parent, + Elm_Genlist_Item_Type flag, /* ELM_GENLIST_ITEM_GROUP or ELM_GENLIST_ITEM_NONE */ + const char *keyStr, + setting_call_back_func gl_sel) +{ + /* SETTING_TRACE_BEGIN; */ + Setting_GenGroupItem_Data *item_data = + (Setting_GenGroupItem_Data *) calloc(1, + sizeof + (Setting_GenGroupItem_Data)); + setting_retvm_if(!item_data, NULL, "calloc failed"); + item_data->keyStr = (char *)g_strdup(keyStr); + if (gl_sel) { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, parent, + flag, gl_sel, NULL); + } else { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, parent, + flag, _gl_Gendial_sel, NULL); + } + return item_data; +} + +/** + * Create separator style item with title + * + * @return a pointer to Setting_GenGroupItem_Data + */ +Setting_GenGroupItem_Data *setting_create_Gendial_field_titleItem( + Evas_Object *genlist, + const Elm_Genlist_Item_Class *itc, + const char *keyStr, + setting_call_back_func gl_sel) +{ + /* SETTING_TRACE_BEGIN; */ + Setting_GenGroupItem_Data *item_data = + (Setting_GenGroupItem_Data *) calloc(1, + sizeof + (Setting_GenGroupItem_Data)); + setting_retvm_if(!item_data, NULL, "calloc failed"); + item_data->keyStr = (char *)g_strdup(keyStr); + if (gl_sel) { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, NULL, + ELM_GENLIST_ITEM_NONE, gl_sel, + NULL); + } else { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, NULL, + ELM_GENLIST_ITEM_NONE, + _gl_Gendial_sel, NULL); + } + return item_data; +} + +/** + * Create 1radio-1text style item + * + * @return a pointer to Setting_GenGroupItem_Data + */ + +Setting_GenGroupItem_Data *setting_create_Gendial_field_1radio( + Evas_Object *genlist, + const Elm_Genlist_Item_Class *itc, + setting_call_back_func gl_sel, + void *sel_data, + SWALLOW_Type swallow_type, + Evas_Object *rgd, int chk_status, + const char *keyStr, + setting_call_back_func chk_change_cb) +{ + /* SETTING_TRACE_BEGIN; */ + Setting_GenGroupItem_Data *item_data = + (Setting_GenGroupItem_Data *) calloc(1, + sizeof + (Setting_GenGroupItem_Data)); + setting_retvm_if(!item_data, NULL, "calloc failed"); + item_data->keyStr = (char *)g_strdup(keyStr); + item_data->swallow_type = swallow_type; + item_data->chk_status = chk_status; + item_data->chk_change_cb = chk_change_cb; + item_data->rgd = rgd; + + if (gl_sel) { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, NULL, + ELM_GENLIST_ITEM_NONE, gl_sel, + sel_data); + } else { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, NULL, + ELM_GENLIST_ITEM_NONE, + _gl_Gendial_sel, sel_data); + } + return item_data; +} + +Setting_GenGroupItem_Data *setting_create_Gendial_field_2radio( + Evas_Object *genlist, + const Elm_Genlist_Item_Class *itc, + setting_call_back_func gl_sel, + void *sel_data, + SWALLOW_Type swallow_type, + Evas_Object *rgd, int chk_status, + const char *keyStr, + const char *sub_desc, + setting_call_back_func chk_change_cb) +{ + /* SETTING_TRACE_BEGIN; */ + Setting_GenGroupItem_Data *item_data = + (Setting_GenGroupItem_Data *) calloc(1, + sizeof + (Setting_GenGroupItem_Data)); + setting_retvm_if(!item_data, NULL, "calloc failed"); + item_data->keyStr = (char *)g_strdup(keyStr); + item_data->sub_desc = (char *)g_strdup(sub_desc); + item_data->swallow_type = swallow_type; + item_data->chk_status = chk_status; + item_data->chk_change_cb = chk_change_cb; + item_data->rgd = rgd; + + if (gl_sel) { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, NULL, + ELM_GENLIST_ITEM_NONE, gl_sel, + sel_data); + } else { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, NULL, + ELM_GENLIST_ITEM_NONE, + _gl_Gendial_sel, sel_data); + } + return item_data; +} + +/** + * Create common style item with menu icon + * + * @return a pointer to Setting_GenGroupItem_Data + */ +Setting_GenGroupItem_Data *setting_create_Gendial_field_groupitem( + Evas_Object *genlist, + const Elm_Genlist_Item_Class *itc, + Elm_Object_Item *parent, + setting_call_back_func gl_sel, + void *sel_data, + SWALLOW_Type swallow_type, + char *l_icon_path, + char *r_icon_path, int chk_status, + const char *keyStr, char *sub_desc, + setting_call_back_func + chk_change_cb) +{ +// SETTING_TRACE_BEGIN; + Setting_GenGroupItem_Data *item_data = ( + Setting_GenGroupItem_Data *) calloc(1, sizeof(Setting_GenGroupItem_Data)); + setting_retvm_if(!item_data, NULL, "calloc failed"); + + /* to do formatting customizition in one place */ + if (SWALLOW_Type_LAYOUT_SPECIALIZTION == swallow_type + || SWALLOW_Type_LAYOUT_SPECIALIZTION_X == swallow_type) { + elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS); + + char speciliztion[MAX_SPECIALIZITION_LEN] = { 0, }; + char* temp1 = (char *)keyStr; + char*temp2 = strchr(temp1, '&'); + char* temp = NULL; + + while (NULL != temp2) { + if (0 == safeStrNCmp(temp2, "&", strlen("&")) ||//'&' + 0 == safeStrNCmp(temp2, "<", strlen("<")) ||//'<' + 0 == safeStrNCmp(temp2, ">", strlen(">")) ||//'>' + 0 == safeStrNCmp(temp2, """, strlen(""")) ||//double quotes + 0 == safeStrNCmp(temp2, "'", strlen("'")) ||//single quotes + 0 == safeStrNCmp(temp2, " ", strlen(" ")) ||//space character + 0 == safeStrNCmp(temp2, "©", strlen("©")) ||//copyright character + 0 == safeStrNCmp(temp2, "®", strlen("®"))//registeration character + ) {//escape character,do nothing + temp = temp2 + 1; + if ('\0' == temp[0]) break; + temp2 = strchr(temp, '&'); + } + else + { + g_strlcat(speciliztion, temp1, temp2 - temp1 +1); + g_strlcat(speciliztion, "&", MAX_SPECIALIZITION_LEN); + temp1 = temp2 + 1; + if ('\0' == temp1[0]) break; + temp2 = strchr(temp1, '&'); + } + } + if ('\0' != temp1[0]) { + g_strlcat(speciliztion, temp1, MAX_SPECIALIZITION_LEN); + } + + + item_data->keyStr = (char *)g_strdup(speciliztion); + } else { + item_data->keyStr = (char *)g_strdup(keyStr); + } + + item_data->sub_desc = (char *)g_strdup(sub_desc); + item_data->swallow_type = swallow_type; + item_data->l_swallow_path = (char *)g_strdup(l_icon_path); + item_data->r_swallow_path = (char *)g_strdup(r_icon_path); + item_data->chk_status = chk_status; + item_data->chk_change_cb = chk_change_cb; + + if (gl_sel) { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, parent, + ELM_GENLIST_ITEM_NONE, gl_sel, + sel_data); + } else { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, parent, + ELM_GENLIST_ITEM_NONE, + _gl_Gendial_sel, sel_data); + + //help text clicking issue + elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } + if (SWALLOW_Type_LAYOUT_SPECIALIZTION == swallow_type) { + Elm_Object_Item *item = elm_genlist_item_append(genlist, + &(itc_sep_line), + NULL, NULL, + ELM_GENLIST_ITEM_NONE, + NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + //Fix the separator line disappear issue when clicking "SPECIALIZTION" words in new HD theme + elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } + + return item_data; +} + +/** + * Common function to create a genlist item + * @return a pointer to Setting_GenGroupItem_Data + */ +Setting_GenGroupItem_Data *setting_create_Gendial_field_def(Evas_Object * + genlist, + const Elm_Genlist_Item_Class *itc, + setting_call_back_func + gl_sel, + void *sel_data, + SWALLOW_Type + swallow_type, + char *l_icon_path, + char *r_icon_path, + int chk_status, + const char *keyStr, + char *sub_desc, + setting_call_back_func chk_change_cb) +{ + return setting_create_Gendial_field_groupitem(genlist, itc, NULL, + gl_sel, sel_data, + swallow_type, l_icon_path, + r_icon_path, chk_status, + keyStr, sub_desc, + chk_change_cb); +} + +/** + * Create 1entry style item + * @return a pointer to Setting_GenGroupItem_Data + */ +Setting_GenGroupItem_Data *setting_create_Gendial_field_entry( + Evas_Object * genlist, + const Elm_Genlist_Item_Class *itc, + setting_call_back_func gl_sel, + void *sel_data, + SWALLOW_Type swallow_type, + char *l_icon_path, + char *r_icon_path, + int chk_status, + const char *keyStr, + char *sub_desc, + setting_call_back_func chk_change_cb, + Elm_Input_Panel_Layout input_type, + bool isPasswordFlag, + bool isFocusFlag, + int max_char_count, + int max_byte_count, + char *accepted, + char *rejected) +{ + /* SETTING_TRACE_BEGIN; */ + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *) calloc(1, sizeof (Setting_GenGroupItem_Data)); + setting_retvm_if(!item_data, NULL, "calloc failed"); + item_data->keyStr = (char *)g_strdup(keyStr); + item_data->sub_desc = (char *)g_strdup(sub_desc); + item_data->swallow_type = swallow_type; + item_data->l_swallow_path = (char *)g_strdup(l_icon_path); + item_data->r_swallow_path = (char *)g_strdup(r_icon_path); + item_data->chk_status = chk_status; + item_data->chk_change_cb = chk_change_cb; + + //setting_call_back_func chk_focus_out_cb, + + + item_data->input_type = input_type; + item_data->isPasswordFlag = isPasswordFlag; + item_data->isFocusFlag = isFocusFlag; + + Elm_Entry_Filter_Accept_Set *digits_filter_data = + (Elm_Entry_Filter_Accept_Set *) calloc(1, sizeof (Elm_Entry_Filter_Accept_Set)); + if(!digits_filter_data) { + SETTING_TRACE_ERROR("calloc Elm_Entry_Filter_Accept_Set failed"); + // free allocated data + G_FREE(item_data->keyStr); + G_FREE(item_data->sub_desc); + G_FREE(item_data->l_swallow_path); + G_FREE(item_data->r_swallow_path); + FREE(item_data); + return NULL; + } + + + Elm_Entry_Filter_Limit_Size *limit_filter_data = + (Elm_Entry_Filter_Limit_Size *) calloc(1, sizeof (Elm_Entry_Filter_Limit_Size)); + if(!limit_filter_data) { + SETTING_TRACE_ERROR("calloc Elm_Entry_Filter_Limit_Size failed"); + + // free allocated data + G_FREE(item_data->keyStr); + G_FREE(item_data->sub_desc); + G_FREE(item_data->l_swallow_path); + G_FREE(item_data->r_swallow_path); + FREE(item_data); + FREE(digits_filter_data); + return NULL; + } + + limit_filter_data->max_char_count = max_char_count; + limit_filter_data->max_byte_count = max_byte_count; + digits_filter_data->accepted = (char *)g_strdup(accepted); + digits_filter_data->rejected = (char *)g_strdup(rejected); + + item_data->digits_filter_data = digits_filter_data; + item_data->limit_filter_data = limit_filter_data; + item_data->userdata = sel_data; + + if (gl_sel) { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, NULL, + ELM_GENLIST_ITEM_NONE, gl_sel, + sel_data); + } else { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, NULL, + ELM_GENLIST_ITEM_NONE, + _gl_Gendial_sel, sel_data); + } + return item_data; +} + +/** + * Create 1entry style item + * focus out + * @return a pointer to Setting_GenGroupItem_Data + */ +Setting_GenGroupItem_Data *setting_create_Gendial_field_entry_fo( + Evas_Object * genlist, + const Elm_Genlist_Item_Class *itc, + setting_call_back_func gl_sel, + void *sel_data, + SWALLOW_Type swallow_type, + char *l_icon_path, + char *r_icon_path, + int chk_status, + const char *keyStr, + char *sub_desc, + setting_call_back_func chk_change_cb, + setting_call_back_func chk_focus_out_cb, + Elm_Input_Panel_Layout input_type, + bool isPasswordFlag, + bool isFocusFlag, + int max_char_count, + int max_byte_count, + char *accepted, + char *rejected) +{ + /* SETTING_TRACE_BEGIN; */ + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *) calloc(1, sizeof (Setting_GenGroupItem_Data)); + setting_retvm_if(!item_data, NULL, "calloc failed"); + item_data->keyStr = (char *)g_strdup(keyStr); + item_data->sub_desc = (char *)g_strdup(sub_desc); + item_data->swallow_type = swallow_type; + item_data->l_swallow_path = (char *)g_strdup(l_icon_path); + item_data->r_swallow_path = (char *)g_strdup(r_icon_path); + item_data->chk_status = chk_status; + item_data->chk_change_cb = chk_change_cb; + item_data->stop_change_cb = chk_focus_out_cb; + item_data->isSinglelineFlag = true; + //setting_call_back_func chk_focus_out_cb, + + item_data->input_type = input_type; + item_data->isPasswordFlag = isPasswordFlag; + item_data->isFocusFlag = isFocusFlag; + + Elm_Entry_Filter_Accept_Set *digits_filter_data = + (Elm_Entry_Filter_Accept_Set *) calloc(1, sizeof (Elm_Entry_Filter_Accept_Set)); + if(!digits_filter_data) { + SETTING_TRACE_ERROR("calloc Elm_Entry_Filter_Accept_Set failed"); + // free allocated data + G_FREE(item_data->keyStr); + G_FREE(item_data->sub_desc); + G_FREE(item_data->l_swallow_path); + G_FREE(item_data->r_swallow_path); + FREE(item_data); + return NULL; + } + + + Elm_Entry_Filter_Limit_Size *limit_filter_data = + (Elm_Entry_Filter_Limit_Size *) calloc(1, sizeof (Elm_Entry_Filter_Limit_Size)); + if(!limit_filter_data) { + SETTING_TRACE_ERROR("calloc Elm_Entry_Filter_Limit_Size failed"); + + // free allocated data + G_FREE(item_data->keyStr); + G_FREE(item_data->sub_desc); + G_FREE(item_data->l_swallow_path); + G_FREE(item_data->r_swallow_path); + FREE(item_data); + FREE(digits_filter_data); + return NULL; + } + + limit_filter_data->max_char_count = max_char_count; + limit_filter_data->max_byte_count = max_byte_count; + digits_filter_data->accepted = (char *)g_strdup(accepted); + digits_filter_data->rejected = (char *)g_strdup(rejected); + + item_data->digits_filter_data = digits_filter_data; + item_data->limit_filter_data = limit_filter_data; + item_data->userdata = sel_data; + + if (gl_sel) { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, NULL, + ELM_GENLIST_ITEM_NONE, gl_sel, + sel_data); + } else { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, NULL, + ELM_GENLIST_ITEM_NONE, + _gl_Gendial_sel, sel_data); + } + return item_data; +} + +/** + * General function to create a parent item of expandable item + * + * @return a pointer to Setting_GenGroupItem_Data + */ +Setting_GenGroupItem_Data *setting_create_Gendial_exp_parent_field( + Evas_Object *genlist, + const Elm_Genlist_Item_Class *itc, + setting_call_back_func gl_sel, + void *sel_data, + SWALLOW_Type swallow_type, + const char *keyStr, + char *sub_desc) +{ + /* SETTING_TRACE_BEGIN; */ + Setting_GenGroupItem_Data *item_data = + (Setting_GenGroupItem_Data *) calloc(1, + sizeof + (Setting_GenGroupItem_Data)); + setting_retvm_if(!item_data, NULL, "calloc failed"); + item_data->keyStr = (char *)g_strdup(keyStr); + item_data->sub_desc = (char *)g_strdup(sub_desc); + item_data->swallow_type = swallow_type; + + if (gl_sel) { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, NULL, + ELM_GENLIST_ITEM_TREE, gl_sel, + sel_data); + } else { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, NULL, + ELM_GENLIST_ITEM_TREE, + _gl_Gendial_sel_expand, sel_data); + } + return item_data; +} + +/** + * General function to create a subitem of expandable item + * + * @return a pointer to Setting_GenGroupItem_Data + */ +Setting_GenGroupItem_Data *setting_create_Gendial_exp_sub_field( + Evas_Object *genlist, + const Elm_Genlist_Item_Class *itc, + setting_call_back_func gl_sel, + void *sel_data, + Elm_Object_Item *parent, + SWALLOW_Type swallow_type, + Evas_Object *rgd, int chk_status, + const char *keyStr, + setting_call_back_func + chk_change_cb) +{ + /* SETTING_TRACE_BEGIN; */ + Setting_GenGroupItem_Data *item_data = + (Setting_GenGroupItem_Data *) calloc(1, + sizeof + (Setting_GenGroupItem_Data)); + setting_retvm_if(!item_data, NULL, "calloc failed"); + item_data->keyStr = (char *)g_strdup(keyStr); + item_data->swallow_type = swallow_type; + item_data->chk_status = chk_status; + item_data->rgd = rgd; + + if (!gl_sel) { + gl_sel = setting_sub_list_sel_cb; + } + if (!chk_change_cb) { + chk_change_cb = setting_sub_list_rd_change; + } + + item_data->chk_change_cb = chk_change_cb; + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, parent, + ELM_GENLIST_ITEM_NONE, gl_sel, sel_data); + return item_data; +} + +/** + * To make genlist support expandable style item + */ +void setting_enable_expandable_genlist(Evas_Object *genlist, void *data, + setting_call_back_func gl_exp_cb, + setting_call_back_func gl_smart_cb) +{ + ret_if(NULL == genlist); + elm_genlist_tree_effect_enabled_set(genlist, TRUE); + if (!gl_smart_cb) { + gl_smart_cb = __exp_list_smart_cb; + } + + if (gl_exp_cb) + evas_object_smart_callback_add(genlist, "expanded", gl_exp_cb, data); + evas_object_smart_callback_add(genlist, "contracted", gl_smart_cb, "contracted"); + + evas_object_smart_callback_add(genlist, "drag", gl_smart_cb, "drag"); + evas_object_smart_callback_add(genlist, "longpressed", gl_smart_cb, "longpressed"); +} + +/* +example: + +setting_create_Gendial_itc("dialogue/1text.2icon.2", + &(networkUG->itc_1text_2icon)); + +1. create a process genlist item : [intial state is 'PROCESS'] +ad->data_searching_net = setting_create_Gendial_field_1radio(scroller, &(ad->itc_1text_2icon), + setting_network_select_network_mouse_up_Gendial_list_radio_cb, ad, + SWALLOW_Type_1RADIO_1PROCESS, + ad->chk_sel, TAPI_NETWORK_SELECTIONMODE_MANUAL, + "Searching..", NULL); +or [intial state is 'UNPROCESS'] +ad->data_searching_net = setting_create_Gendial_field_1radio(scroller, &(ad->itc_1text_2icon), + setting_network_select_network_mouse_up_Gendial_list_radio_cb, ad, + SWALLOW_Type_1RADIO, + ad->chk_sel, TAPI_NETWORK_SELECTIONMODE_MANUAL, + "Searching..", NULL); + +2. to set the PROCESS state at any place as you like: +setting_begin_progress_genlist_item(ad->data_searching_net); -- change from UNPROCESS->PROCESS +setting_finish_progress_genlist_item(ad->data_searching_net);--change from PROCESS->UNPROCESS +*/ +void setting_begin_progress_genlist_item(Setting_GenGroupItem_Data *data_item) +{ + if (data_item) { + if (SWALLOW_Type_1RADIO != data_item->swallow_type) { + return; + } + + data_item->swallow_type = SWALLOW_Type_1RADIO_1PROCESS; + elm_object_item_data_set(data_item->item, data_item); + elm_genlist_item_update(data_item->item); + } +} + +void setting_finish_progress_genlist_item(Setting_GenGroupItem_Data *data_item) +{ + if (data_item) { + if (SWALLOW_Type_1RADIO_1PROCESS != data_item->swallow_type) { + return; + } + data_item->swallow_type = SWALLOW_Type_1RADIO; + elm_object_item_data_set(data_item->item, data_item); + elm_genlist_item_update(data_item->item); + } +} + +/** +* Check if some item is selected in done-list +*/ + +bool setting_done_list_is_some_item_selected(Setting_Done_List_Data *list_data) +{ + SETTING_TRACE_BEGIN; + bool isFound = FALSE; /* wether can found some item checked */ + int idx = 0; + for (; idx < list_data->cur_item_num; idx++) { + if (list_data->chk_items[idx].data_GenItem->chk_status) { + isFound = TRUE; + break; + } + } + return isFound; +} + +static void __setting_done_list_item_sel(void *data) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "data == NULL"); + Setting_Done_List_Data *list_data = (Setting_Done_List_Data *)data; + + int sel_num = 0; + int idx = 0; + + setting_create_sel_info_popup(list_data->ly_parent, + &(list_data->selInfoPop_layout), + &(list_data->selInfoPop)); + + /* else for other checks, do rotinue checking */ + bool isFound = FALSE; /* wether found the item not checked */ + for (idx = 0; idx < list_data->cur_item_num; idx++) { + if (!list_data->chk_items[idx].data_GenItem->chk_status) { + /* SETTING_TRACE("%s not select", _(list_data->chk_items[idx].item_name)); */ + isFound = TRUE; + /* break; */ + } else { + /* SETTING_TRACE("%s select", _(list_data->chk_items[idx].item_name)); */ + sel_num++; + } + } + + if (isFound) { /* reset state of chk_sel_all */ + list_data->select_all_checked = 0; + elm_check_state_pointer_set(list_data->select_all_checkbox, &list_data->select_all_checked); + } else { + list_data->select_all_checked = 1; + elm_check_state_pointer_set(list_data->select_all_checkbox, &list_data->select_all_checked); + } + + /* SETTING_TRACE("sel_num:%d", sel_num); */ + if (!sel_num) { + if (list_data->navi_it) { + Evas_Object *button = elm_object_item_part_content_get(list_data->navi_it, "toolbar_button1"); + elm_object_disabled_set(button, EINA_TRUE); + } + evas_object_hide(list_data->selInfoPop); + return; + } + + char text[MAX_DISPLAY_NAME_LEN_ON_UI +1] = {0, }; + snprintf(text, MAX_DISPLAY_NAME_LEN_ON_UI, "%s (%d)", _("IDS_ST_OPT_SELECTED"), sel_num); + + /* text set and timeout set */ + edje_object_part_text_set(_EDJ(list_data->selInfoPop_layout), "elm.text", text); + + if (list_data->navi_it) { + Evas_Object *button = elm_object_item_part_content_get(list_data->navi_it, "toolbar_button1"); + elm_object_disabled_set(button, EINA_FALSE); + } +} + +/** +* Do process when clicking the check object in the done-list item +*/ +void setting_done_list_Gendial_chk_btn_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + + /* new status */ + list_item->chk_status = elm_check_state_get(list_item->eo_check); + + Setting_Done_List_Data *list_data = list_item->userdata; + __setting_done_list_item_sel(list_data); +} + +static void setting_done_list_Gendial_mouse_up_cb(void *data, Evas_Object *obj, + void *event_info) +{ + /* error check */ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + int old_status = elm_check_state_get(list_item->eo_check); + /* new status */ + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + + /* other process.. */ + Setting_Done_List_Data *list_data = list_item->userdata; + __setting_done_list_item_sel(list_data); +} + +static void __setting_select_all_done(void *data) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "data == NULL"); + Setting_Done_List_Data *list_data = (Setting_Done_List_Data *)data; + + int sel_num = 0; + int idx = 0; + + setting_create_sel_info_popup(list_data->ly_parent, + &(list_data->selInfoPop_layout), + &(list_data->selInfoPop)); + + if (list_data->select_all_checked) { + /* set all other checks state to be 1 */ + SETTING_TRACE_DEBUG("Select All checked"); + for (idx = 0; idx < list_data->cur_item_num; idx++) { + list_data->chk_items[idx].data_GenItem->chk_status = 1; + elm_object_item_data_set(list_data->chk_items[idx].data_GenItem->item, list_data->chk_items [idx].data_GenItem); + elm_genlist_item_update(list_data->chk_items [idx].data_GenItem->item); + } + sel_num = list_data->cur_item_num; + } else { + SETTING_TRACE_DEBUG("Select All unchecked"); + /* set all other checks state to be 0 */ + for (idx = 0; idx < list_data->cur_item_num; idx++) { + list_data->chk_items[idx].data_GenItem->chk_status = 0; + elm_object_item_data_set(list_data->chk_items[idx].data_GenItem->item, list_data->chk_items[idx].data_GenItem); + elm_genlist_item_update(list_data->chk_items[idx].data_GenItem->item); + } + sel_num = 0; + } + + /* SETTING_TRACE("sel_num:%d", sel_num); */ + if (!sel_num) { + if (list_data->navi_it) { + Evas_Object *button = elm_object_item_part_content_get(list_data->navi_it, "toolbar_button1"); + elm_object_disabled_set(button, EINA_TRUE); + } + + evas_object_hide(list_data->selInfoPop); + return; + } + char text[MAX_DISPLAY_NAME_LEN_ON_UI +1] = {0, }; + snprintf(text, MAX_DISPLAY_NAME_LEN_ON_UI, "%s (%d)", _("IDS_ST_OPT_SELECTED"), sel_num); + + /* text set and timeout set */ + edje_object_part_text_set(_EDJ(list_data->selInfoPop_layout), "elm.text", text); + + if (list_data->navi_it) { + Evas_Object *button = elm_object_item_part_content_get(list_data->navi_it, "toolbar_button1"); + elm_object_disabled_set(button, EINA_FALSE); + } +} + +static void __setting_select_all_layout_mouse_down_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "data == NULL"); + Setting_Done_List_Data *list_data = (Setting_Done_List_Data *)data; + + list_data->select_all_checked = !list_data->select_all_checked; + elm_check_state_pointer_set(list_data->select_all_checkbox, &list_data->select_all_checked); + + __setting_select_all_done(list_data); +} + +static void __setting_select_all_check_changed_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "data == NULL"); + Setting_Done_List_Data *list_data = (Setting_Done_List_Data *)data; + + list_data->select_all_checked = elm_check_state_get(list_data->select_all_checkbox); + elm_check_state_pointer_set(list_data->select_all_checkbox, &list_data->select_all_checked); + __setting_select_all_done(data); +} + +/** +* The API to create done-list. +* +* @param[in] list_data +* @return a done-list +*/ +Evas_Object *setting_create_done_list(Setting_Done_List_Data *list_data) +{ + SETTING_TRACE_BEGIN; + retvm_if(list_data == NULL, NULL, "list_data == NULL"); + Evas_Object *sub_layout = elm_layout_add(list_data->win_main); + elm_layout_file_set(sub_layout, SETTING_THEME_EDJ_NAME, "search_layout"); + evas_object_size_hint_weight_set(sub_layout, EVAS_HINT_EXPAND, 0.0); + evas_object_show(sub_layout); + + setting_create_Gendial_itc("1text.1icon.3", &(list_data->itc_1text_1icon)); + + Evas_Object *select_all_layout = elm_layout_add(sub_layout); + retvm_if(select_all_layout == NULL, NULL, "select_all_layout == NULL"); + elm_layout_theme_set(select_all_layout, "genlist", "item", "select_all/default"); //select_all/default + evas_object_size_hint_weight_set(select_all_layout, EVAS_HINT_EXPAND, EVAS_HINT_FILL); + evas_object_size_hint_align_set(select_all_layout, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_event_callback_add(select_all_layout, EVAS_CALLBACK_MOUSE_DOWN, __setting_select_all_layout_mouse_down_cb, list_data); + + Eina_Bool select_all_checked = list_data->select_all_checked; + Evas_Object *select_all_checkbox = elm_check_add(select_all_layout); + elm_check_state_pointer_set(select_all_checkbox, &select_all_checked); + evas_object_smart_callback_add(select_all_checkbox, "changed", __setting_select_all_check_changed_cb, list_data); + evas_object_propagate_events_set(select_all_checkbox, EINA_FALSE); + elm_object_part_content_set(select_all_layout, "elm.icon", select_all_checkbox); + + list_data->select_all_checkbox = select_all_checkbox; + elm_object_part_text_set(select_all_layout, "elm.text", _(KeyStr_Select_All)); + + Evas_Object *scroller = elm_genlist_add(list_data->win_main); + retvm_if(scroller == NULL, NULL, "scroller == NULL"); + elm_genlist_clear(scroller); /* first to clear list */ + + elm_object_part_content_set(sub_layout, "search_list", scroller); + elm_object_part_content_set(sub_layout, "search_bar", select_all_layout); + + int index = 0; + for (; index < list_data->cur_item_num; index++) { + list_data->chk_items[index].data_GenItem = + setting_create_Gendial_field_def(scroller, + &(list_data->itc_1text_1icon), + setting_done_list_Gendial_mouse_up_cb, + list_data, + SWALLOW_Type_1CHECK, NULL, + NULL, 0, + list_data->chk_items + [index].item_name, NULL, + setting_done_list_Gendial_chk_btn_cb); + if (list_data->chk_items[index].data_GenItem) { + list_data->chk_items[index].data_GenItem->userdata = list_data; + } else { + SETTING_TRACE_ERROR("list_data->chk_items[index].data_GenItem is NULL"); + } + + } + + return sub_layout; +} + +/** +* To disable a specialized genlist item +* +* @param[in] item +*/ +void setting_disable_genlist_item(Elm_Object_Item *item) +{ + if (item) { + elm_object_item_disabled_set(item, EINA_TRUE); /* make it be dim displayed */ + } +} + +/** +* To enable a specialized genlist item +* +* @param[in] item +*/ +void setting_enable_genlist_item(Elm_Object_Item *item) +{ + if (item) { + elm_object_item_disabled_set(item, EINA_FALSE); /* make it be normally displayed */ + } +} + diff --git a/setting-common/src/setting-common-draw-naviframe.c b/setting-common/src/setting-common-draw-naviframe.c new file mode 100755 index 0000000..17cac5f --- /dev/null +++ b/setting-common/src/setting-common-draw-naviframe.c @@ -0,0 +1,522 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include +#include +#include + +Evas_Object *setting_create_win_layout(Evas_Object *win_layout, + Evas_Object *win_obj) +{ + Evas_Object *layout = NULL; + + /* Base Layout */ + layout = elm_layout_add(win_obj); + evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + setting_retvm_if(layout == NULL, FALSE, "layout == NULL"); + + elm_layout_theme_set(layout, "layout", "application", "default"); + + Evas_Object *bg = setting_create_bg(layout, win_obj, "group_list"); + elm_object_part_content_set(layout, "elm.swallow.bg", bg); + evas_object_show(layout); + + return layout; +} + +#define HALF_SCREEN_STR_LEN 20 +#define ONE_THIRD_SCREEN_STR_LEN 13 +Evas_Object *setting_create_navi_bar(Evas_Object *layout) +{ + + Evas_Object *navi = NULL; + navi = elm_naviframe_add(layout); + + if (navi == NULL) { + SETTING_TRACE(" *** elm_naviframe_add returns NULL *** "); + return NULL; + } + elm_object_part_content_set(layout, "elm.swallow.content", navi); + evas_object_show(navi); + return navi; +} + +Elm_Object_Item * setting_create_navi_bar_top_buttons(char *title_str, + char *lbutton_str, + char *rbutton_str, + char *mbutton_str, + setting_call_back_func lbutton_click_cb, + setting_call_back_func rbutton_click_cb, + setting_call_back_func mbutton_click_cb, + void *cb_data, Evas_Object *eo_view,/*any container obj */ + Evas_Object *navigate_bar ) +{ + //SETTING_TRACE_BEGIN; + Evas_Object *l_button = NULL; + Evas_Object *r_button = NULL; + Evas_Object *m_button = NULL; + Elm_Object_Item *navi_it = NULL; + + /* create buttons */ + l_button = setting_create_button(navigate_bar, lbutton_str, + NULL, + lbutton_click_cb, cb_data); + + r_button = setting_create_button(navigate_bar, rbutton_str, + NULL, + rbutton_click_cb, cb_data); + m_button = setting_create_button(navigate_bar, mbutton_str, + NULL, + mbutton_click_cb, cb_data); + + navi_it = elm_naviframe_item_push(navigate_bar, title_str, + NULL, NULL, eo_view, + NULL); + retv_if(!navi_it, NULL); + + /* arrange buttons into navi_it*/ + if (l_button) { + elm_object_item_part_content_set(navi_it, "title_left_btn", l_button); + } + if (r_button) { + elm_object_item_part_content_set(navi_it, "title_right_btn", r_button); + } + if (m_button) { + elm_object_item_part_content_set(navi_it, "title_more_btn", m_button); + } + //remove '<-' button + Evas_Object *back_btn = elm_object_item_part_content_get(navi_it, "prev_btn"); + if (back_btn) { + elm_object_item_part_content_set(navi_it, "prev_btn", NULL); + if (back_btn) evas_object_del(back_btn); + } + + return navi_it; +} +Elm_Object_Item *__create_navi_bar_bottom_buttons(char *title_str, char *lbutton_str, char *rbutton_str, + char *mbutton_str, setting_call_back_func lbutton_click_cb, + setting_call_back_func rbutton_click_cb, + setting_call_back_func mbutton_click_cb, + void *cb_data, Evas_Object *eo_view,/*any container obj */ + Evas_Object *navigate_bar, /*the specialized navigation bar */ + Evas_Object *titleobj) +{ + SETTING_TRACE_BEGIN; + Elm_Object_Item *navi_it = NULL; + Evas_Object *mbtn = NULL; + Evas_Object *rbtn = NULL; + Evas_Object *lbtn = NULL; + + /* arrange buttons into controlbar*/ + if (0 == safeStrCmp(lbutton_str, _("IDS_COM_BODY_BACK"))) { /* do special handling */ + lbtn = setting_create_button(navigate_bar, lbutton_str, + NAVI_BACK_BUTTON_STYLE, + lbutton_click_cb, cb_data); + + navi_it = elm_naviframe_item_push(navigate_bar, title_str, lbtn, NULL, eo_view, NULL); /* add new button */ + elm_object_style_set(lbtn, NAVI_BACK_BUTTON_STYLE); /* take into effect */ + + if (!rbutton_str && !mbutton_str) { + //do nothing.. + } else if (rbutton_str && mbutton_str) { /* both exist.. */ + mbtn = setting_create_button(navigate_bar, mbutton_str, NAVI_DEF_BUTTON_STYLE, mbutton_click_cb, cb_data); + rbtn = setting_create_button(navigate_bar, rbutton_str, NAVI_DEF_BUTTON_STYLE, rbutton_click_cb, cb_data); + elm_object_item_part_content_set(navi_it, "toolbar_button1", mbtn); + elm_object_item_part_content_set(navi_it, "toolbar_button2", rbtn); + } else if (rbutton_str) { /* r_btn exist.. */ + rbtn = setting_create_button(navigate_bar, rbutton_str, NAVI_DEF_BUTTON_STYLE, rbutton_click_cb, cb_data); + elm_object_item_part_content_set(navi_it, "toolbar_button1", rbtn); + //elm_object_item_part_content_set(navi_it, "toolbar_button2", setting_create_button(navigate_bar, "", NULL, NULL, NULL)); + } else if (mbutton_str) { /* m_btn exist.. */ + mbtn = setting_create_button(navigate_bar, mbutton_str, NAVI_DEF_BUTTON_STYLE, mbutton_click_cb, cb_data); + elm_object_item_part_content_set(navi_it, "toolbar_button1", mbtn); + //elm_object_item_part_content_set(navi_it, "toolbar_button2", setting_create_button(navigate_bar, "", NULL, NULL, NULL)); + } + return navi_it; + } + navi_it = elm_naviframe_item_push(navigate_bar, title_str, NULL, NULL, eo_view, NULL); + if (lbutton_str && mbutton_str && rbutton_str) + { + lbtn = setting_create_button(navigate_bar, lbutton_str, NAVI_DEF_BUTTON_STYLE, lbutton_click_cb, cb_data); + elm_object_item_part_content_set(navi_it, "toolbar_more_btn", lbtn); + mbtn = setting_create_button(navigate_bar, mbutton_str, NAVI_DEF_BUTTON_STYLE, mbutton_click_cb, cb_data); + elm_object_item_part_content_set(navi_it, "toolbar_button1", mbtn); + rbtn = setting_create_button(navigate_bar, rbutton_str, NAVI_DEF_BUTTON_STYLE, rbutton_click_cb, cb_data); + elm_object_item_part_content_set(navi_it, "toolbar_button2", rbtn); + } + else + { + bool has_btn_flag = FALSE;//first "toolbar_button1", then "toolbar_button2". + if (lbutton_str) + { + lbtn = setting_create_button(navigate_bar, lbutton_str, NAVI_DEF_BUTTON_STYLE, lbutton_click_cb, cb_data); + elm_object_item_part_content_set(navi_it, "toolbar_button1", lbtn); + has_btn_flag = TRUE; + } + if (mbutton_str) + { + mbtn = setting_create_button(navigate_bar, mbutton_str, NAVI_DEF_BUTTON_STYLE, mbutton_click_cb, cb_data); + elm_object_item_part_content_set(navi_it, has_btn_flag ? "toolbar_button2" : "toolbar_button1", mbtn); + has_btn_flag = TRUE; + } + if (rbutton_str) + { + rbtn = setting_create_button(navigate_bar, rbutton_str, NAVI_DEF_BUTTON_STYLE, rbutton_click_cb, cb_data); + elm_object_item_part_content_set(navi_it, has_btn_flag ? "toolbar_button2" : "toolbar_button1", rbtn); + has_btn_flag = TRUE; + } + } + return navi_it; + +} + + +/** +* Create buttons on the specialized navigation bar +* +* @param[in] eo_view navigation bar's content +* @param[in] controlbar title obj of navigation bar +* +*/ +void setting_create_navi_bar_buttons(char *title_str, char *lbutton_str, char *rbutton_str, + char *mbutton_str, setting_call_back_func lbutton_click_cb, + setting_call_back_func rbutton_click_cb, + setting_call_back_func mbutton_click_cb, + void *cb_data, Evas_Object *eo_view,/*any container obj */ + Evas_Object *navigate_bar, /*the specialized navigation bar */ + Evas_Object *titleobj) +{ /* controlbar */ + __create_navi_bar_bottom_buttons(title_str, lbutton_str, + rbutton_str, mbutton_str, + lbutton_click_cb, + rbutton_click_cb, + mbutton_click_cb, + cb_data, eo_view, + navigate_bar, titleobj); + return; +} + +/** +* The general API to create a layout with navigation bar, +* which contents any evas container object(@param[eo_view]) as its content +* +* @param[in] eo_view navigation bar's content +* @param[out] titleobj title obj of navigation bar +* +* return main layout of UG or App.. +*/ +Evas_Object *setting_create_layout_navi_bar(Evas_Object *win_layout, Evas_Object *win_obj, char *title_str, char *lbutton_str, char *rbutton_str, char *mbutton_str, setting_call_back_func lbutton_click_cb, setting_call_back_func rbutton_click_cb, setting_call_back_func mbutton_click_cb, void *cb_data, Evas_Object *eo_view, /*any container obj constructed on any evas obj */ + Evas_Object **navi_bar, + Evas_Object **titleobj) +{ + + Evas_Object *layout = setting_create_win_layout(win_layout, win_obj); + *navi_bar = setting_create_navi_bar(layout); + + setting_create_navi_bar_buttons(title_str, + lbutton_str, rbutton_str, mbutton_str, + lbutton_click_cb, rbutton_click_cb, + mbutton_click_cb, cb_data, eo_view /*content */ , + *navi_bar, NULL); + return layout; +} + +/** +* The API to create a layout with navigation bar, +* which contents a scroller object as its content +* +* @param[out] scroller navigation bar's content +* +* @return a layout with a special navigation bar and at most 2 buttons +*/ + +Evas_Object *setting_create_layout_navi_bar_scroller(Evas_Object *win_layout, + Evas_Object *win_obj, + char *title_str, + char *lbutton_str, + char *rbutton_str, + setting_call_back_func + lbutton_click_cb, + setting_call_back_func + rbutton_click_cb, + void *cb_data, + Evas_Object **scroller, + Evas_Object **navi_bar) +{ + + Evas_Object *layout = setting_create_win_layout(win_layout, win_obj); + *navi_bar = setting_create_navi_bar(layout); + + /*****/ + /* create scroller as CONTENT */ + Evas_Object *scrl = NULL; + /* Evas_Object *ret = NULL; */ + if (scroller != NULL) { + /* scrl =*scroller = elm_scroller_add(win_layout); */ + scrl = *scroller = elm_scroller_add(layout); + retvm_if(*scroller == NULL, NULL, + "Cannot set scroller object as contento of layout"); + elm_scroller_bounce_set(*scroller, EINA_FALSE, EINA_TRUE); + elm_scroller_policy_set(*scroller, ELM_SCROLLER_POLICY_OFF, + ELM_SCROLLER_POLICY_AUTO); + evas_object_show(*scroller); + } + + /*****/ + + setting_create_navi_bar_buttons(title_str, + lbutton_str, rbutton_str, NULL, + lbutton_click_cb, rbutton_click_cb, + NULL, cb_data, scrl /*content */ , + *navi_bar, NULL); + return layout; +} + +/** +* The API to create a layout with navigation bar , +* which contents a genlist object as its content +* +* @return a layout with a special navigation bar and at most 2 buttons +*/ +Evas_Object *setting_create_layout_navi_bar_genlist(Evas_Object *win_layout, + Evas_Object *win_obj, + char *title_str, + char *lbutton_str, + char *rbutton_str, + setting_call_back_func + lbutton_click_cb, + setting_call_back_func + rbutton_click_cb, + void *cb_data, + Evas_Object **genlist, + Evas_Object **navi_bar) +{ + /* win_layout -> layout */ + Evas_Object *layout = setting_create_win_layout(win_layout, win_obj); + *navi_bar = setting_create_navi_bar(layout); + + *genlist = elm_genlist_add(*navi_bar); + elm_object_style_set(*genlist, "dialogue"); + retvm_if(*genlist == NULL, NULL, + "Cannot set scroller object as contento of layout"); + elm_genlist_clear(*genlist); /* first to clear list */ + + setting_create_navi_bar_buttons(title_str, + lbutton_str, rbutton_str, NULL, + lbutton_click_cb, rbutton_click_cb, + NULL, cb_data, *genlist, *navi_bar, + NULL); + return layout; +} + + +Elm_Object_Item *__push_navi_bar_bottom_buttons(char *title_str, + char *lbutton_str, char *rbutton_str, + char *mbutton_str, + setting_call_back_func lbutton_click_cb, + setting_call_back_func rbutton_click_cb, + setting_call_back_func mbutton_click_cb, + void *cb_data, Evas_Object *eo_view, + Evas_Object *navigate_bar, Evas_Object **titleobj) +{ + Elm_Object_Item *navi_it = NULL; + Evas_Object *mbtn = NULL; + Evas_Object *rbtn = NULL; + Evas_Object *lbtn = NULL; + + /* arrange buttons into controlbar*/ + if (0 == safeStrCmp(lbutton_str, _("IDS_COM_BODY_BACK"))) { + lbtn = setting_create_button(navigate_bar, lbutton_str, + NAVI_BACK_BUTTON_STYLE, + lbutton_click_cb, cb_data); + + navi_it = elm_naviframe_item_push(navigate_bar, title_str, lbtn, NULL, eo_view, NULL); + elm_object_style_set(lbtn, NAVI_BACK_BUTTON_STYLE); /* take into effect */ + if (!rbutton_str && !mbutton_str) + { + return navi_it; + } + + if (rbutton_str && mbutton_str) { + + mbtn = setting_create_button(navigate_bar, mbutton_str, NAVI_DEF_BUTTON_STYLE, mbutton_click_cb, cb_data); + rbtn = setting_create_button(navigate_bar, rbutton_str, NAVI_DEF_BUTTON_STYLE, rbutton_click_cb, cb_data); + elm_object_item_part_content_set(navi_it, "toolbar_button1", mbtn); + elm_object_item_part_content_set(navi_it, "toolbar_button2", rbtn); + } else if (rbutton_str) { + rbtn = setting_create_button(navigate_bar, rbutton_str, NAVI_DEF_BUTTON_STYLE, rbutton_click_cb, cb_data); + elm_object_item_part_content_set(navi_it, "toolbar_button1", rbtn); + //elm_object_item_part_content_set(navi_it, "toolbar_button2", setting_create_button(navigate_bar, "", NULL, NULL, NULL)); + } else if (mbutton_str) { + mbtn = setting_create_button(navigate_bar, mbutton_str, NAVI_DEF_BUTTON_STYLE, mbutton_click_cb, cb_data); + elm_object_item_part_content_set(navi_it, "toolbar_button1", mbtn); + //elm_object_item_part_content_set(navi_it, "toolbar_button2", setting_create_button(navigate_bar, "", NULL, NULL, NULL)); + } + } else { /* no need back button on navi_bar */ + navi_it = elm_naviframe_item_push(navigate_bar, title_str, NULL, NULL, eo_view, NULL); + if (!lbutton_str && !rbutton_str && !mbutton_str) { + return navi_it; + } + + //remove '<-' button, insteadly using controlbar + Evas_Object *back_btn = elm_object_item_part_content_get(navi_it, "prev_btn"); + elm_object_item_part_content_set(navi_it, "prev_btn", NULL); + evas_object_del(back_btn); + + if (lbutton_str && mbutton_str && rbutton_str) + { + lbtn = setting_create_button(navigate_bar, lbutton_str, NAVI_DEF_BUTTON_STYLE, lbutton_click_cb, cb_data); + elm_object_item_part_content_set(navi_it, "toolbar_more_btn", lbtn); + mbtn = setting_create_button(navigate_bar, mbutton_str, NAVI_DEF_BUTTON_STYLE, mbutton_click_cb, cb_data); + elm_object_item_part_content_set(navi_it, "toolbar_button1", mbtn); + rbtn = setting_create_button(navigate_bar, rbutton_str, NAVI_DEF_BUTTON_STYLE, rbutton_click_cb, cb_data); + elm_object_item_part_content_set(navi_it, "toolbar_button2", rbtn); + } + else + { + bool has_btn_flag = FALSE;//first "toolbar_button1", then "toolbar_button2". + if (lbutton_str) + { + lbtn = setting_create_button(navigate_bar, lbutton_str, NAVI_DEF_BUTTON_STYLE, lbutton_click_cb, cb_data); + elm_object_item_part_content_set(navi_it, "toolbar_button1", lbtn); + has_btn_flag = TRUE; + } + if (mbutton_str) + { + mbtn = setting_create_button(navigate_bar, mbutton_str, NAVI_DEF_BUTTON_STYLE, mbutton_click_cb, cb_data); + elm_object_item_part_content_set(navi_it, has_btn_flag ? "toolbar_button2" : "toolbar_button1", mbtn); + has_btn_flag = TRUE; + } + if (rbutton_str) + { + rbtn = setting_create_button(navigate_bar, rbutton_str, NAVI_DEF_BUTTON_STYLE, rbutton_click_cb, cb_data); + elm_object_item_part_content_set(navi_it, has_btn_flag ? "toolbar_button2" : "toolbar_button1", rbtn); + has_btn_flag = TRUE; + } + } + } + + return navi_it; +} + + +/** +* The general API to push any evas object(@param[eo_view]) to the specialized navi_bar, +* which contents at most 3 buttons +*/ +Elm_Object_Item * +setting_push_layout_navi_bar(char *title_str, + char *lbutton_str, char *rbutton_str, + char *mbutton_str, + setting_call_back_func lbutton_click_cb, + setting_call_back_func rbutton_click_cb, + setting_call_back_func mbutton_click_cb, + void *cb_data, Evas_Object *eo_view, + Evas_Object *navi_bar, Evas_Object **titleobj) +{ + return __push_navi_bar_bottom_buttons(title_str, + lbutton_str, rbutton_str,mbutton_str, + lbutton_click_cb, + rbutton_click_cb, + mbutton_click_cb, + cb_data, eo_view, navi_bar, titleobj); +} + +/** +* The API to push a scroller object(@param[scroller]) to the specialized navi_bar, +* which contents at most 2 buttons +*/ + +void +setting_push_layout_navi_bar_scroller(Evas_Object *win_main, char *title_str, + char *lbutton_str, char *rbutton_str, + setting_call_back_func lbutton_click_cb, + setting_call_back_func rbutton_click_cb, + void *cb_data, + Evas_Object **scroller, + Evas_Object *navi_bar) +{ + /* create scroller */ + Evas_Object *scrl = NULL; + if (scroller != NULL) { + scrl = *scroller = elm_scroller_add(win_main); + retm_if(*scroller == NULL, + "Cannot set scroller as contento of layout"); + elm_scroller_bounce_set(*scroller, EINA_FALSE, EINA_TRUE); + elm_scroller_policy_set(*scroller, ELM_SCROLLER_POLICY_OFF, + ELM_SCROLLER_POLICY_AUTO); + + evas_object_show(*scroller); + } + + setting_push_layout_navi_bar(title_str, + lbutton_str, rbutton_str, NULL, + lbutton_click_cb, + rbutton_click_cb, + NULL, cb_data, scrl, navi_bar, NULL); +} + +/** +* @ The API to push a genlist object(@param[genlist]) to the specialized navi_bar, +* which contents at most 2 buttons +*/ +void +setting_push_layout_navi_bar_genlist(Evas_Object *win_layout, + Evas_Object *win_obj, char *title_str, + char *lbutton_str, char *rbutton_str, + setting_call_back_func lbutton_click_cb, + setting_call_back_func rbutton_click_cb, + void *cb_data, Evas_Object **genlist, + Evas_Object *navi_bar) +{ + /* create scroller */ + Evas_Object *gl = NULL; + if (genlist != NULL) { + gl = *genlist = elm_genlist_add(win_layout); + elm_object_style_set(*genlist, "dialogue"); + retm_if(*genlist == NULL, + "Cannot set scroller object as contento of layout"); + elm_genlist_clear(gl); /* first to clear list */ + } + + setting_push_layout_navi_bar(title_str, + lbutton_str, rbutton_str, NULL, + lbutton_click_cb, + rbutton_click_cb, + NULL, cb_data, gl, navi_bar, NULL); +} + +/* +* To go to top of list in top view of navibar. +* @param[in] navibar +*/ +void setting_go_to_navibar_list_top(Evas_Object *navibar) +{ + Elm_Object_Item *navi_it = elm_naviframe_top_item_get(navibar); + if (navi_it) + { + Evas_Object *content = elm_object_item_part_content_get(navi_it, "default"); + + Elm_Object_Item *first_item = elm_genlist_first_item_get(content); + if (first_item) + { + elm_genlist_item_show(first_item, ELM_GENLIST_ITEM_SCROLLTO_TOP); + } + } +} + + diff --git a/setting-common/src/setting-common-draw-popup.c b/setting-common/src/setting-common-draw-popup.c new file mode 100755 index 0000000..a0a40f5 --- /dev/null +++ b/setting-common/src/setting-common-draw-popup.c @@ -0,0 +1,564 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include +#include +#include + +static void _setting_def_response_cb(void *data, Evas_Object *obj, + void *event_info) +{ + if (obj) { + evas_object_del(obj); + obj = NULL; + } +} + +static void __popup_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) + +{ + SETTING_TRACE_BEGIN; + Ecore_X_Display *disp = ecore_x_display_get(); + Ecore_X_Window xwin = elm_win_xwindow_get(obj); + int ret = utilx_ungrab_key(disp, xwin, KEY_HOME); + if (ret) { + SETTING_TRACE_ERROR("KEY_HOME ungrab error ret[%d]", ret); + } + +} + +/** +* @ set the attribution of the specialized progressbar +* @See setting_create_custom_progressbar. +*/ +static void __popup_event_set(Evas_Object *popup, void *data, + setting_call_back_func response_cb, + int timeout,//to control the timeout time + bool blocked_flag,//to control whether to block the screen + bool keygrab_flag//to control whether to block the 'Home key' + ) +{ + if (timeout > 0) { + if (response_cb) { + evas_object_smart_callback_add(popup, "timeout", response_cb, data); + } else { + evas_object_smart_callback_add(popup, "timeout", _setting_def_response_cb, data); + } + } + + if (!blocked_flag) {//not blocked_flag == TRUE !!! + if (response_cb) { + evas_object_smart_callback_add(popup, "block,clicked", response_cb, data); + } else { + evas_object_smart_callback_add(popup, "block,clicked", _setting_def_response_cb, data); + } + } + + if (keygrab_flag) { + Ecore_X_Display *disp = ecore_x_display_get(); + Ecore_X_Window xwin = elm_win_xwindow_get(popup); + int ret = utilx_grab_key(disp, xwin, KEY_HOME, TOP_POSITION_GRAB); + if (ret) { + SETTING_TRACE_ERROR("KEY_HOME grab error ret[%d]", ret); + } + evas_object_event_callback_add(popup, EVAS_CALLBACK_DEL, __popup_del_cb, NULL); + } +} +static Evas_Object *__add_progressbar(void *data, Evas_Object *parent, + char *progressbar_style, + char *progressbar_title, + char *progressbar_lable) +{ + SETTING_TRACE_BEGIN; + Evas_Object *popup = elm_popup_add(parent); + evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + if (progressbar_title) { + elm_object_part_text_set(popup, "title,text", progressbar_title); + } + + Evas_Object *box = elm_box_add(popup); + /* elm_box_horizontal_set(box, 1); */ + + if (progressbar_lable) { + Evas_Object *label = elm_label_add(popup); + elm_object_text_set(label, progressbar_lable); /* "Loading..." */ + //elm_label_text_align_set(label, "left"); + evas_object_show(label); + elm_box_pack_end(box, label); + } + + if (progressbar_style) { + Evas_Object *progressbar = elm_progressbar_add(popup); + elm_object_style_set(progressbar, progressbar_style); /* "toolbar_process" or "pending_list" or "list_prosess" */ + elm_progressbar_pulse(progressbar, EINA_TRUE); + evas_object_size_hint_align_set(progressbar, EVAS_HINT_FILL, + 0.5); + evas_object_size_hint_weight_set(progressbar, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + elm_progressbar_pulse(progressbar, EINA_TRUE); + evas_object_show(progressbar); + elm_box_pack_end(box, progressbar); + } + + evas_object_show(box); + elm_object_content_set(popup, box); + return popup; +} + +/** +* create a popup window which contents a progressbar +* +* @return a popup window which contents a progressbar +*/ +Evas_Object *setting_create_popup_with_progressbar(void *data, + Evas_Object *parent, + char *progressbar_style, + char *title, + char *text, + setting_call_back_func response_cb, + int timeout, + bool blocked_flag, + bool keygrab_flag) +{ + SETTING_TRACE_BEGIN; + Evas_Object *popup = NULL; + popup = __add_progressbar(data, parent, progressbar_style, + title, text); + + if (timeout > 0) { + elm_popup_timeout_set(popup, timeout); + } + __popup_event_set(popup, data, response_cb, timeout, blocked_flag, keygrab_flag); + evas_object_show(popup); + return popup; +} + +/** +* The general API to create a certain popup window with more than one button. +* @return a certain popup window +*/ +Evas_Object *setting_create_popup_with_btn(void *data, + Evas_Object *parent, + char *title, + char *text, + setting_call_back_func response_cb, + int timeout, + int btn_num, ...) +{ + SETTING_TRACE_BEGIN; + Evas_Object *popup = elm_popup_add(parent); + evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + if (text) { + char r_str_text[HELP_MSG_BUFF_SIZE] = { 0, }; + snprintf(r_str_text, HELP_MSG_BUFF_SIZE, ""); + g_strlcat(r_str_text, text, HELP_MSG_BUFF_SIZE); + g_strlcat(r_str_text, "", HELP_MSG_BUFF_SIZE); + elm_object_text_set(popup, r_str_text); + + } + + if (title) { + elm_object_part_text_set(popup, "title,text", title); + } + if (timeout > 0) { + elm_popup_timeout_set(popup, timeout); + } + + if (btn_num > 0) { //the case popup has button or buttons + va_list args; + va_start(args, btn_num); + + char *btn_str; + int argno = 0; + char *btn_part_str[] = { + _("button1"), _("button2"), _("button3") + }; + + for (; argno < btn_num; argno++) { + btn_str = va_arg( args, char *); + SETTING_TRACE("Parameter #%d is: %s, btn_part_str;%s", argno, btn_str, btn_part_str[argno]); + if (btn_str) { + Evas_Object *btn = setting_create_button(popup, btn_str, NULL, response_cb, data); + elm_object_style_set(btn, "popup_button/default"); + elm_object_part_content_set(popup, btn_part_str[argno], btn); + } + } + + va_end(args); + } else { //the case popup doesn't have any button. + __popup_event_set(popup, data,response_cb, timeout, FALSE, FALSE); + } + + evas_object_show(popup); + SETTING_TRACE_END; + return popup; + } + +/** +* The general API to create a certain popup window +* +* @return a certain popup window +*/ +Evas_Object *setting_create_popup_without_btn(void *data, + Evas_Object *parent, + char *title, + char *text, + setting_call_back_func response_cb, + int timeout, + bool blocked_flag, + bool keygrab_flag) +{ + Evas_Object *popup = elm_popup_add(parent); + evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + if (text) { + char r_str_text[HELP_MSG_BUFF_SIZE] = { 0, }; + snprintf(r_str_text, HELP_MSG_BUFF_SIZE, ""); + g_strlcat(r_str_text, text, HELP_MSG_BUFF_SIZE); + g_strlcat(r_str_text, "", HELP_MSG_BUFF_SIZE); + elm_object_text_set(popup, r_str_text); + + } + + if (title) { + elm_object_part_text_set(popup, "title,text", title); + } + if (timeout > 0) { + elm_popup_timeout_set(popup, timeout); + } + + __popup_event_set(popup, data,response_cb, timeout, blocked_flag, keygrab_flag); + evas_object_show(popup); + return popup; +} + +/** +* The API to create a certain popup window with title +* +* @return a certain popup window with title +* not used now +*/ +int setting_create_simple_popup(void *data, + Evas_Object *parent, + char *title, + char *text) +{ + setting_create_popup_without_btn(data, parent, title, text, + NULL, POPUP_INTERVAL, FALSE, FALSE); + return 0; +} + + +#define ADD_POPUP_BTN(btn_num, popup, response_cb, data) \ + if (btn_num > 0) {\ + va_list args;\ + va_start(args, btn_num);\ + \ + char *btn_str;\ + int argno = 0;\ + char *btn_part_str[] = {\ + _("button1"), _("button2"), _("button3")\ + };\ + \ + for (; argno < btn_num; argno++) {\ + btn_str = va_arg( args, char *);\ + SETTING_TRACE("Parameter #%d is: %s, btn_part_str;%s", argno, btn_str, btn_part_str[argno]);\ + if (btn_str)\ + {\ + Evas_Object *btn = setting_create_button(popup, btn_str, NULL, response_cb, data);\ + elm_object_style_set(btn, "popup_button/default");\ + elm_object_part_content_set(popup, btn_part_str[argno], btn);\ + }\ + }\ + va_end(args);\ + } else {\ + if (response_cb) {\ + evas_object_smart_callback_add(popup, "timeout", response_cb, data);\ + evas_object_smart_callback_add(popup, "block,clicked", response_cb, data);\ + } else {\ + evas_object_smart_callback_add(popup, "timeout", _setting_def_response_cb, data);\ + evas_object_smart_callback_add(popup, "block,clicked", _setting_def_response_cb, data);\ + }\ + } + +//1Title-1Description-1Gif-nButton +/* @png_list is an array end with 'NULL'. like , + const char *png_list[] = { + SETTING_ICON_PATH_CFG"motions/motion_overturn_01.png", + SETTING_ICON_PATH_CFG"motions/motion_overturn_02.png", + SETTING_ICON_PATH_CFG"motions/motion_overturn_03.png", + SETTING_ICON_PATH_CFG"motions/motion_overturn_04.png", + SETTING_ICON_PATH_CFG"motions/motion_overturn_05.png", + NULL //must end with 'NULL' + }; +*/ +static void __gif_popup_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + evas_object_data_set(obj, "popup_type", NULL); +} + +Evas_Object *setting_create_popup_with_gif(void *data, + Evas_Object *parent, + char *title, + char *text, + const char **png_list, //array end with 'NULL'. + setting_call_back_func response_cb, + int timeout, + int btn_num, ...) +{ + SETTING_TRACE_BEGIN; + //displaying image + Evas_Object *image = NULL; + if (png_list && *png_list) { + if (png_list[1]) { //png_list is an array end with 'NULL', and it has at least 2 png file, + image = setting_create_gif(parent, png_list); + } else { //png_list just has one png file, + image = setting_create_image(parent, *png_list); + } + } + + Evas_Object *popup = elm_popup_add(parent); + evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + //title + if (title) { + elm_object_part_text_set(popup, "title,text", title); + } + + if (timeout > 0) { + elm_popup_timeout_set(popup, timeout); + } + + //content + Evas_Object *content_box = elm_box_add(popup); + //instructing of displaying image + if (text) { + Evas_Object *lable = setting_create_lable(popup, text, + "entry", "middle"); + elm_box_pack_end(content_box, lable); + } + //displaying image + if (image) { + elm_box_pack_end(content_box, image); + } + + + app_device_orientation_e m = elm_win_rotation_get(parent); + SETTING_TRACE("m:%d", m); + if(APP_DEVICE_ORIENTATION_90 == m || APP_DEVICE_ORIENTATION_270 == m) + { + Evas_Object *scroller = elm_scroller_add(parent); + elm_scroller_bounce_set(scroller, EINA_FALSE, EINA_TRUE); + elm_scroller_policy_set(scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO); + evas_object_show(scroller); + elm_object_content_set(scroller, content_box); + + Evas_Object *checkview = elm_layout_add(parent); + elm_layout_file_set(checkview, SETTING_THEME_EDJ_NAME, "popup_checkview_image"); + evas_object_size_hint_weight_set(checkview, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_object_part_content_set(checkview, "elm.swallow.content", scroller); + + evas_object_data_set(popup, "popup_type", "scroller"); + //set box into popup + elm_object_content_set(popup, checkview); + } + else + { + evas_object_data_set(popup, "popup_type", "auto_expand"); + elm_object_content_set(popup, content_box); + } + evas_object_event_callback_add(popup, EVAS_CALLBACK_DEL, __gif_popup_del_cb, NULL); + + ADD_POPUP_BTN(btn_num, popup, response_cb, data); + evas_object_show(popup); + return popup; + +} + +Evas_Object *setting_create_popup_with_checkview(Evas_Object *parent, + char *title, + char *check_str, + Evas_Object *checkview_content, + const char *checkview_style, + Evas_Object **check, + int timeout) +{ + Evas_Object *popup = elm_popup_add(parent); + evas_object_show(popup); + evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + //title + if (title) { + elm_object_part_text_set(popup, "title,text", title); + } + + if (timeout > 0) { + elm_popup_timeout_set(popup, timeout); + } + + //set box into popup + + Evas_Object *checkview = elm_layout_add(parent); + elm_layout_file_set(checkview, SETTING_THEME_EDJ_NAME, checkview_style); + evas_object_size_hint_weight_set(checkview, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + + //instructing of displaying image + if (check_str) { + edje_object_part_text_set(elm_layout_edje_get(checkview), "elm.text", check_str); + } + if (check) { + *check = elm_check_add(popup); + evas_object_size_hint_align_set(*check, EVAS_HINT_FILL, + EVAS_HINT_FILL); + evas_object_size_hint_weight_set(*check, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + evas_object_show(*check); + elm_object_part_content_set(checkview, "elm.swallow.end", *check); + } + //content + if (checkview_content) { + elm_object_part_content_set(checkview, "elm.swallow.content", checkview_content); + } + + Evas_Object *sub_layout = elm_layout_add(popup); + elm_layout_file_set(sub_layout, SETTING_THEME_EDJ_NAME, "screen_mode"); + evas_object_size_hint_weight_set(sub_layout, EVAS_HINT_EXPAND, 0.0); + evas_object_show(sub_layout); + elm_object_part_content_set(sub_layout, "content", checkview); + + elm_object_content_set(popup, sub_layout); + return popup; +} + +/** +* The API to create a certain popup window with a image, a check and some buttons +* @return a certain popup window with title +*/ +Evas_Object *setting_create_popup_with_image_check(void *data, + Evas_Object *parent, + char *title, + char *text1, + char *text2, + char *icon_path, + char *check_str, + Evas_Object **check, + setting_call_back_func response_cb, + int timeout, + int btn_num, ...) +{ + SETTING_TRACE_BEGIN; + //content + Evas_Object *lable = NULL; + Evas_Object *content_box = elm_box_add(parent); + evas_object_size_hint_weight_set(content_box, EVAS_HINT_EXPAND, 0); + if (text1) { + lable = setting_create_lable(content_box, text1, "entry", "middle"); + elm_box_pack_end(content_box, lable); + } + if (icon_path) { + Evas_Object *image = setting_create_image(content_box, icon_path); + setting_resize_object(image, 100*WIDGET_SCALE_FACTOR, 110*WIDGET_SCALE_FACTOR); + elm_box_pack_end(content_box, image); + } + + if (text2) { + lable = setting_create_lable(content_box, text2, "entry", "middle"); + elm_box_pack_end(content_box, lable); + } + + Evas_Object *scroller = elm_scroller_add(parent); + evas_object_size_hint_weight_set(scroller, EVAS_HINT_EXPAND, 0); + elm_scroller_bounce_set(scroller, EINA_FALSE, EINA_TRUE); + elm_scroller_policy_set(scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO); + evas_object_show(scroller); + elm_object_content_set(scroller, content_box); + + Evas_Object *popup = setting_create_popup_with_checkview(parent, title, check_str, scroller, + "popup_checkview_image", check, timeout); + ADD_POPUP_BTN(btn_num, popup, response_cb, data); + evas_object_show(popup); + return popup; +} + +/** +* Create selectinfo popup +*/ +void setting_create_sel_info_popup(Evas_Object *parent, + Evas_Object **selInfoPop_layout, + Evas_Object **selInfoPop) +{ + SETTING_TRACE_BEGIN; + SETTING_TRACE("*selInfoPop:%p", *selInfoPop); + if (!(*selInfoPop)) { + /* Add notify */ + *selInfoPop = elm_notify_add(parent); + elm_notify_align_set(*selInfoPop, ELM_NOTIFY_ALIGN_FILL, 1.0); + elm_notify_timeout_set(*selInfoPop, 3); + + /* list_data->selInfoPop layout add */ + *selInfoPop_layout = elm_layout_add(*selInfoPop); + elm_layout_theme_set(*selInfoPop_layout, "standard", "selectioninfo", "center_text"); + + /* list_data->selInfoPop layout content set to notify */ + elm_object_content_set(*selInfoPop, *selInfoPop_layout); + } + + evas_object_show(*selInfoPop); +} + +#if APPLIED_BACK_KEY_UG + +/** +* Get the toppest popup in current evas, cross through all the APP and UGs. +* +* @param[in] evas +* +* @return the toppest popup in current evas +*/ +Evas_Object *get_toppest_popup_window(Evas *evas) +{ + Evas_Object *evas_bottom = evas_object_top_get(evas); + /* SETTING_TRACE("evas_bottom:%p", evas_bottom); */ + Evas_Object *below = evas_bottom; + + Evas_Object *found = NULL; + const char *type = NULL; + while (1) { + /* parent = elm_widget_parent_get(parent); */ + below = evas_object_below_get(below); + if (!below) { + break; + } + /* SETTING_TRACE("below:%p", below); */ + type = elm_widget_type_get(below); + /* SETTING_TRACE("below's type:%s", type); */ + if (type && !safeStrCmp(type, "popup")) { + found = below; + break; + } + } + SETTING_TRACE("found:%p", found); + return found; +} +#endif + + + diff --git a/setting-common/src/setting-common-draw-searchbar.c b/setting-common/src/setting-common-draw-searchbar.c new file mode 100755 index 0000000..be36cef --- /dev/null +++ b/setting-common/src/setting-common-draw-searchbar.c @@ -0,0 +1,182 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include +#include +/** +* Get searchbar text and register redraw_cb by idler. +* +* @param[in] data +* @param[in] search_bar +* @param[in] search_text +* @param[in] search_idler +* @param[in] redraw_cb +*/ +int setting_searchbar_redraw(void *data, + Evas_Object *search_bar, + char *search_text, + Ecore_Idler **search_idler, + Ecore_Task_Cb redraw_cb) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(search_bar == NULL, -1, "search_bar parameter is NULL"); + //const char *str = elm_object_text_get(search_bar); + Evas_Object *entry = elm_object_part_content_get(search_bar, "elm.swallow.content"); + const char *str = elm_entry_entry_get(entry); + int str_len = safeStrLen(str); + setting_retvm_if(str_len > MAX_SEARCH_STR_LEN, -1, "str_len > MAX_SEARCH_STR_LEN"); + + memset(search_text, '\0', MAX_SEARCH_STR_LEN + 1); + safeCopyStr(search_text, str, MAX_SEARCH_STR_LEN); + + SETTING_TRACE("Update the search view text, search_text=%s", + search_text); + + if (*search_idler) { + ecore_idler_del(*search_idler); + *search_idler = NULL; + } + *search_idler = ecore_idler_add(redraw_cb, data); + return 0; +} +static void __searchbar_chg_cb(void *data, Evas_Object *obj, void *event_info) +{ + Evas_Object *searchbar_layout = data; + if (elm_object_focus_get(searchbar_layout)) { + if (elm_entry_is_empty(obj)) { + elm_object_signal_emit(searchbar_layout, "elm,state,eraser,hide", "elm"); + } + else + elm_object_signal_emit(searchbar_layout, "elm,state,eraser,show", "elm"); + } + if(safeStrLen(elm_entry_entry_get(obj)) > 0) { + elm_object_signal_emit(searchbar_layout, "elm,state,guidetext,hide", "elm"); + } else { + elm_object_signal_emit(searchbar_layout, "elm,state,guidetext,show", "elm"); + } +} + +static void __searchbar_focused_cb(void *data, Evas_Object *obj, void *event_info) +{ + ret_if(!data || !obj); + Evas_Object *searchbar_layout = data; + if (!elm_entry_is_empty(obj)) + elm_object_signal_emit(searchbar_layout, "elm,state,eraser,show", "elm"); + elm_object_signal_emit(searchbar_layout, "elm,state,guidetext,hide", "elm"); + elm_object_signal_emit(searchbar_layout, "cancel,in", ""); +} + +static void __searchbar_unfocused_cb(void *data, Evas_Object *obj, void *event_info) +{ + ret_if(!data || !obj); + Evas_Object *searchbar_layout = data; + if (elm_entry_is_empty(obj)) + elm_object_signal_emit(searchbar_layout, "elm,state,guidetext,show", "elm"); + elm_object_signal_emit(searchbar_layout, "elm,state,eraser,hide", "elm"); +} + +static void __searchbar_activated_cb(void *data, Evas_Object *obj, void *event_info) +{ + ret_if(!obj); + Evas_Object *searchbar_layout = data; + Evas_Object *entry = elm_object_part_content_get(searchbar_layout, "elm.swallow.content"); + ret_if(!entry); + elm_object_focus_set(entry, EINA_FALSE); +} + +static void __searchbar_eraser_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source) +{ + ret_if(!data); + Evas_Object *entry = data; + elm_entry_entry_set(entry, ""); +} + +static void __searchbar_bg_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source) +{ + ret_if(!data); + Evas_Object *entry = data; + elm_object_focus_set(entry, EINA_TRUE); +} + +static void __searchbar_cancel_clicked_cb(void *data, Evas_Object *obj, void *event_info) +{ + ret_if(!data || !obj); + evas_object_hide(obj); + Evas_Object *searchbar_layout = data; + elm_object_signal_emit(searchbar_layout, "cancel,out", ""); + Evas_Object *entry = elm_object_part_content_get(searchbar_layout, "elm.swallow.content"); + ret_if(!entry); + const char* text = elm_entry_entry_get(entry); + if (text != NULL && strlen(text) > 0) + elm_entry_entry_set(entry, NULL); + elm_object_focus_set(entry, EINA_FALSE); +} + +static void __searchbar_searchsymbol_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source) +{ + ret_if(!data); + Evas_Object *entry = data; + elm_object_focus_set(entry, EINA_TRUE); +} +/** +* Create searchar, register change cb and cancel cb. +* +* @param[in] data +* @param[in] parent +* @param[in] change_cb +* @param[in] cancel_cb +*/ +Evas_Object *setting_create_searchbar(void *data, Evas_Object *parent, + Evas_Smart_Cb change_cb, + Evas_Smart_Cb cancel_cb) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(parent == NULL, NULL, "parent parameter is NULL"); + Evas_Object *searchbar_layout = elm_layout_add(parent); + elm_layout_theme_set(searchbar_layout, "layout", "searchbar", "cancel_button"); + elm_object_part_content_set(parent, "searchbar", searchbar_layout); + Evas_Object *entry = elm_entry_add(searchbar_layout); + elm_entry_scrollable_set(entry, EINA_TRUE); + elm_entry_single_line_set(entry, EINA_TRUE); + elm_entry_prediction_allow_set(entry, EINA_FALSE); + if (change_cb) evas_object_smart_callback_add(entry, "changed", change_cb, data); + evas_object_smart_callback_add(entry, "changed", __searchbar_chg_cb, searchbar_layout); + evas_object_smart_callback_add(entry, "focused", __searchbar_focused_cb, searchbar_layout); + evas_object_smart_callback_add(entry, "unfocused", __searchbar_unfocused_cb, searchbar_layout); + evas_object_smart_callback_add(entry, "activated", __searchbar_activated_cb, searchbar_layout); + elm_entry_input_panel_layout_set(entry, ELM_INPUT_PANEL_LAYOUT_NORMAL); + elm_object_part_content_set(searchbar_layout, "elm.swallow.content", entry); + elm_object_part_text_set(searchbar_layout, "elm.guidetext", _("IDS_COM_SK_SEARCH")); + elm_object_signal_callback_add(searchbar_layout, "elm,eraser,clicked", "elm", __searchbar_eraser_clicked_cb, entry); + elm_object_signal_callback_add(searchbar_layout, "elm,bg,clicked", "elm", __searchbar_bg_clicked_cb, entry); + evas_object_size_hint_weight_set(searchbar_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(searchbar_layout, EVAS_HINT_FILL, EVAS_HINT_FILL); + + + Evas_Object *cancel_btn = elm_button_add(searchbar_layout); + elm_object_part_content_set(searchbar_layout, "button_cancel", cancel_btn); + elm_object_style_set(cancel_btn, "searchbar/default"); + elm_object_text_set(cancel_btn, _("IDS_COM_SK_CANCEL")); + + if (!cancel_cb){ + cancel_cb = __searchbar_cancel_clicked_cb; + } + evas_object_smart_callback_add(cancel_btn, "clicked", cancel_cb, searchbar_layout); + elm_object_signal_callback_add(searchbar_layout, "elm,action,click", "", __searchbar_searchsymbol_clicked_cb, entry); + return searchbar_layout; +} + diff --git a/setting-common/src/setting-common-draw-widget.c b/setting-common/src/setting-common-draw-widget.c new file mode 100755 index 0000000..029e03a --- /dev/null +++ b/setting-common/src/setting-common-draw-widget.c @@ -0,0 +1,821 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include +#include +#include + +/** + * Hide the input pannel + * + * @param[in] entry + */ +void setting_hide_input_pannel_cb(Evas_Object *entry) +{ + ret_if(entry == NULL); + Ecore_IMF_Context *imf_context = (Ecore_IMF_Context*)elm_entry_imf_context_get(entry); + if (imf_context) { + ecore_imf_context_input_panel_hide(imf_context); + } + + elm_object_focus_set(entry, EINA_FALSE); + Evas_Object *entry_container = elm_object_parent_widget_get(entry); + if (entry_container) + { + if (elm_entry_is_empty(entry)) + elm_object_signal_emit(entry_container, "elm,state,guidetext,show", "elm"); + elm_object_signal_emit(entry_container, "elm,state,eraser,hide", "elm"); + } +} + +Evas_Object *setting_create_button(Evas_Object *parent, const char *btn_str, + const char *btn_style, + setting_call_back_func btn_click_cb, + void *cb_data) +{ + retv_if(!parent || !btn_str, NULL); + if ('\0' == btn_str[0]) {//Empty rectangle + return setting_create_blank_rect_customize(parent, + SETTING_PADDING_WIDTH, + SETTING_PADDING_WIDTH); + } + + Evas_Object *button = elm_button_add(parent); + if (btn_style) { + elm_object_style_set(button, btn_style); + } + + if (0 != safeStrCmp(NAVI_BACK_BUTTON_STYLE, btn_style)) {//not '<-' button + elm_object_text_set(button, btn_str); + + evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(button,EVAS_HINT_FILL, 0.5); + } + + if (btn_click_cb) { + evas_object_smart_callback_add(button, "clicked", + btn_click_cb, cb_data); + } + evas_object_show(button); + return button; +} + + +/** + * To create slider object of a genlist item + * + *@return a slider container object + */ +Evas_Object *setting_create_slider(Evas_Object *parent, Evas *evas, + const char *l_swallow_path, + const char *r_swallow_path, double value, + bool indicator, double slider_min, double slider_max, + setting_call_back_func slider_change_cb, + setting_call_back_func slider_start_change_cb, + setting_call_back_func slider_stop_change_cb, + void *cb_data) +{ + Evas_Object *slider = elm_slider_add(parent); /* "elm/slider/horizontal/default" */ + retv_if(slider == NULL, NULL); + + if(indicator) + { + elm_slider_indicator_format_set(slider, "%1.0f"); + } + else + { + /* for brightness slider */ + elm_slider_indicator_show_set(slider, EINA_FALSE); +#if DISABLED_CODE + elm_object_style_set(slider, "ebook"); +#endif + } + + evas_object_size_hint_weight_set(slider, EVAS_HINT_EXPAND, 0.0); + evas_object_size_hint_align_set(slider, EVAS_HINT_FILL, 0.5); + + if (slider_change_cb) + evas_object_smart_callback_add(slider, "changed", slider_change_cb, cb_data); + + if (slider_stop_change_cb) + evas_object_smart_callback_add(slider, "slider,drag,stop", slider_stop_change_cb, cb_data); + + if(slider_start_change_cb) + evas_object_smart_callback_add(slider, "slider,drag,start", slider_start_change_cb, cb_data); + + Evas_Object *icon1 = elm_icon_add(slider); + elm_icon_file_set(icon1, l_swallow_path, NULL); + evas_object_size_hint_aspect_set(icon1, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); + + Evas_Object *icon2 = elm_icon_add(slider); + elm_icon_file_set(icon2, r_swallow_path, NULL); + evas_object_size_hint_aspect_set(icon2, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); + + elm_object_content_set(slider, icon1); + elm_object_part_content_set(slider, "end", icon2); + + elm_slider_min_max_set(slider, slider_min, slider_max); + elm_slider_value_set(slider, value); + return slider; +} + +/** + * The main implement body of create a certain size icon + */ +void create_image_box_add_ex(void *data, Evas_Object *win_main, Evas *evas, + char *img_path, int img_w, int img_h, + Evas_Object_Event_Cb mouse_down_cb, + Evas_Object_Event_Cb mouse_up_cb, + Evas_Object **image_box, Evas_Object **img) +{ + /* SETTING_TRACE_BEGIN; */ + *image_box = elm_box_add(win_main); + retm_if(*image_box == NULL, "Cannot get box"); + elm_box_horizontal_set(*image_box, 1); + evas_object_size_hint_align_set(*image_box, 0.0, EVAS_HINT_FILL); /* */ + evas_object_show(*image_box); + + *img = evas_object_image_add(evas); + evas_object_size_hint_weight_set(*img, 0.0, EVAS_HINT_EXPAND); + + int temp_h = img_h; + int temp_w = img_w; + + evas_object_image_file_set(*img, img_path, NULL); + if (img_h <= 0 || temp_w <= 0) //error handling. load the image as it's own size + { + evas_object_image_size_get(*img, &temp_w, &temp_h); + } + + evas_object_image_load_size_set(*img, temp_w, temp_h); + evas_object_image_fill_set(*img, 0, 0, temp_w, temp_h); + + evas_object_size_hint_min_set(*img, temp_w, temp_h); + evas_object_show(*img); + + evas_object_event_callback_add(*img, EVAS_CALLBACK_MOUSE_DOWN, + mouse_down_cb, data); + evas_object_event_callback_add(*img, EVAS_CALLBACK_MOUSE_UP, + mouse_up_cb, data); + + elm_box_pack_end(*image_box, *img); +} + +/** + * To create a size fixed icon + * @return a image container object + */ + +Evas_Object *create_image_box_add(void *data, Evas_Object *win_main, + Evas *evas, char *img_path, int img_w, + int img_h, Evas_Object_Event_Cb mouse_down_cb, + Evas_Object_Event_Cb mouse_up_cb) +{ + /* SETTING_TRACE_BEGIN; */ + Evas_Object *image_box = NULL; + Evas_Object *img = NULL; + create_image_box_add_ex(data, win_main, evas, img_path, + img_w * WIDGET_SCALE_FACTOR, + img_h * WIDGET_SCALE_FACTOR, mouse_down_cb, + mouse_up_cb, &image_box, &img); + return image_box; + +} + +/** +* To create a size specialized icon +* +* @return a image container object +*/ + +Evas_Object *create_bgimage_box_add(void *data, Evas_Object *win_main, Evas *evas, char *img_path, int img_w, int img_h, /* if img_w<0 or img_h <0, load the image as it's own size */ + Evas_Object_Event_Cb mouse_down_cb, + Evas_Object_Event_Cb mouse_up_cb) +{ + Evas_Object *image_box = NULL; + Evas_Object *img = NULL; + create_image_box_add_ex(data, win_main, evas, img_path, img_w, img_h, + mouse_down_cb, mouse_up_cb, &image_box, &img); + return image_box; +} + +/** +* @ create a box container +* +* @param[in] win_main +* +* @return a box container +*/ +Evas_Object *setting_create_client_bx(Evas_Object *win_main) +{ + Evas_Object *client_bx = NULL; + + client_bx = elm_box_add(win_main); + retvm_if(client_bx == NULL, NULL, "Cannot create client box object"); + + elm_box_horizontal_set(client_bx, 0); + evas_object_size_hint_weight_set(client_bx, EVAS_HINT_EXPAND, 0.0); + evas_object_size_hint_align_set(client_bx, EVAS_HINT_FILL, 0.0); + + return client_bx; +} + + +Evas_Object *setting_create_lable(Evas_Object *parent, const char *text, + const char *style, const char *align) +{ + retvm_if(!parent || !text, NULL, "Cannot create client box object"); + Evas_Object *label = NULL; + if (0 == safeStrCmp(style, "entry")) + { + SETTING_TRACE("style:%s", style); + label = elm_entry_add(parent); + elm_entry_editable_set(label, EINA_FALSE); + } + else + { + label = elm_label_add(parent); + elm_object_style_set(label, style); + elm_label_line_wrap_set(label, ELM_WRAP_MIXED); + } + const char *str = setting_customize_text(text, 0, NULL, align); + elm_object_text_set(label, str); + FREE(str); + evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, 0.0); + evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_show(label); + return label; +} + +#define DEMO_STEP 0.4 +typedef struct _setting_gif_data{ + Ecore_Timer *update_timer; + const char **png_list; + int cur_png_idx; +}setting_gif_data; + +static void __gif_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + ret_if(!data); + setting_gif_data *gif_data = data; + if (gif_data->update_timer) {//first delete the timer + ecore_timer_del(gif_data->update_timer); + gif_data->update_timer = NULL; + } + FREE(gif_data);//delete the date. + evas_object_data_set(obj, "gif_data", NULL); +} + +Eina_Bool __gif_updater(void *data) +{ + retv_if(!data, FALSE); + Evas_Object *gif = data; + setting_gif_data *gif_data = evas_object_data_get(gif, "gif_data"); + retv_if(!gif_data, FALSE); + SETTING_TRACE_BEGIN; + + gif_data->cur_png_idx++; + if (NULL == gif_data->png_list[gif_data->cur_png_idx]) { //the last element of current array. + gif_data->cur_png_idx = 0; + } + elm_image_file_set(gif, gif_data->png_list[gif_data->cur_png_idx], NULL); + int w = 0; + int h = 0; + elm_image_object_size_get(gif, &w, &h); + setting_resize_object(gif, w, h); + + return TRUE; +} + +Evas_Object *setting_create_image(Evas_Object *parent, const char *img_path) +{ + Evas_Object *image = elm_image_add(parent); + //SETTING_TRACE("icon_path:%s", icon_path); + elm_image_file_set(image, img_path, NULL); + elm_image_resizable_set(image, EINA_TRUE, EINA_TRUE); + + int w = 0; + int h = 0; + elm_image_object_size_get(image, &w, &h); + setting_resize_object(image, w, h); + evas_object_show(image); + return image; +} + +/* @png_list is an array end with 'NULL'. like , + const char *png_list[] = { + SETTING_ICON_PATH_CFG"motions/motion_overturn_01.png", + SETTING_ICON_PATH_CFG"motions/motion_overturn_02.png", + SETTING_ICON_PATH_CFG"motions/motion_overturn_03.png", + SETTING_ICON_PATH_CFG"motions/motion_overturn_04.png", + SETTING_ICON_PATH_CFG"motions/motion_overturn_05.png", + NULL //must end with 'NULL' + }; +*/ +Evas_Object *setting_create_gif(Evas_Object *parent, const char **png_list) +{ + retv_if(!png_list, NULL); + setting_gif_data *gif_data = calloc(1,sizeof(setting_gif_data)); + setting_retvm_if(!gif_data, NULL, "calloc failed"); + gif_data->cur_png_idx = 0; + gif_data->png_list = png_list; + + SETTING_TRACE_BEGIN; + + Evas_Object *gif = setting_create_image(parent, *png_list);//the first element + //bind object data + evas_object_data_set(gif, "gif_data", gif_data); + evas_object_event_callback_add(gif, EVAS_CALLBACK_DEL, __gif_del_cb, gif_data); + + if (gif_data->update_timer) { + ecore_timer_del(gif_data->update_timer); + gif_data->update_timer = NULL; + } + gif_data->update_timer = ecore_timer_add(DEMO_STEP, (Ecore_Task_Cb)__gif_updater, gif); + + return gif; +} + +/** +* Set the vconf value via its binded check object. +* @return 0: sucess, other: failed +*/ + +int setting_reset_slp_key_by_status(Evas_Object *obj, + setting_bool_slp_list key) +{ + SETTING_TRACE_BEGIN; + int err, ret; + + int status = 0; + status = elm_check_state_get(obj); + if (status) { + ret = + setting_set_bool_slp_key(key, SETTING_ON_OFF_BTN_ON, &err); + } else { + ret = + setting_set_bool_slp_key(key, SETTING_ON_OFF_BTN_OFF, &err); + } + return ret; +} + +/** +* Alternate the check object status and its binded vcof value via original vcofn value +*/ +int setting_draw_onoff_status(Evas_Object *obj, setting_bool_slp_list key) +{ + int value; + int err; + int ret; + + setting_get_bool_slp_key(key, &value, &err); + + elm_check_state_set(obj, !value); + ret = setting_set_bool_slp_key(key, !value, &err); + return ret; +} + +/** +* Set the status of check object via its binded vconf value. +* @return 0: sucess, other: failed +*/ +int setting_check_onoff_status(Evas_Object *obj, setting_bool_slp_list key) +{ + int value = 0; + int err = 0; + int ret = 0; + + ret = setting_get_bool_slp_key(key, &value, &err); + elm_check_state_set(obj, value); + return ret; +} + +/** +* Set the status of radio group object via its binded vconf value. +* @return 0: sucess, other: failed +*/ +int setting_update_chk_status(Evas_Object *chk, setting_int_slp_list type) +{ + SETTING_TRACE_BEGIN; + /* error check */ + if (chk == NULL) { + return SETTING_GENERAL_ERR_NULL_DATA_PARAMETER; + } + + SETTING_TRACE_BEGIN; + + int ret = SETTING_RETURN_FAIL; + int value; + int err; + + /* value set */ + ret = setting_get_int_slp_key(type, &value, &err); + SETTING_TRACE("binded: %d, checked: %d, err: %d", type, value, err); + + elm_radio_value_set(chk, value); + + return ret; +} + +/** +* Create a size specilized rectangle object +* @return a size specilized rectangle object +*/ +Evas_Object *setting_create_blank_rect_customize(Evas_Object *layout, int w, + int h) +{ + Evas_Object *rect; + + rect = evas_object_rectangle_add(evas_object_evas_get(layout)); + evas_object_size_hint_min_set(rect, w, h); + evas_object_size_hint_weight_set(rect, EVAS_HINT_EXPAND, 0); + evas_object_color_set(rect, 0, 0, 0, 0); + + return rect; +} + +/** +* Create a size fixed rectangle object +* +* @param[in] layout +* +* @return a size fixed rectangle object +*/ +Evas_Object *setting_create_blank_rect(Evas_Object *layout) +{ + return setting_create_blank_rect_customize(layout, + SETTING_PADDING_WIDTH, 80); +} + +/** +* The API to Create an editfiled object +* @return an editfiled object +*/ +Evas_Object * /* multi-line is default, use elm_editfield_entry_single_line_set(ef, EINA_TRUE) to set single-line */ +setting_create_editfiled(Evas_Object *win_main, char *title, char *def_str) +{ + Evas_Object *layout = NULL; + Evas_Object *entry = NULL; + layout = elm_layout_add(win_main); + + if(title) + { + elm_layout_theme_set(layout, "layout", "editfield", "title"); + elm_object_part_text_set(layout, "elm.text", title); + } + else + { + elm_layout_theme_set(layout, "layout", "editfield", "default"); + } + entry = elm_entry_add(win_main); + elm_object_part_content_set(layout, "elm.swallow.content", entry); + //elm_entry_context_menu_disabled_set(entry, TRUE); + //elm_entry_magnifier_disabled_set(entry, TRUE); + elm_entry_prediction_allow_set(entry, FALSE); + + if (def_str && safeStrLen(def_str) > 0) { + elm_entry_entry_set(entry, def_str); + } else { + elm_object_part_text_set(layout, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT")); + } + + evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, 0); + evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, 0); + + evas_object_show(layout); + return layout; +} + +/** +* Create a text box, which cannot be edited, just to show a specilization segment. +* +* @return a text box, which cannot be edited +*/ +Evas_Object *setting_create_textbox(Evas_Object *parent, const char *content) +{ + Evas_Object *obj = NULL; + + obj = elm_entry_add(parent); + evas_object_size_hint_weight_set(obj, EVAS_HINT_EXPAND, 0.0); + evas_object_size_hint_align_set(obj, EVAS_HINT_FILL, 0.5); + elm_entry_single_line_set(obj, 0); + /* elm_entry_line_wrap_set(obj, 1); */ + elm_entry_editable_set(obj, 0); + elm_entry_context_menu_disabled_set(obj, 1); + + /* setting_disable_evas_object(obj); ***disable any events on entry */ + + elm_entry_entry_set(obj, content); + evas_object_show(obj); + return obj; +} + +/** +* Make it no effect when clicking on a evas object and its sub-objects, such as, layout, genlist +* +* @param[in] obj +*/ +void setting_disable_evas_object(Evas_Object *obj) +{ /* layout\genlist\scroller\elm_entry etc.. */ + if (obj) { + evas_object_pass_events_set(obj, EINA_TRUE); + } +} + +/** +* Make it normal acting when clicking on a evas object, such as, layout, genlist +* +* @param[in] obj +*/ +void setting_enable_evas_object(Evas_Object *obj) +{ + if (obj) { + evas_object_pass_events_set(obj, EINA_FALSE); + } +} + +/** +* To resize a evas object, such as, icon, button.. +* +* @param[in] obj +* @param[in] w +* @param[in] h +*/ +void setting_resize_object(Evas_Object *obj, Evas_Coord w, Evas_Coord h) +{ + if (obj) { + evas_object_size_hint_min_set(obj, w, h); + evas_object_size_hint_max_set(obj, w, h); + evas_object_resize(obj, w, h); + } +} + +/** +* To create a bg object +* +* @param[in] parent +* @param[in] bg_style +* @return bg object +*/ +Evas_Object *setting_create_bg(Evas_Object *parent,Evas_Object *win, const char *bg_style) +{ + retv_if(!parent, NULL); + Evas_Object *bg = elm_bg_add(parent); + retv_if(!bg, NULL); + elm_object_style_set(bg, bg_style); + evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + //elm_win_resize_object_add(win, bg); + evas_object_show(bg); + return bg; +} + + +#define DIFF_TIMES 2 +/** +* To make an object which is operated by setting_dim_evas_object normal color +* +* @param[in] obj +* @param[in] b_transparency_set: +* 1:the appearence of obj is made up of transparent backgroud color. +* 0:the appearence of obj is made up of non transparent color. +*/ +void setting_undo_dim_evas_object(Evas_Object *obj, bool b_transparenct) +{ + if (obj) { + int r; + int g; + int b; + int a; + evas_object_color_get(obj, &r, &g, &b, &a); + if (b_transparenct) {//the appearence of obj is made up of transparent backgroud color. + a *= DIFF_TIMES; + } + evas_object_color_set(obj, r * DIFF_TIMES, g * DIFF_TIMES, b * DIFF_TIMES, a); + } +} + +/** +* To make an object dim color +* +* @param[in] obj +* @param[in] b_transparency_set: +* 1:the appearence of obj is made up of transparent backgroud color. +* 0:the appearence of obj is made up of non transparent color. +*/ +void setting_dim_evas_object(Evas_Object *obj, bool b_transparenct) +{ + if (obj) { + int r; + int g; + int b; + int a; + evas_object_color_get(obj, &r, &g, &b, &a); + if (b_transparenct) {//the appearence of obj is made up of transparent backgroud color. + a /= DIFF_TIMES; + } + evas_object_color_set(obj, r / DIFF_TIMES, g / DIFF_TIMES, b / DIFF_TIMES, a); + } +} + +static void __btn_select_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + setting_dim_evas_object(obj, FALSE); +} + +static void __btn_release_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + setting_undo_dim_evas_object(obj, FALSE); +} + +/** +* To make an object looks clickable: if pressed, it is dim color;if unpressed, it is normal color; +* +* @param[in] obj +*/ +void setting_make_evas_object_clickable(Evas_Object *obj) +{ + if (obj) { + evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_DOWN, __btn_select_cb, NULL); + evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_UP, __btn_release_cb, NULL); + } +} + +/** +* To create an icon which looks clickable(if pressed, it is dim color;if unpressed, it is normal color) +* +* @param[in] parent +* @param[in] img_path +* @param[in] up_cb +* @param[in] down_cb +* @param[in] move_cb +* @param[in] data +*/ +Evas_Object *setting_create_icon(Evas_Object *parent, const char *img_path, + Evas_Object_Event_Cb up_cb, + Evas_Object_Event_Cb down_cb, + Evas_Object_Event_Cb move_cb, + void *data) +{ + SETTING_TRACE_BEGIN; + retv_if(!parent || !img_path, NULL); + Evas_Object *icon = elm_icon_add(parent); + retvm_if(!icon, NULL, "Failed Create icon!"); + elm_icon_file_set(icon, img_path, NULL); + setting_make_evas_object_clickable(icon); + + if (up_cb) { + evas_object_event_callback_add(icon, EVAS_CALLBACK_MOUSE_UP, + up_cb, data); + } + if (down_cb) { + evas_object_event_callback_add(icon, EVAS_CALLBACK_MOUSE_DOWN, + down_cb, data); + } + if (move_cb) { + evas_object_event_callback_add(icon, EVAS_CALLBACK_MOUSE_MOVE, + move_cb, data); + } + + return icon; +} + +/** +* To create a button which only has a image and looks clickable +* (if pressed, it is dim color;if unpressed, it is normal color) +* @param[in] parent +* @param[in] img_path +* @param[in] up_cb +* @param[in] down_cb +* @param[in] move_cb +* @param[in] data +*/ +Evas_Object *setting_create_image_button(Evas_Object *parent, + const char *btn_img, + setting_call_back_func clicked_cb, + setting_call_back_func unpressed_cb, + void *data) +{ + SETTING_TRACE_BEGIN; + retv_if(!parent, NULL); + Evas_Object *btn = elm_button_add(parent); + retvm_if(!btn, NULL, "Failed Create button!"); + if (clicked_cb) { + evas_object_smart_callback_add(btn, "clicked", clicked_cb, data); + } + + if (unpressed_cb) { + evas_object_smart_callback_add(btn, "unpressed", unpressed_cb, data); + } + + if (btn_img) { + Evas_Object *icon = elm_icon_add(parent); + retvm_if(!icon, NULL, "Failed Create icon!"); + elm_icon_file_set(icon, btn_img, NULL); + elm_object_part_content_set(btn, "elm.swallow.content", icon); + setting_make_evas_object_clickable(btn); + } + + return btn; +} + + + +/* +* set font_size, color or align(right, left, middle),if need, you +* can add , or to controll a segment words; or else +* the text will take the same effect until the end of text. +* @param[in] input_str +* @param[in] font_size +* @param[in] color +* @param[in] align :may be right, left, middle/center +*/ +char *setting_customize_text(const char *input_str, const int font_size, + const char *color, const char *align) +{ + SETTING_TRACE_BEGIN; + retv_if(isEmptyStr(input_str), NULL); + SETTING_TRACE("input_str:%s, color:%s", input_str, color); + char speciliztion[MAX_SPECIALIZITION_LEN] = { 0, }; + //bbb + if (font_size > 0) + { + snprintf(speciliztion, sizeof(speciliztion), + "", font_size); + } + + if (align) + { + g_strlcat(speciliztion, "", MAX_SPECIALIZITION_LEN); + } + + if(color) + { + char input_str1[MAX_SPECIALIZITION_LEN] = { 0, }; + safeCopyStr(input_str1, input_str, MAX_SPECIALIZITION_LEN); + char *p = strstr(input_str1, "' != p[0]) //invalid format + { + g_strlcat(speciliztion, "", MAX_SPECIALIZITION_LEN); + g_strlcat(speciliztion, input_str, MAX_SPECIALIZITION_LEN); + g_strlcat(speciliztion, "", MAX_SPECIALIZITION_LEN); + } + else + g_strlcat(speciliztion, input_str1, MAX_SPECIALIZITION_LEN); + } + else + { + g_strlcat(speciliztion, "", MAX_SPECIALIZITION_LEN); + g_strlcat(speciliztion, input_str, MAX_SPECIALIZITION_LEN); + g_strlcat(speciliztion, "", MAX_SPECIALIZITION_LEN); + } + } + else + { + g_strlcat(speciliztion, input_str, MAX_SPECIALIZITION_LEN); + } + if (align) + { + g_strlcat(speciliztion, "", MAX_SPECIALIZITION_LEN); + } + if (font_size > 0) + { + g_strlcat(speciliztion, "", MAX_SPECIALIZITION_LEN); + } + + SETTING_TRACE("Exit %s, return :%s", __FUNCTION__, speciliztion); + return (char *)strdup(speciliztion);; +} + diff --git a/setting-common/src/setting-common-general-func.c b/setting-common/src/setting-common-general-func.c new file mode 100755 index 0000000..040a51f --- /dev/null +++ b/setting-common/src/setting-common-general-func.c @@ -0,0 +1,1333 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include +#include + +#include +#include +#include +#include +#include + +#include + + +char *setting_file_basename(char *path) +{ + if (NULL == path || '\0' == path[0]) { + return NULL; /* invalid arguement */ + } + char *p = strrchr(path, '/'); + if (!p) { + return (char *)g_strdup(path); /* cannot find '/' */ + } + if ('\0' == p[1]) { + return NULL; /* end with '/' */ + } + return (char *)g_strdup(p + 1); +} + + +char *get_pa_usb_connect_mode_str() +{ + int ret = SETTING_RETURN_FAIL; + int value; + + ret = vconf_get_int(VCONFKEY_SETAPPL_USB_MODE_INT, &value); + setting_retvm_if(SETTING_RETURN_FAIL == ret, NULL, "Failed to get vconf value"); /* file system exceptional handle */ + + switch (value) + { + case SETTING_USB_DEBUG_MODE: + return (char*)g_strdup(_("IDS_ST_BODY_USB_DEBUGGING")); + default: + return (char*)g_strdup(_("IDS_COM_POP_DISCONNECTED")); + } +} + + +char *get_brightness_mode_str() +{ + int value, err; + setting_get_int_slp_key(INT_SLP_SETTING_AUTOMATIC_BRIGHTNESS, &value, + &err); + if (value != SETTING_BRIGHTNESS_AUTOMATIC_OFF) { + return setting_gettext("IDS_COM_BODY_AUTOMATIC"); + } else { + return setting_gettext("IDS_COM_BODY_MANUAL"); + } +} + + +char *get_pa_backlight_time_str() +{ + int value = 0; + char backlight_time_str[MAX_DISPLAY_NAME_LEN_ON_UI]; + +#if SUPPORT_LCD_TIMEOUT_KEEPING + if (0 != vconf_get_int(VCONFKEY_LCD_TIMEOUT_NORMAL_BACKUP, &value)) { + /* value = 600; */ + if(isEmulBin()) + value = 0; /* keep agree with postin file */ + else + value = 30; + vconf_set_int(VCONFKEY_LCD_TIMEOUT_NORMAL_BACKUP, value); + } +#else + int err; + int ret = + setting_get_int_slp_key(INT_SLP_SETTING_LCD_TIMEOUT_NORMAL, &value, + &err); + #if NORMAL + if (SETTING_RETURN_FAIL == ret || value < 0) { /* file system exceptional handle, eg. The vconf file lost due to file system. */ + /* value = 600; */ + if(isEmulBin()) + value = 0; /* keep agree with postin file */ + else + value = 30; + setting_set_int_slp_key(INT_SLP_SETTING_LCD_TIMEOUT_NORMAL, + value, &err); + } + #else // for MDM server + // adjust value. + // if < 15, 15 + // if 15 < < 30, 15 + // if 30 < < 60, 30 + // if 60 < < 120, 60 + // if 120 < < 300, 120 + // if 300 < < 600, 300 + // if > 600, 600 + if(isEmulBin()) + { + if (SETTING_RETURN_FAIL == ret || value < 15) + value = 0; + else if(value >= 15 && value < 30) + value = 15; + else if(value >= 30 && value < 60) + value = 30; + else if(value >= 60 && value < 120) + value = 60; + else if(value >= 120 && value < 300) + value = 120; + else if(value >= 300 && value < 600) + value = 300; + else + value = 600; + } + else + { + if (SETTING_RETURN_FAIL == ret || value < 30) + value = 15; + else if(value >= 30 && value < 60) + value = 30; + else if(value >= 60 && value < 120) + value = 60; + else if(value >= 120 && value < 300) + value = 120; + else if(value >= 300 && value < 600) + value = 300; + else + value = 600; + } + + setting_set_int_slp_key(INT_SLP_SETTING_LCD_TIMEOUT_NORMAL, value, &err); + #endif +#endif + + if (value == 0) { + snprintf(backlight_time_str, sizeof(backlight_time_str), "%s", + _("IDS_ST_BODY_ALWAYS_ON")); + } else if (value == 60) { + snprintf(backlight_time_str, sizeof(backlight_time_str), "%s", + _("IDS_COM_BODY_1_MINUTE")); + } else if (value > 60) { + snprintf(backlight_time_str, sizeof(backlight_time_str), + "%d %s", value / 60, (char *)(_("IDS_COM_BODY_MINUTES_LC"))); + } else { + snprintf(backlight_time_str, sizeof(backlight_time_str), + "%d %s", value, (char *)(_("IDS_COM_BODY_SECONDS_LC"))); + } + return (char *)g_strdup(backlight_time_str); +} + + +char *get_pa_powersaving_at_str() +{ + int value = 30; + char powersaving_at_str[MAX_DISPLAY_NAME_LEN_ON_UI + 1]; + + int err; + int ret = + setting_get_int_slp_key(INT_SLP_SETTING_POWERSAVING_AT, &value, + &err); + if (SETTING_RETURN_FAIL == ret || value < 0) { /* file system exceptional handle, eg. The vconf file lost due to file system. */ + value = 30; /* keep agree with postin file */ + setting_set_int_slp_key(INT_SLP_SETTING_POWERSAVING_AT, + value, &err); + } + + snprintf(powersaving_at_str, MAX_DISPLAY_NAME_LEN_ON_UI, "At %d%% %s", + value, "battery power"); + return (char *)g_strdup(powersaving_at_str); +} + + +char *get_pa_screen_timeout_str() +{ + int value = 15; + char screen_timeout_str[MAX_DISPLAY_NAME_LEN_ON_UI + 1]; + + int err; + int ret = + setting_get_int_slp_key(INT_SLP_SETTING_POWERSAVING_SCREEN_TIMEOUT, + &value, + &err); + if (SETTING_RETURN_FAIL == ret || value < 0) { /* file system exceptional handle, eg. The vconf file lost due to file system. */ + value = 15; /* keep agree with postin file */ + setting_set_int_slp_key + (INT_SLP_SETTING_POWERSAVING_SCREEN_TIMEOUT, value, &err); + } + + if (value == 60) { + snprintf(screen_timeout_str, MAX_DISPLAY_NAME_LEN_ON_UI, "%s", + _("1 minute")); + } else if (value >= 60) { + snprintf(screen_timeout_str, MAX_DISPLAY_NAME_LEN_ON_UI, + "%d %s", value / 60, + (char *)(_("IDS_COM_BODY_MINUTES_LC"))); + } else { + snprintf(screen_timeout_str, MAX_DISPLAY_NAME_LEN_ON_UI, + "%d %s", value, + (char *)(_("IDS_COM_BODY_SECONDS_LC"))); + } + return (char *)g_strdup(screen_timeout_str); +} + + +char *get_pa_display_language_str() +{ + int ret = SETTING_RETURN_FAIL; + int err; + int index; + + Eina_List* list = setting_get_language_list(); + Eina_List* elist = NULL; + + ret = setting_get_int_slp_key(INT_SLP_SETTING_LANG, &index, &err); + + if (0 == index) + return g_strdup("Automatic"); + + setting_lang_entry* pnode; + + char* title = NULL; + EINA_LIST_FOREACH( list, elist, pnode) + { + if (pnode->number == index) + title = g_strdup(pnode->title); + } + return title; +} + +char *get_pa_Wi_Fi_on_off_str() +{ + int value, err; + int ret = SETTING_RETURN_FAIL; + ret = + setting_get_int_slp_key(INT_SLP_SETTING_WIFI_STATUS, &value, &err); + + if (SETTING_RETURN_FAIL == ret) { /* file system exceptional handle, eg. The vconf file lost due to file system. */ + value = VCONFKEY_WIFI_OFF; + setting_set_int_slp_key(INT_SLP_SETTING_WIFI_STATUS, + VCONFKEY_WIFI_OFF, &err); + } + + if (value) { + char *pa_wifi_device = vconf_get_str(VCONFKEY_WIFI_CONNECTED_AP_NAME); + SETTING_TRACE("pa_wifi_device:%s", pa_wifi_device); + if (NULL != pa_wifi_device && '\0' != pa_wifi_device[0]) { + return pa_wifi_device; + } + + return (char*)g_strdup(setting_gettext("IDS_COM_BODY_ON_M_STATUS")); + } else { + return (char*)g_strdup(setting_gettext("IDS_COM_BODY_OFF_M_STATUS")); + } +} + +char *get_BT_on_off_str() +{ + int ret = SETTING_RETURN_FAIL; + int value, err; + ret = setting_get_int_slp_key(INT_SLP_SETTING_BT_STATUS, &value, &err); + + if (SETTING_RETURN_FAIL == ret) { /* file system exceptional handle, eg. The vconf file lost due to file system. */ + value = VCONFKEY_BT_STATUS_OFF; + setting_set_int_slp_key(INT_SLP_SETTING_BT_STATUS, + VCONFKEY_BT_STATUS_OFF, &err); + } + + if (VCONFKEY_BT_STATUS_OFF == value) { + return setting_gettext("IDS_COM_BODY_OFF_M_STATUS"); + } else { + return setting_gettext("IDS_COM_BODY_ON_M_STATUS"); + } +} + + +char *get_NFC_on_off_str() +{ + int ret = SETTING_RETURN_FAIL; + int value = 0, err = 0; + ret = setting_get_bool_slp_key(BOOL_SLP_SETTING_NFC_STATUS, &value, &err); + + if (SETTING_RETURN_FAIL == ret) { /* file system exceptional handle, eg. The vconf file lost due to file system. */ + SETTING_TRACE_DEBUG("fail to get nfc status from vconf"); + value = VCONFKEY_NFC_STATE_OFF; + } + + if (VCONFKEY_NFC_STATE_OFF == value) { + return setting_gettext("IDS_COM_BODY_OFF_M_STATUS"); + } else { + return setting_gettext("IDS_COM_BODY_ON_M_STATUS"); + } +} + + +char *get_pa_time_format_str() +{ + int ret = SETTING_RETURN_FAIL; + int value, err; + char *format_str[] = { _("IDS_COM_BODY_12_HOURS"), + _("IDS_ST_BODY_24_HOURS") }; + ret = + setting_get_int_slp_key(INT_SLP_SETTING_REGIONFORMAT_TIME1224, + &value, &err); + setting_retvm_if(SETTING_RETURN_FAIL == ret, NULL, "Failed to get vconf value"); /* file system exceptional handle */ + + /* scope */ + /* value 1:12H 2:24H */ + if (value > 0 && value <= 2) /* 1, 2 */ + return (char *)g_strdup(format_str[value - 1]); + else + return (char *)g_strdup(format_str[0]); /* set to 12H compelsery */ +} + + +/** @deprecated */ +char *get_pa_date_format_str() +{ + int ret = SETTING_RETURN_FAIL; + int value, err; + char *format_str[] = { _("IDS_ST_BODY_DDMMYYYY_DOT"), + _("IDS_ST_BODY_MM_DD_YYYY_DOT"), + _("IDS_COM_BODY_YYYYMMDD"), _("IDS_ST_BODY_YYYY_DD_MM_DOT") + }; + ret = + setting_get_int_slp_key(INT_SLP_SETTING_DATE_FORMAT, &value, &err); + setting_retvm_if(SETTING_RETURN_FAIL == ret, NULL, "Failed to get vconf value"); /* file system exceptional handle */ + return (char *)g_strdup(format_str[value]); +} + + +char *get_pa_week_format_str() +{ + int ret = SETTING_RETURN_FAIL; + int value, err; + char *format_str[] = { + _("IDS_ST_BODY_SUNDAY"), + _("IDS_ST_BODY_MONDAY"), + }; + + ret = + setting_get_int_slp_key(INT_SLP_SETTING_WEEK_FORMAT, &value, &err); + setting_retvm_if(SETTING_RETURN_FAIL == ret, NULL, "Failed to get vconf value"); /* file system exceptional handle */ + return (char *)g_strdup(format_str[value]); +} + + +char *get_pa_roaming_network_str() +{ + int ret = SETTING_RETURN_FAIL; + int value, err; + char *roaming_str[] = { + _("IDS_ST_BODY_AUTO_DOWNLOAD"), _("IDS_COM_BODY_MANUAL"), + _("IDS_ST_BODY_ALWAYS_REJECT") + }; + ret = + setting_get_int_slp_key(INT_SLP_SETTING_ROAMING_NETWORK, &value, + &err); + setting_retvm_if(SETTING_RETURN_FAIL == ret, NULL, "Failed to get vconf value"); /* file system exceptional handle */ + return (char *)g_strdup(roaming_str[value]); +} + +char *get_pa_select_network() +{ + int ret = 0; + int state = 0; + + char *net_name = NULL; + int service_type = VCONFKEY_TELEPHONY_SVCTYPE_SEARCH; + if (vconf_get_int(VCONFKEY_TELEPHONY_SVCTYPE, &service_type) != 0) { + SETTING_TRACE("fail to get VCONFKEY_TELEPHONY_SVCTYPE"); + } + + retv_if(service_type == VCONFKEY_TELEPHONY_SVCTYPE_NOSVC, (char *)strdup(_("IDS_COM_BODY_NO_SERVICE"))); + retv_if(service_type == VCONFKEY_TELEPHONY_SVCTYPE_EMERGENCY, (char *)strdup(_("Emergency calls only"))); + retv_if(service_type == VCONFKEY_TELEPHONY_SVCTYPE_SEARCH || service_type == VCONFKEY_TELEPHONY_SVCTYPE_NONE, (char *)strdup(_("IDS_COM_BODY_SEARCHING"))); + + ret = vconf_get_int(VCONFKEY_TELEPHONY_SPN_DISP_CONDITION, &state); + if (ret == 0) { + //SETTING_TRACE("VCONFKEY(%s) = %d", VCONFKEY_TELEPHONY_SPN_DISP_CONDITION, state); + char name[MAX_COMMON_BUFFER_LEN] = { 0, }; + const char *kv = NULL; + + if (state != VCONFKEY_TELEPHONY_DISP_INVALID) { + //counting. + int i = 0; + if (state & VCONFKEY_TELEPHONY_DISP_SPN) { + kv = vconf_get_str(VCONFKEY_TELEPHONY_SPN_NAME); + g_strlcat(name, kv, MAX_COMMON_BUFFER_LEN); + FREE(kv); + i++; + } + + if (state & VCONFKEY_TELEPHONY_DISP_PLMN) { + if( i != 0) + g_strlcat(name, " - ", MAX_COMMON_BUFFER_LEN); + + kv = vconf_get_str(VCONFKEY_TELEPHONY_NWNAME); + g_strlcat(name, kv, MAX_COMMON_BUFFER_LEN); + FREE(kv); + i++; + } + net_name = isEmptyStr(name) ? NULL : (char *)strdup(name); + + } else { //exceptional: state == VCONFKEY_TELEPHONY_DISP_INVALID + //kv = vconf_get_str(VCONFKEY_TELEPHONY_NWNAME); + //net_name = (char *)strdup(kv); + //FREE(kv); + // there is no name to display. displaying blank (if blank looks strange in UI point of view, we need to display something instead of blank) + } + } + + return net_name; +} + + + +double get_widgets_factor() +{ + return elm_config_scale_get(); +} + + +char *setting_gettext(const char *s) +{ + /* fisrt find in app pg */ + + if (s == NULL) { + return "NULL"; + } + + char *p = dgettext(SETTING_PACKAGE, s); + + if (!safeStrCmp(s, p)) { /* not found */ + /* find in system pkg */ + p = dgettext(SYSTEM_PACKAGE, s); + } + return p; +} + + +bool is_digital_str(const char *cstr) +{ + if (cstr == NULL || cstr[0] == 0) { + return FALSE; + } + + int len = (int)(safeStrLen(cstr)); + int pos = 0; + if (cstr[0] == '-' || cstr[0] == '+') { + if (len <= 1) { + return FALSE; + } + pos++; + } + + while (pos < len) { + if (cstr[pos] < '0' || cstr[pos] > '9') { + return FALSE; + } + pos++; + } + + return TRUE; +} + + +bool is_substr_ncase(const char *parentstr, const char *substr) +{ + if (NULL == parentstr || '\0' == parentstr[0]) + return FALSE; + + int word_len = safeStrLen(parentstr); + int search_len = safeStrLen(substr); + int i; + bool result = FALSE; + for (i = 0; i < word_len; i++) { + if (!strncasecmp(substr, &parentstr[i], search_len)) { + result = TRUE; + break; + } + } + return result; +} + + +bool is_string_belong_to_array(const char *partern, const char **array, + int array_num) +{ + int idx = 0; + for (; idx < array_num; idx++) { + if (!safeStrCmp(partern, array[idx])) { + return TRUE; + } + } + return FALSE; +} + + +//remove sub string from a parent string +char *remove_first_substring(const char *parent, const char *pat) +{ + setting_retvm_if(!parent, NULL, "NULL == parent, Exit %s with return NULL", __FUNCTION__); + char *str = strdup(parent); //to process the case parent pointing to const string + setting_retvm_if(!pat, str, "NULL == pat, Exit %s with return [%s]", __FUNCTION__, str); + + int idx = 0; + int str_len = safeStrLen(str); + int pat_len = safeStrLen(pat); + setting_retvm_if(pat_len > str_len, str, + "patlen[%d] > strlen[%d], Exit %s with return [%s]", + pat_len, str_len, __FUNCTION__, str); + char *p = NULL; + char *q = NULL; + for (; idx < str_len; idx++) { + if (0 == safeStrNCmp(pat, str + idx, pat_len)) { + p = str + idx; + q = str + idx + pat_len; + while('\0' != *q) + { + *p = *q; + p++; + q++; + } + *p = '\0'; + break; + } + } + + //now str keeps the result string + SETTING_TRACE("Exit %s with return str:%s", __FUNCTION__, str); + return str; +} + +//return True just when NULL or '\0' +bool isEmptyStr(const char *str) +{ + if (NULL == str || '\0' == str[0]) + return TRUE; + return FALSE; +} + +//return True just when str is NULL, '\0' or all strings made up of spaces +bool isSpaceStr(const char *str) +{ + //if (NULL == str) + // return TRUE; + while (str) + { + if (*str != '\0' && *str != ' ') + { + return FALSE; + } + else if (*str == '\0') + { + return TRUE; + } + str++; + } + return TRUE; +} + + +int safeStrCmp(const char *s1, const char *s2) +{ + /* Check NULL value first */ + if (isEmptyStr(s1) && isEmptyStr(s2)) { + return 0; + } else if (isEmptyStr(s1)) { + return 1; + } else if (isEmptyStr(s2)) { + return SETTING_RETURN_FAIL; + } + + return strcmp(s1, s2); +} + + +int safeStrNCmp(const char *s1, const char *s2, int len) +{ + + /* Check NULL value first */ + if (isEmptyStr(s1) && isEmptyStr(s2)) { + return 0; + } else if (isEmptyStr(s1)) { + return 1; + } else if (isEmptyStr(s2)) { + return SETTING_RETURN_FAIL; + } + + if (0 == len) { + return 0; + } + + return strncmp(s1, s2, len); +} + + +char *safeStrNCat(char *dst, const char *src, int maxlen) +{ + if (dst && !isEmptyStr(src) && maxlen > 0) { + (void) g_strlcat(dst, src, maxlen + 1); + } + + return dst; +} + + +char *safeCopyStr(char *dst, const char *src, int maxlen) +{ + if (maxlen < 0) { + return NULL; + } + + if (dst) { + int len = 0; + + if (src) { + int temp = (int)safeStrLen(src); + len = (temp <= maxlen) ? temp : maxlen; + memcpy(dst, src, len); + } + dst[len] = '\0'; + } + return dst; +} + + +int safeStrLen(const char *str) +{ + if (isEmptyStr(str)) { + SETTING_TRACE_DEBUG("string is empty"); + return 0; + } else { + return strlen(str); + } +} + + +/** + * get the int value of substring before delim + */ +bool get_substring_int(const char **ipStr, int *ipValue, char delim) +{ + int iValue = *ipValue = 0; + const char *str = *ipStr; + + if (str == NULL || str[0] == 0) { /* empty string */ + return FALSE; + } + + bool bNegative = FALSE; + if ('-' == str[0]) { /* allow Negative number.. */ + bNegative = TRUE; + str++; + } + if (str[0] < '0' || str[0] > '9') { /* first elementy is not digital */ + *ipStr = str; + return FALSE; + } + if (str[0] == '0') { /* first elementy is 0 */ + if (str[1] == delim) { + str += 2; + *ipStr = str; + return TRUE; + } + if (str[1] == 0) { + str++; + *ipStr = str; + return TRUE; + } + *ipStr = str; + return FALSE; + } + + for (;;) { + /****first elementy is not 0*/ + iValue = iValue * 10 + str[0] - '0'; + *ipValue = iValue; + if (((unsigned int)iValue & 0x80000000) != 0) { /* think about overloading */ + break; + } + str++; + if (str[0] == delim) { + str++; + if (bNegative) { + iValue = -iValue; + } + *ipStr = str; + *ipValue = iValue; + return TRUE; + } + if (str[0] == 0) { + if (bNegative) { + iValue = -iValue; + } + *ipStr = str; + *ipValue = iValue; + return TRUE; + } + if (str[0] < '0' || str[0] > '9') { + break; + } + } + + *ipStr = str; + return FALSE; +} + +#define MaxIPAddressLength 15 + +/** + * CHeck Whether a special string Is An IP String + * + * @param ipstr string representing IP numbers like "aaa.bbb.ccc.ddd" + * @return true if it's IP format string otherwise false + */ +bool is_ip_string(const char *ipstr) +{ + if (NULL == ipstr || 0 == ipstr[0]) + return FALSE; + int len = (int)safeStrLen(ipstr); + if (len > MaxIPAddressLength) { + return FALSE; + } + + if (ipstr[len - 1] == '.') { + return FALSE; + } + + int ip; + int i = 0; + for (; i < 4; i++) { + if (!get_substring_int(&ipstr, &ip, '.') || ip > 255) { + SETTING_TRACE("ipstr:%s", ipstr); + return FALSE; + } + SETTING_TRACE("ipstr:%s", ipstr); + } + if (ipstr[0] != 0) { + return FALSE; + } + + return TRUE; +} + +int setting_invoke_reset_function(char *ug_name, service_h service, void *ext) +{ + SETTING_TRACE("Enter %s with ug_name:%s", __FUNCTION__, ug_name); + int (*reset) (service_h pair, void *ptr); + int ret = OPERATE_LIB_SUCESS; + + //1.first do exist-checking in /opt/ug/lib + char ug_file[PATH_MAX + 1]; + snprintf(ug_file, PATH_MAX, "%s/libug-%s.so", SETTING_UG_PATH, ug_name); + struct stat st; + if(stat(ug_file, &st) != 0) { + + //2.if it does not exit in /opt/ug/lib, then do exist-checking in /usr/ug/lib + memset(ug_file, 0x00, PATH_MAX + 1); + snprintf(ug_file, PATH_MAX, "%s/libug-%s.so", SETTING_UG_PATH_USR, ug_name); + if(stat(ug_file, &st) != 0) { + //both not exist,skip it + SETTING_TRACE_ERROR(" libug-%s.so is *NOT* present, so skip it..\n", ug_name); + return OPERATE_LIB_SUCESS; + } + } + //------------------------------------------------------------------------------------- + void *handle = dlopen(ug_file, RTLD_LAZY); + if (!handle) { + SETTING_TRACE_ERROR(" >>>>>>>>>>> %s", dlerror()); + return LOAD_LIB_FAILED; + } + + char *error = NULL; + reset = dlsym(handle, "setting_plugin_reset"); + if ((error = dlerror()) != NULL) { + SETTING_TRACE_ERROR(" >>>>>>>>>>> %s", error); + dlclose(handle); + return UNDEFINED_LIB_SYMBOL; + } + + if (reset) + ret = (*reset) (service, ext); /* CALL */ + + if (ret < 0) ret += UNDEFINED_LIB_SYMBOL;//from -2 on + + dlclose(handle); + return ret; +} + + +int excuteCmd(char* exec_path, int option_num, ...) +{ + char cmd[MAX_COMMON_BUFFER_LEN + 1] = {0, }; + snprintf(cmd, MAX_COMMON_BUFFER_LEN, + "%s", exec_path); + + + va_list args; + va_start(args, option_num); + + char *para; + int argno = 0; + for (; argno < option_num; argno++) { + para = va_arg( args, char *); + SETTING_TRACE("Parameter #%d is: %s", argno, para); + if (para) + { + g_strlcat(cmd, " ", MAX_COMMON_BUFFER_LEN + 1); + g_strlcat(cmd, para, MAX_COMMON_BUFFER_LEN + 1); + } + } + + va_end(args); + + SETTING_TRACE("excute:%s", cmd); + return system(cmd); +} + + +void create_fontlink(const char *linkpath, const char *linkname, + const char *fontfilepath, const char *fontfilename) +{ + char newpath[MAX_COMMON_BUFFER_LEN + 1]; + char lcpath[MAX_COMMON_BUFFER_LEN + 1]; + + int ret = + snprintf(newpath, MAX_COMMON_BUFFER_LEN, "%s/%s", linkpath, linkname); + ret_if(ret < 0); + snprintf(lcpath, MAX_COMMON_BUFFER_LEN, "%s/%s", fontfilepath, fontfilename); + + SETTING_TRACE("newpath:%s", newpath); + SETTING_TRACE("lcpath:%s", lcpath); + + remove(newpath); + ret = symlink(lcpath, newpath); + setting_retm_if(ret != 0, "fail to call symlink"); +} + + +char* get_icon_path(const char *package) +{ + ail_appinfo_h handle; + + char* ret_str; + char *icon_path = IMG_DefaultIcon;//The default icon must exist.(it will be installed by Setting App) + + bool result = TRUE; + bool destroy = TRUE; + + if (ail_package_get_appinfo(package, &handle) != AIL_ERROR_OK) { + SETTING_TRACE_ERROR("Failed to ail_package_get_appinfo."); + result = FALSE; + destroy = FALSE; + } + + if (result && ail_appinfo_get_str(handle, AIL_PROP_ICON_STR, &icon_path) != AIL_ERROR_OK) { + SETTING_TRACE_ERROR("Failed to ail_appinfo_get_str."); + result = FALSE; + } + + if (result && access(icon_path, R_OK|F_OK ) !=0 ) {//The file cannot be accessed. + SETTING_TRACE_ERROR("The file[%s] cannot be accessed. To use defaut icon.", icon_path); + icon_path = IMG_DefaultIcon; + } + + ret_str = strdup(icon_path); + if (destroy && ail_package_destroy_appinfo(handle) != AIL_ERROR_OK) { + SETTING_TRACE_ERROR("Failed to ail_package_destroy_appinfo."); + } + return ret_str; +} + +// SLP : 1 +// not SLP : 0 +int is_slp_binary() +{ + char *str = NULL; + int ret = system_info_get_value_string(SYSTEM_INFO_KEY_BUILD_STRING, &str); + if (ret != SYSTEM_INFO_ERROR_NONE) { + SETTING_TRACE_ERROR("fail to call system_info_get_value_string"); + FREE(str); + return 0; + } + + char* pos = str; + if (str) { + while(*pos++){ + if('_' == *pos) { + *pos = '\0'; + if (!strncmp(str, "SLP", 3)){ + FREE(str); + return 1; + } + } + } + } + FREE(str); + return 0; +} + + +bool isEmulBin() +{ + char *model_str = NULL; + int ret = system_info_get_value_string(SYSTEM_INFO_KEY_MODEL, &model_str); + + if (ret != SYSTEM_INFO_ERROR_NONE) { + SETTING_TRACE_ERROR("fail to call system_info_get_value_string"); + FREE(model_str); + return FALSE; + } + + if (0 == safeStrCmp(KeyStr_Emulator, model_str)) { + FREE(model_str); + return TRUE; + } else { + FREE(model_str); + return FALSE; + } +} + + +int get_popup_btn_response_type(const char *btn_str) +{ + SETTING_TRACE("btn_str:%s", btn_str); + POPUP_BTN_RESPONSE_TYPE rsp_type = POPUP_RESPONSE_INVALID; + retv_if(!btn_str, rsp_type); + if (0 == safeStrCmp(btn_str, _("IDS_COM_BODY_CLOSE")) + || 0 == safeStrCmp(btn_str, _("IDS_COM_SK_TRY"))//KeyStr_Try + || 0 == safeStrCmp(btn_str, _("IDS_COM_SK_OK")) + || 0 == safeStrCmp(btn_str, _("IDS_COM_SK_YES")) + || 0 == safeStrCmp(btn_str, _("IDS_ST_BODY_USE_MOTION")) + || 0 == safeStrCmp(btn_str, _("IDS_COM_POP_TRY_AGAIN")) + || 0 == safeStrCmp(btn_str, _("IDS_COM_SK_DELETE")) + || 0 == safeStrCmp(btn_str, _(KeyStr_Save))) + { + rsp_type = POPUP_RESPONSE_OK; + } + else //for others, + { + rsp_type = POPUP_RESPONSE_CANCEL; + } + return rsp_type; +} + +#define SUPPORT_STATIC_LOAD 1 +#if SUPPORT_STATIC_LOAD +static char *system_service_list[MAX_SYSTEM_SERVICE_NUM] = {NULL, }; +#endif +void clear_system_service_data() +{ + #if SUPPORT_STATIC_LOAD + int idx; + for (idx = 0; idx < MAX_SYSTEM_SERVICE_NUM && system_service_list[idx]; idx++) + { + FREE(system_service_list[idx]); + } + #endif +} + + +/** + * should use g_free to free return string + * @see font_size_set() + */ +char *cur_font_get() +{ + SETTING_TRACE_BEGIN; + xmlDocPtr doc = NULL; + xmlNodePtr cur = NULL; + xmlNodePtr cur2 = NULL; + xmlNodePtr cur3 = NULL; + xmlChar *key = NULL; + + char *font_name = NULL; + + doc = xmlParseFile(SETTING_FONT_CONF_FILE); + setting_retvm_if(doc == NULL, NULL, "Document not parsed successfully."); + + cur = xmlDocGetRootElement(doc); + + if(cur == NULL) { + SETTING_TRACE_DEBUG("empty document"); + xmlFreeDoc(doc); + doc = NULL; + return NULL; + } + + if(xmlStrcmp(cur->name, (const xmlChar *)"fontconfig")) { + SETTING_TRACE_DEBUG("document of the wrong type, root node != fontconfig"); + xmlFreeDoc(doc); + doc = NULL; + return NULL; + } + + cur = cur->xmlChildrenNode; + + while(cur != NULL) + { + if((!xmlStrcmp(cur->name, (const xmlChar *)"match"))) + { + cur2 = cur->xmlChildrenNode; + while(cur2 != NULL) + { + if((!xmlStrcmp(cur2->name, (const xmlChar *)"edit"))) + { + cur3 = cur2->xmlChildrenNode; + while(cur3 != NULL) + { + if((!xmlStrcmp(cur3->name, (const xmlChar *)"string"))) + { + key = xmlNodeListGetString(doc, cur3->xmlChildrenNode, 1); + SETTING_TRACE_DEBUG("string is: %s", key); + + font_name = g_strdup((char *)key); + xmlFree(key); + key = NULL; + xmlFreeDoc(doc); + doc = NULL; + return font_name; + } + cur3 = cur3->next; + } + } + cur2 = cur2->next; + } + } + cur = cur->next; + } + + xmlFreeDoc(doc); + doc = NULL; + return NULL; +} + + +/** + * @see font_size_set() + */ +static int __font_size_get() +{ + int font_size = -1; + int value = -1; + int err = -1; + int ret = setting_get_int_slp_key(INT_SLP_SETTING_ACCESSIBILITY_FONT_SIZE, &value, &err); + retvm_if(ret != 0, -1, "get vconf failed"); + + switch(value) { + case SYSTEM_SETTINGS_FONT_SIZE_SMALL: + font_size = SMALL_FONT_DPI; + break; + case SYSTEM_SETTINGS_FONT_SIZE_NORMAL: + font_size = MIDDLE_FONT_DPI; + break; + case SYSTEM_SETTINGS_FONT_SIZE_LARGE: + font_size = LARGE_FONT_DPI; + break; + case SYSTEM_SETTINGS_FONT_SIZE_HUGE: + font_size = HUGE_FONT_DPI; + break; + case SYSTEM_SETTINGS_FONT_SIZE_GIANT: + font_size = GIANT_FONT_DPI; + break; + default: + font_size = MIDDLE_FONT_DPI; + break; + } + return font_size; +} + + +void font_config_set(char *font_name) +{ + Eina_List *text_classes = NULL; + Elm_Text_Class *etc = NULL; + const Eina_List *l = NULL; + Eina_List *fo_list = NULL; + Elm_Font_Overlay *efo = NULL; + int font_size = __font_size_get(); + int size = 0; + + text_classes = elm_config_text_classes_list_get(); + + fo_list = (Eina_List *)elm_config_font_overlay_list_get(); + + Eina_List *ll = NULL; + Eina_List *l_next = NULL; + + Eina_Bool slp_medium_exist = EINA_FALSE; + Eina_Bool slp_roman_exist = EINA_FALSE; + Eina_Bool slp_bold_exist = EINA_FALSE; + Eina_Bool slp_regular_exist = EINA_FALSE; + + // Tizen + Eina_Bool tizen_exist = EINA_FALSE; + + EINA_LIST_FOREACH_SAFE(fo_list, ll, l_next, efo) + { + if (!safeStrCmp(efo->text_class, "tizen_medium")) { + elm_config_font_overlay_set(efo->text_class, (const char*)font_name, efo->size); + slp_medium_exist = EINA_TRUE; + } else if (!safeStrCmp(efo->text_class, "tizen_roman")) { + elm_config_font_overlay_set(efo->text_class, (const char*)font_name, efo->size); + slp_roman_exist = EINA_TRUE; + } else if (!safeStrCmp(efo->text_class, "tizen_bold")) { + elm_config_font_overlay_set(efo->text_class, (const char*)font_name, efo->size); + slp_bold_exist = EINA_TRUE; + } else if (!safeStrCmp(efo->text_class, "tizen_regular")) { + elm_config_font_overlay_set(efo->text_class, (const char*)font_name, efo->size); + slp_regular_exist = EINA_TRUE; + } + + // Tizen + if (!safeStrCmp(efo->text_class, "tizen")) { + elm_config_font_overlay_set(efo->text_class, (const char*)font_name, efo->size); + tizen_exist = EINA_TRUE; + } + + } + + /* if slp_XX do not exist, need to set them, font size is -100(100%) */ + if (slp_medium_exist == EINA_FALSE) { + elm_config_font_overlay_set("tizen_medium", (const char*)font_name, MIDDLE_FONT_DPI); + } + if (slp_roman_exist == EINA_FALSE) { + elm_config_font_overlay_set("tizen_roman", (const char*)font_name, MIDDLE_FONT_DPI); + } + if (slp_bold_exist == EINA_FALSE) { + elm_config_font_overlay_set("tizen_bold", (const char*)font_name, MIDDLE_FONT_DPI); + } + if (slp_regular_exist == EINA_FALSE) { + elm_config_font_overlay_set("tizen_regular", (const char*)font_name, MIDDLE_FONT_DPI); + } + + // Tizen + if (tizen_exist == EINA_FALSE) { + elm_config_font_overlay_set("tizen", (const char*)font_name, MIDDLE_FONT_DPI); + } + + elm_config_font_overlay_set("tizen", (const char*)font_name, MIDDLE_FONT_DPI); + + // Tizen + elm_config_font_overlay_set("tizen", (const char*)font_name, MIDDLE_FONT_DPI); + + EINA_LIST_FOREACH(text_classes, l, etc) + { + ll = NULL; + + size = font_size; + EINA_LIST_FOREACH(fo_list, ll, efo) + { + if (!safeStrCmp(etc->name, efo->text_class)) { + size = efo->size; + } + } + elm_config_font_overlay_set(etc->name, (const char*)font_name, size); + } + + elm_config_font_overlay_apply(); + elm_config_all_flush(); + elm_config_engine_set("software_x11"); + elm_config_save(); + elm_config_text_classes_list_free(text_classes); + text_classes = NULL; + + // vconf update + vconf_set_str(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME, font_name); +} + + +/** + * @see setting_font_font_size_list_mouse_up_cb + */ +void font_size_set() +{ + SETTING_TRACE_BEGIN; + Eina_List *text_classes = NULL; + Elm_Text_Class *etc = NULL; + const Eina_List *l = NULL; + int font_size = __font_size_get(); + char *font_name = cur_font_get(); + + if (font_size == -1) { + SETTING_TRACE_DEBUG("failed to call font_size_get"); + return; + } + + // update all screen + text_classes = elm_config_text_classes_list_get(); + EINA_LIST_FOREACH(text_classes, l, etc) + { + elm_config_font_overlay_set(etc->name, font_name, font_size); + } + + elm_config_all_flush(); + elm_config_engine_set("software_x11"); + elm_config_save(); + elm_config_text_classes_list_free(text_classes); + text_classes = NULL; + G_FREE(font_name); + SETTING_TRACE_END; +} + + +static int _set; +void update_lang(void) +{ + char *lang; + char *r; + + lang = vconf_get_str(VCONFKEY_LANGSET); + if (lang) { + setenv("LANG", lang, 1); + setenv("LC_MESSAGES", lang, 1); + r = setlocale(LC_ALL, ""); + if (r == NULL) { + r = setlocale(LC_ALL, vconf_get_str(VCONFKEY_LANGSET)); + } + free(lang); + } +} + +void update_region(void) +{ + char *region; + + region = vconf_get_str(VCONFKEY_REGIONFORMAT); + if (region) { + setenv("LC_CTYPE", region, 1); + setenv("LC_NUMERIC", region, 1); + setenv("LC_TIME", region, 1); + setenv("LC_COLLATE", region, 1); + setenv("LC_MONETARY", region, 1); + setenv("LC_PAPER", region, 1); + setenv("LC_NAME", region, 1); + setenv("LC_ADDRESS", region, 1); + setenv("LC_TELEPHONE", region, 1); + setenv("LC_MEASUREMENT", region, 1); + setenv("LC_IDENTIFICATION", region, 1); + free(region); + } +} + +static int __set_i18n(const char *domain, const char *dir) +{ + char *r; + if (domain == NULL) { + errno = EINVAL; + return -1; + } + + r = setlocale(LC_ALL, ""); + /* if locale is not set properly, try again to set as language base */ + if (r == NULL) { + r = setlocale(LC_ALL, vconf_get_str(VCONFKEY_LANGSET)); + } + r = bindtextdomain(domain, dir); + r = textdomain(domain); + return 0; +} + + +int setting_set_i18n(char* pkgname, char* localedir) +//int set_i18n(const char *domainname, const char *dirname) +{ + if (_set) + return 0; + update_lang(); + update_region(); + + return __set_i18n(pkgname, localedir); +} + + +void app_launcher(char* pkg_name) +{ + service_h service; + service_create(&service); + service_set_operation(service, SERVICE_OPERATION_DEFAULT); + service_set_package(service, pkg_name); + int launch_ret = service_send_launch_request(service, NULL, NULL); + SETTING_TRACE("after app_service_create - %s : %d ", pkg_name, launch_ret); + if (launch_ret == SERVICE_ERROR_NONE) + { + // on success + SETTING_TRACE("on success"); + } else { + // on error + SETTING_TRACE("on error"); + } + service_destroy(service); + service = NULL; +} + +char* substring(const char* str, size_t begin, size_t len) +{ + if (str == 0 || strlen(str) == 0 || strlen(str) < begin || strlen(str) < (begin+len)) + return 0; + + return strndup(str + begin, len); +} + +void set_defaultLangICU() +{ + // set default local automatically + // ko.KR.UTF-8 + char *pa_region = vconf_get_str(VCONFKEY_LANGSET); + char* pa_sub = substring(pa_region, 0, 4); + SETTING_TRACE(" main - region set from ug result : %s", pa_sub); + int err = -1; + uloc_setDefault(pa_region, &err); + SETTING_TRACE("errorcode %d ", err); + FREE(pa_region); + FREE(pa_sub); +} diff --git a/setting-common/src/setting-common-resource.c b/setting-common/src/setting-common-resource.c new file mode 100755 index 0000000..69c65d5 --- /dev/null +++ b/setting-common/src/setting-common-resource.c @@ -0,0 +1,37 @@ +/* + * setting + * Copyright (c) 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://floralicense.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. + */ + +const char *STR_SETTING_NORMAL = "IDS_ST_BODY_NORMAL_T_PROFILE"; + +/* security*/ +const char *STR_SETTING_OPERATION_FAILED = "IDS_COM_BODY_OPERATION_FAILED"; + +/* network*/ +const char *STR_SETTING_MMS_CONNECTIONS = "IDS_ST_BODY_MMS_CONNECTIONS"; +const char *STR_SETTING_NEW_CONNECTIONS = "Create connections"; + +const char *STR_SETTING_GSM_900_1800 = "GSM 900/1800"; +const char *STR_SETTING_GSM_850_1900 = "GSM 850/1900"; +const char *STR_SETTING_UMTS = "UMTS"; + +/* connectivity -> tvout*/ +const char *STR_SETTING_NTSC = "NTSC"; +const char *STR_SETTING_PAL = "PAL"; +const char *STR_SETTING_WIDE = "Wide"; + +/* network*/ +const char *STR_SETTING_NETWORK_LIST = "IDS_ST_OPT_NETWORK_LIST"; diff --git a/setting-common/src/setting-common-view.c b/setting-common/src/setting-common-view.c new file mode 100755 index 0000000..cb13e2f --- /dev/null +++ b/setting-common/src/setting-common-view.c @@ -0,0 +1,207 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 + +#include + +#include +#include + +#define MAX_VIEWNODE_NUM 15 +typedef struct _SettingViewNode { + setting_view *view; + setting_view *topview; +} SettingViewNode; +static setting_view *g_cur_view;; /* use by 'End Key' process */ +static SettingViewNode g_view_node_table[MAX_VIEWNODE_NUM]; +static int g_view_node_table_cur_size = 0; + +int setting_view_node_set_cur_view(setting_view *view) +{ + g_cur_view = view; + return 0; +} + +setting_view *setting_view_node_get_cur_view() +{ + return g_cur_view; +} + +int setting_view_node_table_intialize() +{ + g_cur_view = NULL; + g_view_node_table_cur_size = 0; + return 0; +} + +int +setting_view_node_table_register(setting_view *view, setting_view *topview) +{ + //SETTING_TRACE_BEGIN; + if (g_view_node_table_cur_size >= MAX_VIEWNODE_NUM) { + return SETTING_RETURN_FAIL; + } + + g_view_node_table[g_view_node_table_cur_size].view = view; + g_view_node_table[g_view_node_table_cur_size].topview = topview; + g_view_node_table_cur_size++; + return 0; +} + +int setting_view_cb_at_endKey(void *cb) +{ + SETTING_TRACE_BEGIN; + int idx = 0; + SettingViewNode *viewnode = NULL; + for (; idx < g_view_node_table_cur_size; idx++) { + if (g_cur_view == g_view_node_table[idx].view) { + viewnode = &(g_view_node_table[idx]); + break; + } + } + if (viewnode && viewnode->view && viewnode->topview) { + setting_view_change(viewnode->view, viewnode->topview, cb); + } + return 0; +} + +setting_view *setting_view_get_topview(setting_view *view) +{ + SETTING_TRACE_BEGIN; + retv_if(NULL == view, NULL); + int idx = 0; + SettingViewNode *viewnode = NULL; + for (; idx < g_view_node_table_cur_size; idx++) { + if (view == g_view_node_table[idx].view) { + viewnode = &(g_view_node_table[idx]); + break; + } + } + if (viewnode && viewnode->topview) { + return viewnode->topview; + } + else + { + return NULL; + } +} + +void setting_view_update_topview(setting_view *view, setting_view *topview) +{ + SETTING_TRACE_BEGIN; + ret_if(NULL == view); + int idx = 0; + SettingViewNode *viewnode = NULL; + for (; idx < g_view_node_table_cur_size; idx++) { + if (view == g_view_node_table[idx].view) { + viewnode = &(g_view_node_table[idx]); + break; + } + } + if (viewnode) { + viewnode->topview = topview; + } + else + { + } +} + + +int setting_view_create(setting_view *view, void *cb) +{ + /* error check */ + setting_retvm_if(!view || !cb , SETTING_GENERAL_ERR_NULL_DATA_PARAMETER, "Invalid arguement"); + + int ret = SETTING_RETURN_FAIL; + + if (!view->is_create && view->create) {//error handle:create only when the view doesn't exit + ret = view->create(cb); + } + + return ret; +} + +int setting_view_destroy(setting_view *view, void *cb) +{ + /* error check */ + setting_retvm_if(!view || !cb , SETTING_GENERAL_ERR_NULL_DATA_PARAMETER, "Invalid arguement"); + + int ret = SETTING_RETURN_FAIL; + + if (view->is_create && view->destroy) {//error handle:destroy only when the view exits + ret = view->destroy(cb); + } + + return ret; +} + +int setting_view_update(setting_view *view, void *cb) +{ + /* error check */ + setting_retvm_if(!view || !cb , SETTING_GENERAL_ERR_NULL_DATA_PARAMETER, "Invalid arguement"); + + int ret = SETTING_RETURN_FAIL; + + if (view->is_create && view->update) {//error handle:update only when the view exits + ret = view->update(cb); + } + + return ret; +} + +int setting_view_cleanup(setting_view *view, void *cb) +{ + /* error check */ + setting_retvm_if(!view || !cb , SETTING_GENERAL_ERR_NULL_DATA_PARAMETER, "Invalid arguement"); + + int ret = SETTING_RETURN_FAIL; + + if (view->is_create && view->cleanup) {//error handle:cleanup only when the view exits + ret = view->cleanup(cb); + } + + return ret; +} + +int +setting_view_change(setting_view *from_view, setting_view *to_view, void *cb) +{ + /* error check */ + setting_retvm_if(!from_view || !to_view || !cb , + SETTING_GENERAL_ERR_NULL_DATA_PARAMETER, + "Invalid arguement"); + + int ret = SETTING_RETURN_SUCCESS; + if (from_view == setting_view_get_topview(to_view)) { + //from a parent view to his child view, don't need cleanup parent view + } else { + //from a child view to his parent view, need cleanup child view + ret = setting_view_cleanup(from_view, cb); + } + + if (ret == SETTING_RETURN_FAIL) { + return SETTING_RETURN_FAIL; + } + + if (to_view->is_create == 1) { + ret = setting_view_update(to_view, cb); + } else { + ret = setting_view_create(to_view, cb); + } + g_cur_view = to_view; /* compute new value of g_cur_view. */ + return ret; +} diff --git a/setting-connectivity/CMakeLists.txt b/setting-connectivity/CMakeLists.txt new file mode 100755 index 0000000..5455c49 --- /dev/null +++ b/setting-connectivity/CMakeLists.txt @@ -0,0 +1,34 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_connectivity REQUIRED evas elementary appcore-common appcore-efl +ui-gadget-1 capi-appfw-application utilX devman capi-system-runtime-info) + +FOREACH(flag ${pkgs_connectivity_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") + +ADD_LIBRARY(${SETTING_DEVELOPEROPTION_UG} SHARED + ./src/setting-connectivity.c + ./src/setting-connectivity-usb.c + ./src/setting-connectivity-usb-help.c + ) + +TARGET_LINK_LIBRARIES(${SETTING_DEVELOPEROPTION_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_DEVELOPEROPTION_UG} ${pkgs_connectivity_LDFLAGS}) + +INSTALL(TARGETS ${SETTING_DEVELOPEROPTION_UG} DESTINATION /usr/ug/lib) diff --git a/setting-connectivity/include/setting-connectivity-usb-help.h b/setting-connectivity/include/setting-connectivity-usb-help.h new file mode 100755 index 0000000..2c25a06 --- /dev/null +++ b/setting-connectivity/include/setting-connectivity-usb-help.h @@ -0,0 +1,26 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_CONNECTIVITY_USB_HELP_H__ +#define __SETTING_CONNECTIVITY_USB_HELP_H__ + +#include + +static void setting_connectivity_usb_help_click_back_cb(void *data, + Evas_Object *obj, + void *event_info); + +#endif /* __SETTING_CONNECTIVITY_USB_HELP_H__ */ diff --git a/setting-connectivity/include/setting-connectivity-usb.h b/setting-connectivity/include/setting-connectivity-usb.h new file mode 100755 index 0000000..5434bae --- /dev/null +++ b/setting-connectivity/include/setting-connectivity-usb.h @@ -0,0 +1,49 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_CONNECTIVITY_USB_H__ +#define __SETTING_CONNECTIVITY_USB_H__ + +#include +#include + +#define NUM_PROGRESSBAR 4 + +#define SETTING_USB_DEBUGGING_DESC "IDS_ST_BODY_DEBUGGING_MODE_LAUNCHES_WHEN_USB_IS_CONNECTED" + +enum progressbar_status { + STATE_NONE = 0x00, + STATE_PROGRESSBAR +}; + +typedef struct _button_status button_status; + +struct _button_status { + Evas_Object *progressbar; /* progressbar */ + Elm_Object_Item *item; /* button */ + int pstate; /* progressbar status to show or hide */ +}; + +static void setting_connectivity_usb_click_softkey_cancel_cb(void *data, + Evas_Object *obj, + void *event_info); +#ifdef HELP_UG_EXIST +static void setting_connectivity_usb_click_softkey_set_cb(void *data, + Evas_Object *obj, + void *event_info); +#endif + +#endif /* __SETTING_CONNECTIVITY_USB_H__ */ diff --git a/setting-connectivity/include/setting-connectivity.h b/setting-connectivity/include/setting-connectivity.h new file mode 100755 index 0000000..459d180 --- /dev/null +++ b/setting-connectivity/include/setting-connectivity.h @@ -0,0 +1,95 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_CONNECTIVITY_H__ +#define __SETTING_CONNECTIVITY_H__ + +#include +#include + +#include + +#include + +#include +#include + +#include + +enum mode_change { + CHANGE_COMPLETE = 0, + IN_MODE_CHANGE, + IN_MODE_CHANGE_NONE +}; + +enum usb_connection_status { + USB_DISCONNECTED = 0, + USB_CONNECTED, + GETTING_STATUS_FAIL +}; + +typedef struct _SettingConnectivityUG SettingConnectivityUG; + +/** + * Setting Connectivity UG context + * all UG function has void* as an agument. this is casted back to SettingConnectivityUG + * and the functions access app context. + */ +struct _SettingConnectivityUG { + ui_gadget_h ug; + + /* add more variables here (move your appdata to here) */ + Evas *evas; + Evas_Object *win_main_layout; + Evas_Object *win_get; + Evas_Object *navi_bar; + + Evas_Object *ly_usb; + Evas_Object *chk_con; + + Evas_Object *pop; + + Setting_GenGroupItem_Data *debug_mode; /* debug mode */ + Setting_GenGroupItem_Data *cpu_usage; /* Show CPU Usage */ + Setting_GenGroupItem_Data *gpu_render; /* Force GPU Rendering */ + Setting_GenGroupItem_Data *bg_processes; /* Limit background processes */ + + /*****/ + setting_view *view_to_load; + + Elm_Genlist_Item_Class itc_title; + Elm_Genlist_Item_Class itc_1text; + Elm_Genlist_Item_Class itc_1text_1progress; + Elm_Genlist_Item_Class itc_1text_1icon; + Elm_Genlist_Item_Class itc_1text_1icon_gen; + Elm_Genlist_Item_Class itc_2text_3; + Elm_Genlist_Item_Class itc_group_item; + Elm_Genlist_Item_Class itc_seperator; + Elm_Genlist_Item_Class itc_help_style; + Elm_Genlist_Item_Class itc_2text_3_parent; + Elm_Genlist_Item_Class itc_1icon_1text_sub; + + int noti_fd; + Eina_Bool blockUI; +}; + +extern setting_view setting_view_connectivity_usb; +extern setting_view setting_view_connectivity_usb_help; + +int check_usb_jack_status(); +void set_usb_mode_default(); + +#endif /* __SETTING_CONNECTIVITY_H__ */ diff --git a/setting-connectivity/src/setting-connectivity-usb-help.c b/setting-connectivity/src/setting-connectivity-usb-help.c new file mode 100755 index 0000000..d6a7505 --- /dev/null +++ b/setting-connectivity/src/setting-connectivity-usb-help.c @@ -0,0 +1,131 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#define HELP_LEN 2048 + +static int setting_connectivity_usb_help_create(void *cb); +static int setting_connectivity_usb_help_destroy(void *cb); +static int setting_connectivity_usb_help_update(void *cb); +static int setting_connectivity_usb_help_cleanup(void *cb); + +setting_view setting_view_connectivity_usb_help = { + .create = setting_connectivity_usb_help_create, + .destroy = setting_connectivity_usb_help_destroy, + .update = setting_connectivity_usb_help_update, + .cleanup = setting_connectivity_usb_help_cleanup, +}; + +/* *************************************************** + * + *basic func + * + ***************************************************/ + +static int setting_connectivity_usb_help_create(void *cb) +{ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingConnectivityUG *ad = (SettingConnectivityUG *) cb; + + char samsung_kies_help[HELP_LEN]; + char mass_storage_help[HELP_LEN]; + char debugging_mode_help[HELP_LEN]; + + snprintf(samsung_kies_help, HELP_LEN, + "%s%s%s%s", "", _("IDS_ST_HEADER_SAMSUNG_KIES"), "
", + evas_textblock_text_utf8_to_markup(NULL, _("IDS_ST_BODY_SAMSUNG_KIES_CONNECTION_CONNECTING_USB_HELP_MSG"))); + snprintf(mass_storage_help, HELP_LEN, + "%s%s%s%s", "", _("IDS_ST_OPT_MASS_STORAGE_ABB"), "
", + evas_textblock_text_utf8_to_markup(NULL, _("IDS_ST_BODY_MASS_STORAGE_HELP_MSG"))); + snprintf(debugging_mode_help, HELP_LEN, + "%s%s%s%s", "", _("IDS_ST_BODY_USB_DEBUGGING"), "
", + evas_textblock_text_utf8_to_markup(NULL, _("IDS_ST_BODY_USB_DEBUGGING_IS_INTENDED_FOR_DEVELOPMENT_PURPOSES_ONLY_MSG"))); + + + Evas_Object *genlist; + setting_push_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _("IDS_COM_BODY_HELP"), + _("IDS_COM_BODY_BACK"), + NULL, + setting_connectivity_usb_help_click_back_cb, + NULL, ad, &genlist, + ad->navi_bar); + + setting_create_Gendial_field_def(genlist, &(ad->itc_help_style), + NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, NULL, NULL, + 0, samsung_kies_help, NULL, + NULL); + + setting_create_Gendial_field_def(genlist, &(ad->itc_help_style), + NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, NULL, NULL, + 0, mass_storage_help, NULL, + NULL); + + setting_create_Gendial_field_def(genlist, &(ad->itc_help_style), + NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, NULL, NULL, + 0, debugging_mode_help, NULL, + NULL); + + setting_view_connectivity_usb_help.is_create = 1; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_connectivity_usb_help_destroy(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingConnectivityUG *ad = (SettingConnectivityUG *) cb; + + elm_naviframe_item_pop(ad->navi_bar); + setting_view_connectivity_usb_help.is_create = 0; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_connectivity_usb_help_update(void *cb) +{ + return SETTING_RETURN_SUCCESS; +} + +static int setting_connectivity_usb_help_cleanup(void *cb) +{ + return setting_connectivity_usb_help_destroy(cb); +} + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void +setting_connectivity_usb_help_click_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + /* error check */ + setting_retm_if(data == NULL, " Data parameter is NULL"); + + SettingConnectivityUG *ad = (SettingConnectivityUG *) data; + setting_view_change(&setting_view_connectivity_usb_help, + &setting_view_connectivity_usb, ad); +} diff --git a/setting-connectivity/src/setting-connectivity-usb.c b/setting-connectivity/src/setting-connectivity-usb.c new file mode 100755 index 0000000..63601e2 --- /dev/null +++ b/setting-connectivity/src/setting-connectivity-usb.c @@ -0,0 +1,532 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include + +#define DEBUG_MODE_POPUP_TITLE "IDS_ST_HEADER_ALLOW_USB_DEBUGGING_Q_ABB" +#define DEBUG_MODE_POPUP_TEXT "IDS_ST_BODY_USB_DEBUGGING_IS_INTENDED_FOR_DEVELOPMENT_PURPOSES_ONLY_MSG" + +static int setting_connectivity_usb_create(void *cb); +static int setting_connectivity_usb_destroy(void *cb); +static int setting_connectivity_usb_update(void *cb); +static int setting_connectivity_usb_cleanup(void *cb); + +static void debug_mode_change_vconf_cb(keynode_t *key, void *data); +static void in_mode_change_vconf_cb(keynode_t *key, void *data); +static void unload_popup(void* data); +void load_usb_connection_popup(void* data); + +/* This is pointer to indicate progressbars*/ +static button_status button[NUM_PROGRESSBAR]; + +/* These variables are for the popup */ +static Evas_Object *win_main, *popup_eo; +static char *popup_msg, *popup_title; + +setting_view setting_view_connectivity_usb = { + .create = setting_connectivity_usb_create, + .destroy = setting_connectivity_usb_destroy, + .update = setting_connectivity_usb_update, + .cleanup = setting_connectivity_usb_cleanup, +}; + +static int setting_connectivity_change_debug_mode_toggle(SettingConnectivityUG *ad) +{ + SETTING_TRACE_BEGIN; + if(!ad) return -1; + + int ret = -1; + int debugMode = 0; + ret = vconf_get_bool(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL, &debugMode); + if (ret != 0) { + SETTING_TRACE("FAIL: vconf_get_bool(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL)"); + return -1; + } + SETTING_TRACE("debugMode: %d", debugMode); + + elm_check_state_set(ad->debug_mode->eo_check, EINA_FALSE); + if (debugMode == 0) { + load_usb_connection_popup(ad); + } else { + ret = vconf_set_bool(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL, 0); + if (ret != 0) { + SETTING_TRACE("FAIL: vconf_set_bool(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL)"); + return -1; + } + } + + SETTING_TRACE_END; + return 0; +} + +static void setting_connectivity_main_chk_usb_debug_cb(void *data, + Evas_Object * obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + SettingConnectivityUG *ad = list_item->userdata; + + if (0 > setting_connectivity_change_debug_mode_toggle(ad)) { + SETTING_TRACE("FAIL: setting_connectivity_change_debug_mode_toggle()"); + } + + SETTING_TRACE_END; +} + +static void setting_connectivity_usb_mouse_up_Gendial_list_cb(void *data, + Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Invalid argument: data is NULL"); + retm_if(event_info == NULL, "Invalid argument: event_info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + SettingConnectivityUG *ad = (SettingConnectivityUG *)data; + + elm_genlist_item_selected_set(item, 0); + + if (0 > setting_connectivity_change_debug_mode_toggle(ad)) { + SETTING_TRACE("FAIL: setting_connectivity_change_debug_mode_toggle()"); + } + + SETTING_TRACE_END; +} + +/** + * To create the usb main view + * + *@param cb + * + *@return + */ +static int setting_connectivity_usb_create(void *cb) +{ + SETTING_TRACE_BEGIN; + SETTING_TRACE("Start USB utilities\n"); + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingConnectivityUG *ad = (SettingConnectivityUG *) cb; + Evas_Object *scroller; + + int vconf_ret = -1; + int err = -1; + + /* win_main of the popup */ + win_main = ad->win_get; +#ifdef HELP_UG_EXIST + ad->ly_usb = + setting_create_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _(KeyStr_DeveloperOption), + dgettext("sys_string", "IDS_COM_BODY_BACK"), + _("IDS_COM_BODY_HELP"), + setting_connectivity_usb_click_softkey_cancel_cb, + setting_connectivity_usb_click_softkey_set_cb, + ad, &scroller, + &ad->navi_bar); +#else + ad->ly_usb = + setting_create_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _(KeyStr_DeveloperOption), + dgettext("sys_string", "IDS_COM_BODY_BACK"), + NULL, + setting_connectivity_usb_click_softkey_cancel_cb, + NULL, + ad, &scroller, + &ad->navi_bar); +#endif + + SETTING_TRACE("before init\n"); + + button[SETTING_USB_DEBUG_MODE].item = NULL; + button[SETTING_USB_DEBUG_MODE].pstate = STATE_NONE; + + Elm_Object_Item *item = NULL;; +#if 1 + // [UI] separator + item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + // [UI] USB debugging + int vconf_val; + int toggle_dbg = 0; + + err = vconf_get_bool(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL, &toggle_dbg); + if (err != 0) { + SETTING_TRACE_ERROR("FAIL: vconf_get_bool(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL)"); + /* set debug mode to true to find the problem*/ + toggle_dbg = 1; + } + SETTING_TRACE("toggle_dbg: %d", toggle_dbg); + + ad->debug_mode = + setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon_gen), + setting_connectivity_usb_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, toggle_dbg, "IDS_ST_BODY_USB_DEBUGGING", + NULL, setting_connectivity_main_chk_usb_debug_cb); + + if (ad->debug_mode) { + ad->debug_mode->userdata = ad; + button[SETTING_USB_DEBUG_MODE].item = ad->debug_mode->item; + } else { + SETTING_TRACE_ERROR("ad->debug_mode is NULL"); + return SETTING_RETURN_FAIL; + } + + setting_create_Gendial_field_def(scroller, &(ad->itc_help_style), NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, SETTING_USB_DEBUGGING_DESC, NULL, + NULL); + elm_genlist_item_select_mode_set(elm_genlist_item_append(scroller, &(itc_seperator), NULL, NULL,ELM_GENLIST_ITEM_NONE, NULL, NULL), + ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + +#endif + + SETTING_TRACE("Second item of Second group is set\n"); + + //---------------------------------------------------------------------------------------------- + /* Registering callback function for VCONFKEY_SETAPPL_USB_MODE_INT */ + vconf_ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL, + debug_mode_change_vconf_cb, ad); + if(vconf_ret != 0) + { + SETTING_TRACE("FAIL: vconf_notify_key_changed(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL)"); + return SETTING_RETURN_FAIL; + } + + /* Registering callback function for VCONFKEY_SETAPPL_USB_IN_MODE_CHANGE */ + vconf_ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_USB_IN_MODE_CHANGE, + in_mode_change_vconf_cb, ad); + if(vconf_ret != 0) + { + SETTING_TRACE("FAIL: vconf_notify_key_changed(VCONFKEY_SETAPPL_USB_IN_MODE_CHANGE)\n"); + return SETTING_RETURN_FAIL; + } + + int val; + vconf_ret = vconf_get_int(VCONFKEY_SETAPPL_USB_IN_MODE_CHANGE, &val); + if (vconf_ret == 0 && val == IN_MODE_CHANGE) + { + SETTING_TRACE("ad->blockUI: EINA_TRUE\n"); + ad->blockUI = EINA_TRUE; + } + else /* val == CHANGE_COMPLETE */ + { + SETTING_TRACE("ad->blockUI: EINA_FALSE\n"); + ad->blockUI = EINA_FALSE; + } + + setting_view_connectivity_usb.is_create = 1; + setting_view_update(&setting_view_connectivity_usb, ad); + + SETTING_TRACE_END; + return SETTING_RETURN_SUCCESS; +} + +/** + * This callback function is called when USB-setting changes VCONFKEY_SETAPPL_USB_IN_MODE_CHANGE + * + *@param data + */ +static void in_mode_change_vconf_cb(keynode_t *key, void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == data, "ERROR:The parameter(data) is NULL\n"); + SettingConnectivityUG *ad = (SettingConnectivityUG *) data; + SETTING_TRACE("ad->blockUI: %d\n", ad->blockUI); + + int in_mode_change; + int ret = -1; + + ret = vconf_get_int(VCONFKEY_SETAPPL_USB_IN_MODE_CHANGE, &in_mode_change); + setting_retm_if (ret != 0, "vconf_get_int(VCONFKEY_SETAPPL_USB_IN_MODE_CHANGE\n"); + + if (CHANGE_COMPLETE == in_mode_change) { + SETTING_TRACE("ad->blockUI: EINA_FALSE\n"); + ad->blockUI = EINA_FALSE; + } else if (IN_MODE_CHANGE == in_mode_change) { + SETTING_TRACE("ad->blockUI: EINA_TRUE\n"); + ad->blockUI = EINA_TRUE; + } else { + SETTING_TRACE("Getting in_mode_change failed\n"); + } + + SETTING_TRACE_END; +} + +/** + * When VCONFKEY_SETAPPL_USB_MODE_INT is changed, all buttons are enabled + * + *@param key + *@param data + */ +static void debug_mode_change_vconf_cb(keynode_t *key, void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if (NULL == data, "ERROR:The parameter(data) is NULL\n"); + SettingConnectivityUG *ad = (SettingConnectivityUG *)data; + + int ret = -1; + int debugMode = 0; + + ret = vconf_get_bool(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL, &debugMode); + setting_retm_if (ret != 0, "ERROR: vconf_get_int(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL)"); + SETTING_TRACE("debugMode: %d", debugMode); + + if (debugMode == 1) { + elm_check_state_set(ad->debug_mode->eo_check, EINA_TRUE); + } else if (debugMode == 0) { + elm_check_state_set(ad->debug_mode->eo_check, EINA_FALSE); + } else { + SETTING_TRACE("ERROR: debugMode value is improper"); + } + + /* Unblock setting UI */ + SETTING_TRACE("ad->blockUI: EINA_FALSE\n"); + ad->blockUI = EINA_FALSE; + + SETTING_TRACE_END; +} + +/** + * To destory the view of usb + * + *@param cb + * + *@return + */ +static int setting_connectivity_usb_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingConnectivityUG *ad = (SettingConnectivityUG *) cb; + int vconf_ret = -1; + int num_err = 0; + + /* Removing the popup if the popup is loaded */ + unload_popup(ad); + win_main = NULL; + + /* Closing vconf trace */ + vconf_ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL, + debug_mode_change_vconf_cb); + if (vconf_ret != 0) + { + SETTING_TRACE("FAIL: vconf_ignore_key_changed(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL)"); + num_err++; + } + + vconf_ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_USB_IN_MODE_CHANGE, in_mode_change_vconf_cb); + if (vconf_ret != 0) + { + SETTING_TRACE("FAIL: vconf_ignore_key_changed(VCONFKEY_SETAPPL_USB_MODE_INT)\n"); + num_err++; + } + + if (ad->ly_usb != NULL) { + evas_object_del(ad->ly_usb); + setting_view_connectivity_usb.is_create = 0; + } + + SETTING_TRACE_END; + if (num_err > 0) + { + SETTING_TRACE("ERROR: the number of errors to destroy is %d\n", num_err); + return SETTING_RETURN_FAIL; + } + else + { + return SETTING_RETURN_SUCCESS; + } + +} + +/** + * To update the view of usb + * + *@param cb + * + *@return + */ +static int setting_connectivity_usb_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SettingConnectivityUG *ad = (SettingConnectivityUG *) cb; + + if (ad->ly_usb != NULL) { + evas_object_show(ad->ly_usb); + } + SETTING_TRACE_END; + return SETTING_RETURN_SUCCESS; +} + +/** + * To cleanup the view of usb + * + *@param cb + * + *@return + */ +static int setting_connectivity_usb_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + SETTING_TRACE_END; + return SETTING_RETURN_SUCCESS; +} + +/** + * Do process when clicking '<-' button + * + *@param data + *@param obj + *@param event_info + */ +static void +setting_connectivity_usb_click_softkey_cancel_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + + SettingConnectivityUG *ad = (SettingConnectivityUG *) data; + + /* Not to block back(->) button */ + /* Send destroy request */ + ug_destroy_me(ad->ug); + + SETTING_TRACE_END; +} + +/** + * Do process when clicking 'Help' button + * + *@param data + *@param obj + *@param event_info + */ +#ifdef HELP_UG_EXIST +static void +setting_connectivity_usb_click_softkey_set_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + + SettingConnectivityUG *ad = (SettingConnectivityUG *) data; + + /* Send destroy request */ + setting_view_change(&setting_view_connectivity_usb, + &setting_view_connectivity_usb_help, ad); + SETTING_TRACE_END; +} +#endif + + +/** + * Here is for loading popup + */ + +/** + * unload popup + */ +static void unload_popup(void* data) +{ + SETTING_TRACE_BEGIN; + SettingConnectivityUG *ad = (SettingConnectivityUG *)data; + + //ad->pop + if (ad->pop) + { + evas_object_del(ad->pop); + ad->pop = NULL; + } else { + SETTING_TRACE("ad->pop == NULL\n"); + } + + if (popup_eo != NULL) + { + SETTING_TRACE("evas_object_del(popup_eo)\n"); + evas_object_del(popup_eo); + popup_eo = NULL; + } + else + { + SETTING_TRACE("popup_eo == NULL\n"); + } + + SETTING_TRACE_END; +} + +/** + * Callback function to respond pushing cancel button of the usb connection popup + */ +static void debug_mode_resp_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + int ret = -1; + SettingConnectivityUG *ad = (SettingConnectivityUG *)data; + + int resp_type = btn_type(obj); + if (resp_type == POPUP_RESPONSE_OK) { + ret = vconf_set_bool(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL, 1); + if (ret != 0) { + SETTING_TRACE("FAIL: vconf_set_bool(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL)"); + return; + } + } + + unload_popup(ad); + SETTING_TRACE_END; +} + +/** + * When a button on USB utilities is pushed, + * this function makes a popup if USB cable is not connected + */ +void load_usb_connection_popup(void* data) +{ + SETTING_TRACE_BEGIN; + //int ret; + SettingConnectivityUG *ad = (SettingConnectivityUG *)data; + + unload_popup(ad); + popup_msg = _(DEBUG_MODE_POPUP_TEXT); + popup_title = _(DEBUG_MODE_POPUP_TITLE); + + ad->pop = setting_create_popup_with_btn(ad, win_main,//ad->win_get, + popup_title, + popup_msg, + debug_mode_resp_cb, + 0, 2, + _("IDS_COM_SK_OK"), + _("IDS_COM_SK_CANCEL")); + if (!(ad->pop)) SETTING_TRACE("FAIL: setting_create_popup_with_btn()"); + + SETTING_TRACE_END; +} + + diff --git a/setting-connectivity/src/setting-connectivity.c b/setting-connectivity/src/setting-connectivity.c new file mode 100755 index 0000000..ca0536e --- /dev/null +++ b/setting-connectivity/src/setting-connectivity.c @@ -0,0 +1,295 @@ +/* + * setting + * Copyright (c) 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://floralicense.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. + */ + +/** + *@defgroup setting-connectivity + *UG creation code for setting-connectivity + */ + +#include +#include + +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif + +#define USB_BTN_NO 0 + +setting_view *__get_connective_view_to_load(service_h service) +{ + SETTING_TRACE_BEGIN; + char *viewtype = NULL; + + service_get_extra_data(service, "viewtype", &viewtype); + if(!viewtype) + return NULL; + + SETTING_TRACE("viewtype:%s", viewtype); + + if (!safeStrCmp(viewtype, "usb")) { + return &setting_view_connectivity_usb; + } else { + return NULL; /* &setting_view_connective_main; */ + } + +} + +Evas_Object *__get_connective_layout_to_return(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + SettingConnectivityUG *connectiveUG = priv; + char *viewtype = NULL; + + service_get_extra_data(service, "viewtype", &viewtype); + if(!viewtype) + return NULL; + + SETTING_TRACE("viewtype:%s", viewtype); + + if (!safeStrCmp(viewtype, "usb")) { + return connectiveUG->ly_usb; + } else { + return NULL; /* &setting_view_connective_main; */ + } + +} + +static void setting_connective_ug_cb_resize(void *data, Evas *e, + Evas_Object *obj, void *event_info) +{ + SettingConnectivityUG *ad = (SettingConnectivityUG *) data; + /* setting_view_update(&setting_view_about_main, ad); */ + setting_view_update(ad->view_to_load, ad); +} + +static void *setting_connective_ug_on_create(ui_gadget_h ug, + enum ug_mode mode, service_h service, + void *priv) +{ + setting_retvm_if((!priv), NULL, "!priv"); + + SettingConnectivityUG *connectiveUG = priv; + connectiveUG->ug = ug; + + connectiveUG->win_main_layout = + (Evas_Object *) ug_get_parent_layout(ug); + connectiveUG->win_get = (Evas_Object *) ug_get_window(); + evas_object_show(connectiveUG->win_main_layout); + connectiveUG->evas = + evas_object_evas_get(connectiveUG->win_main_layout); + + setting_retvm_if(connectiveUG->win_main_layout == NULL, NULL, + "cannot get main window "); + + setting_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR); + + /* register view node table */ + setting_view_node_table_intialize(); + setting_view_node_table_register(&setting_view_connectivity_usb, NULL); + setting_view_node_table_register(&setting_view_connectivity_usb_help, + &setting_view_connectivity_usb); + + /* creating a view. */ + setting_create_Gendial_itc("dialogue/title", &(connectiveUG->itc_title)); + setting_create_Gendial_itc("dialogue/1text", &(connectiveUG->itc_1text)); + setting_create_Gendial_itc("dialogue/1text.1icon", &(connectiveUG->itc_1text_1icon)); + setting_create_Gendial_itc("dialogue/1text.1icon", &(connectiveUG->itc_1text_1icon_gen)); /* toggle */ + setting_create_Gendial_itc("dialogue/2text.3", &(connectiveUG->itc_2text_3)); + setting_create_Gendial_itc("dialogue/2text.3/expandable", &(connectiveUG->itc_2text_3_parent)); + setting_create_Gendial_itc("dialogue/1text.1icon/expandable2", &(connectiveUG->itc_1icon_1text_sub)); + setting_create_Gendial_itc("multiline/1text", &(connectiveUG->itc_help_style)); + + connectiveUG->itc_seperator.item_style = "dialogue/separator"; + connectiveUG->itc_seperator.func.text_get = NULL; + connectiveUG->itc_seperator.func.content_get = NULL; + connectiveUG->itc_seperator.func.state_get = NULL; + connectiveUG->itc_seperator.func.del = NULL; + + + + connectiveUG->view_to_load = __get_connective_view_to_load(service); + setting_retvm_if(NULL == connectiveUG->view_to_load, NULL, + "NULL == connectiveUG->view_to_load"); + setting_view_node_set_cur_view(connectiveUG->view_to_load); + setting_view_create(connectiveUG->view_to_load, (void *)connectiveUG); + evas_object_event_callback_add(connectiveUG->win_main_layout, + EVAS_CALLBACK_RESIZE, + setting_connective_ug_cb_resize, + connectiveUG); + return __get_connective_layout_to_return(service, connectiveUG); +} + +static void setting_connective_ug_on_start(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_connective_ug_on_pause(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_connective_ug_on_resume(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_connective_ug_on_destroy(ui_gadget_h ug, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if((!priv), "!priv"); + SettingConnectivityUG *connectiveUG = priv; + + evas_object_event_callback_del(connectiveUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_connective_ug_cb_resize); /* fix flash issue for gallery */ + connectiveUG->ug = ug; + + /* called when this shared gadget is terminated. similar with app_exit */ + if (&setting_view_connectivity_usb == connectiveUG->view_to_load) { + setting_view_destroy(&setting_view_connectivity_usb_help, + connectiveUG); + setting_view_destroy(&setting_view_connectivity_usb, + connectiveUG); + } + + if (NULL != ug_get_layout(connectiveUG->ug)) { + evas_object_hide((Evas_Object *) + ug_get_layout(connectiveUG->ug)); + evas_object_del((Evas_Object *) + ug_get_layout(connectiveUG->ug)); + } + + SETTING_TRACE_END; +} + +static void setting_connective_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; +} + +static void setting_connective_ug_on_event(ui_gadget_h ug, + enum ug_event event, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + 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; + case UG_EVENT_REGION_CHANGE: + break; + default: + break; + } +} + +static void setting_connective_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + SettingConnectivityUG *ad = (SettingConnectivityUG *) priv; + + switch (event) { + case UG_KEY_EVENT_END: + { + if (elm_naviframe_top_item_get(ad->navi_bar) == + elm_naviframe_bottom_item_get(ad->navi_bar)) { + ug_destroy_me(ug); + } else { + /* elm_naviframe_item_pop(ad->navi_bar); */ + setting_view_cb_at_endKey(ad); + } + } + break; + default: + break; + } +} + +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + SettingConnectivityUG *connectiveUG = + calloc(1, sizeof(SettingConnectivityUG)); + setting_retvm_if(!connectiveUG, -1, + "Create SettingConnectivityUG obj failed"); + + ops->create = setting_connective_ug_on_create; + ops->start = setting_connective_ug_on_start; + ops->pause = setting_connective_ug_on_pause; + ops->resume = setting_connective_ug_on_resume; + ops->destroy = setting_connective_ug_on_destroy; + ops->message = setting_connective_ug_on_message; + ops->event = setting_connective_ug_on_event; + ops->key_event = setting_connective_ug_on_key_event; + ops->priv = connectiveUG; + ops->opt = UG_OPT_INDICATOR_ENABLE; + + return 0; +} + +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + struct SettingConnectivityUG *connectiveUG; + setting_retm_if(!ops, "ops == NULL"); + + connectiveUG = ops->priv; + if (connectiveUG) { + FREE(connectiveUG); + } +} + +/*****/ +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + + int ret = 0; + char *ug_type = NULL; + + service_get_extra_data(service, "viewtype", &ug_type); + if(!ug_type) + return -1; + + if (0 == safeStrCmp(ug_type, "usb")) { + /* usb */ +#if SUPPORT_RUN_SYSTEM_COMMAND + ret += excuteCmd(SETTING_POSTINST_FILE, 1, "usbconnectivity"); +#else + ret += vconf_set_bool(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL, 0); + /* Resetting VCONFKEY_SETAPPL_USB_MODE_INT (current mode) is not necessary. + * If USB cable is removed, the key value is SETTING_USB_NONE_MODE by USB-setting. + * If USB cable is connected, the key value is changed by selected mode. */ + ret += vconf_set_int(VCONFKEY_SETAPPL_USB_IN_MODE_CHANGE, CHANGE_COMPLETE); +#endif + } + return ret; +} diff --git a/setting-datausage/CMakeLists.txt b/setting-datausage/CMakeLists.txt new file mode 100755 index 0000000..b218247 --- /dev/null +++ b/setting-datausage/CMakeLists.txt @@ -0,0 +1,34 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_datausage REQUIRED ecore ecore-file evas elementary appcore-common appcore-efl ui-gadget-1 capi-appfw-application sysman cairo system-resource) + +FOREACH(flag ${pkgs_datausage_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") +ADD_DEFINITIONS("-fpie") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") + +ADD_LIBRARY(${SETTING_DATAUSAGE_UG} SHARED + ./src/setting-datausage.c + ./src/setting-datausage-main.c + ) + +TARGET_LINK_LIBRARIES(${SETTING_DATAUSAGE_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_DATAUSAGE_UG} ${pkgs_datausage_LDFLAGS}) + +INSTALL(TARGETS ${SETTING_DATAUSAGE_UG} DESTINATION /usr/ug/lib) diff --git a/setting-datausage/include/setting-datausage-change-cycle.h b/setting-datausage/include/setting-datausage-change-cycle.h new file mode 100755 index 0000000..ebf8645 --- /dev/null +++ b/setting-datausage/include/setting-datausage-change-cycle.h @@ -0,0 +1,28 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +#ifndef __SETTING_DATAUSAGE_CHANGE_CYCLE_H__ +#define __SETTING_DATAUSAGE_CHANGE_CYCLE_H__ + +#include + +static void __setting_datausage_change_cycle_back_cb(void *data, Evas_Object * obj, void *event_info); + +#endif /* __SETTING_DATAUSAGE_CHANGE_CYCLE_H__ */ diff --git a/setting-datausage/include/setting-datausage-main.h b/setting-datausage/include/setting-datausage-main.h new file mode 100755 index 0000000..20cfea6 --- /dev/null +++ b/setting-datausage/include/setting-datausage-main.h @@ -0,0 +1,73 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +#ifndef __SETTING_DATAUSAGE_MAIN_H__ +#define __SETTING_DATAUSAGE_MAIN_H__ + +#include + +#define SETTING_DATAUSAGE_DESC_LEN_MAX 256 + +#define SETTING_DATAUSAGE_GRAPH_W ((int)680 * WIDGET_SCALE_FACTOR) +#define SETTING_DATAUSAGE_GRAPH_H ((int)500 * WIDGET_SCALE_FACTOR) + +#define SETTING_DATAUSAGE_CAIRO_W ((int)630 * WIDGET_SCALE_FACTOR) +#define SETTING_DATAUSAGE_CAIRO_H 630 + +#define SETTING_DATAUSAGE_DATA_LIMIT_GRAPH_HEIGHT 160 + +#define SETTING_DATAUSAGE_ROUND_RECT_HEAD_POINT_X ((int)15 * WIDGET_SCALE_FACTOR) +#define SETTING_DATAUSAGE_ROUND_RECT_HEAD_POINT_Y 10 +#define SETTING_DATAUSAGE_ROUND_RECT_WIDTH ((int)600 * WIDGET_SCALE_FACTOR) +#define SETTING_DATAUSAGE_ROUND_RECT_HEIGHT 130 +#define SETTING_DATAUSAGE_ROUND_RECT_R 20 +#define SETTING_DATAUSAGE_ROUND_RECT_BG_COLOR 187 +#define SETTING_DATAUSAGE_ROUND_RECT_COLOR_RED 143 +#define SETTING_DATAUSAGE_ROUND_RECT_COLOR_GREEN 148 +#define SETTING_DATAUSAGE_ROUND_RECT_COLOR_BLUE 97 + +#define SETTING_DATAUSAGE_HEAD_POINT_X ((int)70 * WIDGET_SCALE_FACTOR) +#define SETTING_DATAUSAGE_HEAD_POINT_Y 30 + +#define SETTING_DATAUSAGE_PILLAR_WIDTH 18 + +#define SETTING_DATAUSAGE_CHART_WIDTH (SETTING_DATAUSAGE_PILLAR_WIDTH * SETTING_DATAUSAGE_DAYS_IN_MONTH) +#define SETTING_DATAUSAGE_CHART_HEIGHT 400 + +#define SETTING_DATAUSAGE_HORIZONTAL_GROUP 5 /* group count in HORIZONTAL */ +#define SETTING_DATAUSAGE_LINES_IN_HORIZONTAL_GROUP 5 /* line count in per group in HORIZONTAL */ + +#define SETTING_DATAUSAGE_HORIZONTAL_LINE_COUNT (SETTING_DATAUSAGE_HORIZONTAL_GROUP * SETTING_DATAUSAGE_LINES_IN_HORIZONTAL_GROUP) +#define SETTING_DATAUSAGE_LINE_TO_LINE_SPACE (SETTING_DATAUSAGE_CHART_HEIGHT / SETTING_DATAUSAGE_HORIZONTAL_LINE_COUNT) + + +#define SETTING_DATAUSAGE_KILOBYTE_VALUE 1024 +#define SETTING_DATAUSAGE_MEGABYTE_VALUE 1048576 + +#define SETTING_DATAUSAGE_ANIMATOR_START_INDEX 5 + +static void __setting_datausage_main_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info); +static void __setting_datausage_main_data_items_append(void *data); +static void __setting_datausage_main_cairo_destroy(void *data); +static int __setting_datausage_main_days_in_month_get(time_t *start, time_t *end); +static int __setting_datausage_main_days_in_week_get(time_t *start, time_t *end); + +#endif /* __SETTING_DATAUSAGE_MAIN_H__ */ diff --git a/setting-datausage/include/setting-datausage-more-setting.h b/setting-datausage/include/setting-datausage-more-setting.h new file mode 100755 index 0000000..ca8c3c0 --- /dev/null +++ b/setting-datausage/include/setting-datausage-more-setting.h @@ -0,0 +1,29 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +#ifndef __SETTING_DATAUSAGE_MORE_SETTING_H__ +#define __SETTING_DATAUSAGE_MORE_SETTING_H__ + +#include + +static void __setting_datausage_more_setting_back_cb(void *data, Evas_Object * obj, void *event_info); +static void __setting_datausage_more_setting_mouse_up_cb(void *data, Evas_Object *obj, void *event_info); + +#endif /* __SETTING_DATAUSAGE_MORE_SETTING_H__ */ diff --git a/setting-datausage/include/setting-datausage.h b/setting-datausage/include/setting-datausage.h new file mode 100755 index 0000000..0e13ad6 --- /dev/null +++ b/setting-datausage/include/setting-datausage.h @@ -0,0 +1,147 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +#ifndef __SETTING_DATAUSAGE_H__ +#define __SETTING_DATAUSAGE_H__ + +#include +#include + +#include + +#include +#include + +#include +#include +#include + +#define SETTING_PKG_NAME "com.samsung.setting" + +#define SETTING_DATAUSAGE_MOBILE_STR "Mobile" + +#define SETTING_DATAUSAGE_DATA_ROAMING_STR "IDS_ST_BODY_DATA_ROAMING" +#define SETTING_DATAUSAGE_RESTRICT_BACKGROUND_STR "Restrict background data" +#define SETTING_DATAUSAGE_SHOW_WIFI_STR "Show Wi-Fi usage" + +#define SETTING_DATAUSAGE_ON_THIS_DATE_EACH_MONTH_STR "On this date each month" + +#define SETTING_DATAUSAGE_MOBILE_DATA_STR "IDS_ST_MBODY_MOBILE_DATA" +#define SETTING_DATAUSAGE_SET_DATA_USAGE_LIMIT_STR "Set data usage limit" +#define SETTING_DATAUSAGE_DATA_LIMIT_STR "IDS_ST_BODY_DATA_LIMIT" +#define SETTING_DATAUSAGE_DATA_USAGE_CYCLE_STR "Data usage cycle" +#define SETTING_DATAUSAGE_STARTING_DATE_STR "IDS_ST_BODY_START_DATE" +#define SETTING_DATAUSAGE_CHANGE_CYCLE_STR "IDS_ST_BODY_CHANGE_CYCLE" +#define SETTING_DATAUSAGE_MORE_SETTING_STR "More data usage setting" +#define SETTING_DATAUSAGE_GRAPH_DESC_STR "%s : About %s used" +#define SETTING_DATAUSAGE_DESC_STR "IDS_ST_BODY_DATA_USAGE_IS_MEASURED_BY_YOUR_PHONE_AND_YOUR_SERVICE_PROVIDER_MAY_ACCOUNT_FOR_USAGE_DIFFERENTLY" + + +#define SETTING_DATAUSAGE_NO_APPS_USE_DATA_STR "No apps used data during this period" + +#define SETTING_DATAUSAGE_MONTH_STR "Month" +#define SETTING_DATAUSAGE_WEEK_STR "Week" +#define SETTING_DATAUSAGE_DAY_STR "Day" + +#define SETTING_DATAUSAGE_DAYS_IN_MONTH 31 +#define SETTING_DATAUSAGE_DAYS_IN_WEEK 7 +#define SETTING_DATAUSAGE_HOURS_IN_DAY 24 + +typedef struct _SettingDatausageUG SettingDatausageUG; + +/** + * Setting Datausage UG context + * all UG function has void* as an agument. this is casted back to SettingDatausageUG + * and the functions access app context. + */ +struct _SettingDatausageUG { + ui_gadget_h ug; + + /* add more variables here (move your appdata to here) */ + Evas *evas; + Evas_Object *win_main_layout; + Evas_Object *win_get; + + Evas_Object *ly_main; + + Evas_Object *genlist; + Evas_Object *layout; + Evas_Object *navibar; + + Evas_Object *tabbar; + Elm_Object_Item *tabbar_item[2]; + + setting_view *view_to_load; + + /* datausage setting */ + Evas_Object *popup; + Elm_Genlist_Item_Class itc_2text_3_parent; + Elm_Genlist_Item_Class itc_1icon_1text_sub; + Elm_Genlist_Item_Class itc_1text_1icon_2; + Elm_Genlist_Item_Class itc_1text_1icon; + Elm_Genlist_Item_Class itc_2text_2; + Elm_Genlist_Item_Class itc_1text; + Elm_Genlist_Item_Class itc_group_item; + Elm_Genlist_Item_Class itc_bg_1icon; + Elm_Genlist_Item_Class itc_seperator; + Elm_Genlist_Item_Class itc_variable_height; + Elm_Genlist_Item_Class itc_1text_1icon_date; + Elm_Genlist_Item_Class itc_layout; + Elm_Genlist_Item_Class itc_2text_1icon_4; + + Setting_GenGroupItem_Data *use_packet_data; + Setting_GenGroupItem_Data *set_data_usage_limit; + Setting_GenGroupItem_Data *data_limit; + Setting_GenGroupItem_Data *data_usage_cycle; + Setting_GenGroupItem_Data *starting_date; + Setting_GenGroupItem_Data *change_cycle; + Setting_GenGroupItem_Data *more_setting; + Setting_GenGroupItem_Data *limit_graph; + Setting_GenGroupItem_Data *graph_image; + Setting_GenGroupItem_Data *graph_desc; + + Evas_Object *data_limit_conformant; + Evas_Object *data_limit_entry; + Evas_Object *data_limit_popup; + Evas_Object *ctxpopup; + + Eina_List *app_list; + int app_list_index; + unsigned long long apps_total_size; + Ecore_Animator *animator; + rsml_iface_type iftype; + + int data_arr_len; + unsigned long long data_arr[SETTING_DATAUSAGE_DAYS_IN_MONTH]; + int maximum; + unsigned long long total_size; + unsigned long long left_size; + + cairo_surface_t *cairo_surface; + cairo_t *cr; + + cairo_surface_t *limit_cairo_surface; + cairo_t *limit_cr; + +}; + +extern setting_view setting_view_datausage_main; + +#endif /* __SETTING_DATAUSAGE_H__ */ diff --git a/setting-datausage/src/setting-datausage-change-cycle.c b/setting-datausage/src/setting-datausage-change-cycle.c new file mode 100755 index 0000000..39cc9fc --- /dev/null +++ b/setting-datausage/src/setting-datausage-change-cycle.c @@ -0,0 +1,208 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include + +static int __setting_datausage_change_cycle_create(void *cb); +static int __setting_datausage_change_cycle_destroy(void *cb); +static int __setting_datausage_change_cycle_update(void *cb); +static int __setting_datausage_change_cycle_cleanup(void *cb); + +setting_view setting_view_datausage_change_cycle = { + .create = __setting_datausage_change_cycle_create, + .destroy = __setting_datausage_change_cycle_destroy, + .update = __setting_datausage_change_cycle_update, + .cleanup = __setting_datausage_change_cycle_cleanup, +}; + +static char *_item_label_get(void *data, Evas_Object *obj, const char *part) +{ + SETTING_TRACE_BEGIN; + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *) data; + + if (!safeStrCmp(part, "elm.text") || !safeStrCmp(part, "elm.text.1")) { /* title */ + if (item_data->keyStr) { + return (char *)g_strdup(_(item_data->keyStr)); + } + } else if (!safeStrCmp(part, "elm.text.2")) { /* bottom or right */ + if (item_data->sub_desc) { + return (char *)g_strdup(item_data->sub_desc); + } + } + + + return NULL; +} + +static Evas_Object *_item_content_get(void *data, Evas_Object *obj, const char *part) +{ + SETTING_TRACE_BEGIN; + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *) data; + //int width = (int) (690 * elm_scale_get()); + + if (!safeStrCmp(part, "elm.icon") || !safeStrCmp(part, "elm.icon.1")) { + Evas_Object *datetimefield = elm_datetime_add(obj); + item_data->eo_check = datetimefield; + + elm_datetime_field_visible_set(datetimefield, ELM_DATETIME_YEAR, EINA_FALSE); + elm_datetime_field_visible_set(datetimefield, ELM_DATETIME_MONTH, EINA_FALSE); + elm_datetime_field_visible_set(datetimefield, ELM_DATETIME_HOUR, EINA_FALSE); + elm_datetime_field_visible_set(datetimefield, ELM_DATETIME_MINUTE, EINA_FALSE); + elm_datetime_field_visible_set(datetimefield, ELM_DATETIME_AMPM, EINA_FALSE); + + evas_object_size_hint_weight_set(datetimefield, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(datetimefield, 0.5, 0.5); + evas_object_show(datetimefield); + + char date_format[MAX_DATETIME_FORMAT_LEN + 1] = {0, }; + const char *time_format = "%H : %M"; + + snprintf(date_format, MAX_DATETIME_FORMAT_LEN, + "%s %s", item_data->sub_desc, time_format); + elm_datetime_format_set(datetimefield, date_format); + + struct tm ts_ret; + time_t ctime = time(NULL); + struct tm *ts = localtime_r(&ctime, &ts_ret); + retv_if(!ts, NULL); + ts_ret.tm_mday = item_data->chk_status; + + elm_datetime_value_set(datetimefield, &ts_ret); + + if (item_data->chk_change_cb) { + evas_object_smart_callback_add(datetimefield, "changed", + item_data->chk_change_cb, item_data); + } + return datetimefield; + } + + return NULL; +} + +static void _item_del(void *data, Evas_Object *obj) +{ + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *) data; + if (item_data) { + G_FREE(item_data->keyStr); + G_FREE(item_data->sub_desc); + FREE(item_data); + } +} + +/* *************************************************** +** +** basic func +** +** **************************************************/ + +static int __setting_datausage_change_cycle_create(void *cb) +{ + SETTING_TRACE_BEGIN; + //error check + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingDatausageUG *ad = (SettingDatausageUG *) cb; + Evas_Object *scroller; + + setting_push_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _(SETTING_DATAUSAGE_CHANGE_CYCLE_STR), + _("IDS_COM_BODY_BACK"), + NULL, + __setting_datausage_change_cycle_back_cb, + NULL, + ad, &scroller, ad->navibar); + + setting_retvm_if(scroller == NULL, SETTING_RETURN_FAIL, "scroller is NULL"); + + Elm_Object_Item *item = NULL;; + + item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + ad->itc_layout.item_style = "dialogue/1text.1icon.5"; + ad->itc_layout.func.text_get = _item_label_get; + ad->itc_layout.func.content_get = _item_content_get; + ad->itc_layout.func.state_get = NULL; + ad->itc_layout.func.del = _item_del; + + + int value = 0; + int err = 0; + int ret = 0; + + ret = setting_get_int_slp_key(INT_SLP_SETTING_DATAUSAGE_DATA_EACH_MONTH_INT, &value, &err); + if (ret != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + + ad->change_data = setting_create_Gendial_field_def(scroller, &(ad->itc_layout), + NULL, + ad, SWALLOW_Type_LAYOUT_DATEFIELD, + NULL, NULL, value, + SETTING_DATAUSAGE_ON_THIS_DATE_EACH_MONTH_STR, + "%Y %b %d", + NULL); + + setting_view_datausage_change_cycle.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int __setting_datausage_change_cycle_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + //error check + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SettingDatausageUG *ad = (SettingDatausageUG *) cb; + + elm_naviframe_item_pop(ad->navibar); + setting_view_datausage_change_cycle.is_create = 0; + return SETTING_RETURN_SUCCESS; +} + +static int __setting_datausage_change_cycle_update(void *cb) +{ + SETTING_TRACE_BEGIN; + return SETTING_RETURN_SUCCESS; +} + +static int __setting_datausage_change_cycle_cleanup(void *cb) +{ + //error check + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + __setting_datausage_change_cycle_destroy(cb); + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** +** +** call back func +** +** **************************************************/ +static void __setting_datausage_change_cycle_back_cb(void *data, Evas_Object * obj, void *event_info) +{ + //error check + ret_if(data == NULL); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + setting_view_change(&setting_view_datausage_change_cycle, &setting_view_datausage_main, ad); +} diff --git a/setting-datausage/src/setting-datausage-main.c b/setting-datausage/src/setting-datausage-main.c new file mode 100755 index 0000000..3c57354 --- /dev/null +++ b/setting-datausage/src/setting-datausage-main.c @@ -0,0 +1,2564 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +#include +#include +#include + +#define UNKNOWN_APP "Unknown" +#define DATAUSAGE_POPUP_GUIDE_TEXT "Max limit is 99999" + +const char* data_usage_cycle_arr[] = { + SETTING_DATAUSAGE_MONTH_STR, + SETTING_DATAUSAGE_WEEK_STR, + SETTING_DATAUSAGE_DAY_STR, + NULL, + }; + +const char *days_in_month[] = { + "01", "02", "03", "04", "05", "06", + "07", "08", "09", "10", "11", "12", + "13", "14", "15", "16", "17", "18", + "19", "20", "21", "22", "23", "24", + "25", "26", "27", "28", "29", "30", + "31", +}; + +static int setting_datausage_main_create(void *cb); +static int setting_datausage_main_destroy(void *cb); +static int setting_datausage_main_update(void *cb); +static int setting_datausage_main_cleanup(void *cb); + +setting_view setting_view_datausage_main = { + .create = setting_datausage_main_create, + .destroy = setting_datausage_main_destroy, + .update = setting_datausage_main_update, + .cleanup = setting_datausage_main_cleanup, +}; + +static void __setting_datausage_main_data_items_recreate(void *data); + +static int __setting_datausage_main_size_transition(unsigned long long size, char *size_desc) +{ + //SETTING_TRACE_BEGIN; + //SETTING_TRACE("size = %lld", size); + double tmp_size = 0.0; + int ret = 0; + if (size < SETTING_DATAUSAGE_MEGABYTE_VALUE) { // size < 1MB: show x.xKB + tmp_size = ((double)size) / SETTING_DATAUSAGE_KILOBYTE_VALUE; + ret = snprintf(size_desc, MAX_DISPLAY_NAME_LEN_ON_UI, "%4.2lf%s", tmp_size, "KB"); + retv_if(ret < 0, SETTING_RETURN_FAIL); + } else { // show x.xMB + tmp_size = ((double)size) / SETTING_DATAUSAGE_MEGABYTE_VALUE; + ret = snprintf(size_desc, MAX_DISPLAY_NAME_LEN_ON_UI, "%4.2lf%s", tmp_size, "MB"); + retv_if(ret < 0, SETTING_RETURN_FAIL); + } + + return SETTING_RETURN_SUCCESS; +} + +static void __setting_datausage_main_left_time_desc_get(char *desc) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == desc, "desc is NULL"); + + int err = 0; + int cycle = 0; + int ret = setting_get_int_slp_key(INT_SLP_SETTING_DATAUSAGE_DATA_USAGE_CYCLE_INT, &cycle, &err); + if (ret != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + + time_t cur_time = time(0); + time_t end_time; + switch (cycle) { + case 0: /* month */ + { + __setting_datausage_main_days_in_month_get(NULL, &end_time); + break; + } + case 1: /* week */ + { + __setting_datausage_main_days_in_week_get(NULL, &end_time); + break; + } + case 2: /* day */ + { + end_time = time(0); + break; + } + default: + { + /* do nothing */ + SETTING_TRACE_ERROR("wrong data usage cycle"); + return; + } + } + + struct tm cur_date; + if (NULL == localtime_r(&cur_time, &cur_date)) { + SETTING_TRACE_ERROR("fail to call localtime_r"); + return; + } + + struct tm end_date; + if (NULL == localtime_r(&end_time, &end_date)) { + SETTING_TRACE_ERROR("fail to call localtime_r"); + return; + } + + int start_day = cur_date.tm_mday; + int end_day = end_date.tm_mday; + + if (start_day == end_day) { + int cur_hour = cur_date.tm_hour; + snprintf(desc, MAX_DISPLAY_NAME_LEN_ON_UI, "%d hours remaining", (SETTING_DATAUSAGE_HOURS_IN_DAY - cur_hour)); + } else { + snprintf(desc, MAX_DISPLAY_NAME_LEN_ON_UI, "%d days remaining", (end_day - start_day)); + } +} + +static void __setting_datausage_main_round_rectangle_draw(void *data, int width, + int red, int green, int blue) +{ + //SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + setting_retm_if(ad->limit_cr == NULL, "ad->limit_cr is NULL"); + + cairo_set_source_rgba(ad->limit_cr, red/255.0, green/255.0, blue/255.0, 1.0); + cairo_set_line_width(ad->limit_cr, 1); + + int x = SETTING_DATAUSAGE_ROUND_RECT_HEAD_POINT_X; + int y = SETTING_DATAUSAGE_ROUND_RECT_HEAD_POINT_Y; + int height = SETTING_DATAUSAGE_ROUND_RECT_HEIGHT; + int r = SETTING_DATAUSAGE_ROUND_RECT_R; + + cairo_move_to(ad->limit_cr, x + r, y); + cairo_line_to(ad->limit_cr, x + width - r, y); + cairo_move_to(ad->limit_cr, x + width, y + r); + cairo_line_to(ad->limit_cr, x + width, y + height - r); + cairo_move_to(ad->limit_cr, x + width - r, y + height); + cairo_line_to(ad->limit_cr, x + r, y + height); + cairo_move_to(ad->limit_cr, x, y + height - r); + cairo_line_to(ad->limit_cr, x, y + r); + cairo_arc(ad->limit_cr, x + r, y + r, r, M_PI, 3 * M_PI / 2.0); + cairo_arc(ad->limit_cr, x + width - r, y + r, r, 3 * M_PI / 2, 2 * M_PI); + cairo_arc(ad->limit_cr, x + width - r, y + height - r, r, 0, M_PI / 2); + cairo_arc(ad->limit_cr, x + r, y + height - r, r, M_PI / 2, M_PI); + + cairo_stroke_preserve(ad->limit_cr); + cairo_set_source_rgba(ad->limit_cr, red/255.0, green/255.0, blue/255.0, 1.0); + cairo_fill(ad->limit_cr); +} + +static void __setting_datausage_main_round_rectangle_draw_1(void *data, int width, + int red, int green, int blue) +{ + //SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + setting_retm_if(ad->limit_cr == NULL, "ad->cr is NULL"); + + cairo_set_source_rgba(ad->limit_cr, red/255.0, green/255.0, blue/255.0, 1.0); + cairo_set_line_width(ad->limit_cr, 1); + + int x = SETTING_DATAUSAGE_ROUND_RECT_HEAD_POINT_X; + int y = SETTING_DATAUSAGE_ROUND_RECT_HEAD_POINT_Y; + int height = SETTING_DATAUSAGE_ROUND_RECT_HEIGHT; + int r = SETTING_DATAUSAGE_ROUND_RECT_R; + + double radian = acos((double)(r - width) / r); + + cairo_move_to(ad->limit_cr, x, y + height - r); + cairo_line_to(ad->limit_cr, x, y + r); + cairo_arc(ad->limit_cr, x + r, y + r, r, M_PI, M_PI + radian); + cairo_arc(ad->limit_cr, x + r, y + height - r, r, M_PI - radian, M_PI); + cairo_close_path(ad->limit_cr); + + cairo_stroke_preserve(ad->limit_cr); + cairo_set_source_rgba(ad->limit_cr, red/255.0, green/255.0, blue/255.0, 1.0); + cairo_fill(ad->limit_cr); +} + +static void __setting_datausage_main_triangle_draw(void *data, int width) +{ + //SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + setting_retm_if(ad->limit_cr == NULL, "ad->cr is NULL"); + + cairo_set_source_rgba(ad->limit_cr, + SETTING_DATAUSAGE_ROUND_RECT_COLOR_RED/255.0, + SETTING_DATAUSAGE_ROUND_RECT_COLOR_GREEN/255.0, + SETTING_DATAUSAGE_ROUND_RECT_COLOR_BLUE/255.0, + 1.0); + cairo_set_line_width(ad->limit_cr, 1); + + int x = SETTING_DATAUSAGE_ROUND_RECT_HEAD_POINT_X + width; + int y = SETTING_DATAUSAGE_ROUND_RECT_HEAD_POINT_Y + SETTING_DATAUSAGE_ROUND_RECT_HEIGHT + 4; + int r = SETTING_DATAUSAGE_ROUND_RECT_R; + + cairo_move_to(ad->limit_cr, x, y); + cairo_line_to(ad->limit_cr, x - r, y + r); + cairo_line_to(ad->limit_cr, x + r, y + r); + cairo_close_path(ad->limit_cr); + + cairo_stroke_preserve(ad->limit_cr); + cairo_set_source_rgba(ad->limit_cr, + SETTING_DATAUSAGE_ROUND_RECT_COLOR_RED/255.0, + SETTING_DATAUSAGE_ROUND_RECT_COLOR_GREEN/255.0, + SETTING_DATAUSAGE_ROUND_RECT_COLOR_BLUE/255.0, + 1.0); + cairo_fill(ad->limit_cr); +} + +static void __setting_datausage_main_round_rectangle_draw_2(void *data, int width, + int red, int green, int blue) +{ + //SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "data is NULL"); + setting_retm_if(width <= SETTING_DATAUSAGE_ROUND_RECT_R, "width is error"); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + setting_retm_if(ad->limit_cr == NULL, "ad->cr is NULL"); + + cairo_set_source_rgba(ad->limit_cr, red/255.0, green/255.0, blue/255.0, 1.0); + cairo_set_line_width(ad->limit_cr, 1); + + int x = SETTING_DATAUSAGE_ROUND_RECT_HEAD_POINT_X; + int y = SETTING_DATAUSAGE_ROUND_RECT_HEAD_POINT_Y; + int height = SETTING_DATAUSAGE_ROUND_RECT_HEIGHT; + int left_r = SETTING_DATAUSAGE_ROUND_RECT_R; + int right_r = width - left_r; + + cairo_move_to(ad->limit_cr, x + width, y + right_r); + cairo_line_to(ad->limit_cr, x + width, y + height - right_r); + cairo_move_to(ad->limit_cr, x, y + height - left_r); + cairo_line_to(ad->limit_cr, x, y + left_r); + cairo_arc(ad->limit_cr, x + left_r, y + left_r, left_r, M_PI, 3 * M_PI / 2.0); + cairo_arc(ad->limit_cr, x + left_r, y + right_r, right_r, 3 * M_PI / 2, 2 * M_PI); + cairo_arc(ad->limit_cr, x + left_r, y + height - right_r, right_r, 0, M_PI / 2); + cairo_arc(ad->limit_cr, x + left_r, y + height - left_r, left_r, M_PI / 2, M_PI); + + cairo_stroke_preserve(ad->limit_cr); + cairo_set_source_rgba(ad->limit_cr, red/255.0, green/255.0, blue/255.0, 1.0); + cairo_fill(ad->limit_cr); +} + +static void __setting_datausage_main_text_in_round_rect_draw(void *data) +{ + //SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + setting_retm_if(ad->limit_cr == NULL, "ad->cr is NULL"); + + cairo_set_source_rgba(ad->limit_cr, 0.0, 0.0, 0.0, 1.0); + + int x = SETTING_DATAUSAGE_ROUND_RECT_HEAD_POINT_X + 20; + int y = SETTING_DATAUSAGE_ROUND_RECT_HEAD_POINT_Y + 50; + + char total_size[MAX_DISPLAY_NAME_LEN_ON_UI] = {0}; + __setting_datausage_main_size_transition(ad->total_size, total_size); + + char left_size[MAX_DISPLAY_NAME_LEN_ON_UI] = {0}; + __setting_datausage_main_size_transition(ad->left_size, left_size); + + char desc[MAX_DISPLAY_NAME_LEN_ON_UI] = {0}; + snprintf(desc, MAX_DISPLAY_NAME_LEN_ON_UI, "%s used %s left", total_size, left_size); + + cairo_move_to(ad->limit_cr, x, y); + cairo_set_font_size(ad->limit_cr, 38); + cairo_show_text(ad->limit_cr, desc); + + int err = 0; + int cycle = 0; + int ret = setting_get_int_slp_key(INT_SLP_SETTING_DATAUSAGE_DATA_USAGE_CYCLE_INT, &cycle, &err); + if (ret != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + + char left_time_desc[MAX_DISPLAY_NAME_LEN_ON_UI] = {0}; + __setting_datausage_main_left_time_desc_get(left_time_desc); + + cairo_move_to(ad->limit_cr, x, y + 50); + cairo_set_font_size(ad->limit_cr, 36); + cairo_show_text(ad->limit_cr, left_time_desc); +} + +static void __setting_datausage_main_table_draw(void *data) +{ + //SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + setting_retm_if(ad->cr == NULL, "ad->cr is NULL"); + + cairo_set_source_rgba(ad->cr, 0.0, 0.0, 0.0, 1.0); + cairo_set_line_width(ad->cr, 1); + + int begin_point_x = SETTING_DATAUSAGE_HEAD_POINT_X; + int begin_point_y = SETTING_DATAUSAGE_HEAD_POINT_Y; + int line_length = SETTING_DATAUSAGE_CHART_WIDTH; + int line_height = SETTING_DATAUSAGE_CHART_HEIGHT; + + /* paint y-axis */ + cairo_move_to(ad->cr, begin_point_x, begin_point_y); + cairo_line_to(ad->cr, begin_point_x, begin_point_y + line_height); + + /* paint horizontal lines */ + begin_point_x = SETTING_DATAUSAGE_HEAD_POINT_X; + + int line_count = line_height / SETTING_DATAUSAGE_LINE_TO_LINE_SPACE; + int i = 0; + for (; i <= line_count; i++) { + if (i % SETTING_DATAUSAGE_LINES_IN_HORIZONTAL_GROUP == 0) { + cairo_set_line_width(ad->cr, 3); + cairo_move_to(ad->cr, begin_point_x - 12, begin_point_y); + } else { + cairo_set_line_width(ad->cr, 1); + cairo_move_to(ad->cr, begin_point_x, begin_point_y); + } + + cairo_line_to(ad->cr, begin_point_x + line_length, begin_point_y); + begin_point_y += SETTING_DATAUSAGE_LINE_TO_LINE_SPACE; + cairo_stroke(ad->cr); + } +} + +static void __setting_datausage_main_text_in_table_draw(void *data) +{ + //SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + setting_retm_if(ad->cr == NULL, "ad->cr is NULL"); + + cairo_set_source_rgba(ad->cr, 0.0, 0.0, 0.0, 1.0); + + int begin_point_x = SETTING_DATAUSAGE_HEAD_POINT_X; + int begin_point_y = SETTING_DATAUSAGE_HEAD_POINT_Y; + int group_space = SETTING_DATAUSAGE_CHART_HEIGHT / SETTING_DATAUSAGE_HORIZONTAL_GROUP; + + int interval = ad->maximum / SETTING_DATAUSAGE_HORIZONTAL_GROUP; + + int text_x = begin_point_x - 60; + + int i = 0; + for (; i <= SETTING_DATAUSAGE_HORIZONTAL_GROUP; i++) { + cairo_move_to(ad->cr, text_x, begin_point_y + 5); + cairo_set_font_size(ad->cr, 20); + char tmp[MAX_DISPLAY_NAME_LEN_ON_UI] = {0}; + if (i == SETTING_DATAUSAGE_HORIZONTAL_GROUP) { + snprintf(tmp, MAX_DISPLAY_NAME_LEN_ON_UI, "%d", 0); + } else { + snprintf(tmp, MAX_DISPLAY_NAME_LEN_ON_UI, "%d", (ad->maximum - interval * i)); + } + cairo_show_text(ad->cr, tmp); + begin_point_y += group_space; + } +} + +static void __setting_datausage_main_pillar_draw(void *data) +{ + //SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + setting_retm_if(ad->cr == NULL, "ad->cr is NULL"); + + cairo_set_source_rgba(ad->cr, 85/255.0, 145/255.0, 210/255.0, 1.0); + cairo_set_line_width(ad->cr, 1); + + int begin_point_x = SETTING_DATAUSAGE_HEAD_POINT_X + 1; + int begin_point_y = SETTING_DATAUSAGE_HEAD_POINT_Y + SETTING_DATAUSAGE_CHART_HEIGHT; + int pillar_width = SETTING_DATAUSAGE_PILLAR_WIDTH; + int pillar_max_height = SETTING_DATAUSAGE_CHART_HEIGHT; + + int i = 0; + double tmp_size = 0.0; + int height = 0; + for (; i < ad->data_arr_len; i++) { + if (ad->data_arr[i] == 0) { + continue; + } + + /* get the size xxMB */ + tmp_size = (double)ad->data_arr[i] / SETTING_DATAUSAGE_MEGABYTE_VALUE; + height = pillar_max_height * (tmp_size / ad->maximum); + cairo_rectangle(ad->cr, begin_point_x + pillar_width * i, + begin_point_y - height, pillar_width, height - 1); + } + cairo_stroke_preserve(ad->cr); + cairo_fill(ad->cr); +} + +static void __setting_datausage_main_coord_draw(void *data) +{ + //SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + setting_retm_if(ad->cr == NULL, "ad->cr is NULL"); + + cairo_set_source_rgba(ad->cr, 0.0, 0.0, 0.0, 1.0); + cairo_set_line_width(ad->cr, 1); + + int offset = 1; + int begin_point_x = SETTING_DATAUSAGE_HEAD_POINT_X + offset; + int begin_point_y = SETTING_DATAUSAGE_HEAD_POINT_Y + SETTING_DATAUSAGE_CHART_HEIGHT; + int line_space = SETTING_DATAUSAGE_PILLAR_WIDTH / 2; + int line_height = SETTING_DATAUSAGE_PILLAR_WIDTH; + + cairo_move_to(ad->cr, begin_point_x, begin_point_y); + cairo_line_to(ad->cr, begin_point_x, begin_point_y + line_height); + + int i = 0; + for (; i < SETTING_DATAUSAGE_DAYS_IN_MONTH; i++) { + begin_point_x = begin_point_x + line_space; + cairo_move_to(ad->cr, begin_point_x, begin_point_y - line_height / 2); + cairo_line_to(ad->cr, begin_point_x, begin_point_y + line_height / 2); + + begin_point_x = begin_point_x + line_space; + cairo_move_to(ad->cr, begin_point_x, begin_point_y); + cairo_line_to(ad->cr, begin_point_x, begin_point_y + line_height); + } + cairo_stroke(ad->cr); +} + +static void __setting_datausage_main_pie_graph(Evas_Object *parent, const char* part, void *data) +{ + //SETTING_TRACE_BEGIN; + setting_retm_if(parent == NULL, "parent is NULL"); + setting_retm_if(data == NULL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + int value = 0; + int err = 0; + int ret = 0; + + ret = setting_get_bool_slp_key(BOOL_SLP_SETTING_DATAUSAGE_SET_DATA_USAGE_LIMIT_BOOL, &value, &err); + if (ret != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + + int cairo_w = SETTING_DATAUSAGE_CAIRO_W; + int cairo_h = SETTING_DATAUSAGE_CAIRO_H - SETTING_DATAUSAGE_DATA_LIMIT_GRAPH_HEIGHT; + + Evas* evas = evas_object_evas_get(parent); + setting_retm_if(evas == NULL, "evas is NULL"); + + Evas_Object *clip = evas_object_rectangle_add(evas); + evas_object_color_set(clip, 255, 255, 255, 255); + setting_resize_object(clip, cairo_w, cairo_h); + + Evas_Object *pie_image_object = evas_object_image_add(evas); + setting_retm_if(pie_image_object == NULL, "pie_image_object is NULL"); + evas_object_color_set(pie_image_object, 255, 255, 255, 250); + evas_object_clip_set(pie_image_object, clip); + evas_object_show(pie_image_object); + setting_resize_object(pie_image_object, cairo_w, cairo_h); + + evas_object_resize(parent, cairo_w, cairo_h); + + elm_object_part_content_set(parent, part, pie_image_object); + + if (ad->cairo_surface == NULL) { + ad->cairo_surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, cairo_w, cairo_h); + setting_retm_if(ad->cairo_surface == NULL, "ad->cairo_surface is NULL"); + } + + if (ad->cr == NULL) { + ad->cr = cairo_create(ad->cairo_surface); + setting_retm_if(ad->cr == NULL, "ad->cr is NULL"); + } + + __setting_datausage_main_table_draw(ad); + + __setting_datausage_main_text_in_table_draw(ad); + + __setting_datausage_main_pillar_draw(ad); + + __setting_datausage_main_coord_draw(ad); + + evas_object_image_size_set(pie_image_object, cairo_w, cairo_h); + evas_object_image_data_set(pie_image_object, cairo_image_surface_get_data(ad->cairo_surface)); + evas_object_image_fill_set(pie_image_object, 0, 0, cairo_w, cairo_h); +} + +static void __setting_datausage_main_limit_graph(Evas_Object *parent, const char* part, void *data) +{ + //SETTING_TRACE_BEGIN; + setting_retm_if(parent == NULL, "parent is NULL"); + setting_retm_if(data == NULL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + int cairo_w = SETTING_DATAUSAGE_CAIRO_W; + int cairo_h = SETTING_DATAUSAGE_DATA_LIMIT_GRAPH_HEIGHT; + + Evas* evas = evas_object_evas_get(parent); + setting_retm_if(evas == NULL, "evas is NULL"); + + Evas_Object *clip = evas_object_rectangle_add(evas); + evas_object_color_set(clip, 255, 255, 255, 255); + setting_resize_object(clip, cairo_w, cairo_h); + + Evas_Object *pie_image_object = evas_object_image_add(evas); + setting_retm_if(pie_image_object == NULL, "pie_image_object is NULL"); + evas_object_color_set(pie_image_object, 255, 255, 255, 250); + evas_object_clip_set(pie_image_object, clip); + evas_object_show(pie_image_object); + setting_resize_object(pie_image_object, cairo_w, cairo_h); + + elm_object_part_content_set(parent, part, pie_image_object); + + if (ad->limit_cairo_surface == NULL) { + ad->limit_cairo_surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, cairo_w, cairo_h); + setting_retm_if(ad->limit_cairo_surface == NULL, "ad->cairo_surface is NULL"); + } + + if (ad->limit_cr == NULL) { + ad->limit_cr = cairo_create(ad->limit_cairo_surface); + setting_retm_if(ad->limit_cr == NULL, "ad->cr is NULL"); + } + + __setting_datausage_main_round_rectangle_draw(ad, SETTING_DATAUSAGE_ROUND_RECT_WIDTH, + SETTING_DATAUSAGE_ROUND_RECT_BG_COLOR, + SETTING_DATAUSAGE_ROUND_RECT_BG_COLOR, + SETTING_DATAUSAGE_ROUND_RECT_BG_COLOR); + + int width = 0; + if (ad->left_size > 0) { + double percent = (double)ad->total_size / (ad->total_size + ad->left_size); + width = SETTING_DATAUSAGE_ROUND_RECT_WIDTH * percent; + } else { + width = SETTING_DATAUSAGE_ROUND_RECT_WIDTH; + } + + if (width > (2 * SETTING_DATAUSAGE_ROUND_RECT_R)) { + __setting_datausage_main_round_rectangle_draw(ad, width, + SETTING_DATAUSAGE_ROUND_RECT_COLOR_RED, + SETTING_DATAUSAGE_ROUND_RECT_COLOR_GREEN, + SETTING_DATAUSAGE_ROUND_RECT_COLOR_BLUE); + } else if (width > SETTING_DATAUSAGE_ROUND_RECT_R && width <= (2 * SETTING_DATAUSAGE_ROUND_RECT_R)) { + __setting_datausage_main_round_rectangle_draw_2(ad, width, + SETTING_DATAUSAGE_ROUND_RECT_COLOR_RED, + SETTING_DATAUSAGE_ROUND_RECT_COLOR_GREEN, + SETTING_DATAUSAGE_ROUND_RECT_COLOR_BLUE); + } else { + __setting_datausage_main_round_rectangle_draw_1(ad, width, + SETTING_DATAUSAGE_ROUND_RECT_COLOR_RED, + SETTING_DATAUSAGE_ROUND_RECT_COLOR_GREEN, + SETTING_DATAUSAGE_ROUND_RECT_COLOR_BLUE); + } + __setting_datausage_main_triangle_draw(ad, width); + __setting_datausage_main_text_in_round_rect_draw(ad); + + evas_object_image_size_set(pie_image_object, cairo_w, cairo_h); + evas_object_image_data_set(pie_image_object, cairo_image_surface_get_data(ad->limit_cairo_surface)); + evas_object_image_fill_set(pie_image_object, 0, 0, cairo_w, cairo_h); +} + +static void __setting_datausage_main_dismissed_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *)data; + + if(ad->ctxpopup) { + evas_object_del(ad->ctxpopup); + ad->ctxpopup = NULL; + } +} + +static void __setting_datausage_main_move_ctxpopup(Evas_Object *ctxpopup, Evas_Object *btn) +{ + Evas_Coord x, y, w , h; + evas_object_geometry_get(btn, &x, &y, &w, &h); + evas_object_move(ctxpopup, x + (w / 2), y + (h /2)); +} + +static void __setting_datausage_main_timepicker_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *)data; + setting_retm_if(ad->starting_date == NULL, "ad->starting_date is NULL"); + + const char *label = elm_object_item_text_get((Elm_Object_Item *) event_info); + setting_retm_if(label == NULL, "label is NULL"); + + const char *btn_label = elm_object_text_get(ad->starting_date->eo_check); + if(!safeStrCmp(label, btn_label)) { + SETTING_TRACE("Not changed"); + return; + } else { + SETTING_TRACE("text(%s) is clicked!", label); + elm_object_text_set(ad->starting_date->eo_check, label); + + int starting_date = (int)g_ascii_strtod(label, NULL); + setting_retm_if(errno == ERANGE, "fail to call g_ascii_strtod"); + + int err = 0; + int ret = setting_set_int_slp_key(INT_SLP_SETTING_DATAUSAGE_DATA_EACH_MONTH_INT, starting_date, &err); + setting_retm_if(ret != 0, "set vconf failed"); + + if(ad->ctxpopup) { + evas_object_del(ad->ctxpopup); + ad->ctxpopup = NULL; + } + } +} + +static void __setting_datausage_main_create_ctxpopup_timepicker(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *) data; + SettingDatausageUG *ad = (SettingDatausageUG *)item_data->userdata; + + int idx = 0; + Evas_Object *diskselector = NULL; + Elm_Object_Item *item = NULL; + + if(ad->ctxpopup) { + evas_object_del(ad->ctxpopup); + ad->ctxpopup = NULL; + } + + Evas_Coord w = 0; + evas_object_geometry_get(ad->win_get, NULL, NULL, &w, NULL); + + ad->ctxpopup = elm_ctxpopup_add(ad->navibar); + elm_object_style_set(ad->ctxpopup, "timepicker"); + evas_object_size_hint_min_set(ad->ctxpopup, w, -1); + evas_object_size_hint_weight_set(ad->ctxpopup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_smart_callback_add(ad->ctxpopup, "dismissed", __setting_datausage_main_dismissed_cb, ad); + + diskselector = elm_diskselector_add(ad->navibar); + elm_diskselector_display_item_num_set(diskselector, 8); + elm_object_style_set(diskselector, "timepicker"); + + int value = 0; + int err = 0; + int ret = setting_get_int_slp_key(INT_SLP_SETTING_DATAUSAGE_DATA_EACH_MONTH_INT, &value, &err); + if (ret != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + + int value_to_idx = value - 1; + for(idx = 0; idx < sizeof(days_in_month) / sizeof(days_in_month[0]); idx++) { + if(value_to_idx == idx) { + item = elm_diskselector_item_append(diskselector, days_in_month[idx], NULL, + __setting_datausage_main_timepicker_cb, ad); + } else { + elm_diskselector_item_append(diskselector, days_in_month[idx], NULL, + __setting_datausage_main_timepicker_cb, ad); + } + } + + if(item != NULL) { + elm_diskselector_item_selected_set(item, EINA_TRUE); + } + + elm_diskselector_round_enabled_set(diskselector, EINA_TRUE); + evas_object_size_hint_weight_set(diskselector, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(diskselector, EVAS_HINT_FILL, EVAS_HINT_FILL); + + evas_object_show(diskselector); + elm_object_content_set(ad->ctxpopup, diskselector); + + elm_ctxpopup_direction_priority_set(ad->ctxpopup, + ELM_CTXPOPUP_DIRECTION_DOWN, + ELM_CTXPOPUP_DIRECTION_UP, + ELM_CTXPOPUP_DIRECTION_LEFT, + ELM_CTXPOPUP_DIRECTION_RIGHT); + + __setting_datausage_main_move_ctxpopup(ad->ctxpopup, obj); + evas_object_show(ad->ctxpopup); +} + +static char *_item_label_get(void *data, Evas_Object *obj, const char *part) +{ + //SETTING_TRACE_BEGIN; + setting_retvm_if(data == NULL, NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *) data; + + if (!safeStrCmp(part, "elm.text") || !safeStrCmp(part, "elm.text.1")) { + if (item_data->keyStr) { + return (char *)g_strdup(_(item_data->keyStr)); + } + } else { + if (item_data->sub_desc) { + return (char *)g_strdup(_(item_data->sub_desc)); + } + } + + return NULL; +} + +static Evas_Object *_item_content_get(void *data, Evas_Object *obj, const char *part) +{ + //SETTING_TRACE_BEGIN; + setting_retvm_if(data == NULL, NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *) data; + int width = 0; + evas_object_geometry_get(obj, NULL, NULL, &width, NULL); + + if (!safeStrCmp(part, "elm.icon")) { + if (!safeStrCmp(item_data->keyStr, "limit_graph")) { + Evas_Object *sub_layout = elm_layout_add(obj); + elm_layout_file_set(sub_layout, SETTING_THEME_EDJ_NAME, "screen_mode"); + evas_object_size_hint_weight_set(sub_layout, EVAS_HINT_EXPAND, 0.0); + + __setting_datausage_main_limit_graph(sub_layout, "content", item_data->userdata); + setting_resize_object(sub_layout, width - 40, SETTING_DATAUSAGE_GRAPH_H); + evas_object_show(sub_layout); + return sub_layout; + } else if (!safeStrCmp(item_data->keyStr, "graph_image")) { + Evas_Object *sub_layout = elm_layout_add(obj); + elm_layout_file_set(sub_layout, SETTING_THEME_EDJ_NAME, "screen_mode"); + evas_object_size_hint_weight_set(sub_layout, EVAS_HINT_EXPAND, 0.0); + + __setting_datausage_main_pie_graph(sub_layout, "content", item_data->userdata); + setting_resize_object(sub_layout, width - 40, SETTING_DATAUSAGE_GRAPH_H); + evas_object_show(sub_layout); + return sub_layout; + } else { + int offset = 50; + + Evas_Object *label = NULL; + label = elm_label_add(obj); + evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, 0.0); + elm_label_line_wrap_set(label, EINA_TRUE); + elm_label_wrap_width_set(label, width - offset); + elm_object_text_set(label, _(item_data->keyStr)); + setting_resize_object(label, width - offset, 250); + evas_object_show(label); + return label; + } + } + + return NULL; +} + +static Evas_Object *_item_content_date_get(void *data, Evas_Object *obj, const char *part) +{ + //SETTING_TRACE_BEGIN; + setting_retvm_if(data == NULL, NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *) data; + + if (!safeStrCmp(part, "elm.icon")) { + Evas_Object *timepicker_btn = NULL; + timepicker_btn = elm_button_add(obj); + item_data->eo_check = timepicker_btn; + + int value = 0; + int err = 0; + int ret = setting_get_int_slp_key(INT_SLP_SETTING_DATAUSAGE_DATA_EACH_MONTH_INT, &value, &err); + if (ret != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + + int count = sizeof(days_in_month) / sizeof(days_in_month[0]); + + int value_to_idx = value - 1; + + if (value_to_idx >= 0 && value_to_idx < count) { + elm_object_text_set(timepicker_btn, days_in_month[value_to_idx]); + } else { + elm_object_text_set(timepicker_btn, days_in_month[0]); + } + + evas_object_smart_callback_add(timepicker_btn, "clicked", __setting_datausage_main_create_ctxpopup_timepicker, item_data); + + return timepicker_btn; + } + + return NULL; +} + +static Evas_Object *_item_content3_get(void *data, Evas_Object *obj, const char *part) +{ + setting_retvm_if(data == NULL, NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *) data; + + if (!strcmp(part, "elm.icon")) { + Evas_Object *progressbar = NULL; + progressbar = elm_progressbar_add(obj); + elm_object_style_set(progressbar, "list_progress"); + elm_progressbar_horizontal_set(progressbar, EINA_TRUE); + evas_object_size_hint_align_set(progressbar, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_size_hint_weight_set(progressbar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + + double percent = item_data->slider_min; + + //SETTING_TRACE("byte_size = %ld, percent = %f", byte_size, percent); + if (percent <= 0.01) { + percent = 0.01; + } + + elm_progressbar_value_set(progressbar, percent); + + return progressbar; + } + return NULL; +} + +static void _item_del(void *data, Evas_Object *obj) +{ + setting_retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *) data; + if (item_data) { + G_FREE(item_data->keyStr); + G_FREE(item_data->sub_desc); + FREE(item_data); + } +} + +static void __entry_focused(void *data, Evas_Object *obj, void *event_info) // Focused callback will show X marked button and hide guidetext. +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "data is NULL"); + Evas_Object *entry_container = (Evas_Object *)data; + if (!elm_entry_is_empty(obj)) { + elm_object_signal_emit(entry_container, "elm,state,eraser,show", "elm"); + } + elm_object_signal_emit(entry_container, "elm,state,guidetext,hide", "elm"); +} +static void __eraser_clicked(void *data, Evas_Object *obj, const char *emission, const char *source) // When X marked button is clicked, empty entry's contents. +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "data is NULL"); + Evas_Object *entry = data; + elm_entry_entry_set(entry, ""); + elm_object_focus_set(entry, EINA_TRUE); +} + +static void __entry_changed(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(obj == NULL, "obj is NULL"); + + Evas_Object *entry_container = elm_object_parent_widget_get(obj); + if (entry_container) { + if (elm_entry_is_empty(obj)) { + //elm_object_signal_emit(entry_container, "elm,state,guidetext,show", "elm"); + elm_object_signal_emit(entry_container, "elm,state,eraser,hide", "elm"); + } else { + elm_object_signal_emit(entry_container, "elm,state,guidetext,hide", "elm"); + elm_object_signal_emit(entry_container, "elm,state,eraser,show", "elm"); + } + } +} + +static void __setting_datausage_main_cairo_destroy(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + if (ad->cr) { + cairo_destroy(ad->cr); + ad->cr = NULL; + } + if (ad->cairo_surface) { + cairo_surface_destroy(ad->cairo_surface); + ad->cairo_surface = NULL; + } +} + +static void __setting_datausage_main_limit_cairo_destroy(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + if (ad->limit_cr) { + cairo_destroy(ad->limit_cr); + ad->limit_cr = NULL; + } + if (ad->limit_cairo_surface) { + cairo_surface_destroy(ad->limit_cairo_surface); + ad->limit_cairo_surface = NULL; + } +} + +static void __setting_datausage_main_apps_list_destroy(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + if (ad->app_list) { + Eina_List *l = NULL; + rsml_perf_info *new_item; + EINA_LIST_FOREACH(ad->app_list, l, new_item) + { + FREE(new_item->interval); + G_FREE(new_item->app_id); + FREE(new_item); + } + eina_list_free(ad->app_list); + ad->app_list = NULL; + } +} + +static void __setting_datausage_main_popup_resp_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "data is NULL"); + int response_type = btn_type(obj); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + if (POPUP_RESPONSE_OK == response_type) { + setting_retm_if(ad->data_limit_entry == NULL, "ad->data_limit_entry is NULL"); + const char *text = elm_entry_entry_get(ad->data_limit_entry); + if (isEmptyStr(text)) { + SETTING_TRACE_DEBUG("text is NULL"); + return; + } + + int date_limit = (int)g_ascii_strtod(text, NULL); + setting_retm_if(errno == ERANGE, "fail to call g_ascii_strtod"); + + int err = 0; + int ret = setting_set_int_slp_key(INT_SLP_SETTING_DATAUSAGE_DATA_LIMIT_INT, date_limit, &err); + setting_retm_if(ret != 0, "set vconf failed"); + + setting_hide_input_pannel_cb(ad->data_limit_entry); + } else if (POPUP_RESPONSE_CANCEL == response_type) { + SETTING_TRACE("POPUP_RESPONSE_CANCEL"); + } + + if (ad->data_limit_conformant) { + evas_object_del(ad->data_limit_conformant); + ad->data_limit_conformant = NULL; + } + + if (ad->data_limit_popup) { + evas_object_del(ad->data_limit_popup); + ad->data_limit_popup = NULL; + } +} + +static void __setting_datausage_main_data_limit_popup(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + Evas_Object *popup = NULL; + Evas_Object *entry = NULL; + Evas_Object *btn1 = NULL; + Evas_Object *btn2 = NULL; + //Evas_Object *content = NULL; + + if (ad->data_limit_conformant) { + evas_object_del(ad->data_limit_conformant); + ad->data_limit_conformant = NULL; + } + //ad->data_limit_conformant = elm_conformant_add(ad->win_get); + //elm_win_conformant_set(ad->win_get, EINA_TRUE); + //elm_win_resize_object_add(ad->win_get, ad->data_limit_conformant); + //evas_object_size_hint_weight_set(ad->data_limit_conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + //evas_object_size_hint_align_set(ad->data_limit_conformant, EVAS_HINT_FILL, EVAS_HINT_FILL); + //evas_object_show(ad->data_limit_conformant); + + //content = elm_layout_add(ad->win_get); + //elm_object_content_set(ad->data_limit_conformant, content); + popup = elm_popup_add(ad->navibar); + elm_object_part_text_set(popup, "title,text", _(SETTING_DATAUSAGE_DATA_LIMIT_STR)); + + Evas_Object* pLy = elm_layout_add(popup); + elm_layout_theme_set(pLy, "layout", "application", "noindicator" ); + evas_object_size_hint_weight_set(pLy, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + + Evas_Object* pBg = elm_bg_add(pLy); + evas_object_size_hint_weight_set(pBg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_object_part_content_set(pLy, "elm.swallow.bg", pBg); + elm_bg_color_set(pBg, 255, 255, 255); + evas_object_show(pBg); + + Evas_Object *box = elm_box_add(popup); + elm_box_horizontal_set(box, EINA_TRUE); + + Evas_Object *editfiled = setting_create_editfiled(popup, NULL, NULL); + entry = elm_object_part_content_get(editfiled, "elm.swallow.content"); + ad->data_limit_entry = entry; + + elm_entry_single_line_set(entry, EINA_TRUE); + elm_entry_scrollable_set(entry, EINA_TRUE); + elm_entry_autocapital_type_set(entry, ELM_AUTOCAPITAL_TYPE_ALLCHARACTER); + elm_entry_input_panel_layout_set(entry, ELM_INPUT_PANEL_LAYOUT_NUMBERONLY); + + Elm_Entry_Filter_Limit_Size limit_filter_data; + limit_filter_data.max_char_count = 0; + limit_filter_data.max_byte_count = 5; + elm_entry_markup_filter_append(entry, elm_entry_filter_limit_size, &limit_filter_data); + + /* default handle */ + evas_object_smart_callback_add(entry, "changed", __entry_changed, NULL); + evas_object_smart_callback_add(entry, "focused", __entry_focused, editfiled); + elm_object_signal_callback_add(editfiled, "elm,eraser,clicked", "elm", __eraser_clicked, entry); + + elm_box_pack_end(box, editfiled); + + Evas_Object *label = elm_label_add(popup); + elm_object_text_set(label, "MB"); + evas_object_show(label); + elm_box_pack_end(box, label); + + evas_object_show(box); + + Evas_Object *content_layout = elm_layout_add(pLy); + elm_layout_file_set(content_layout, SETTING_THEME_EDJ_NAME, "custom_popup"); + evas_object_size_hint_weight_set(content_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_object_part_content_set(content_layout, "content", box); + + /* guide text */ + Evas_Object *guide_label = elm_label_add(popup); + evas_object_size_hint_weight_set(guide_label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(guide_label, 0.0, EVAS_HINT_FILL); + elm_label_line_wrap_set(guide_label, EINA_TRUE); + elm_label_wrap_width_set(guide_label, 530); + elm_object_text_set(guide_label, DATAUSAGE_POPUP_GUIDE_TEXT); + evas_object_show(guide_label); + elm_object_part_content_set(content_layout, "content2", guide_label); + + evas_object_show(content_layout); + + elm_object_part_content_set(pLy, "elm.swallow.content", content_layout); + evas_object_show(pLy); + + elm_object_content_set(popup, pLy); + + btn1 = elm_button_add(popup); + elm_object_text_set(btn1, _(KeyStr_Save)); + elm_object_part_content_set(popup, "button1", btn1); + elm_object_style_set(btn1, "popup_button/default"); + evas_object_smart_callback_add(btn1, "clicked", __setting_datausage_main_popup_resp_cb, ad); + + btn2 = elm_button_add(popup); + elm_object_text_set(btn2, _("IDS_COM_SK_CANCEL")); + elm_object_part_content_set(popup, "button2", btn2); + elm_object_style_set(btn2, "popup_button/default"); + evas_object_smart_callback_add(btn2, "clicked", __setting_datausage_main_popup_resp_cb, ad); + + evas_object_show(popup); + ad->data_limit_popup = popup; +} + +static int __setting_datausage_main_datausage_quota_set() +{ + int err = 0; + int ret = 0; + + int time_period = 0; + ret = setting_get_int_slp_key(INT_SLP_SETTING_DATAUSAGE_DATA_USAGE_CYCLE_INT, &time_period, &err); + setting_retvm_if(ret == -1, SETTING_RETURN_FAIL, "get vconf failed"); + + int data_limit = 0; + ret = setting_get_int_slp_key(INT_SLP_SETTING_DATAUSAGE_DATA_LIMIT_INT, &data_limit, &err); + setting_retvm_if(ret == -1, SETTING_RETURN_FAIL, "get vconf failed"); + + rsml_datausage_quota quota; + + switch(time_period) { + case 0: + quota.time_period = RESMAN_PERIOD_MONTH; + break; + case 1: + quota.time_period = RESMAN_PERIOD_WEEK; + break; + case 2: + quota.time_period = RESMAN_PERIOD_DAY; + break; + default: + quota.time_period = RESMAN_PERIOD_UNDEF; + break; + } + quota.snd_quota = data_limit; + quota.rcv_quota = data_limit; + quota.quota_type = RESMAN_STATE_UNKNOWN; + + SETTING_TRACE("quota.time_period = %d", quota.time_period); + SETTING_TRACE("quota.snd_quota = %d", quota.snd_quota); + SETTING_TRACE("quota.rcv_quota = %d", quota.rcv_quota); + SETTING_TRACE("quota.quota_type = %d", quota.quota_type); + + rsml_ret_c rsml_ret = set_datausage_quota(SETTING_PKG_NAME, "a); + SETTING_TRACE("rsml_ret = %d", rsml_ret); + setting_retvm_if(rsml_ret != RESMAN_ERROR_OK, SETTING_RETURN_FAIL, "fail to call set_datausage_quota"); + + return SETTING_RETURN_SUCCESS; +} + +static void __setting_datausage_main_mouse_up_Gendial_list_cb(void *data, Evas_Object * obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + int opposite = !list_item->chk_status; + + int err = 0; + int ret = 0; + + if (!safeStrCmp(SETTING_DATAUSAGE_SET_DATA_USAGE_LIMIT_STR, list_item->keyStr)) { + ret = setting_set_bool_slp_key(BOOL_SLP_SETTING_DATAUSAGE_SET_DATA_USAGE_LIMIT_BOOL, opposite, &err); + setting_retm_if(ret == -1, "set vconf failed"); + + elm_check_state_set(list_item->eo_check, opposite); + list_item->chk_status = opposite; + + /* if set_data_usage_limit's vconf is false, disable data_limit */ + if (!opposite) { + setting_disable_genlist_item(ad->data_limit->item); + + rsml_ret_c rsml_ret = remove_datausage_quota(SETTING_PKG_NAME); + if (rsml_ret != RESMAN_ERROR_OK) { + SETTING_TRACE_ERROR("fail to call remove_datausage_quota"); + } + + __setting_datausage_main_data_items_recreate(ad); + } else { + ret = __setting_datausage_main_datausage_quota_set(); + if (ret == SETTING_RETURN_FAIL) { + SETTING_TRACE_ERROR("failed to set datausage quota"); + } + + setting_enable_genlist_item(ad->data_limit->item); + + __setting_datausage_main_data_items_recreate(ad); + } + } else if (!safeStrCmp(SETTING_DATAUSAGE_DATA_LIMIT_STR, list_item->keyStr)) { + __setting_datausage_main_data_limit_popup(ad); + } else if (!safeStrCmp(KeyStr_UsePacketData, list_item->keyStr)) { + ret = setting_set_bool_slp_key(BOOL_SLP_SETTING_USE_PACKET_DATA, opposite, &err); + setting_retm_if(ret == -1, "set vconf failed"); + + elm_check_state_set(list_item->eo_check, opposite); + list_item->chk_status = opposite; + } +} + +static void __setting_datausage_main_chk_btn_cb(void *data, Evas_Object * obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + SettingDatausageUG *ad = NULL; + + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + ad = list_item->userdata; + list_item->chk_status = elm_check_state_get(obj); // for genlist update status + + int opposite = (list_item->chk_status == 1) ? SETTING_ON_OFF_BTN_ON : SETTING_ON_OFF_BTN_OFF; + + int err = -1; + int ret = -1; + + if (obj == ad->use_packet_data->eo_check) { + ret = setting_set_bool_slp_key(BOOL_SLP_SETTING_USE_PACKET_DATA, opposite, &err); + setting_retm_if(ret == -1, "set vconf failed"); + } else if (obj == ad->set_data_usage_limit->eo_check) { + ret = setting_set_bool_slp_key(BOOL_SLP_SETTING_DATAUSAGE_SET_DATA_USAGE_LIMIT_BOOL, opposite, &err); + setting_retm_if(ret == -1, "set vconf failed"); + + /* if set_data_usage_limit's vconf is false, disable data_limit */ + if (!opposite) { + rsml_ret_c rsml_ret = remove_datausage_quota(SETTING_PKG_NAME); + if (rsml_ret != RESMAN_ERROR_OK) { + SETTING_TRACE_ERROR("fail to call remove_datausage_quota"); + } + + __setting_datausage_main_data_items_recreate(ad); + + setting_disable_genlist_item(ad->data_limit->item); + } else { + ret = __setting_datausage_main_datausage_quota_set(); + if (ret == SETTING_RETURN_FAIL) { + SETTING_TRACE_ERROR("failed to set datausage quota"); + } + + setting_enable_genlist_item(ad->data_limit->item); + + __setting_datausage_main_data_items_recreate(ad); + } + } +} + +static char *__setting_datausage_main_data_usage_cycle_get() +{ + int value = 0; + int err = 0; + int ret = setting_get_int_slp_key(INT_SLP_SETTING_DATAUSAGE_DATA_USAGE_CYCLE_INT, &value, &err); + if (ret != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + + if (value >= 0 && value < 3) { + return (char *)data_usage_cycle_arr[value]; + } else { + return (char *)data_usage_cycle_arr[0]; + } +} + +static void __setting_datausage_main_maximum_get(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL,"Data parameter is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *)data; + + /* get the max data */ + unsigned long long maximum = ad->data_arr[0]; + + unsigned long long total = 0; + int i = 0; + for (; i < ad->data_arr_len; i++) { + if (ad->data_arr[i] > maximum) { + maximum = ad->data_arr[i]; + } + + total += ad->data_arr[i]; + } + + ad->total_size = total; + + /* get the left size */ + int date_limit = 0; + int err = 0; + int ret = setting_get_int_slp_key(INT_SLP_SETTING_DATAUSAGE_DATA_LIMIT_INT, &date_limit, &err); + setting_retm_if(ret != 0, "set vconf failed"); + + double date_limit_d = ((double)date_limit) * SETTING_DATAUSAGE_MEGABYTE_VALUE; + + if (date_limit_d <= ad->total_size) { + ad->left_size = 0; + } else { + ad->left_size = date_limit_d - ad->total_size; + } + + /*get maximum 10% more than the highest of data */ + SETTING_TRACE("maximum = %lld", maximum); + unsigned long long tmp = maximum + maximum * 0.1; + SETTING_TRACE("tmp = %lld", tmp); + + /* get the size xxMB */ + int tmp_size = 0; + tmp_size = (int)(tmp / SETTING_DATAUSAGE_MEGABYTE_VALUE); + SETTING_TRACE("tmp_size = %d", tmp_size); + + if (tmp_size <= 5) { + ad->maximum = 5; /* 5 MB */ + } else { + ad->maximum = tmp_size; + } +} + +static rsml_cb_ret __setting_datausage_main_apps_network_stats_get_cb(const rsml_perf_info *info, + void *user_data) +{ + Eina_List **list = (Eina_List **) user_data; + rsml_perf_info *new_item = (rsml_perf_info *)calloc(1, sizeof(rsml_perf_info)); + rsml_tm_interval *interval_copy = (rsml_tm_interval *)calloc(1, sizeof(rsml_tm_interval)); + char *app_id_copy = info->app_id ? g_strdup(info->app_id) : g_strdup(UNKNOWN_APP); + + *interval_copy = *(info->interval); + *new_item = *info; + new_item->app_id = app_id_copy; + new_item->interval = interval_copy; + + *list = eina_list_append(*list, new_item); + return RESMAN_CONTINUE; +} + +/** + * This function get the start day and the end day in current month + * @start : output param, start day in current month, according to the vconf 'starting date' + * @end: output param, end day in current month + * @return days between start and end + */ +static int __setting_datausage_main_days_in_month_get(time_t *start, time_t *end) +{ + int starting_date = 0; + int err = 0; + int ret = setting_get_int_slp_key(INT_SLP_SETTING_DATAUSAGE_DATA_EACH_MONTH_INT, &starting_date, &err); + if (ret != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + //SETTING_TRACE("starting date is %d", starting_data); + + time_t cur_time = time(0); + + struct tm start_date; + if (NULL == localtime_r(&cur_time, &start_date)) { + SETTING_TRACE_ERROR("fail to call localtime_r"); + return 0; + } + start_date.tm_mday = 1; /* set the first day in the month*/ + time_t from_time = mktime(&start_date); + + /* get the start day in the year */ + int from_yday = start_date.tm_yday; + SETTING_TRACE("start_data :%s", asctime(&start_date)); + SETTING_TRACE("from_yday :%d", from_yday); + + /* get the last day in current month, 2 step: + * 1. get the first day in next month, get the day in year; + * 2. the last day in current month = the day(in step 1) - 1; + */ + /* step 1 */ + struct tm tmp_date; + if (NULL == localtime_r(&from_time, &tmp_date)) { + SETTING_TRACE_ERROR("fail to call localtime_r"); + return 0; + } + int cur_month = tmp_date.tm_mon; + tmp_date.tm_mon = cur_month + 1; + time_t tmp_time = mktime(&tmp_date); + //SETTING_TRACE("tmp_data :%s", ctime(&tmp_time)); + + /* step 2 */ + struct tm end_date; + if (NULL == localtime_r(&tmp_time, &end_date)) { + SETTING_TRACE_ERROR("fail to call localtime_r"); + return 0; + } + int end_yday = end_date.tm_yday; + int end_month = end_date.tm_mon; + end_date.tm_mon = end_month - 1; + /* if end_yday < from_yday, means it is the day in next year, so the last month in the year must be Dec*/ + if (end_yday < from_yday) { + end_date.tm_mday = 31; /* Dec must have 31 days */ + } else { + end_date.tm_mday = end_yday - from_yday; + } + end_date.tm_hour = 23; + end_date.tm_min = 59; + end_date.tm_sec = 59; + time_t to_time = mktime(&end_date); + + start_date.tm_mday = starting_date; /* set the start day as vconf */ + start_date.tm_hour = 0; + start_date.tm_min = 0; + start_date.tm_sec = 0; + time_t start_time = mktime(&start_date); + + SETTING_TRACE("start_time :%s", ctime(&start_time)); + SETTING_TRACE("to_time :%s", ctime(&to_time)); + + if (start) { + *start = start_time; + } + if (end) { + *end = to_time; + } + + // days in current month + int day_in_month = end_date.tm_mday; + SETTING_TRACE("day_in_month :%d", day_in_month); + + int left_day = day_in_month - starting_date; + + return left_day > 0 ? left_day : 0; +} + +/** + * This function get the start day and the end day in current week + * @start : output param, start day in current week + * @end: output param, end day in current week + * @return days between start and end + */ +static int __setting_datausage_main_days_in_week_get(time_t *start, time_t *end) +{ + time_t cur_time = time(0); + + struct tm start_date; + if (NULL == localtime_r(&cur_time, &start_date)) { + SETTING_TRACE_ERROR("fail to call localtime_r"); + return 0; + } + int cur_wday = start_date.tm_wday; /* current day in week */ + int cur_mday = start_date.tm_mday; /* current day in month */ + + start_date.tm_mday = cur_mday - cur_wday; + start_date.tm_hour = 0; + start_date.tm_min = 0; + start_date.tm_sec = 0; + time_t from_time = mktime(&start_date); + + struct tm end_data; + if (NULL == localtime_r(&from_time, &end_data)) { + SETTING_TRACE_ERROR("fail to call localtime_r"); + return 0; + } + cur_mday = end_data.tm_mday; + end_data.tm_mday = cur_mday + 6; /* get the last day in current week */ + end_data.tm_hour = 23; + end_data.tm_min = 59; + end_data.tm_sec = 59; + time_t end_time = mktime(&end_data); + + SETTING_TRACE("from_time :%s", ctime(&from_time)); + SETTING_TRACE("end_time :%s", ctime(&end_time)); + + if (start) { + *start = from_time; + } + if (end) { + *end = end_time; + } + + return SETTING_DATAUSAGE_DAYS_IN_WEEK; +} + + +/** + * This function get the apps info in current month. + */ +static Eina_List * __setting_datausage_main_apps_info_in_cur_month_get(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(data == NULL, NULL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + time_t from_time; + time_t to_time; + int match_days = __setting_datausage_main_days_in_month_get(&from_time, &to_time); + + SETTING_TRACE("from_time :%s", ctime(&from_time)); + SETTING_TRACE("to_time :%s", ctime(&to_time)); + + Eina_List *list = NULL; + data_usage_selection_rule rule = { 0 }; + + /* if match_days is 0, means start day is same with end day*/ + match_days = match_days > 0 ? match_days : 1; + SETTING_TRACE("match_days :%d", match_days); + + rule.granularity = 3600 * 24 * match_days; + rule.iftype = ad->iftype; + rule.from = from_time; + rule.to = to_time; + + data_usage_foreach(&rule, __setting_datausage_main_apps_network_stats_get_cb, + (void *)&list); + + return list; +} + +static Eina_List * __setting_datausage_main_apps_info_in_cur_week_get(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(data == NULL, NULL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + time_t from_time; + time_t to_time; + int match_days = __setting_datausage_main_days_in_week_get(&from_time, &to_time); + + SETTING_TRACE("from_time :%s", ctime(&from_time)); + SETTING_TRACE("to_time :%s", ctime(&to_time)); + + Eina_List *list = NULL; + data_usage_selection_rule rule = { 0 }; + + rule.granularity = 3600 * 24 * match_days; + rule.iftype = ad->iftype; + rule.from = from_time; + rule.to = to_time; + + data_usage_foreach(&rule, __setting_datausage_main_apps_network_stats_get_cb, + (void *)&list); + + return list; +} + +static Eina_List * __setting_datausage_main_apps_info_in_cur_day_get(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(data == NULL, NULL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + time_t cur_time = time(0); + + struct tm start_date; + if (NULL == localtime_r(&cur_time, &start_date)) { + SETTING_TRACE_ERROR("fail to call localtime_r"); + return NULL; + } + start_date.tm_hour = 0; + start_date.tm_min = 0; + start_date.tm_sec = 0; + time_t from_time = mktime(&start_date); + SETTING_TRACE("start_data :%s", asctime(&start_date)); + + struct tm end_date; + if (NULL == localtime_r(&from_time, &end_date)) { + SETTING_TRACE_ERROR("fail to call localtime_r"); + return NULL; + } + end_date.tm_hour = 23; + end_date.tm_min = 59; + end_date.tm_sec = 59; + time_t end_time = mktime(&end_date); + SETTING_TRACE("end_time :%s", ctime(&end_time)); + + Eina_List *list = NULL; + data_usage_selection_rule rule = { 0 }; + + rule.granularity = 3600 * 24; + rule.iftype = ad->iftype; + rule.from = from_time; + rule.to = end_time; + + data_usage_foreach(&rule, __setting_datausage_main_apps_network_stats_get_cb, + (void *)&list); + + return list; +} + +static Eina_List *__setting_datausage_main_apps_network_stats_get(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(data == NULL, NULL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *)data; + + int err = 0; + int cycle = 0; + int ret = setting_get_int_slp_key(INT_SLP_SETTING_DATAUSAGE_DATA_USAGE_CYCLE_INT, &cycle, &err); + if (ret != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + + __setting_datausage_main_apps_list_destroy(ad); + + switch (cycle) { + case 0: /* month */ + return __setting_datausage_main_apps_info_in_cur_month_get(ad); + case 1: /* week */ + return __setting_datausage_main_apps_info_in_cur_week_get(ad); + case 2: /* day */ + return __setting_datausage_main_apps_info_in_cur_day_get(ad); + default: + /* do nothing */ + return NULL; + } +} + +static rsml_cb_ret __setting_datausage_main_data_get_cb(const rsml_perf_info *info, void *user_data) +{ + unsigned long long sum = 0; + sum += (unsigned long long)info->foreground.cnt.incoming_bytes; + sum += (unsigned long long)info->background.cnt.incoming_bytes; + + *((unsigned long long *)user_data) = sum; + return RESMAN_CONTINUE; +} + +/** + * This function get the data of per day in current month. + */ +static void __setting_datausage_main_days_info_in_cur_month_get(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + int starting_date = 0; + int err = 0; + int ret = setting_get_int_slp_key(INT_SLP_SETTING_DATAUSAGE_DATA_EACH_MONTH_INT, &starting_date, &err); + if (ret != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + //SETTING_TRACE("starting date is %d", starting_data); + + int days = __setting_datausage_main_days_in_month_get(NULL, NULL); + SETTING_TRACE("days is %d", days); + + ad->data_arr_len = days + 1; + int i = 0; + for (; i <= days; i++) { + if (i >= SETTING_DATAUSAGE_DAYS_IN_MONTH) { + break; + } + + time_t cur_time = time(0); + + struct tm start_date; + if (NULL == localtime_r(&cur_time, &start_date)) { + SETTING_TRACE_ERROR("fail to call localtime_r"); + return; + } + start_date.tm_mday = starting_date + i; /* set the start day as vonf value*/ + start_date.tm_hour = 0; + start_date.tm_min = 0; + start_date.tm_sec = 0; + time_t from_time = mktime(&start_date); + + struct tm end_date; + if (NULL == localtime_r(&from_time, &end_date)) { + SETTING_TRACE_ERROR("fail to call localtime_r"); + return; + } + end_date.tm_hour = 23; + end_date.tm_min = 59; + end_date.tm_sec = 59; + time_t to_time = mktime(&end_date); + + SETTING_TRACE("from_time :%s", ctime(&from_time)); + SETTING_TRACE("to_time :%s", ctime(&to_time)); + + unsigned long long cnt = 0; + data_usage_selection_rule rule = { 0 }; + + rule.granularity = 3600 * 24; + rule.iftype = ad->iftype; + rule.from = from_time; + rule.to = to_time; + + rsml_ret_c ret = data_usage_foreach(&rule, __setting_datausage_main_data_get_cb, + (void *)&cnt); + SETTING_TRACE("ret : %d, cnt : %lld", ret, cnt); + ad->data_arr[i] = cnt; + } +} + +/** + * This function get the data of per day in current week. + */ +static void __setting_datausage_main_days_info_in_cur_week_get(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + time_t cur_time = time(0); + + struct tm begin_date; + if (NULL == localtime_r(&cur_time, &begin_date)) { + SETTING_TRACE_ERROR("fail to call localtime_r"); + return; + } + int cur_wday = begin_date.tm_wday; /* current day in week */ + SETTING_TRACE("cur_wday :%d", cur_wday); + int cur_mday = begin_date.tm_mday; /* current day in month */ + + SETTING_TRACE("cur_mday :%d", cur_mday); + begin_date.tm_mday = cur_mday - cur_wday; + time_t begin_time = mktime(&begin_date); + SETTING_TRACE("from_time :%s", ctime(&begin_time)); + + int starting_date = cur_mday - cur_wday; + + ad->data_arr_len = SETTING_DATAUSAGE_DAYS_IN_WEEK; + int i = 0; + for (; i < ad->data_arr_len; i++) { + time_t cur_time = time(0); + + struct tm start_date; + if (NULL == localtime_r(&cur_time, &start_date)) { + SETTING_TRACE_ERROR("fail to call localtime_r"); + return; + } + start_date.tm_mday = starting_date + i; /* set the start day as vonf value*/ + start_date.tm_hour = 0; + start_date.tm_min = 0; + start_date.tm_sec = 0; + time_t from_time = mktime(&start_date); + + struct tm end_date; + if (NULL == localtime_r(&from_time, &end_date)) { + SETTING_TRACE_ERROR("fail to call localtime_r"); + return; + } + end_date.tm_hour = 23; + end_date.tm_min = 59; + end_date.tm_sec = 59; + time_t to_time = mktime(&end_date); + + SETTING_TRACE("from_time :%s", ctime(&from_time)); + SETTING_TRACE("to_time :%s", ctime(&to_time)); + + unsigned long long cnt = 0; + data_usage_selection_rule rule = { 0 }; + + rule.granularity = 3600 * 24; + rule.iftype = ad->iftype; + rule.from = from_time; + rule.to = to_time; + + rsml_ret_c ret = data_usage_foreach(&rule, __setting_datausage_main_data_get_cb, + (void *)&cnt); + SETTING_TRACE("ret : %d", ret); + ad->data_arr[i] = cnt; + } +} + +/** + * This function get the data of per day in current week. + */ +static void __setting_datausage_main_hours_info_in_cur_day_get(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + time_t cur_time = time(0); + + ad->data_arr_len = SETTING_DATAUSAGE_HOURS_IN_DAY; + int i = 0; + for (; i < ad->data_arr_len; i++) { + struct tm start; + if (NULL == localtime_r(&cur_time, &start)) { + SETTING_TRACE_ERROR("fail to call localtime_r"); + return; + } + start.tm_hour = i; + start.tm_min = 0; + start.tm_sec = 0; + time_t from_time = mktime(&start); + + struct tm end; + if (NULL == localtime_r(&from_time, &end)) { + SETTING_TRACE_ERROR("fail to call localtime_r"); + return; + } + end.tm_hour = i; + end.tm_min = 59; + end.tm_sec = 59; + time_t to_time = mktime(&end); + + SETTING_TRACE("from_time :%s", ctime(&from_time)); + SETTING_TRACE("to_time :%s", ctime(&to_time)); + + unsigned long long cnt = 0; + data_usage_selection_rule rule = { 0 }; + + rule.granularity = 3600; + rule.iftype = ad->iftype; + rule.from = from_time; + rule.to = to_time; + + rsml_ret_c ret = data_usage_foreach(&rule, __setting_datausage_main_data_get_cb, + (void *)&cnt); + SETTING_TRACE("ret : %d", ret); + ad->data_arr[i] = cnt; + } +} + + +/** + * This function will get the data + * 1. If "Data usage cycle" is month, get the data of per day in current month + * 2. If "Data usage cycle" is week, get the data of per day in current week + * 3. If "Data usage cycle" is day, get the data of per hour in current day + * 'Starting date" is only activated when user selected "Month". + * So If user selected starting date by 1, graph shows on every month that day. + */ +static void __setting_datausage_main_data_stats_get(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == data, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + int err = 0; + int cycle = 0; + int ret = setting_get_int_slp_key(INT_SLP_SETTING_DATAUSAGE_DATA_USAGE_CYCLE_INT, &cycle, &err); + if (ret != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + + switch (cycle) { + case 0: /* month */ + __setting_datausage_main_days_info_in_cur_month_get(ad); + return; + case 1: /* week */ + __setting_datausage_main_days_info_in_cur_week_get(ad); + return; + case 2: /* day */ + __setting_datausage_main_hours_info_in_cur_day_get(ad); + return; + default: + /* do nothing */ + return; + } +} + + +static void __setting_datausage_main_app_list_item_append(rsml_perf_info *pNode, void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == data, "data is NULL"); + setting_retm_if(NULL == pNode, "pNode is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + unsigned long long byte_size = 0; + byte_size += pNode->foreground.cnt.outgoing_bytes; + byte_size += pNode->foreground.cnt.incoming_bytes; + char size[MAX_DISPLAY_NAME_LEN_ON_UI] = {0,}; + __setting_datausage_main_size_transition(byte_size, size); + //SETTING_TRACE("pkg = %s, size = %s ", pNode->app_id, size); + + double percent = (double)byte_size / ad->apps_total_size; + char desc[MAX_DISPLAY_NAME_LEN_ON_UI] = {0,}; + snprintf(desc, MAX_DISPLAY_NAME_LEN_ON_UI, "%s/%4.2lf%%", size, percent * 100); + + Setting_GenGroupItem_Data *item_data = NULL; + item_data = (Setting_GenGroupItem_Data *) calloc(1, sizeof(Setting_GenGroupItem_Data)); + setting_retm_if(!item_data, "calloc failed"); + + if (item_data) { + item_data->keyStr = (char *)g_strdup(pNode->app_id); + item_data->sub_desc = (char *)g_strdup(desc); + item_data->userdata = pNode; + item_data->slider_min = percent; /* use slider_min to store the percent here */ + item_data->item = elm_genlist_item_append(ad->genlist, &(ad->itc_2text_1icon_4), item_data, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("item_data is NULL"); + } + +} + +static Eina_Bool __setting_datausage_main_animator_cb(void *data) +{ + //SETTING_TRACE_BEGIN; + setting_retvm_if(NULL == data, ECORE_CALLBACK_CANCEL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + int count = eina_list_count(ad->app_list); + + //SETTING_TRACE("app_list_index= %d", ad->app_list_index); + if (ad->app_list_index >= count) { + if (ad->animator) { + ecore_animator_del(ad->animator); + ad->animator = NULL; + } + + Elm_Object_Item *item = NULL; + item = elm_genlist_item_append(ad->genlist, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + return ECORE_CALLBACK_CANCEL; + } + + int i = ad->app_list_index++; + + rsml_perf_info *pNode = NULL; + pNode = (rsml_perf_info *)eina_list_nth(ad->app_list, i); + setting_retvm_if(NULL == pNode, ECORE_CALLBACK_RENEW, "pNode is NULL"); + + __setting_datausage_main_app_list_item_append(pNode, ad); + return ECORE_CALLBACK_RENEW; +} + +static void __setting_datausage_main_date_desc_get(char *desc) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == desc, "desc is NULL"); + + int err = 0; + int cycle = 0; + int ret = setting_get_int_slp_key(INT_SLP_SETTING_DATAUSAGE_DATA_USAGE_CYCLE_INT, &cycle, &err); + if (ret != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + + time_t from_time; + time_t to_time; + switch (cycle) { + case 0: /* month */ + { + __setting_datausage_main_days_in_month_get(&from_time, &to_time); + break; + } + case 1: /* week */ + { + __setting_datausage_main_days_in_week_get(&from_time, &to_time); + break; + } + case 2: /* day */ + { + from_time = time(0); + to_time = time(0); + break; + } + default: + { + /* do nothing */ + SETTING_TRACE_ERROR("wrong data usage cycle"); + return; + } + } + + struct tm start_date; + if (NULL == localtime_r(&from_time, &start_date)) { + SETTING_TRACE_ERROR("fail to call localtime_r"); + return; + } + + struct tm end_date; + if (NULL == localtime_r(&to_time, &end_date)) { + SETTING_TRACE_ERROR("fail to call localtime_r"); + return; + } + + char start_date_desc[MAX_DISPLAY_NAME_LEN_ON_UI] = {0,}; + strftime(start_date_desc, MAX_DISPLAY_NAME_LEN_ON_UI, "%b", &start_date); + + int start_day = start_date.tm_mday; + int end_day = end_date.tm_mday; + + if (start_day == end_day) { + snprintf(desc, MAX_DISPLAY_NAME_LEN_ON_UI, "%s %d", start_date_desc, start_day); + } else { + snprintf(desc, MAX_DISPLAY_NAME_LEN_ON_UI, "%s %d-%d", start_date_desc, start_day, end_day); + } +} + +static void __setting_datausage_main_data_items_append(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *)data; + Elm_Object_Item *item = NULL; + + __setting_datausage_main_data_stats_get(ad); + __setting_datausage_main_maximum_get(ad); + + int value = 0; + int err = 0; + int ret = 0; + + ret = setting_get_bool_slp_key(BOOL_SLP_SETTING_DATAUSAGE_SET_DATA_USAGE_LIMIT_BOOL, &value, &err); + if (ret != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + + if (value && ad->iftype == RESMAN_IFACE_DATACALL) { + /* limit graph */ + ad->limit_graph = (Setting_GenGroupItem_Data *) calloc(1, sizeof(Setting_GenGroupItem_Data)); + setting_retm_if(!ad->limit_graph, "calloc failed"); + + if (ad->limit_graph) { + ad->limit_graph->userdata = ad; + ad->limit_graph->keyStr = (char *)g_strdup("limit_graph"); + ad->limit_graph->item = elm_genlist_item_append(ad->genlist, &(ad->itc_variable_height), ad->limit_graph, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(ad->limit_graph->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("ad->limit_graph is NULL"); + return; + } + } + + /* graph image */ + ad->graph_image = (Setting_GenGroupItem_Data *) calloc(1, sizeof(Setting_GenGroupItem_Data)); + setting_retm_if(!ad->graph_image, "calloc failed"); + + if (ad->graph_image) { + ad->graph_image->userdata = ad; + ad->graph_image->keyStr = (char *)g_strdup("graph_image"); + ad->graph_image->item = elm_genlist_item_append(ad->genlist, &(ad->itc_variable_height), ad->graph_image, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(ad->graph_image->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("ad->graph_image is NULL"); + return; + } + + /* description */ + char date_info[MAX_DISPLAY_NAME_LEN_ON_UI] = {0}; + __setting_datausage_main_date_desc_get(date_info); + + char used_size[MAX_DISPLAY_NAME_LEN_ON_UI] = {0}; + __setting_datausage_main_size_transition(ad->total_size, used_size); + + char used_str[SETTING_DATAUSAGE_DESC_LEN_MAX + 1] = {0,}; + snprintf(used_str, SETTING_DATAUSAGE_DESC_LEN_MAX, SETTING_DATAUSAGE_GRAPH_DESC_STR, + date_info, used_size); + + char desc_str[2 * SETTING_DATAUSAGE_DESC_LEN_MAX + 1] = {0,}; + snprintf(desc_str, 2 * SETTING_DATAUSAGE_DESC_LEN_MAX, "%s

%s
", + used_str, _(SETTING_DATAUSAGE_DESC_STR)); + ad->graph_desc = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_variable_height), NULL, + ad, SWALLOW_Type_INVALID, + NULL, NULL, 0, desc_str, NULL, + NULL); + if (ad->graph_desc) { + ad->graph_desc->userdata = ad; + elm_genlist_item_select_mode_set(ad->graph_desc->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("ad->graph_desc is NULL"); + return; + } + + Eina_List *app_list = __setting_datausage_main_apps_network_stats_get(ad); + ad->app_list = app_list; + + int count = eina_list_count(ad->app_list); + SETTING_TRACE("count = %d", eina_list_count(ad->app_list)); + + ad->app_list_index = 0; + + /* calculate the total size of all apps */ + ad->apps_total_size = 0; + Eina_List *l = NULL; + rsml_perf_info *new_item; + EINA_LIST_FOREACH(ad->app_list, l, new_item) + { + ad->apps_total_size += new_item->foreground.cnt.outgoing_bytes; + ad->apps_total_size += new_item->foreground.cnt.incoming_bytes; + } + + int i = 0; + for (; i < SETTING_DATAUSAGE_ANIMATOR_START_INDEX; i++) { + rsml_perf_info *pNode = NULL; + pNode = (rsml_perf_info *)eina_list_nth(ad->app_list, i); + if (pNode == NULL) + continue; + + __setting_datausage_main_app_list_item_append(pNode, ad); + } + + ad->app_list_index = i; + + if(count > SETTING_DATAUSAGE_ANIMATOR_START_INDEX) { + /* to continue adding items using animator */ + if (ad->animator) { + ecore_animator_del(ad->animator); + ad->animator = NULL; + } + ad->animator = ecore_animator_add(__setting_datausage_main_animator_cb, ad); + } else if (count <= SETTING_DATAUSAGE_ANIMATOR_START_INDEX && count > 0) { + item = elm_genlist_item_append(ad->genlist, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + Setting_GenGroupItem_Data *no_app_item = NULL; + no_app_item = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_1text), + NULL, + NULL, SWALLOW_Type_INVALID, NULL, + NULL, 0, SETTING_DATAUSAGE_NO_APPS_USE_DATA_STR, + NULL, NULL); + if (no_app_item) { + setting_disable_genlist_item(no_app_item->item); + } else { + SETTING_TRACE_ERROR("no_app_item is NULL"); + return; + } + + item = elm_genlist_item_append(ad->genlist, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } +} + +static void __setting_datausage_main_data_items_recreate(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *)data; + + /* delete all data items in genlist */ + setting_retm_if(ad->starting_date == NULL, "ad->starting_date is NULL"); + Elm_Object_Item *item = elm_genlist_item_next_get(ad->starting_date->item); + while (item) { + elm_object_item_del(item); + item = elm_genlist_item_next_get(ad->starting_date->item); + } + + __setting_datausage_main_cairo_destroy(ad); + __setting_datausage_main_limit_cairo_destroy(ad); + + /* recreate the data items in genlist */ + __setting_datausage_main_data_items_append(ad); +} + +static void __setting_datausage_main_common_list_create(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *)data; + + Elm_Object_Item *item = NULL; + item = elm_genlist_item_append(ad->genlist, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* Data usage cycle */ + ad->data_usage_cycle = setting_create_Gendial_exp_parent_field(ad->genlist, + &(ad->itc_2text_3_parent), + NULL, NULL, + SWALLOW_Type_INVALID, + SETTING_DATAUSAGE_DATA_USAGE_CYCLE_STR, + __setting_datausage_main_data_usage_cycle_get()); + if (ad->data_usage_cycle) { + ad->data_usage_cycle->userdata = ad; + ad->data_usage_cycle->int_slp_setting_binded = INT_SLP_SETTING_DATAUSAGE_DATA_USAGE_CYCLE_INT; + } else { + SETTING_TRACE_ERROR("ad->data_usage_cycle is NULL"); + return; + } + + /* Starting date */ + ad->itc_1text_1icon_date.item_style = "dialogue/1text.1icon"; + ad->itc_1text_1icon_date.func.text_get = _item_label_get; + ad->itc_1text_1icon_date.func.content_get = _item_content_date_get; + ad->itc_1text_1icon_date.func.state_get = NULL; + ad->itc_1text_1icon_date.func.del = _item_del; + + Setting_GenGroupItem_Data *starting_date = (Setting_GenGroupItem_Data *)calloc(1, sizeof(Setting_GenGroupItem_Data)); + setting_retm_if(!starting_date, "calloc failed"); + ad->starting_date = starting_date; + starting_date->userdata = ad; + starting_date->keyStr = (char *)g_strdup(SETTING_DATAUSAGE_STARTING_DATE_STR); + + starting_date->item = elm_genlist_item_append(ad->genlist, &(ad->itc_1text_1icon_date), starting_date, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(starting_date->item, ELM_OBJECT_SELECT_MODE_NONE); + + __setting_datausage_main_data_items_append(ad); +} + + +static void __setting_datausage_main_mobile_list_create(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *)data; + + elm_genlist_clear(ad->genlist); /* first to clear list */ + + __setting_datausage_main_cairo_destroy(ad); + __setting_datausage_main_limit_cairo_destroy(ad); + + Elm_Object_Item *item = NULL; + item = elm_genlist_item_append(ad->genlist, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + int value = 0; + int err = 0; + int ret = 0; + + /* Use packet data - ON/OFF */ + ret = setting_get_bool_slp_key(BOOL_SLP_SETTING_USE_PACKET_DATA, &value, &err); + if (ret != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + ad->use_packet_data = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_1text_1icon), + __setting_datausage_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, value, + KeyStr_UsePacketData, NULL, + __setting_datausage_main_chk_btn_cb); + if (ad->use_packet_data) { + ad->use_packet_data->userdata = ad; + + /* if flight mode is on, disable Use packet data */ + int value = 0; + int err = 0; + setting_get_bool_slp_key(BOOL_SLP_SETTING_FLIGHT_MODE, &value, &err); + if (value) { + setting_disable_genlist_item(ad->use_packet_data->item); + } + } else { + SETTING_TRACE_ERROR("ad->data_use_packet is NULL"); + return; + } + + /* Set data usage limit -ON/OFF */ + ret = setting_get_bool_slp_key(BOOL_SLP_SETTING_DATAUSAGE_SET_DATA_USAGE_LIMIT_BOOL, &value, &err); + if (ret != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + ad->set_data_usage_limit = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_1text_1icon), + __setting_datausage_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, value, SETTING_DATAUSAGE_SET_DATA_USAGE_LIMIT_STR, + NULL, __setting_datausage_main_chk_btn_cb); + if (ad->set_data_usage_limit) { + ad->set_data_usage_limit->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->set_data_usage_limit is NULL"); + return; + } + + /* Data limit */ + ad->data_limit = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_1text), + __setting_datausage_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, SETTING_DATAUSAGE_DATA_LIMIT_STR, + NULL, NULL); + if (ad->data_limit) { + ad->data_limit->userdata = ad; + + /* if set_data_usage_limit's vconf is false, disable data_limit */ + if (!value) { + setting_disable_genlist_item(ad->data_limit->item); + } + } else { + SETTING_TRACE_ERROR("ad->data_limit is NULL"); + return; + } + + __setting_datausage_main_common_list_create(ad); +} + +static void __setting_datausage_main_wifi_list_create(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *)data; + + elm_genlist_clear(ad->genlist); /* first to clear list */ + __setting_datausage_main_cairo_destroy(ad); + __setting_datausage_main_limit_cairo_destroy(ad); + + __setting_datausage_main_common_list_create(ad); +} + +static void _first_tab_cb(void* data, Evas_Object* obj, void* event_info) +{ + SettingDatausageUG *ad = (SettingDatausageUG *) data; + ad->iftype = RESMAN_IFACE_DATACALL; + __setting_datausage_main_mobile_list_create(ad); +} + +static void _second_tab_cb(void* data, Evas_Object* obj, void* event_info) +{ + SettingDatausageUG *ad = (SettingDatausageUG *) data; + ad->iftype = RESMAN_IFACE_WIFI; + __setting_datausage_main_wifi_list_create(ad); +} + +static void __setting_datausage_main_sub_list_sel_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + setting_retm_if(NULL == data, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + Elm_Object_Item *subitem = (Elm_Object_Item *) event_info; + Elm_Object_Item *parentItem = elm_genlist_item_parent_get(subitem); + elm_genlist_item_selected_set(subitem, 0); + Setting_GenGroupItem_Data *data_subItem = elm_object_item_data_get(subitem); + Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); /* parent data */ + ret_if(NULL == data_subItem || NULL == data_parentItem); + + elm_radio_value_set(data_subItem->rgd, data_subItem->chk_status); + int err = 0; + setting_set_int_slp_key(data_parentItem->int_slp_setting_binded, + data_subItem->chk_status, &err); + setting_retm_if(0 != err, "Set vconf error[%d]",data_parentItem->int_slp_setting_binded); + + data_parentItem->sub_desc = (char *)g_strdup(_(data_subItem->keyStr)); + elm_object_item_data_set(data_parentItem->item, data_parentItem); + elm_genlist_item_update(data_parentItem->item); + + /* recreate the data items in genlist */ + __setting_datausage_main_data_items_recreate(ad); +} + +static void __setting_datausage_main_exp_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == data, "data is NULL"); + setting_retm_if(NULL == event_info, "event_info is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + Elm_Object_Item *parentItem = event_info; /* parent item */ + + Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); /* parent data */ + Evas_Object *scroller = elm_object_item_widget_get(parentItem); + + Evas_Object *rgd = NULL; + if (data_parentItem == ad->data_usage_cycle) { + rgd = elm_radio_add(scroller); + elm_radio_value_set(rgd, -1); + + int i = 0; + while (data_usage_cycle_arr[i]) { + setting_create_Gendial_exp_sub_field(scroller, &(ad->itc_1icon_1text_sub), + __setting_datausage_main_sub_list_sel_cb, ad, + parentItem, SWALLOW_Type_1RADIO, rgd, + i, data_usage_cycle_arr[i], + NULL); + i++; + } + + setting_update_chk_status(rgd, data_parentItem->int_slp_setting_binded); + } +} + +static void __setting_datausage_main_vconf_change_cb(keynode_t *key, void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == key, "key is NULL"); + setting_retm_if(NULL == data, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *)data; + + int status = vconf_keynode_get_bool(key); + char *vconf_name = vconf_keynode_get_name(key); + + if (!safeStrCmp(vconf_name, VCONFKEY_SETAPPL_DATA_LIMIT_INT)) { + __setting_datausage_main_datausage_quota_set(); + __setting_datausage_main_data_items_recreate(ad); + } else if (!safeStrCmp(vconf_name, VCONFKEY_SETAPPL_DATA_EACH_MONTH_INT)) { + if (ad->iftype == RESMAN_IFACE_DATACALL) { + __setting_datausage_main_datausage_quota_set(); + } + + int err = 0; + int cycle = 0; + int ret = setting_get_int_slp_key(INT_SLP_SETTING_DATAUSAGE_DATA_USAGE_CYCLE_INT, &cycle, &err); + if (ret != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + + /* if cycle is not month, don't need to recreate the data items in genlist */ + if (cycle != 0) { + return; + } + + __setting_datausage_main_data_items_recreate(ad); + } else if (!safeStrCmp(vconf_name, VCONFKEY_TELEPHONY_FLIGHT_MODE)) { + if (ad->use_packet_data) { + if (status) { + setting_disable_genlist_item(ad->use_packet_data->item); + } else { + setting_enable_genlist_item(ad->use_packet_data->item); + } + } + } else { + SETTING_TRACE_ERROR("vconf_name is wrong"); + } +} + +/* *************************************************** + * + *basic func + * + ***************************************************/ +static int setting_datausage_main_create(void *cb) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER, "cb is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *) cb; + + ad->itc_variable_height.item_style = "1icon"; + ad->itc_variable_height.func.text_get = NULL; + ad->itc_variable_height.func.content_get = _item_content_get; + ad->itc_variable_height.func.state_get = NULL; + ad->itc_variable_height.func.del = _item_del; + + ad->itc_2text_1icon_4.item_style = "dialogue/2text.1icon.4"; + ad->itc_2text_1icon_4.func.text_get = _item_label_get; + ad->itc_2text_1icon_4.func.content_get = _item_content3_get; + ad->itc_2text_1icon_4.func.state_get = NULL; + ad->itc_2text_1icon_4.func.del = _item_del; + + Evas_Object *layout = setting_create_win_layout(ad->win_main_layout, ad->win_get); + setting_retvm_if(layout == NULL, SETTING_RETURN_FAIL, "layout is NULL"); + ad->ly_main = layout; + + /* create a navigation bar */ + ad->navibar = setting_create_navi_bar(layout); + + /* add controlbar */ + /* create a GenList */ + ad->genlist = elm_genlist_add(ad->navibar); + + if ( ! ad->genlist) + { + SETTING_TRACE(">>>>> ad->genlist is NULL "); + } + + elm_object_style_set(ad->genlist, "dialogue"); + setting_retvm_if(ad->genlist == NULL, SETTING_RETURN_FAIL, "genlist is NULL"); + + setting_enable_expandable_genlist(ad->genlist, ad, __setting_datausage_main_exp_cb, NULL); + + Elm_Object_Item *navi_it = NULL; + Evas_Object *l_button = NULL; + l_button = setting_create_button(ad->navibar, _("IDS_COM_BODY_BACK"), NAVI_BACK_BUTTON_STYLE, __setting_datausage_main_click_softkey_back_cb, ad); + + navi_it = elm_naviframe_item_push(ad->navibar, _(KeyStr_DataUsage), l_button, NULL, ad->genlist, "tabbar"); + if ( ! navi_it) + { + SETTING_TRACE(">>>>> navi_it is NULL "); + } + + ad->tabbar = elm_toolbar_add(ad->navibar); + if ( ! ad->tabbar ) + { + SETTING_TRACE(">>>> ad->tabbar is NULL"); + } + + elm_toolbar_shrink_mode_set(ad->tabbar, ELM_TOOLBAR_SHRINK_EXPAND); + elm_object_style_set(ad->tabbar, "tabbar"); + elm_toolbar_transverse_expanded_set(ad->tabbar, EINA_TRUE); + + elm_object_item_part_content_set(navi_it, "elm.swallow.tabbar", ad->tabbar); + + if (ad->tabbar) + { + ad->tabbar_item[0] = elm_toolbar_item_append(ad->tabbar, NULL, SETTING_DATAUSAGE_MOBILE_STR, _first_tab_cb,ad); + ad->tabbar_item[1] = elm_toolbar_item_append(ad->tabbar, NULL, _("IDS_ST_HEADER_WI_FI"), _second_tab_cb,ad); + elm_object_item_part_content_set(navi_it, "tabbar", ad->tabbar); + } + + elm_toolbar_select_mode_set(ad->tabbar, ELM_OBJECT_SELECT_MODE_ALWAYS); + elm_toolbar_item_selected_set(ad->tabbar_item[0], EINA_TRUE); + + int ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_DATA_LIMIT_INT, __setting_datausage_main_vconf_change_cb, ad); + if (ret != 0) { + SETTING_TRACE_ERROR("call vconf_notify_key_changed failed"); + } + + ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_DATA_EACH_MONTH_INT, + __setting_datausage_main_vconf_change_cb, ad); + if (ret != 0) { + SETTING_TRACE_ERROR("call vconf_notify_key_changed failed"); + } + + ret = vconf_notify_key_changed(VCONFKEY_TELEPHONY_FLIGHT_MODE, + __setting_datausage_main_vconf_change_cb, ad); + if (ret != 0) { + SETTING_TRACE_ERROR("call vconf_notify_key_changed failed"); + } + + setting_view_datausage_main.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int setting_datausage_main_destroy(void *cb) +{ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SettingDatausageUG *ad = (SettingDatausageUG *) cb; + + int ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_DATA_LIMIT_INT, + __setting_datausage_main_vconf_change_cb); + if (ret != 0) { + SETTING_TRACE_ERROR("call vconf_ignore_key_changed failed"); + } + + ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_DATA_EACH_MONTH_INT, + __setting_datausage_main_vconf_change_cb); + if (ret != 0) { + SETTING_TRACE_ERROR("call vconf_ignore_key_changed failed"); + } + + ret = vconf_ignore_key_changed(VCONFKEY_TELEPHONY_FLIGHT_MODE, + __setting_datausage_main_vconf_change_cb); + if (ret != 0) { + SETTING_TRACE_ERROR("call vconf_ignore_key_changed failed"); + } + + __setting_datausage_main_apps_list_destroy(ad); + + if (ad->animator) { + ecore_animator_del(ad->animator); + ad->animator = NULL; + } + + if (ad->ctxpopup) { + evas_object_del(ad->ctxpopup); + ad->ctxpopup = NULL; + } + + if (ad->data_limit_conformant) { + evas_object_del(ad->data_limit_conformant); + ad->data_limit_conformant = NULL; + } + + if (ad->data_limit_popup) { + evas_object_del(ad->data_limit_popup); + ad->data_limit_popup = NULL; + } + + __setting_datausage_main_cairo_destroy(ad); + __setting_datausage_main_limit_cairo_destroy(ad); + + if (ad->tabbar) + { + evas_object_del(ad->tabbar); + ad->tabbar = NULL; + } + + if (ad->ly_main) { + evas_object_del(ad->ly_main); + ad->ly_main = NULL; + setting_view_datausage_main.is_create = 0; + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_datausage_main_update(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingDatausageUG *ad = (SettingDatausageUG *) cb; + + if (ad->ly_main) { + evas_object_show(ad->ly_main); + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_datausage_main_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingDatausageUG *ad = (SettingDatausageUG *) cb; + + if (ad->ly_main) { + evas_object_hide(ad->ly_main); + } + + return SETTING_RETURN_SUCCESS; +} + +static void __setting_datausage_main_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + ret_if(data == NULL); + + SettingDatausageUG *ad = (SettingDatausageUG *) data; + /* Send destroy request */ + ug_destroy_me(ad->ug); +} diff --git a/setting-datausage/src/setting-datausage-more-setting.c b/setting-datausage/src/setting-datausage-more-setting.c new file mode 100755 index 0000000..5d2d1c4 --- /dev/null +++ b/setting-datausage/src/setting-datausage-more-setting.c @@ -0,0 +1,228 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include + +static int __setting_datausage_more_setting_create(void *cb); +static int __setting_datausage_more_setting_destroy(void *cb); +static int __setting_datausage_more_setting_update(void *cb); +static int __setting_datausage_more_setting_cleanup(void *cb); + +setting_view setting_view_datausage_more_setting = { + .create = __setting_datausage_more_setting_create, + .destroy = __setting_datausage_more_setting_destroy, + .update = __setting_datausage_more_setting_update, + .cleanup = __setting_datausage_more_setting_cleanup, +}; + +static void __setting_datausage_more_setting_chk_btn_cb(void *data, Evas_Object * obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + //error check + retm_if(data == NULL, "Data parameter is NULL"); + SettingDatausageUG *ad = NULL; + + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + ad = list_item->userdata; + list_item->chk_status = elm_check_state_get(obj); // for genlist update status + + int opposite = (list_item->chk_status == 1) ? SETTING_ON_OFF_BTN_ON : SETTING_ON_OFF_BTN_OFF; + + int err = -1; + int ret = -1; + + if (obj == ad->data_roaming->eo_check) { + ret = setting_set_bool_slp_key(BOOL_SLP_SETTING_DATA_ROAMING, opposite, &err); + setting_retm_if(ret == -1, "set vconf failed"); + } else if (obj == ad->restrict_bg->eo_check) { + ret = setting_set_bool_slp_key(BOOL_SLP_SETTING_DATAUSAGE_RESTRICT_BG_DATA_BOOL, opposite, &err); + setting_retm_if(ret == -1, "set vconf failed"); + } else if (obj == ad->show_wifi->eo_check) { + ret = setting_set_bool_slp_key(BOOL_SLP_SETTING_DATAUSAGE_SHOW_WIFI_USAGE_BOOL, opposite, &err); + setting_retm_if(ret == -1, "set vconf failed"); + } +} + + +/* *************************************************** +** +** basic func +** +** **************************************************/ + +static int __setting_datausage_more_setting_create(void *cb) +{ + SETTING_TRACE_BEGIN; + //error check + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingDatausageUG *ad = (SettingDatausageUG *) cb; + Evas_Object *scroller; + + setting_push_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _(SETTING_DATAUSAGE_MORE_SETTING_STR), + _("IDS_COM_BODY_BACK"), + NULL, + __setting_datausage_more_setting_back_cb, + NULL, + ad, &scroller, ad->navibar); + + setting_retvm_if(scroller == NULL, SETTING_RETURN_FAIL, "scroller is NULL"); + + Elm_Object_Item *item = NULL;; + + item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + int value = 0; + int err = 0; + + // Data roaming - ON/OFF + setting_get_bool_slp_key(BOOL_SLP_SETTING_DATA_ROAMING, &value, &err); + if (err != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + ad->data_roaming = setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + __setting_datausage_more_setting_mouse_up_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, value, SETTING_DATAUSAGE_DATA_ROAMING_STR, + NULL, __setting_datausage_more_setting_chk_btn_cb); + if (ad->data_roaming) { + ad->data_roaming->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_roaming is NULL"); + return SETTING_RETURN_FAIL; + } + + // Restrict background data - ON/OFF + setting_get_bool_slp_key(BOOL_SLP_SETTING_DATAUSAGE_RESTRICT_BG_DATA_BOOL, &value, &err); + if (err != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + ad->restrict_bg = setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + __setting_datausage_more_setting_mouse_up_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, value, SETTING_DATAUSAGE_RESTRICT_BACKGROUND_STR, + NULL, __setting_datausage_more_setting_chk_btn_cb); + if (ad->restrict_bg) { + ad->restrict_bg->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_roaming is NULL"); + return SETTING_RETURN_FAIL; + } + + // Show Wi-Fi usage - ON/OFF + setting_get_bool_slp_key(BOOL_SLP_SETTING_DATAUSAGE_SHOW_WIFI_USAGE_BOOL, &value, &err); + if (err != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + ad->show_wifi = setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + __setting_datausage_more_setting_mouse_up_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, value, SETTING_DATAUSAGE_SHOW_WIFI_STR, + NULL, __setting_datausage_more_setting_chk_btn_cb); + if (ad->show_wifi) { + ad->show_wifi->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_roaming is NULL"); + return SETTING_RETURN_FAIL; + } + + setting_view_datausage_more_setting.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int __setting_datausage_more_setting_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + //error check + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SettingDatausageUG *ad = (SettingDatausageUG *) cb; + + elm_naviframe_item_pop(ad->navibar); + setting_view_datausage_more_setting.is_create = 0; + return SETTING_RETURN_SUCCESS; +} + +static int __setting_datausage_more_setting_update(void *cb) +{ + SETTING_TRACE_BEGIN; + return SETTING_RETURN_SUCCESS; +} + +static int __setting_datausage_more_setting_cleanup(void *cb) +{ + //error check + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + __setting_datausage_more_setting_destroy(cb); + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** +** +** call back func +** +** **************************************************/ +static void __setting_datausage_more_setting_back_cb(void *data, Evas_Object * obj, void *event_info) +{ + //error check + ret_if(data == NULL); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + setting_view_change(&setting_view_datausage_more_setting, &setting_view_datausage_main, ad); +} + +static void __setting_datausage_more_setting_mouse_up_cb(void *data, Evas_Object *obj, void *event_info) +{ + /* error check */ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *)elm_object_item_data_get(item); + + setting_retm_if(data == NULL, "Data parameter is NULL"); + + int opposite = !list_item->chk_status; + int err = -1; + int ret = -1; + + if (!safeStrCmp(SETTING_DATAUSAGE_DATA_ROAMING_STR, list_item->keyStr)) { + ret = setting_set_bool_slp_key(BOOL_SLP_SETTING_DATA_ROAMING, opposite, &err); + setting_retm_if(ret == -1, "set vconf failed"); + + elm_check_state_set(list_item->eo_check, opposite); + list_item->chk_status = opposite; + } else if (!safeStrCmp(SETTING_DATAUSAGE_RESTRICT_BACKGROUND_STR, list_item->keyStr)) { + ret = setting_set_bool_slp_key(BOOL_SLP_SETTING_DATAUSAGE_RESTRICT_BG_DATA_BOOL, opposite, &err); + setting_retm_if(ret == -1, "set vconf failed"); + + elm_check_state_set(list_item->eo_check, opposite); + list_item->chk_status = opposite; + } else if (!safeStrCmp(SETTING_DATAUSAGE_SHOW_WIFI_STR, list_item->keyStr)) { + ret = setting_set_bool_slp_key(BOOL_SLP_SETTING_DATAUSAGE_SHOW_WIFI_USAGE_BOOL, opposite, &err); + setting_retm_if(ret == -1, "set vconf failed"); + + elm_check_state_set(list_item->eo_check, opposite); + list_item->chk_status = opposite; + } +} diff --git a/setting-datausage/src/setting-datausage.c b/setting-datausage/src/setting-datausage.c new file mode 100755 index 0000000..14e8ab4 --- /dev/null +++ b/setting-datausage/src/setting-datausage.c @@ -0,0 +1,217 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +/** + *@defgroup setting-datausage + *UG creation code for setting-datausage + */ + +#include +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif + +setting_view *__get_datausage_view_to_load(service_h service) +{ + SETTING_TRACE_BEGIN; + + setting_view_node_table_register(&setting_view_datausage_main, NULL); + + return &setting_view_datausage_main; +} + +static void setting_datausage_ug_cb_resize(void *data, Evas *e, Evas_Object *obj, + void *event_info) +{ + SettingDatausageUG *ad = (SettingDatausageUG *) data; + setting_view_update(ad->view_to_load, ad); +} + +static void *setting_datausage_ug_on_create(ui_gadget_h ug, enum ug_mode mode, + service_h service, void *priv) +{ + setting_retvm_if((!ug || !priv), NULL, "!ug || !priv"); + + SettingDatausageUG *datausageUG = priv; + datausageUG->ug = ug; + datausageUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug); + datausageUG->win_get = (Evas_Object *) ug_get_window(); + evas_object_show(datausageUG->win_main_layout); + datausageUG->evas = evas_object_evas_get(datausageUG->win_main_layout); + + setting_retvm_if(datausageUG->win_main_layout == NULL, NULL, + "cannot get main window "); + + datausageUG->itc_seperator.item_style = "dialogue/separator"; + datausageUG->itc_seperator.func.text_get = NULL; + datausageUG->itc_seperator.func.content_get = NULL; + datausageUG->itc_seperator.func.state_get = NULL; + datausageUG->itc_seperator.func.del = NULL; + + setting_create_Gendial_itc("dialogue/2text.3/expandable", &(datausageUG->itc_2text_3_parent)); + setting_create_Gendial_itc("dialogue/1text.1icon/expandable2", &(datausageUG->itc_1icon_1text_sub)); + setting_create_Gendial_itc("dialogue/2text.3", &(datausageUG->itc_2text_2)); + setting_create_Gendial_itc("dialogue/1text.1icon.2", &(datausageUG->itc_1text_1icon_2)); + setting_create_Gendial_itc("dialogue/1text", &(datausageUG->itc_1text)); + setting_create_Gendial_itc("dialogue/1text.1icon", &(datausageUG->itc_1text_1icon)); + setting_create_Gendial_itc("dialogue/title", &(datausageUG->itc_group_item)); + setting_create_Gendial_itc("multiline/1text", &(datausageUG->itc_bg_1icon)); + + setting_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR); + + /* creating a view. */ + datausageUG->view_to_load = __get_datausage_view_to_load(service); + setting_retvm_if(NULL == datausageUG->view_to_load, NULL, + "NULL == datausageUG->view_to_load"); + setting_view_node_set_cur_view(datausageUG->view_to_load); + setting_view_create(datausageUG->view_to_load, (void *)datausageUG); + evas_object_event_callback_add(datausageUG->win_main_layout, + EVAS_CALLBACK_RESIZE, + setting_datausage_ug_cb_resize, datausageUG); + return datausageUG->ly_main; +} + +static void setting_datausage_ug_on_start(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_datausage_ug_on_pause(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_datausage_ug_on_resume(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_datausage_ug_on_destroy(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if((!ug || !priv), "!ug || !priv"); + SettingDatausageUG *datausageUG = priv; + + evas_object_event_callback_del(datausageUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_datausage_ug_cb_resize); /* fix flash issue for gallery */ + datausageUG->ug = ug; + + /* delete the allocated objects. */ + setting_view_destroy(&setting_view_datausage_main, datausageUG); + if (NULL != ug_get_layout(datausageUG->ug)) { + evas_object_hide((Evas_Object *) ug_get_layout(datausageUG->ug)); + evas_object_del((Evas_Object *) ug_get_layout(datausageUG->ug)); + } + + SETTING_TRACE_END; +} + +static void setting_datausage_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; +} + +static void setting_datausage_ug_on_event(ui_gadget_h ug, enum ug_event event, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if((!ug || !priv), "!ug || !priv"); + SettingDatausageUG *datausageUG = 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: + case UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN: + { + if (datausageUG->graph_desc) { + elm_object_item_data_set(datausageUG->graph_desc->item, datausageUG->graph_desc); + elm_genlist_item_update(datausageUG->graph_desc->item); + } + } + break; + case UG_EVENT_ROTATE_LANDSCAPE: + case UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN: + { + if (datausageUG->graph_desc) { + elm_object_item_data_set(datausageUG->graph_desc->item, datausageUG->graph_desc); + elm_genlist_item_update(datausageUG->graph_desc->item); + } + } + break; + case UG_EVENT_REGION_CHANGE: + break; + default: + break; + } +} + +static void setting_datausage_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + if (!ug) + return; + + switch (event) { + case UG_KEY_EVENT_END: + ug_destroy_me(ug); + break; + default: + break; + } +} + +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + SettingDatausageUG *datausageUG = calloc(1, sizeof(SettingDatausageUG)); + setting_retvm_if(!datausageUG, -1, "Create SettingDatausageUG obj failed"); + + ops->create = setting_datausage_ug_on_create; + ops->start = setting_datausage_ug_on_start; + ops->pause = setting_datausage_ug_on_pause; + ops->resume = setting_datausage_ug_on_resume; + ops->destroy = setting_datausage_ug_on_destroy; + ops->message = setting_datausage_ug_on_message; + ops->event = setting_datausage_ug_on_event; + ops->key_event = setting_datausage_ug_on_key_event; + ops->priv = datausageUG; + ops->opt = UG_OPT_INDICATOR_ENABLE; + + return 0; +} + +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + SettingDatausageUG *datausageUG = NULL; + setting_retm_if(!ops, "ops == NULL"); + + datausageUG = ops->priv; + FREE(datausageUG); +} diff --git a/setting-display/CMakeLists.txt b/setting-display/CMakeLists.txt new file mode 100755 index 0000000..4477be3 --- /dev/null +++ b/setting-display/CMakeLists.txt @@ -0,0 +1,37 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_display REQUIRED elementary ecore ecore-x edje evas appcore-common appcore-efl ui-gadget-1 capi-appfw-application dlog capi-system-device devman) + +FOREACH(flag ${pkgs_display_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") +ADD_DEFINITIONS("-fpie") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") + +ADD_LIBRARY(${SETTING_DISPLAY_UG} SHARED + ./src/setting-display.c + ./src/setting-display-main.c + ##./src/setting-display-backlight.c + ./src/setting-display-brightness.c + ./src/setting-display-wallpaper.c + ./src/setting-display-screen-mode.c + ) + +TARGET_LINK_LIBRARIES(${SETTING_DISPLAY_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_DISPLAY_UG} ${pkgs_display_LDFLAGS}) + +INSTALL(TARGETS ${SETTING_DISPLAY_UG} DESTINATION /usr/ug/lib) diff --git a/setting-display/include/setting-display-brightness.h b/setting-display/include/setting-display-brightness.h new file mode 100755 index 0000000..cec3aa5 --- /dev/null +++ b/setting-display/include/setting-display-brightness.h @@ -0,0 +1,38 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_DISPLAY_BRIGHTNESS_H__ +#define __SETTING_DISPLAY_BRIGHTNESS_H__ + +#include + + +static void setting_display_brightness_click_softkey_cancel_cb(void *data, + Evas_Object * + obj, void + *event_info); +static void setting_display_brightness_chk_btn_cb(void *data, Evas_Object *obj, + void *event_info); +static void setting_display_brightness_mouse_up_Gendial_list_cb(void *data, + Evas_Object * + obj, void + *event_info); +static void setting_display_birghtness_bright_slider_value_change_cb(void *data, + Evas_Object + *obj, void + *event_info); + +#endif /* __SETTING_DISPLAY_BRIGHTNESS_H__ */ diff --git a/setting-display/include/setting-display-main.h b/setting-display/include/setting-display-main.h new file mode 100755 index 0000000..8d69871 --- /dev/null +++ b/setting-display/include/setting-display-main.h @@ -0,0 +1,67 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_DISPLAY_MAIN_H__ +#define __SETTING_DISPLAY_MAIN_H__ + +#include + +/** @todo need to i18n string registration */ +#define LAUNCH_EFFECT_STR "IDS_ST_BODY_APP_OPENING_EFFECT" +#define LAUNCH_IMAGE_STR "IDS_ST_BODY_APP_OPENING_IMAGE" +#define LAUNCH_BATTERY_STR "IDS_ST_BODY_BATTERY_PERCENTAGE_ABB" + +#define KeyStr_AdjustScreenTone "IDS_ST_MBODY_AUTO_ADJUST_SCREEN_TONE" +#define KeyStr_AdjustScreenTone_Dsc "IDS_ST_BODY_SAVE_POWER_BY_ADJUSTING_SCREEN_TONE_ACCORDING_TO_ANALYSIS_OF_IMAGES" + +#define LAUNCH_BATTERY_DESC "IDS_ST_BODY_SHOWS_BATTERY_PERCENTAGE_ON_INDICATOR" + +#define SETTING_DISPLAY_TIME_15_SEC_STR "IDS_ST_BODY_15SEC" +#define SETTING_DISPLAY_TIME_30_SEC_STR "IDS_ST_BODY_30SEC" +#define SETTING_DISPLAY_TIME_1_MIN_STR "IDS_COM_BODY_1_MINUTE" + +#define SETTING_DISPLAY_TIME_2_MIN_STR "IDS_ST_BODY_2_MINUTES" +#define SETTING_DISPLAY_TIME_5_MIN_STR "IDS_ST_BODY_5_MINUTES" +#define SETTING_DISPLAY_TIME_10_MIN_STR "IDS_ST_BODY_10_MINUTES" + +static void setting_display_main_battery_chk_btn_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_display_main_auto_adjust_chk_btn_cb(void *data, Evas_Object *obj, void *event_info); +static void setting_display_main_mouse_up_Gendial_list_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_display_main_click_softkey_back_cb(void *data, + Evas_Object *obj, + void *event_info); +#if OPENING_EFFECT +static void setting_display_main_launch_effect_chk_btn_cb(void *data, + Evas_Object *obj, + void *event_info); +#endif +#ifdef UNUSED_VCONFKEY +static void setting_display_main_launch_image_chk_btn_cb(void *data, + Evas_Object *obj, + void *event_info); +#endif +#if OPENING_EFFECT +static Ecore_X_Window setting_display_main_effect_get_root(Evas_Object * + win_main); + +static void setting_display_main_effect_set_value(void *data); +#endif + +#endif /* __SETTING_DISPLAY_MAIN_H__ */ diff --git a/setting-display/include/setting-display-screen-mode.h b/setting-display/include/setting-display-screen-mode.h new file mode 100755 index 0000000..b85555c --- /dev/null +++ b/setting-display/include/setting-display-screen-mode.h @@ -0,0 +1,27 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_DISPLAY_SCREEN_MODE_H__ +#define __SETTING_DISPLAY_SCREEN_MODE_H__ + +#include + + +static void +setting_display_screen_mode_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info); + +#endif /* __SETTING_DISPLAY_MAIN_H__ */ diff --git a/setting-display/include/setting-display-wallpaper.h b/setting-display/include/setting-display-wallpaper.h new file mode 100755 index 0000000..26d3c4c --- /dev/null +++ b/setting-display/include/setting-display-wallpaper.h @@ -0,0 +1,30 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_DISPLAY_WALLPAPER_H__ +#define __SETTING_DISPLAY_WALLPAPER_H__ + +#include + +#define SETTING_WALLPAPER_HOME_AND_LOCK_SCREEN "IDS_ST_BODY_HOME_AND_LOCK_SCREEN_WALLPAPER" +#define SETTING_WALLPAPER_HOME_SCREEN_CHANGED "Home screen changed" +#define SETTING_WALLPAPER_LOCK_SCREEN_CHANGED "Lock screen changed" +#define SETTING_WALLPAPER_HOME_AND_LOCK_SCREEN_CHANGED "Home screen and Lock screen changed" + +static void setting_display_wallpaper_click_softkey_cancel_cb(void *data, + Evas_Object *obj, + void *event_info); +#endif /* __SETTING_DISPLAY_WALLPAPER_H__ */ diff --git a/setting-display/include/setting-display.h b/setting-display/include/setting-display.h new file mode 100755 index 0000000..df05e6e --- /dev/null +++ b/setting-display/include/setting-display.h @@ -0,0 +1,133 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_DISPLAY_H__ +#define __SETTING_DISPLAY_H__ + +#include +#include + +#include + + +#include + +#include +#include + +#include +#include + +#define Keystr_SmartScreen "IDS_ST_MBODY_SMART_SCREEN" +#define Keystr_ScreenMode "IDS_ST_BODY_SCREEN_MODE" +#define Keystr_Dynamic "IDS_ST_BODY_DYNAMIC_T_DISPLAY_EFFECT" +#define Keystr_Standard "IDS_ST_BODY_STANDARD_T_DISPLAY_EFFECT" +#define Keystr_Natural "IDS_ST_BODY_NATURAL_T_DISPLAY_EFFECT" +#define Keystr_Movie "IDS_ST_BODY_MOVIE_T_DISPLAY_EFFECT" + +typedef enum { + WALLPAPER_CUR_SEL_NONE = 0, + WALLPAPER_CUR_SEL_HOME_SCREEN, + WALLPAPER_CUR_SEL_LOCK_SCREEN, + WALLPAPER_CUR_SEL_HOME_AND_LOCK_SCREEN +} Wallpaper_Cur_Sel; + +typedef struct _SettingDisplayUG SettingDisplayUG; + +#define OPENING_EFFECT 0 +#define BRIGHTNESS_DISPLAY 0 + +/** + * Setting Display UG context + * all UG function has void* as an agument. this is casted back to SettingDisplayUG + * and the functions access app context. + */ +struct _SettingDisplayUG { + ui_gadget_h ug; + + /* add more variables here (move your appdata to here) */ + Evas *evas; + Evas_Object *win_main_layout; + Evas_Object *win_get; + + ui_gadget_h ug_loading; + + Evas_Object *ly_main; + Evas_Object *ly_wall; + + Evas_Object *navi_bar; /* for navigation effect */ + + Setting_GenGroupItem_Data *data_screen_mode; + Setting_GenGroupItem_Data *data_br; + Setting_GenGroupItem_Data *data_back; + Setting_GenGroupItem_Data *data_br_auto; + Setting_GenGroupItem_Data *data_br_sli; + +#if OPENING_EFFECT + Setting_GenGroupItem_Data *data_launch_effect; +#endif + + Setting_GenGroupItem_Data *data_launch_image; + Setting_GenGroupItem_Data *data_battery; + + Setting_GenGroupItem_Data *data_auto_adjust_scrn_tone; + + // for wallpaper + Wallpaper_Cur_Sel cur_sel; + Evas_Object *view_layout; + Evas_Object *selInfoPop; + Evas_Object *selInfoPop_layout; + Setting_GenGroupItem_Data *data_home_screen; + Setting_GenGroupItem_Data *data_lock_screen; + Setting_GenGroupItem_Data *data_home_lock_screen; + + //int bright_value; + int low_bat; + + setting_view *view_to_load; + + Evas_Object *popup_chk; + Evas_Object *popup; + + Elm_Genlist_Item_Class itc_2text_2; + Elm_Genlist_Item_Class itc_1text_1icon; + Elm_Genlist_Item_Class itc_seperator; + Elm_Genlist_Item_Class itc_2text_3_parent; + Elm_Genlist_Item_Class itc_1icon_1text_sub; + Elm_Genlist_Item_Class itc_1text; + Elm_Genlist_Item_Class itc_screen_mode; + + ui_gadget_h ug_gallery; + ui_gadget_h ug_imageviewer; + Eina_Bool wallpaper_changed; + + Setting_GenGroupItem_Data *data_backlight_1min; + Setting_GenGroupItem_Data *data_backlight_2min; + Setting_GenGroupItem_Data *data_backlight_5min; + Setting_GenGroupItem_Data *data_backlight_10min; + //Improve response speed + Ecore_Idler *set_idler; +}; + +extern setting_view setting_view_display_main; +extern setting_view setting_view_display_brightness; +extern setting_view setting_view_display_wallpaper; +extern setting_view setting_view_display_screen_mode; + +void setting_display_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode, + void *priv); + +#endif /* __SETTING_DISPLAY_H__ */ diff --git a/setting-display/src/setting-display-brightness.c b/setting-display/src/setting-display-brightness.c new file mode 100755 index 0000000..91bef92 --- /dev/null +++ b/setting-display/src/setting-display-brightness.c @@ -0,0 +1,558 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#define DISABLE_LOW_BATERY_CHANGE 0 //disable user to set the brightness when the Mobile is low battery. + +#define Left_Bright_Icon IMG_BRIGTHNESS_LEFT +#define Right_Bright_Icon IMG_BRIGHTNESS_RIGHT +#define SUPPORT_DISPLAY_HOMESCREEN_IMAGE 0 + +static int setting_display_brightness_create(void *cb); +static int setting_display_brightness_destroy(void *cb); +static int setting_display_brightness_update(void *cb); +static int setting_display_brightness_cleanup(void *cb); + +static void setting_display_set_slider_value(void* data, Evas_Object *obj, double value); + +setting_view setting_view_display_brightness = { + .create = setting_display_brightness_create, + .destroy = setting_display_brightness_destroy, + .update = setting_display_brightness_update, + .cleanup = setting_display_brightness_cleanup, +}; + +static void __toggle_automatic_chk(void* data, int chk_status); + +/* *************************************************** + * + *basic func + * + ***************************************************/ +#define LOW_BATTERY_NOTIFY "Battery is too low, you cannot change brightness" +#define NORMAL_BATTERY_NOTIFY "Battery becomes normal, now you can change brightness.." + +#if DISABLE_LOW_BATERY_CHANGE +static void +__low_battery_on_resp_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == data, "NULL == data"); + SettingDisplayUG *ad = (SettingDisplayUG *) data; + evas_object_del(ad->popup); + ad->popup = NULL; +} + +static Eina_Bool __disable_on_idle(void *data) +{ + SETTING_TRACE_BEGIN; + SettingDisplayUG *ad = (SettingDisplayUG *) data; + + if (ad->popup) + { + evas_object_del(ad->popup); + ad->popup = NULL; + } + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, NULL, _(LOW_BATTERY_NOTIFY), + __low_battery_on_resp_cb, POPUP_INTERVAL, FALSE, FALSE); + if (ad->data_br_sli) setting_disable_genlist_item(ad->data_br_sli->item); + if (ad->data_br_auto) setting_disable_genlist_item(ad->data_br_auto->item); + return FALSE; +} + +// low battery +static void setting_display_brightness_lowbat_cb(keynode_t *key, void* data) +{ +// SETTING_TRACE_BEGIN; + ret_if(data == NULL); + SettingDisplayUG *ad = (SettingDisplayUG *) data; + SETTING_TRACE_BEGIN; + + char* vconf_key = vconf_keynode_get_name(key); + SETTING_TRACE("the value of [ %s ] just changed", vconf_key); + ad->low_bat = vconf_keynode_get_int(key); + if (ad->low_bat <= VCONFKEY_SYSMAN_BAT_CRITICAL_LOW) + { + SETTING_TRACE("Battery becomes ctitical low !"); + //popup was showed by system FW + // disabled + if (ad->data_br_sli) setting_disable_genlist_item(ad->data_br_sli->item); + if (ad->data_br_auto) setting_disable_genlist_item(ad->data_br_auto->item); + } else { + SETTING_TRACE("Battery becomes normal!"); + if (ad->data_br_sli) { + int automatic_val, err; + setting_get_int_slp_key(INT_SLP_SETTING_AUTOMATIC_BRIGHTNESS, &automatic_val, &err); + if (ad->data_br_auto) setting_enable_genlist_item(ad->data_br_auto->item); + if (automatic_val == SETTING_BRIGHTNESS_AUTOMATIC_OFF) // not automatic + { + if (ad->data_br_sli) setting_enable_genlist_item(ad->data_br_sli->item); + } + } + } +} +#endif + +static void __display_int_vconf_cb(keynode_t *key, void *data) +{ + SettingDisplayUG *ad = data; + retm_if(!data, "Invalid argument: data is NULL"); + + int status = vconf_keynode_get_int(key); + char *vconf_name = vconf_keynode_get_name(key); + SETTING_TRACE("Enter %s(%s=%d)", __FUNCTION__, vconf_name, status); + + if (!safeStrCmp(vconf_name, VCONFKEY_SETAPPL_LCD_BRIGHTNESS)) { + if (ad->data_br_sli) + { + elm_slider_value_set(ad->data_br_sli->eo_check, status); + } + } + else if (!safeStrCmp(vconf_name, VCONFKEY_SETAPPL_BRIGHTNESS_AUTOMATIC_INT)) { + if (status) + { + if (ad->data_br_auto) + elm_check_state_set(ad->data_br_auto->eo_check, 1); + + if (ad->data_br_sli) + setting_disable_genlist_item(ad->data_br_sli->item); + } + else + { + if (ad->data_br_auto) + elm_check_state_set(ad->data_br_auto->eo_check, 0); + + if (ad->data_br_sli) + setting_enable_genlist_item(ad->data_br_sli->item); + } + } + return; +} + +static int setting_display_brightness_create(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingDisplayUG *ad = (SettingDisplayUG *) cb; + + Evas_Object *genlist = elm_genlist_add(ad->win_main_layout); + elm_object_style_set(genlist, "dialogue"); + retvm_if(genlist == NULL, SETTING_RETURN_FAIL, "Cannot set scroller object as contento of layout"); + elm_genlist_clear(genlist); /* first to clear list */ + + /* add basic layout */ + if (&setting_view_display_brightness == ad->view_to_load) { + ad->ly_main = + setting_create_layout_navi_bar(ad->win_main_layout, + ad->win_get, + _(KeyStr_Brightness), + _("IDS_COM_BODY_BACK"), + NULL, NULL, + setting_display_brightness_click_softkey_cancel_cb, + NULL, NULL, ad, + genlist, + &ad->navi_bar, NULL); + } else { + setting_push_layout_navi_bar(_(KeyStr_Brightness), + _("IDS_COM_BODY_BACK"), NULL, NULL, + setting_display_brightness_click_softkey_cancel_cb, + NULL, + NULL, ad, genlist, ad->navi_bar, NULL);; + } + + + Elm_Object_Item *item = elm_genlist_item_append(genlist, &(ad->itc_seperator), NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + // [control] AUTOMATIC - boolean - vconf + int auto_value = SETTING_BRIGHTNESS_AUTOMATIC_ON; + int err; + int ret = setting_get_int_slp_key(INT_SLP_SETTING_AUTOMATIC_BRIGHTNESS, &auto_value, &err);//if get failed,to hold value SETTING_BRIGHTNESS_AUTOMATIC_ON + SETTING_TRACE("auto_value:%d", auto_value); + if (0 != ret) //add error handle,due to different target env.. + SETTING_TRACE_ERROR("Failed to get value of [%s]", VCONFKEY_SETAPPL_BRIGHTNESS_AUTOMATIC_INT); + + // [UI] AUTOMATIC - boolean + ad->data_br_auto = + setting_create_Gendial_field_def(genlist, &(ad->itc_1text_1icon), + setting_display_brightness_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, auto_value, + "IDS_COM_BODY_AUTOMATIC", NULL, + setting_display_brightness_chk_btn_cb); + if (ad->data_br_auto) { + ad->data_br_auto->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_br_auto is NULL"); + } + + + /* check manual */ + int value = SETTING_BRIGHTNESS_LEVEL5; + ret = setting_get_int_slp_key(INT_SLP_SETTING_LCD_BRIGHTNESS, &value, &err); + SETTING_TRACE("******* value = %d ", value); + if (0 != ret) //add error handle,due to different target env.. + SETTING_TRACE_ERROR("Failed to get value of [%s]", VCONFKEY_SETAPPL_LCD_BRIGHTNESS); + + // [UI] Slider control for Bightness + ad->data_br_sli = + setting_create_Gendial_field_def(genlist, &(itc_1icon), NULL, + NULL, SWALLOW_Type_LAYOUT_SLIDER, + Left_Bright_Icon, + Right_Bright_Icon, value, NULL, + NULL, + setting_display_birghtness_bright_slider_value_change_cb); + + if (ad->data_br_sli) { + ad->data_br_sli->win_main = ad->win_main_layout; + ad->data_br_sli->evas = ad->evas; + ad->data_br_sli->isIndicatorVisible = false; + ad->data_br_sli->slider_min = 1; + + ad->data_br_sli->slider_max = 100; + ad->data_br_sli->userdata = ad; + + if (auto_value) { + setting_disable_genlist_item(ad->data_br_sli->item); + } + + } else { + SETTING_TRACE_ERROR("ad->data_br_sli is NULL"); + } + #if DISABLE_LOW_BATERY_CHANGE + ad->low_bat = VCONFKEY_SYSMAN_BAT_NORMAL; + vconf_get_int(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW, &ad->low_bat); + if (0 != ret) //add error handle,due to different target env.. + SETTING_TRACE_ERROR("Failed to get value of [%s]", VCONFKEY_SYSMAN_BATTERY_STATUS_LOW); + + if (ad->low_bat <= VCONFKEY_SYSMAN_BAT_CRITICAL_LOW) { + SETTING_TRACE("battery is ctitical low"); + //have time delay to show all the item out,so user idler to disable + //if (ad->data_br_sli) setting_disable_genlist_item(ad->data_br_sli->item); + //if (ad->data_br_auto) setting_disable_genlist_item(ad->data_br_auto->item); + ecore_idler_add(__disable_on_idle, ad); + } + + // low battery handler - registration + vconf_notify_key_changed(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW, setting_display_brightness_lowbat_cb, ad); + #endif + + vconf_notify_key_changed(VCONFKEY_SETAPPL_LCD_BRIGHTNESS, __display_int_vconf_cb, ad); + vconf_notify_key_changed(VCONFKEY_SETAPPL_BRIGHTNESS_AUTOMATIC_INT, __display_int_vconf_cb, ad); + setting_view_display_brightness.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int setting_display_brightness_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); +#if DISABLE_LOW_BATERY_CHANGE + /* low battery handler - registration */ + vconf_ignore_key_changed(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW, setting_display_brightness_lowbat_cb); +#endif + vconf_ignore_key_changed(VCONFKEY_SETAPPL_LCD_BRIGHTNESS, __display_int_vconf_cb); + vconf_ignore_key_changed(VCONFKEY_SETAPPL_BRIGHTNESS_AUTOMATIC_INT, __display_int_vconf_cb); + + SettingDisplayUG *ad = (SettingDisplayUG *) cb; + elm_naviframe_item_pop(ad->navi_bar); + if (ad->popup) + { + evas_object_del(ad->popup); + ad->popup = NULL; + } + + setting_view_display_brightness.is_create = 0; + return SETTING_RETURN_SUCCESS; +} + +static int setting_display_brightness_update(void *cb) +{ + SETTING_TRACE_BEGIN; + return SETTING_RETURN_SUCCESS; + +} + +static int setting_display_brightness_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + setting_display_brightness_destroy(cb); + + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void +setting_display_brightness_click_softkey_cancel_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + SettingDisplayUG *ad = (SettingDisplayUG *) data; + if (&setting_view_display_brightness == ad->view_to_load) { + /* Send destroy request */ + ug_destroy_me(ad->ug); + return; + } + + setting_view_change(&setting_view_display_brightness, + &setting_view_display_main, ad); +} + +/** + * toggle handler for 'Automatic' + */ +static void __toggle_automatic_chk(void* data, int chk_status) +{ + int err; + SettingDisplayUG *ad = (SettingDisplayUG *) data; + int ret = setting_set_int_slp_key(INT_SLP_SETTING_AUTOMATIC_BRIGHTNESS, chk_status, &err); + if (0 != ret) //add error handle,due to different target env.. + { + SETTING_TRACE("Operation failed"); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_COM_POP_FAILED"), + NULL, POPUP_INTERVAL, FALSE, FALSE); + return; + } + if (chk_status) { + // TOGGLE ON + setting_disable_genlist_item(ad->data_br_sli->item); + + } else { + // TOGGLE OFF + #if DISABLE_LOW_BATERY_CHANGE + //to get value every time + ad->low_bat = VCONFKEY_SYSMAN_BAT_NORMAL; + + // in case of LOW BATTERY + ret = vconf_get_int(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW, &ad->low_bat); + if (0 != ret) //add error handle,due to different target env.. + { + SETTING_TRACE("Operation failed"); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_COM_POP_FAILED"), + NULL, POPUP_INTERVAL, FALSE, FALSE); + return; + } + + // in case of CRITICAL LOW BATTERY + if (ad->low_bat <= VCONFKEY_SYSMAN_BAT_CRITICAL_LOW) + { + setting_disable_genlist_item(ad->data_br_sli->item); + setting_disable_genlist_item(ad->data_br_auto->item); + } + else + { // in case of NORMAL OP + // 1. set vconf + // 2. call brightness set API + int value = SETTING_BRIGHTNESS_LEVEL5; + //device_get_brightness(BRIGHTNESS_DISPLAY, &value); + if (ad->data_br_sli) { + value = elm_slider_value_get(ad->data_br_sli->eo_check); + SETTING_TRACE(" value of ad->data_br_sli->eo_check: %d ", value); + setting_enable_genlist_item(ad->data_br_sli->item); + } + + ret = setting_set_int_slp_key(INT_SLP_SETTING_LCD_BRIGHTNESS, value, &err); + if (0 != ret) //add error handle,due to different target env.. + { + SETTING_TRACE("Operation failed"); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_COM_POP_FAILED"), + NULL, POPUP_INTERVAL, FALSE, FALSE); + return; + } + + /* call brightness API */ + ret = device_set_brightness_to_settings(BRIGHTNESS_DISPLAY, value); + /* TODO error handling here */ + } + #else + int value = SETTING_BRIGHTNESS_LEVEL5; + //device_get_brightness(BRIGHTNESS_DISPLAY, &value); + if (ad->data_br_sli) { + value = elm_slider_value_get(ad->data_br_sli->eo_check); + SETTING_TRACE(" value of ad->data_br_sli->eo_check: %d ", value); + setting_enable_genlist_item(ad->data_br_sli->item); + } + ret = setting_set_int_slp_key(INT_SLP_SETTING_LCD_BRIGHTNESS, value, &err); + if (0 != ret) //add error handle,due to different target env.. + { + SETTING_TRACE("Operation failed"); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_COM_POP_FAILED"), + NULL, POPUP_INTERVAL, FALSE, FALSE); + return; + } + #endif + } +} + +static void +setting_display_brightness_chk_btn_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + SettingDisplayUG *ad = list_item->userdata; + list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */ + + // enable /disable toggle button + __toggle_automatic_chk(ad, list_item->chk_status); + return; +} + +/** + * [UI] 'Automatic' toggle + */ +static void setting_display_brightness_mouse_up_Gendial_list_cb(void *data, + Evas_Object * obj, + void *event_info) +{ + /* error check */ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + retm_if(data == NULL, "Invalid argument: data is NULL"); + SettingDisplayUG *ad = data; + + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + int old_status = elm_check_state_get(list_item->eo_check); + /* new status */ + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + + // enable /disable toggle button + __toggle_automatic_chk(ad,list_item->chk_status); +} + +static void setting_display_set_slider_value(void* data, Evas_Object *obj, double value) + +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Invalid argument: data is NULL"); + + SettingDisplayUG *ad = data; + int ret, err; + ret = device_set_brightness_to_settings(BRIGHTNESS_DISPLAY, value); + if (ret == DEVICE_ERROR_NONE) { + ad->data_br_sli->chk_status = value; + ret = setting_set_int_slp_key(INT_SLP_SETTING_LCD_BRIGHTNESS, value, &err); + //add error handle.. + if (0 != ret) setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_COM_POP_FAILED"), + NULL, POPUP_INTERVAL, FALSE, FALSE); + } else { + SETTING_TRACE("device_set_brightness_to_settings : failed[ret=%d]", ret); + //rollback.. + int tmp = SETTING_BRIGHTNESS_LEVEL5; + setting_get_int_slp_key(INT_SLP_SETTING_LCD_BRIGHTNESS, &tmp, &err); + elm_slider_value_set(obj, tmp); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_COM_POP_FAILED"), + NULL, POPUP_INTERVAL, FALSE, FALSE); + } +} + +static Eina_Bool __set_brightness_on_idle(void *data) +{ + SETTING_TRACE_BEGIN; + SettingDisplayUG *ad = (SettingDisplayUG *) data; + if (!ad || !ad->data_br_sli || !ad->data_br_sli->eo_check) + { + SETTING_TRACE_ERROR("!ad || !ad->data_br_sli || !ad->data_br_sli->eo_check"); + if (ad) + ad->set_idler = NULL; + return FALSE; + } + //Get the current real value of slider + Evas_Object *obj = ad->data_br_sli->eo_check; + double val = elm_slider_value_get(obj); + int value = (int)(val + 0.5); + SETTING_TRACE("val:%f", val); + SETTING_TRACE("value:%d", value); + setting_display_set_slider_value(ad, obj, value); + //After return False, the idler will be deleted directly,so here set ad->set_idler as NULL directly. + ad->set_idler = NULL; + return FALSE; +} + +static void +setting_display_birghtness_bright_slider_value_change_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + int value = 0; + static int old_val = -1; + SettingDisplayUG *ad = NULL; + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + ad = list_item->userdata; + + value = elm_check_state_get(ad->data_br_auto->eo_check); + if (value == 1) { /* it is automatic setting mode, */ + /* do nothing */ + return; + } + + double val = elm_slider_value_get(obj); + SETTING_TRACE("val:%f", val); + value = (int)(val + 0.5); + /* SETTING_TRACE("val:%f", val); */ + SETTING_TRACE("value:%d", value); + if (value != old_val) + { + //setting_display_set_slider_value(ad, obj, value); + if(isEmulBin()) + { + SETTING_TRACE("It is in Emulator, need special process to improve the performence"); + if (ad->set_idler) { + ecore_idler_del(ad->set_idler); + ad->set_idler = NULL; + } + ad->set_idler = ecore_idler_add((Ecore_Task_Cb) __set_brightness_on_idle, ad); + } + else + { + SETTING_TRACE("It is in Real Target, Set the brightness directly."); + setting_display_set_slider_value(ad, obj, value); + } + old_val = value; + } +} + + diff --git a/setting-display/src/setting-display-main.c b/setting-display/src/setting-display-main.c new file mode 100755 index 0000000..b3cb2ed --- /dev/null +++ b/setting-display/src/setting-display-main.c @@ -0,0 +1,612 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include + + +static int setting_display_main_create(void *cb); +static int setting_display_main_destroy(void *cb); +static int setting_display_main_update(void *cb); +static int setting_display_main_cleanup(void *cb); + +setting_view setting_view_display_main = { + .create = setting_display_main_create, + .destroy = setting_display_main_destroy, + .update = setting_display_main_update, + .cleanup = setting_display_main_cleanup, +}; + +static char* str_in_arr[] = {"Dynamic", "Standard", "Natural", "Movie"}; +static char* str_out_arr[] = {Keystr_Dynamic, Keystr_Standard, Keystr_Natural, Keystr_Movie}; + + +/* *************************************************** + * + *basic func + * + ***************************************************/ +static void +__setting_display_main_exp_cb(void *data, Evas_Object *obj, void *event_info) +{ + ret_if(NULL == data || NULL == event_info); + SETTING_TRACE_BEGIN; + SettingDisplayUG *ad = (SettingDisplayUG *) data; + Elm_Object_Item *parentItem = event_info; /* parent item */ + Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); /* parent data */ + Evas_Object *scroller = elm_object_item_widget_get(parentItem); + + Evas_Object *rgd; + if (data_parentItem == ad->data_back) { + rgd = elm_radio_add(scroller); + elm_radio_value_set(rgd, -1); + + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + 15, /* 15 sec */ + SETTING_DISPLAY_TIME_15_SEC_STR, NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + 30, /* 30 sec */ + SETTING_DISPLAY_TIME_30_SEC_STR, NULL); + + ad->data_backlight_1min = setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + 60, /* 60 sec */ + SETTING_DISPLAY_TIME_1_MIN_STR, NULL); + + ad->data_backlight_2min = setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + 120, /* 2min */ + SETTING_DISPLAY_TIME_2_MIN_STR, NULL); + + ad->data_backlight_5min = setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + 300, /* 5min */ + SETTING_DISPLAY_TIME_5_MIN_STR, NULL); + + ad->data_backlight_10min = setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + 600, /* 10min */ + SETTING_DISPLAY_TIME_10_MIN_STR, NULL); + + setting_update_chk_status(rgd, + data_parentItem->int_slp_setting_binded); + + } +} +#if !SUPPOR_SEPARATE_BRIGHTNESS +// low battery +static void setting_display_main_lowbat_cb(keynode_t *key, void* data) +{ + ret_if(data == NULL); + SettingDisplayUG *ad = (SettingDisplayUG *) data; + SETTING_TRACE_BEGIN; + ret_if(ad->data_br == NULL); + + char* vconf_key = vconf_keynode_get_name(key); + SETTING_TRACE("the value of [ %s ] just changed", vconf_key); + // VCONFKEY_SYSMAN_BATTERY_STATUS_LOW + + int battery_value; + vconf_get_int(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW, &battery_value); + ad->low_bat = battery_value; + + if (battery_value < VCONFKEY_SYSMAN_BAT_WARNING_LOW) + { + elm_slider_value_set(ad->data_br->eo_check, 1); + // disabled + setting_disable_genlist_item(ad->data_br->item); + } else { + setting_enable_genlist_item(ad->data_br->item); + } + return; +} +#endif + +static int setting_display_main_create(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingDisplayUG *ad = (SettingDisplayUG *) cb; + + Evas_Object *scroller = NULL; + + /* add basic layout */ + char setBtnStr[MAX_DISPLAY_NAME_LEN_ON_UI]; + snprintf(setBtnStr, sizeof(setBtnStr), "%s", + (char *)dgettext("sys_string", "IDS_COM_BODY_BACK")); + + ad->ly_main = + setting_create_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _(KeyStr_Display), setBtnStr, + NULL, + setting_display_main_click_softkey_back_cb, + NULL, ad, &scroller, + &(ad->navi_bar)); + setting_enable_expandable_genlist(scroller, ad, + __setting_display_main_exp_cb, NULL); + + Elm_Object_Item *item = NULL;; + + item = + elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + int value = 0; + int ret = 0; + + if (!isEmulBin()) { + char *curmode = vconf_get_str(VCONFKEY_SETAPPL_SCREENMODE_SELNAME); + SETTING_TRACE(">>> CUR SCREEN MODE : %s ", curmode); + + int i = 0; + for (; i < sizeof(str_in_arr)/sizeof(str_in_arr[0]); i++) { + if (0 == safeStrCmp(str_in_arr[i], curmode)) { + ad->data_screen_mode = setting_create_Gendial_field_def(scroller, &(itc_2text_3), + setting_display_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, Keystr_ScreenMode, + _(str_out_arr[i]), NULL); + if (ad->data_screen_mode) { + ad->data_screen_mode->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_screen_mode is NULL"); + } + break; + } + } + + item = + elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + #if !SUPPOR_SEPARATE_BRIGHTNESS + /* BRIGHTNESS */ + ad->data_br = + setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), + setting_display_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, "IDS_COM_OPT_BRIGHTNESS", + get_brightness_mode_str(), NULL); + if (ad->data_br) { + ad->data_br->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_br is NULL"); + } + #endif + + ret = vconf_get_bool(VCONFKEY_SETAPPL_BOOL_AUTO_ADJUST_SCREEN_TONE, &value); + ad->data_auto_adjust_scrn_tone = + setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + setting_display_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, value, KeyStr_AdjustScreenTone, + NULL, + setting_display_main_auto_adjust_chk_btn_cb); + if (ad->data_auto_adjust_scrn_tone) { + ad->data_auto_adjust_scrn_tone->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_battery is NULL"); + } + + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, KeyStr_AdjustScreenTone_Dsc, NULL, NULL); + + elm_genlist_item_select_mode_set(elm_genlist_item_append(scroller, &(itc_seperator), NULL, NULL,ELM_GENLIST_ITEM_NONE, NULL, NULL), + ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } + + /* BACKLIGHTTIME */ + char* pa_backlight_time = get_pa_backlight_time_str(); + ad->data_back = + setting_create_Gendial_exp_parent_field(scroller, + &(ad->itc_2text_3_parent), + NULL, NULL, + SWALLOW_Type_INVALID, + KeyStr_BacklightTime, + pa_backlight_time); + +#if SUPPORT_LCD_TIMEOUT_KEEPING + if (ad->data_back) { + ad->data_back->int_slp_setting_binded = + INT_SLP_SETTING_LCD_TIMEOUT_NORMAL_BACKUP; + } else { + SETTING_TRACE_ERROR("ad->data_back is NULL"); + } +#else + if (ad->data_back) { + ad->data_back->int_slp_setting_binded = + INT_SLP_SETTING_LCD_TIMEOUT_NORMAL; + } else { + SETTING_TRACE_ERROR("ad->data_back is NULL"); + } +#endif + G_FREE(pa_backlight_time); + + /* add separator */ + item = + elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* setting_get_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_BRIGHTNESS, &auto_value, &err); */ + value = 0; + vconf_get_bool(VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL, &value); + ad->data_battery = + setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + setting_display_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, value, LAUNCH_BATTERY_STR, + NULL, + setting_display_main_battery_chk_btn_cb); + if (ad->data_battery) { + ad->data_battery->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_battery is NULL"); + } + + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, LAUNCH_BATTERY_DESC, NULL, NULL); + +#if OPENING_EFFECT + elm_genlist_item_select_mode_set(elm_genlist_item_append(scroller, &(itc_seperator), NULL, NULL,ELM_GENLIST_ITEM_NONE, NULL, NULL), + ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* add separator */ + item = + elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* Launch Effect - Opening Effect */ + int launch_effect_value = 0; + Ecore_X_Window root = 0; + Ecore_X_Atom effect_enable_atom = 0; + + root = setting_display_main_effect_get_root(ad->win_main_layout); + effect_enable_atom = ecore_x_atom_get("_NET_CM_EFFECT_ENABLE"); + + if (root) { + ecore_x_window_prop_card32_get(root, effect_enable_atom, + (unsigned int *) + &launch_effect_value, 1); + } + ad->data_launch_effect = + setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + setting_display_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, launch_effect_value, + LAUNCH_EFFECT_STR, NULL, + setting_display_main_launch_effect_chk_btn_cb); + if (ad->data_launch_effect) { + ad->data_launch_effect->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_launch_effect is NULL"); + } +#endif + /* Launch Image on/off */ + ret = SETTING_RETURN_FAIL; +#ifdef UNUSED_VCONFKEY + int launch_image_value; + int err; + /* value set */ + ret = setting_get_bool_slp_key(BOOL_SLP_SETTING_LAUNCH_IMAGE, + &launch_image_value, &err); + ad->data_launch_image = + setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + setting_display_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, launch_image_value, + LAUNCH_IMAGE_STR, NULL, + setting_display_main_launch_image_chk_btn_cb); + if (ad->data_launch_image) { + ad->data_launch_image->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_launch_image is NULL"); + } +#endif +#if !SUPPOR_SEPARATE_BRIGHTNESS + if (ad->data_br) { + int battery_value; + vconf_get_int(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW, &battery_value); + ad->low_bat = battery_value; + + if ( battery_value < VCONFKEY_SYSMAN_BAT_WARNING_LOW ) + { + elm_slider_value_set(ad->data_br->eo_check, 1); + setting_disable_genlist_item(ad->data_br->item); + } + else + { + setting_enable_genlist_item(ad->data_br->item); + } + } + + vconf_notify_key_changed(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW, setting_display_main_lowbat_cb, ad); +#endif + + setting_view_display_main.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int setting_display_main_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingDisplayUG *ad = (SettingDisplayUG *) cb; +#if !SUPPOR_SEPARATE_BRIGHTNESS + // low battery handler - registration + vconf_ignore_key_changed(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW, setting_display_main_lowbat_cb); +#endif + if (ad->ly_main != NULL) { + evas_object_del(ad->ly_main); + /* if(ad->back_dialData) FREE(ad->back_dialData); */ + setting_view_display_main.is_create = 0; + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_display_main_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingDisplayUG *ad = (SettingDisplayUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_show(ad->ly_main); + if (ad->data_br) { + ad->data_br->sub_desc = + (char *)g_strdup(get_brightness_mode_str()); + elm_object_item_data_set(ad->data_br->item, ad->data_br); + elm_genlist_item_update(ad->data_br->item); + + } + + if (ad->data_screen_mode) { + char *curmode = vconf_get_str(VCONFKEY_SETAPPL_SCREENMODE_SELNAME); + SETTING_TRACE(">>> CUR SCREEN MODE : %s ", curmode); + int i = 0; + for (; i < sizeof(str_in_arr)/sizeof(str_in_arr[0]); i++) { + if (0 == safeStrCmp(str_in_arr[i], curmode)) { + ad->data_screen_mode->sub_desc = (char *)g_strdup(_(str_out_arr[i])); + break; + } + } + elm_object_item_data_set(ad->data_screen_mode->item, ad->data_screen_mode); + elm_genlist_item_update(ad->data_screen_mode->item); + } + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_display_main_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +static void +setting_display_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, + void *event_info) +{ + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + SettingDisplayUG *ad = (SettingDisplayUG *) data; + + SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); + + if (!safeStrCmp("IDS_COM_OPT_BRIGHTNESS", list_item->keyStr)) { + setting_view_change(&setting_view_display_main, + &setting_view_display_brightness, ad); + } + else if (!safeStrCmp(KeyStr_AdjustScreenTone, list_item->keyStr)) { + int old_status = elm_check_state_get(list_item->eo_check); + /* new status */ + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + vconf_set_bool(VCONFKEY_SETAPPL_BOOL_AUTO_ADJUST_SCREEN_TONE, list_item->chk_status); + } +#if OPENING_EFFECT + else if (!safeStrCmp(LAUNCH_EFFECT_STR, list_item->keyStr)) { + int old_status = elm_check_state_get(list_item->eo_check); + /* new status */ + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + + setting_display_main_effect_set_value(list_item); + } +#endif +#ifdef UNUSED_VCONFKEY + else if (!safeStrCmp(LAUNCH_IMAGE_STR, list_item->keyStr)) { + int old_status = elm_check_state_get(list_item->eo_check); + /* new status */ + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + + int err; + setting_set_bool_slp_key(BOOL_SLP_SETTING_LAUNCH_IMAGE, + list_item->chk_status, &err); + } +#endif + else if (!safeStrCmp(LAUNCH_BATTERY_STR, list_item->keyStr)) { + int old_status = elm_check_state_get(list_item->eo_check); + /* new status */ + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + vconf_set_bool(VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL, list_item->chk_status); + } + else if (!safeStrCmp(Keystr_ScreenMode, list_item->keyStr)) { + setting_view_change(&setting_view_display_main, &setting_view_display_screen_mode, ad); + } +} + +static void +setting_display_main_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, + "[Setting > Display] Data parameter is NULL"); + + SettingDisplayUG *ad = (SettingDisplayUG *) data; + + /* Send destroy request */ + ug_destroy_me(ad->ug); + SETTING_TRACE_END; + +} + +static void setting_display_main_auto_adjust_chk_btn_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + + list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */ + vconf_set_bool(VCONFKEY_SETAPPL_BOOL_AUTO_ADJUST_SCREEN_TONE, list_item->chk_status); +} + + +static void +setting_display_main_battery_chk_btn_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + + list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */ + vconf_set_bool(VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL, list_item->chk_status); +} + +#if OPENING_EFFECT +static void +setting_display_main_launch_effect_chk_btn_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + + list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */ + setting_display_main_effect_set_value(list_item); + return; +} +#endif + +/* setting_display_brightness_chk_btn_cb*/ +#ifdef UNUSED_VCONFKEY +/* Fake image - launch effect*/ +static void +setting_display_main_launch_image_chk_btn_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + + list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */ + + int err; + setting_set_bool_slp_key(BOOL_SLP_SETTING_LAUNCH_IMAGE, + list_item->chk_status, &err); +} +#endif +#if OPENING_EFFECT +static Ecore_X_Window setting_display_main_effect_get_root(Evas_Object * + win_main) +{ + Ecore_X_Window xwin = 0; + Ecore_X_Window root = 0; + + retv_if(!win_main, root); + + xwin = elm_win_xwindow_get(win_main); + retv_if(!xwin, root); + + root = ecore_x_window_root_get(xwin); + return root; +} + +static void setting_display_main_effect_set_value(void *data) +{ + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + SettingDisplayUG *ad = list_item->userdata; + Ecore_X_Window root = 0; + Ecore_X_Atom effect_enable_atom = 0; + unsigned int is_enable = 0; /* 0: effect disable, 1: effect enable */ + + root = setting_display_main_effect_get_root(ad->win_main_layout); + ret_if(!root); + effect_enable_atom = ecore_x_atom_get("_NET_CM_EFFECT_ENABLE"); + ret_if(!effect_enable_atom); + + if (list_item->chk_status) { + is_enable = 1; + } + + ecore_x_window_prop_card32_set(root, effect_enable_atom, &is_enable, 1); + return; +} +#endif diff --git a/setting-display/src/setting-display-screen-mode.c b/setting-display/src/setting-display-screen-mode.c new file mode 100755 index 0000000..505fe12 --- /dev/null +++ b/setting-display/src/setting-display-screen-mode.c @@ -0,0 +1,263 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include + +static int setting_display_screen_mode_create(void *cb); +static int setting_display_screen_mode_destroy(void *cb); +static int setting_display_screen_mode_update(void *cb); +static int setting_display_screen_mode_cleanup(void *cb); + +static char* str_in_arr[] = {"Dynamic", "Standard", "Natural", "Movie"}; +static char* str_out_arr[] = {Keystr_Dynamic, Keystr_Standard, Keystr_Natural, Keystr_Movie}; + +static void setting_display_screen_mode_mouse_up_Gendial_list_radio_cb(void *data, Evas_Object *obj, void *event_info); + +setting_view setting_view_display_screen_mode = { + .create = setting_display_screen_mode_create, + .destroy = setting_display_screen_mode_destroy, + .update = setting_display_screen_mode_update, + .cleanup = setting_display_screen_mode_cleanup, +}; + + +static Evas_Object *__gl_content_get(void *data, Evas_Object *obj, const char *part) +{ + if (!strcmp(part, "elm.icon")) { + #if 0 + Evas_Object *sub_layout = elm_layout_add(obj); + elm_layout_file_set(sub_layout, SETTING_THEME_EDJ_NAME, "screen_mode"); + evas_object_size_hint_weight_set(sub_layout, EVAS_HINT_EXPAND, 0.0); + evas_object_show(sub_layout); + + Evas_Object *image = elm_image_add(obj); + elm_image_file_set(image, IMG_SCREEN_MODE, NULL); + elm_image_resizable_set(image, EINA_TRUE, EINA_TRUE); + evas_object_show(image); + + int w = 0; + int h = 0; + elm_image_object_size_get(image, &w, &h); + setting_resize_object(image, w * WIDGET_SCALE_FACTOR, h * WIDGET_SCALE_FACTOR); + + elm_object_part_content_set(sub_layout, "content", image); + return sub_layout; + #endif + Evas_Object *image; + image = elm_image_add(obj); + elm_image_file_set(image, IMG_SCREEN_MODE, NULL); + + int w = 668; /* left padding and right padding is 26, so the width = 720 - 26 -26 */ + int h = 0; + elm_image_object_size_get(image, NULL, &h); + evas_object_size_hint_min_set(image, w * WIDGET_SCALE_FACTOR, h * WIDGET_SCALE_FACTOR); + evas_object_size_hint_max_set(image, w * WIDGET_SCALE_FACTOR, h * WIDGET_SCALE_FACTOR); + evas_object_resize(image, w * WIDGET_SCALE_FACTOR, h * WIDGET_SCALE_FACTOR); + + return image; + } + + return NULL; +} + +static void __gl_item_del(void *data, Evas_Object *obj) +{ + setting_retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *) data; + if (item_data) { + G_FREE(item_data->keyStr); + G_FREE(item_data->sub_desc); + FREE(item_data); + } +} + +/* *************************************************** + * + *basic func + * + ***************************************************/ +static int setting_display_screen_mode_create(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingDisplayUG *ad = (SettingDisplayUG *) cb; + + setting_call_back_func gl_sel_cb = NULL; + Evas_Object *genlist = NULL; + Setting_GenGroupItem_Data *item_data = NULL; + + genlist = elm_genlist_add(ad->navi_bar); + retvm_if(genlist == NULL, SETTING_RETURN_FAIL, "scroller == NULL"); + elm_object_style_set(genlist, "dialogue"); + elm_genlist_clear(genlist); /* first to clear list */ + + setting_push_layout_navi_bar(_(Keystr_ScreenMode), _("IDS_COM_BODY_BACK"), + NULL, NULL, + setting_display_screen_mode_click_softkey_back_cb, + NULL, NULL, ad, genlist, ad->navi_bar, NULL); + + Elm_Object_Item *item = elm_genlist_item_append(genlist, + &(itc_sep_line), + NULL, NULL, + ELM_GENLIST_ITEM_NONE, + NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + ad->itc_screen_mode.item_style = "1icon/with_no_line"; + ad->itc_screen_mode.func.text_get = NULL; + ad->itc_screen_mode.func.content_get = __gl_content_get; + ad->itc_screen_mode.func.state_get = NULL; + ad->itc_screen_mode.func.del = __gl_item_del; + + Setting_GenGroupItem_Data *screen_mode = (Setting_GenGroupItem_Data *) calloc(1, sizeof(Setting_GenGroupItem_Data)); + setting_retvm_if(!screen_mode, SETTING_RETURN_FAIL, "calloc failed"); + + if (screen_mode) { + screen_mode->userdata = ad; + screen_mode->item = elm_genlist_item_append(genlist, &(ad->itc_screen_mode), screen_mode, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(screen_mode->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("screen_mode is NULL"); + return SETTING_RETURN_FAIL; + } + + gl_sel_cb = setting_display_screen_mode_mouse_up_Gendial_list_radio_cb; + + Evas_Object *radio = elm_radio_add(genlist); + elm_radio_state_value_set(radio, -1); + + char* curmode = vconf_get_str(VCONFKEY_SETAPPL_SCREENMODE_SELNAME); + SETTING_TRACE(">>> CUR SCREEN MODE : %s ", curmode); + + int i = 0; + + for (i=0; i< sizeof(str_in_arr)/sizeof(str_in_arr[0]) ;i++) + { + item_data = setting_create_Gendial_field_1radio(genlist, + &(itc_1text_1icon_2), + gl_sel_cb, + radio, /* sel data */ + SWALLOW_Type_1RADIO, + radio, i, + str_out_arr[i], NULL); + if (item_data) { + item_data->userdata = ad; + } else { + SETTING_TRACE_ERROR("item_data is NULL"); + } + } + + // set toggle + int j; + for (j=0; j< sizeof(str_in_arr)/sizeof(str_in_arr[0]) ;j++) { + if (0 == strcmp(str_in_arr[j], curmode)) { + elm_radio_value_set(radio, j); + break; + } + } + + item = elm_genlist_item_append(genlist, &itc_bottom_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + setting_view_display_screen_mode.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int setting_display_screen_mode_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingDisplayUG *ad = (SettingDisplayUG *) cb; + + elm_naviframe_item_pop(ad->navi_bar); + + setting_view_display_screen_mode.is_create = 0; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_display_screen_mode_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + return SETTING_RETURN_SUCCESS; +} + +static int setting_display_screen_mode_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingDisplayUG *ad = (SettingDisplayUG *) cb; + + setting_display_screen_mode_destroy(ad); + + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +static void +setting_display_screen_mode_click_softkey_back_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, + "[Setting > Display] Data parameter is NULL"); + + SettingDisplayUG *ad = (SettingDisplayUG *) data; + + setting_view_change(&setting_view_display_screen_mode, &setting_view_display_main, ad); + SETTING_TRACE_END; +} + + +static void +setting_display_screen_mode_mouse_up_Gendial_list_radio_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + setting_retm_if(event_info == NULL, + "Invalid argument: event info is NULL"); + + Evas_Object *radio = (Evas_Object *) data; + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + //SettingDisplayUG *ad = (SettingDisplayUG *) list_item->userdata; + + elm_radio_value_set(radio, list_item->chk_status); + vconf_set_str(VCONFKEY_SETAPPL_SCREENMODE_SELNAME, str_in_arr[list_item->chk_status]); + /* Set status to device manager */ + device_set_image_enhance_mode(list_item->chk_status); + SETTING_TRACE(">>> AFTER VCONF SET : %s ", str_in_arr[list_item->chk_status]); +} diff --git a/setting-display/src/setting-display-wallpaper.c b/setting-display/src/setting-display-wallpaper.c new file mode 100755 index 0000000..d9ca019 --- /dev/null +++ b/setting-display/src/setting-display-wallpaper.c @@ -0,0 +1,476 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include + +static int setting_display_wallpaper_create(void *cb); +static int setting_display_wallpaper_destroy(void *cb); +static int setting_display_wallpaper_update(void *cb); +static int setting_display_wallpaper_cleanup(void *cb); + +setting_view setting_view_display_wallpaper = { + .create = setting_display_wallpaper_create, + .destroy = setting_display_wallpaper_destroy, + .update = setting_display_wallpaper_update, + .cleanup = setting_display_wallpaper_cleanup, +}; + +#define SETTING_WALLPAPER_HOME_SCREEN "Wallpaper" // ug-image-viewer parameter +#define SETTING_WALLPAPER_LOCK_SCREEN "Lockscreen" // ug-image-viewer parameter +#define SETTING_WALLPAPER_HOME_AND_LOCK "Wallpaper & Lockscreen" // ug-image-viewer parameter +#define SETTING_WALLPAPER_POPUP_TIMER 3 +/* *************************************************** + * + *basic func + * + ***************************************************/ +#if DISABLED_CODE +static void __setting_display_wallpaper_vconf_change_cb(keynode_t *key, void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingDisplayUG *ad = (SettingDisplayUG *)data; + + char *vconf_name = vconf_keynode_get_name(key); + + if (!safeStrCmp(vconf_name, VCONFKEY_BGSET)) { + if (ad->cur_sel == WALLPAPER_CUR_SEL_LOCK_SCREEN) { + ad->cur_sel = WALLPAPER_CUR_SEL_HOME_AND_LOCK_SCREEN; + } else if (ad->cur_sel == WALLPAPER_CUR_SEL_NONE) { + ad->cur_sel = WALLPAPER_CUR_SEL_HOME_SCREEN; + } else { + /* do nothing */ + } + } else if (!safeStrCmp(vconf_name, VCONFKEY_IDLE_LOCK_BGSET)) { + if (ad->cur_sel == WALLPAPER_CUR_SEL_HOME_SCREEN) { + ad->cur_sel = WALLPAPER_CUR_SEL_HOME_AND_LOCK_SCREEN; + } else if (ad->cur_sel == WALLPAPER_CUR_SEL_NONE) { + ad->cur_sel = WALLPAPER_CUR_SEL_LOCK_SCREEN; + } else { + /* do nothing */ + } + } +} + +static int __setting_display_wallpaper_listen_vconf_change(void *data) +{ + SETTING_TRACE_BEGIN; + int ret = 0; + ret = vconf_notify_key_changed(VCONFKEY_BGSET, + __setting_display_wallpaper_vconf_change_cb, data); + setting_retvm_if(ret < 0, ret, "%s notifications Failed(%d)", (char *)VCONFKEY_BGSET, ret); + + ret = vconf_notify_key_changed(VCONFKEY_IDLE_LOCK_BGSET, + __setting_display_wallpaper_vconf_change_cb, data); + setting_retvm_if(ret < 0, ret, "%s notifications Failed(%d)", (char *)VCONFKEY_IDLE_LOCK_BGSET, ret); + return ret; +} + +static int __setting_display_wallpaper_unlisten_vconf_change() +{ + SETTING_TRACE_BEGIN; + (void)vconf_ignore_key_changed(VCONFKEY_BGSET, + __setting_display_wallpaper_vconf_change_cb); + (void)vconf_ignore_key_changed(VCONFKEY_IDLE_LOCK_BGSET, + __setting_display_wallpaper_vconf_change_cb); + return 0; +} +#endif + +static void __setting_display_wallpaper_imageviewer_ug_result_cb(ui_gadget_h ug, service_h result, void *priv) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(priv == NULL, "Data parameter is NULL"); + + SettingDisplayUG *ad = (SettingDisplayUG *) priv; + + if (result) { + char *path = NULL; + switch(ad->cur_sel) { + case WALLPAPER_CUR_SEL_HOME_SCREEN: + { + service_get_extra_data(result, "homescreen_path", &path); + if (path == NULL) { + ad->wallpaper_changed = EINA_FALSE; + return; + } + break; + } + case WALLPAPER_CUR_SEL_LOCK_SCREEN: + { + service_get_extra_data(result, "lockscreen_path", &path); + if (path == NULL) { + ad->wallpaper_changed = EINA_FALSE; + return; + } + break; + } + case WALLPAPER_CUR_SEL_HOME_AND_LOCK_SCREEN: + { + service_get_extra_data(result, "homescreen_path", &path); + if (path == NULL) { + ad->wallpaper_changed = EINA_FALSE; + return; + } + service_get_extra_data(result, "lockscreen_path", &path); + if (path == NULL) { + ad->wallpaper_changed = EINA_FALSE; + return; + } + break; + } + default: + ad->wallpaper_changed = EINA_FALSE; + return; + } + + ad->wallpaper_changed = EINA_TRUE; + } +} + +static void __setting_display_wallpaper_imageviewer_ug_destroy_cb(ui_gadget_h ug, void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(priv == NULL, "Data parameter is NULL"); + SettingDisplayUG *ad = (SettingDisplayUG *) priv; /* ad is point to priv */ + + if (ug) { + ug_destroy(ug); + ad->ug_imageviewer = NULL; + } + + if (ad->wallpaper_changed) { + if (ad->ug_gallery) { + ug_destroy(ad->ug_gallery); + ad->ug_gallery = NULL; + } + + char text[MAX_DISPLAY_NAME_LEN_ON_UI +1] = {0, }; + SETTING_TRACE("cur_sel = %d", ad->cur_sel); + + switch(ad->cur_sel) { + case WALLPAPER_CUR_SEL_HOME_SCREEN: + snprintf(text, MAX_DISPLAY_NAME_LEN_ON_UI, "%s", SETTING_WALLPAPER_HOME_SCREEN_CHANGED); + break; + case WALLPAPER_CUR_SEL_LOCK_SCREEN: + snprintf(text, MAX_DISPLAY_NAME_LEN_ON_UI, "%s", SETTING_WALLPAPER_LOCK_SCREEN_CHANGED); + break; + case WALLPAPER_CUR_SEL_HOME_AND_LOCK_SCREEN: + snprintf(text, MAX_DISPLAY_NAME_LEN_ON_UI, "%s", SETTING_WALLPAPER_HOME_AND_LOCK_SCREEN_CHANGED); + break; + default: + ad->cur_sel = WALLPAPER_CUR_SEL_NONE; + return; + } + + setting_create_sel_info_popup(ad->view_layout, + &(ad->selInfoPop_layout), + &(ad->selInfoPop)); + elm_notify_timeout_set(ad->selInfoPop, SETTING_WALLPAPER_POPUP_TIMER); + + edje_object_part_text_set(_EDJ(ad->selInfoPop_layout), "elm.text", text); + ad->cur_sel = WALLPAPER_CUR_SEL_NONE; + ad->wallpaper_changed = EINA_FALSE; + } else { + SETTING_TRACE("wallpaper not changed"); + } +} + +static void __setting_display_wallpaper_gallery_ug_result_cb(ui_gadget_h ug, service_h result, void *priv) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(priv == NULL, "Data parameter is NULL"); + + SettingDisplayUG *ad = (SettingDisplayUG *) priv; + + if (result) { + char *path = NULL; + service_get_extra_data(result, "path", &path); + setting_retm_if(path == NULL, "path is NULL"); + + service_h service; + if (service_create(&service)) { + return; + } + + service_add_extra_data(service, "Path", path); + service_add_extra_data(service, "View Mode", "SETAS"); + + SETTING_TRACE("Path = %s", path); + + switch(ad->cur_sel) { + case WALLPAPER_CUR_SEL_HOME_SCREEN: + service_add_extra_data(service, "Setas type", SETTING_WALLPAPER_HOME_SCREEN); + break; + case WALLPAPER_CUR_SEL_LOCK_SCREEN: + service_add_extra_data(service, "Setas type", SETTING_WALLPAPER_LOCK_SCREEN); + break; + case WALLPAPER_CUR_SEL_HOME_AND_LOCK_SCREEN: + service_add_extra_data(service, "Setas type", SETTING_WALLPAPER_HOME_AND_LOCK); + break; + default: + service_destroy(service); + SETTING_TRACE_ERROR("ad->cur_sel is error"); + return; + } + + struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs)); + if (!cbs) { + service_destroy(service); + return; + } + + cbs->layout_cb = setting_display_layout_ug_cb; + cbs->result_cb = __setting_display_wallpaper_imageviewer_ug_result_cb; + cbs->destroy_cb = __setting_display_wallpaper_imageviewer_ug_destroy_cb; + cbs->priv = (void *)ad; + + ad->ug_imageviewer = ug_create(ad->ug, "image-viewer-efl", UG_MODE_FULLVIEW, service, cbs); + + if (NULL == ad->ug_imageviewer) { /* error handling */ + SETTING_TRACE_ERROR("NULL == ad->ug_imageviewer"); + setting_create_simple_popup(ad, ad->win_get, NULL, _(UNSUPPORTED_FUNCTION)); + } + + service_destroy(service); + FREE(cbs); + } +} + +static void __setting_display_wallpaper_gallery_ug_destroy_cb(ui_gadget_h ug, void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(priv == NULL, "Data parameter is NULL"); + SettingDisplayUG *ad = (SettingDisplayUG *) priv; /* ad is point to priv */ + + if (ad->ug_imageviewer == NULL) { + ug_destroy(ug); + ad->ug_gallery = NULL; + } else { + return; + } + + Elm_Object_Item *navi_it = elm_naviframe_top_item_get(ad->navi_bar); + retm_if(navi_it == NULL, "navi_it is NULL"); + Evas_Object *back_btn = elm_object_item_part_content_get(navi_it, "prev_btn"); + + if (back_btn != NULL) { + elm_object_style_set(back_btn, NAVI_BACK_BUTTON_STYLE); /* take into effect */ + } +} + +static void __setting_display_wallpaper_ug_launch(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingDisplayUG *ad = (SettingDisplayUG *) data; + + service_h svc; + if (service_create(&svc)) { + return; + } + + service_add_extra_data(svc, "launch-type", "select-one"); + service_add_extra_data(svc, "file-type", "image"); + + struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs)); + if (!cbs) { + service_destroy(svc); + return; + } + + cbs->layout_cb = setting_display_layout_ug_cb; + cbs->result_cb = __setting_display_wallpaper_gallery_ug_result_cb; + cbs->destroy_cb = __setting_display_wallpaper_gallery_ug_destroy_cb; + cbs->priv = (void *)ad; + + ad->ug_gallery = ug_create(ad->ug, "gallery-efl", UG_MODE_FULLVIEW, svc, cbs); + SETTING_TRACE("ad->ug_gallery = %p", ad->ug_gallery); + + if (NULL == ad->ug_gallery) { /* error handling */ + SETTING_TRACE_ERROR("NULL == ad->ug_gallery"); + setting_create_simple_popup(ad, ad->win_get, NULL, _(UNSUPPORTED_FUNCTION)); + } + + service_destroy(svc); + FREE(cbs); +} + +static void __setting_display_wallpaper_mouse_up_Gendial_list_cb(void *data, Evas_Object * obj, void *event_info) +{ + //error check + setting_retm_if(data == NULL, "Data parameter is NULL"); + setting_retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + SettingDisplayUG *ad = (SettingDisplayUG *) data; + + if (!safeStrCmp("IDS_ST_MBODY_HOME_SCREEN_WALLPAPER", list_item->keyStr)) { + ad->cur_sel = WALLPAPER_CUR_SEL_HOME_SCREEN; + __setting_display_wallpaper_ug_launch(ad); + } else if (!safeStrCmp("IDS_ST_MBODY_LOCK_SCREEN_WALLPAPER_M_NOUN", list_item->keyStr)) { + ad->cur_sel = WALLPAPER_CUR_SEL_LOCK_SCREEN; + __setting_display_wallpaper_ug_launch(ad); + } else if (!safeStrCmp(SETTING_WALLPAPER_HOME_AND_LOCK_SCREEN, list_item->keyStr)) { + ad->cur_sel = WALLPAPER_CUR_SEL_HOME_AND_LOCK_SCREEN; + __setting_display_wallpaper_ug_launch(ad); + } else { + /* do nothing */ + } + +} + +static int setting_display_wallpaper_create(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingDisplayUG *ad = (SettingDisplayUG *) cb; /* ad is point to cb */ + ad->cur_sel = WALLPAPER_CUR_SEL_NONE; + + Evas_Object *controllbar = NULL; + Evas_Object *scroller = NULL; + scroller = elm_genlist_add(ad->win_main_layout); + elm_object_style_set(scroller, "dialogue"); + retvm_if(scroller == NULL, SETTING_RETURN_FAIL, "Cannot set scroller object as contento of layout"); + elm_genlist_clear(scroller); /* first to clear list */ + + ad->ly_wall = setting_create_layout_navi_bar(ad->win_main_layout, ad->win_get, + _(KeyStr_Wallpaper), + _("IDS_COM_BODY_BACK"), NULL, NULL, + setting_display_wallpaper_click_softkey_cancel_cb, + NULL, NULL, ad, scroller, + &ad->navi_bar, &controllbar); + + Elm_Object_Item *item = NULL; + item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + ad->data_home_screen = + setting_create_Gendial_field_def(scroller, &(ad->itc_1text), + __setting_display_wallpaper_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, "IDS_ST_MBODY_HOME_SCREEN_WALLPAPER", + NULL, NULL); + if (ad->data_home_screen) { + ad->data_home_screen->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->screen_reader is NULL"); + return SETTING_RETURN_FAIL; + } + + ad->data_lock_screen = + setting_create_Gendial_field_def(scroller, &(ad->itc_1text), + __setting_display_wallpaper_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, "IDS_ST_MBODY_LOCK_SCREEN_WALLPAPER_M_NOUN", + NULL, NULL); + if (ad->data_lock_screen) { + ad->data_lock_screen->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->screen_reader is NULL"); + return SETTING_RETURN_FAIL; + } + + ad->data_home_lock_screen = + setting_create_Gendial_field_def(scroller, &(ad->itc_1text), + __setting_display_wallpaper_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, SETTING_WALLPAPER_HOME_AND_LOCK_SCREEN, + NULL, NULL); + if (ad->data_home_lock_screen) { + ad->data_home_lock_screen->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->screen_reader is NULL"); + return SETTING_RETURN_FAIL; + } + + ad->wallpaper_changed = EINA_FALSE; + setting_view_display_wallpaper.is_create = 1; +#if DISABLED_CODE + __setting_display_wallpaper_listen_vconf_change(ad); +#endif + return SETTING_RETURN_SUCCESS; +} + +static int setting_display_wallpaper_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingDisplayUG *ad = (SettingDisplayUG *) cb; /* ad is point to cb */ +#if DISABLED_CODE + __setting_display_wallpaper_unlisten_vconf_change(); +#endif + + if (ad->selInfoPop) { + evas_object_del(ad->selInfoPop); + ad->selInfoPop = NULL; + } + + if (ad->ly_wall != NULL) { + evas_object_del(ad->ly_wall); + ad->ly_wall = NULL; + } + setting_view_display_wallpaper.is_create = 0; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_display_wallpaper_update(void *cb) +{ + return SETTING_RETURN_SUCCESS; +} + +static int setting_display_wallpaper_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void +setting_display_wallpaper_click_softkey_cancel_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + SettingDisplayUG *ad = (SettingDisplayUG *) data; /* ad is point to cb */ + + /* called when this shared gadget is terminated. similar with app_exit */ + /* Send destroy request */ + ug_destroy_me(ad->ug); +} diff --git a/setting-display/src/setting-display.c b/setting-display/src/setting-display.c new file mode 100755 index 0000000..4caf22e --- /dev/null +++ b/setting-display/src/setting-display.c @@ -0,0 +1,457 @@ +/* + * setting + * Copyright (c) 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://floralicense.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. + */ + +/** + *@defgroup setting-display + *UG creation code for setting-display + * + * - Screen Mode + * - Backlight time + * - Smart Screen + * - Battery percentage + */ + +#include +#include + +#define SETTING_BRIGHTNESS_DEFAULT_LEVEL 60 + +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif + +setting_view *__get_display_view_to_load(service_h service) +{ + SETTING_TRACE_BEGIN; + + char *viewtype = NULL; + + service_get_extra_data(service, "viewtype", &viewtype); + if(!viewtype) + return NULL; + + SETTING_TRACE("viewtype:%s", viewtype); + + if (!safeStrCmp(viewtype, "brightness")) { + setting_view_node_table_register(&setting_view_display_brightness, + NULL); + return &setting_view_display_brightness; + } else if (!safeStrCmp(viewtype, "wallpaper")) { + setting_view_node_table_register(&setting_view_display_wallpaper, NULL); + return &setting_view_display_wallpaper; + } else { + setting_view_node_table_register(&setting_view_display_main, NULL); + setting_view_node_table_register(&setting_view_display_screen_mode, + &setting_view_display_main); + setting_view_node_table_register(&setting_view_display_brightness, + &setting_view_display_main); + return &setting_view_display_main; + } + +} + +Evas_Object *__get_display_layout_to_return(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + SettingDisplayUG *displayUG = priv; + char *viewtype = NULL; + + service_get_extra_data(service, "viewtype", &viewtype); + if(!viewtype) + return NULL; + + SETTING_TRACE("viewtype:%s", viewtype); + + if (!safeStrCmp(viewtype, "wallpaper")) { + return displayUG->ly_wall; + } else { + return displayUG->ly_main; + } + +} + +static void setting_display_ug_cb_resize(void *data, Evas *e, + Evas_Object *obj, void *event_info) +{ + SettingDisplayUG *ad = (SettingDisplayUG *) data; + setting_view_update(ad->view_to_load, ad); +} + +static void *setting_display_ug_on_create(ui_gadget_h ug, + enum ug_mode mode, service_h service, + void *priv) +{ + setting_retvm_if((!priv), NULL, "!priv"); + + SettingDisplayUG *displayUG = priv; + displayUG->ug = ug; + setting_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR); + + displayUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug); + displayUG->win_get = (Evas_Object *) ug_get_window(); + + evas_object_show(displayUG->win_main_layout); + displayUG->evas = evas_object_evas_get(displayUG->win_main_layout); + + setting_retvm_if(displayUG->win_main_layout == NULL, NULL, + "cannot get main window "); + + + /* register view node table */ + setting_view_node_table_intialize(); + + setting_create_Gendial_itc("dialogue/2text.3", + &(displayUG->itc_2text_2)); + setting_create_Gendial_itc("dialogue/1text.1icon", + &(displayUG->itc_1text_1icon)); + setting_create_Gendial_itc("dialogue/2text.3/expandable", + &(displayUG->itc_2text_3_parent)); + setting_create_Gendial_itc("dialogue/1text.1icon/expandable2", + &(displayUG->itc_1icon_1text_sub)); + setting_create_Gendial_itc("dialogue/1text", &(displayUG->itc_1text)); + + displayUG->itc_seperator.item_style = "dialogue/separator"; + displayUG->itc_seperator.func.text_get = NULL; + displayUG->itc_seperator.func.content_get = NULL; + displayUG->itc_seperator.func.state_get = NULL; + displayUG->itc_seperator.func.del = NULL; + + /* creating a view. */ + displayUG->view_to_load = __get_display_view_to_load(service); + setting_retvm_if(NULL == displayUG->view_to_load, NULL, + "NULL == displayUG->view_to_load"); + setting_view_node_set_cur_view(displayUG->view_to_load); + setting_view_create(displayUG->view_to_load, (void *)displayUG); + evas_object_event_callback_add(displayUG->win_main_layout, + EVAS_CALLBACK_RESIZE, + setting_display_ug_cb_resize, displayUG); + return __get_display_layout_to_return(service, displayUG); +} + +static void setting_display_ug_on_start(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_display_ug_on_pause(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_display_ug_on_resume(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_display_ug_on_destroy(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if((!priv), "!priv"); + SettingDisplayUG *displayUG = priv; + + /* fix flash issue for gallery */ + evas_object_event_callback_del(displayUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_display_ug_cb_resize); + displayUG->ug = ug; + + /* called when this shared gadget is terminated. similar with app_exit */ + if (&setting_view_display_main == displayUG->view_to_load) { + setting_view_destroy(&setting_view_display_brightness, + displayUG); + setting_view_destroy(&setting_view_display_screen_mode, displayUG); + setting_view_destroy(&setting_view_display_main, displayUG); + } else if (&setting_view_display_wallpaper == displayUG->view_to_load) { + setting_view_destroy(&setting_view_display_wallpaper, + displayUG); + } else if (&setting_view_display_brightness == displayUG->view_to_load) { + setting_view_destroy(&setting_view_display_brightness, + displayUG); + } + + if (NULL != ug_get_layout(displayUG->ug)) { + evas_object_hide((Evas_Object *) ug_get_layout(displayUG->ug)); + evas_object_del((Evas_Object *) ug_get_layout(displayUG->ug)); + } + + SETTING_TRACE_END; +} + +static void setting_display_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; +} + +static void setting_display_ug_on_event(ui_gadget_h ug, + enum ug_event event, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + 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; + case UG_EVENT_REGION_CHANGE: + break; + default: + break; + } +} + +static void setting_display_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + SettingDisplayUG *ad = (SettingDisplayUG *) priv; + + switch (event) { + case UG_KEY_EVENT_END: + { + if (elm_naviframe_top_item_get(ad->navi_bar) == + elm_naviframe_bottom_item_get(ad->navi_bar)) { + ug_destroy_me(ug); + } else { + if (&setting_view_display_brightness == + setting_view_node_get_cur_view()) { + } + setting_view_cb_at_endKey(ad); + } + } + break; + default: + break; + } +} + +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + SettingDisplayUG *displayUG = calloc(1, sizeof(SettingDisplayUG)); + setting_retvm_if(!displayUG, -1, "Create SettingDisplayUG obj failed"); + + ops->create = setting_display_ug_on_create; + ops->start = setting_display_ug_on_start; + ops->pause = setting_display_ug_on_pause; + ops->resume = setting_display_ug_on_resume; + ops->destroy = setting_display_ug_on_destroy; + ops->message = setting_display_ug_on_message; + ops->event = setting_display_ug_on_event; + ops->key_event = setting_display_ug_on_key_event; + ops->priv = displayUG; + ops->opt = UG_OPT_INDICATOR_ENABLE; + + return 0; +} + +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + struct SettingDisplayUG *displayUG; + setting_retm_if(!ops, "ops == NULL"); + + displayUG = ops->priv; + if (displayUG) { + FREE(displayUG); + } +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +void setting_display_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode, + void *priv) +{ + SettingDisplayUG *ad = (SettingDisplayUG *) priv; + Evas_Object *base; + + if (!priv) + return; + SETTING_TRACE_BEGIN; + + base = (Evas_Object *) ug_get_layout(ug); + if (!base) + return; + + switch (mode) { + case UG_MODE_FULLVIEW: + evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + //elm_win_resize_object_add(ad->win_get, base); + evas_object_show(base); + break; + default: + break; + } + + SETTING_TRACE_END; +} + +/* NESTED*/ +static int setting_reset_display_brightness(void) +{ + SETTING_TRACE_BEGIN; + int ret = 0; + + ret += vconf_set_int(VCONFKEY_SETAPPL_BRIGHTNESS_AUTOMATIC_INT, SETTING_BRIGHTNESS_AUTOMATIC_OFF); + + if(isEmulBin()) + { + ret += vconf_set_int(VCONFKEY_SETAPPL_LCD_BRIGHTNESS, SETTING_BRIGHTNESS_DEFAULT_LEVEL); +#if USE_DEVICE_SET_DISPLAY_BRT + ret += device_set_brightness_to_settings(BRIGHTNESS_DISPLAY, SETTING_BRIGHTNESS_DEFAULT_LEVEL); +#endif + } + else + { + ret += vconf_set_int(VCONFKEY_SETAPPL_LCD_BRIGHTNESS, SETTING_BRIGHTNESS_DEFAULT_LEVEL); +#if USE_DEVICE_SET_DISPLAY_BRT + ret += device_set_brightness_to_settings(BRIGHTNESS_DISPLAY, SETTING_BRIGHTNESS_DEFAULT_LEVEL); +#endif + } + SETTING_TRACE_END; + return ret; +} + +/* NESTED*/ +static int setting_reset_display_backlight(void) +{ + SETTING_TRACE_BEGIN; + int ret = 0; +#if SUPPORT_LCD_TIMEOUT_KEEPING + ret += vconf_set_int(VCONFKEY_LCD_TIMEOUT_NORMAL_BACKUP, 0); +#else + if(isEmulBin()) + ret += vconf_set_int(VCONFKEY_SETAPPL_LCD_TIMEOUT_NORMAL, 600); + else + ret += vconf_set_int(VCONFKEY_SETAPPL_LCD_TIMEOUT_NORMAL, 30); +#endif + SETTING_TRACE_END; + return ret; +} + +/* NESTED*/ +static int setting_reset_home_wallpaper(void) +{ + SETTING_TRACE_BEGIN; + int ret = 0; + ret += vconf_set_str(VCONFKEY_BGSET, IMG_DEFAULT_HOME_SCREEN); + SETTING_TRACE_END; + return ret; +} + +/* NESTED*/ +static int setting_reset_display_lc_screen(void) +{ + SETTING_TRACE_BEGIN; + int ret = 0; + ret += vconf_set_str(VCONFKEY_IDLE_LOCK_BGSET, IMG_DEFAULT_HOME_SCREEN); + ret += setting_invoke_reset_function("setting-lock", 0, NULL); + return ret; +} + +static void setting_reset_launch_effect() +{ + SETTING_TRACE_BEGIN; + Evas_Object *win_main = ug_get_window(); + Ecore_X_Window xwin = elm_win_xwindow_get(win_main); + Ecore_X_Window root = 0; + if (0 != xwin) + { + root = ecore_x_window_root_get(xwin); + } + if (0 != root) + { + Ecore_X_Atom effect_enable_atom = ecore_x_atom_get("_NET_CM_EFFECT_ENABLE"); + ret_if(!effect_enable_atom); + unsigned int is_enable = 0; + ecore_x_window_prop_card32_set(root, effect_enable_atom, &is_enable, 1); + } + +} + +/* NESTED*/ +/** @todo setting_display_main_effect_set_value work? */ +static int setting_reset_display_main(void) +{ + SETTING_TRACE_BEGIN; + int ret = 0; + ret += setting_reset_display_backlight(); + //ret += setting_reset_display_brightness(); + + ret += vconf_set_bool(VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL, FALSE);//battery percent + setting_reset_launch_effect(); + + ret += vconf_set_bool(VCONFKEY_SETAPPL_BOOL_AUTO_ADJUST_SCREEN_TONE, TRUE); + + // screen mode + ret += vconf_set_str(VCONFKEY_SETAPPL_SCREENMODE_SELNAME, "Dynamic"); + device_set_image_enhance_mode(0); // 0 => Dynamic + return ret; +} + + + +/*****/ +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + + int ret = 0; + char *ug_type = NULL; + + service_get_extra_data(service, "viewtype", &ug_type); + SETTING_TRACE("ug_type:%s", ug_type); + if (0 == safeStrCmp(ug_type, "wallpaper")) { + /*ret += setting_reset_home_wallpaper(); + ret += setting_reset_display_lc_screen();*/ +#if SUPPORT_RUN_SYSTEM_COMMAND + ret += excuteCmd(SETTING_POSTINST_FILE, 1, "wallpaper"); + ret += setting_invoke_reset_function("setting-lock", service, NULL); +#else + ret += setting_reset_home_wallpaper(); + ret += setting_reset_display_lc_screen(); +#endif + + } else if (0 == safeStrCmp(ug_type, "main")) { +#if SUPPORT_RUN_SYSTEM_COMMAND + ret += excuteCmd(SETTING_POSTINST_FILE, 1, "display"); + setting_reset_launch_effect(); +#else + ret += setting_reset_display_main(); +#endif + } else if (0 == safeStrCmp(ug_type, "brightness")) { + ret += setting_reset_display_brightness(); + } + return ret; +} + +/*****/ diff --git a/setting-fileview/CMakeLists.txt b/setting-fileview/CMakeLists.txt new file mode 100755 index 0000000..c12ac0b --- /dev/null +++ b/setting-fileview/CMakeLists.txt @@ -0,0 +1,37 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) + +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_fileview REQUIRED + elementary appcore-common appcore-efl ui-gadget-1 capi-appfw-application evas ecore ewebkit2) + +FOREACH(flag ${pkgs_fileview_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") +SET(CMAKE_LDFLAGS "-Wl,-z,nodelete") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") +ADD_DEFINITIONS("-fpie") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") + +ADD_LIBRARY(${SETTING_FILEVIEW_UG} SHARED + src/setting-fileview.c + src/setting-fileview-main.c +) + +TARGET_LINK_LIBRARIES(${SETTING_FILEVIEW_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON}/ -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_FILEVIEW_UG} ${CMAKE_LDFLAGS} ${pkgs_fileview_LDFLAGS}) + +INSTALL(TARGETS ${SETTING_FILEVIEW_UG} DESTINATION /usr/ug/lib) diff --git a/setting-fileview/include/setting-fileview-main.h b/setting-fileview/include/setting-fileview-main.h new file mode 100755 index 0000000..3e0e009 --- /dev/null +++ b/setting-fileview/include/setting-fileview-main.h @@ -0,0 +1,23 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_FILEVIEW_LICENCES_H__ +#define __SETTING_FILEVIEW_LICENCES_H__ + +#include + +static void setting_fileview_click_back_cb(void *data, Evas_Object *obj, void *event_info); +#endif /* __SETTING_FILEVIEW_LICENCES_H__ */ diff --git a/setting-fileview/include/setting-fileview.h b/setting-fileview/include/setting-fileview.h new file mode 100755 index 0000000..2217147 --- /dev/null +++ b/setting-fileview/include/setting-fileview.h @@ -0,0 +1,47 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_FILEVIEW_H__ +#define __SETTING_FILEVIEW_H__ + +#include +#include +#include +#include +#include + +typedef struct _SettingFileviewUG SettingFileviewUG; + +/** + * Setting About UG context + * all UG function has void* as an agument. this is casted back to SettingFileviewUG + * and the functions access app context. + */ +struct _SettingFileviewUG { + ui_gadget_h ug; + Evas *evas; + Evas_Object *win_main_layout; + Evas_Object *win_get; + Evas_Object *navi_bar; + Evas_Object *ly_main; + Evas_Object *progress_bar; + char *input_file; + char *input_title; + + Evas_Object *webkit; +}; +extern setting_view setting_view_fileview_main; +#endif /* __SETTING_FILEVIEW_H__ */ diff --git a/setting-fileview/src/setting-fileview-main.c b/setting-fileview/src/setting-fileview-main.c new file mode 100755 index 0000000..f1960ea --- /dev/null +++ b/setting-fileview/src/setting-fileview-main.c @@ -0,0 +1,182 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 + +#define SETTING_FILEVIEW_LEN 20 + +static int setting_fileview_create(void *cb); +static int setting_fileview_destroy(void *cb); +static int setting_fileview_update(void *cb); +static int setting_fileview_cleanup(void *cb); + +setting_view setting_view_fileview_main = { + .create = setting_fileview_create, + .destroy = setting_fileview_destroy, + .update = setting_fileview_update, + .cleanup = setting_fileview_cleanup, +}; + +/* *************************************************** + * + *basic func + * + ***************************************************/ +#if DISABLED_CODE +static Eina_Bool __web_on_idle(void *data) +{ + SETTING_TRACE_BEGIN; + SettingFileviewUG *ad = (SettingFileviewUG *) data; + if (ad->progress_bar) { + evas_object_del(ad->progress_bar); + ad->progress_bar = NULL; + } + return FALSE; +} +#endif +static void __setting_fileview_policy_navigation_decide(void *data, Evas_Object *webview, void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "data is NULL"); + setting_retm_if(event_info == NULL, "event_info is NULL"); + + //SettingFileviewUG *ad = (SettingFileviewUG *)data; + + // open url in local window + Ewk_Policy_Decision *policy_decision = (Ewk_Policy_Decision *)event_info; + + char *url = (char *)ewk_policy_decision_url_get(policy_decision); + char *scheme = (char *)ewk_policy_decision_scheme_get(policy_decision); + SETTING_TRACE("url : %s", url); + SETTING_TRACE("scheme : %s", scheme); + + /* if not launch broswer, do not call ewk_policy_decision_ignore */ + //ewk_policy_decision_ignore(policy_decision); +} + +static int setting_fileview_create(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingFileviewUG *ad = (SettingFileviewUG *) cb; + + Evas_Object *scroller; + //ad->progress_bar = setting_create_popup_with_progressbar(ad, ad->win_get, "pending_list", NULL, NULL, NULL, 0, TRUE, TRUE); + + ad->ly_main = setting_create_layout_navi_bar_scroller(ad->win_main_layout, + ad->win_get, + _(ad->input_title),//_("IDS_ST_BODY_OPEN_SOURCE_LICENCES"), + _("IDS_COM_BODY_BACK"), + NULL, + setting_fileview_click_back_cb, + NULL, ad, &scroller, + &(ad->navi_bar)); + + Evas *evas = evas_object_evas_get(ad->win_get); + Evas_Object *webview = ewk_view_add(evas); + ad->webkit = webview; + + SETTING_TRACE("ad->input_file:%s", ad->input_file); + ewk_view_url_set(webview, ad->input_file); + + elm_scroller_bounce_set(scroller, EINA_FALSE, EINA_FALSE); + + elm_object_content_set(scroller, webview); + evas_object_show(webview); + //ecore_idler_add(__web_on_idle, ad); + + evas_object_smart_callback_add(webview, "policy,navigation,decide", __setting_fileview_policy_navigation_decide, ad); + + service_h svc; + if (service_create(&svc)) { + return SETTING_RETURN_FAIL; + } + + setting_view_fileview_main.is_create = 1; + service_destroy(svc); + + return SETTING_RETURN_SUCCESS; +} + +static int setting_fileview_destroy(void *cb) +{ + /* error check */ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SettingFileviewUG *ad = (SettingFileviewUG *) cb; + evas_object_smart_callback_del(ad->webkit, "policy,navigation,decide", __setting_fileview_policy_navigation_decide); + + if (ad->webkit) { + evas_object_del(ad->webkit); + ad->webkit = NULL; + } + + if (ad->progress_bar) { + evas_object_del(ad->progress_bar); + ad->progress_bar = NULL; + } + + if (ad->ly_main != NULL) { + evas_object_del(ad->ly_main); + ad->ly_main = NULL; + setting_view_fileview_main.is_create = 0; + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_fileview_update(void *cb) +{ + SETTING_TRACE_BEGIN; + SettingFileviewUG *ad = (SettingFileviewUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_show(ad->ly_main); + } + return SETTING_RETURN_SUCCESS; + +} + +static int setting_fileview_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + SettingFileviewUG *ad = (SettingFileviewUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_hide(ad->ly_main); + } + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void +setting_fileview_click_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + /* error check */ + setting_retm_if(data == NULL, " Data parameter is NULL"); + + SettingFileviewUG *ad = (SettingFileviewUG *) data; + /* Send destroy request */ + ug_destroy_me(ad->ug); + return; +} diff --git a/setting-fileview/src/setting-fileview.c b/setting-fileview/src/setting-fileview.c new file mode 100755 index 0000000..19d0898 --- /dev/null +++ b/setting-fileview/src/setting-fileview.c @@ -0,0 +1,238 @@ +/* + * setting + * Copyright (c) 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://floralicense.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. + */ + +/** + *@defgroup setting-fileview + *UG creation code for setting-fileview + * html file viewer + */ + +#include +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif + +bool __parse_ug_argument(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + SettingFileviewUG *ad = priv; + ad->input_file = NULL; + + service_get_extra_data(service, "file", &(ad->input_file)); + setting_retvm_if(!ad->input_file, FALSE, "no arguement to specialize file"); + + ad->input_title = NULL; + + service_get_extra_data(service, "title", &(ad->input_title)); + setting_retvm_if(!ad->input_title, FALSE, "no arguement to title"); + SETTING_TRACE("ad->input_file:%s", ad->input_file); + SETTING_TRACE("ad->input_title:%s", ad->input_title); + return TRUE; +} + +/** +* Event process when the sizeof UG view changes +* +* @param data +* @param e +* @param obj +* @param event_info +*/ +static void setting_fileview_ug_cb_resize(void *data, Evas *e, Evas_Object *obj, + void *event_info) +{ + SettingFileviewUG *ad = (SettingFileviewUG *) data; + setting_view_update(&setting_view_fileview_main, ad); +} + +/** +* on_create function of the UG +* +* @param ug +* @param mode +* @param data +* @param priv +* +* @return +*/ +static void *setting_fileview_ug_on_create(ui_gadget_h ug, enum ug_mode mode, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if((NULL == priv), NULL, "NULL == priv"); + SettingFileviewUG *fileviewUG = priv; + fileviewUG->ug = ug; + + fileviewUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug); + fileviewUG->win_get = (Evas_Object *) ug_get_window(); + evas_object_show(fileviewUG->win_main_layout); + fileviewUG->evas = evas_object_evas_get(fileviewUG->win_main_layout); + + setting_retvm_if(fileviewUG->win_main_layout == NULL, NULL, + "cannot get main window "); + + /* creating a view. */ + if (!__parse_ug_argument(service, priv)) + { + SETTING_TRACE_ERROR("Invalid arguement"); + return NULL; + } + setting_view_create(&setting_view_fileview_main, (void *)fileviewUG); + evas_object_event_callback_add(fileviewUG->win_main_layout, + EVAS_CALLBACK_RESIZE, + setting_fileview_ug_cb_resize, fileviewUG); + return fileviewUG->ly_main; +} + +static void setting_fileview_ug_on_start(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_fileview_ug_on_pause(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; +} + +static void setting_fileview_ug_on_resume(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; +} + +/** +* on_destroy function of the UG +* +* @param ug +* @param data +* @param priv +*/ +static void setting_fileview_ug_on_destroy(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if((!priv), "!priv"); + SettingFileviewUG *fileviewUG = priv; + + evas_object_event_callback_del(fileviewUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_fileview_ug_cb_resize); /* fix flash issue for gallery */ + fileviewUG->ug = ug; + /* delete the allocated objects. */ + setting_view_destroy(&setting_view_fileview_main, fileviewUG); + + if (NULL != ug_get_layout(fileviewUG->ug)) { + evas_object_hide((Evas_Object *) ug_get_layout(fileviewUG->ug)); + evas_object_del((Evas_Object *) ug_get_layout(fileviewUG->ug)); + } + + SETTING_TRACE_END; +} + +static void setting_fileview_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; +} + +static void setting_fileview_ug_on_event(ui_gadget_h ug, enum ug_event event, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + 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; + case UG_EVENT_REGION_CHANGE: + break; + default: + break; + } +} + +static void setting_fileview_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + SettingFileviewUG *ad = (SettingFileviewUG *) priv; + + switch (event) { + case UG_KEY_EVENT_END: + { + if (elm_naviframe_top_item_get(ad->navi_bar) == + elm_naviframe_bottom_item_get(ad->navi_bar)) { + ug_destroy_me(ug); + } else { + /* elm_naviframe_item_pop(ad->navi_bar); */ + setting_view_cb_at_endKey(ad); + } + } + break; + default: + break; + } +} + +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + SettingFileviewUG *fileviewUG = calloc(1, sizeof(SettingFileviewUG)); + setting_retvm_if(!fileviewUG, -1, "Create SettingFileviewUG obj failed"); + + ops->create = setting_fileview_ug_on_create; + ops->start = setting_fileview_ug_on_start; + ops->pause = setting_fileview_ug_on_pause; + ops->resume = setting_fileview_ug_on_resume; + ops->destroy = setting_fileview_ug_on_destroy; + ops->message = setting_fileview_ug_on_message; + ops->event = setting_fileview_ug_on_event; + ops->key_event = setting_fileview_ug_on_key_event; + ops->priv = fileviewUG; + ops->opt = UG_OPT_INDICATOR_ENABLE; + + return 0; +} + +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + struct SettingFileviewUG *fileviewUG; + setting_retm_if(!ops, "ops == NULL"); + + fileviewUG = ops->priv; + if (fileviewUG) { + FREE(fileviewUG); + } +} + +/* *************************************************** + ** + **general func + ** + ****************************************************/ + diff --git a/setting-font/CMakeLists.txt b/setting-font/CMakeLists.txt new file mode 100755 index 0000000..9be6fee --- /dev/null +++ b/setting-font/CMakeLists.txt @@ -0,0 +1,36 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_font REQUIRED ecore ecore-file evas elementary appcore-common appcore-efl ui-gadget-1 capi-appfw-application +sysman fontconfig libxml-2.0 capi-system-system-settings) + +FOREACH(flag ${pkgs_font_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") +ADD_DEFINITIONS("-fpie") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") + +ADD_LIBRARY(${SETTING_FONT_UG} SHARED + ./src/setting-font.c + ./src/setting-font-main.c + ./src/setting-font-font-size.c + ) + +TARGET_LINK_LIBRARIES(${SETTING_FONT_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_FONT_UG} ${pkgs_font_LDFLAGS}) + +INSTALL(TARGETS ${SETTING_FONT_UG} DESTINATION /usr/ug/lib) diff --git a/setting-font/include/setting-font-font-size.h b/setting-font/include/setting-font-font-size.h new file mode 100644 index 0000000..2c7fa92 --- /dev/null +++ b/setting-font/include/setting-font-font-size.h @@ -0,0 +1,24 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_FONT_FONT_SIZE_H__ +#define __SETTING_FONT_FONT_SIZE_H__ + +#include +#include + +static void setting_font_font_size_list_mouse_up_cb(void *data, Evas_Object *obj, void *event_info); +#endif /* __SETTING_FONT_FONT_SIZE_H__ */ diff --git a/setting-font/include/setting-font-main.h b/setting-font/include/setting-font-main.h new file mode 100755 index 0000000..100093b --- /dev/null +++ b/setting-font/include/setting-font-main.h @@ -0,0 +1,32 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_FONT_MAIN_H__ +#define __SETTING_FONT_MAIN_H__ + +#include + +#define SETTING_FONT_POPUP_DESC "Do you want to change the font:" +#define SETTING_FONT_PRELOAD_FONT_PATH "/usr/share/fonts" +#define SETTING_FONT_DOWNLOADED_FONT_PATH "/opt/share/fonts" + +#define SETTING_FONT_TYPE_STR "IDS_ST_BODY_FONT_TYPE" +#define SETTING_FONT_SIZE_STR "IDS_ST_MBODY_FONT_SIZE" +#define SETTING_FONT_SIZE_DESC "IDS_ST_BODY_CHANGE_TEXT_SIZE_IN_CONTACTS_CALENDAR_MEMO_MESSAGES_EMAIL_AND_IM" + +#define SETTING_FONT_SIZE_ASK "Do you want to change font size?" + +#endif /* __SETTING_FONT_MAIN_H__ */ diff --git a/setting-font/include/setting-font.h b/setting-font/include/setting-font.h new file mode 100755 index 0000000..223eaa3 --- /dev/null +++ b/setting-font/include/setting-font.h @@ -0,0 +1,89 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_FONT_H__ +#define __SETTING_FONT_H__ + +#include +#include + +#include + +#include +#include + +typedef struct _SettingFontUG SettingFontUG; + +typedef enum +{ + FONT_SIZE_AND_FONT_SEL_UG, + FONT_SEL_VIEW_APPCONTROL, + FONT_SIZE_VIEW_APPCONTROL, +}FontUGViewMode; + + +/** + * Setting Font UG context + * all UG function has void* as an agument. this is casted back to SettingFontUG + * and the functions access app context. + */ +struct _SettingFontUG { + ui_gadget_h ug; + + /* add more variables here (move your appdata to here) */ + Evas *evas; + Evas_Object *win_main_layout; + Evas_Object *win_get; + + Evas_Object *ly_main; + + Evas_Object *genlist; + Evas_Object *navibar; + + /* font setting */ + Evas_Object *popup; + Elm_Genlist_Item_Class itc_2text_3_parent; + Elm_Genlist_Item_Class itc_1icon_1text_sub; + Elm_Genlist_Item_Class itc_1text_1icon_2; + Elm_Genlist_Item_Class itc_2text_2; + Elm_Genlist_Item_Class itc_group_item; + Elm_Genlist_Item_Class itc_bg_1icon; + Elm_Genlist_Item_Class itc_seperator; + + Setting_GenGroupItem_Data *subitem; + Setting_GenGroupItem_Data *font_type; + Setting_GenGroupItem_Data *font_size; + + // font type + int prev_font; + char *font_name; + + int ret_font_size; + + FontUGViewMode viewmode; + + // Font Size & Sel + Evas_Object *size_rdg; + setting_view *view_to_load; +}; + +extern setting_view setting_view_font_main; +extern setting_view setting_view_font_font_size; + +int setting_font_update_vconf_key(void *data, setting_vconf_type type, + int slp_key); + +#endif /* __SETTING_FONT_H__ */ diff --git a/setting-font/src/setting-font-font-size.c b/setting-font/src/setting-font-font-size.c new file mode 100755 index 0000000..c01bae0 --- /dev/null +++ b/setting-font/src/setting-font-font-size.c @@ -0,0 +1,258 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 + +typedef struct { + const char* key_font_name; + int font_size; +} settings_font_size_table; + +static char* result_str_arr[] = {"Small","Normal","Large","Huge","Giant"}; +static const settings_font_size_table font_size_table[] = { + {"IDS_EMAIL_POP_GIANT_M_TEXTSIZE", SYSTEM_SETTINGS_FONT_SIZE_GIANT}, + {"IDS_EMAIL_OPT_HUGE_M_TEXTSIZE", SYSTEM_SETTINGS_FONT_SIZE_HUGE}, + {"IDS_ST_BODY_TEXTSTYLE_LARGE", SYSTEM_SETTINGS_FONT_SIZE_LARGE}, + {"IDS_ST_BODY_NORMAL_T_PROFILE", SYSTEM_SETTINGS_FONT_SIZE_NORMAL}, + {"IDS_ST_BODY_SMALL_M_TEXTSIZE", SYSTEM_SETTINGS_FONT_SIZE_SMALL}, + {NULL, 0} + }; + +#define STR_FONT_SIZE_CHANGING "IDS_ST_BODY_CHANGING_THE_FONT_SIZE_IN_ACCESSIBILITY_SETTINGS_WILL_OVERRIDE_THE_FONT_SIZE_IN_EACH_APPLICATION" + +static void __setting_font_font_size_click_softkey_back_cb(void *data, Evas_Object * obj, void *event_info); + +static int setting_font_font_size_create(void *cb); +static int setting_font_font_size_destroy(void *cb); +static int setting_font_font_size_update(void *cb); +static int setting_font_font_size_cleanup(void *cb); + +setting_view setting_view_font_font_size = { + .create = setting_font_font_size_create, + .destroy = setting_font_font_size_destroy, + .update = setting_font_font_size_update, + .cleanup = setting_font_font_size_cleanup, +}; + +/* *************************************************** +** +** basic func +** +** **************************************************/ +static void __process_after_item_realized(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + SettingFontUG *ad = data; + if (ad->popup) + { + evas_object_del(ad->popup); + ad->popup = NULL; + } +} + +static int setting_font_font_size_create(void *cb) +{ + SETTING_TRACE_BEGIN; + //error check + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingFontUG *ad = (SettingFontUG *) cb; + Evas_Object *scroller; + + retvm_if(ad->win_main_layout == NULL, SETTING_DRAW_ERR_FAIL_LOAD_EDJ, + "win_main_layout is NULL"); + + // create a navigation bar + if (ad->view_to_load == &setting_view_font_font_size) { + ad->ly_main = setting_create_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _("IDS_ST_MBODY_FONT_SIZE"), + _("IDS_COM_BODY_BACK"), NULL, + __setting_font_font_size_click_softkey_back_cb, NULL, + ad, &scroller, &ad->navibar); + } else { + setting_push_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _("IDS_ST_MBODY_FONT_SIZE"), + _("IDS_COM_BODY_BACK"), + NULL, + __setting_font_font_size_click_softkey_back_cb, + NULL, + ad, &scroller, ad->navibar); + } + + // [UI] separator + Elm_Object_Item *item = + elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + // [UI] create the font list + ad->size_rdg = elm_radio_add(scroller); + elm_radio_state_value_set(ad->size_rdg, -1); + + int idx = 0; + Setting_GenGroupItem_Data *item_data; + while(font_size_table[idx].key_font_name) { + item_data = setting_create_Gendial_field_1radio(scroller, &(ad->itc_1text_1icon_2), + setting_font_font_size_list_mouse_up_cb, + ad->size_rdg, + SWALLOW_Type_1RADIO_1LABLE, + ad->size_rdg, font_size_table[idx].font_size, + font_size_table[idx].key_font_name, + NULL); + if(item_data) { + item_data->userdata = ad; + } else { + SETTING_TRACE_ERROR("item_data is null"); + return SETTING_RETURN_FAIL; + } + idx++; + } + + // [UI] help text + setting_create_Gendial_field_def(scroller, &(ad->itc_bg_1icon), NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, STR_FONT_SIZE_CHANGING, NULL, + NULL); + + // update check status - init values + setting_update_chk_status(ad->size_rdg, INT_SLP_SETTING_ACCESSIBILITY_FONT_SIZE); + setting_view_font_font_size.is_create = 1; + evas_object_smart_callback_add(scroller, "realized", __process_after_item_realized, ad); + return SETTING_RETURN_SUCCESS; +} + +static int setting_font_font_size_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + //error check + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SettingFontUG *ad = (SettingFontUG *) cb; + + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + + if (ad->view_to_load == &setting_view_font_font_size) { + if (ad->ly_main) { + evas_object_del(ad->ly_main); + ad->ly_main = NULL; + } + } else { + elm_naviframe_item_pop(ad->navibar); + } + setting_view_font_font_size.is_create = 0; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_font_font_size_update(void *cb) +{ + SETTING_TRACE_BEGIN; + // do nothing here + return SETTING_RETURN_SUCCESS; +} + +static int setting_font_font_size_cleanup(void *cb) +{ + //error check + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + setting_font_font_size_destroy(cb); + + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** +** +** general func +** +** **************************************************/ + +/* *************************************************** +** +** call back func +** +** **************************************************/ + +static void __setting_font_font_size_click_softkey_back_cb(void *data, Evas_Object * obj, void *event_info) +{ + //error check + ret_if(data == NULL); + SettingFontUG *ad = (SettingFontUG *) data; + + if (ad->view_to_load == &setting_view_font_font_size) { + + int err = 0; + int value = 0; + int ret = setting_get_int_slp_key(INT_SLP_SETTING_ACCESSIBILITY_FONT_SIZE, &value, &err); + setting_retm_if(ret != 0, "fail to get vconf"); + + service_h svc; + if (service_create(&svc)) return; + + service_add_extra_data(svc, "category", "FontSize"); + service_add_extra_data(svc, "FontSize", result_str_arr[value]); + + SETTING_TRACE(" SERVICE_ADD_EXTRA : %s %s","category", "FontSize"); + SETTING_TRACE(" SERVICE_ADD_EXTRA : %s %s","FontSize", result_str_arr[value]); + + ug_send_result(ad->ug, svc); + service_destroy(svc); + + ug_destroy_me(ad->ug); + } else { + setting_view_change(&setting_view_font_font_size, &setting_view_font_main, ad); + } +} + +static void setting_font_font_size_list_mouse_up_cb(void *data, Evas_Object *obj, void *event_info) +{ + /* error check */ + SETTING_TRACE_BEGIN; + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + setting_retm_if(data == NULL, "Data parameter is NULL"); + + SettingFontUG *ad = list_item->userdata; + Evas_Object *radio = data; + elm_radio_value_set(radio, list_item->chk_status); + int err = 0; + int ret = 0; + int old_value = -1; + ret = setting_get_int_slp_key(INT_SLP_SETTING_ACCESSIBILITY_FONT_SIZE, &old_value, &err); + + if (old_value == list_item->chk_status) return; + + //Due to long time taken by font Setting, add the block code when font is Setting. + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + ad->popup = setting_create_popup_with_progressbar(ad, ad->win_get, + "pending_list", + NULL, NULL, NULL, 0, TRUE, TRUE); + + ret = setting_set_int_slp_key(INT_SLP_SETTING_ACCESSIBILITY_FONT_SIZE, list_item->chk_status, &err); + setting_retm_if(ret == -1, "Failed to set vconf"); + font_size_set(); + } + diff --git a/setting-font/src/setting-font-main.c b/setting-font/src/setting-font-main.c new file mode 100755 index 0000000..9101210 --- /dev/null +++ b/setting-font/src/setting-font-main.c @@ -0,0 +1,627 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include +#include +#include +#include +#include +#include +#include + +#define SETTING_FONT_MAX_LEN 10 +#define FONT_BUF_SIZE 256 + +static int setting_font_main_create(void *cb); +static int setting_font_main_destroy(void *cb); +static int setting_font_main_update(void *cb); +static int setting_font_main_cleanup(void *cb); + +static void __setting_font_main_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info); + +setting_view setting_view_font_main = { + .create = setting_font_main_create, + .destroy = setting_font_main_destroy, + .update = setting_font_main_update, + .cleanup = setting_font_main_cleanup, +}; + + +/** + * [API] font-size + */ +static char* __setting_font_main_get_font_size(int value) +{ + const char* font_size_arr[] = { + _("IDS_ST_BODY_SMALL_M_TEXTSIZE"), // 0 + _("IDS_ST_BODY_NORMAL_T_PROFILE"), // 1 + _("IDS_ST_BODY_TEXTSTYLE_LARGE"), // 2 + _("IDS_EMAIL_OPT_HUGE_M_TEXTSIZE"), // 3 + _("IDS_EMAIL_POP_GIANT_M_TEXTSIZE"), // 4 + }; + switch (value) + { + case SYSTEM_SETTINGS_FONT_SIZE_SMALL: + return (char *)font_size_arr[0]; + case SYSTEM_SETTINGS_FONT_SIZE_NORMAL: + return (char *)font_size_arr[1]; + case SYSTEM_SETTINGS_FONT_SIZE_LARGE: + return (char *)font_size_arr[2]; + case SYSTEM_SETTINGS_FONT_SIZE_HUGE: + return (char *)font_size_arr[3]; + case SYSTEM_SETTINGS_FONT_SIZE_GIANT: + return (char *)font_size_arr[4]; + default: + return (char *)font_size_arr[1]; + } +} + + +/** + * [API] get a font list from current system + * REFACTORING: move this feature to system-settings + */ +static Eina_List *__setting_font_main_available_list_get() +{ + SETTING_TRACE_BEGIN + FcObjectSet *os = NULL; + FcFontSet *fs = NULL; + FcPattern *pat = NULL; + Eina_List *list = NULL; + FcConfig *font_config = NULL; + + font_config = FcInitLoadConfigAndFonts(); + + setting_retvm_if(font_config == NULL, NULL, "Failed: FcInitLoadConfigAndFonts"); + + pat = FcPatternCreate(); + + os = FcObjectSetBuild(FC_FAMILY, FC_FILE, (char *) 0); + + if (os) { + fs = FcFontList(font_config, pat, os); + FcObjectSetDestroy(os); + os = NULL; + } + + if (pat) { + FcPatternDestroy(pat); + pat = NULL; + } + + if (fs) { + int j; + SETTING_TRACE_DEBUG("fs->nfont = %d", fs->nfont); + + for (j = 0; j < fs->nfont; j++) { + FcChar8 *family = NULL; + FcChar8 *file = NULL; + + if (FcPatternGetString(fs->fonts[j], FC_FILE, 0, &file) == FcResultMatch) { + //SETTING_TRACE_DEBUG("FC_FILE : %s\n", file); + int preload_path_len = safeStrLen(SETTING_FONT_PRELOAD_FONT_PATH); + int download_path_len = safeStrLen(SETTING_FONT_DOWNLOADED_FONT_PATH); + if (!safeStrNCmp((const char*)file, SETTING_FONT_PRELOAD_FONT_PATH, preload_path_len) || + !safeStrNCmp((const char*)file, SETTING_FONT_DOWNLOADED_FONT_PATH, download_path_len)) { + if (FcPatternGetString(fs->fonts[j], FC_FAMILY, 0, &family) != FcResultMatch) { + SETTING_TRACE_DEBUG("Family name is invalid"); + continue; + } + + //SETTING_TRACE_DEBUG("family = %s", (char *)family); + if (eina_list_data_find(list, family) == NULL) { + list = eina_list_append(list, family); + /* list = eina_list_append(list, family); */ + // for TEST because there's 1 font on target. + } + } + } + } + FcFontSetDestroy(fs); + fs = NULL; + } + + FcConfigDestroy(font_config); + font_config = NULL; + return list; +} + +static void __setting_font_main_genlist_sel_cb(void *data, Evas_Object * obj, void *event_info) +{ + //error check + setting_retm_if(data == NULL, "Data parameter is NULL"); + + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *)elm_object_item_data_get(item); + + SettingFontUG *ad = (SettingFontUG *)data; + + if (ad->font_size == list_item) { + setting_view_change(&setting_view_font_main, &setting_view_font_font_size, ad); + } +} + + +int get_font_name_str(char* font_type_name, char* trans_font_type_name, int bufsize) +{ + if(safeStrCmp(font_type_name, "Choco cooky") == 0) + snprintf(trans_font_type_name, bufsize, "%s", _("IDS_ST_BODY_CHOCO_COOKY")); + else if(safeStrCmp(font_type_name, "Cool jazz") == 0) + snprintf(trans_font_type_name, bufsize, "%s", _("IDS_ST_BODY_COOL_JAZZ")); + else if (safeStrCmp(font_type_name, "HelveticaNeue") == 0) + snprintf(trans_font_type_name, bufsize, "%s", _("IDS_ST_BODY_HELVETICA_NEUE_M_FONT_NAME")); + else + snprintf(trans_font_type_name, bufsize, "%s", font_type_name); + + return 1; +} + +int get_font_name_tag(char* font_data, char* temp, int bufsize) +{ + SETTING_TRACE("font data : %s", (char*)font_data); + + char* pos = font_data; + char new_name[bufsize]; + int i=0; + int count = 0; + while(*pos != '\0') + { + SETTING_TRACE(">>> %c", *pos); + if (*pos == ' ') + { + SETTING_TRACE(">>> empty ' ' "); + new_name[count] = '\\'; + count++; + new_name[count] = ' '; + } else { + new_name[count] = font_data[i]; + } + + count++; + pos++; + i++; + } + new_name[count] = '\0'; + + SETTING_TRACE(">>> new_name length : %d : string : %s", count, (char*)new_name); + snprintf(temp, bufsize, "%s", new_name, font_data); + return 1; +} + +static void __setting_font_main_genlist_item_create(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == data, "data is NULL"); + + SettingFontUG *ad = (SettingFontUG *)data; + Elm_Object_Item *item = NULL; + + if (ad->viewmode == FONT_SIZE_AND_FONT_SEL_UG || ad->viewmode == FONT_SEL_VIEW_APPCONTROL) // font type only + { + // [UI] Font Type + item = elm_genlist_item_append(ad->genlist, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + char *font_type_name = NULL; + int ret = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_FONT_TYPE, &font_type_name); + SETTING_TRACE("---------------- system-setting call : (%s) ", font_type_name); + + #if 0 + char trans_font_type_name[256] = {0,}; + if(safeStrCmp(font_type_name, "Choco cooky") == 0) + snprintf(trans_font_type_name, 256, "%s", _("IDS_ST_BODY_CHOCO_COOKY")); + else if(safeStrCmp(font_type_name, "Cool jazz") == 0) + snprintf(trans_font_type_name, 256, "%s", _("IDS_ST_BODY_COOL_JAZZ")); + else if (safeStrCmp(font_type_name, "HelveticaNeue") == 0) + snprintf(trans_font_type_name, 256, "%s", _("IDS_ST_BODY_HELVETICA_NEUE_M_FONT_NAME")); + else + snprintf(trans_font_type_name, 256, "%s", font_type_name); + #else + char trans_font_type_name[FONT_BUF_SIZE] = {0,}; + ret = get_font_name_str(font_type_name, trans_font_type_name, FONT_BUF_SIZE); + //SETTING_TRACE_DEBUG("font data : %s", (char*)font_data); + #endif + SETTING_TRACE_DEBUG("current font : %s, trans font name: %s", font_type_name, trans_font_type_name); + + ad->font_type = setting_create_Gendial_exp_parent_field(ad->genlist, + &(ad->itc_2text_3_parent), + NULL, NULL, + SWALLOW_Type_INVALID, + SETTING_FONT_TYPE_STR, + trans_font_type_name); + if (ad->font_type) { + ad->font_type->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->font_type is NULL"); + } + G_FREE(ad->font_name); + ad->font_name = g_strdup(font_type_name); + G_FREE(font_type_name); + } + + if (ad->viewmode == FONT_SIZE_AND_FONT_SEL_UG || ad->viewmode == FONT_SIZE_VIEW_APPCONTROL) // font size only + { + int err = -1; + // [UI] Font Size + int ret = setting_get_int_slp_key(INT_SLP_SETTING_ACCESSIBILITY_FONT_SIZE, &ad->ret_font_size, &err); + if (ret != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + + ad->font_size = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_2text_2), + __setting_font_main_genlist_sel_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, ad->ret_font_size, SETTING_FONT_SIZE_STR, + __setting_font_main_get_font_size(ad->ret_font_size), NULL); + if (ad->font_size) { + ad->font_size->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->font_size is NULL"); + } + +#if DISABlED_CODE + setting_create_Gendial_field_def(ad->genlist, &(ad->itc_bg_1icon), NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, SETTING_FONT_SIZE_DESC, NULL, + NULL); +#endif + } +} + + +/** + * [API] set current font + * font change + */ +static void __setting_font_main_font_set(char *font_name) +{ + retm_if(font_name == NULL, "Invalid argument: font_name is NULL"); + int ret; + ret = system_settings_set_value_string(SYSTEM_SETTINGS_KEY_FONT_TYPE, font_name); + +} + +static void __setting_font_main_popup_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingFontUG *ad = (SettingFontUG *) data; + + switch (btn_type(obj)) { + case POPUP_RESPONSE_OK: + { + /* extract font name from tag mixed string */ + SETTING_TRACE("??? --> popup - get FONT : %s ", ad->subitem->keyStr); + + SETTING_TRACE("sub_desc --> popup - get FONT : %s ", ad->subitem->sub_desc); + + char *temp = NULL; + temp = strchr(ad->subitem->keyStr, '>'); + temp += 1; + char *last = NULL; + last = strrchr(temp, '<'); + + #if 0 + char font_name[64] = {0,}; + safeCopyStr(font_name, temp, (int)(last-temp)); + #else + // sub - descc + char *font_name = g_strdup(ad->subitem->sub_desc); + #endif + /* set font name to font main and font config */ + ad->font_type->sub_desc = (char *)g_strdup(_(font_name)); + elm_object_item_data_set(ad->font_type->item, ad->font_type); + elm_genlist_item_update(ad->font_type->item); + + ad->prev_font = ad->subitem->chk_status; + G_FREE(ad->font_name); + ad->font_name = (char *)g_strdup(_(font_name)); + SETTING_TRACE("ad->subitem->keyStr = %s", font_name); + + __setting_font_main_font_set(font_name); + ug_destroy_me(ad->ug); + break; + } + case POPUP_RESPONSE_CANCEL: + { + elm_radio_value_set(ad->subitem->rgd, ad->prev_font); + + break; + } + default: + { + break; + } + } + + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } +} + +static void __setting_font_main_popup(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingFontUG *ad = (SettingFontUG *) data; + + char popup_desc[SETTING_STR_SLP_LEN + 1] = {0,}; + snprintf(popup_desc, SETTING_STR_SLP_LEN, "%s %s?", _(SETTING_FONT_POPUP_DESC), ad->subitem->keyStr); + + ad->popup = setting_create_popup_with_btn(ad, ad->win_get, NULL, + popup_desc, + __setting_font_main_popup_cb, 0, + 2, _("IDS_COM_SK_YES"),_("IDS_COM_SK_NO")); +} + + +/** + * [UI][expandable list][event handler:selection][font change] + */ +void __setting_font_main_sub_list_sel_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *subitem = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(subitem, 0); + Setting_GenGroupItem_Data *data_subItem = elm_object_item_data_get(subitem); + ret_if(NULL == data_subItem); + + SettingFontUG *ad = (SettingFontUG *) data; + + /* if not change, return */ + if (ad->prev_font == data_subItem->chk_status) { + SETTING_TRACE("NOT CHANGED "); + return; + } + + ad->subitem = data_subItem; + elm_radio_value_set(ad->subitem->rgd, ad->subitem->chk_status); + + __setting_font_main_popup(ad); +} + +static void __setting_font_main_exp_cb(void *data, Evas_Object *obj, void *event_info) +{ + ret_if(NULL == data || NULL == event_info); + SETTING_TRACE_BEGIN; + SettingFontUG *ad = (SettingFontUG *) data; + Elm_Object_Item *parentItem = event_info; /* parent item */ + Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); /* parent data */ + Evas_Object *scroller = elm_object_item_widget_get(parentItem); + + Evas_Object *rgd = NULL; + if (data_parentItem == ad->font_type) { + rgd = elm_radio_add(scroller); + elm_radio_value_set(rgd, -1); + + Eina_List *font_list = NULL; + Eina_List *l = NULL; + FcChar8 *font_data = NULL; + font_list = __setting_font_main_available_list_get(); + + int i = 0; + int matched_font = -1; + Setting_GenGroupItem_Data *item = NULL; + EINA_LIST_FOREACH(font_list, l, font_data) + { + char temp[FONT_BUF_SIZE] = {0,}; + int ret = get_font_name_tag(font_data, temp, FONT_BUF_SIZE); + SETTING_TRACE_DEBUG("font data : %s", (char*)font_data); + + item = setting_create_Gendial_exp_sub_field(scroller, &(ad->itc_1text_1icon_2), + __setting_font_main_sub_list_sel_cb, ad, + parentItem, SWALLOW_Type_1RADIO, rgd, + i, temp, + NULL); + + if (item) { + item->userdata = ad; + //item->sub_desc = font_data; + item->sub_desc = strdup(font_data); + //if (!safeStrCmp(ad->font_name, (const char*)font_data)) { + if (!safeStrCmp(ad->font_name, (const char*)item->sub_desc)) { + matched_font = i; + } + } + + i++; + } + + /* update check status */ + if (matched_font != -1) { + elm_radio_value_set(rgd, matched_font); + } + + ad->prev_font = matched_font; + } +} + + +/* *************************************************** + * + *basic func + * + ***************************************************/ +static int setting_font_main_create(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingFontUG *ad = (SettingFontUG *) cb; + + retvm_if(ad->win_main_layout == NULL, SETTING_DRAW_ERR_FAIL_LOAD_EDJ, + "win_main_layout is NULL"); + + ad->ly_main = + setting_create_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _(KeyStr_Font), + _("IDS_COM_BODY_BACK"), + NULL, + __setting_font_main_click_softkey_back_cb, + NULL, + ad, &ad->genlist, &ad->navibar); + + setting_enable_expandable_genlist(ad->genlist, ad, __setting_font_main_exp_cb, NULL); + + __setting_font_main_genlist_item_create(ad); + + setting_view_font_main.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int setting_font_main_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingFontUG *ad = (SettingFontUG *) cb; + + if(ad->font_name) + { + G_FREE(ad->font_name); + ad->font_name = NULL; + } + + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + + if (ad->ly_main != NULL) { + evas_object_del(ad->ly_main); + ad->ly_main = NULL; + } + + setting_view_font_main.is_create = 0; + SETTING_TRACE_END; + return SETTING_RETURN_SUCCESS; +} + +static int setting_font_main_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingFontUG *ad = (SettingFontUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_show(ad->ly_main); + + int value = -1; + int err = -1; + int ret = setting_get_int_slp_key(INT_SLP_SETTING_ACCESSIBILITY_FONT_SIZE, &value, &err); + if (ret != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + + if (ad->font_size) { + G_FREE(ad->font_size->sub_desc); + ad->font_size->sub_desc = (char *)g_strdup(__setting_font_main_get_font_size(value)); + elm_object_item_data_set(ad->font_size->item, ad->font_size); + elm_genlist_item_update(ad->font_size->item); + } + + setting_font_update_vconf_key(ad, SETTING_VCONF_INT_TYPE, + INT_SLP_SETTING_LCD_TIMEOUT_NORMAL); + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_font_main_cleanup(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingFontUG *ad = (SettingFontUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_hide(ad->ly_main); + } + + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void __setting_font_main_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + ret_if(data == NULL); + + SettingFontUG *ad = (SettingFontUG *) data; + + if (ad->viewmode == FONT_SEL_VIEW_APPCONTROL) + { + service_h svc; + if (service_create(&svc)) + return; + + service_add_extra_data(svc, "category", "FontType"); + service_add_extra_data(svc, "FontType", ad->font_name); + + SETTING_TRACE(" SERVICE_ADD_EXTRA : %s %s","category", "FontType"); + SETTING_TRACE(" SERVICE_ADD_EXTRA : %s %s","FontType", ad->font_name); + + + ug_send_result(ad->ug, svc); + service_destroy(svc); + } + else if (ad->viewmode == FONT_SIZE_VIEW_APPCONTROL) + { + service_h svc; + + int err; + int ret = setting_set_int_slp_key(INT_SLP_SETTING_ACCESSIBILITY_FONT_SIZE, ad->ret_font_size, &err); + setting_retm_if(ret == -1, "Failed to set vconf"); + + if (service_create(&svc)) + return; + + char font_size[SETTING_FONT_MAX_LEN] = {0,}; + snprintf(font_size, SETTING_FONT_MAX_LEN, "%d", ad->ret_font_size); + + service_add_extra_data(svc, "category", "FontSize"); + service_add_extra_data(svc, "FontSize", font_size); + + SETTING_TRACE(" SERVICE_ADD_EXTRA : %s %s","category", "FontSize"); + SETTING_TRACE(" SERVICE_ADD_EXTRA : %s %s","FontSize", font_size); + + + ug_send_result(ad->ug, svc); + service_destroy(svc); + } + /* Send destroy request */ + ug_destroy_me(ad->ug); +} diff --git a/setting-font/src/setting-font.c b/setting-font/src/setting-font.c new file mode 100755 index 0000000..44d65b3 --- /dev/null +++ b/setting-font/src/setting-font.c @@ -0,0 +1,330 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif + +setting_view *__get_font_view_to_load(void *data,service_h service) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if((!data), NULL, "data is NULL"); + SettingFontUG *fontUG = (SettingFontUG *)data; + + setting_view_node_table_intialize(); + + char *category = NULL; + service_get_extra_data(service, "category", &category); + + if (0 == safeStrCmp(category, "FontType")) { + SETTING_TRACE("LAUNCHED BY APP-CONTROL MODE"); + fontUG->viewmode = FONT_SEL_VIEW_APPCONTROL; + // here + setting_view_node_table_register(&setting_view_font_font_size, &setting_view_font_main); + setting_view_node_table_register(&setting_view_font_main, NULL); + return &setting_view_font_main; + } else if (0 == safeStrCmp(category, "FontSize")) { + SETTING_TRACE("category = %s", category); + fontUG->viewmode = FONT_SIZE_VIEW_APPCONTROL; + setting_view_node_table_register(&setting_view_font_font_size, NULL); + return &setting_view_font_font_size; + }else { + SETTING_TRACE("HERE ?? <<<<< "); + fontUG->viewmode = FONT_SIZE_AND_FONT_SEL_UG; // set default + setting_view_node_table_register(&setting_view_font_font_size, &setting_view_font_main); + setting_view_node_table_register(&setting_view_font_main, NULL); + return &setting_view_font_main; + } +} + +static void setting_font_ug_cb_resize(void *data, Evas *e, Evas_Object *obj, + void *event_info) +{ + SettingFontUG *ad = (SettingFontUG *) data; + setting_view_update(&setting_view_font_main, ad); +} + +static void *setting_font_ug_on_create(ui_gadget_h ug, enum ug_mode mode, + service_h service, void *priv) +{ + setting_retvm_if((!priv), NULL, "!priv"); + SettingFontUG *fontUG = priv; + + setting_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR); + + fontUG->ug = ug; + fontUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug); + fontUG->win_get = (Evas_Object *) ug_get_window(); + evas_object_show(fontUG->win_main_layout); + fontUG->evas = evas_object_evas_get(fontUG->win_main_layout); + + setting_retvm_if(fontUG->win_main_layout == NULL, NULL, + "cannot get main window "); + + fontUG->itc_seperator.item_style = "dialogue/separator"; + fontUG->itc_seperator.func.text_get = NULL; + fontUG->itc_seperator.func.content_get = NULL; + fontUG->itc_seperator.func.state_get = NULL; + fontUG->itc_seperator.func.del = NULL; + + setting_create_Gendial_itc("dialogue/2text.3/expandable", &(fontUG->itc_2text_3_parent)); + setting_create_Gendial_itc("dialogue/1text.1icon/expandable2", &(fontUG->itc_1icon_1text_sub)); + setting_create_Gendial_itc("dialogue/2text.3", &(fontUG->itc_2text_2)); + setting_create_Gendial_itc("dialogue/1text.1icon.3.tb", &(fontUG->itc_1text_1icon_2)); + setting_create_Gendial_itc("dialogue/title", &(fontUG->itc_group_item)); + setting_create_Gendial_itc("multiline/1text", &(fontUG->itc_bg_1icon)); + + // view type checking + fontUG->view_to_load = __get_font_view_to_load(fontUG, service); + setting_retvm_if(NULL == fontUG->view_to_load, NULL, "NULL == fontUG->view_to_load"); + + setting_view_node_set_cur_view(fontUG->view_to_load); + setting_view_create(fontUG->view_to_load, (void *)fontUG); + + /* creating a view. */ + //setting_view_create(&setting_view_font_main, (void *)fontUG); + evas_object_event_callback_add(fontUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_font_ug_cb_resize, fontUG); + return fontUG->ly_main; +} + +static void setting_font_ug_on_start(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_font_ug_on_pause(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_font_ug_on_resume(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_font_ug_on_destroy(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if((!priv), "!priv"); + SettingFontUG *fontUG = priv; + + evas_object_event_callback_del(fontUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_font_ug_cb_resize); /* fix flash issue for gallery */ + fontUG->ug = ug; + +#if 0 + /* delete the allocated objects. */ + if (fontUG->view_to_load == &setting_view_font_font_size) { + setting_view_destroy(&setting_view_font_font_size, fontUG); + } else { + setting_view_destroy(&setting_view_font_font_size, fontUG); + setting_view_destroy(&setting_view_font_main, fontUG); + } +#else + setting_view_destroy(&setting_view_font_font_size, fontUG); + setting_view_destroy(&setting_view_font_main, fontUG); +#endif + + if (NULL != ug_get_layout(fontUG->ug)) { + evas_object_hide((Evas_Object *) ug_get_layout(fontUG->ug)); + evas_object_del((Evas_Object *) ug_get_layout(fontUG->ug)); + } + + SETTING_TRACE_END; +} + +static void setting_font_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; +} + +static void setting_font_ug_on_event(ui_gadget_h ug, enum ug_event event, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + 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; + case UG_EVENT_REGION_CHANGE: + break; + default: + break; + } +} + +static void setting_font_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + if (!ug) + return; + + switch (event) { + case UG_KEY_EVENT_END: + ug_destroy_me(ug); + break; + default: + break; + } +} + +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + SettingFontUG *fontUG = calloc(1, sizeof(SettingFontUG)); + setting_retvm_if(!fontUG, -1, "Create SettingFontUG obj failed"); + + ops->create = setting_font_ug_on_create; + ops->start = setting_font_ug_on_start; + ops->pause = setting_font_ug_on_pause; + ops->resume = setting_font_ug_on_resume; + ops->destroy = setting_font_ug_on_destroy; + ops->message = setting_font_ug_on_message; + ops->event = setting_font_ug_on_event; + ops->key_event = setting_font_ug_on_key_event; + ops->priv = fontUG; + ops->opt = UG_OPT_INDICATOR_ENABLE; + + return 0; +} + +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + struct SettingFontUG *fontUG; + setting_retm_if(!ops, "ops == NULL"); + + fontUG = ops->priv; + if (fontUG) { + FREE(fontUG); + } +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +int setting_font_update_vconf_key_int_type(void *data, + setting_int_slp_list slp_key) +{ + SETTING_TRACE_BEGIN; + /* error check */ + if (data == NULL) { + return SETTING_GENERAL_ERR_NULL_DATA_PARAMETER; + } + + int ret = SETTING_RETURN_FAIL; + int value; + int err; + /* SettingFontUG *ad = (SettingFontUG *)data; */ + + ret = setting_get_int_slp_key(slp_key, &value, &err); + + switch (slp_key) { + /* + case INT_SLP_SETTING_LCD_TIMEOUT_NORMAL: + { + if (ret == SETTING_RETURN_FAIL) value = SETTING_BACKLIGHT_TIME_15SEC; + + switch(value) + { + case SETTING_BACKLIGHT_TIME_8SEC: edje_object_part_text_set(_EDJ(ad->eo_DC_backlight), DC_ITEM_SUB_STR_BACKLIGHT, _(STR_SETTING_8SEC)); break; + case SETTING_BACKLIGHT_TIME_15SEC: edje_object_part_text_set(_EDJ(ad->eo_DC_backlight), DC_ITEM_SUB_STR_BACKLIGHT, _(STR_SETTING_15SEC)); break; + case SETTING_BACKLIGHT_TIME_30SEC: edje_object_part_text_set(_EDJ(ad->eo_DC_backlight), DC_ITEM_SUB_STR_BACKLIGHT, _(STR_SETTING_30SEC)); break; + case SETTING_BACKLIGHT_TIME_1MIN: edje_object_part_text_set(_EDJ(ad->eo_DC_backlight), DC_ITEM_SUB_STR_BACKLIGHT, _(STR_SETTING_1MIN)); break; + case SETTING_BACKLIGHT_TIME_3MIN: edje_object_part_text_set(_EDJ(ad->eo_DC_backlight), DC_ITEM_SUB_STR_BACKLIGHT, _(STR_SETTING_3MIN)); break; + case SETTING_BACKLIGHT_TIME_10MIN: edje_object_part_text_set(_EDJ(ad->eo_DC_backlight), DC_ITEM_SUB_STR_BACKLIGHT, _(STR_SETTING_10MIN)); break; + default: ret = SETTING_GENERAL_ERR_NOT_FIND_VALUE_SWITCH; + } + } + break; + */ + + default: + ret = SETTING_GENERAL_ERR_NOT_FIND_VALUE_SWITCH; + break; + } + + return ret; +} + +int setting_font_update_vconf_key(void *data, setting_vconf_type type, + int slp_key) +{ + SETTING_TRACE_BEGIN; + /* error check */ + if (data == NULL) { + return SETTING_GENERAL_ERR_NULL_DATA_PARAMETER; + } + + int ret = SETTING_RETURN_FAIL; + SettingFontUG *ad = (SettingFontUG *) data; + + switch (type) { + case SETTING_VCONF_INT_TYPE: + ret = setting_font_update_vconf_key_int_type(ad, slp_key); + break; + + case SETTING_VCONF_BOOL_TYPE: + break; + + case SETTING_VCONF_STR_TYPE: + break; + default: + /* do nothing */ + break; + } + + return ret; +} +/** +* Reset function to 'reset' the settings of the UG, it will be invoked by 'Reset' UG +*/ +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + int ret = 0; + int value = SYSTEM_SETTINGS_FONT_SIZE_NORMAL; + vconf_get_int(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, &value); + if (value != SYSTEM_SETTINGS_FONT_SIZE_NORMAL) + { + /* reset font type, default is HelveticaNeue */ + font_config_set("HelveticaNeue"); + ret += vconf_set_int(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, SYSTEM_SETTINGS_FONT_SIZE_NORMAL); + setting_retvm_if(ret == -1, ret, "Failed to set vconf"); + font_size_set(); + } + return ret; +} + diff --git a/setting-memory/CMakeLists.txt b/setting-memory/CMakeLists.txt new file mode 100755 index 0000000..e700569 --- /dev/null +++ b/setting-memory/CMakeLists.txt @@ -0,0 +1,39 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_memory REQUIRED elementary appcore-common appcore-efl ui-gadget-1 capi-appfw-application tapi devman sysman) + +FOREACH(flag ${pkgs_memory_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") +ADD_DEFINITIONS("-fpie") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") + +ADD_LIBRARY(${SETTING_MEMORY_UG} SHARED + ./src/setting-memory.c + ./src/setting-memory-main.c + ./src/setting-memory-common.c + ./src/setting-memory-status.c + ./src/setting-memory-default-memory.c + ) + +TARGET_LINK_LIBRARIES(${SETTING_MEMORY_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_MEMORY_UG} ${pkgs_memory_LDFLAGS}) + + +INSTALL(TARGETS ${SETTING_MEMORY_UG} DESTINATION /usr/ug/lib) + diff --git a/setting-memory/include/setting-memory-common.h b/setting-memory/include/setting-memory-common.h new file mode 100755 index 0000000..ff9fb73 --- /dev/null +++ b/setting-memory/include/setting-memory-common.h @@ -0,0 +1,108 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_MEMORY_COMMON_H__ +#define __SETTING_MEMORY_COMMON_H__ + +#include +#include + +#define VCONFKEY_SETAPPL_MMC_FORMAT "memory/mmc/format" +typedef enum { + SETTING_MMC_FORMAT_INVALID = -1, + SETTING_MMC_FORMAT_FORMATTED = 0, /* sucess */ + SETTING_MMC_FORMAT_FORMATTING = 1, /* processing */ + SETTING_MMC_FORMAT_FORMATTED_FAILED = 2 /* failed */ +} SETTING_MMC_FORMAT_STATUS; + +#define STR_SIZE 30 +#define SETTING_MEMORY_MMS_DEFAULT_FOLDER_SIZE 4 +#define SETTING_MEMORY_EMAIL_DEFAULT_FOLDER_SIZE 8 +#define SETTING_MEMORY_MYFILES_DEFAULT_FOLDER_SIZE 0 +#define SETTING_MEMORY_BUFFER_SIZE 255 +#define SETTING_MEMORY_MMC_MAX_NAME_LEN 360 +#define SETTING_MEMORY_MMC_DEV_PATH_LEN 30 +#define SETTING_MEMORY_MMC_FILEPATH_LEN_MAX 255 +#define SETTING_MEMORY_MMC_MAX_MEM_STR_LEN 30 +#define SETTING_MEMORY_MMC_MOUNT_PATH_LEN 30 +#define SETTING_MEMORY_MMC_MAX_CARD_NAME_LEN 11 +#define SETTING_MEMORY_MMC_MLABEL_MAX_COMMAND_LEN 50 +#define SETTING_MEMORY_MYFILES_RESERVED_SPACE 2000 +#define SETTING_MEMORY_POPUP_TIMER 1 +#define SETTING_MEMORY_CLEAR_PHONE_CMD_LEN_MAX 80 +#define SETTING_MEMORY_SYS_COMMAND_ARGV_LEN 4 + +#define SETTING_MEMORY_KILOBYTE_VALUE 1024 +#define SETTING_MEMORY_MEGABYTE_VALUE 1048576 +#define SETTING_MEMORY_GIGABYTE_VALUE 1073741824 + + +/* These definition will be removed */ +#define SETTING_MEMORY_TEMP_FILE_PATH "/tmp/mmc_tmp_file" +#define SETTING_MEMORY_FILE_SYSTEM_PATH "/opt/usr/media/" +#define SETTING_MEMORY_MY_FILES_IMAGES_PATH "/opt/usr/media/Images" +#define SETTING_MEMORY_MY_FILES_VIDEOS_PATH "/opt/usr/media/Videos" +#define SETTING_MEMORY_MY_FILES_SOUNDS_PATH "/opt/usr/media/Sounds" +#define SETTING_MEMORY_MY_FILES_GAMES_PATH "/opt/usr/media/Games" +#define SETTING_MEMORY_MY_FILES_OTHER_FILES_PATH "/opt/usr/media/Other files" +#define SETTING_MEMORY_MM_MSG_PATH "/opt/usr/media/.message/" +#define SETTING_MEMORY_CLEAR_PHONE_CALENDAR_FILE_PATH \ + "/opt/dbspace/.calendar.db" +#define SETTING_MEMORY_CLEAR_PHONE_MEMO_FILE_PATH "/opt/dbspace/.memo.db" +#define SETTING_MEMORY_CLEAR_PHONE_MEMO_CONTACT_PATH \ + "/opt/dbspace/.contact.db" + +/* New directory list */ +/*use df command to check all the file system, where, +* mmc storage space: /opt/storage/sdcard +* myfile storage space: /opt/media +* email, mms, contact, calendar...etc sotrage space: /opt +* your linux maped storage spces: /mnt/nfs +*/ +#define SETTING_MEMORY_USTORG_UMS_PATH "/opt/usr/media" +#define SETTING_MEMORY_USTORG_MOVIFS_PATH "/mnt/movifs" +#define SETTING_MEMORY_USTORG_OPT_PATH "/opt" +#define SETTING_MEMORY_USTORG_MCC_PATH "/opt/storage/sdcard" +#define SETTING_MEMORY_STATUS_MMC_PARENT_PATH "/opt/storage/sdcard/.." + +#define SETTING_MEMORY_STATUS_APP_PATH "/opt" +#define SETTING_MEMORY_STATUS_MEDIA_PATH "/opt/usr/media" +#define SETTING_MEMORY_STATUS_MMC_PATH "/opt/storage/sdcard" + +#define SETTING_MEMORY_ICON_MMS_PATH \ + SETTING_UG_ICON_PATH"/68_icon_multi_message.png" +#define SETTING_MEMORY_ICON_EMAIL_PATH \ + SETTING_UG_ICON_PATH"/68_icon_e-mail.png" +#define SETTING_MEMORY_ICON_MYFILES_PATH \ + SETTING_UG_ICON_PATH"/68_icon_myfiles.png" +#define SETTING_MEMORY_ICON_OTHERS_PATH \ + SETTING_UG_ICON_PATH"/68_icon_others.png" +#define SETTING_MEMORY_ICON_DUMMY_PATH \ + SETTING_UG_ICON_PATH"/68_memory_status_bg.png" + +typedef struct _setting_LABEL_info { + char *LABEL_EDJ_NAME; + char *LABEL_GRP_NAME; + char *LABEL_ITEM_TITLE_STR; + +} setting_LABEL_info; + +int setting_system_command(const char *command); + +int setting_memory_update_popup_with_progress_bar(void *data); +void setting_memory_hide_popup_with_progress_bar(SettingMemoryUG *ad); + +#endif /* __SETTING_MEMORY_COMMON_H__ */ diff --git a/setting-memory/include/setting-memory-default-memory.h b/setting-memory/include/setting-memory-default-memory.h new file mode 100755 index 0000000..eccbf3b --- /dev/null +++ b/setting-memory/include/setting-memory-default-memory.h @@ -0,0 +1,22 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_MEMORY_DEFAULT_MEMORY_H__ +#define __SETTING_MEMORY_DEFAULT_MEMORY_H__ + +#include + +#endif /* __SETTING_MEMORY_DEFAULT_MEMORY_H__ */ diff --git a/setting-memory/include/setting-memory-main.h b/setting-memory/include/setting-memory-main.h new file mode 100755 index 0000000..eb1edae --- /dev/null +++ b/setting-memory/include/setting-memory-main.h @@ -0,0 +1,24 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_MEMORY_MAIN_H__ +#define __SETTING_MEMORY_MAIN_H__ + +#include + +#define SETTING_MEMORY_MSG_SERVER_POPUP_INFO_MSG "msg server is still intializing." + +#endif /* __SETTING_MEMORY_MAIN_H__ */ diff --git a/setting-memory/include/setting-memory-status.h b/setting-memory/include/setting-memory-status.h new file mode 100755 index 0000000..aecc143 --- /dev/null +++ b/setting-memory/include/setting-memory-status.h @@ -0,0 +1,117 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_MEMORY_STATUS_H__ +#define __SETTING_MEMORY_STATUS_H__ + +#include +#include + +#ifndef _A_PROJECT_ +#define _A_PROJECT_ +#endif + +#include +#include +#include + +#define SETTING_MEMORY_EMAIL_MAX "5000" +#define SETTING_MEMORY_MSG_SMS_MAX "2600" +#define SETTING_MEMORY_MSG_MMS_MAX "800" +#define SETTING_MEMORY_CONTACT_MAX "100" +#define SETTING_MEMORY_CAL_APPOINT_MAX "500" +#define SETTING_MEMORY_CAL_ANNIVERS_MAX "100" +#define SETTING_MEMORY_MEMO_MAX "400" + +#define SETTING_MEMORY_STATUS_EX_SD_CARD_MOUNT_ALREADY_DESC "Already mount" +#define SETTING_MEMORY_STATUS_EX_SD_CARD_DESC "IDS_ST_BODY_SD_CARD" +#define SETTING_MEMORY_STATUS_TOTAL_SPACE_DESC _("IDS_ST_BODY_TOTAL_SPACE") +#define SETTING_MEMORY_STATUS_AVAILABLE_SPACE_DESC _("IDS_ST_BODY_AVAILABLE_SPACE") +#define SETTING_MEMORY_STATUS_MOUNT_SD_CARD_DESC "IDS_ST_BODY_MOUNT_SD_CARD" +#define SETTING_MEMORY_STATUS_UNMOUNT_SD_CARD_DESC "IDS_ST_BODY_UNMOUNT_SD_CARD" +#define SETTING_MEMORY_STATUS_FORMAT_SD_CARD_DESC "IDS_ST_BODY_FORMAT_SD_CARD" +#define SETTING_MEMORY_STATUS_INTERNAL_SD_CARD_DESC "Internal SD card" +#define SETTING_MEMORY_STATUS_MAIN_STORAGE_DESC "Main storage" + +#define SETTING_MEMORY_STATUS_SYSTEM_SPACE_DESC "IDS_COM_BODY_SYSTEM_STORAGE" + +#define SETTING_MEMORY_STATUS_FORMAT_ASK_MSG "This action will erase the
external storage in the phone.
You will lost ALL data on the card!
Format?" + +#define SETTING_MEMORY_STATUS_PROGRESSBAR_TIMEOUT 10 + +enum { + SETTING_MEMORY_STATUS_SYSMAN_REQUEST_MOUNT_ALREADY = -2, + SETTING_MEMORY_STATUS_SYSMAN_REQUEST_SUCCESS = 0 +}; + +static int __fs_stat(double* pdTotal, double* pdAvail, const char* szPath); + +static void setting_memory_status_click_softkey_back(void *data, + Evas_Object *obj, + void *event_info); +static void setting_memory_status_ex_sd_card_info(char *ex_total_space, + char *ex_available_space, + char *ex_mount_desc, + int *ex_mmc_status); +static int setting_memory_status_ex_sd_card_detail(char *ex_total_space, + char *ex_available_space); +static void setting_memory_status_mouse_up_Gendial_list_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_memory_status_ex_sd_card_format_promt_popup_create(void + *data); +static void setting_memory_status_ex_sd_card_ask_format_resp_cb(void *data, + Evas_Object * + obj, + void + *event_info); +static void setting_memory_status_ex_sd_card_format_promt_popup_left_btn_cb(void + *data, + Evas_Object + * + obj, + void + *event_info); +static void +setting_memory_status_ex_sd_card_format_promt_popup_right_btn_cb(void *data, + Evas_Object * + obj, + void + *event_info); +static void setting_memory_status_ex_sd_card_mount_unmount(void *data); +static void setting_memory_status_ex_sd_card_refresh_card_details_cb(void *data, + Evas_Object + *obj, + void + *event_info); +static void setting_memory_status_ex_sd_card_operate_complete(void *data, + char *desc, + bool popup_flag); +static void setting_memory_status_list_item_enable_set_by_mmc_status(void *data, + int + ex_mmc_status); +static void setting_memory_status_list_item_data_set(Setting_GenGroupItem_Data * + item, char *data); +static void setting_memory_status_get_phone_storage_available_size(void *data, + char + *phone_storage_available); +static int setting_memory_status_size_transition(double size, + char *size_desc); +static void setting_memory_status_ex_sd_card_format_cb(int val, void *data); +static void setting_memory_status_ex_sd_card_mount_cb(int val, void *data); +static void setting_memory_status_ex_sd_card_unmount_cb(int val, void *data); + +#endif /* __SETTING_MEMORY_STATUS_H__ */ diff --git a/setting-memory/include/setting-memory.h b/setting-memory/include/setting-memory.h new file mode 100755 index 0000000..f5e30ea --- /dev/null +++ b/setting-memory/include/setting-memory.h @@ -0,0 +1,114 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_MEMORY_H__ +#define __SETTING_MEMORY_H__ + +#include +#include + +#include + +#include + +#include +#include +#include +#include + +typedef void (*setting_memory_mmc_cb) (int val, void *data); + +typedef struct _SettingMemoryUG SettingMemoryUG; + +typedef struct setting_memory_umem_size { + unsigned long total_mem_size; + unsigned long free_mem_size; + unsigned long used_mem_size; + unsigned long block_size; + unsigned long mms_size; + unsigned long myfiles_size; + unsigned long etc_size; +} setting_memory_umem_size_t; + +typedef struct __setting_mem_status { + double dTotal; + double dAvail; +} setting_mem_status; + +/** + * Setting Memory UG context + * all UG function has void* as an agument. this is casted back to SettingMemoryUG + * and the functions access app context. + */ +struct _SettingMemoryUG { + ui_gadget_h ug; + ui_gadget_h ug_loading; + + Evas *evas; + Evas_Object *win_main_layout; + Evas_Object *win_get; + Evas_Object *popup; + setting_call_back_func curr_popup_cb; + + Evas_Object *progress_bar; + Ecore_Timer *wait_timer; + Ecore_Timer *popup_timer; + Ecore_Timer *progress_bar_timer; + float progress_bar_rate; + Evas_Object *navi_bar; + + Evas_Object *msg_intial_popup; + Evas_Object *ly_main; + + Setting_GenGroupItem_Data *data_wap; + Setting_GenGroupItem_Data *data_bt; + Setting_GenGroupItem_Data *data_cmr; + Setting_GenGroupItem_Data *data_vrec; + Setting_GenGroupItem_Data *data_rdo; + Setting_GenGroupItem_Data *data_shr; + Setting_GenGroupItem_Data *data_adobeAir; + Setting_GenGroupItem_Data *data_dvb_h; + + setting_memory_umem_size_t umem_size; + Elm_Genlist_Item_Class itc_1text_1icon_2; + Elm_Genlist_Item_Class itc_group_item; + Elm_Genlist_Item_Class itc_1text; + Elm_Genlist_Item_Class itc_1text_1icon; + Elm_Genlist_Item_Class itc_sel_all; + Elm_Genlist_Item_Class itc_seperator; + Elm_Genlist_Item_Class itc_variable_height; + Elm_Genlist_Item_Class itc_2text_3_parent; + Elm_Genlist_Item_Class itc_1icon_1text_sub; + Elm_Genlist_Item_Class itc_2text_2; + Setting_GenGroupItem_Data *data_ex_total; + Setting_GenGroupItem_Data *data_ex_available; + Setting_GenGroupItem_Data *data_ex_mount; + Setting_GenGroupItem_Data *data_ex_format; + Setting_GenGroupItem_Data *data_in_total; + Setting_GenGroupItem_Data *data_in_available; + Setting_GenGroupItem_Data *data_in_format; + Setting_GenGroupItem_Data *data_phone_storage_available; + Setting_GenGroupItem_Data *data_main_storage_available; + Setting_GenGroupItem_Data *data_system_storage_available; + struct mmc_contents *mmc_content; +}; + +extern setting_view setting_view_memory_main; +extern setting_view setting_view_memory_default_memory; +extern setting_view setting_view_memory_status; + + +#endif /* __SETTING_MEMORY_H__ */ diff --git a/setting-memory/src/setting-memory-common.c b/setting-memory/src/setting-memory-common.c new file mode 100755 index 0000000..f2938e0 --- /dev/null +++ b/setting-memory/src/setting-memory-common.c @@ -0,0 +1,100 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include + +int setting_memory_update_popup_with_progress_bar(void *data) +{ + SETTING_TRACE_BEGIN; + SettingMemoryUG *ad = (SettingMemoryUG *) data; + + if (ad->progress_bar != NULL) { + SETTING_TRACE("ad->progress_bar_rate = %f", + (float)ad->progress_bar_rate); + elm_progressbar_value_set(ad->progress_bar, + ad->progress_bar_rate); + } + + if (ad->progress_bar_timer != NULL) { + ecore_timer_del(ad->progress_bar_timer); + ad->progress_bar_timer = NULL; + } + + return 0; +} + +void setting_memory_hide_popup_with_progress_bar(SettingMemoryUG *ad) +{ + SETTING_TRACE_BEGIN; + if (ad->progress_bar) { + elm_progressbar_value_set(ad->progress_bar, 1.0); + + evas_object_del(ad->progress_bar); + ad->progress_bar = NULL; + } + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + + if (ad->popup_timer) { + ecore_timer_del(ad->popup_timer); + ad->popup_timer = NULL; + } +} + +/** not used now */ +int setting_system_command(const char *command) +{ + SETTING_TRACE_BEGIN; + int pid = 0, status = 0; + char *const environ[] = { NULL }; + + if (command == 0) { + return 1; + } + + pid = fork(); + + if (pid == -1) { + return SETTING_RETURN_FAIL; + } + + if (pid == 0) { + char *argv[SETTING_MEMORY_SYS_COMMAND_ARGV_LEN]; + + argv[0] = "sh"; + argv[1] = "-c"; + argv[2] = (char *)command; + argv[3] = 0; + + execve("/bin/sh", argv, environ); + /* exit(127); */ + abort(); + } + + do { + if (waitpid(pid, &status, 0) == -1) { + if (errno != EINTR) { + return SETTING_RETURN_FAIL; + } + } else { + return status; + } + + } while (1); +} diff --git a/setting-memory/src/setting-memory-default-memory.c b/setting-memory/src/setting-memory-default-memory.c new file mode 100755 index 0000000..0987682 --- /dev/null +++ b/setting-memory/src/setting-memory-default-memory.c @@ -0,0 +1,500 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#define SUPPORT_DVB_B 1 +#define DVB_H_STR "DVB-H" +static int setting_memory_default_memory_create(void *cb); +static int setting_memory_default_memory_destroy(void *cb); +static int setting_memory_default_memory_update(void *cb); +static int setting_memory_default_memory_cleanup(void *cb); +char *setting_default_memory_get_desc_str_by_vconf(setting_int_slp_list + slp_key); + +setting_view setting_view_memory_default_memory = { + .create = setting_memory_default_memory_create, + .destroy = setting_memory_default_memory_destroy, + .update = setting_memory_default_memory_update, + .cleanup = setting_memory_default_memory_cleanup, +}; + +static void setting_memory_default_click_softkey_cancel_cb(void *data, + Evas_Object *obj, + void *event_info); +static void __setting_memory_default_memory_vconf_change_cb( + keynode_t *key, void *data); +static void __setting_memory_default_memory_update_item_status( + void *data, bool disable_mmc_flag); +static void __setting_memory_default_memory_update_vconf(void *data); + +/* *************************************************** + * + *basic func + * + ***************************************************/ + +static void __setting_memory_default_exp_cb(void *data, Evas_Object *obj, + void *event_info) +{ + ret_if(NULL == data || NULL == event_info); + SETTING_TRACE_BEGIN; + SettingMemoryUG *ad = (SettingMemoryUG *) data; + Elm_Object_Item *parentItem = event_info; /* parent item */ + Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); /* parent data */ + Evas_Object *scroller = elm_object_item_widget_get(parentItem); + + Evas_Object *rgd; + if (data_parentItem == ad->data_wap + || data_parentItem == ad->data_bt + || data_parentItem == ad->data_cmr + || data_parentItem == ad->data_vrec + || data_parentItem == ad->data_rdo + || data_parentItem == ad->data_shr + || data_parentItem == ad->data_dvb_h) { + + SETTING_TRACE_DEBUG("start drawing exp menu."); + + rgd = elm_radio_add(scroller); + elm_radio_value_set(rgd, -1); + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + SETTING_DEF_MEMORY_PHONE, + "IDS_COM_BODY_PHONE", + NULL); + + Setting_GenGroupItem_Data *data_memory_card = NULL; + data_memory_card = + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + SETTING_DEF_MEMORY_MMC, + "IDS_COM_BODY_MEMORY_CARD", + NULL); + setting_retm_if(!data_memory_card, "data_memory_card is NULL"); + + int mmc_mode = VCONFKEY_SYSMAN_MMC_REMOVED; + int ret = vconf_get_int(VCONFKEY_SYSMAN_MMC_STATUS, &mmc_mode); + setting_retm_if(ret != 0, "Get vconf failed"); + + /* if mmc card is not mounted, set item disable */ + if (mmc_mode == VCONFKEY_SYSMAN_MMC_REMOVED || + mmc_mode == VCONFKEY_SYSMAN_MMC_INSERTED_NOT_MOUNTED) { + setting_disable_genlist_item(data_memory_card->item); + } + + setting_update_chk_status(rgd, + data_parentItem->int_slp_setting_binded); + + } +} + +static int setting_memory_default_memory_create(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingMemoryUG *ad = (SettingMemoryUG *) cb; + + Evas_Object *scroller; + + Elm_Object_Item *item; + ad->ly_main = + setting_create_layout_navi_bar_genlist(ad->win_main_layout, ad->win_get, + _("IDS_ST_BODY_MEMORYSETTINGS_DEFAULT_MEMORY"), + S_("IDS_COM_BODY_BACK"), NULL, + setting_memory_default_click_softkey_cancel_cb, + NULL, ad, &scroller, &(ad->navi_bar)); + + retvm_if(ad->ly_main == NULL, -1, "Can't create main layout"); + + setting_enable_expandable_genlist(scroller, ad, + __setting_memory_default_exp_cb, + NULL); + /* scroller is a genlist */ + /* 1 wap */ + item = + elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + ad->data_wap = + setting_create_Gendial_exp_parent_field(scroller, + &(ad->itc_2text_3_parent), + NULL, NULL, + SWALLOW_Type_INVALID, + "IDS_ST_BODY_WAP_DOWNLOADS", + setting_default_memory_get_desc_str_by_vconf + (INT_SLP_SETTING_DEFAULT_MEM_WAP)); + if (ad->data_wap) { + ad->data_wap->int_slp_setting_binded = INT_SLP_SETTING_DEFAULT_MEM_WAP; + } else { + SETTING_TRACE_ERROR("ad->data_wap is NULL"); + } + + /* 2 bt */ + item = + elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + ad->data_bt = + setting_create_Gendial_exp_parent_field(scroller, + &(ad->itc_2text_3_parent), + NULL, NULL, + SWALLOW_Type_INVALID, + "IDS_COM_BODY_BLUETOOTH", + setting_default_memory_get_desc_str_by_vconf + (INT_SLP_SETTING_DEFAULT_MEM_BLUETOOTH)); + if (ad->data_bt) { + ad->data_bt->int_slp_setting_binded = + INT_SLP_SETTING_DEFAULT_MEM_BLUETOOTH; + } else { + SETTING_TRACE_ERROR("ad->data_bt is NULL"); + } + + /* 3 cmr */ + item = + elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + ad->data_cmr = + setting_create_Gendial_exp_parent_field(scroller, + &(ad->itc_2text_3_parent), + NULL, NULL, + SWALLOW_Type_INVALID, + "IDS_COM_BODY_CAMERA", + setting_default_memory_get_desc_str_by_vconf + (INT_SLP_SETTING_DEFAULT_MEM_CAMERA)); + if (ad->data_cmr) { + ad->data_cmr->int_slp_setting_binded = + INT_SLP_SETTING_DEFAULT_MEM_CAMERA; + } else { + SETTING_TRACE_ERROR("ad->data_cmr is NULL"); + } + /* 4 vrec */ + item = + elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + ad->data_vrec = + setting_create_Gendial_exp_parent_field(scroller, + &(ad->itc_2text_3_parent), + NULL, NULL, + SWALLOW_Type_INVALID, + "IDS_COM_BODY_VOICE_RECORDER", + setting_default_memory_get_desc_str_by_vconf + (INT_SLP_SETTING_DEFAULT_MEM_VOICE_RECORDER)); + if (ad->data_vrec) { + ad->data_vrec->int_slp_setting_binded = + INT_SLP_SETTING_DEFAULT_MEM_VOICE_RECORDER; + } else { + SETTING_TRACE_ERROR("ad->data_vrec is NULL"); + } + +#if SUPPORT_FMradio + /* 5 rdo */ + item = + elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + ad->data_rdo = + setting_create_Gendial_exp_parent_field(scroller, + &(ad->itc_2text_3_parent), + NULL, NULL, + SWALLOW_Type_INVALID, + "IDS_COM_BODY_FM_RADIO", + setting_default_memory_get_desc_str_by_vconf + (INT_SLP_SETTING_DEFAULT_MEM_FM_RADIO)); + if (ad->data_rdo) { + ad->data_rdo->int_slp_setting_binded = + INT_SLP_SETTING_DEFAULT_MEM_FM_RADIO; + } else { + SETTING_TRACE_ERROR("ad->data_rdo is NULL"); + } +#endif + +#if SUPPORT_AllShare_Memory + + /* 6 shr */ + item = + elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + ad->data_shr = + setting_create_Gendial_exp_parent_field(scroller, + &(ad->itc_2text_3_parent), + NULL, NULL, + SWALLOW_Type_INVALID, + "IDS_COM_BODY_ALLSHARE", + setting_default_memory_get_desc_str_by_vconf + (INT_SLP_SETTING_DEFAULT_MEM_ALL_SHARE)); + if (ad->data_shr) { + ad->data_shr->int_slp_setting_binded = + INT_SLP_SETTING_DEFAULT_MEM_ALL_SHARE; + } else { + SETTING_TRACE_ERROR("ad->data_shr is NULL"); + } +#endif +#if SUPPORT_DVB_B + /* 7 DVB-H */ + item = + elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + ad->data_dvb_h = + setting_create_Gendial_exp_parent_field(scroller, + &(ad->itc_2text_3_parent), + NULL, NULL, + SWALLOW_Type_INVALID, + DVB_H_STR, + setting_default_memory_get_desc_str_by_vconf + (INT_SLP_SETTING_DEFAULT_MEM_DVB_H)); + if (ad->data_dvb_h) { + ad->data_dvb_h->int_slp_setting_binded = + INT_SLP_SETTING_DEFAULT_MEM_DVB_H; + } else { + SETTING_TRACE_ERROR("ad->data_shr is NULL"); + } +#endif + + item = elm_genlist_item_append(scroller, &itc_bottom_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + int ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_MMC_STATUS, + __setting_memory_default_memory_vconf_change_cb, ad); + if (ret != 0) { + SETTING_TRACE_ERROR("call vconf_notify_key_changed failed"); + } + setting_view_memory_default_memory.is_create = 1; + + SETTING_TRACE_END; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_memory_default_memory_destroy(void *cb) +{ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingMemoryUG *ad = (SettingMemoryUG *) cb; + + int ret = vconf_ignore_key_changed(VCONFKEY_SYSMAN_MMC_STATUS, + __setting_memory_default_memory_vconf_change_cb); + if (ret != 0) { + SETTING_TRACE_ERROR("call vconf_ignore_key_changed failed"); + } + + setting_view_memory_default_memory.is_create = 0; + + evas_object_del(ad->ly_main); + + return SETTING_RETURN_SUCCESS; +} + +static int setting_memory_default_memory_update(void *cb) +{ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + return SETTING_RETURN_SUCCESS; +} + +char *setting_default_memory_get_desc_str_by_vconf(setting_int_slp_list slp_key) +{ + /* SETTING_TRACE_BEGIN; */ + /* error check */ + + char *setting_default_memory_type[SETTING_DEF_MEMORY_MAX] = { + _("IDS_COM_BODY_PHONE"), + _("IDS_COM_BODY_MEMORY_CARD") + }; + int ret = SETTING_RETURN_FAIL; + int value = 0; + int err = -1; + + int mmc_mode = VCONFKEY_SYSMAN_MMC_REMOVED; + ret = vconf_get_int(VCONFKEY_SYSMAN_MMC_STATUS, &mmc_mode); + setting_retvm_if(ret != 0, NULL, "Get vconf failed"); + + /* if mmc card is not mounted, set vconf by 0(phone) */ + if (mmc_mode == VCONFKEY_SYSMAN_MMC_REMOVED || + mmc_mode == VCONFKEY_SYSMAN_MMC_INSERTED_NOT_MOUNTED) { + ret = setting_set_int_slp_key(slp_key, 0, &err); + setting_retvm_if(ret != 0, NULL, "Set vconf failed"); + } + + ret = setting_get_int_slp_key(slp_key, &value, &err); + + switch (slp_key) { + case INT_SLP_SETTING_DEFAULT_MEM_WAP: + case INT_SLP_SETTING_DEFAULT_MEM_BLUETOOTH: + case INT_SLP_SETTING_DEFAULT_MEM_CAMERA: + case INT_SLP_SETTING_DEFAULT_MEM_VOICE_RECORDER: + case INT_SLP_SETTING_DEFAULT_MEM_FM_RADIO: + case INT_SLP_SETTING_DEFAULT_MEM_ALL_SHARE: + case INT_SLP_SETTING_DEFAULT_MEM_ADOBE_AIR: + case INT_SLP_SETTING_DEFAULT_MEM_DVB_H: + { + if (ret == SETTING_RETURN_FAIL + || value >= SETTING_DEF_MEMORY_MAX) + value = SETTING_DEF_MEMORY_PHONE; + return setting_default_memory_type[value]; + } + break; + + default: + ret = SETTING_GENERAL_ERR_NOT_FIND_VALUE_SWITCH; + break; + } + + return NULL; +} + +static int setting_memory_default_memory_cleanup(void *cb) +{ + return 0; +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void +setting_memory_default_click_softkey_cancel_cb(void *data, Evas_Object *obj, + void *event_info) +{ + ret_if(data == NULL); + + SettingMemoryUG *ad = (SettingMemoryUG *) data; + + ug_destroy_me(ad->ug); +} + +static void __setting_memory_default_memory_vconf_change_cb( + keynode_t *key, void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == key, "key is NULL"); + setting_retm_if(NULL == data, "data is NULL"); + SettingMemoryUG *ad = (SettingMemoryUG *)data; + int status = vconf_keynode_get_int(key); + char *vconf_name = vconf_keynode_get_name(key); + + if (!safeStrCmp(vconf_name, VCONFKEY_SYSMAN_MMC_STATUS)) { + SETTING_TRACE("status:%d", status); + if (VCONFKEY_SYSMAN_MMC_MOUNTED == status) { + __setting_memory_default_memory_update_item_status( + ad,FALSE); + } else { + __setting_memory_default_memory_update_item_status( + ad, TRUE); + } + } +} + +static void __setting_memory_default_memory_update_item_status( + void *data, bool disable_mmc_flag) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == data, "data is NULL"); + SettingMemoryUG *ad = (SettingMemoryUG *)data; + + setting_retm_if(NULL == ad->data_wap, "ad->data_wap is NULL"); + setting_retm_if(NULL == ad->data_wap->item, + "ad->data_wap->item is NULL"); + + Elm_Object_Item *list_item = ad->data_wap->item; + Setting_GenGroupItem_Data *data_sub_item = NULL; + while (list_item != NULL) { + data_sub_item = + (Setting_GenGroupItem_Data *) + elm_object_item_data_get(list_item); + /* data_sub_item is seperator*/ + if (data_sub_item == NULL) { + list_item = elm_genlist_item_next_get(list_item); + continue; + } + SETTING_TRACE("keystr = %s", data_sub_item->keyStr); + /* disable_mmc_flag is true, means mmc is not mounted*/ + if (disable_mmc_flag) { + if (!safeStrCmp(data_sub_item->keyStr, + "IDS_COM_BODY_PHONE") && + ! elm_genlist_item_selected_get(list_item)) { + elm_genlist_item_selected_set(list_item, 1); + } else if (!safeStrCmp(data_sub_item->keyStr, + "IDS_COM_BODY_MEMORY_CARD")) { + elm_genlist_item_selected_set(list_item, 0); + setting_disable_genlist_item(list_item); + } + } else { + if (!safeStrCmp(data_sub_item->keyStr, + "IDS_COM_BODY_MEMORY_CARD") && + elm_object_item_disabled_get(list_item)) { + setting_enable_genlist_item(list_item); + } + } + list_item = elm_genlist_item_next_get(list_item); + } + + /* if mmc is not mounted, update vconf*/ + setting_retm_if(NULL == ad->data_bt, "ad->data_bt is NULL"); + setting_retm_if(NULL == ad->data_cmr, "ad->data_cmr is NULL"); + setting_retm_if(NULL == ad->data_vrec, "ad->data_vrec is NULL"); + setting_retm_if(NULL == ad->data_rdo, "ad->data_rdo is NULL"); + setting_retm_if(NULL == ad->data_dvb_h, "ad->data_dvb_h is NULL"); + if (disable_mmc_flag) { + __setting_memory_default_memory_update_vconf(ad->data_wap); + __setting_memory_default_memory_update_vconf(ad->data_bt); + __setting_memory_default_memory_update_vconf(ad->data_cmr); + __setting_memory_default_memory_update_vconf(ad->data_vrec); + __setting_memory_default_memory_update_vconf(ad->data_rdo); + __setting_memory_default_memory_update_vconf(ad->data_dvb_h); + } +} + +static void __setting_memory_default_memory_update_vconf(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == data, "data is NULL"); + Setting_GenGroupItem_Data *data_item = (Setting_GenGroupItem_Data *)data; + int err = 0; + int value = 0; + int ret = 0; + + ret = setting_get_int_slp_key( + data_item->int_slp_setting_binded, &value, &err); + setting_retm_if(0 != ret, "get vconf failed"); + + /* if mmc card is not mounted, set vconf by 0(phone) */ + if (value != 0) { + ret = setting_set_int_slp_key( + data_item->int_slp_setting_binded, 0, &err); + setting_retm_if(ret != 0, "Set vconf failed"); + + G_FREE(data_item->sub_desc); + data_item->sub_desc = (char *)g_strdup(_("IDS_COM_BODY_PHONE")); + elm_object_item_data_set(data_item->item, data_item); + elm_genlist_item_update(data_item->item); + } +} diff --git a/setting-memory/src/setting-memory-main.c b/setting-memory/src/setting-memory-main.c new file mode 100755 index 0000000..0be563c --- /dev/null +++ b/setting-memory/src/setting-memory-main.c @@ -0,0 +1,208 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#define VCONFKEY_MEMORY_STATUS "memory/msg/ready" + +static int setting_memory_main_create(void *cb); +static int setting_memory_main_destroy(void *cb); +static int setting_memory_main_update(void *cb); +static int setting_memory_main_cleanup(void *cb); + +setting_view setting_view_memory_main = { + .create = setting_memory_main_create, + .destroy = setting_memory_main_destroy, + .update = setting_memory_main_update, + .cleanup = setting_memory_main_cleanup, +}; + +static void setting_memory_main_mouse_up_Gendial_list_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_memory_main_click_softkey_back(void *data, + Evas_Object *obj, + void *event_info); +static void setting_memory_main_memory_status_change_cb(keynode_t *key, + void *data); + +/******************************************* + * + * basic function + * + ******************************************/ + +static int setting_memory_main_create(void *cb) +{ + SETTING_TRACE_BEGIN; + SettingMemoryUG *ad = (SettingMemoryUG *) cb; + + Evas_Object *scroller; + /* int mmc_mode; */ + ad->ly_main = + setting_create_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _("IDS_ST_BODY_MEMORY"), + S_("IDS_COM_BODY_BACK"), + NULL, + setting_memory_main_click_softkey_back, + NULL, ad, &scroller, + &(ad->navi_bar)); + retvm_if(ad->ly_main == NULL, -1, "Can't create main layout"); + + Elm_Object_Item *item = NULL;; + item = + elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + // [UI] Default Memory + setting_create_Gendial_field_def(scroller, &(ad->itc_1text), + setting_memory_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, NULL, + 0, + "IDS_ST_BODY_MEMORYSETTINGS_DEFAULT_MEMORY", + NULL, NULL); + + // [UI] Memory Status + setting_create_Gendial_field_def(scroller, &(ad->itc_1text), + setting_memory_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, NULL, + 0, "IDS_ST_BODY_MEMORY_STATUS", NULL, + NULL); + setting_view_memory_main.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int setting_memory_main_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + setting_view_memory_main.is_create = 0; + + SettingMemoryUG *ad = (SettingMemoryUG *) cb; + vconf_ignore_key_changed(VCONFKEY_MEMORY_STATUS, + setting_memory_main_memory_status_change_cb); + evas_object_del(ad->ly_main); + + return 0; +} + +static int setting_memory_main_update(void *cb) +{ + SETTING_TRACE_BEGIN; + SettingMemoryUG *ad = (SettingMemoryUG *) cb; + evas_object_show(ad->ly_main); + + return 0; +} + +static int setting_memory_main_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + /* SettingMemoryUG *ad = (SettingMemoryUG *)cb; */ + /* evas_object_hide(ad->ly_main); */ + + return 0; +} + +/********************************************* + * + * callback function + * + *********************************************/ +static void +setting_memory_main_memory_status_change_cb(keynode_t *key, void *data) +{ + SETTING_TRACE_BEGIN; + SettingMemoryUG *ad = data; + int status = vconf_keynode_get_bool(key); + /* char *vconf_name = vconf_keynode_get_name(key); */ + + if (1 == status) { + if (ad->msg_intial_popup != NULL) { + evas_object_del(ad->msg_intial_popup); + ad->msg_intial_popup = NULL; + } + vconf_ignore_key_changed(VCONFKEY_MEMORY_STATUS, + setting_memory_main_memory_status_change_cb); + setting_view_change(&setting_view_memory_main, + &setting_view_memory_status, ad); + } +} + +static void +setting_memory_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, + void *event_info) +{ + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + SettingMemoryUG *ad = (SettingMemoryUG *) data; + + SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); + + if (!safeStrCmp + ("IDS_ST_BODY_MEMORYSETTINGS_DEFAULT_MEMORY", + list_item->keyStr)) { + setting_view_change(&setting_view_memory_main, + &setting_view_memory_default_memory, ad); + } else if (!safeStrCmp("IDS_ST_BODY_MEMORY_STATUS", list_item->keyStr)) { + /* check if msg server is ready */ + int val = 0; /* intial value is 0(not ready) */ + vconf_get_bool(VCONFKEY_MEMORY_STATUS, &val); + + if (1 != val) { /* not ready */ + int ret; + ret = + vconf_notify_key_changed(VCONFKEY_MEMORY_STATUS, + setting_memory_main_memory_status_change_cb, + ad); + setting_retm_if(ret < 0, "%s notifications Failed(%d)", + VCONFKEY_MEMORY_STATUS, ret); + + ad->msg_intial_popup = + setting_create_popup_without_btn(ad, ad->win_get, + NULL, _(SETTING_MEMORY_MSG_SERVER_POPUP_INFO_MSG), + NULL, 0, TRUE, TRUE); + } else { /* ready */ + + setting_view_change(&setting_view_memory_main, + &setting_view_memory_status, ad); + } + } else + SETTING_TRACE("Invalid selection"); + +} + +static void +setting_memory_main_click_softkey_back(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "data == NULL"); + + SettingMemoryUG *ad = (SettingMemoryUG *) data; + + /* Send destroy request */ + ug_destroy_me(ad->ug); + +} diff --git a/setting-memory/src/setting-memory-status.c b/setting-memory/src/setting-memory-status.c new file mode 100755 index 0000000..44db5c4 --- /dev/null +++ b/setting-memory/src/setting-memory-status.c @@ -0,0 +1,823 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#define MAX_STR_LEN_ON_MEMORY_STATUS 32 + +#define MAIN_STORAGE 0 + +static int setting_memory_status_create(void *cb); +static int setting_memory_status_destroy(void *cb); +static int setting_memory_status_update(void *cb); +static int setting_memory_status_cleanup(void *cb); + +setting_view setting_view_memory_status = { + .create = setting_memory_status_create, + .destroy = setting_memory_status_destroy, + .update = setting_memory_status_update, + .cleanup = setting_memory_status_cleanup, +}; + +static void __setting_memory_status_vconf_change_cb( keynode_t *key, void *data); +static int __setting_memory_status_check_mmc_status(); +static int __setting_memory_status_mmc_content_init(void *data, setting_memory_mmc_cb cb); + +static void __setting_memory_status_system_storage_available_size_get(char *szAvail) +{ + SETTING_TRACE_BEGIN; + + double dTotal = 0.0; + double dAvail = 0.0; + int ret = SETTING_RETURN_SUCCESS; + setting_mem_status internal_mem_stat; + + ret = __fs_stat(&dTotal, &dAvail, SETTING_MEMORY_STATUS_APP_PATH); + setting_retm_if(ret == SETTING_RETURN_FAIL, "get app_mem stat failed"); + internal_mem_stat.dTotal = dTotal; + internal_mem_stat.dAvail = dAvail; + + ret = setting_memory_status_size_transition(internal_mem_stat.dAvail, szAvail); + setting_retm_if(ret == SETTING_RETURN_FAIL, "setting_memory_status_size_transition fail"); +} + +static int setting_memory_status_create(void *cb) +{ + SETTING_TRACE_BEGIN; + + SettingMemoryUG *ad = (SettingMemoryUG *) cb; + Evas_Object *scroller; + + /* Evas_Object *user_mem_fr, *phone_mem_fr, *fr_bx1, *fr_bx2; */ + /* Evas_Object *sp; */ + /* float tmp_free_size, tmp_total_size; */ + /* char free_str[MAX_STR_LEN_ON_MEMORY_STATUS] = {0, }; */ + /* char total_str[MAX_STR_LEN_ON_MEMORY_STATUS] = {0, }; */ + /* char size_str[MAX_STR_LEN_ON_MEMORY_STATUS*2] = {0, }; */ + setting_push_layout_navi_bar_genlist(ad->win_main_layout, ad->win_get, + _("IDS_ST_BODY_MEMORY_STATUS"), + S_("IDS_COM_BODY_BACK"), NULL, + setting_memory_status_click_softkey_back, + NULL, ad, &scroller, ad->navi_bar); + + /* External SD card */ + setting_create_Gendial_field_titleItem(scroller, &(ad->itc_group_item), + SETTING_MEMORY_STATUS_EX_SD_CARD_DESC, + NULL); + + char ex_total_space[SETTING_MEMORY_MMC_MAX_MEM_STR_LEN] = { 0, }; + char ex_available_space[SETTING_MEMORY_MMC_MAX_MEM_STR_LEN] = { 0, }; + char ex_mount_status[SETTING_MEMORY_MMC_MAX_MEM_STR_LEN] = { 0, }; + int ex_mmc_status = VCONFKEY_SYSMAN_MMC_REMOVED; + setting_memory_status_ex_sd_card_info(ex_total_space, + ex_available_space, + ex_mount_status, &ex_mmc_status); + + ad->data_ex_total = + setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), NULL, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, ex_total_space, + SETTING_MEMORY_STATUS_TOTAL_SPACE_DESC, + NULL); + if (ad->data_ex_total) { + ad->data_ex_total->userdata = ad; + elm_genlist_item_select_mode_set(ad->data_ex_total->item, + ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("ad->data_ex_total is NULL"); + } + + ad->data_ex_available = + setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), NULL, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, ex_available_space, + SETTING_MEMORY_STATUS_AVAILABLE_SPACE_DESC, + NULL); + if (ad->data_ex_available) { + ad->data_ex_available->userdata = ad; + elm_genlist_item_select_mode_set(ad->data_ex_available->item, + ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("ad->data_ex_available is NULL"); + } + + if(!isEmulBin()) + { + ad->data_ex_mount = + setting_create_Gendial_field_def(scroller, &(ad->itc_1text), + setting_memory_status_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, ex_mount_status, NULL, + NULL); + if (ad->data_ex_mount) { + ad->data_ex_mount->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_ex_mount is NULL"); + } + + ad->data_ex_format = + setting_create_Gendial_field_def(scroller, &(ad->itc_1text), + setting_memory_status_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, + SETTING_MEMORY_STATUS_FORMAT_SD_CARD_DESC, + NULL, NULL); + if (ad->data_ex_format) { + ad->data_ex_format->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_ex_format is NULL"); + } + + setting_memory_status_list_item_enable_set_by_mmc_status(ad, ex_mmc_status); + } + + /* System storage */ + setting_create_Gendial_field_titleItem(scroller, &(ad->itc_group_item), + SETTING_MEMORY_STATUS_SYSTEM_SPACE_DESC, + NULL); + char system_storage_available[SETTING_MEMORY_MMC_MAX_MEM_STR_LEN] = {0,}; + __setting_memory_status_system_storage_available_size_get(system_storage_available); + ad->data_system_storage_available = + setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), NULL, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, system_storage_available, + SETTING_MEMORY_STATUS_AVAILABLE_SPACE_DESC, + NULL); + if (ad->data_system_storage_available) { + ad->data_system_storage_available->userdata = ad; + elm_genlist_item_select_mode_set(ad->data_system_storage_available-> + item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("ad->data_system_storage_available is NULL"); + } + +#if MAIN_STORAGE + /* Internal phone storage */ + setting_create_Gendial_field_titleItem(scroller, &(ad->itc_group_item), + SETTING_MEMORY_STATUS_MAIN_STORAGE_DESC, + NULL); + + char phone_storage_available[SETTING_MEMORY_MMC_MAX_MEM_STR_LEN] = {0,}; + setting_memory_status_get_phone_storage_available_size(ad, + phone_storage_available); + ad->data_phone_storage_available = + setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), NULL, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, phone_storage_available, + SETTING_MEMORY_STATUS_AVAILABLE_SPACE_DESC, + NULL); + if (ad->data_phone_storage_available) { + ad->data_phone_storage_available->userdata = ad; + elm_genlist_item_select_mode_set(ad->data_phone_storage_available-> + item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("ad->data_phone_storage_available is NULL"); + } +#endif + + Elm_Object_Item *item = NULL; + item = elm_genlist_item_append(scroller, &itc_bottom_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + int ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_MMC_STATUS, + __setting_memory_status_vconf_change_cb, ad); + if (ret != 0) { + SETTING_TRACE_ERROR("call vconf_notify_key_changed failed"); + } + + setting_view_memory_status.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int setting_memory_status_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + SettingMemoryUG *ad = (SettingMemoryUG *) cb; + + if (ad->progress_bar) { + evas_object_del(ad->progress_bar); + ad->progress_bar = NULL; + } + + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + + int ret = vconf_ignore_key_changed(VCONFKEY_SYSMAN_MMC_STATUS, + __setting_memory_status_vconf_change_cb); + if (ret != 0) { + SETTING_TRACE_ERROR("call vconf_ignore_key_changed failed"); + } + + if (ad->mmc_content) { + FREE(ad->mmc_content); + } + + elm_naviframe_item_pop(ad->navi_bar); + setting_view_memory_status.is_create = 0; + + return 0; +} + +static int setting_memory_status_update(void *cb) +{ + SETTING_TRACE_BEGIN; + + SettingMemoryUG *ad = (SettingMemoryUG *) cb; + if (!ad) { + SETTING_TRACE_ERROR("ad is null."); + } + // update sd card statistic + if (ad) + setting_memory_status_ex_sd_card_refresh_card_details_cb(ad, NULL, NULL); + + // update internal phone storage statistic + char phone_storage_available[SETTING_MEMORY_MMC_MAX_MEM_STR_LEN] = {0,}; + setting_memory_status_get_phone_storage_available_size(ad, phone_storage_available); + +#if MAIN_STORAGE + if (ad->data_phone_storage_available) + setting_memory_status_list_item_data_set(ad->data_phone_storage_available, phone_storage_available); +#endif + SETTING_TRACE_END; + return 0; +} + +static int setting_memory_status_cleanup(void *cb) +{ + return setting_memory_status_destroy(cb); +} + +/******************************************* + * + *general function + * + *******************************************/ + +static int __fs_stat(double* pdTotal, double* pdAvail, const char* szPath) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(NULL == pdTotal || NULL == pdAvail, + SETTING_RETURN_FAIL, "Null output parameters"); + + struct statvfs s; + + if (!statvfs(szPath, &s)) { + SETTING_TRACE("f_bsize = %ld f_blocks = %ld f_bavail = %ld f_frsize = %ld", + s.f_bsize, s.f_blocks, s.f_bavail, s.f_frsize); + *pdTotal = (double)s.f_frsize * s.f_blocks; + *pdAvail = (double)s.f_bsize * s.f_bavail; + } else { + return SETTING_RETURN_FAIL; + } + + return SETTING_RETURN_SUCCESS; +} + +/******************************************* + * + *callback function + * + *******************************************/ + +static void setting_memory_status_click_softkey_back(void *data, + Evas_Object *obj, + void *event_info) +{ + SettingMemoryUG *ad = (SettingMemoryUG *) data; + setting_view_change(&setting_view_memory_status, + &setting_view_memory_main, ad); +} + +static void +setting_memory_status_ex_sd_card_info(char* szTotal, char* szAvail, + char* ex_mount_desc, int *ex_mmc_status) +{ + int mmc_mode = VCONFKEY_SYSMAN_MMC_REMOVED; + int ret = vconf_get_int(VCONFKEY_SYSMAN_MMC_STATUS, &mmc_mode); + setting_retm_if(ret != 0, "Get VCONFKEY_SYSMAN_MMC_STATUS failed"); + *ex_mmc_status = mmc_mode; + SETTING_TRACE("mmc_mode = %d", mmc_mode); + + int mmc_status = __setting_memory_status_check_mmc_status(); + setting_retm_if(mmc_status == -1, "check mmc status failed"); + + /* Does not mounted, same st_dev */ + if (mmc_status == 0) { + snprintf(szTotal, SETTING_MEMORY_MMC_MAX_MEM_STR_LEN, + "%s", _("IDS_ST_HEADER_UNAVAILABLE")); + snprintf(szAvail, SETTING_MEMORY_MMC_MAX_MEM_STR_LEN, + "%s", _("IDS_ST_HEADER_UNAVAILABLE")); + snprintf(ex_mount_desc, SETTING_MEMORY_MMC_MAX_MEM_STR_LEN, + "%s", SETTING_MEMORY_STATUS_MOUNT_SD_CARD_DESC); + } + /* MMC mounted, diff st_dev */ + else { + snprintf(ex_mount_desc, SETTING_MEMORY_MMC_MAX_MEM_STR_LEN, + "%s", SETTING_MEMORY_STATUS_UNMOUNT_SD_CARD_DESC); + ret = + setting_memory_status_ex_sd_card_detail(szTotal, szAvail); + setting_retm_if(ret == SETTING_RETURN_FAIL, + "get sd card detail failed"); + } +} + +static int +setting_memory_status_ex_sd_card_detail(char* szTotal, char* szAvail) +{ + SETTING_TRACE_BEGIN; + double dTotal = 0.0; + double dAvail = 0.0; + + int ret = SETTING_RETURN_SUCCESS; + ret = __fs_stat(&dTotal, &dAvail, SETTING_MEMORY_STATUS_MMC_PATH); + setting_retvm_if(ret == SETTING_RETURN_FAIL, SETTING_RETURN_FAIL, + "get sd card size detail failed"); + + ret = setting_memory_status_size_transition(dTotal, szTotal); + setting_retvm_if(ret == SETTING_RETURN_FAIL, SETTING_RETURN_FAIL, + "setting_memory_status_size_transition failed"); + + ret = setting_memory_status_size_transition(dAvail, szAvail); + setting_retvm_if(ret == SETTING_RETURN_FAIL, SETTING_RETURN_FAIL, + "setting_memory_status_size_transition failed"); + + SETTING_TRACE("Total[%s], Avail[%s]", szTotal, szAvail); + return SETTING_RETURN_SUCCESS; +} + +static void +setting_memory_status_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + setting_retm_if(event_info == NULL, + "Invalid argument: event info is NULL"); + + SettingMemoryUG *ad = (SettingMemoryUG *) data; + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); + if (list_item == ad->data_ex_mount) { + setting_memory_status_ex_sd_card_mount_unmount(ad); + } else if (list_item == ad->data_ex_format) { + setting_memory_status_ex_sd_card_format_promt_popup_create(ad); + } +} + +static void +setting_memory_status_ex_sd_card_format_promt_popup_create(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingMemoryUG *ad = (SettingMemoryUG *) data; + + ad->curr_popup_cb = setting_memory_status_ex_sd_card_ask_format_resp_cb; + + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + + ad->popup = setting_create_popup_with_btn(ad, ad->win_get, NULL, + _(SETTING_MEMORY_STATUS_FORMAT_ASK_MSG), + ad->curr_popup_cb, 0, + 2, _("IDS_COM_SK_YES"),_("IDS_COM_SK_NO")); +} + +static void +setting_memory_status_ex_sd_card_ask_format_resp_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + int response_type = btn_type(obj); + if (POPUP_RESPONSE_OK == response_type) { + setting_memory_status_ex_sd_card_format_promt_popup_left_btn_cb + (data, NULL, NULL); + } else if (POPUP_RESPONSE_CANCEL == response_type) { + setting_memory_status_ex_sd_card_format_promt_popup_right_btn_cb + (data, NULL, NULL); + } +} + +static void +setting_memory_status_ex_sd_card_format_promt_popup_left_btn_cb(void *data, + Evas_Object * + obj, + void + *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingMemoryUG *ad = (SettingMemoryUG *) data; + + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + + /* Show Formatting..... popup */ + ad->popup = setting_create_popup_with_progressbar(ad, ad->win_get, + "list_process", + _("IDS_ST_POP_MSG_FORMATTING"), + NULL, NULL, + SETTING_MEMORY_STATUS_PROGRESSBAR_TIMEOUT, TRUE, TRUE); + + int ret = __setting_memory_status_mmc_content_init(ad, setting_memory_status_ex_sd_card_format_cb); + if (ret == SETTING_RETURN_FAIL) { + SETTING_TRACE_ERROR("__setting_memory_status_mmc_content_init fail"); + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, + NULL, _("IDS_COM_POP_FAILED"), + NULL, + SETTING_MEMORY_POPUP_TIMER, FALSE, FALSE); + return; + } + + ret = sysman_request_format_mmc(ad->mmc_content); + /* if fail, destory popup */ + if (ret == -1) { + SETTING_TRACE_ERROR("call sysman_request_format_mmc fail"); + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, + NULL, _("IDS_COM_POP_FAILED"), + NULL, + SETTING_MEMORY_POPUP_TIMER, FALSE, FALSE); + } +} + +static void +setting_memory_status_ex_sd_card_format_promt_popup_right_btn_cb(void *data, + Evas_Object * + obj, + void + *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingMemoryUG *ad = (SettingMemoryUG *) data; + + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } +} + +static void setting_memory_status_ex_sd_card_mount_unmount(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingMemoryUG *ad = (SettingMemoryUG *)data; + + int mmc_status = __setting_memory_status_check_mmc_status(); + setting_retm_if(mmc_status == -1, "check mmc status failed"); + + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + + /* Show progressbar popup */ + ad->popup = setting_create_popup_with_progressbar(ad, ad->win_get, + "pending_list", + NULL, NULL, NULL, + SETTING_MEMORY_STATUS_PROGRESSBAR_TIMEOUT, TRUE, TRUE); + + int ret = -1; + /* Does not mounted, same st_dev */ + if (mmc_status == 0) { + ret = __setting_memory_status_mmc_content_init(ad, setting_memory_status_ex_sd_card_mount_cb); + if (ret == SETTING_RETURN_FAIL) { + SETTING_TRACE_ERROR("__setting_memory_status_mmc_content_init fail"); + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, + NULL, _("IDS_COM_POP_FAILED"), + NULL, + SETTING_MEMORY_POPUP_TIMER, FALSE, FALSE); + return; + } + ret = sysman_request_mount_mmc(ad->mmc_content); + if (ret == -1) { + SETTING_TRACE_ERROR("call sysman_request_mount_mmc fail"); + } + } + /* MMC mounted, diff st_dev */ + else { + ret = __setting_memory_status_mmc_content_init(ad, setting_memory_status_ex_sd_card_unmount_cb); + if (ret == SETTING_RETURN_FAIL) { + SETTING_TRACE_ERROR("__setting_memory_status_mmc_content_init fail"); + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, + NULL, _("IDS_COM_POP_FAILED"), + NULL, + SETTING_MEMORY_POPUP_TIMER, FALSE, FALSE); + return; + } + + ret = sysman_request_unmount_mmc(ad->mmc_content, + MNT_FORCE); /* 1 = MNT_FORCE */ + if (ret == -1) { + SETTING_TRACE_ERROR("call sysman_request_unmount_mmc fail"); + } + } + + /* if fail, popup failed info */ + if (ret == -1) { + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, + NULL, _("IDS_COM_POP_FAILED"), + NULL, + SETTING_MEMORY_POPUP_TIMER, FALSE, FALSE); + } +} + +static void +setting_memory_status_ex_sd_card_refresh_card_details_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingMemoryUG *ad = (SettingMemoryUG *)data; + + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + + char ex_total_space[SETTING_MEMORY_MMC_MAX_MEM_STR_LEN] = {0, }; + char ex_available_space[SETTING_MEMORY_MMC_MAX_MEM_STR_LEN] = {0, }; + char ex_mount_status[SETTING_MEMORY_MMC_MAX_MEM_STR_LEN] = {0, }; + int ex_mmc_status = VCONFKEY_SYSMAN_MMC_REMOVED; + setting_memory_status_ex_sd_card_info(ex_total_space, ex_available_space, + ex_mount_status, &ex_mmc_status); + + setting_memory_status_list_item_data_set(ad->data_ex_total, ex_total_space); + setting_memory_status_list_item_data_set(ad->data_ex_available, ex_available_space); + if(!isEmulBin()) + { + setting_memory_status_list_item_data_set(ad->data_ex_mount, ex_mount_status); + } + setting_memory_status_list_item_enable_set_by_mmc_status(ad, ex_mmc_status); +} + +static void +setting_memory_status_ex_sd_card_operate_complete(void *data, char *desc, + bool popup_flag) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingMemoryUG *ad = (SettingMemoryUG *) data; + setting_memory_hide_popup_with_progress_bar(ad); + if (popup_flag) { + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, NULL, desc, + setting_memory_status_ex_sd_card_refresh_card_details_cb, + SETTING_MEMORY_POPUP_TIMER, FALSE, FALSE); + } +} + +static void +setting_memory_status_list_item_enable_set_by_mmc_status(void *data, + int ex_mmc_status) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingMemoryUG *ad = (SettingMemoryUG *) data; + + if (ex_mmc_status == VCONFKEY_SYSMAN_MMC_REMOVED) { + setting_disable_genlist_item(ad->data_ex_total->item); + setting_disable_genlist_item(ad->data_ex_available->item); + if(!isEmulBin()) + { + setting_disable_genlist_item(ad->data_ex_mount->item); + setting_disable_genlist_item(ad->data_ex_format->item); + } + } else if (ex_mmc_status == VCONFKEY_SYSMAN_MMC_INSERTED_NOT_MOUNTED) { + setting_disable_genlist_item(ad->data_ex_total->item); + setting_disable_genlist_item(ad->data_ex_available->item); + if(!isEmulBin()) + { + setting_enable_genlist_item(ad->data_ex_mount->item); + setting_disable_genlist_item(ad->data_ex_format->item); + } + } else if (ex_mmc_status == VCONFKEY_SYSMAN_MMC_MOUNTED){ + } else { + SETTING_TRACE_DEBUG("abnormal status of MMC"); + } +} + +static void setting_memory_status_list_item_data_set(Setting_GenGroupItem_Data * + item_data, char *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(item_data == NULL, "Data parameter is NULL"); + + G_FREE(item_data->keyStr); + item_data->keyStr = (char *)g_strdup(data); + elm_object_item_data_set(item_data->item, item_data); + elm_genlist_item_update(item_data->item); +} + +static void +setting_memory_status_get_phone_storage_available_size(void *data, + char *szAvail) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + //SettingMemoryUG *ad = (SettingMemoryUG *) data; + + double dTotal = 0.0; + double dAvail = 0.0; + int ret = SETTING_RETURN_SUCCESS; + setting_mem_status internal_mem_stat; + + ret = __fs_stat(&dTotal, &dAvail, SETTING_MEMORY_STATUS_APP_PATH); + setting_retm_if(ret == SETTING_RETURN_FAIL, "get app_mem stat failed"); + internal_mem_stat.dTotal = dTotal; + internal_mem_stat.dAvail = dAvail; + + dTotal = 0.0; + dAvail = 0.0; + ret = __fs_stat(&dTotal, &dAvail, SETTING_MEMORY_STATUS_MEDIA_PATH); + setting_retm_if(ret == SETTING_RETURN_FAIL, "get media_mem stat failed"); + internal_mem_stat.dTotal += dTotal; + internal_mem_stat.dAvail += dAvail; + + ret = setting_memory_status_size_transition(internal_mem_stat.dAvail, + szAvail); + setting_retm_if(ret == SETTING_RETURN_FAIL, "setting_memory_status_size_transition fail"); +} + +static int +setting_memory_status_size_transition(double size, char *size_desc) +{ + SETTING_TRACE_BEGIN; + + double tmp_size = 0.0; + int ret = 0; + if (size < SETTING_MEMORY_MEGABYTE_VALUE) { // size < 1MB: show x.xKB + tmp_size = size / SETTING_MEMORY_KILOBYTE_VALUE; + ret = snprintf(size_desc, SETTING_MEMORY_MMC_MAX_MEM_STR_LEN, "%4.2lf%s", tmp_size, "KB"); + retv_if(ret < 0, SETTING_RETURN_FAIL); + } else if (size < SETTING_MEMORY_GIGABYTE_VALUE) { // size < 1GB: show x.xMB + tmp_size = size / SETTING_MEMORY_MEGABYTE_VALUE; + ret = snprintf(size_desc, SETTING_MEMORY_MMC_MAX_MEM_STR_LEN, "%4.2lf%s", tmp_size, "MB"); + retv_if(ret < 0, SETTING_RETURN_FAIL); + } else { // 1G <= size: show x.xGB + tmp_size = size / SETTING_MEMORY_GIGABYTE_VALUE; + ret = snprintf(size_desc, SETTING_MEMORY_MMC_MAX_MEM_STR_LEN, "%4.2lf%s", tmp_size, "GB"); + retv_if(ret < 0, SETTING_RETURN_FAIL); + } + + return SETTING_RETURN_SUCCESS; +} + +static void setting_memory_status_ex_sd_card_format_cb(int val, void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + if (val == SETTING_MEMORY_STATUS_SYSMAN_REQUEST_SUCCESS) { + setting_memory_status_ex_sd_card_operate_complete(data, + _("IDS_COM_POP_SUCCESS"), + TRUE); + + } else { + setting_memory_status_ex_sd_card_operate_complete(data, + _("IDS_COM_POP_FAILED"), + TRUE); + } +} + +static void setting_memory_status_ex_sd_card_mount_cb(int val, void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + if (val == SETTING_MEMORY_STATUS_SYSMAN_REQUEST_SUCCESS) { + setting_memory_status_ex_sd_card_operate_complete(data, + _("IDS_COM_POP_SUCCESS"), + FALSE); + } else if (val == SETTING_MEMORY_STATUS_SYSMAN_REQUEST_MOUNT_ALREADY) { + setting_memory_status_ex_sd_card_operate_complete(data, + _(SETTING_MEMORY_STATUS_EX_SD_CARD_MOUNT_ALREADY_DESC), + TRUE); + } else { + setting_memory_status_ex_sd_card_operate_complete(data, + _("IDS_COM_POP_FAILED"), + TRUE); + } +} + +static void setting_memory_status_ex_sd_card_unmount_cb(int val, void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + if (val == SETTING_MEMORY_STATUS_SYSMAN_REQUEST_SUCCESS) { + setting_memory_status_ex_sd_card_operate_complete(data, + _("IDS_COM_POP_SUCCESS"), + FALSE); + } else { + setting_memory_status_ex_sd_card_operate_complete(data, + _("IDS_COM_POP_FAILED"), + TRUE); + } +} + +static void __setting_memory_status_vconf_change_cb( keynode_t *key, void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == key, "key is NULL"); + setting_retm_if(NULL == data, "data is NULL"); + SettingMemoryUG *ad = (SettingMemoryUG *)data; + + int status = vconf_keynode_get_int(key); + char *vconf_name = vconf_keynode_get_name(key); + + if (!safeStrCmp(vconf_name, VCONFKEY_SYSMAN_MMC_STATUS)) { + SETTING_TRACE("status:%d", status); + setting_memory_status_ex_sd_card_refresh_card_details_cb(ad, + NULL, + NULL); + } else { + SETTING_TRACE_ERROR("vconf_name is NULL"); + } +} + +static int __setting_memory_status_check_mmc_status() +{ + int ret = 0; + struct stat parent_stat, mount_stat; + + ret = stat(SETTING_MEMORY_STATUS_MMC_PATH, &mount_stat); + setting_retvm_if(ret != 0, -1, "get stat error : /opt/storage/sdcard"); + + ret = stat(SETTING_MEMORY_STATUS_MMC_PARENT_PATH, &parent_stat); + setting_retvm_if(ret != 0, -1, "get stat error : /opt/storage/sdcard/.."); + + /* Does not mounted, same st_dev */ + if(mount_stat.st_dev == parent_stat.st_dev) + { + return 0; + } + /* MMC mounted, diff st_dev */ + else + { + return 1; + } +} + +static int __setting_memory_status_mmc_content_init(void *data, setting_memory_mmc_cb cb) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(NULL == data, SETTING_RETURN_FAIL, "data is NULL"); + setting_retvm_if(NULL == cb, SETTING_RETURN_FAIL, "cb is NULL"); + SettingMemoryUG *ad = (SettingMemoryUG *)data; + if (ad->mmc_content == NULL) { + ad->mmc_content = (struct mmc_contents *)calloc(1, sizeof(struct mmc_contents)); + if (ad->mmc_content == NULL ) { + SETTING_TRACE_ERROR("calloc failed"); + return SETTING_RETURN_FAIL; + } + } + ad->mmc_content->mmc_cb = cb; + ad->mmc_content->user_data = ad; + return SETTING_RETURN_SUCCESS; +} diff --git a/setting-memory/src/setting-memory.c b/setting-memory/src/setting-memory.c new file mode 100755 index 0000000..5f48d50 --- /dev/null +++ b/setting-memory/src/setting-memory.c @@ -0,0 +1,270 @@ +/* + * setting + * Copyright (c) 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://floralicense.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. + */ + +/** + *@defgroup setting-memory + *UG creation code for setting-memory + */ + +#include + +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif + +static void setting_memory_ug_cb_resize(void *data, Evas *e, Evas_Object *obj, + void *event_info) +{ + SettingMemoryUG *ad = (SettingMemoryUG *) data; + setting_view_update(&setting_view_memory_default_memory, ad); +} + +static void *setting_memory_ug_on_create(ui_gadget_h ug, + enum ug_mode mode, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if((!priv), NULL, "!priv"); + + SettingMemoryUG *memoryUG = priv; + memoryUG->ug = ug; + + memoryUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug); + memoryUG->win_get = (Evas_Object *) ug_get_window(); + evas_object_show(memoryUG->win_main_layout); + memoryUG->evas = evas_object_evas_get(memoryUG->win_main_layout); + + setting_retvm_if(memoryUG->win_main_layout == NULL, NULL, + "cannot get main window "); + + /* register view node table */ + setting_view_node_table_intialize(); + + setting_view_node_table_register(&setting_view_memory_default_memory, NULL); + + setting_create_Gendial_itc("dialogue/1text.1icon.2", + &(memoryUG->itc_1text_1icon_2)); + setting_create_Gendial_itc("dialogue/title", + &(memoryUG->itc_group_item)); + setting_create_Gendial_itc("dialogue/1text", &(memoryUG->itc_1text)); + setting_create_Gendial_itc("1text.1icon.2", + &(memoryUG->itc_1text_1icon)); + setting_create_Gendial_itc("select_all", &(memoryUG->itc_sel_all)); + + setting_create_Gendial_itc("dialogue/2text.3/expandable", + &(memoryUG->itc_2text_3_parent)); + setting_create_Gendial_itc("dialogue/1text.1icon/expandable2", + &(memoryUG->itc_1icon_1text_sub)); + setting_create_Gendial_itc("dialogue/2text.2", + &(memoryUG->itc_2text_2)); + + memoryUG->itc_seperator.item_style = "dialogue/separator"; + memoryUG->itc_seperator.func.text_get = NULL; + memoryUG->itc_seperator.func.content_get = NULL; + memoryUG->itc_seperator.func.state_get = NULL; + memoryUG->itc_seperator.func.del = NULL; + + SETTING_TRACE_DEBUG("[DBG] set current view"); + + /* creating a view. */ + setting_view_node_set_cur_view(&setting_view_memory_default_memory); + setting_view_create(&setting_view_memory_default_memory, (void *)memoryUG); + evas_object_event_callback_add(memoryUG->win_main_layout, + EVAS_CALLBACK_RESIZE, + setting_memory_ug_cb_resize, memoryUG); + return memoryUG->ly_main; +} + +static void setting_memory_ug_on_start(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_memory_ug_on_pause(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_memory_ug_on_resume(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if((!ug || !priv), "!ug || !priv"); + //SettingMemoryUG *ad = priv; + + // Need to update the mem. status view in resuming the view + + SETTING_TRACE_END; +} + +static void setting_memory_ug_on_destroy(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if((!priv), "!priv"); + SettingMemoryUG *memoryUG = priv; + + evas_object_event_callback_del(memoryUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_memory_ug_cb_resize); /* fix flash issue for gallery */ + memoryUG->ug = ug; + + /* delete the allocated objects. */ + + if (TRUE == setting_view_memory_default_memory.is_create) { + setting_view_destroy(&setting_view_memory_default_memory, memoryUG); + } + + if (NULL != ug_get_layout(memoryUG->ug)) { + evas_object_hide((Evas_Object *) ug_get_layout(memoryUG->ug)); + evas_object_del((Evas_Object *) ug_get_layout(memoryUG->ug)); + } + + SETTING_TRACE_END; +} + +static void setting_memory_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; +} + +static void setting_memory_ug_on_event(ui_gadget_h ug, + enum ug_event event, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + 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; + case UG_EVENT_REGION_CHANGE: + break; + default: + break; + } +} + +static void setting_memory_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + if (!ug) + return; + SettingMemoryUG *ad = (SettingMemoryUG *) priv; + + switch (event) { + case UG_KEY_EVENT_END: + { + if (ad->wait_timer) { + ecore_timer_del(ad->wait_timer); + ad->wait_timer = NULL; + } + + if (ad->progress_bar_timer) { + ecore_timer_del(ad->progress_bar_timer); + ad->progress_bar_timer = NULL; + } + if (ad->popup_timer) { + ecore_timer_del(ad->popup_timer); + ad->popup_timer = NULL; + } + + if (elm_naviframe_top_item_get(ad->navi_bar) == + elm_naviframe_bottom_item_get(ad->navi_bar)) { + ug_destroy_me(ug); + } else { + /* elm_naviframe_item_pop(ad->navi_bar); */ + setting_view_cb_at_endKey(ad); + } + } + break; + + default: + break; + } +} + +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + SettingMemoryUG *memoryUG = calloc(1, sizeof(SettingMemoryUG)); + setting_retvm_if(!memoryUG, -1, "Create SettingMemoryUG obj failed"); + + ops->create = setting_memory_ug_on_create; + ops->start = setting_memory_ug_on_start; + ops->pause = setting_memory_ug_on_pause; + ops->resume = setting_memory_ug_on_resume; + ops->destroy = setting_memory_ug_on_destroy; + ops->message = setting_memory_ug_on_message; + ops->event = setting_memory_ug_on_event; + ops->key_event = setting_memory_ug_on_key_event; + ops->priv = memoryUG; + ops->opt = UG_OPT_INDICATOR_ENABLE; + + return 0; +} + +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + struct SettingMemoryUG *memoryUG; + setting_retm_if(!ops, "ops == NULL"); + + memoryUG = ops->priv; + if (memoryUG) + FREE(memoryUG); +} + +/** +* Reset function to 'reset' the settings of the UG, it will be invoked by 'Reset' UG +* +* @param[in] data +* @param[in] priv +*/ +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + int ret = 0; +#if SUPPORT_RUN_SYSTEM_COMMAND + ret += excuteCmd(SETTING_POSTINST_FILE, 1, "memory"); +#else + int value = SETTING_DEF_MEMORY_PHONE; + ret += vconf_set_int(VCONFKEY_SETAPPL_DEFAULT_MEM_WAP_INT, value); + ret += vconf_set_int(VCONFKEY_SETAPPL_DEFAULT_MEM_BLUETOOTH_INT, value); + ret += vconf_set_int(VCONFKEY_SETAPPL_DEFAULT_MEM_CAMERA_INT, value); + + ret += vconf_set_int(VCONFKEY_SETAPPL_DEFAULT_MEM_VOICE_RECORDER_INT, value); + ret += vconf_set_int(VCONFKEY_SETAPPL_DEFAULT_MEM_FM_RADIO_INT, value); + ret += vconf_set_int(VCONFKEY_SETAPPL_DEFAULT_MEM_ALL_SHARE_INT, value); + ret += vconf_set_int(VCONFKEY_SETAPPL_DEFAULT_MEM_ADOBE_AIR_INT, value); + ret += vconf_set_int(VCONFKEY_SETAPPL_DEFAULT_MEM_DVB_H_INT, value); +#endif + return ret; +} + + diff --git a/setting-menuscreen/CMakeLists.txt b/setting-menuscreen/CMakeLists.txt new file mode 100755 index 0000000..84c022d --- /dev/null +++ b/setting-menuscreen/CMakeLists.txt @@ -0,0 +1,34 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_menuscreen REQUIRED elementary ecore ecore-x edje evas appcore-common appcore-efl ui-gadget-1 capi-appfw-application dlog eina aul) + +FOREACH(flag ${pkgs_menuscreen_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") +ADD_DEFINITIONS("-fpie") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") + +ADD_LIBRARY(${SETTING_MENUSCREEN_UG} SHARED + ./src/setting-menuscreen.c + ./src/setting-menuscreen-main.c + ./src/setting-menuscreen-password.c + ) + +TARGET_LINK_LIBRARIES(${SETTING_MENUSCREEN_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_MENUSCREEN_UG} ${pkgs_menuscreen_LDFLAGS}) + +INSTALL(TARGETS ${SETTING_MENUSCREEN_UG} DESTINATION /usr/ug/lib) diff --git a/setting-menuscreen/include/setting-menuscreen-main.h b/setting-menuscreen/include/setting-menuscreen-main.h new file mode 100755 index 0000000..b6bafeb --- /dev/null +++ b/setting-menuscreen/include/setting-menuscreen-main.h @@ -0,0 +1,24 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_MENUSCREEN_MAIN_H__ +#define __SETTING_MENUSCREEN_MAIN_H__ + +#include + +/** @todo need to i18n string registration */ + +#endif /* __SETTING_MENUSCREEN_MAIN_H__ */ diff --git a/setting-menuscreen/include/setting-menuscreen-password.h b/setting-menuscreen/include/setting-menuscreen-password.h new file mode 100755 index 0000000..50ba16f --- /dev/null +++ b/setting-menuscreen/include/setting-menuscreen-password.h @@ -0,0 +1,29 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_MENUSCREEN_PASSWORD_H__ +#define __SETTING_MENUSCREEN_PASSOWRD_H__ + +#include + +/** @todo need to i18n string registration */ + +static void setting_menuscreen_password_click_softkey_back_cb(void *data, Evas_Object *obj, void *event_info); + +static void setting_menuscreen_password_entry_change_cb (void *data, Evas_Object *obj, void *event_info); +static void setting_menuscreen_password_click_softkey_done_cb(void *data, Evas_Object *obj, void *event_info); + +#endif /* __SETTING_MENUSCREEN_PASSWORD_H__ */ diff --git a/setting-menuscreen/include/setting-menuscreen.h b/setting-menuscreen/include/setting-menuscreen.h new file mode 100755 index 0000000..674312d --- /dev/null +++ b/setting-menuscreen/include/setting-menuscreen.h @@ -0,0 +1,109 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_MENUSCREEN_H__ +#define __SETTING_MENUSCREEN_H__ + +#include +#include + +#include + +#include + +#include +#include +#include + +#include +#include + +#define SETTING_PW_STR "16777216" +#define SETTING_THEME_LIVE_MAGAZINE "com.samsung.live-magazine" +#define SETTING_THEME_CLUSTER_HOME "com.samsung.cluster-home" + +#define SETTING_MENUSCREEN_FOLDER "/opt/share/install-info/" +#define SETTING_MENUSCREEN_FILE_EXTENSION "desktop" +#define SETTING_MENUSCREEN_INDEX_NAME "name" + +#define SETTING_MENUSCREEN_SELECTED_PACKAGE_VCONF_KEY VCONFKEY_SETAPPL_SELECTED_PACKAGE_NAME + +#define SETTING_MENUSCREEN_TABLE_NAME "menu" +#define SETTING_MENUSCREEN_CLAUSE "categories = '?'" +#define SETTING_MENUSCREEN_VALUE_CATEGORY "home-screen" +#define SETTING_MENUSCREEN_COLUMN_NAME "name" +#define SETTING_MENUSCREEN_COLUMN_PKGNAME "package" +#define SETTING_MENUSCREEN_COLUMN_CATEGORY "category" + + +typedef struct tag_ug_menuscreen_info { + char* pkgname; + char* appname; +}ug_menuscreen_info ; + +typedef struct _SettingMenuscreenUG SettingMenuscreenUG; + +/** + * Setting Menuscreen UG context + * all UG function has void* as an agument. this is casted back to SettingMenuscreenUG + * and the functions access app context. + */ +struct _SettingMenuscreenUG { + ui_gadget_h ug; + + /* add more variables here (move your appdata to here) */ + Evas *evas; + Evas_Object *win_main_layout; + Evas_Object *win_get; + + Evas_Object *scroller; + + ui_gadget_h ug_loading; + + Evas_Object *ly_main; + Evas_Object *ly_wall; + + Evas_Object *navi_bar; /* for navigation effect */ + Elm_Object_Item *navi_it; + + /* entries in Genlist */ + setting_view *view_to_load; + + // page 1 : main list + Evas_Object* chk_radio; + int pkglist_cnt; + int chk_menuscreen; // selcted item + char* selected_theme; + Eina_List * menuscreen_list; + + // page 2 : password + Setting_GenGroupItem_Data* data_pwd; + + Elm_Genlist_Item_Class itc_2text_2; + Elm_Genlist_Item_Class itc_1text_1icon_2; + Elm_Genlist_Item_Class itc_layout; + Elm_Genlist_Item_Class itc_seperator; + Elm_Genlist_Item_Class itc_2text_3_parent; + Elm_Genlist_Item_Class itc_1icon_1text_sub; + Elm_Genlist_Item_Class itc_1text; +}; + +extern setting_view setting_view_menuscreen_main; +extern setting_view setting_view_menuscreen_password; + +void setting_menuscreen_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode, void *priv); + +#endif /* __SETTING_MENUSCREEN_H__ */ diff --git a/setting-menuscreen/src/setting-menuscreen-main.c b/setting-menuscreen/src/setting-menuscreen-main.c new file mode 100755 index 0000000..796a7b7 --- /dev/null +++ b/setting-menuscreen/src/setting-menuscreen-main.c @@ -0,0 +1,281 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include +#include + +static int setting_menuscreen_main_create(void *cb); +static int setting_menuscreen_main_destroy(void *cb); +static int setting_menuscreen_main_update(void *cb); +static int setting_menuscreen_main_cleanup(void *cb); + + +// BUSINESS LOGIC --- +static void _get_menuscreen_info2(/*[OUT]*/int* pkglist_cnt, void* data); +ail_cb_ret_e appinfo_menuscreen_func(const ail_appinfo_h appinfo, void *user_data); +// BUSINESS LOGIC --- +static void setting_menuscreen_main_click_softkey_back_cb(void *data, Evas_Object *obj, void *event_info); + +static void setting_menuscreen_mouse_up_Gendial_list_radio_cb(void *data, Evas_Object *obj, void *event_info); + +setting_view setting_view_menuscreen_main = { + .create = setting_menuscreen_main_create, + .destroy = setting_menuscreen_main_destroy, + .update = setting_menuscreen_main_update, + .cleanup = setting_menuscreen_main_cleanup, +}; + +static int setting_menuscreen_main_create(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) cb; + Evas_Object *scroller = NULL; + ad->ly_main = + setting_create_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _("IDS_ST_HEADER_HOME_SCREEN_ABB"), _("IDS_COM_BODY_BACK"), + NULL, + setting_menuscreen_main_click_softkey_back_cb, + NULL, ad, &scroller, + &(ad->navi_bar)); + + Elm_Object_Item *item = NULL; + item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + int* pkglist_cnt = &ad->pkglist_cnt; + + _get_menuscreen_info2(pkglist_cnt, ad); + + // radio button + ad->chk_radio = elm_radio_add(scroller); + elm_radio_state_value_set(ad->chk_radio, -1); + + Setting_GenGroupItem_Data *item_data = NULL; + Eina_List* elist = NULL; + ug_menuscreen_info* pnode = NULL; + int idx = 0; + char *sel_str = vconf_get_str(VCONFKEY_SETAPPL_SELECTED_PACKAGE_NAME); + + EINA_LIST_FOREACH( ad->menuscreen_list, elist, pnode) + { + item_data = setting_create_Gendial_field_2radio(scroller, + &(ad->itc_1text_1icon_2), + setting_menuscreen_mouse_up_Gendial_list_radio_cb, + ad->chk_radio, + SWALLOW_Type_1RADIO, + ad->chk_radio, + idx, + pnode->appname, + pnode->pkgname, + NULL); + + if (item_data) { + item_data->userdata = ad; + } else { + SETTING_TRACE_ERROR("item_data is NULL"); + } + SETTING_TRACE("pkgname[%s] sel_str[%s]", pnode->pkgname, sel_str); + if (0 == safeStrCmp(pnode->pkgname, sel_str)) + { + elm_radio_value_set(ad->chk_radio, idx); + } + + idx++; + } + FREE(sel_str); + + + setting_view_menuscreen_main.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int setting_menuscreen_main_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_del(ad->ly_main); + /* if(ad->back_dialData) FREE(ad->back_dialData); */ + setting_view_menuscreen_main.is_create = 0; + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_menuscreen_main_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + return SETTING_RETURN_SUCCESS; +} + +static int setting_menuscreen_main_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) cb; + + if (ad->ly_main != NULL) { + /* evas_object_hide(ad->ly_main); */ + } + + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +static void +setting_menuscreen_main_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, + "[Setting > Menuscreen] Data parameter is NULL"); + + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) data; + + /* Send destroy request */ + ug_destroy_me(ad->ug); + SETTING_TRACE_END; + +} + + +static void _get_menuscreen_info2(/*[OUT]*/int* pkglist_cnt, void* data) +{ + SETTING_TRACE_BEGIN; + SettingMenuscreenUG *ugd = (SettingMenuscreenUG *) data; + + ail_filter_h filter; + ail_error_e ret; + // int i=0; + int n=0; + + ret = ail_filter_new(&filter); + if (ret != AIL_ERROR_OK) { + return ; + } + + ret = ail_filter_count_appinfo(filter, &n); + //printf("count =%d \n", n); + *pkglist_cnt = n; + + ret = ail_filter_add_str(filter, AIL_PROP_CATEGORIES_STR, "home-screen"); + if (ret != AIL_ERROR_OK) { + ail_filter_destroy(filter); + return ; + } + + ail_filter_list_appinfo_foreach(filter, appinfo_menuscreen_func, (void *)ugd); + ail_filter_destroy(filter); +} + +/* + /opt/home/root/aaa/cprog/ail_test # ./ail_test + i=0 List Menu + i=1 BEAT +*/ +ail_cb_ret_e appinfo_menuscreen_func(const ail_appinfo_h appinfo, void *user_data) +{ + SETTING_TRACE_BEGIN; + SettingMenuscreenUG *ugd = (SettingMenuscreenUG *) user_data; + + char *package; + char *appname; + static int s_i = 0 ; + + ail_appinfo_get_str(appinfo, AIL_PROP_PACKAGE_STR, &package); + ail_appinfo_get_str(appinfo, AIL_PROP_NAME_STR, &appname); + + Eina_List** d_menuscreen_list = &ugd->menuscreen_list; + + ug_menuscreen_info* pnode = (ug_menuscreen_info*)malloc(sizeof(ug_menuscreen_info)); + pnode->pkgname = strdup(package); + pnode->appname = strdup(appname); + + SETTING_TRACE(" >>>>>>>>>> s_i=%d %s\n", s_i++, package); + + *d_menuscreen_list = eina_list_append(*d_menuscreen_list, pnode); + + if (s_i > 30) + return AIL_CB_RET_CANCEL; + + return AIL_CB_RET_CONTINUE; +} + +static void setting_menuscreen_mouse_up_Gendial_list_radio_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + setting_retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + + Evas_Object *radio = (Evas_Object *) data; + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + if (list_item->chk_status == elm_radio_value_get(radio)) + {//select the same item + return; + } + + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) list_item->userdata; + + SETTING_TRACE("---------------------------------------------"); + SETTING_TRACE("chk_status = %d ", list_item->chk_status); + SETTING_TRACE("sub_desc= %s", list_item->sub_desc); + SETTING_TRACE("KeyStr= %s", list_item->keyStr); + SETTING_TRACE("---------------------------------------------"); + + // store list_itemdata + ad->selected_theme = list_item->sub_desc; + + if ( 0 == strcmp(list_item->sub_desc, SETTING_THEME_LIVE_MAGAZINE)) + { + setting_view_change(&setting_view_menuscreen_main, &setting_view_menuscreen_password, ad); + return; + } + else if (0 == strcmp(list_item->sub_desc, SETTING_THEME_CLUSTER_HOME)) + { + setting_view_change(&setting_view_menuscreen_main, &setting_view_menuscreen_password, ad); + return; + } + else { + elm_radio_value_set(radio, list_item->chk_status); + vconf_set_str( VCONFKEY_SETAPPL_SELECTED_PACKAGE_NAME, ad->selected_theme); + } + ug_destroy_me(ad->ug); +} + + diff --git a/setting-menuscreen/src/setting-menuscreen-password.c b/setting-menuscreen/src/setting-menuscreen-password.c new file mode 100755 index 0000000..d1fad73 --- /dev/null +++ b/setting-menuscreen/src/setting-menuscreen-password.c @@ -0,0 +1,224 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include + +#define SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH 4 +#define SETTING_PW_UG_NORMAL_PASSWORD_MAX_LENGTH 16 +#define SETTING_PW_UG_PRIVACY_PASSWORD_MIN_LENGTH 4 +#define SETTING_PW_UG_PRIVACY_PASSWORD_MAX_LENGTH 16 + + + +static int setting_menuscreen_password_create(void *cb); +static int setting_menuscreen_password_destroy(void *cb); +static int setting_menuscreen_password_update(void *cb); +static int setting_menuscreen_password_cleanup(void *cb); + + +setting_view setting_view_menuscreen_password = { + .create = setting_menuscreen_password_create, + .destroy = setting_menuscreen_password_destroy, + .update = setting_menuscreen_password_update, + .cleanup = setting_menuscreen_password_cleanup, +}; +static Eina_Bool __focus_on_idler(void *data) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(data == NULL, FALSE); + + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) data; + retv_if(ad->data_pwd == NULL, EINA_FALSE); + if (ad->data_pwd->isFocusFlag || (ad->data_pwd->eo_check != NULL)) + { + //no matter how many edifileds, it only need focus on 1st editfiled + elm_object_focus_set(ad->data_pwd->eo_check, EINA_TRUE); + } + + SETTING_TRACE_END; + return ECORE_CALLBACK_CANCEL; + //return EINA_FALSE; +} + +static int setting_menuscreen_password_create(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) cb; + Evas_Object *scroller = elm_genlist_add(ad->win_main_layout); + elm_object_style_set(scroller, "dialogue"); + if(scroller == NULL) + return SETTING_RETURN_FAIL; + + elm_genlist_clear(scroller); /* first to clear list */ + elm_genlist_homogeneous_set(scroller, EINA_TRUE); + + ad->navi_it = setting_create_navi_bar_top_buttons(_("IDS_COM_BODY_AUTH_PASSWORD"), + _("IDS_COM_SK_CANCEL"), + _("IDS_COM_SK_DONE"), NULL, + setting_menuscreen_password_click_softkey_back_cb, + setting_menuscreen_password_click_softkey_done_cb, + NULL, ad, scroller, ad->navi_bar); + retv_if(!ad->navi_it, SETTING_RETURN_FAIL); + Evas_Object *done_btn = elm_object_item_part_content_get(ad->navi_it, "title_right_btn"); + setting_disable_evas_object(done_btn); + setting_dim_evas_object(done_btn, TRUE); + + Elm_Object_Item *item = NULL;; + item =elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + //--------------------------------------------------------------------- + // draw password UG code + //--------------------------------------------------------------------- + ad->data_pwd= + setting_create_Gendial_field_entry(scroller, + & (itc_1icon), + NULL, ad, + SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + "IDS_COM_BODY_PASSWORD", + NULL, + setting_menuscreen_password_entry_change_cb, + ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, + TRUE, TRUE, + SETTING_PW_UG_NORMAL_PASSWORD_MAX_LENGTH, + 0, NULL, NULL); + elm_object_focus_set(ad->data_pwd->eo_check, EINA_TRUE); + ecore_idler_add(__focus_on_idler, ad); + + setting_view_menuscreen_password.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int setting_menuscreen_password_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) cb; + elm_naviframe_item_pop(ad->navi_bar); + + setting_view_menuscreen_password.is_create = 0; + return SETTING_RETURN_SUCCESS; +} + + +static int setting_menuscreen_password_update(void *cb) +{ + return SETTING_RETURN_SUCCESS; +} + +static int setting_menuscreen_password_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + return setting_menuscreen_password_destroy(cb); +} + +/* *************************************************** + * + *general func + * + ***************************************************/ +static void +setting_menuscreen_password_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, + "[Setting > Menuscreen] Data parameter is NULL"); + + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) data; + + /* Send destroy request */ + setting_view_change(&setting_view_menuscreen_password, &setting_view_menuscreen_main, ad); + SETTING_TRACE_END; + +} + +static void +setting_menuscreen_password_click_softkey_done_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "[Setting > Password] Data parameter is NULL"); + + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) data; + const char *entry_str = ad->data_pwd->sub_desc; + if (0 == safeStrCmp(entry_str, SETTING_PW_STR)) + { + // choose the value from radio button state. + vconf_set_str( VCONFKEY_SETAPPL_SELECTED_PACKAGE_NAME, ad->selected_theme); + ug_destroy_me(ad->ug); + } + else + { + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_COM_POP_INCORRECT_PASSWORD"),NULL, 2, FALSE, FALSE); + ad->data_pwd->sub_desc = NULL; + elm_entry_entry_set(obj, ad->data_pwd->sub_desc); + elm_entry_cursor_end_set(obj); + elm_object_focus_set(ad->data_pwd->eo_check, EINA_TRUE); + return; + } +} + +static void setting_menuscreen_password_entry_change_cb (void *data, Evas_Object *obj, void *event_info) +{ + retm_if(data == NULL, "[Setting > Password] Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) list_item->userdata; + const char *entry_str = elm_entry_entry_get(obj); + /* SETTING_TRACE("entry_str:%s", entry_str); */ + list_item->sub_desc = (char *)g_strdup(entry_str); + + /* Evas_Object *eo_entry = NULL; */ + bool isFoundEmptyEntry = FALSE; + + do { + if (ad->data_pwd) { + entry_str = ad->data_pwd->sub_desc; + if (NULL == entry_str || '\0' == entry_str[0]) { + isFoundEmptyEntry = TRUE; + break; + } + } + + } while (0); + + bool disableFlag = isFoundEmptyEntry; + + Evas_Object *done_btn = elm_object_item_part_content_get(ad->navi_it, "title_right_btn"); + if (disableFlag) { + if (!evas_object_pass_events_get(done_btn)) {//it had not yet been disabled + setting_disable_evas_object(done_btn); + setting_dim_evas_object(done_btn, TRUE); + }//else already disabled + } else { + setting_enable_evas_object(done_btn); + setting_undo_dim_evas_object(done_btn, TRUE); + } +} + diff --git a/setting-menuscreen/src/setting-menuscreen.c b/setting-menuscreen/src/setting-menuscreen.c new file mode 100755 index 0000000..e04dad6 --- /dev/null +++ b/setting-menuscreen/src/setting-menuscreen.c @@ -0,0 +1,281 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include + +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif + +setting_view *__get_menuscreen_view_to_load(service_h service) +{ + SETTING_TRACE_BEGIN; + //setting_retvm_if(NULL == data, NULL, "NULL == data"); + return &setting_view_menuscreen_main; +} + +Evas_Object *__get_menuscreen_layout_to_return(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + SettingMenuscreenUG *menuscreenUG = priv; + return menuscreenUG->ly_main; +} + +static void setting_menuscreen_ug_cb_resize(void *data, Evas *e, + Evas_Object *obj, void *event_info) +{ + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) data; + /* setting_view_update(&setting_view_about_main, ad); */ + setting_view_update(ad->view_to_load, ad); +} + +static void *setting_menuscreen_ug_on_create(ui_gadget_h ug, + enum ug_mode mode, service_h service, + void *priv) +{ + setting_retvm_if((!priv), NULL, "!priv"); + + SettingMenuscreenUG *menuscreenUG = priv; + menuscreenUG->ug = ug; + + setting_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR); + + menuscreenUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug); + menuscreenUG->win_get = (Evas_Object *) ug_get_window(); + + evas_object_show(menuscreenUG->win_main_layout); + menuscreenUG->evas = evas_object_evas_get(menuscreenUG->win_main_layout); + + setting_retvm_if(menuscreenUG->win_main_layout == NULL, NULL, "cannot get main window "); + + /* register view node table */ + setting_view_node_table_intialize(); + setting_view_node_table_register(&setting_view_menuscreen_main, NULL); + setting_view_node_table_register(&setting_view_menuscreen_password, &setting_view_menuscreen_main); + + //setting_create_Gendial_itc("dialogue/1text.1icon.2", &(menuscreenUG->itc_1text_1icon)); + setting_create_Gendial_itc("dialogue/1text.1icon.2", &(menuscreenUG->itc_1text_1icon_2)); + + menuscreenUG->itc_seperator.item_style = "dialogue/separator"; + menuscreenUG->itc_seperator.func.text_get = NULL; + menuscreenUG->itc_seperator.func.content_get = NULL; + menuscreenUG->itc_seperator.func.state_get = NULL; + menuscreenUG->itc_seperator.func.del = NULL; + + + setting_create_Gendial_itc("dialogue/1text", &(menuscreenUG->itc_1text)); + + /* creating a view. */ + menuscreenUG->view_to_load = __get_menuscreen_view_to_load(service); + setting_retvm_if(NULL == menuscreenUG->view_to_load, NULL, "NULL == menuscreenUG->view_to_load"); + setting_view_node_set_cur_view(menuscreenUG->view_to_load); + setting_view_create(menuscreenUG->view_to_load, (void *)menuscreenUG); + evas_object_event_callback_add(menuscreenUG->win_main_layout,EVAS_CALLBACK_RESIZE, setting_menuscreen_ug_cb_resize, menuscreenUG); + return __get_menuscreen_layout_to_return(service, menuscreenUG); +} + +static void setting_menuscreen_ug_on_start(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_menuscreen_ug_on_pause(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_menuscreen_ug_on_resume(ui_gadget_h ug, service_h service, + void *priv) +{ +} + + +static void _clear_menuscreen_list(Eina_List *menu_screen_list) +{ + SETTING_TRACE_BEGIN; + Eina_List *elist = NULL; + ug_menuscreen_info* pnode = NULL; + + EINA_LIST_FOREACH( menu_screen_list, elist, pnode ) { + menu_screen_list = eina_list_remove(menu_screen_list, pnode); + } + eina_list_free( menu_screen_list ); +} + +static void setting_menuscreen_ug_on_destroy(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if((!priv), "!priv"); + SettingMenuscreenUG *menuscreenUG = priv; + + evas_object_event_callback_del(menuscreenUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_menuscreen_ug_cb_resize); /* fix flash issue for gallery */ + menuscreenUG->ug = ug; + + if (!ug || !priv) + return; + + if(menuscreenUG->menuscreen_list) { + _clear_menuscreen_list( menuscreenUG->menuscreen_list); + menuscreenUG->menuscreen_list = NULL; + } + + /* called when this shared gadget is terminated. similar with app_exit */ + if (&setting_view_menuscreen_main == menuscreenUG->view_to_load) { + setting_view_destroy(&setting_view_menuscreen_main, menuscreenUG); + } + + if (NULL != ug_get_layout(menuscreenUG->ug)) { + evas_object_hide((Evas_Object *) ug_get_layout(menuscreenUG->ug)); + evas_object_del((Evas_Object *) ug_get_layout(menuscreenUG->ug)); + } + + SETTING_TRACE_END; +} + +static void setting_menuscreen_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; +} + +static void setting_menuscreen_ug_on_event(ui_gadget_h ug, + enum ug_event event, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + 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; + case UG_EVENT_REGION_CHANGE: + break; + default: + break; + } +} + +static void setting_menuscreen_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) priv; + + switch (event) { + case UG_KEY_EVENT_END: + { + if (elm_naviframe_top_item_get(ad->navi_bar) == + elm_naviframe_bottom_item_get(ad->navi_bar)) { + ug_destroy_me(ug); + } else { + /* elm_naviframe_item_pop(ad->navi_bar); */ + setting_view_cb_at_endKey(ad); + } + } + break; + default: + break; + } +} + +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + SettingMenuscreenUG *menuscreenUG = calloc(1, sizeof(SettingMenuscreenUG)); + setting_retvm_if(!menuscreenUG, -1, "Create SettingMenuscreenUG obj failed"); + + ops->create = setting_menuscreen_ug_on_create; + ops->start = setting_menuscreen_ug_on_start; + ops->pause = setting_menuscreen_ug_on_pause; + ops->resume = setting_menuscreen_ug_on_resume; + ops->destroy = setting_menuscreen_ug_on_destroy; + ops->message = setting_menuscreen_ug_on_message; + ops->event = setting_menuscreen_ug_on_event; + ops->key_event = setting_menuscreen_ug_on_key_event; + ops->priv = menuscreenUG; + ops->opt = UG_OPT_INDICATOR_ENABLE; + + return 0; +} + +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + struct SettingMenuscreenUG *menuscreenUG; + setting_retm_if(!ops, "ops == NULL"); + + menuscreenUG = ops->priv; + if (menuscreenUG) { + FREE(menuscreenUG); + } +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +void setting_menuscreen_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode, + void *priv) +{ + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) priv; + Evas_Object *base; + + if (!priv) + return; + SETTING_TRACE_BEGIN; + + base = (Evas_Object *) ug_get_layout(ug); + if (!base) + return; + + switch (mode) { + case UG_MODE_FULLVIEW: + evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + //elm_win_resize_object_add(ad->win_get, base); + evas_object_show(base); + break; + default: + break; + } + + SETTING_TRACE_END; +} + + +/*****/ +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + return 0; +} + +/*****/ diff --git a/setting-network/CMakeLists.txt b/setting-network/CMakeLists.txt new file mode 100755 index 0000000..e614715 --- /dev/null +++ b/setting-network/CMakeLists.txt @@ -0,0 +1,45 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_network REQUIRED elementary evas ecore ecore-imf eina edje appcore-common appcore-efl + ui-gadget-1 capi-appfw-application capi-network-connection tapi dlog) + +FOREACH(flag ${pkgs_network_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") +ADD_DEFINITIONS("-fpie") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") + +ADD_LIBRARY(${SETTING_NETWORK_UG} SHARED + ./src/setting-network.c + ./src/setting-network-main.c + ./src/setting-network-select-network.c + ./src/setting-network-con.c + ./src/setting-network-connection-create.c + ./src/setting-network-3gcon-option.c + ./src/setting-network-main-help.c + ./src/setting-network-preferred-network.c + ./src/setting-network-preferred-network-new.c + ./src/setting-network-preferred-network-list.c + ./src/setting-network-preferred-network-edit.c + ./src/setting-network-preferred-network-delete.c + ) + +TARGET_LINK_LIBRARIES(${SETTING_NETWORK_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_NETWORK_UG} ${pkgs_network_LDFLAGS}) + +INSTALL(TARGETS ${SETTING_NETWORK_UG} DESTINATION /usr/ug/lib) diff --git a/setting-network/include/setting-network-3gcon-option.h b/setting-network/include/setting-network-3gcon-option.h new file mode 100755 index 0000000..4cfd034 --- /dev/null +++ b/setting-network/include/setting-network-3gcon-option.h @@ -0,0 +1,28 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_NETWORK_CONNECTION_CREATE_H__ +#define __SETTING_NETWORK_CONNECTION_CREATE_H__ + +#include + +enum { + SETTING_NETWORK_3GCON_NOT_USE, + SETTING_NETWORK_3GCON_ASK_ON_CON, + SETTING_NETWORK_3GCON_USE_WO_ASK +}; + +#endif /* __SETTING_NETWORK_CONNECTION_CREATE_H__ */ diff --git a/setting-network/include/setting-network-con.h b/setting-network/include/setting-network-con.h new file mode 100755 index 0000000..5e57209 --- /dev/null +++ b/setting-network/include/setting-network-con.h @@ -0,0 +1,27 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_NETWORK_CON_CREATE_H__ +#define __SETTING_NETWORK_CON_CREATE_H__ + +#include +static void setting_network_con_click_softkey_create_cb(void *data, Evas_Object *obj, void *event_info); +static void setting_network_con_click_softkey_reset_cb(void *data, Evas_Object *obj, void *event_info); + +static void setting_network_con_click_softkey_cancel_cb(void *data, Evas_Object *obj, void *event_info); +static void setting_network_con_item_Gendial_mouse_up_cb(void *data, Evas_Object *obj, void *event_info); + +#endif /* __SETTING_NETWORK_CON_CREATE_H__ */ diff --git a/setting-network/include/setting-network-connection-create.h b/setting-network/include/setting-network-connection-create.h new file mode 100755 index 0000000..fc5a561 --- /dev/null +++ b/setting-network/include/setting-network-connection-create.h @@ -0,0 +1,44 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_NETWORK_CONNECTION_CREATE_H__ +#define __SETTING_NETWORK_CONNECTION_CREATE_H__ + +#include +static void setting_network_connection_check_entry_empty(SettingNetworkUG *ad); +static void setting_network_edit_connection_display_auth_type(SettingNetworkUG * + ad, + int auth_type); + +static void setting_network_connection_entry_changed_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_network_edit_connection_click_softkey_save_cb(void *data, + Evas_Object * + obj, void + *event_info); +static void setting_network_edit_connection_click_softkey_cancel_cb(void *data, + Evas_Object + *obj, void + *event_info); +static void setting_network_edit_connection_click_softkey_back_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_network_edit_connection_click_softkey_eidt_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_network_connection_hide_input_pannel(void *data); +#endif /* __SETTING_NETWORK_CONNECTION_CREATE_H__ */ diff --git a/setting-network/include/setting-network-main-help.h b/setting-network/include/setting-network-main-help.h new file mode 100755 index 0000000..7925009 --- /dev/null +++ b/setting-network/include/setting-network-main-help.h @@ -0,0 +1,26 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_NETWORK_MAIN_HELP_H__ +#define __SETTING_NETWORK_MAIN_HELP_H__ + +#include + +static void setting_network_main_help_click_back_cb(void *data, + Evas_Object *obj, + void *event_info); + +#endif /* __SETTING_NETWORK_MAIN_HELP_H__ */ diff --git a/setting-network/include/setting-network-main.h b/setting-network/include/setting-network-main.h new file mode 100755 index 0000000..84972df --- /dev/null +++ b/setting-network/include/setting-network-main.h @@ -0,0 +1,24 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_NETWORK_MAIN_H__ +#define __SETTING_NETWORK_MAIN_H__ + +#include + +void setting_network_get_preferred_network_list(void); + +#endif /* __SETTING_NETWORK_MAIN_H__ */ diff --git a/setting-network/include/setting-network-preferred-network-delete.h b/setting-network/include/setting-network-preferred-network-delete.h new file mode 100755 index 0000000..5f9ebf3 --- /dev/null +++ b/setting-network/include/setting-network-preferred-network-delete.h @@ -0,0 +1,31 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_NETWORK_PREFERRED_NETWORK_DELETE_H__ +#define __SETTING_NETWORK_PREFERRED_NETWORK_DELETE_H__ + +#include +#include + +void setting_network_preferred_network_delete_refresh_view(SettingNetworkUG * + ad); +void setting_network_preferred_network_delete_draw_network_list(SettingNetworkUG + *ad); + +void setting_network_preferred_network_delete_ok(void *data); +void setting_network_preferred_network_delete_failed(void *data); + +#endif /* __SETTING_NETWORK_PREFERRED_NETWORK_DELETE_H__ */ diff --git a/setting-network/include/setting-network-preferred-network-edit.h b/setting-network/include/setting-network-preferred-network-edit.h new file mode 100755 index 0000000..275d689 --- /dev/null +++ b/setting-network/include/setting-network-preferred-network-edit.h @@ -0,0 +1,43 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_NETWORK_PREFERRED_NETWORK_EDIT_H__ +#define __SETTING_NETWORK_PREFERRED_NETWORK_EDIT_H__ + +#include +#include + +#define SETTING_NETWORK_PREFERRED_NETWORK_CODE_LEN 4 + +static void setting_network_preffered_network_edit_entry_changed_cb(void *data, + Evas_Object + *obj, void + *event_info); +static void setting_network_preferred_network_edit_click_softkey_cancel_cb(void + *data, + Evas_Object + * + obj, + void + *event_info); +static void setting_network_preffered_network_edit_click_softkey_save_cb(void + *data, + Evas_Object + *obj, + void + *event_info); + +#endif /* __SETTING_NETWORK_PREFERRED_NETWORK_EDIT_H__ */ diff --git a/setting-network/include/setting-network-preferred-network-list.h b/setting-network/include/setting-network-preferred-network-list.h new file mode 100755 index 0000000..c118549 --- /dev/null +++ b/setting-network/include/setting-network-preferred-network-list.h @@ -0,0 +1,4942 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 _SETTINGS_NETWORK_PREFERRED_NETWORK_LIST_H_ +#define _SETTINGS_NETWORK_PREFERRED_NETWORK_LIST_H_ + +#include +#include + +typedef enum { + + SETTING_PREFERRED_NETWORK_TYPE_UNKNOWN, /**< Network type unknown */ + + SETTING_PREFERRED_NETWORK_TYPE_GSM_900, /**< Network type Gsm 900 */ + + SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, /**< Network type DCS 1800 */ + + SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, /**< Network type Pcs 1900 */ + + SETTING_PREFERRED_NETWORK_TYPE_GSM_SAT, /**< Network type Gsm SAT */ + + SETTING_PREFERRED_NETWORK_TYPE_GSM_850, /**< Network type Gsm 850*/ + + SETTING_PREFERRED_NETWORK_TYPE_UMTS, /**< Network type UMTS */ + SETTING_PREFERRED_NETWORK_TYPE_MAX +} setting_network_preferred_network_list; + +typedef struct { + int mcc; + int mnc; + setting_network_preferred_network_list nw_type; + char *short_name_ptr; + char *country_code; + +} settings_preferred_network_table; + +/** @todo does static preffered network table need to update? */ +static const settings_preferred_network_table network_table[] = { + +/**************** + **** Greece **** + ****************/ + +/* COSMOTE */ + {202, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "GR COSMOTE", + "COSMOTE"}, + +/* COSMOTE */ + {202, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "GR COSMOTE", + "COSMOTE"}, + +/* Vodafone */ + {202, 5, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "vodafone GR", + "Vodafone"}, + +/* Info Quest - Commercial & Industrial SA */ + {202, 9, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "GR Q-TELECOM", + "Info Quest - Commercial & Industrial SA"}, + +/* STET HELLAS */ + {202, 10, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "GR TELESTET", + "STET HELLAS"}, + +/********************* + **** Netherlands **** + *********************/ + +/* Vodafone Libertel N.V */ + {204, 4, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "vodafone NL", + "Vodafone Libertel N.V"}, + +/* Vodafone Libertel N.V */ + {204, 4, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "vodafone NL", + "Vodafone Libertel N.V"}, + +/* KPN Mobile The Netherlands BV */ + {204, 8, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "NL KPN", + "KPN Mobile The Netherlands BV"}, + +/* KPN Mobile The Netherlands BV */ + {204, 8, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "NL KPN", + "KPN Mobile The Netherlands BV"}, + +/* Telfort Mobiel B.V. */ + {204, 12, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "NL Telfort", + "Telfort B.V."}, + +/* T-Mobile Netherlands */ + {204, 16, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "T-Mobile NL", + "T-Mobile Netherlands"}, + +/* T-Mobile Netherlands */ + {204, 16, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "T-Mobile NL", + "T-Mobile NL"}, + +/* Orange Nederland N.V. */ + {204, 20, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Orange NL", + "Orange Nederland N.V."}, + +/***************** + **** Belgium **** + *****************/ + +/* Belgacom Mobile */ + {206, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BEL PROXIMUS", + "Belgacom Mobile"}, + +/* Belgacom Mobile */ + {206, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "BEL PROXIMUS", + "Belgacom Mobile"}, + +/* Mobistar S.A. */ + {206, 10, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "B mobistar", + "Mobistar S.A."}, + +/* Mobistar S.A. */ + {206, 10, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "B mobistar", + "Mobistar"}, + +/* Mobistar S.A. */ + {206, 10, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "B mobistar", + "Mobistar"}, + +/* KPN Orange Belgium NV/SA */ + {206, 20, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "BASE", + "KPN Orange Belgium NV/SA"}, + +/**************** + **** France **** + ****************/ + +/* Orange France */ + {208, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Orange F", + "Orange France"}, + +/* Orange France */ + {208, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Orange F", + "Orange France"}, + +/* SFR */ + {208, 10, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "F SFR", + "SFR - CEGETEL"}, + +/* SFR */ + {208, 10, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "F SFR", "SFR"}, + +/* Bouygues Telecom */ + {208, 20, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BOUYGTEL", + "Bouygues Telecom"}, + +/* Bouygues Telecom */ + {208, 20, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "BOUYGTEL", + "Bouygues Telecom"}, + +/***************** + **** Andorra **** + *****************/ + +/* Mobiland */ + {213, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "STA-MOBILAND", + "Servei De Tele. DAndorra"}, + +/*************** + **** Spain **** + ***************/ + +/* Airtel Movil S.A */ + {214, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "vodafone ES", + "ES vodafone"}, + +/* Airtel Movil S.A */ + {214, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "vodafone ES", + "ES vodafone"}, + +/* Telefonica Moviles */ + {214, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MOVISTAR", + "Telefonica Moviles"}, + +/* Telefonica Moviles */ + {214, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "MOVISTAR", + "Telefonica Moviles"}, + +/* Retevision Movil S.A */ + {214, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "E AMENA", + "Retevision Movil S.A"}, + +/* Retevision Movil S.A */ + {214, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "E AMENA", + "Retevision Movil S.A"}, + +/* Xfera Moviles SA */ + {214, 4, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "Xfera", + "Xfera Moviles SA"}, + +/* Telefonica Moviles */ + {214, 7, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MOVISTAR", + "Telefonica Moviles"}, + +/* Telefonica Moviles */ + {214, 7, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "MOVISTAR", + "Telefonica Moviles"}, + +/* Telefonica Moviles */ + {214, 77, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "MOVISTAR", "Telefonica Moviles"}, /* added for 214 77 display problem for Movistar */ + +/***************** + **** Hungary **** + *****************/ + +/* Pannon GSM Telecoms Plc */ + {216, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "H PANNON GSM", + "Pannon GSM Telecoms Plc"}, + +/* Pannon GSM Telecoms Plc */ + {216, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "H PANNON GSM", + "Pannon GSM Telecoms Plc"}, + +/* T-Mobile Hungary Telecommunications Co. Ltd */ + {216, 30, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "T-Mobile H", + "T-Mobile Hungary Telecommunications Co. Ltd"}, + +/* T-Mobile Hungary Telecommunications Co. Ltd */ + {216, 30, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "T-Mobile H", + "T-Mobile Hungary Telecommunications Co. Ltd"}, + +/* Vodafone Hungary Ltd */ + {216, 70, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "vodafone HU", + "Vodafone Hungary Ltd"}, + +/* Vodafone Hungary Ltd */ + {216, 70, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "vodafone HU", + "Vodafone Hungary Ltd"}, + +/**************** + **** Bosnia **** + ****************/ + +/* Eronet Mobile Communications Ltd */ + {218, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BA-ERONET", + "Eronet Mobile Communications Ltd"}, + +/* RS Telecommunications JSC Banja Luka */ + {218, 5, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MOBI'S", + "RS Telecommunications JSC Banja Luka"}, + +/* Public Enterprise BH Telecom Sarajevo */ + {218, 90, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BH GSMBIH", + "Public Enterprise BH Telecom Sarajevo"}, + +/***************** + **** Croatia **** + *****************/ + +/* HT Mobile Communications, LLC */ + {219, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "T-Mobile HR", + "HT Mobile Communications, LLC"}, + +/* Tele2 d.o.o za telekomunikacijske uluge */ + {219, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "TELE2", "Tele2"}, + +/* Vip-NET GSM d.o.o. */ + {219, 10, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "HR VIP", + "VIPnet d.o.o."}, + +/******************** + **** Yugoslavia **** + ********************/ + +/* Mobile Telecommunications */ + {220, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "YU MOBTEL", + "Mobile Telecommunications"}, + +/* Mobile Telecommunications */ + {220, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "YU MOBTEL", + "Mobile Telecommunications"}, + +/* ProMonte GSM */ + {220, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "ProMonte", + "ProMonte GSM"}, + +/* ProMonte GSM */ + {220, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "ProMonte", + "ProMonte GSM"}, + +/* Telekom Srbija a.d. */ + {220, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "YUG 03", + "Telekom Srbija"}, + +/* Monet D.O.O */ + {220, 4, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MONET", + "Monet Ltd, Podgorica"}, + +/*************** + **** Italy **** + ***************/ + +/* Telecom Italia Mobile */ + {222, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, " I TIM", + "Telecom Italia Mobile"}, + +/* Telecom Italia Mobile */ + {222, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "I TIM", + "Telecom Italia Mobile"}, + +/* Omnitel Pronto Italia is Vodafone IT now */ + {222, 10, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "vodafone IT", + "Omnitel Pronto Italia"}, + +/* Omnitel Pronto Italia is Vodafone IT now*/ + {222, 10, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "vodafone IT", + "Omnitel Pronto Italia"}, + +/* Wind Telecomunicazioni SpA */ + {222, 88, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "I WIND", + "Wind Telecomunicazioni SpA"}, + +/* Wind Telecomunicazioni SpA*/ + {222, 88, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "I WIND", + "Wind Telecomunicazioni SpA"}, + +/* Wind Telecomunicazioni SpA*/ + {222, 88, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "I WIND", + "Wind Telecomunicazioni SpA"}, + +/* Blu SpA */ + {222, 98, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "IT Blu", "Blu SpA"}, + +/* Hutchison 3 */ + {222, 99, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "3 ITA", "H3G"}, + +/***************** + **** Romania **** + *****************/ + +/* MobiFon S.A */ + {226, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "RO CONNEX", + "MobiFon S.A"}, + +/* Cosmorom */ + {226, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "RO Cosmorom", + "Cosmorom"}, + +/* Cosmorom */ + {226, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "RO Cosmorom", + "Cosmorom"}, + +/* Orange Romania SA */ + {226, 10, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "RO ORANGE", + "Orange Romania SA"}, + +/* Orange Romania SA */ + {226, 10, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "RO ORANGE", + "Orange Romania SA"}, + +/********************* + **** Switzerland **** + *********************/ + +/* Swisscom Mobile Ltd */ + {228, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SWISSCOM", + "Swisscom Mobile Ltd"}, + +/* Swisscom Mobile Ltd */ + {228, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "SWISSCOM", + "Swisscom Mobile Ltd"}, + +/* TDC Switzerland AG */ + {228, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "sunrise", + "TDC Switzerland AG"}, + +/* TDC Switzerland AG */ + {228, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "sunrise", + "TDC Switzerland AG"}, + +/* Orange Communications S.A */ + {228, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "orange CH", + "Orange Communications S.A"}, + +/* In &Phone SA */ + {228, 7, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "In&Phone", + "in&phone"}, + +/* Tele2 Telecommunications Services AG */ + {228, 8, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "T2", + "Tele2 Switzerland"}, + +/************************ + **** Czech Republic **** + ************************/ + +/* T- Mobile Networks */ + {230, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "T-Mobile CZ", + "T-Mobile Czech Republic a.s."}, + +/* T- Mobile Networks */ + {230, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "T-Mobile CZ", + "T-Mobile Czech Republic a.s."}, + +/* EuroTel Praha Spol. sro */ + {230, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "EUROTEL - CZ", + "Eurotel Praha, spol. s.r.o."}, + +/* EuroTel Praha Spol. sro */ + {230, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "EUROTEL - CZ", + "Eurotel Praha, spol. s.r.o."}, + +/* Cesky Mobil a.s */ + {230, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "OSKAR", + "Cesky Mobil a.s"}, + +/* Cesky Mobil a.s */ + {230, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "OSKAR", + "Cesky Mobil a.s"}, + +/************************* + **** Slovak Republic **** + *************************/ + +/* Orange Slovensko a.s. */ + {231, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Orange SK", + "Orange Slovensko a.s."}, + +/* EuroTel Bratislava a.s */ + {231, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "T-Mobile SK", + "EuroTel Bratislava a.s"}, + +/* EuroTel Bratislava a.s */ + {231, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "T-Mobile SK", + "EuroTel Bratislava a.s"}, + +/* "T-Mobile Slovensko, a.s." */ + {231, 2, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "T-Mobile SK", + "T-Mobile SK"}, + +/***************** + **** Austria **** + *****************/ + +/* MobilKom Austria AG */ + {232, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "A1", + "MobilKom Austria AG"}, + +/* MobilKom Austria AG */ + {232, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "A1", + "MobilKom Austria AG"}, + +/* MobilKom Austria AG */ + {232, 1, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "A1", + "MobilKom Austria AG"}, + +/* T-Mobile Austria GmbH */ + {232, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "T-Mobile A", + "T-Mobile Austria GmbH"}, + +/* T-Mobile Austria GmbH */ + {232, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "T-Mobile A", + "T-Mobile Austria GmbH"}, + +/* Connect Austria */ + {232, 5, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "one", + "Connect Austria"}, + +/* ONE GMBH */ + {232, 5, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "one", "ONE GMBH"}, + +/* Tele.ring Telekom Service GmbH & Co KG */ + {232, 7, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "A tele.ring", + "Tele.ring Telekom Service GmbH & Co KG"}, + +/* Hutchison 3G Austria GmbH */ + {232, 10, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "3 AT", + "Hutchison 3G Austria GmbH"}, + +/************************ + **** United Kingdom **** + ************************/ + +/* BTCellnet */ + {234, 10, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "O2 - UK", + "BTCellnet"}, + +/* BTCellnet */ + {234, 10, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "O2 - UK", + "BTCellnet"}, + +/* O2 (UK) Limited */ + {234, 10, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "O2 - UK ", + "O2 (UK) Limited"}, + +/* Vodafone Ltd */ + {234, 15, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "vodafone UK", "Vodafone Ltd"}, /* changed to vodafone UK */ + +/* Vodafone Ltd */ + {234, 15, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "vodafone UK", + "Vodafone Ltd"}, + +/* Hutchinson UK */ + {234, 20, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "3 UK", + "Hutchison 3G UK Ltd"}, + +/* T-Mobile (UK) Limited */ + {234, 30, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "T-Mobile UK", + "T-Mobile (UK) Limited"}, + +/* T-Mobile (UK) Limited */ + {234, 31, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "T-Mobile UK", + "T-Mobile (UK) Limited"}, + +/* T-Mobile (UK) Limited */ + {234, 32, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "T-Mobile UK", + "T-Mobile (UK) Limited"}, + +/* Orange PCS Ltd */ + {234, 33, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Orange", + "Orange PCS Ltd"}, + +/* Jersey Telecoms */ + {234, 50, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "JT GSM", + "Jersey Telecoms"}, + +/* Wave Telecom */ + {234, 50, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "JT GSM", "JT-Wave"}, + +/* Wave Telecom */ + {234, 50, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "JT-Wave", "JT-Wave"}, + +/* Cable & Wireless Guernsey Ltd */ + {234, 55, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, + "Cable & Wireless Guernsey", "Cable & Wireless Guernsey Ltd"}, + +/* Manx Telecom */ + {234, 58, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Manx Pronto", + "Manx Telecom"}, + +/***************** + **** Denmark **** + *****************/ + +/* TDC Mobil A/S */ + {238, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "TDC MOBIL", + "TDC Mobil A/S"}, + +/* TDC Mobil A/S */ + {238, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "TDC MOBIL", + "TDC Mobil A/S"}, + +/* Sonofon */ + {238, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "DK SONOFON", + "Sonofon"}, + +/* Sonofon */ + {238, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "DK SONOFON", + "Sonofon"}, + +/* HiTAPI_NETW_TYPE_UMTS Denmark ApS */ + {238, 6, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "3 DK ", "3 DK"}, + +/* Telia A/S Denmark */ + {238, 20, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "TELIA DK", + "Telia A/S Denmark"}, + +/* Orange A/S */ + {238, 30, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Orange", + "Orange A/S"}, + +/* Orange A/S */ + {238, 30, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Orange", + "Orange A/S"}, + +/**************** + **** Sweden **** + ****************/ + +/* Telia AB */ + {240, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "S Telia", "Telia AB"}, + +/* Telia AB */ + {240, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "S Telia", + "Telia AB"}, + +/* Hi3G Access AB */ + {240, 2, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "3 SE", "HI3G Access AB"}, + +/* Orange Sverige AB */ + {240, 3, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "Orange", + "Orange Sverige AB"}, + +/* HI3G Access AB */ + {240, 4, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "vodafone SE", + "HI3G Access AB"}, + +/* COMVIQ GSM shared with TeliaSonera MobileNetworks */ + {240, 5, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "Sweden 3G", + "COMVIQ GSM"}, + +/* Tele 2 AB */ + {240, 7, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "S COMVIQ", + "Tele 2 AB"}, + +/* Tele 2 AB */ + {240, 7, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "S COMVIQ", + "Tele 2 AB"}, + +/* Europolitan AB */ + {240, 8, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "vodafone SE", + "Europolitan AB"}, + +/* Europolitan AB */ + {240, 8, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "vodafone SE", + "Europolitan AB"}, + +/* Vodafone Sverige AB */ + {240, 8, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "vodafone SE", + "Vodafone "}, + +/* Swefour AB */ + {240, 10, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SpringMobil SE", + "Swefour AB"}, + +/* Swefour AB */ + {240, 10, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "SpringMobil SE", + "Swefour AB"}, + +/**************** + **** Norway **** + ****************/ + +/* Telenor Mobil AS */ + {242, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "N Telenor", + "Telenor Mobil AS"}, + +/* Telenor Mobil AS */ + {242, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "N Telenor", + "Telenor Mobil AS"}, + +/* NETCOM AS */ + {242, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "N NetCom GSM", + "NETCOM AS"}, + +/* NETCOM AS */ + {242, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "N NetCom GSM", + "NETCOM AS"}, + +/* Teletopia Mobile Communications AS */ + {242, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "T3", "Teletopia"}, + +/***************** + **** Finland **** + *****************/ + +/* Telia Mobile AB */ + {244, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "FI TELIA", + "Telia Mobile AB Branch in Finland"}, + +/* Elisa Corporation */ + {244, 5, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "elisa", + "Elisa Corporation"}, + +/* Elisa Corporation */ + {244, 5, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "elisa", + "Elisa Corporation"}, + +/* Elisa Corporation */ + {244, 5, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "elisa", + "Elisa Corporation"}, + +/* Finnet Group */ + {244, 9, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Finnet", + "Finnet Group"}, + +/* Finnet Networks Ltd */ + {244, 12, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "FI 2G", + "Finnet Networks Ltd"}, + +/* Finnet Networks Ltd */ + {244, 12, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "FI 2G", + "Finnet Networks Ltd"}, + +/* Finnet Networks Ltd */ + {244, 12, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "FI 2G", + "Finnet Networks Ltd"}, + +/* Alands Mobiltelefon A.B */ + {244, 14, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "FI AMT", + "Alands Mobiltelefon Ab"}, + +/* Sonera Mobile Networks Limited */ + {244, 91, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "FI SONERA", + "Sonera Mobile Networks Limited"}, + +/* Sonera Mobile Networks Limited */ + {244, 91, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "FI SONERA", + "Sonera Mobile Networks Limited"}, + +/* Sonera Mobile Networks Limited */ + {244, 91, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "FI SONERA", + "Sonera Mobile Networks Limited"}, + +/******************* + **** Lithuania **** + *******************/ + +/* Omnitel */ + {246, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "OMNITEL LT", + "OMNITEL"}, + +/* UAB Bite GSM */ + {246, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "LT BITE GSM", + "UAB Bite GSM"}, + +/* UAB Bite GSM */ + {246, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "LT BITE GSM", + "UAB Bite GSM"}, + +/* UAB TELE2 */ + {246, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "TELE2", "UAB TELE2"}, + +/* UAB TELE2 */ + {246, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "TELE2", "UAB TELE2"}, + +/**************** + **** Latvia **** + ****************/ + +/* Latvian Mobile Tel. Co. */ + {247, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "LMT GSM", + "Latvian Mobile Tel. Co."}, + +/* Latvian Mobile Tel. Co. */ + {247, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "LMT GSM", + "Latvian Mobile Tel. Co."}, + +/* TELE2 */ + {247, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "LV TELE2", "TELE2"}, + +/* TELE2 */ + {247, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "LV TELE2", "TELE2"}, + +/* LV BITE */ + {247, 5, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "LV BITE", "LV BITE"}, + +/* SIA Bite Latvija */ + {247, 5, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "LV BITE", + "Bite Latvija"}, + +/* SIA Bite Latvija */ + {247, 5, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "LV BITE", + "Bite Latvija"}, + +/***************** + **** Estonia **** + *****************/ + +/* AS EMT */ + {248, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "EE EMT GSM", + "AS EMT"}, + +/* AS EMT */ + {248, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "EE EMT GSM", + "AS EMT"}, + +/* AS EMT */ + {248, 1, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "EMT", "EMT"}, + +/* Radiolinja Eesti AS */ + {248, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "EE RLE GSM", + "Radiolinja Eesti AS"}, + +/* Radiolinja Eesti AS */ + {248, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "EE RLE GSM", + "Radiolinja Eesti AS"}, + +/* Elisa Mobiilsideteenused AS */ + {248, 2, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "elisa", + "Elisa Mobiilsideteenused AS"}, + +/* Tele2 Eesti AS */ + {248, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "TELE2", + "Tele2 Eesti AS"}, + +/* Tele2 Eesti AS */ + {248, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "TELE2", + "Tele2 Eesti AS"}, + +/**************** + **** Russia **** + ****************/ + +/* Mobile Telesystems */ + {250, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MTS-RUS", + "Mobile Telesystems"}, + +/* Mobile TeleSystems (MTS) */ + {250, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "MTS-RUS", "MTS"}, + +/* North-West GSM */ + {250, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MegaFon RUS", + "MegaFon, Open Joint Stock Company"}, + +/* North-West GSM */ + {250, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "MegaFon RUS", + "MegaFon, Open Joint Stock Company"}, + +/* OJSC Mobile Communication Systems-Povolzhie */ + {250, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MegaFon RUS", + "OJSC Mobile Communication Systems-Povolzhie"}, + +/* Nizhegorodskaya Cellular Communications */ + {250, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "RUS NCC", + "Nizhegorodskaya Cellular Communications"}, + +/* SIBCHALLENGE LTD */ + {250, 4, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SIBCHALLENGE RUS", + "SIBCHALLENGE LTD"}, + +/* Mobile Communications Systems */ + {250, 5, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "RUS SCS", + "Mobile Communications Systems"}, + +/* Sayantelecom LLC */ + {250, 5, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "RUS SCS", + "Sayantelecom LLC"}, + +/* Siberian Cellular Systems-900 */ + {250, 5, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SCS RUS", + "Siberian Cellular Systems-900"}, + +/* Yeniseitelecom */ + {250, 5, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SCS RUS", + "Yeniseitelecom"}, + +/* Tomsk Cellular Communication Ltd */ + {250, 5, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SCS", + "Tomsk Cellular Communication Ltd"}, + +/* BM Telecom Limited */ + {250, 7, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "RUS BMT", + "BM Telecom Limited"}, + +/* Zao Smarts */ + {250, 7, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "RUS SMARTS", + "ZAO SMARTS"}, + +/* Zao Smarts */ + {250, 7, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "RUS SMARTS", + "ZAO SMARTS"}, + +/* DonTeleCom */ + {250, 10, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "RUS DTC", + "DonTeleCom"}, + +/* Joint-stock company - Orensot */ + {250, 11, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "ORENSOT", + "Joint-stock company - Orensot"}, + +/* Baykalwestcom */ + {250, 12, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "RUS FEast", + "Baykalwestcom"}, + +/* Far Eastern Cellular Systems - 900 */ + {250, 12, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "RUS Far East", + "Far Eastern Cellular Systems - 900"}, + +/* JSC Sakhalin Telecom Mobile */ + {250, 12, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "RUS-Sakhalin", + "JSC Sakhalin Telecom Mobile"}, + +/* Sibintertelecom */ + {250, 12, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SIBI-RUS", + "Sibintertelecom"}, + +/* Kuban- GSM Closed JSC */ + {250, 13, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "RUS Kuban-GSM", + "Kuban- GSM Closed JSC"}, + +/* ZAO SMARTS */ + {250, 15, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "SMARTS", + "SMARTS-Ufa"}, + +/* New Telephone Company */ + {250, 16, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "RUS 16", + "New Telephone Company"}, + +/* Ermak RMS */ + {250, 17, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "RUS 17", + "Ermak RMS"}, + +/* Bashcell, CJSC */ + {250, 19, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "RUS_BASHCELL", + "Bashcell, CJSC "}, + +/* CJSC Volgograd Mobile */ + {250, 19, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "RUS INDIGO", + "CJSC Volgograd Mobile"}, + +/* Cellular Communications of Udmurtia */ + {250, 20, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "TELE2", + "Cellular Communications of Udmurtia"}, + +/* JSC Extel */ + {250, 28, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "EXTEL RUS", + "JSC Extel"}, + +/* JSC Uralsvyazinform */ + {250, 39, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Uraltel", + "JSC Uralsvyazinform"}, + +/* South Ural Cellular Telephone */ + {250, 39, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "RUS 39", + "South Ural Cellular Telephone"}, + +/* Uraltel Ltd */ + {250, 39, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Uraltel", + "Uraltel Ltd"}, + +/* StavTeleSot */ + {250, 44, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, + "RUS North Caucasian GSM", "StavTeleSot"}, + +/* Primtelefon */ + {250, 92, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Primetelefone RUS", + "Primtelefon"}, + +/* Primtelefon */ + {250, 92, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Primetelefone RUS", + "Primtelefon"}, + +/* Telecom XXI JSC */ + {250, 93, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "RUS 93", + "Telecom XXI JSC"}, + +/* Telecom XXI JSC */ + {250, 93, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "RUS 93", + "Telecom XXI JSC"}, + +/* KB Impuls */ + {250, 99, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BeeLine", + "KB Impuls"}, + +/* KB Impuls */ + {250, 99, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "BeeLine", + "KB Impuls"}, + +/***************** + **** Ukraine **** + *****************/ + +/* Ukrainian Mobile Comms */ + {255, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "UA UMC", + "Ukrainian Mobile Communications"}, + +/* Ukrainian Mobile Comms */ + {255, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "UA UMC", + "Ukrainian Mobile Communications"}, + +/* Ukrainian Radio Systems */ + {255, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "WellCOM", + "Ukrainian Radio Systems"}, + +/* Ukrainian Radio Systems */ + {255, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "WellCOM", + "Ukrainian Radio Systems"}, + +/* Kyivstar GSM JSC */ + {255, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "UA-KYIVSTAR", + "Kyivstar GSM JSC"}, + +/* Kyivstar GSM JSC */ + {255, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "UA-KYIVSTAR", + "Kyivstar GSM JSC"}, + +/* Golden Telecom LLC */ + {255, 5, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "UA-GT", + "Golden Telecom LLC"}, + +/* Astelit LLC */ + {255, 6, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "life:)", "life:)"}, + +/***************** + **** Belarus **** + *****************/ + +/* Mobile Digital Communications */ + {257, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BY VELCOM", + "Mobile Digital Communications"}, + +/* Mobile Digital Communications */ + {257, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "BY VELCOM", + "Mobile Digital Communications"}, + +/* JLLC Mobile TeleSystems */ + {257, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MTS BY", + "JLLC Mobile TeleSystems"}, + +/* JLLC Mobile TeleSystems */ + {257, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "MTS BY", + "JLLC Mobile TeleSystems"}, + +/* Belarusskaya Set Telekommunkatsiy (BeST) */ + {257, 25, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BeST", "BeST"}, + +/* Belarusskaya Set Telekommunkatsiy (BeST) */ + {257, 25, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "BeST", "BeST"}, + +/***************** + **** Moldova **** + *****************/ + +/* Voxtel S.A */ + {259, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MD VOXTEL", + "VoXtel S.A"}, + +/* Moldcell SA */ + {259, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MD MOLDCELL", + "Moldcell SA"}, + +/**************** + **** Poland **** + ****************/ + +/* Polkomtel S.A */ + {260, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Plus GSM", + "Polkomtel S.A"}, + +/* Polkomtel S.A */ + {260, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Plus GSM", + "Polkomtel S.A"}, + +/* Polkomtel S.A */ + {260, 1, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "Plus GSM", + "Polkomtel S.A"}, + +/* Polska Telefonia Cyfrowa */ + {260, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Era", + "Polska Telefonia Cyfrowa"}, + +/* Polska Telefonia Cyfrowa */ + {260, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Era", + "Polska Telefonia Cyfrowa"}, + +/* PTK Centertel */ + {260, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Orange PL", + "PTK Centertel"}, + +/* PTK Centertel */ + {260, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Orange PL", + "PTK Centertel"}, + +/* PTK Centertel */ + {260, 3, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "Orange PL", + "PTK Centertel"}, + +/***************** + **** Germany **** + *****************/ + +/* T-Mobile Deutschland GmbH */ + {262, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "T-Mobile D", + "T-Mobile Deutschland GmbH"}, + +/* T-Mobile Deutschland GmbH */ + {262, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "T-Mobile D", + "T-Mobile Deutschland GmbH"}, + +/* Vodafone D2 GmbH */ + {262, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Vodafone.de", + "Vodafone D2 GmbH"}, + +/* Vodafone D2 GmbH */ + {262, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Vodafone.de", + "Vodafone D2 GmbH"}, + +/* E-Plus Mobilfunk GmbH */ + {262, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "E-Plus", + "E-Plus Mobilfunk GmbH"}, + +/* Viag Interkom */ + {262, 7, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "o2 - de", + "Viag Interkom"}, + +/* O2 (Germany) GmbH & Co. OHG */ + {262, 8, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "o2 - de", + "O2 (Germany) GmbH & Co. OHG "}, + +/* Mobilcom Multimedia GMBH */ + {262, 13, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "Mobilcom", + "Mobilcom Multimedia GMBH"}, + +/* Group 3G UMTS GmbH */ + {262, 14, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "Group3G", + "Group 3G UMTS GmbH"}, + +/******************* + **** Gibraltar **** + *******************/ + +/* Gibraltar Telecoms Int'l */ + {266, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "GIBTEL GSM", + "Gibraltar Telecommunications Int. Ltd."}, + +/****************** + **** Portugal **** + ******************/ + +/* Vodafone Telecel */ + {268, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "vodafone P", + "Vodafone Telecel"}, + +/* Vodafone Telecel */ + {268, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "vodafone P", + "Vodafone Telecel"}, + +/* Optimus Telecomunicacoes, S.A */ + {268, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "P OPTIMUS", + "Optimus Telecomunicacoes, S.A"}, + +/* Optimus Telecomunicacoes, S.A */ + {268, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "P OPTIMUS", + "Optimus Telecomunicacoes, S.A"}, + +/* Telecomunicacoes Moveis Nacionais S.A */ + {268, 6, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "P TMN", "TMN"}, + +/* Telecomunicacoes Moveis Nacionais S.A */ + {268, 6, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "P TMN", "TMN"}, + +/* TMN */ + {268, 6, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "P TMN", "TMN"}, + +/******************** + **** Luxembourg **** + ********************/ + /* P & T Luxembourg */ + {270, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "L LUXGSM", + "P & T Luxembourg"}, + /* P & T Luxembourg */ + {270, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "L LUXGSM", + "P & T Luxembourg"}, + +/* Tango S.A */ + {270, 77, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "L Tango", + "Tango S.A"}, + +/* Tango S.A */ + {270, 77, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "L Tango", + "Tango S.A"}, + +/* VOXmobile S.A. */ + {270, 99, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "VOX.LU", + "VOXmobile"}, + +/* VOXmobile S.A. */ + {270, 99, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "VOX.LU", "VOXmobile"}, + +/***************** + **** Ireland **** + *****************/ + +/* Vodafone Ireland Plc */ + {272, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "vodafone IE", + "Vodafone Ireland Plc"}, + +/* Vodafone Ireland Ltd. */ + {272, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "vodafone IE", + "vodafone"}, + +/* Digifone MM02 Ltd */ + {272, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "O2 - IRL", + "Digifone MM02 Ltd"}, + +/* Digifone MM02 Ltd */ + {272, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "O2 - IRL", + "Digifone MM02 Ltd"}, + +/* Meteor Mobile Telecommunications Limited */ + {272, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "IRL - METEOR", + "Meteor Mobile Telecommunications Limited"}, + +/* Meteor Mobile Telecommunications Limited */ + {272, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "IRL - METEOR", + "Meteor Mobile Telecommunications Limited"}, + +/* Hutchison SETTING_PREFERRED_NETWORK_TYPE_UMTS Ireland limited */ + {272, 5, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "3 IRL", + "Hutchison SETTING_PREFERRED_NETWORK_TYPE_UMTS Ireland"}, + +/***************** + **** Iceland **** + *****************/ + +/* Iceland Telecom Ltd */ + {274, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "IS SIMINN", + "Iceland Telecom Ltd"}, + +/* Iceland Telecom Ltd */ + {274, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "IS SIMINN", + "Iceland Telecom Ltd"}, + +/* Og fjarskipti hf */ + {274, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Og Vodafone", + "Og fjarskipti hf"}, + +/* Og fjarskipti hf */ + {274, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Og Vodafone", + "Og fjarskipti hf"}, + +/* Og fjarskipti hf */ + {274, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Og Vodafone", + "Og fjarskipti hf"}, + +/* Og fjarskipti hf */ + {274, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Og Vodafone", + "Og fjarskipti hf"}, + +/* IMC Island ehf */ + {274, 4, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Viking", + "IMC Island ehf"}, + +/***************** + **** Albania **** + *****************/ + /* Albanian Mobile Communications */ + {276, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "AMC - AL", + "Albanian Mobile Communications"}, + +/* Vodafone Albania */ + {276, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "vodafone AL", + "Vodafone Albania"}, + +/* Vodafone Albania */ + {276, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "vodafone AL", + "Vodafone Albania"}, + +/*************** + **** Malta **** + ***************/ + +/* Vodafone Malta Limited */ + {278, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "vodafone MT", + "Vodafone Malta Limited"}, + +/* Mobisle Communications Limited */ + {278, 21, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "gomobile", + "Mobisle Communications Limited"}, + +/**************** + **** Cyprus **** + ****************/ + +/* Cyprus Telecommunications Auth */ + {280, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "CY CYTAGSM", + "Cyprus Telecommunications Auth"}, + +/* Cyprus Telecommunications Auth */ + {280, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "CY CYTAGSM", + "Cyprus Telecommunications Auth"}, + +/* Areeba LTD */ + {280, 10, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "areeba", + "Areeba LTD"}, + +/* Areeba LTD */ + {280, 10, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "areeba", + "Areeba LTD"}, + +/***************** + **** Georgia **** + *****************/ + +/* Geocell Limited */ + {282, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "GEO-GEOCELL", + "Geocell Limited"}, + +/* Geocell Limited */ + {282, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "GEO-GEOCELL", + "Geocell Limited"}, + +/* Magti GSM */ + {282, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MAGTI-GSM-GEO", + "Magti GSM"}, + +/* Magti GSM */ + {282, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "MAGTI-GSM-GEO", + "Magti GSM"}, + +/***************** + **** Armenia **** + *****************/ + +/* ArmenTel */ + {283, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "RA-ARMGSM", + "ArmenTel"}, + +/* Karabakh Telecom */ + {283, 4, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "RA 04", + "Karabakh Telecom"}, + +/* K Telecom CJSC */ + {283, 5, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "RA 05", "VivaCell"}, + +/* K Telecom CJSC */ + {283, 5, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "RA 05", "VivaCell"}, + +/****************** + **** Bulgaria **** + ******************/ + +/* MobilTEL AD */ + {284, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "M-TEL GSM BG", + "MobilTEL AD"}, + +/* Mobiltel EAD */ + {284, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "M-Tel", "M-Tel BG"}, + +/* Cosmo Bulgaria Mobile EAD */ + {284, 5, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BG GLOBUL", + "Cosmo Bulgaria Mobile EAD"}, + +/* Cosmo Bulgaria Mobile EAD */ + {284, 5, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "BG GLOBUL", + "Cosmo Bulgaria Mobile EAD"}, + +/**************** + **** Turkey **** + ****************/ + +/* Turkcell */ + {286, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "TR TURKCELL", + "Turkcell Iletisim Hizmetleri A.S."}, + +/* TELSIM Mobil Telekomuniksyon Hiz.A.S */ + {286, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "TR TELSIM", + "TELSIM Mobil Telekomuniksyon Hiz.A.S"}, + +/* IS-TIM Telekomunikasyon Hizmetleri Anonim Sirketi */ + {286, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "TR ARIA", + "IS-TIM Telekomunikasyon Hizmetleri Anonim Sirketi"}, + +/* Turk Telekomunikasyon A.S. */ + {286, 4, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "TR AYCELL", + "AYCELL Haberlesme ve Pazarlama Hizmetleri A.S."}, + +/*********************** + **** Faroe Islands **** + ***********************/ + +/* Faroese Telecom GSM 900 */ + {288, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "FROFT", + "Faroese Telecom GSM 900"}, + +/* P/F Kall (Kall Telecom) */ + {288, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "KALL", + "P/F Kall (Kall Telecom)"}, + +/******************* + **** Greenland **** + *******************/ + +/* Tele Greenland A/S */ + {290, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "TELE Greenland", + "Tele Greenland A/S"}, + +/****************** + **** Slovenia **** + ******************/ + +/* SI.Mobil d.d */ + {293, 40, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SI.MOBIL", + "SI.Mobil d.d"}, + +/* SI.Mobil d.d */ + {293, 40, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "SI.MOBIL", + "SI.Mobil d.d"}, + +/* Mobitel d.d */ + {293, 41, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MOBITEL", + "Mobitel D.D."}, + +/* Mobitel d.d */ + {293, 41, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "MOBITEL", + "Mobitel D.D."}, + +/* Western Wireless International d.o.o. */ + {293, 70, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "SI VEGA 070", + "Western Wireless International d.o.o."}, + +/******************* + **** Macedonia **** + *******************/ + +/* MOBIMAK AD */ + {294, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MKD-MOBIMAK", + "MOBIMAK AD"}, + +/* MTS Uslugi na mobilna telefonija AD - Skopje */ + {294, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MKD COSMOFON", + "MTS Uslugi na mobilna telefonija AD - Skopje"}, + +/*********************** + **** Liechtenstein **** + ***********************/ + +/* Swisscom Mobile Ltd (Liechtenstein) */ + {295, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "FL GSM", + "Swisscom Mobile Ltd (Liechtenstein)"}, + +/* Swisscom Mobile Ltd (Liechtenstein) */ + {295, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "FL GSM", + "Swisscom Mobile Ltd (Liechtenstein)"}, + +/* Orange (Liechtenstein) AG */ + {295, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Orange FL", + "Orange (Liechtenstein) AG"}, + +/* Mobilkom (Liechtenstein) AG */ + {295, 5, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "FL1", + "Mobilkom (Liechtenstein) AG"}, + +/* Tele 2 Aktiengesellschaft */ + {295, 77, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "LI TANGO", + "Tele 2 Aktiengesellschaft"}, + +/**************** + **** Canada **** + ****************/ + +/* Microcell Telecom Inc */ + {302, 37, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "MICROCELL", + "Microcell Telecom Inc"}, + +/* Fido */ + {302, 370, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Fido", "Fido"}, + +/* Rogers Wireless */ + {302, 720, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Rogers Wireless", + "Rogers Wireless"}, + +/* SPM Telecom */ + {308, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "AMERIS", "AMERIS"}, + +/************************** + **** Papua New Guinea **** + **************************/ + +/* Pacific Mobile Comms */ + {310, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Pacific", + "Pacific Mobile Comms"}, + +/**************** + **** U.S.A. **** + ****************/ + +/* PA Cellnet */ + +/* +M625000001458 +"VSTREAM", "Voicestream Wireless Corporation" +changed to +"T-Mobile", "T-Mobile USA, Inc" +--> MOHAN On recommendation from Mr. KIm Kiyong from USA during his testing. D500 shows T-Mobile for all VSTREAM +*/ + {310, 10, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "PA Cellnet", "PA Cellnet"}, /* M625000000623 */ + +/* Third Kentucky Cellular Corporation */ + {310, 11, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "WTTCKy", + "Third Kentucky Cellular Corporation"}, + +/* Cingular Wireless */ + {310, 15, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Cingular", + "Cingular Wireless"}, + +/* Voicestream Wireless Corporation */ + {310, 16, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "T-Mobile", + "T-Mobile USA, Inc"}, + +/* Cingular Wireless */ + {310, 17, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Cingular", + "Cingular Wireless"}, + +/* Dutch Harbor */ + {310, 19, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Dutch Harbor", + "Dutch Harbor"}, + +/* Sprint */ + {310, 20, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Sprint", "Sprint"}, + +/* Union */ + {310, 20, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Union", "Union"}, + +/* Union Telephone Company */ + {310, 20, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, + "US - Union Telephone", "Union Telephone Company"}, + +/* Voicestream Wireless Corporation */ + {310, 20, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "T-Mobile", + "T-Mobile USA, Inc"}, +#ifdef FEATURE_SAMSUNG_BAND_GSM_850 + +/* Union Telephone Company */ + {310, 20, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, + "US - Union Telephone", "Union Telephone Company"}, +#else + +/* M625000002007 - Moved from Top to here, to maintain Proper MNC order inorder to avoid displaying of MCC and MNC */ + +/* Sprint */ + {310, 20, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Sprint", "Sprint"}, /* M625000002007 */ + +/* Union */ + {310, 20, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Union", "Union"}, /* M625000002007 */ +#endif + +/* Voicestream Wireless Corporation */ + {310, 21, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "T-Mobile", + "T-Mobile USA, Inc"}, + +/* Voicestream Wireless Corporation */ + {310, 22, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "T-Mobile", + "T-Mobile USA, Inc"}, + +/* Voicestream Wireless Corporation */ + {310, 23, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "T-Mobile", + "T-Mobile USA, Inc"}, + +/* Voicestream Wireless Corporation */ + {310, 24, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "T-Mobile", + "T-Mobile USA, Inc"}, + +/* Voicestream Wireless Corporation */ + {310, 25, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "T-Mobile", + "T-Mobile USA, Inc"}, + +/* Voicestream Wireless Corporation */ + {310, 26, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "T-Mobile", + "T-Mobile USA, Inc"}, + +/* Powertel PCS Inc */ + {310, 27, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Powertel", + "Powertel PCS Inc"}, + +/* Voicestream Wireless Corporation */ + {310, 27, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "T-Mobile", + "T-Mobile USA, Inc"}, + +/* Centennial Wireless */ + {310, 30, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, + "Centennial Wireless", "Centennial Wireless"}, +#ifdef FEATURE_SAMSUNG_BAND_GSM_850 + +/* Centennial Communications */ + {310, 30, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, + "Centennial Communications", "Centennial Communications"}, +#endif + +/* Voicestream Wireless Corporation */ + {310, 31, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "T-Mobile", + "T-Mobile USA, Inc"}, + +/* High Plains/Midwest LLC */ + {310, 34, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "WestLink", + "High Plains/Midwest LLC"}, + +/* Cingular Wireless */ + {310, 38, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Cingular", "Cingular Wireless"}, /*M627500000468 */ + +/* Cellular One */ + {310, 40, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Cellular One", "Cellular One"}, /* M625000000623 */ + +/* Raju:Cingular Wireless */ + +/* Added new entry for the cingular */ + {310, 41, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Cingular", "Cingular Wireless"}, /*M627500000468 */ + +/* TMP Corp */ + {310, 46, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "TMP", "TMP Corp"}, + +/* DIGICEL */ + {310, 50, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "DIGICEL", "DIGICEL"}, /* M625000000623 */ + +/* Key Communications, LLC */ + {310, 53, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "WVW", + "Key Communications, LLC"}, + +/* PCS One Inc. */ + {310, 58, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "VSTREAM", + "PCS One Inc."}, + +/* Choice Wireless L.C. */ + {310, 63, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Choice", + "Choice Wireless L.C."}, + +/* Airadigm Communications */ + {310, 64, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "ARDGMC", + "Airadigm Communications"}, +#ifdef FEATURE_SAMSUNG_BAND_GSM_850 + +/* Voicestream Wireless Corporation */ + {310, 70, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "T-Mobile", + "T-Mobile USA, Inc"}, +#endif + +/* Corr Wireless */ + {310, 80, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Corr Wireless", "Corr Wireless"}, /* M625000000623 */ + +/* Plateau Wireless */ + {310, 100, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Plateau Wireless", "Plateau Wireless"}, /* M625000000623 */ +#ifdef FEATURE_SAMSUNG_BAND_GSM_850 + +/* E.N.M.R. Telephone Cooperative */ + {310, 100, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "US PLATEAU", + "E.N.M.R. Telephone Cooperative"}, + +/* New Mexico RSA 4 East Ltd Partnership */ + {310, 100, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "US PLATEAU", + "New Mexico RSA 4 East Ltd Partnership"}, + +/* Texas RSA 3 Ltd Partnership */ + {310, 100, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "US PLATEAU", + "Texas RSA 3 Ltd Partnership"}, +#endif + +/* WTTCKy */ + {310, 110, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "WTTCKy", "WTTCKy"}, /* M625000000623 */ + +/* Cingular Wireless */ + {310, 150, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Cingular", + "Cingular Wireless"}, + +/* T-Mobile USA, Inc */ + {310, 160, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "T-Mobile", "T-Mobile USA, Inc"}, /* M625000000623 */ + +/* Cingular Wireless */ + {310, 170, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Cingular", + "Cingular Wireless"}, + +/* Cingular Wireless */ + {310, 180, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Cingular", "Cingular Wireless"}, /* M625000000623 */ + +/* West Central */ + {310, 180, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "West Central", "West Central"}, /* M625000000623 */ + +/* Alaska Wireless */ + {310, 190, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Alaska Wireless", "Alaska Wireless"}, /* M625000000623 */ + +/* Dutch Harbor */ + {310, 190, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Dutch Harbor", "Dutch Harbor"}, /* M625000000623 */ + +/* Alaska Wireless Communications, LLC */ +#ifdef FEATURE_SAMSUNG_BAND_GSM_850 + {310, 190, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "USA Dutch Harbor", + "Alaska Wireless Communications, LLC"}, +#endif + +/* T-Mobile USA, Inc */ + {310, 200, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "T-Mobile", + "T-Mobile USA, Inc"}, + +/* T-Mobile USA, Inc */ + {310, 210, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "T-Mobile", + "T-Mobile USA, Inc"}, + +/* T-Mobile USA, Inc */ + {310, 220, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "T-Mobile", + "T-Mobile USA, Inc"}, + +/* T-Mobile USA, Inc */ + {310, 230, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "T-Mobile", + "T-Mobile USA, Inc"}, + +/* T-Mobile USA, Inc */ + {310, 240, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "T-Mobile", + "T-Mobile USA, Inc"}, + +/* T-Mobile USA, Inc */ + {310, 250, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "T-Mobile", + "T-Mobile USA, Inc"}, + +/* T-Mobile USA, Inc */ + {310, 260, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "T-Mobile", + "T-Mobile USA, Inc"}, + +/* T-Mobile USA, Inc */ + {310, 270, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "T-Mobile", + "T-Mobile USA, Inc"}, + +/* T-Mobile USA, Inc */ + {310, 310, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "T-Mobile", "T-Mobile USA, Inc"}, /* M625000000623 */ + +/* Voicestream Wireless Corporation */ + {310, 310, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "T-Mobile", + "T-Mobile USA, Inc"}, + +/* Farmers Cellular Telephone Inc */ + {310, 311, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "FARMERS", + "Farmers Cellular Telephone Inc"}, +#ifdef FEATURE_SAMSUNG_BAND_GSM_850 + +/* Farmers Cellular Telephone Inc */ + {310, 311, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "FARMERS", + "Farmers Cellular Telephone Inc"}, + +/* Smith Bagley, Inc. */ + {310, 320, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "USA - CellularOne", + "Smith Bagley, Inc."}, +#endif + +/* Smith Bagley, Inc.*/ + {310, 320, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "USA - CellularOne", + "Smith Bagley, Inc."}, + +/* WestLink Comm */ + {310, 340, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "WestLink Comm", "WestLink Comm"}, /* M625000000623 */ + +/* High Plains/Midwest LLC */ + {310, 340, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "USA 340", + "High Plains/Midwest LLC"}, + +/* WestLink Comm */ + {310, 350, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "WestLink Comm", "WestLink Comm"}, /* M625000000623 */ + +/* Carolina Phone */ + {310, 350, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Carolina Phone", "Carolina Phone"}, /* M625000000623 */ +#ifdef FEATURE_SAMSUNG_BAND_GSM_850 + +/* Cingular Wireless */ + {310, 380, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "Cingular", "Cingular Wireless"}, /* M627500000468 */ +#endif + +/* Cingular Wireless */ + {310, 380, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Cingular", "Cingular Wireless"}, /* M627500000468 */ + +/* Yorkville */ + {310, 390, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Yorkville", "Yorkville"}, /* M625000000623 */ + +/* Cingular Wireless */ + {310, 410, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Cingular", "Cingular Wireless"}, /* M625000000623 */ + +/* Cincinnati Bell Wireless */ + {310, 420, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Cincinnati Bell Wireless", "Cincinnati Bell Wireless"}, /* M625000000623 */ + +/* Viaero Wireless */ + {310, 450, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Viaero Wireless", "Viaero Wireless"}, /* M625000000623 */ +#ifdef FEATURE_SAMSUNG_BAND_GSM_850 + +/* North East Colorado Cellular, Inc (NECCI) */ + {310, 450, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, + "Cell One of NE Colorado", + "North East Colorado Cellular, Inc (NECCI)"}, +#endif + +/* USA ONELINK */ + {310, 460, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "USA ONELINK", "USA ONELINK"}, /* M625000000623 */ + +/* SunCom */ + {310, 490, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "SunCom", "SunCom"}, /* M625000000623 */ +#ifdef FEATURE_SAMSUNG_BAND_GSM_850 + +/* Public Service Cellular, Inc */ + {310, 500, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "PSC Wireless", + "Public Service Cellular, Inc"}, +#endif + +/* West Virginia Wireless */ + {310, 530, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, + "West Virginia Wireless", "West Virginia Wireless"}, + +/* Key Communications, LLC */ + {310, 530, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "USA-WVA WIRELESS", + "Key Communications, LLC"}, + +/* Cellular One DCS */ + {310, 560, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Cellular One DCS", "Cellular One DCS"}, /* M625000000623 */ +#ifdef FEATURE_SAMSUNG_BAND_GSM_850 + +/* Dobson Communications Corporation */ + {310, 560, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "Cellular One DCS", + "Dobson Communications Corporation"}, +#endif + +/* T-Mobile USA, Inc */ + {310, 580, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "T-Mobile", "T-Mobile USA, Inc"}, /* M625000000623 */ +#ifdef FEATURE_SAMSUNG_BAND_GSM_850 + +/* WWC Holding Co., Inc */ + {310, 590, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, + "USA - Extended Area", "WWC Holding Co., Inc"}, +#endif + +/* Epic Touch */ + {310, 610, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Epic Touch", "Epic Touch"}, /* M625000000623 */ + +/* Choice Wireless L.C. */ + {310, 630, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Choice", + "Choice Wireless L.C."}, + +/* AmeriLink PCS */ + {310, 630, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "AmeriLink PCS", "AmeriLink PCS"}, /* M625000000623 */ + +/* Einstein PCS */ + {310, 640, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Einstein PCS", "Einstein PCS"}, /* M625000000623 */ + +/* Airadigm Communications */ + {310, 640, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "USA AE Airadigm", + "Airadigm Communications"}, + +/* T-Mobile USA, Inc */ + {310, 660, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "T-Mobile", + "T-Mobile USA, Inc"}, + +/* W 2000 PCS */ + {310, 670, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "W 2000 PCS", "W 2000 PCS"}, /* M625000000623 */ + +/* NPI Wireless */ + {310, 680, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "NPI Wireless", "NPI Wireless"}, /* M625000000623 */ + +/* Immix Wireless */ + {310, 690, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Immix Wireless", "Immix Wireless"}, /* M625000000623 */ + +/* Conestoga */ + {310, 690, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Conestoga", "Conestoga"}, /* M625000000623 */ + +/* HIGHLAND */ + {310, 700, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "HIGHLAND", "HIGHLAND"}, /* M625000000623 */ + +/* Rogers */ + {310, 720, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Rogers", "Rogers"}, /* M625000000623 */ + +/* Telemetrix */ + {310, 740, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Telemetrix", "Telemetrix"}, /* M625000000623 */ + +/* PTSI */ + {310, 760, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "PTSI", "PTSI"}, /* M625000000623 */ + +/* i wireless */ + {310, 770, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "i wireless", "i wireless"}, /* M625000000623 */ + +/* AirLink PCS */ + {310, 780, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "AirLink PCS", "AirLink PCS"}, /* M625000000623 */ + +/* PinPoint */ + {310, 790, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "PinPoint", "PinPoint"}, /* M625000000623 */ + +/* T-Mobile USA, Inc */ + {310, 800, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "T-Mobile", "T-Mobile USA, Inc"}, /* M625000000623 */ + +/* Advantage Cellular Systems Inc */ + {310, 880, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "USAACSI", + "Advantage Cellular Systems Inc"}, + +/* Southern Illinois RSA Partnership */ + {310, 910, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "USAFC", + "Southern Illinois RSA Partnership"}, + +/* Lynn County Cellular Limited Partnership */ + {310, 940, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "Digital Cellular", + "Lynn County Cellular Limited Partnership"}, + +/* Texas RSA 8 West Limited */ + {310, 940, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "Digital Cellular", + "Texas RSA 8 West Limited"}, + +/* XIT Cellular */ + {310, 950, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "USA XIT Cellular", + "XIT Cellular"}, + +/* Cingular Wireless */ + {310, 980, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Cingular", "Cingular Wireless"}, /* M625000000623 */ + +/* Mid-Tex Cellular, Ltd. */ + {311, 0, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, + "USA Mid-Tex Cellular, Ltd", "Mid-Tex Cellular, Ltd."}, + +/* Wilkes Cellular Inc */ + {311, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "WILKES", + "Via Wireless"}, + +/* Wilkes Cellular Inc */ + {311, 5, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "WILKES", + "Via Wireless"}, + +/* "Indigo Wireless, Inc" */ + {311, 30, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Indigo", + "Indigo Wireless"}, + +/* Easterbrooke Cellular Corporation */ + {311, 70, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "EASTER", + "Easterbrooke"}, + +/* Pine Telephone Company */ + {311, 80, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "Pine Cellular", + "Pine Telephone Company"}, + +/* Long Lines Wireless LLC */ + {311, 90, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "SXLP", + "Long Lines Wireless"}, + +/* "High Plains Wireless, L.P" */ + {311, 110, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "HPW", + "High Plains Wireless"}, + +/* "Amarillo License, L.P" */ + {311, 130, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "C1AMARIL", + "Cellular One of Amarillo"}, + +/* Petrocom LLC */ + {311, 170, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "PetroCom", + "PetroCom"}, + +/* "Cellular Properties, Inc " */ + {311, 190, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "C1ECI", + "Cellular One of East Central Illinois"}, + +/* Farmers Cellular Telephone Inc */ + {311, 210, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "FARMERS", + "Farmers"}, + +/* Farmers Cellular Telephone Inc */ + {311, 210, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "FARMERS", + "Farmers"}, + +/* Wave Runner LLC (Guam) */ + {311, 250, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "iCAN_GSM", + "i CAN_GSM"}, + +/* "Lamar County Cellular, Inc" */ + {311, 310, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "LamarCel", + "Lamar County Cellular"}, + +/* Sprocket */ + {311, 140, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Sprocket", "Sprocket"}, /* M625000000623 */ + +/* Cingular Wireless */ + {311, 180, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Cingular", "Cingular Wireless"}, /* M625000000623 */ + +/**************** + **** Mexico **** + ****************/ + +/* Pegaso Comunicaciones y Sistemas, S.A. De C.V */ + {334, 3, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "MX MOVISTAR GSM", + "Pegaso Comunicaciones y Sistemas, S.A. De C.V"}, + +/* Telcel GSM */ + {334, 20, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Telcel GSM", "Telcel GSM"}, /* M625000000623 */ + +/***************** + **** Jamaica **** + *****************/ + +/* Mossel Limited T/A Digicel */ + {338, 5, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "JM DIGICEL", + "Mossel Limited T/A Digicel"}, + +/* Cable & Wireless Jamaica Limited */ + {338, 180, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "C&W", + "Cable & Wireless Jamaica Limited"}, + +/**************************** + **** French West Indies **** + ****************************/ + +/* ORANGE CARAIBE */ + {340, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "F-Orange", "Orange Caraibe"}, /* M627500002609 */ + +/* Outremer Telecom */ + {340, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "ONLY", "Outremer"}, + +/* Outremer Telecom */ + {340, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "ONLY", "Outremer"}, + +/* Dauphin Telecom */ + {340, 8, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "AMIGO", + "Dauphin Telecom"}, + +/* Dauphin Telecom */ + {340, 8, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "AMIGO", + "Dauphin Telecom"}, + +/* Bouygues Telecom Caraibe */ + {340, 20, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BOUYGTEL-C", + "Bouygues Telecom Caraibe"}, + +/* Bouygues Telecom Caraibe */ + {340, 20, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "BOUYGTEL-C", + "Bouygues Telecom Caraibe"}, + +/***************** + **** Barbados **** + *****************/ + +/* Digicel (Barbados) Limited */ + {342, 50, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "JM Digicel", + "Digicel (Barbados) Limited"}, + +/* Digicel (Barbados) Limited */ + {342, 50, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "JM Digicel", + "Digicel (Barbados) Limited"}, + +/* Cable & Wireless Barbados Ltd. */ + {342, 600, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "C&W", + "Cable & Wireless Barbados Ltd."}, + +/* Digicel (Barbados) Limited */ + {342, 750, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "DIGICEL", + "Digicel"}, + +/* Digicel (Barbados) Limited */ + {342, 750, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "DIGICEL", + "Digicel"}, + +/* Cellular Communications Barbados */ + {342, 810, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Cingular", + "Cingular Wireless"}, + +/* Cellular Communications Barbados */ + {342, 810, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Cingular", + "Cingular Wireless"}, + +/***************** + **** Antigua **** + *****************/ + +/* Antigua Public Utilities Authority-APUA */ + {344, 30, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "APUA PCS ANTIGUA", + "Antigua Public Utilities Authority-APUA"}, +#ifdef FEATURE_SAMSUNG_BAND_GSM_850 + +/* Cable & Wireless Caribbean Cellular (Antigua) Limited */ + {344, 920, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "C&W", + "Cable & Wireless Caribbean Cellular (Antigua) Limited"}, +#endif /* FEATURE_SAMSUNG_BAND_GSM_850 */ + +/* Antigua Wireless Ventures Limited */ + {344, 930, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Cingular", + "Cingular Wireless"}, + +/********************* + **** Cayman Islands **** + *********************/ + +/* Cable & Wireless (Cayman Islands) Limited */ + {346, 140, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "C&W", + "Cable & Wireless (Cayman Islands) Limited"}, +#ifdef FEATURE_SAMSUNG_BAND_GSM_850 + +/* Cable & Wireless (Cayman Islands) Limited */ + {346, 140, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "C&W", + "Cable & Wireless (Cayman Islands) Limited"}, +#endif /* FEATURE_SAMSUNG_BAND_GSM_850 */ + +/* Caribbean Cellular Telephone */ + {348, 570, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "CCTBVI", "CCT"}, + +/* Caribbean Cellular Telephone */ + {348, 570, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "CCTBVI", "CCT"}, + +/***************** + **** Bermuda **** + *****************/ + +/* Telecommunications (Bermuda & West Indies) Ltd */ + {350, 1, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "TELECOM BDA", + "Telecommunications (Bermuda & West Indies) Ltd"}, + +/* Mobility Limited */ + {350, 2, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "BTC MOBILITY LTD.", + "Mobility Limited"}, + +/* Telecommunications (Bermuda & West Indies) Ltd */ + {350, 10, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Cingular", + "Cingular Wireless"}, + +/*************** + **** Grenada **** + ***************/ + +/* Digicel Grenada Ltd. */ + {352, 30, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "DIGICEL", "Digicel"}, + +/* Digicel Grenada Ltd. */ + {352, 30, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "DIGICEL", + "Digicel"}, + +/* Grenada Wireless Holdings Ltd */ + {352, 30, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Cingular", + "Cingular Wireless"}, + +/* Grenada Wireless Holdings Ltd */ + {352, 30, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Cingular", + "Cingular Wireless"}, + +/* Cable & Wireless Caribbean Cellular (Grenada) Limited */ + {352, 110, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "C&W", + "Cable & Wireless Caribbean Cellular (Grenada) Limited"}, + +/* Cable & Wireless West Indies Ltd (Montserrat) */ + {354, 860, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "C&W", + "Cable & Wireless West Indies (Montserrat)"}, + +/********************* + **** St Kitts & Nevis **** + *********************/ + +/* Cable & Wireless St Kitts & Nevis Limited */ + {356, 110, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "C&W", + "Cable & Wireless St Kitts & Nevis Limited"}, + +/* Cable & Wireless St Kitts & Nevis Limited */ + {356, 110, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "C&W", + "Cable & Wireless St Kitts & Nevis Limited"}, + +/*************** + **** St Lucia **** + ***************/ + +/* Wireless Ventures (St. Lucia) Limited */ + {358, 30, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Cingular", + "Cingular Wireless"}, + +/* Wireless Ventures (St. Lucia) Limited */ + {358, 30, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Cingular", + "Cingular Wireless"}, + +/* Digicel (St Lucia) Limited */ + {358, 50, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "DIGICEL", + "Digicel (St Lucia) Limited"}, + +/* Digicel (St Lucia) Limited */ + {358, 50, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "DIGICEL", + "Digicel (St Lucia) Limited"}, + +/* Digicel (St Lucia) Limited */ + {358, 50, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "DIGICEL", + "Digicel (St Lucia) Limited"}, + +/* Cable & Wireless Caribbean Cellular (St Lucia) Limited */ + {358, 110, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "C&W", + "Cable & Wireless"}, + +/********************************* + **** St. Vincent & the Grenadines **** + ********************************/ + +/* Wireless Ventures (St. Vincent) Limited */ + {360, 10, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Cingular", + "Cingular Wireless"}, + +/* Wireless Ventures (St. Vincent) Limited */ + {360, 10, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Cingular", + "Cingular Wireless"}, + +/* Digicel (St. Vincent and the Grenadines) Limited */ + {360, 70, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "DIGICEL", + "Digicel (St. Vincent and Grenadines) Limited"}, + +/* Digicel (St. Vincent and the Grenadines) Limited */ + {360, 70, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "DIGICEL", + "Digicel (St. Vincent and Grenadines) Limited"}, + +/* Cable & Wireless Caribbean Cellular (St. Vincent & the Grenadines) Ltd */ + {360, 110, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "C&W", + "Cable & Wireless Caribbean Cellular (St. Vincent & the Grenadines) Ltd"}, + +/****************************** + **** Netherlands Antilles **** + ******************************/ + +/* Telcell N.V. */ + {362, 51, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Telcell GSM", + "Telcell N.V."}, + +/* Curacao Telecom N.V. */ + {362, 69, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, + "ANT CURACAO TELECOM GSM", "Curacao Telecom N.V."}, + +/* Curacao Telecom N.V. */ + {362, 69, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, + "ANT CURACAO TELECOM GSM", "Curacao Telecom N.V."}, + +/* Setel NV */ + {362, 91, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Setel", "Setel NV"}, + +/* Communications Systems Curacao N.V. */ + {362, 630, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Cingular", + "Cingular Wireless"}, + +/* Setel NV */ + {362, 951, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "CHIPPIE", + "UTS Wireless Curacao"}, + +/************** + ************** + **************/ + +/* SETAR (Servicio di Telecomunicacion di Aruba) */ + {363, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SETAR GSM", + "SETAR (Servicio di Telecomunicacion di Aruba)"}, + +/* SETAR (Servicio di Telecomunicacion di Aruba) */ + {363, 1, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "SETAR GSM", + "SETAR (Servicio di Telecomunicacion di Aruba)"}, + +/* New Millenium Telecom Services (NMTS) */ + {363, 20, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "DIGICEL", "Digicel"}, + +/* New Millenium Telecom Services (NMTS) */ + {363, 20, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "DIGICEL", + "Digicel"}, + +/************** + **** BAHMAS *** + **************/ + +/* The Bahamas Telecommunications Company Ltd */ + {364, 39, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "BaTelCell", + "The Bahamas Telecommunications Company Ltd"}, + +/*************** + **** Anguilla **** + ***************/ +#ifdef FEATURE_SAMSUNG_BAND_GSM_850 + +/* Cable & Wireless (West Indies) Ltd. Anguilla */ + {365, 840, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "C&W", + "Cable & Wireless (West Indies) Ltd. Anguilla"}, +#endif /* FEATURE_SAMSUNG_BAND_GSM_850 */ + +/**************** + **** Dominica **** + ****************/ + /* Wireless Ventures (Dominica) Ltd. */ + {366, 20, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Cingular", + "Cingular Wireless"}, + +/* Wireless Ventures (Dominica) Ltd. */ + {366, 20, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Cingular", + "Cingular Wireless"}, + +/* Cable & Wireless Dominica Ltd. */ + {366, 110, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "C&W", + "Cable & Wireless Dominica Ltd."}, + +/************** + **** Cuba **** + **************/ + +/* "Empresa de Telecommunicaciones de Cuba, SA (ETECSA)" */ + {368, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "C_COM", "ETECSA"}, + +/**************************** + **** Dominican Republic **** + ****************************/ + +/* Orange Dominicana S.A. */ + {370, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "orange", + "Orange Dominicana S.A."}, + +/* Orange Dominicana S.A. */ + {370, 1, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "orange", + "Orange Dominicana S.A."}, + +/* ORANGE */ + {370, 10, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "ORANGE", "ORANGE"}, + +/* Communication Cellulaire d'Haiti SA */ + {372, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "VOILA", "Comcel "}, + +/***************************** + **** Trinidad and Tobaga **** + *****************************/ + +/* Telcommunications Services of Trinidad and Tobago Ltd */ + {374, 12, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "TSTT", + "Telcommunications Services of Trinidad and Tobago Ltd"}, + +/********************** + **** Turks & Caicos **** + **********************/ + +/* Cable & Wireless West Indies Ltd (Turks & Caicos) */ + {376, 350, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "C&W", + "Cable & Wireless West Indies Ltd (Turks & Caicos)"}, + +/******************** + **** Azerbaijan **** + ********************/ + +/* Azercell Telekom B.M. */ + {400, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "AZE - AZERCELL GSM", + "Azercell Telekom B.M."}, + +/* Bakcell */ + {400, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BAKCELL GSM 2000", + "J.V. Bakcell"}, + +/******************** + **** Kazakhstan **** + ********************/ + +/* Kar-Tel Ltd */ + {401, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "KZ K-MOBILE", + "Kar-Tel Ltd"}, + +/* GSM Kazakhstan Ltd */ + {401, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "KZ KCELL", + "GSM Kazakhstan Ltd"}, + +/******************** + **** *********** **** + ********************/ + +/* B-Mobile */ + {402, 11, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BT B-Mobile", + "B-Mobile"}, + +/*************** + **** India **** + ***************/ + +/* Aircel Digilink India Ltd */ + {404, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Hutch", + "Aircel Digilink India Ltd"}, + +/* Bharti Mobile Ltd */ + {404, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "AirTel", + "Bharti Mobile Ltd"}, + +/* Bharti Mobile Ltd */ + {404, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "AirTel", + "Bharti Mobile Ltd"}, + +/* IDEA Cellular Limited */ + {404, 4, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "IDEA", + "IDEA Cellular Limited"}, + +/* Fascel Limited */ + {404, 5, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Hutch", + "Fascel Limited"}, + +/* IDEA Cellular Limited */ + {404, 7, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "IDEA", + "IDEA Cellular Limited"}, + +/* Reliance Telecom Private Ltd */ + {404, 9, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Reliance", + "Reliance Telecom Private Ltd"}, + +/* Bharti Mobile Ltd */ + {404, 10, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "AirTel", + "Bharti Mobile Ltd"}, + +/* Hutchison Essar Telecom Limited */ + {404, 11, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Hutch", + "Hutchison Essar Telecom Limited"}, + +/* Hutchison Essar Telecom Limited */ + {404, 11, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Hutch", + "Hutchison Essar Telecom Limited"}, + +/* Escotel Mobile Communications Ltd, Haryana */ + {404, 12, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "INDEH", + "Escotel Mobile Communications"}, + +/* Hutchison Essar South Limited */ + {404, 13, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Hutch", + "Hutchison Essar South Limited"}, + +/* Spice Communications Limited - Punjab */ + {404, 14, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "INA SPICE", + "Spice Communications Limited"}, + +/* Aircel Digilink India Ltd */ + {404, 15, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Hutch", + "Aircel Digilink India Ltd"}, + +/* Dishnet Wireless Limited */ + {404, 17, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "AIRCEL", "Aircel"}, + +/* Dishnet Wireless Limited */ + {404, 17, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "AIRCEL", "Aircel"}, + +/* Reliance Telecom Private Ltd */ + {404, 18, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Reliance", + "Reliance Telecom Private Ltd"}, + +/* Escotel Mobile Communications Ltd, Kerala */ + {404, 19, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "INDEK", + "Escotel Mobile Communications"}, + +/* Hutchison Essar Limited */ + {404, 20, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Hutch", "HUTCH"}, + +/* Hutchison Essar Limited */ + {404, 20, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Hutch", "HUTCH"}, + +/* BPL Mobile Communications Ltd - Mumbai */ + {404, 21, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BPL MOBILE", + "BPL Mobile Communications Ltd"}, + +/* IDEA Cellular Limited - Maharashtra/Goa */ + {404, 22, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "IDEA", + "IDEA Cellular Limited"}, + +/* IDEA Cellular Limited - Gujarat */ + {404, 24, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "IDEA", + "IDEA Cellular Limited"}, + +/* Dishnet Wireless Limited */ + {404, 25, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "AIRCEL", "Aircel"}, + +/* Dishnet Wireless Limited */ + {404, 25, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "AIRCEL", "Aircel"}, + +/* BPL Cellular Limited - Maharshtra/Goa */ + {404, 27, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BPL MOBILE", + "BPL Cellular Limited"}, + +/* Dishnet Wireless Limited */ + {404, 28, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "AIRCEL", "Aircel"}, + +/* Dishnet Wireless Limited */ + {404, 28, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "AIRCEL", "Aircel"}, + +/* Dishnet Wireless Limited */ + {404, 29, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "AIRCEL", "Aircel"}, + +/* Dishnet Wireless Limited */ + {404, 29, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "AIRCEL", "Aircel"}, + +/* Hutchison Telecom East Limited */ + {404, 30, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "INA HUTCH", + "Hutchison Telecom East Limited"}, + +/* BHARTI MOBITEL LIMITED */ + {404, 31, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "AirTel", + "Bharti Cellular Ltd"}, + +/* Dishnet Wireless Limited */ + {404, 33, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "AIRCEL", "Aircel"}, + +/* Dishnet Wireless Limited */ + {404, 33, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "AIRCEL", "Aircel"}, + +/* Bharat Sanchar Nigam Limited */ + {404, 34, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BSNL MOBILE", + "Bharat Sanchar Nigam Limited"}, + +/* Dishnet Wireless Limited */ + {404, 35, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "AIRCEL", "Aircel"}, + +/* Dishnet Wireless Limited */ + {404, 35, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "AIRCEL", "Aircel"}, + +/* Reliance Telecom Private Ltd */ + {404, 36, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Reliance", + "Reliance Telecom Private Ltd"}, + +/* Dishnet Wireless Limited */ + {404, 37, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "AIRCEL", "Aircel"}, + +/* Dishnet Wireless Limited */ + {404, 37, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "AIRCEL", "Aircel"}, + +/* Bharat Sanchar Nigam Limited */ + {404, 38, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BSNL MOBILE", + "Bharat Sanchar Nigam Limited"}, + +/* Bharti Cellular Ltd */ + {404, 40, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "INA AIRTEL", + "Bharti Cellular Ltd"}, + +/* RPG Cellular Services */ + {404, 41, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "INA RPG", + "RPG Cellular Services"}, + +/* Srinivas Cellcom Limited */ + {404, 42, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "INA AIRCEL", + "Aircel Limited"}, + +/* BPL Cellular Limited - Tamil Nadu/Pondicherry */ + {404, 43, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BPL MOBILE", + "BPL Cellular Limited"}, + +/* Spice Communications Limited - Karnataka */ + {404, 44, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "INA SPICE", + "Spice Communications Limited"}, + +/* Bharti Mobile Ltd - Karnataka */ + {404, 45, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "AirTel", + "Bharti Mobile Ltd"}, + +/* BPL Cellular Limited - Kerala */ + {404, 46, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BPL MOBILE", + "BPL Cellular Limited"}, + +/* Bharti Mobile Ltd - Andhra Pradesh */ + {404, 49, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "AirTel", + "Bharti Cellular Ltd"}, + +/* Reliance Telecom Private Ltd */ + {404, 50, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Reliance", + "Reliance Telecom Private Ltd"}, + +/* Bharat Sanchar Nigam Limited */ + {404, 51, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BSNL MOBILE", + "Bharat Sanchar Nigam Limited"}, + +/* Reliance Telecom Private Ltd */ + {404, 52, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Reliance", + "Reliance Telecom Private Ltd"}, + +/* Bharat Sanchar Nigam Limited */ + {404, 53, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BSNL MOBILE", + "Bharat Sanchar Nigam Limited"}, + +/* Bharat Sanchar Nigam Limited */ + {404, 54, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BSNL MOBILE", + "Bharat Sanchar Nigam Limited"}, + +/* Bharat Sanchar Nigam Limited */ + {404, 55, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BSNL MOBILE", + "Bharat Sanchar Nigam Limited"}, + +/* Escotel Mobile Communications Ltd, UP(W) */ + {404, 56, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "INDEU", + "Escotel Mobile Communications"}, + +/* Bharat Sanchar Nigam Limited */ + {404, 57, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BSNL MOBILE", + "Bharat Sanchar Nigam Limited"}, + +/* Bharat Sanchar Nigam Limited */ + {404, 58, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BSNL MOBILE", + "Bharat Sanchar Nigam Limited"}, + +/* Bharat Sanchar Nigam Limited */ + {404, 59, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BSNL MOBILE", + "Bharat Sanchar Nigam Limited"}, + +/* Aircel Digilink India Ltd */ + {404, 60, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Hutch", + "Aircel Digilink India Ltd"}, + +/* Bharat Sanchar Nigam Limited */ + {404, 62, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BSNL MOBILE", + "Bharat Sanchar Nigam Limited"}, + +/* Bharat Sanchar Nigam Limited */ + {404, 64, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BSNL MOBILE", + "Bharat Sanchar Nigam Limited"}, + +/* Bharat Sanchar Nigam Limited */ + {404, 66, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BSNL MOBILE", + "Bharat Sanchar Nigam Limited"}, + +/* Reliance Telecom Private Ltd */ + {404, 67, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Reliance", + "Reliance Telecom Private Ltd"}, + +/* Mahanagar Telephone Nigam Ltd */ + {404, 68, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "IN-DOLPHIN", + "Mahanagar Telephone Nigam Ltd"}, + +/* Mahanagar Telephone Nigam Ltd */ + {404, 69, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "IN-DOLPHIN", + "Mahanagar Telephone Nigam Ltd"}, + +/* Hexacom India Limited */ + {404, 70, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "INDH1", + "Hexacom India Limited"}, + +/* Bharat Sanchar Nigam Limited */ + {404, 71, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BSNL MOBILE", + "Bharat Sanchar Nigam Limited"}, + +/* Bharat Sanchar Nigam Limited */ + {404, 72, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BSNL MOBILE", + "Bharat Sanchar Nigam Limited"}, + +/* Bharat Sanchar Nigam Limited */ + {404, 73, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BSNL MOBILE", + "Bharat Sanchar Nigam Limited"}, + +/* Bharat Sanchar Nigam Limited */ + {404, 74, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BSNL MOBILE", + "Bharat Sanchar Nigam Limited"}, + +/* Bharat Sanchar Nigam Limited */ + {404, 75, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BSNL MOBILE", + "Bharat Sanchar Nigam Limited"}, + +/* Bharat Sanchar Nigam Limited */ + {404, 76, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BSNL MOBILE", + "Bharat Sanchar Nigam Limited"}, + +/* Bharat Sanchar Nigam Limited */ + {404, 77, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BSNL MOBILE", + "Bharat Sanchar Nigam Limited"}, + +/* IDEA Cellular Limited */ + {404, 78, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "IDEA", + "IDEA Cellular Limited"}, + +/* Bharat Sanchar Nigam Limited */ + {404, 79, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BSNL MOBILE", + "Bharat Sanchar Nigam Limited"}, + +/* Bharat Sanchar Nigam Limited */ + {404, 80, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BSNL MOBILE", + "Bharat Sanchar Nigam Limited"}, + +/* Bharat Sanchar Nigam Limited */ + {404, 81, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BSNL MOBILE", + "Bharat Sanchar Nigam Limited"}, + +/* Hutchison Essar South Limited */ + {404, 84, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "HUTCH", + "Hutchison Essar South Limited"}, + +/* Reliance Telecom Private Ltd */ + {404, 85, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Reliance", + "Reliance Telecom Private Ltd"}, + +/* Hutchison Essar South Limited */ + {404, 86, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "HUTCH", + "Hutchison Essar South Limited"}, + +/* Bharti Cellular Ltd */ + {404, 90, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "AirTel", + "Bharti Cellular Ltd"}, + +/* Bharti Cellular Ltd */ + {404, 92, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "AirTel", + "Bharti Cellular Ltd"}, + +/* Bharti Cellular Ltd */ + {404, 93, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "AirTel", + "Bharti Cellular Ltd"}, + +/* Bharti Cellular Ltd */ + {404, 94, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "AirTel", + "Bharti Cellular Ltd"}, + +/* Bharti Cellular Ltd */ + {404, 95, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "AirTel", + "Bharti Cellular Ltd"}, + +/* Bharti Cellular Ltd */ + {404, 96, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "AirTel", + "Bharti Cellular Ltd"}, + +/* Bharti Cellular Ltd */ + {404, 97, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "AirTel", + "Bharti Cellular Ltd"}, + +/* Bharti Cellular Ltd */ + {404, 98, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "AirTel", + "Bharti Cellular Ltd"}, + +/******************** + *** ** + *******************/ + +/* Bharti Televentures Limited */ + {405, 51, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "AIRTEL", "AirTel"}, + +/* Bharti Televentures Limited */ + {405, 52, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "AIRTEL", "AirTel"}, + +/* Bharti Televentures Limited */ + {405, 53, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "AIRTEL", "AirTel"}, + +/* Bharti Televentures Limited */ + {405, 54, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "AIRTEL", "AirTel"}, + +/* Bharti Televentures Limited */ + {405, 55, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "AIRTEL", "AirTel"}, + +/* Bharti Televentures Limited */ + {405, 56, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Airtel", "Airtel"}, + +/* Hutchison Essar South Limited */ + {405, 66, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Hutch", + "Hutch- UP West"}, + +/* Hutchison Essar South Limited */ + {405, 67, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "HUTCH", "Hutch"}, + +/****************** + **** Pakistan **** + ******************/ + +/* Mobilink */ + {410, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "PK-M-LINK", + "Mobilink"}, + +/* Pakistan Telecommunciation Mobile Ltd */ + {410, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "PK-UFONE", + "Pakistan Telecommunciation Mobile Ltd"}, + +/* Paktel Limited */ + {410, 4, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "PAKTEL", "PAKTEL"}, + +/* Telenor Pakistan (Pvt) Ltd. */ + {410, 6, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "TELENOR", + "Telenor Pakistan (Pvt) Ltd."}, + +/* Telenor Pakistan (Pvt) Ltd. */ + {410, 6, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "TELENOR", + "Telenor Pakistan (Pvt) Ltd."}, + +/* Warid Telecom (PVT) Ltd */ + {410, 7, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "WaridTel", + "Warid Telecom (PVT) Ltd"}, + +/* Warid Telecom (PVT) Ltd */ + {410, 7, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "WaridTel", + "Warid Telecom (PVT) Ltd"}, + +/****************** + **** Afghanistan **** + ******************/ + +/* Telephone Systems International Inc */ + {412, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "AF AWCC", + "Telephone Systems International Inc"}, + +/* Telephone Systems International Inc */ + {412, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "AF AWCC", + "Telephone Systems International Inc"}, + +/* Telecom Development Company Afghanistan Ltd. */ + {412, 20, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "AF AWCC", + "Telecom Development Company Afghanistan Ltd."}, + +/******************* + **** Sri Lanka **** + *******************/ + +/* Mobitel (Pvt) Limited */ + {413, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Mobitel", + "Mobitel (Pvt) Limited"}, + +/* MTN Networks (Pvt) Ltd */ + {413, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SRI DIALOG", + "MTN Networks (Pvt) Ltd"}, + +/* Celltel Lanka Limited */ + {413, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SRI CELLTEL", + "Celltel Lanka Limited"}, + +/* Hutchison Telecommunications Lanka (Pte) Limited */ + {413, 8, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Hutch", + "Hutchison Telecommunications Lanka (Pvt) Limited"}, + +/***************** + **** Myanmar **** + *****************/ + +/* Myanmar Posts and Telecommunications */ + {414, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MM 900", + "Myanmar Posts and Telecommunications"}, + +/***************** + **** Lebanon **** + *****************/ + +/* FTML Service Cellulaire */ + {415, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "RL Cellis", + "FTML Service Cellulaire"}, + +/* LibanCell */ + {415, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "RL LibanCell", + "LibanCell"}, + +/**************** + **** Jordan **** + ****************/ + +/* Jordan M.T.S */ + {416, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Fastlink", + "Jordan Mobile Telephone Services (JMTS)"}, + +/* Umniah Mobile Company */ + {416, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "UMNIAH", "Umniah"}, + +/* MobileCom */ + {416, 77, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "JO MobCom", + "Petra Jordanian Mobile Telecommunications Company(MobileCom)"}, + +/*************** + **** Syria **** + ***************/ + /* Syriatel Mobile Telecom SA */ + {417, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SYRIATEL", + "Syriatel Mobile Telecom SA"}, + +/* Syriatel Mobile Telecom SA */ + {417, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "SYRIATEL", + "Syriatel Mobile Telecom SA"}, + +/* Spacetel Syria */ + {417, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "94 SYRIA", + "Spacetel Syria"}, + +/* Spacetel Syria */ + {417, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "94 SYRIA", + "Spacetel Syria"}, + +/* Syrian Telecom Est. */ + {417, 9, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SYR MOBILE SYR", + "Syrian Telecom Est."}, + +/* Syriatel Holdings S.A */ + {417, 93, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Syriatel", + "Syriatel Holdings S.A"}, + +/* Syriatel Holdings S.A */ + {417, 93, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Syriatel", + "Syriatel Holdings S.A"}, + +/**************** + **** Iraq **** + ****************/ + +/* Asia Cell Telecommunications Company Ltd */ + {418, 0, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "ASIACELL", + "Asia Cell Telecommunications Company Ltd"}, + +/* SanaTel */ + {418, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SanaTel", "SanaTel"}, + +/* Asia Cell Telecommunications Company Ltd */ + {418, 5, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "ASIACELL", + "Asia Cell Telecommunications Company Ltd"}, + +/* SanaTel */ + {418, 8, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SanaTel", "SanaTel"}, + +/* Atheer Telecom Iraq */ + {418, 20, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Atheer Iraq", + "Atheer Telecom Iraq"}, + +/* Atheer Telecom Iraq */ + {418, 30, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "IRAQNA", + "Orascom Telecom Iraq Corporation"}, + +/**************** + **** Kuwait **** + ****************/ + +/* Mobile Telecommunications Company */ + {419, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "KT MTCNet", + "Mobile Telecommunications Company"}, + +/* Mobile Telecommunications Company */ + {419, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "KT MTCNet", + "Mobile Telecommunications Company"}, + +/* National Mobile Telecommunications Co */ + {419, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "KT WATANIYA", + "National Mobile Telecommunications Co"}, + +/* National Mobile Telecommunications Co */ + {419, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "KT WATANIYA", + "National Mobile Telecommunications Co"}, + +/********************** + **** Saudi Arabia **** + **********************/ + +/* Saudi Telecom Company */ + {420, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "ALJAWAL", + "Saudi Telecom Company"}, + +/* Etihad Etisalat Company */ + {420, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Mobily", "Mobily"}, + +/* Etihad Etisalat Company */ + {420, 3, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "Mobily", "Mobily"}, + +/* Electronics App' Est. */ + {420, 7, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "EAE", + "Electronics App' Est."}, + +/*************** + **** Yemen **** + ***************/ + +/* Spacetel - Yemen */ + {421, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SabaFon", + "Yemen Mobile Phone Company - Sabafon"}, + +/* Spacetel - Yemen */ + {421, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SPACETEL", + "Spacetel - Yemen"}, + +/************** + **** Oman **** + **************/ + +/* Oman Telecommunications Company */ + {422, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "OMAN MOBILE", + "Oman Telecommunications Company"}, + +/* Omani Qatari Telecommunications Company SAOC */ + {422, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "nawras", "nawras"}, + +/****************************** + **** United Arab Emirates **** + ******************************/ + +/* Emirates Telecom Corp-ETISALAT */ + {424, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "UAE ETISALAT", + "Emirates Telecom Corp-ETISALAT"}, + +/**************** + **** Israel **** + ****************/ + +/* Partner Communications Company Ltd */ + {425, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "IL ORANGE", + "Partner Communications Company Ltd"}, + +/* Partner Communications Company Ltd */ + {425, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "IL ORANGE", + "Partner Communications Company Ltd"}, + +/* Cellcom Israel Ltd */ + {425, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "IL Cellcom", + "Cellcom Israel Ltd"}, + +/* Cellcom Israel Ltd */ + {425, 2, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "IL Cellcom", + "Cellcom Israel Ltd"}, + +/******************************* + **** Palestinian Authority **** + *******************************/ + +/* Palestine Telecoms Co Plc */ + {425, 5, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "JAWWAL-PALESTINE", + "Palestine Telecoms Co Plc"}, + +/***************** + **** Bahrain **** + *****************/ + +/* Bahrain Telecommunications Company */ + {426, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BATELCO", + "Bahrain Telecommunications Company"}, + +/* MTC Vodafone (Bahrain) B.S.C. */ + {426, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MTC VODAFONE BH", + "MTC Vodafone (Bahrain) B.S.C."}, + +/* MTC Vodafone (Bahrain) B.S.C. */ + {426, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "MTC VODAFONE BH", + "MTC Vodafone (Bahrain) B.S.C."}, + +/* MTC Vodafone (Bahrain) B.S.C. */ + {426, 2, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "MTC VODAFONE BH", + "MTC Vodafone (Bahrain) B.S.C."}, + +/*************** + **** Qatar **** + ***************/ + +/* Q-Tel */ + {427, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "QAT QATARNET", + "Q-Tel"}, + +/* Q-Tel */ + {427, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "QAT QATARNET", + "Q-Tel"}, + +/****************** + **** Mongolia **** + ******************/ + +/* MobiCom */ + {428, 99, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MN MobiCom", + "MobiCom"}, + +/*************** + **** Nepal **** + ***************/ + +/* Nepal Telecommunications Corporation */ + {429, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Nepal", + "Nepal Telecommunications Corporation"}, + +/************** + **** Iran **** + **************/ + +/* TCI */ + {432, 11, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "IR-TCI", "TCI"}, + +/* KFZO */ + {432, 14, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "IR KISH", "KFZO"}, + +/* Mobile Telecommunications Company of Esfahan */ + {432, 19, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "IR MTCE", + "Mobile Telecommunications Company of Esfahan"}, + +/* Rafsanjan Industrial Complex (Coop) */ + {432, 32, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Taliya", "Taliya"}, + +/******************** + **** Uzbekistan **** + ********************/ + +/* Buztel */ + {434, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Buztel", "Buztel"}, + +/* JV Uzmacom */ + {434, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "UZMACOM", "Uzmacom"}, + +/* DAEWOO Unitel Company */ + {434, 4, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "UZB DAEWOO-GSM", + "DAEWOO Unitel Company"}, + +/* DAEWOO Unitel Company */ + {434, 4, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "UZB DAEWOO-GSM", + "DAEWOO Unitel Company"}, + +/* Coscom */ + {434, 5, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "UZB CSOCOM GSM", + "Coscom"}, + +/* Uzdunrobita JV */ + {434, 7, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "UZB-UZD", + "Uzdunrobita JV"}, + +/* Uzdunrobita JV */ + {434, 7, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "UZB-UZD", + "Uzdunrobita JV"}, + +/******************** + *** Tajikistan **** + ********************/ + +/* JSC Somoncom */ + {436, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Somoncom", + "JSC Somoncom"}, + +/* Indigo Tajikistan */ + {436, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Indigo-T", + "Indigo Tajikistan"}, + +/* TT Mobile, Closed joint-stock company */ + {436, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "TJK MLT", + "TT Mobile, Closed joint-stock company"}, + +/* TT Mobile, Closed joint-stock company */ + {436, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "TJK MLT", + "TT Mobile, Closed joint-stock company "}, + +/* JOSA Babilon-Mobile */ + {436, 4, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Babilon-M", + "JOSA Babilon-Mobile"}, + +/* Tajik Tel */ + {436, 5, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "TJT - Tajik Tel", + "Tajik Tel"}, + +/************************* + **** Kyrgyz Republic **** + *************************/ + +/* Bitel Limited */ + {437, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BITEL KGZ", + "Bitel Limited"}, + +/* BiMoCom Ltd */ + {437, 5, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MEGACOM", "MEGACOM"}, + +/* BiMoCom Ltd */ + {437, 5, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "MEGACOM", "MEGACOM"}, + +/********************** + **** Turkmenistan **** + **********************/ + +/* Barash Communication Technologies Inc. */ + {438, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BCTI", + "Barash Communication Technologies Inc."}, + +/********************** + **** JAPAN **** + **********************/ + +/* NTT DoCoMo, Inc */ + {440, 10, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "JP DoCoMo", + "NTT DoCoMo, Inc"}, + +/* J-phone */ + {440, 20, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SoftBank", + "SoftBank"}, + +/* J-phone */ + {440, 20, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "SoftBank", "SoftBank"}, + +/********************** + **** KOREA **** + **********************/ + +/* Added for testing */ + + {450, 1, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "SAMSUNG 3G", + "SAMSUNG 3G"}, + +/* "KT Freetel Co., Ltd" */ + {450, 2, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "KTF", "KTF"}, + +/* SK Telecom */ + {450, 5, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "SKT", "SK Telecom"}, + +/* "KT Freetel Co., Ltd" */ + {450, 8, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "KTF", "KTF"}, + +/***************** + **** Vietnam **** + *****************/ + +/* Vietnam Mobile Telecom Service */ + {452, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "VN MOBIFONE", + "Vietnam Mobile Telecom Service"}, + +/* Vietnam Telecoms Services Co (GPC) */ + {452, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "VN VINAPHONE", + "Vietnam Telecoms Services Co (GPC)"}, + +/* Vietel Corporation */ + {452, 4, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "VIETTEL", + "Viettel Mobile"}, + +/******************* + **** Hong Kong **** + *******************/ + +/* Hong Kong CSL Limited */ + {454, 0, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "CSL", + "Hong Kong CSL Limited"}, + +/* Hong Kong CSL Limited */ + {454, 0, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "CSL", + "Hong Kong CSL Limited"}, + +/* Hong Kong CSL Limited */ + {454, 0, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "CSL", "HK CSL"}, + +/* Hong Kong CSL Limited */ + {454, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "CSL", "HK CSL"}, + +/* Hong Kong CSL Limited */ + {454, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "CSL", "HK CSL"}, + +/* Hong Kong CSL Limited */ + {454, 2, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "CSL", + "Hong Kong CSL Limited"}, + +/* Hutchison Telecom (HK) Ltd */ + {454, 3, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "3", + "Hutchison Telecom (HK) Ltd"}, + +/* Hutchison Telecom (HK) Ltd */ + {454, 4, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "3 (2G)", + "Hutchison Telecom (HK) Ltd"}, + +/* Hutchison Telecom (HK) Ltd */ + {454, 4, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "3 (2G)", + "Hutchison Telecom (HK) Ltd"}, + +/* SmarTone Mobile Comms Ltd */ + {454, 6, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SmarToneVodafone", + "SmarTone Mobile Comms Ltd"}, + +/* SmarTone Mobile Comms Ltd */ + {454, 6, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "SmarToneVodafone", + "SmarTone Mobile Comms Ltd"}, + +/* New World PCS Ltd */ + {454, 10, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "NEW WORLD", + "New World PCS Ltd"}, + +/* Peoples Telephone Co Ltd */ + {454, 12, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "PEOPLES", + "Peoples Telephone Co Ltd"}, + +/* SmarTone Mobile Comms Ltd */ + {454, 15, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "454-15", + "SmarTone Mobile Comms Ltd"}, + +/* SUNDAY Communications Ltd */ + {454, 16, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "SUNDAY", + "SUNDAY Communications Ltd"}, + +/* Hong Kong CSL Limited */ + {454, 18, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "CSL", + "Hong Kong CSL Limited"}, + +/* Hong Kong CSL Limited */ + {454, 18, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "CSL", + "Hong Kong CSL Limited"}, + +/* Hong Kong CSL Limited */ + {454, 18, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "CSL", "HK CSL"}, + +/* PCCW Mobile */ + {454, 19, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "PCCW", "PCCW Mobile"}, + +/* P Plus Communicatoins Ltd */ + {454, 22, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "HK P PLUS", + "P Plus Communicatoins Ltd"}, + +/*************** + **** Macau **** + ***************/ + +/* SmarTone Mobile Communications (Macau) Ltd */ + {455, 0, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SmarTone", + "SmarTone Mobile Communications (Macau) Ltd"}, + +/* SmarTone Mobile Communications (Macau) Ltd */ + {455, 0, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "SmarTone", + "SmarTone Mobile Communications (Macau) Ltd"}, + +/* C.T.M. */ + {455, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "CTM", "C.T.M."}, + +/* C.T.M. */ + {455, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "CTM", "C.T.M."}, + +/* Hutchison Telephone (Macau) Company Limited */ + {455, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "HT Macau", + "Hutchison Telephone (Macau) Company Limited"}, + +/* Hutchison Telephone (Macau) Company Limited */ + {455, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "HT Macau", + "Hutchison Telephone (Macau) Company Limited"}, + +/****************** + **** Cambodia **** + ******************/ + +/* CamGSM */ + {456, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MOBITEL - KHM", + "CamGSM"}, + +/* Cambodia Samart Communication Co Ltd */ + {456, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "KHM-Hello GSM", + "Cambodia Samart Communication Co Ltd"}, + +/* Cambodia Shinawatra */ + {456, 18, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, + "CAMBODIA SHINAWATRA ", "Cambodia Shinawatra Co. Ltd"}, + +/************* + **** Lao **** + *************/ + +/* Lao Telecommunications */ + {457, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "LAO GSM", + "Lao Telecommunications"}, + +/* Enterprise of Telecommunications Lao (ETL) */ + {457, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "ETL MOBILE NETWORK", + "Enterprise of Telecommunications Lao (ETL)"}, + +/* Lao Asia Telecommunication State Enterprise (LAT) */ + {457, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "45703", + "Lao Asia Telecommunication State Enterprise (LAT)"}, + +/* Lao Asia Telecommunication State Enterprise (LAT) */ + {457, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "45703", + "Lao Asia Telecommunication State Enterprise (LAT)"}, + +/* Millicom Lao Co Ltd */ + {457, 8, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "TANGO LAO", + "Millicom Lao Co Ltd"}, + +/* Millicom Lao Co Ltd */ + {457, 8, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "TANGO LAO", + "Millicom Lao Co Ltd"}, + +/*************** + **** China **** + ***************/ + +/* China Mobile */ + {460, 0, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "CMCC", + "CHINA MOBILE"}, + +/* China Unicom */ + {460, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "CU-GSM", + "CHINA UNICOM GSM"}, + +/**************** + **** Taiwan **** + ****************/ + +/* Far EasTone Telecommunications GSM 900/1800 */ + {466, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "FarEasTone", + "Far EasTone Telecommunications GSM 900/1800"}, + +/* Far EasTone Telecommunications GSM 900/1800 */ + {466, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "FarEasTone", + "Far EasTone Telecommunications GSM 900/1800"}, + +/* KG Telecom */ + {466, 6, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "TWN Tuntex GSM 1800", + "KG Telecom"}, + +/*ACeS International Limited (AIL) */ + {466, 68, SETTING_PREFERRED_NETWORK_TYPE_GSM_SAT, "ACeS", + "ACeS International Limited (AIL)"}, + +/* KG Telecom */ + {466, 88, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "KGT-ONLINE", + "KG Telecom"}, + +/* Taiwan 3G Mobile Network */ + {466, 89, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "ViBo", + "Taiwan 3G Mobile Network"}, + +/* Chunghwa Telecom */ + {466, 92, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Chunghwa", + "Chunghwa Telecom"}, + +/* Chunghwa Telecom */ + {466, 92, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Chunghwa", + "Chunghwa Telecom"}, + +/* MobiTai */ + {466, 93, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MoBiTai", "MobiTai"}, + +/* Taiwan Cellular Corporation */ + {466, 97, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Taiwan Mobile", + "Taiwan Cellular Corporation"}, + +/* TransAsia Telecommunications */ + {466, 99, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "TransAsia Telecom", + "TransAsia Telecommunications"}, + +/******************** + **** **** + ********************/ + +/* Korea Posts and Telecommunications Corporation (KPTC) */ + {467, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SUNNET", "SUN NET"}, + +/* NEAT&T Ltd. */ + {467, 193, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "KP SUN", + "NEAT&T Ltd."}, + +/******************** + **** Bangladesh **** + ********************/ + +/* Grameen Phone Ltd */ + {470, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BGD-GP", + "Grameen Phone Ltd"}, + +/* TM International (Bangladesh) Ltd */ + {470, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BGD AKTEL", + "TM International (Bangladesh) Ltd"}, + +/* Sheba Telecom (Pvt.) Ltd. */ + {470, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Banglalink", + "Banglalink"}, + +/* Teletalk Bangladesh Ltd */ + {470, 4, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "bMobile", "Teletalk"}, + +/* Sheba Telecom (PVT) Ltd */ + {470, 19, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BD ShebaWorld", + "Sheba Telecom (PVT) Ltd"}, + +/****************** + **** Maldives **** + ******************/ + +/* Dhivehi Raajjeyge Gulhun Private Ltd GSM 900 */ + {472, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MV DHIMOBILE", + "Dhivehi Raajjeyge Gulhun Private Ltd GSM 900"}, + +/* Wataniya Telecom Maldives Pvt. Ltd */ + {472, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "WMOBILE", "WMOBILE"}, + +/****************** + **** Malaysia **** + ******************/ + +/* Maxis Communications Berhad */ + {502, 12, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MY MAXIS", + "Maxis Communications Berhad"}, + +/* Maxis Communications Berhad */ + {502, 12, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "MY MAXIS", + "Maxis Communications Berhad"}, + +/* Maxis Mobile Sdn Bhd */ + {502, 12, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "MY MAXIS", + "Maxis Mobile Sdn Bhd"}, + +/* Telekom Cellular Sdn Bhd */ + {502, 13, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "MY TMTOUCH", + "Telekom Cellular Sdn Bhd"}, + +/* Celcom (Malaysia) Sdn Bhd */ + {502, 13, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "CELCOM", + "Celcom Malaysia"}, + +/* DiGi Telecommunications Sdn Bhd */ + {502, 16, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "DiGi", + "DiGi Telecommunications Sdn Bhd"}, + +/* TIMECel Sdn Bhd */ + {502, 17, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "MY ADAM", + "TIMECel Sdn Bhd"}, + +/* Celcom (Malaysia) Sdn Bhd */ + {502, 19, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MY CELCOM", + "Celcom (Malaysia) Sdn Bhd"}, + +/******************* + **** Australia **** + *******************/ + +/* Telstra Mobile Comms */ + {505, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Telstra", + "Telstra Mobile Comms"}, + +/* Telstra Mobile Comms */ + {505, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Telstra", + "Telstra Mobile Comms"}, + +/* Singtel Optus Limited */ + {505, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "YES OPTUS", + "Singtel Optus Limited"}, + +/* Vodafone Pacific Limited */ + {505, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "vodafone AU", + "Vodafone Pacific Limited"}, + +/* Vodafone Pacific Limited */ + {505, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "vodafone AU", + "Vodafone Pacific Limited"}, + +/* Hutchison 3G Australia Pty Limited */ + {505, 6, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "3Telstra", + "Hutchison/Telstra 3G Australia Pty Limited"}, + +/* One.Tel Networks */ + {505, 8, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "One.Tel", + "One.Tel Networks"}, + +/******************* + **** Satellite **** + *******************/ + +/* ACeS International Limited (AIL) - INDONESIA */ + {510, 0, SETTING_PREFERRED_NETWORK_TYPE_GSM_SAT, "ACeS", + "ACeS International Limited (AIL) - INDONESIA"}, + +/******************* + **** Indonesia **** + *******************/ + +/* PT Indonesian Satellite Corporation Tbk (INDOSAT) */ + {510, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "IND INDOSAT", + "PT Indonesian Satellite Corporation Tbk (INDOSAT)"}, + +/* PT Indonesian Satellite Corporation Tbk (INDOSAT) */ + {510, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "IND INDOSAT", + "PT Indonesian Satellite Corporation Tbk (INDOSAT)"}, + +/* PT Natrindo Telepon Seluler */ + {510, 8, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "LIPPO TEL", + "PT Natrindo Telepon Seluler"}, + +/* PT Telekomunikasi Selular */ + {510, 10, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "IND TELKOMSEL", + "PT Telekomunikasi Selular"}, + +/* PT Telekomunikasi Selular */ + {510, 10, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "IND TELKOMSEL", + "PT Telekomunikasi Selular"}, + +/* Excelcom */ + {510, 11, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "IND - Excelcom", + "Excelcom"}, + +/* Excelcom */ + {510, 11, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "IND - Excelcom", + "Excelcom"}, + +/* PT Indonesian Satellite Corporation Tbk (INDOSAT) */ + {510, 21, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "IND IM3", + "PT Indonesian Satellite Corporation Tbk (INDOSAT)"}, + +/* PT Indonesian Satellite Corporation Tbk (INDOSAT) */ + {510, 21, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "IND INDOSAT", + "PT Indonesian Satellite Corporation Tbk (INDOSAT)"}, + +/* PT Indonesian Satellite Corporation Tbk (INDOSAT) */ + {510, 21, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "IND INDOSAT", + "PT Indonesian Satellite Corporation Tbk (INDOSAT)"}, + +/* PT Hutchison CP Telecommunications */ + {510, 89, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "3", "3"}, + +/* PT Hutchison CP Telecommunications */ + {510, 89, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "3", "3"}, + +/******************** + **** TLS **** + ********************/ + +/* Timor Telecom. */ + {514, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "TLS-TT", + "Timor Telecom"}, + +/******************** + **** Philipines **** + ********************/ + +/* Isla Comms Co. Inc. */ + {515, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "ISLACOM", + "Isla Comms Co. Inc."}, + +/* Globe Telecom, GMCR Inc. */ + {515, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Globe Telecom-PH", + "Globe Telecom, GMCR Inc."}, + +/* Globe Telecom, GMCR Inc. */ + {515, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Globe Telecom-PH", + "Globe Telecom, GMCR Inc."}, + +/* Smart Communications Inc. */ + {515, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SMART", + "Smart Communications Inc."}, + +/* Smart Communications Inc. */ + {515, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "SMART", + "Smart Communications Inc."}, + +/* Digital Telecommunications Phils, Inc */ + {515, 5, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "PH Sun Cellular", + "Digital Telecommunications Phils, Inc"}, + +/******************* + **** Satellite **** + *******************/ + +/* ACeS International Limited (AIL) - PHILIPPINES */ + {515, 11, SETTING_PREFERRED_NETWORK_TYPE_GSM_SAT, "ACeS", + "ACeS International Limited (AIL) - PHILIPPINES"}, + +/****************** + **** Thailand **** + ******************/ + +/* Advanced Info Service Plc */ + {520, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "TH GSM", + "Advanced Info Service Plc"}, + +/* Wireless Comm. Services Co. */ + {520, 10, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "TH WCS", + "Wireless Comm. Services Co."}, + +/* ACT Mobile Company, Limited */ + {520, 15, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "TH ACT 1900", + "ACT Mobile Company, Limited"}, + +/* Total Access Comms Co. */ + {520, 18, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "TH-DTAC", + "Total Access Comms Co."}, + +/* ACeS International Limited (AIL) - THAILAND */ + {520, 20, SETTING_PREFERRED_NETWORK_TYPE_GSM_SAT, "ACeS", + "ACeS International Limited (AIL) - THAILAND"}, + +/* Digital Phone Co Ltd */ + {520, 23, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "TH GSM 1800", + "Digital Phone Co Ltd"}, + +/* TA Orange Company Ltd */ + {520, 99, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Orange Th", + "TA Orange Company Ltd"}, + +/******************* + **** Singapore **** + *******************/ + +/* Singapore Telecom Mobile Pte Ltd */ + {525, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SingTel", + "Singapore Telecom Mobile Pte Ltd"}, + +/* Singapore Telecom Mobile Pte Ltd */ + {525, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "SingTel", + "Singapore Telecom Mobile Pte Ltd"}, + +/* Singapore Telecom GSM 1800 */ + {525, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "SingTel-G18", + "Singapore Telecom Mobile Pte Ltd"}, + +/* MobileOne (Asia) Pte Ltd */ + {525, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SGP-M1-3GSM", + "MobileOne (Asia) Pte Ltd"}, + +/* MobileOne (Asia) Pte Ltd */ + {525, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "SGP-M1-3GSM", + "MobileOne (Asia) Pte Ltd"}, + +/* MobileOne (Asia) Pte Ltd */ + {525, 3, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "SGP-M1-3GSM", + "MobileOne (Asia) Pte Ltd"}, + +/* StarHub Mobile Pte Ltd */ + {525, 5, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "STARHUB", + "StarHub Mobile Pte Ltd"}, + +/* StarHub Mobile Pte Ltd */ + {525, 5, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "STARHUB", + "StarHub Mobile Pte Ltd"}, + +/**************** + **** Brunei **** + ****************/ + +/* B-Mobile Communications Sdn Bhd */ + {528, 2, SETTING_PREFERRED_NETWORK_TYPE_UMTS, "b-mobile", "b-mobile"}, + +/* DataStream Technology */ + {528, 11, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BRU-DSTCom", + "DataStream Technology"}, + +/********************* + **** New Zealand **** + *********************/ + +/* Vodafone Mobile NZ Limited */ + {530, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "vodafone NZ", + "Vodafone Mobile NZ Limited"}, + +/********************* + **** PNG **** + *********************/ + +/* Pacific Mobile Communications */ + {537, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "PNGBMobile", + "Pacific Mobile Communications"}, + +/*************** + **** Tonga **** + ***************/ + +/* Tonga Communications Corporation */ + {539, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "U-CALL", + "Tonga Communications Corporation"}, + +/*************** + **** **** + ***************/ + +/* Solomon Telekom Co Ltd */ + {540, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BREEZE", "BREEZE"}, + +/******************* + **** Satellite **** + *******************/ + +/* ACeS International Limited (AIL) - REGIONAL */ + {541, 0, SETTING_PREFERRED_NETWORK_TYPE_GSM_SAT, "ACeS", + "ACeS International Limited (AIL) - REGIONAL"}, + +/***************** + **** Vanuatu **** + *****************/ + +/* Telecom Vanuatu Ltd */ + {541, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "VUT SMILE", + "Telecom Vanuatu Ltd"}, + +/************** + **** Fiji **** + **************/ + +/* Vodafone Fiji Limited */ + {542, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "FJ VODAFONE", + "Vodafone Fiji Limited"}, + +/************************ + **** American Samoa **** + ************************/ + +/* Blue Sky */ + {544, 11, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Blue Sky", + "Blue Sky"}, + +/************** + **** KI **** + **************/ + +/* Telecom Services Kiribati Limited (TSKL) */ + {545, 9, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "KL-Frigate", + "Telecom Services Kiribati Limited (TSKL)"}, + +/*********************** + **** New Caledonia **** + ***********************/ + +/* OPT New Caledonia */ + {546, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "NCL MOBILIS", + "OPT New Caledonia"}, + +/************************** + **** French Polynesia **** + **************************/ + +/* Tikiphone S.A */ + {547, 20, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "F-VINI", + "Tikiphone S.A"}, + +/******************** + **** Cook Islands **** + ********************/ + +/* Telecom Cook Islands */ + {548, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "KOKANET", + "Telecom Cook Islands"}, + +/******************** + **** Micronesia **** + ********************/ + +/* FSM Telecommunications Corporation */ + {550, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "FSM Telecom", + "FSM Telecommunications Corporation"}, + +/*************** + **** Palau **** + ***************/ + +/* Palau Mobile Corporation */ + {552, 80, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "PLWPMC", + "Palau Mobile"}, + +/*************** + **** Egypt **** + ***************/ + +/* The Egyptian Company for Mobile Services */ + {602, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "EGY MobiNiL", + "The Egyptian Company for Mobile Services"}, + +/* Vodafone Egypt Telecommunications S.A.E */ + {602, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "vodafone EG", + "Vodafone Egypt Telecommunications S.A.E"}, + +/***************** + **** Algeria **** + *****************/ + +/* Algerie Telecom */ + {603, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, + "ALGERIAN MOBILE NETWORK", "Algerie Telecom"}, + +/* Orascom Telecom Algerie Spa */ + {603, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Djezzy", + "Orascom Telecom Algerie Spa"}, + +/* Orascom Telecom Algerie Spa */ + {603, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Djezzy", + "Orascom Telecom Algerie Spa"}, + +/* Wataniya Telecom Algerie */ + {603, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "NEDJMA", "Nedjma"}, + +/* Wataniya Telecom Algerie */ + {603, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "NEDJMA", "Nedjma"}, + +/***************** + **** Morocco **** + *****************/ + +/* Medi Telecom */ + {604, 0, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MOR MEDITEL", + "Medi Telecom"}, + +/* Itissalat Al-Maghrib S.A */ + {604, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MOR IAM", "IAM"}, + +/***************** + **** Tunisia **** + *****************/ + +/* Tunisie Telecom */ + {605, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "TUNISIE TELECOM", + "Tunisie Telecom"}, + +/* Orascom Telecom Tunisie */ + {605, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "TUNISIANA", + "Orascom Telecom Tunisie"}, + +/* Libyana Mobile Phone */ + {606, 0, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "LIBYANA", + "Libyana Mobile Phone "}, + +/* AL MADAR Telecomm Company */ + {606, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "606 01", "606 - 01"}, + +/**************** + **** Gambia **** + ****************/ + +/* Gambia Telecommunications Cellular Company Ltd */ + {607, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "GAMCEL", + "Gambia Telecommunications Cellular Company Ltd"}, + +/* Africell (Gambia) Ltd */ + {607, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "AFRICELL", + "Africell (Gambia) Ltd"}, + +/***************** + **** Senegal **** + *****************/ + +/* Sonatel */ + {608, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SN ALIZE", "Sonatel"}, + +/* Sentel GSM */ + {608, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SN-SENTEL SG", + "Sentel GSM"}, + +/***************** + **** Maurital **** + *****************/ + +/* MATTEL */ + {609, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MR MATTEL", "MATTEL"}, + +/* MAURITEL MOBILES */ + {609, 10, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MAURITEL", + "MAURITEL"}, + +/************** + **** Mali **** + **************/ + +/* Malitel-SA */ + {610, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MALITEL ML", + "Malitel-SA"}, + +/* IKATEL SA */ + {610, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "IKATEL ML", + "IKATEL SA"}, + +/**************** + **** Guinea **** + ****************/ + +/* Spacetel Guinee SA */ + {611, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Mobilis", + "Spacetel Guinee SA"}, + +/* Sotelgui SA */ + {611, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "GN LAGUI", + "Sotelgui SA"}, + +/* Areeba Guinea */ + {611, 4, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Areeba", "Areeba"}, + +/* Areeba Guinea */ + {611, 4, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Areeba", "Areeba"}, + +/*********************** + **** Cote d'Ivoire **** + ***********************/ + +/* CORA de COMSTAR */ + {612, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "CI CORA", + "CORA de COMSTAR"}, + +/* Atlantique Cellulaire */ + {612, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "ACELL-CI", "A-Cell"}, + +/* Atlantique Cellulaire */ + {612, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "ACELL-CI", "A-Cell"}, + +/* S.I.M. */ + {612, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Orange CI", + "Orange CI"}, + +/* Loteny Telecom (SA) */ + {612, 5, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "TELECEL-CI", + "Loteny Telecom (SA)"}, + +/********************** + **** Burkina Faso **** + **********************/ + +/* Onatel */ + {613, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Onatel", "Onatel"}, + +/* Celtel Burkina Faso */ + {613, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BF CELTEL", + "Celtel Burkina Faso"}, + +/*************** + **** Niger **** + ***************/ + +/* Sahel-Com */ + {614, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SAHELCOM", + "SahelCom"}, + +/* Celtel Niger */ + {614, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "NE CELTEL", + "Celtel Niger"}, + +/* Telecel Niger SA */ + {614, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "NE TELECEL", + "Telecel Niger SA"}, + +/************** + **** Togo **** + **************/ + +/* Togo Cellulaire */ + {615, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "TG-TOGO CELL", + "Togo Telecom"}, + +/*************** + **** Benin **** + ***************/ + +/* LIBERCOM */ + {616, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "LIBERCOM", + "LIBERCOM"}, + +/* Telecel Benin Ltd */ + {616, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "TELECEL BENIN", + "Telecel Benin Ltd"}, + +/* Spacetel-Benin */ + {616, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BJ BENINCELL", + "Spacetel-Benin"}, + +/* Bell Benin Communications (BBCOM) */ + {616, 4, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, + "BELL BENIN COMMUNICATION", "Bell Benin Communications (BBCOM)"}, + +/* Bell Benin Communications (BBCOM) */ + {616, 4, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, + "BELL BENIN COMMUNICATION", "Bell Benin Communications (BBCOM)"}, + +/******************* + **** Mauritius **** + *******************/ + +/* Cellplus Mobile Comms */ + {617, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "CELLPLUS-MRU", + "Cellplus Mobile Comms"}, + +/* Emtel Ltd */ + {617, 10, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "EMTEL-MRU", + "Emtel Ltd"}, + +/***************** + **** Liberia **** + *****************/ + +/* Lonestar Communications Corporation */ + {618, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "LBR Lonestar Cell", + "Lonestar Communications Corporation"}, + +/* Atlantic Wireless (Liberia) Inc. */ + {618, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "LIBERCEL", + "LIBERCELL"}, + +/* "Celcom Telecommunications, Inc" */ + {618, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Celcom", + "Celcom Telecommunications"}, + +/* "Celcom Telecommunications, Inc" */ + {618, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Celcom", + "Celcom Telecommunications"}, + +/**************** + **** SL **** + ****************/ + +/* Celtel (SL) Limited */ + {619, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "CELTEL SL", + "Celtel (SL) Limited"}, + +/* Celtel (SL) Limited */ + {619, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MILLICOM SL", + "Millicom SL"}, + +/*************** + **** Ghana **** + ***************/ + +/* ScanCom Ltd */ + {620, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "GH SPACEFON", + "ScanCom Ltd"}, + +/* Ghana Telecommunications Company Ltd */ + {620, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "GH ONEtouch", + "Ghana Telecommunications Company Ltd"}, + +/* Millicom Ghana Limited */ + {620, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "GH-MOBITEL", + "Millicom Ghana Limited"}, + +/***************** + **** Nigeria **** + *****************/ + +/* Econet Wireless Nigeria Ltd */ + {621, 20, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "ECONET NG", + "Econet Wireless Nigeria Ltd"}, + +/* Econet Wireless Nigeria Ltd */ + {621, 20, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "ECONET NG", + "Econet Wireless Nigeria Ltd"}, + +/* MTN Nigeria Communications Limited */ + {621, 30, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MTN - NG", + "MTN Nigeria Communications Limited"}, + +/* MTN Nigeria Communications Limited */ + {621, 30, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "MTN - NG", + "MTN Nigeria Communications Limited"}, + +/* Nigerian Telecommunications Limited (NITEL) */ + {621, 40, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "NG Mtel", + "Nigerian Telecommunications Limited (NITEL)"}, + +/* Nigerian Telecommunications Limited (NITEL) */ + {621, 40, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "NG Mtel", + "Nigerian Telecommunications Limited (NITEL)"}, + +/* Globacom Ltd. */ + {621, 50, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Glo NG", + "Globacom Ltd."}, + +/* Globacom Ltd. */ + {621, 50, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Glo NG", + "Globacom Ltd."}, + +/************** + **** Chad **** + **************/ + +/* CelTel Tchad SA */ + {622, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "CELTEL TCD", + "CelTel Tchad SA"}, + +/* Tchad Mobile SA */ + {622, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "TD LIBERTIS", + "Tchad Mobile SA"}, + +/****************** + **** Cameroon **** + ******************/ + +/* MTN Cameroon Ltd */ + {624, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MTN CAM", + "MTN Cameroon Ltd"}, + +/* Orange Cameroun S.A. */ + {624, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Orange CAM", + "Orange Cameroun S.A."}, + +/******************** + **** Cabo Verde **** + ********************/ + +/* Cabo Verde Telecom */ + {625, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "CPV MOVEL", + "Cabo Verde Telecom"}, + +/******************** + **** STP **** + ********************/ + +/* Companhia Santomense de Telecomunicacoes SARL */ + {626, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "STP CSTmovel", + "Companhia Santomense de Telecomunicacoes SARL"}, + +/******************** + **** GNQ **** + ********************/ + +/* GETESA */ + {627, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "GNQ01", "GETESA"}, + +/*************** + **** Gabon **** + ***************/ + +/* Libertis S.A. */ + {628, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "LIBERTIS", + "Libertis S.A."}, + +/* Telecel Gabon SA */ + {628, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "GAB TELECEL", + "Telecel Gabon SA"}, + +/* Celtel Gabon SA */ + {628, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "CELTEL GA", + "Celtel Gabon SA"}, + +/*************** + **** Congo **** + ***************/ + +/* CelTel Congo SA */ + {629, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "CELTEL CD", + "CelTel Congo SA"}, + +/* Libertis Telecom */ + {629, 10, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "COG LIBERTIS", + "Libertis Telecom"}, + +/* Vodacom Congo (RDC) sprl */ + {630, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "VODACOM CD", + "Vodacom Congo (RDC) sprl"}, + +/* Vodacom Congo (RDC) sprl */ + {630, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "VODACOM CD", + "Vodacom Congo (RDC) sprl"}, + +/* CelTel Congo SA */ + {630, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "CELTEL RC", + "CelTel Congo SA"}, + +/* CELLCO Sarl */ + {630, 4, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "CELLCO GSM", + "CELLCO Sarl"}, + +/* Supercell Sprl */ + {630, 5, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SCELL", + "Supercell Sprl"}, + +/* Supercell Sprl */ + {630, 5, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "SCELL", + "Supercell Sprl"}, + +/* SAIT Telecom SPRL */ + {630, 89, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "CD OASIS", + "SAIT Telecom SPRL"}, + +/***************** + **** Somalia **** + *****************/ + +/* UNITEL S.a.r.l. */ + {631, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "UNITEL", + "UNITEL S.a.r.l."}, + +/* Telsom Mobile Somalia */ + {631, 82, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "telsom", + "Telsom Mobile Somalia"}, + +/******************** + **** Seychelles **** + ********************/ + +/* Cable & Wireless (Seychelles) Ltd */ + {633, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SEYCEL", + "Cable & Wireless (Seychelles) Ltd"}, + +/* UNITEL S.a.r.l. */ + {631, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "UNITEL", "UNITEL"}, + +/* Telecom (Seychelles Limited) */ + {633, 10, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SEZ AIRTEL", + "Telecom (Seychelles Limited)"}, + +/* Guinetel */ + {632, 7, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "GTM", "Guinetel"}, + +/* Cable & Wireless (Seychelles) */ + {633, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "C&W SEY", + "CABLE & WIRELESS"}, + +/* Telecom (Seychelles) Ltd */ + {633, 10, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "AIRTEL", "AIRTEL"}, + +/*************** + **** Sudan **** + ***************/ + +/* Mobitel */ + {634, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MobiTel SDN", + "Mobitel"}, + +/* Bashair Telecom Co.Ltd */ + {634, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "areeba", "Areeba"}, + +/* Bashair Telecom Co.Ltd */ + {634, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "areeba", "Areeba"}, + +/**************** + **** Rwanda **** + ****************/ + +/* Rwandacell SARL */ + {635, 10, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "R-CELL", + "Rwandacell SARL"}, + +/****************** + **** Ethiopia **** + ******************/ + +/* Ethiopian Telecoms Auth. */ + {636, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "ETH-MTN", + "Ethiopian Telecoms Auth."}, + +/****************** + **** Somalia **** + ******************/ + +/* Telesom Company */ + {637, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SOMTELESOM", + "Telesom Company"}, + +/* Somafone FZLLC */ + {637, 4, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SOMAFONE", + "SOMAFONE"}, + +/* Somafone FZLLC */ + {637, 4, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "SOMAFONE", + "SOMAFONE"}, + +/* Golis Telecommunications Company Ltd */ + {637, 30, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Golis", "Golis"}, + +/* Telsom Mobile Somalia*/ + {637, 82, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Telsom Mobile", + "Telsom Mobile Somalia"}, + +/****************** + **** DJ **** + ******************/ + +/* Djibouti Telecom SA */ + {638, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "DJ EVATIS", + "Djibouti Telecom SA"}, + +/*************** + **** Kenya **** + ***************/ + +/* Safaricom Limited */ + {639, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Safaricom", + "Safaricom Limited"}, + +/* Kencell Communications Ltd */ + {639, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "YES!", + "Kencell Communications Ltd"}, + +/****************** + **** Tanzania **** + ******************/ + +/* Tritel (T) Ltd */ + {640, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "TRITEL-TZ", + "Tritel (T) Ltd"}, + +/* MIC Tanzania Ltd */ + {640, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MOBITEL - TZ", + "MIC Tanzania Ltd"}, + +/* MIC Tanzania Limited */ + {640, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "MOBITEL", "MOBITEL"}, + +/* Zanzibar Telecom */ + {640, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "ZANTEL-TZ", + "Zanzibar Telecom"}, + +/* Zanzibar Telecom */ + {640, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "ZANTEL-TZ", + "Zanzibar Telecom"}, + +/* Vodacom Tanzania Ltd */ + {640, 4, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "VodaCom", + "Vodacom Tanzania Ltd"}, + +/* Vodacom Tanzania Ltd */ + {640, 4, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "VodaCom", + "Vodacom Tanzania Ltd"}, + +/* Celtel Tanzania Limited */ + {640, 5, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "CELTEL TZ", + "Celtel Tanzania Limited"}, + +/* Celtel Tanzania Limited */ + {640, 5, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "CELTEL TZ", + "Celtel Tanzania Limited"}, + +/* Celtel Tanzania Limited ****** +{ 640, 5, TAPI_NETW_TYPE_GSM_400, "celtel", "celtel" }, *****/ + +/**************** + **** Uganda **** + ****************/ + +/* Clovergem Celtel */ + {641, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "UG CelTel", + "Clovergem Celtel"}, + +/* MTN Uganda Ltd */ + {641, 10, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MTN-UGANDA", + "MTN Uganda Ltd"}, + +/* MTN Uganda Ltd */ + {641, 10, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "MTN-UGANDA", + "MTN Uganda Ltd"}, + +/* Uganda Telecom Ltd */ + {641, 11, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "mango", + "Uganda Telecom Ltd"}, + +/***************** + **** Burundi **** + *****************/ + +/* Spacetel - Burundi */ + {642, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Spacetel BI", + "Spacetel - Burundi"}, + +/* Africell PLC Company */ + {642, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BUSAFA", + "Africell PLC Company"}, + +/* ONATEL */ + {642, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "ONATEL", "ONATEL "}, + +/* Telecel-Burundi Company */ + {642, 82, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BDITL", + "Telecel-Burundi Company"}, + +/******************** + **** Mozambique **** + ********************/ + +/* Mocambique Celular Ltd (mCel) */ + {643, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MOZ - mCel", + "Mocambique Celular Ltd (mCel)"}, + +/* Mocambique Celular Ltd (mCel) */ + {643, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "MOZ - mCel", + "Mocambique Celular Ltd (mCel)"}, + +/* VM, S.A.R.L. */ + {643, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "VodaCom-MZ", + "VM, S.A.R.L."}, + +/* VM, S.A.R.L. */ + {643, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "VodaCom-MZ", + "VM, S.A.R.L."}, + +/**************** + **** Zambia **** + ****************/ + +/* Celtel Zambia */ + {645, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "ZM CELTEL", + "Celtel Zambia"}, + +/* Telecel Zambia Limited */ + {645, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Telecel", + "Telecel Zambia Limited"}, + +/******************** + **** Madagascar **** + ********************/ + +/* Madacom SA */ + {646, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MG Madacom", + "Madacom SA"}, + +/* Orange Madagascar S.A. */ + {646, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MG ANTARIS", + "Orange Madagascar S.A."}, + +/********************** + **** Reunion (La) **** + **********************/ + +/* Orange Reunion */ + {647, 0, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Orange re", + "Orange Reunion"}, + +/* Orange Reunion */ + {647, 0, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Orange re", + "Orange Reunion"}, + +/* Outremer Telecom */ + {647, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "F-OMT", + "Outremer Telecom"}, + +/* Societe Reunionnaise */ + {647, 10, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SFR REUNION", + "Societe Reunionnaise"}, + +/****************** + **** Zimbabwe **** + ******************/ + +/* Net*One Cellular (Pvt) Ltd */ + {648, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "ZW NET*ONE", + "Net*One Cellular (Pvt) Ltd"}, + +/* Telecel Zimbabwe (PVT) Ltd */ + {648, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "TELECEL ZW", + "Telecel Zimbabwe (PVT) Ltd"}, + +/* Econet Wireless (Private) Limited */ + {648, 4, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "ZW ECONET", + "Econet Wireless (Private) Limited"}, + +/***************** + **** Namibia **** + *****************/ + +/* MTC */ + {649, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MTC NAMIBIA", "MTC"}, + +/**************** + **** Malawi **** + ****************/ + +/* Telekom Network Ltd */ + {650, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "MW CP 900", + "Telekom Network Ltd"}, + +/* CelTel Limited */ + {650, 10, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "CELTEL MW", + "CelTel Limited"}, + +/***************** + **** Lesotho **** + *****************/ + +/* Vodacom Lesotho (Pty) Ltd */ + {651, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "VCL COMMS", + "Vodacom Lesotho (Pty) Ltd"}, + +/* Econet Ezi Cel Lesotho (Pty) */ + {651, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "LS-ECONET-EZI-CEL", + "Econet Ezi Cel Lesotho (Pty)"}, + +/****************** + **** Botswana **** + ******************/ + +/* Mascom Wireless (Pty) Limited */ + {652, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "BW MASCOM", + "Mascom Wireless (Pty) Limited"}, + +/* Orange (Botswana) Pty Limited */ + {652, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Orange", + "Orange (Botswana) Pty Limited"}, + +/******************* + **** Swaziland **** + *******************/ + +/* Swazi MTN Limited */ + {653, 10, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Swazi-MTN", + "Swazi MTN Limited"}, + +/* Societe Nationale des Telecommunications (Comores Telecom) */ + {654, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "HURI", "HURI"}, + +/********************** + **** South Africa **** + **********************/ + +/* request from vodacom (south africa) 7 Jan 2005 */ + +/* Vodacom (Pty) Ltd */ + {655, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "RSA Vodacom", + "Vodacom (Pty) Ltd"}, + +/* Cell C (Pty) Ltd */ + {655, 7, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "RSA Cell C", + "Cell C (Pty) Ltd"}, + +/* MTN - Mobile Telephone Networks (Pty) Ltd. */ + {655, 10, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "RSA MTN", + "MTN - Mobile Telephone Networks (Pty) Ltd."}, + +/********************* + **** **** + *********************/ + +/* Belize Telecommunications Ltd */ + {702, 67, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "BTL", + "Belize Telecommunications Ltd"}, + +/* International Telecommunication Limited (INTELCO) */ + {702, 68, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "INTELCO", + "International Telecommunication Limited (INTELCO)"}, + +/********************* + **** Guatemala **** + *********************/ + +/* SERCOM S.A. (Guatemala) */ + {704, 1, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "PCS", + "SERCOM S.A. (Guatemala)"}, + +/* COMCEL-Communicaciones Celulares Sociedad Anonima */ + {704, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "COMCEL", + "COMCEL GUATEMALA"}, + +/* "Telefonica Moviles Guatamala, SA" */ + {704, 3, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "movistar", + "Telefonica"}, + +/********************* + **** El Salvador **** + *********************/ + +/* CTE Telecom Personal SA de CV */ + {706, 1, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "ESV PERSONAL", + "CTE Telecom Personal SA de CV"}, + +/* DIGICEL, S.A. de C.V. */ + {706, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "Digicel", + "DIGICEL, S.A. de C.V."}, +#ifdef FEATURE_SAMSUNG_BAND_GSM_850 + +/* Telemovil EL Salvador S.A */ + {706, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "ESTELEMOVIL", + "Telemovil EL Salvador S.A"}, +#endif /* FEATURE_SAMSUNG_BAND_GSM_850 */ + +/* "Telefonica Moviles El Salvador, S.A de c.v" */ + {706, 4, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "movistar", + "Telefonica"}, + +/* PERSONAL */ + {706, 10, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "PERSONAL", "PERSONAL"}, /* M625000000623 */ + +/********************* + **** ************ **** + *********************/ + +/* Megatel S.A. de C.V. */ + {708, 1, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "MEGATEL", + "Megatel S.A. de C.V."}, + +/* Telefonica Celular S.A (CELTEL) */ + {708, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "CELTELHND", + "Telefonica Celular S.A (CELTEL)"}, + +/* Empresa Hondurena de Telecomunicaciones HONDUTEL */ + {708, 30, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "HT - 200", + "Empresa Hondurena de Telecomunicaciones "}, + +/********************* + **** Nicaragua **** + *********************/ + +/* Empresa Nicaraguense de Telecomunicaciones S.A. - ENITEL */ + {710, 21, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "ENITEL", "ENITEL"}, + +/* SERCOM S.A. (Nicaragua) */ + {710, 730, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "SERCOM", + "SERCOM S.A. (Nicaragua)"}, + +/********************* + **** ************ **** + *********************/ + +/* Belize Telecommunications Ltd */ + {712, 1, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "I.C.E. ", + "I.C.E. (Instituto Costarricense de Electricidad)"}, + +/* I.C.E. (Instituto Costarricense de Electricidad) */ + {712, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "I.C.E.", "I.C.E. "}, + +/********************* + **** Panama **** + *********************/ +#ifdef FEATURE_SAMSUNG_BAND_GSM_850 + +/* Cable & Wireless Panama */ + {714, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "PANCW", + "Cable & Wireless Panama"}, + +/* "TELEFONICA MOVILES PANAMA, S.A." */ + {714, 20, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "movistar", + "Movistar"}, +#endif /* FEATURE_SAMSUNG_BAND_GSM_850 */ + +/************** + **** Peru **** + **************/ + +/* Telefonica Moviles S.A. */ + {716, 6, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "movistar", + "Movistar Peru"}, + +/* TIM Peru S.A.C. */ + {716, 10, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "TIM", + "TIM Peru S.A.C."}, + +/******************* + **** Argentina **** + *******************/ + +/* UNIFON */ + {722, 7, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "UNIFON", "UNIFON"}, + +/* Telecom Personal S.A. */ + {722, 34, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "AR PERSONAL", + "Telecom Personal S.A."}, + +/* PORT-HABLE */ + {722, 35, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "PORT-HABLE", + "PORT-HABLE"}, + +/* CTI PCS S.A. */ + {722, 310, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "ARG CTI Movil", + "CTI PCS S.A."}, +#ifdef FEATURE_SAMSUNG_BAND_GSM_850 + +/* CTI Compania de Telefonos del Interior S.A. */ + {722, 310, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "ARG CTI Movil", + "CTI Compania de Telefonos del Interior S.A."}, +#endif /* FEATURE_SAMSUNG_BAND_GSM_850 */ + +/*************** + **** Brasil **** + ***************/ + +/* TIM Celular S.A. */ + {724, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "TIM", "TIM BRASIL"}, + +/* TIM Celular S.A. */ + {724, 3, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "TIM", "TIM BRASIL"}, + +/* TIM Celular S.A. */ + {724, 4, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "TIM", "TIM BRASIL"}, + +/* Albra Telecommunicacoes Ltda */ + {724, 5, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Claro", "Claro"}, + +/* Americel S.A. */ + {724, 5, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Claro", "Claro"}, + +/* ATL - Algar Telecom Leste S.A. */ + {724, 5, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Claro", + "Claro - ATL"}, + +/* BCP SA */ + {724, 5, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Claro", "Claro "}, + +/* BSE SA */ + {724, 5, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Claro", "Claro"}, + +/* Stemar Telecommunicacoes Ltda */ + {724, 5, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Claro", "Claro"}, + +/* Telet S.A. */ + {724, 5, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Claro", "Claro"}, + +/* Tess S.A. */ + {724, 5, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Claro", "Claro"}, + +/* Sercomtel Celular S/A */ + {724, 15, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SCTL", "SERCOMTEL"}, + +/* Sercomtel Celular S/A */ + {724, 15, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "SCTL", "SERCOMTEL"}, + +/* 14 Brasil Telecom Celular S.A */ + {724, 16, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "BrTCel", + "Brasil Telecom Celular "}, + +/* Telemig Celular S/A */ + {724, 23, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "TELEMIGC", + "Telemig Celular S/A"}, + +/* Telemig Celular S/A */ + {724, 23, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "TELEMIGC", + "Telemig Celular S/A"}, + +/* Amazonia Celular S/A */ + {724, 24, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "AMAZONIA", + "Amazonia Celular S/A"}, + +/* Amazonia Celular S/A */ + {724, 24, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "AMAZONIA", + "Amazonia Celular S/A"}, + +/* TNL PCS S.A. */ + {724, 31, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "Oi", + "TNL PCS S.A."}, + +/* Triangulo Celular S.A */ + {724, 32, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "CTBC", + "CTBC Cellular"}, + +/* Triangulo Celular S.A */ + {724, 32, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "CTBC", + "CTBC Cellular"}, + +/* Triangulo Celular S.A */ + {724, 33, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "CTBC", + "CTBC Cellular"}, + +/* Triangulo Celular S.A */ + {724, 33, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "CTBC", + "CTBC Cellular"}, + +/* Triangulo Celular S.A */ + {724, 34, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "CTBC", + "CTBC Cellular"}, + +/* Triangulo Celular S.A */ + {724, 34, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "CTBC", + "CTBC Cellular"}, + +/*************** + **** Chile **** + ***************/ + +/* Entel Telefonia Movil S.A */ + {730, 1, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "CL ENTEL PCS", + "Entel Telefonia Movil S.A"}, + +/* Telefonica Movil de Chile */ + {730, 2, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "TELEFONICA", + "Telefonica Movil de Chile"}, + +/* Smartcom S.A. */ + {730, 3, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "SMARTCOM", + "Smartcom"}, + +/* Entel PCS Telecomunicaciones S.A */ + {730, 10, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "CL ENTEL PCS", + "Entel PCS Telecomunicaciones S.A"}, + +/***************** + **** Colombia **** + *****************/ +#ifdef FEATURE_SAMSUNG_BAND_GSM_850 + +/* Occidente y Caribe Celular SA Occel SA */ + {732, 101, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, + "COLOMBIA - COMCEL S.A", "Occidente y Caribe Celular SA Occel SA"}, +#endif /* FEATURE_SAMSUNG_BAND_GSM_850 */ + +/* Comunicacion Celular SA Comcel SA */ + {732, 101, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "COMCEL", + "Comunicacion Celular SA Comcel SA"}, + +/* Colombia Movil SA */ + {732, 103, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "COL MOVIL", + "Colombia Movil SA"}, + +/* Colombia Movil SA */ + {732, 111, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "OLA", + "Colombia Movil SA"}, + +/* Colombia Telecomunicaciones S.A. ESP */ + {732, 111, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "OLA", + "Colombia Telecomunicaciones S.A. ESP"}, + +/* Telefonica Moviles Colombia S.A. */ + {732, 123, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "COL_TEMC", + "movistar"}, + +/* Telefonica Moviles Colombia S.A. */ + {732, 123, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "COL_TEMC", + "movistar"}, + +/******************* + **** Venezuela **** + *******************/ + +/* Infonet, Redes De Informacion C.A */ + {734, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "VZ INFO", + "Infonet, Redes De Informacion C.A"}, + +/* Corporacion Digitel C.A */ + {734, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "DIGITEL TIM", + "Corporacion Digitel C.A"}, + +/***************** + **** Bolivia **** + *****************/ + +/* Nuevatel PCS De Bolivia SA */ + {736, 1, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "VIVA", + "Nuevatel PCS De Bolivia SA"}, + +/* Entel SA */ + {736, 2, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "BOMOV", "Entel SA"}, + +/* Telefonica Celular De Bolivia S.A. */ + {736, 3, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "Telecel", + "TELECEL BOLIVIA"}, + +/************** + **** **** + **************/ + +/* Cel*Star Guyana Inc */ + {738, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "TWTGUY", + "Cel*Star Guyana Inc"}, + +/* Guyana Telephone & Telegraph Co. */ + {738, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "CLNK PLS", + "Cellink Plus"}, + +/************** + **** ECU **** + **************/ +#ifdef FEATURE_SAMSUNG_BAND_GSM_850 + +/* OTECEL S.A. */ + {740, 0, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "movistar", + "MOVISTAR"}, + +/* Conecel S.A. (Consorcio Ecuatoriano de Telecomunicaciones S.A.) */ + {740, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "PORTAGSM", + "Conecel S.A. (Consorcio Ecuatoriano de Telecomunicaciones S.A.)"}, +#endif /* FEATURE_SAMSUNG_BAND_GSM_850 */ + +/****************** + **** Paraguay **** + ******************/ + +/* Hola Paraguay S.A. */ + {744, 1, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "HPGYSA", "VOX"}, + +/* AMX Paraguay Sociedad Anonima */ + {744, 2, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Porth", + "AMX PARAGUAY S.A."}, + +/* Telefonica Celular Del Paraguay S.A. (Telecel S.A.) */ + {744, 4, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "Telecel", + "Telecel Paraguay"}, + +/* Nucleo S.A */ + {744, 5, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "Personal", + "Personal"}, + +/* Nucleo S.A */ + {744, 5, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Personal", + "Personal"}, + +/***************** + **** Surinam **** + *****************/ + +/* NV ICMS */ + {746, 1, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "ICMS", "NV ICMS"}, + +/* Telesur */ + {746, 2, SETTING_PREFERRED_NETWORK_TYPE_GSM_900, "SR.TELESUR.GSM", + "Telesur"}, + +/* NV ICMS */ + {746, 2, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "SR.TELESUR.GSM", + "Telesur"}, + +/***************** + **** **** + *****************/ + +/* Abiatar S.A. */ + {748, 7, SETTING_PREFERRED_NETWORK_TYPE_GSM_850, "Movistar", + "MOVISTAR"}, + +/* Abiatar S.A. */ + {748, 7, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "Movistar", + "MOVISTAR"}, + +/* AM Wireless Uruguay S.A. */ + {748, 10, SETTING_PREFERRED_NETWORK_TYPE_PCS_1900, "CTIURY", + "AM Wireless Uruguay S.A."}, + +/******************* + **** Satellite **** + *******************/ + +/* Thuraya Satellite Telecommunications Co */ + {901, 5, SETTING_PREFERRED_NETWORK_TYPE_GSM_SAT, "Thuraya", + "Thuraya Satellite Telecommunications Co"}, + +/* Maritime Communications Partner AS */ + {901, 12, SETTING_PREFERRED_NETWORK_TYPE_DCS_1800, "MCP", + "Maritime Communications Partner AS"}, + +}; /*network_table */ + +static void setting_network_preferred_network_list_click_softkey_cancel(void + *data, + Evas_Object + *obj, + void + *event_info); +static void setting_network_preferred_network_list_click_softkey_add(void *data, + Evas_Object + *obj, void + *event_info); + +/* static void setting_network_preferred_network_list_mouse_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info); */ + +#endif /* _SETTINGS_NETWORK_PREFERRED_NETWORK_LIST_H_ */ + +/** + *@} + */ diff --git a/setting-network/include/setting-network-preferred-network-new.h b/setting-network/include/setting-network-preferred-network-new.h new file mode 100755 index 0000000..2519328 --- /dev/null +++ b/setting-network/include/setting-network-preferred-network-new.h @@ -0,0 +1,39 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_NETWORK_PREFERRED_NETWORK_NEW_H__ +#define __SETTING_NETWORK_PREFERRED_NETWORK_NEW_H__ + +#include + +static void setting_network_preferred_network_new_entry_changed_cb(void *data, + Evas_Object * + obj, void + *event_info); +static void setting_network_preferred_network_new_click_softkey_cancel_cb(void + *data, + Evas_Object + *obj, + void + *event_info); +static void setting_network_preffered_network_new_click_softkey_save_cb(void + *data, + Evas_Object + *obj, + void + *event_info); + +#endif /* __SETTING_NETWORK_PREFERRED_NETWORK_NEW_H__ */ diff --git a/setting-network/include/setting-network-preferred-network.h b/setting-network/include/setting-network-preferred-network.h new file mode 100755 index 0000000..f6ac910 --- /dev/null +++ b/setting-network/include/setting-network-preferred-network.h @@ -0,0 +1,24 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_NETWORK_PREFERRED_NETWORK_H__ +#define __SETTING_NETWORK_PREFERRED_NETWORK_H__ + +#include + +int setting_network_preferred_network_refresh_view(void *data); + +#endif /* __SETTING_NETWORK_PREFERRED_NETWORK_H__ */ diff --git a/setting-network/include/setting-network-select-network.h b/setting-network/include/setting-network-select-network.h new file mode 100755 index 0000000..79a7a25 --- /dev/null +++ b/setting-network/include/setting-network-select-network.h @@ -0,0 +1,26 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_NETWORK_SELECT_NETWORK_H__ +#define __SETTING_NETWORK_SELECT_NETWORK_H__ + +#include + +static void setting_network_select_network_click_softkey_cancel_cb(void *data, + Evas_Object * obj, + void *event_info); + +#endif /* __SETTING_NETWORK_SELECT_NETWORK_H__ */ diff --git a/setting-network/include/setting-network.h b/setting-network/include/setting-network.h new file mode 100755 index 0000000..ffb9bb7 --- /dev/null +++ b/setting-network/include/setting-network.h @@ -0,0 +1,269 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_NETWORK_H__ +#define __SETTING_NETWORK_H__ + +#include +#include +#include +#include +#include +#include + +#include +#include + + +#include +#include +#include + +#include +#include +#include + +#include + +#include + +#define Keystr_NetBrand_Auto "GSM/WCDMA(auto connect)" +#define Keystr_NetBrand_Auto_WCDMA_GSM "WCDMA/GSM (auto connect)" +#define Keystr_NetBrand_WCDMA "WCDMA only" +#define Keystr_NetBrand_LTE_WCDMA "LTE/WCDMA" +#define Keystr_NetBrand_GSM "GSM only" + +#define SUPPORT_CON_RESET +#define NET_CON_RESET_DBUS_PARA "--system --print-reply --dest=com.tcore.ps / com.tcore.ps.master.ResetProfile" + + +#define Data_packet_Desc "Data packet through 3G network will be consumed, if you use data download or upload without Wi-Fi connection." +#define SETTING_NETWORK_DATA_ROMING_DESC "IDS_COM_BODY_CONNECT_TO_DATA_SERVICES_WHEN_ROAMING" +#define SETTING_NETWORK_DATA_ROMING_OFF_DESC "When data roaming is disabled, the application that uses the data connection may not work" + +#define SETTING_NETWORK_USE_PACKET_DATA_OFF_DESC "Data packet through 3G network will be consumed, if you use data download or upload without Wi-Fi connection. Continue?" +#define SETTING_NETWORK_USE_PACKET_DATA_ON_DESC "Use data services when roaming. Roaming will charge extra data fee" + +#define CONNECTION_DSC "IDS_ST_BODY_CONNECTIONS" +#define KeyStr_Reset_Def "IDS_ST_BODY_RESET_TO_DEFAULT" +#define KeyStr_Edit "IDS_ST_BODY_EDIT" +#define KeyStr_Saved "IDS_ST_BODY_SAVED" +#define keyStr_Searched "Searched" +#define keyStr_Failed_Searched "Searching network failed" +#define keyStr_Failed_Select_Network "Select network failed" +#define keyStr_Failed_Get_PreferNetwork "Get preferred network failed" + +#define Insert_Access_Name_desc "Please input access name !" +#define Insert_User_Name_Desc "Please input User name !" +#define Invok_API_Failed_Desc "Failed to invoke API" + +//in the feture +#define NotifyStr_PDP_OFF "PDP will be disabled to find network nearby" +#define Keystr_UNKNOWN_NETWORK "Untitled network" + +#define SETTING_ADD_PROFILE_INDEX -1 +#define Invoking_TAPI_Timeout 8 +#define COUNTRY_CODE_LEN 3 +#define NETWORK_CODE_LEN 3 +#define PRE_NETWORK_NAME_MAX 256 + +#define SETTING_NETWORK_POP_RESPONSE_ACTION_CANCEL 10 /* the popupresponse action ID */ +#define SETTING_NETWORK_SUBS_ID_NET_LEN 7 +typedef enum { + SETTING_NETWORK_PREFERRED_NETWORK_NONE, + SETTING_NETWORK_PREFERRED_NETWORK_NEW, + SETTING_NETWORK_PREFERRED_NETWORK_EDIT, + SETTING_NETWORK_PREFERRED_NETWORK_LIST, + SETTING_NETWORK_PREFERRED_NETWORK_DELETE, + +} setting_network_preferred_network_operation_type_t; + +typedef enum { + NET_RESTORE_NONE = 0, //do need restore + NET_RESTORE_PDP, //restore the vconf of pdp() + NET_RESTORE_PDP_ROAM,//restore the vconf of roaming() +} net_restore_t;//restore type + + +typedef struct _SettingNetworkUG SettingNetworkUG; + +struct gl_network_data { + int index; + char name[PRE_NETWORK_NAME_MAX]; +}; + +#define MAX_PROFILE_NUM 100 +/** + * Setting Network UG context + * all UG function has void* as an agument. this is casted back to SettingNetworkUG + * and the functions access app context. + */ +struct _SettingNetworkUG { + ui_gadget_h ug; + TapiHandle *handle; + connection_h connection; + connection_profile_h sel_profile_h; + net_restore_t net_restore; + + /* add more variables here (move your appdata to here) */ + Evas *evas; + Evas_Object *win_main_layout; + Evas_Object *win_get; + Evas_Object *popup; + Evas_Object *navi_bar; + + //connection, + Elm_Object_Item *navi_it; + Evas_Object *bottom_btn; + //Evas_Object *conformant; + Evas_Object *back_btn; + Evas_Object *l_button; + Evas_Object *r_button; + //Evas_Object *m_button; + + bool has_form_changed; + Evas_Object *genlist_sel_network; + + Evas_Object *network_ug_pop; + Evas_Object *controllbar; + + char *view_type_string; + + Evas_Object *ly_main; + unsigned int subs_id_net[SETTING_NETWORK_SUBS_ID_NET_LEN]; + + Setting_GenGroupItem_Data* data_auto_network_item; + Setting_GenGroupItem_Data* data_search_network_item; + bool b_searching_network; + bool b_set_auto_network; + bool b_set_manul_network; + + Setting_GenGroupItem_Data *data_sel_net; + Setting_GenGroupItem_Data *data_net_mode; + Setting_GenGroupItem_Data *data_use_packet; + Setting_GenGroupItem_Data *data_roaming; + + Evas_Object *chk_sel; + Evas_Object *chk_mode; + Evas_Object *pop_gsm; + Evas_Object *chk_3gcon; + + int sel_net; /* like vconf key */ + int sel_act; /* like vconf key */ + char *sel_network; + int net_mode; /* like vconf key */ + + TelNetworkPlmnList_t plmn_info; + + int is_show_user; + char *con_name; + + Evas_Object *chk_type; + + char *ed_acs_name_desc; + char *ed_auth_type_desc; + char *ed_user_name_desc; + char *ed_pwd_desc; + char *ed_pxy_addr_desc; + char *ed_pxy_port_desc; + char *ed_hm_url_desc; + int chkType; + Elm_Object_Item *item_above_user_name; + Elm_Object_Item *item_above_proxy_add; + Setting_GenGroupItem_Data *data_user_name; + Setting_GenGroupItem_Data *data_pwd; + Setting_GenGroupItem_Data *data_acs_name; + Setting_GenGroupItem_Data *data_pxy_addr; + Setting_GenGroupItem_Data *data_pxy_port; + Setting_GenGroupItem_Data *data_hm_url; + Setting_GenGroupItem_Data *data_auth_type; + Setting_GenGroupItem_Data *data_type_nor; + Setting_GenGroupItem_Data *data_type_sec; + Setting_GenGroupItem_Data *data_type_none; + + Evas_Object *scl_edit; + + /* Preferred network common */ + TelNetworkPreferredPlmnList_t pref_list; + int sel_pref_idx; + setting_network_preferred_network_operation_type_t op_type; + + Ecore_Idler *add_view_timer; + char search_text[MAX_SEARCH_STR_LEN + 1]; + Evas_Object *nw_search_bar; + + Evas_Object *scl_pref; + Evas_Object *chk_new_type; + Setting_GenGroupItem_Data *data_edit_mcc; + Setting_GenGroupItem_Data *data_edit_mnc; + Setting_GenGroupItem_Data *data_new_mcc; + Setting_GenGroupItem_Data *data_new_mnc; + Evas_Object *chk_edit_type; + Evas_Object *scl_pref_del; + Evas_Object *gl_sel_all; + + Evas_Object *popup_label; + int deleted_number; + Eina_List *checked_data_list; + Eina_List *item_check_list; + + /* Preferred network network list for genlist */ + Evas_Object *gl_network; + Elm_Genlist_Item_Class itc; + struct gl_network_data *cur_sel_mem; + int cur_sel_index; + + Setting_GenGroupItem_Data *data_cl_select_all; + Evas_Object *sub_clear_layout; + Evas_Object *selInfoPop; + Evas_Object *selInfoPop_layout; +}; + + +extern setting_view setting_view_network_main; +extern setting_view setting_view_network_select_network; +extern setting_view setting_view_network_main_help; +extern setting_view setting_view_network_con; +extern setting_view setting_view_network_connection_create; +extern setting_view setting_view_network_3gcon; + +extern setting_view setting_view_network_preferred_network; +extern setting_view setting_view_network_preferred_network_new; +extern setting_view setting_view_network_preferred_network_list; +extern setting_view setting_view_network_preferred_network_edit; +extern setting_view setting_view_network_preferred_network_delete; + +const char *setting_network_get_act_str(TelNetworkSystemType_t type); +void setting_network_update_sel_network(void *data); + +void setting_tapi_get_preferred_plmn_cb(TapiHandle *handle, int result, void *data, void *user_data); +void setting_tapi_set_preferred_plmn_cb(TapiHandle *handle, int result, void *data, void *user_data); + +void setting_tapi_cancel_manual_search_cb(TapiHandle *handle, int result, void *data, void *user_data); +void setting_tapi_search_network_cb(TapiHandle *handle, int result, void *data, void *user_data); + +void setting_tapi_get_serving_network_cb(TapiHandle *handle, int result, void *data, void *user_data); +void setting_tapi_get_plmn_mode_cb(TapiHandle *handle, int result, void *data, void *user_data); +void setting_tapi_set_plmn_mode_cb(TapiHandle *handle, int result, void *data, void *user_data); + +void setting_tapi_get_band_cb(TapiHandle *handle, int result, void *data, void *user_data); +void setting_tapi_set_band_cb(TapiHandle *handle, int result, void *data, void *user_data); + +void setting_network_select_network_chk_changed(void *data, Evas_Object *obj, void *event_info); +void setting_network_Gendial_select_plmn_cb(void *data, Evas_Object *obj, void *event_info); +void setting_network_popup_delete(void *data); + +#endif /* __SETTING_NETWORK_H__ */ diff --git a/setting-network/src/setting-network-3gcon-option.c b/setting-network/src/setting-network-3gcon-option.c new file mode 100755 index 0000000..a53b3c6 --- /dev/null +++ b/setting-network/src/setting-network-3gcon-option.c @@ -0,0 +1,171 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 + +static int setting_network_3gcon_create(void *cb); +static int setting_network_3gcon_destroy(void *cb); +static int setting_network_3gcon_update(void *cb); +static int setting_network_3gcon_cleanup(void *cb); + +setting_view setting_view_network_3gcon = { + .create = setting_network_3gcon_create, + .destroy = setting_network_3gcon_destroy, + .update = setting_network_3gcon_update, + .cleanup = setting_network_3gcon_cleanup, +}; + +static void setting_network_3gcon_click_softkey_set_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_network_3gcon_click_softkey_cancel_cb(void *data, + Evas_Object *obj, + void *event_info); + +/* *************************************************** + * + *basic func + * + ***************************************************/ + +static int setting_network_3gcon_create(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + + Evas_Object *scroller; + setting_push_layout_navi_bar_genlist(ad->win_main_layout, ad->win_get, + _("2G/3G connection"), + dgettext("sys_string", "IDS_COM_SK_CANCEL"), + dgettext("sys_string", "IDS_COM_SK_SET"), + setting_network_3gcon_click_softkey_cancel_cb, + setting_network_3gcon_click_softkey_set_cb, + ad, &scroller, ad->navi_bar); + + /* scroller is a genlist */ + ad->chk_3gcon = elm_radio_add(scroller); + elm_radio_state_value_set(ad->chk_3gcon, -1); + + setting_create_Gendial_field_1radio(scroller, &itc_1text_1icon_2, + setting_mouse_up_Gendial_list_radio_cb, + ad->chk_3gcon, SWALLOW_Type_1RADIO, + ad->chk_3gcon, + SETTING_NETWORK_3GCON_NOT_USE, + "Do not use", NULL); + + setting_create_Gendial_field_1radio(scroller, &itc_1text_1icon_2, + setting_mouse_up_Gendial_list_radio_cb, + ad->chk_3gcon, SWALLOW_Type_1RADIO, + ad->chk_3gcon, + SETTING_NETWORK_3GCON_ASK_ON_CON, + _("IDS_ST_BODY_USB_ASK_ON_CONNECTION"), NULL); + setting_create_Gendial_field_1radio(scroller, &itc_1text_1icon_2, + setting_mouse_up_Gendial_list_radio_cb, + ad->chk_3gcon, SWALLOW_Type_1RADIO, + ad->chk_3gcon, + SETTING_NETWORK_3GCON_USE_WO_ASK, + "Use without asking", NULL); + + int value = -1; + int err = -1; + err = vconf_get_int(VCONFKEY_3G_ENABLE, &value); + if (err < 0) { + elm_radio_value_set(ad->chk_3gcon, + SETTING_NETWORK_3GCON_NOT_USE); + } else { + elm_radio_value_set(ad->chk_3gcon, value); + } + + setting_view_network_3gcon.is_create = 1; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_3gcon_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + + elm_naviframe_item_pop(ad->navi_bar); + setting_view_network_3gcon.is_create = 0; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_3gcon_update(void *cb) +{ + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_3gcon_cleanup(void *cb) +{ + return setting_network_3gcon_destroy(cb); +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void +setting_network_3gcon_click_softkey_set_cb(void *data, Evas_Object *obj, + void *event_info) +{ + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + int value; + int err; + + value = elm_radio_value_get(ad->chk_3gcon); + + err = vconf_set_int(VCONFKEY_3G_ENABLE, value); + + if (err < 0) { + SETTING_TRACE_DEBUG + ("%s*** [ERR] Failed to set 3G connection option ***%s", + SETTING_FONT_RED, SETTING_FONT_BLACK); + } + + setting_view_change(&setting_view_network_3gcon, + &setting_view_network_main, ad); +} + +static void +setting_network_3gcon_click_softkey_cancel_cb(void *data, Evas_Object *obj, + void *event_info) +{ + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + + setting_view_change(&setting_view_network_3gcon, + &setting_view_network_main, ad); +} diff --git a/setting-network/src/setting-network-con.c b/setting-network/src/setting-network-con.c new file mode 100755 index 0000000..47b09e7 --- /dev/null +++ b/setting-network/src/setting-network-con.c @@ -0,0 +1,359 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 + +static int setting_network_con_create(void *cb); +static int setting_network_con_destroy(void *cb); +static int setting_network_con_update(void *cb); +static int setting_network_con_cleanup(void *cb); + +setting_view setting_view_network_con = { + .create = setting_network_con_create, + .destroy = setting_network_con_destroy, + .update = setting_network_con_update, + .cleanup = setting_network_con_cleanup, +}; + +/* *************************************************** + * + *basic func + * + ***************************************************/ + +static int setting_network_con_create(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + + Evas_Object *scroller = elm_genlist_add(ad->win_main_layout); + elm_object_style_set(scroller, "dialogue"); + retvm_if(scroller == NULL, SETTING_DRAW_ERR_FAIL_SCROLLER, + "Cannot set scroller object as contento of layout"); + elm_genlist_clear(scroller); /* first to clear list */ + + setting_push_layout_navi_bar(_(CONNECTION_DSC), + _("IDS_COM_BODY_BACK"), + _(KeyStr_Reset_Def), + _("Create"), + setting_network_con_click_softkey_cancel_cb, + setting_network_con_click_softkey_reset_cb, + setting_network_con_click_softkey_create_cb, + ad, scroller, ad->navi_bar, NULL); + Elm_Object_Item *item = NULL; + item = elm_genlist_item_append(scroller, &itc_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* scroller is a genlist */ + setting_create_Gendial_field_def(scroller, &itc_1text, + setting_network_con_item_Gendial_mouse_up_cb, + ad, SWALLOW_Type_INVALID, NULL, NULL, + 0, "IDS_ST_BODY_INTERNET_CONNECTION", + NULL, NULL); + setting_create_Gendial_field_def(scroller, &itc_1text, + setting_network_con_item_Gendial_mouse_up_cb, + ad, SWALLOW_Type_INVALID, NULL, NULL, + 0, STR_SETTING_MMS_CONNECTIONS, NULL, + NULL); + +#ifdef ENABLED_PREFERRED_NETWORKS + setting_create_Gendial_field_def(scroller, &itc_1text, + setting_network_con_item_Gendial_mouse_up_cb, + ad, SWALLOW_Type_INVALID, NULL, NULL, + 0, "IDS_ST_BODY_PREFERRED_NETWORKS", + NULL, NULL); +#endif +#ifdef ENABLED_2G3G_NETWORK + /* create 3g connection option */ + setting_create_Gendial_field_def(scroller, &itc_1text, + setting_network_con_item_Gendial_mouse_up_cb, + ad, SWALLOW_Type_INVALID, NULL, NULL, + 0, "2G/3G Connection", NULL, NULL); + +#endif + connection_profile_iterator_h profile_iter = NULL; + connection_profile_h profile_h = NULL; + + char *profile_name = NULL; + char *apn = NULL; + connection_profile_type_e profile_type = CONNECTION_PROFILE_TYPE_CELLULAR; + connection_cellular_service_type_e service_type = CONNECTION_CELLULAR_SERVICE_TYPE_UNKNOWN; + + int rv = connection_get_profile_iterator(ad->connection, CONNECTION_ITERATOR_TYPE_REGISTERED, &profile_iter); + if (rv != CONNECTION_ERROR_NONE) { + SETTING_TRACE_ERROR("Fail to get profile iterator [%d]", rv); + return false; + } + + int cnt = 0; + #ifndef SUPPORT_REVERSED_ORDER + Elm_Object_Item *last_item = elm_genlist_item_append(scroller, &itc_bottom_seperator, + NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(last_item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + Setting_GenGroupItem_Data *item_data = NULL; + #endif + + while (connection_profile_iterator_has_next(profile_iter)) { + if (cnt >= MAX_PROFILE_NUM) + { + break; + } + if (connection_profile_iterator_next(profile_iter, &profile_h) != CONNECTION_ERROR_NONE) { + SETTING_TRACE_ERROR("Fail to get profile handle"); + break; + } + + if (connection_profile_get_type(profile_h, &profile_type) != CONNECTION_ERROR_NONE) { + SETTING_TRACE_ERROR("Fail to get profile type"); + continue; + } + if (connection_profile_get_cellular_service_type(profile_h, &service_type) != CONNECTION_ERROR_NONE) { + SETTING_TRACE_ERROR("Fail to get service type"); + continue; + } + + if (connection_profile_get_name(profile_h, &profile_name) != CONNECTION_ERROR_NONE) { + SETTING_TRACE_ERROR("Fail to get profile name"); + continue; + } + + if (connection_profile_get_cellular_apn(profile_h, &apn) != CONNECTION_ERROR_NONE) { + SETTING_TRACE_ERROR("Fail to get apn"); + G_FREE(profile_name); + continue; + } + + SETTING_TRACE("Record[%d:%s], profile_name:%s, profile_type:%d, service_type:%d", + cnt, apn, profile_name, profile_type, service_type); + if(CONNECTION_PROFILE_TYPE_CELLULAR != profile_type) + { + G_FREE(apn); + G_FREE(profile_name); + continue; + } + if (CONNECTION_CELLULAR_SERVICE_TYPE_MMS != service_type + && CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET != service_type) //unknow, match with ad->con_name + { + #ifdef SUPPORT_REVERSED_ORDER + setting_create_Gendial_field_def(scroller, &itc_1text, + setting_network_con_item_Gendial_mouse_up_cb, + ad, SWALLOW_Type_INVALID, NULL, NULL, + 0, apn, NULL, + NULL); + #else + item_data = calloc(1, sizeof(Setting_GenGroupItem_Data)); + setting_retvm_if(!item_data, SETTING_RETURN_FAIL, "calloc failed"); + item_data->keyStr = (char *)g_strdup(apn); + item_data->swallow_type = SWALLOW_Type_INVALID; + item_data->item = elm_genlist_item_insert_before(scroller, + &itc_1text, item_data, NULL, last_item, + ELM_GENLIST_ITEM_NONE, + setting_network_con_item_Gendial_mouse_up_cb,ad); + last_item = item_data->item; + #endif + } + G_FREE(apn); + G_FREE(profile_name); + cnt++; + } + +#ifdef SUPPORT_REVERSED_ORDER + /* add separator */ + item = elm_genlist_item_append(scroller, &itc_bottom_seperator, + NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); +#endif + setting_view_network_con.is_create = 1; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_con_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + FREE(ad->con_name); + elm_naviframe_item_pop(ad->navi_bar); + setting_view_network_con.is_create = 0; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_con_update(void *cb) +{ + setting_network_con_destroy(cb); + setting_network_con_create(cb); + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_con_cleanup(void *cb) +{ + return setting_network_con_destroy(cb); +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void +setting_network_con_item_Gendial_mouse_up_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + + SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); + int ret; + + if (!safeStrCmp("IDS_ST_BODY_SELECT_NETWORK", list_item->keyStr)) { + ret = + setting_view_change(&setting_view_network_main, + &setting_view_network_select_network, + ad); + } +#ifdef ENABLED_PREFERRED_NETWORKS + else if (!safeStrCmp("IDS_ST_BODY_PREFERRED_NETWORKS", + list_item->keyStr)) { + + int value = -1; + int err = -1; + ret = + setting_get_int_slp_key(INT_SLP_SETTING_SIM_SLOT, &value, + &err); + /** @todo check 'err' variable for exception handling */ + SETTING_TRACE("INT_SLP_SETTING_SIM_SLOT value:%d", value); + switch (value) { + case VCONFKEY_TELEPHONY_SIM_INSERTED: + /* To Recreate the view in order to search the perferred network again. */ + /* ret = setting_view_destroy(&setting_view_network_preferred_network, ad); */ + ret = + setting_view_change(&setting_view_network_main, + &setting_view_network_preferred_network, + ad); + + break; + + case VCONFKEY_TELEPHONY_SIM_NOT_PRESENT: + + setting_create_simple_popup(NULL, ad->win_get, + NULL, _("IDS_ST_SECURITY_BODY_NOIMSI")); + SETTING_TRACE_DEBUG + ("%s*** [ERR] INCORRECTED SIM. sim_slot_type=%d ***%s", + SETTING_FONT_RED, value, SETTING_FONT_BLACK); + return; + + break; + + case VCONFKEY_TELEPHONY_SIM_CARD_ERROR: + case VCONFKEY_TELEPHONY_SIM_UNKNOWN: + + setting_create_simple_popup(NULL, ad->win_get, + NULL, _("IDS_COM_BODY_INVALID_SIM_CARD")); + SETTING_TRACE_DEBUG + ("%s*** [ERR] INCORRECTED SIM. sim_slot_type=%d ***%s", + SETTING_FONT_RED, value, SETTING_FONT_BLACK); + return; + + break; + default: + SETTING_TRACE("Unknown SIM information from vconf"); + break; + } + } +#endif +#ifdef ENABLED_2G3G_NETWORK + else if (!safeStrCmp("2G/3G Connection", list_item->keyStr)) { + ret = + setting_view_change(&setting_view_network_main, + &setting_view_network_3gcon, ad); + } +#endif + else {//connections.. + ad->con_name = strdup(list_item->keyStr); + ret = setting_view_change(&setting_view_network_main, + &setting_view_network_connection_create, + ad); + } +} + +static void +setting_network_con_click_softkey_reset_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + //Reset connections info.. + excuteCmd("/usr/bin/dbus-send", 1, NET_CON_RESET_DBUS_PARA); + setting_create_simple_popup(ad, ad->win_get, NULL, _("IDS_COM_POP_SUCCESS")); + + setting_network_con_update(ad); +} + +static void +setting_network_con_click_softkey_create_cb(void *data, Evas_Object *obj, + void *event_info) +{ + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + + //setting_create_simple_popup(ad, ad->win_get, NULL, _("UX Undefined")); + //return; + + //to add a new connection + //ad->con_type = -1; + ad->con_name = strdup(STR_SETTING_NEW_CONNECTIONS); + setting_view_change(&setting_view_network_main, &setting_view_network_connection_create, ad); +} + +static void +setting_network_con_click_softkey_cancel_cb(void *data, Evas_Object *obj, + void *event_info) +{ + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + + setting_view_change(&setting_view_network_con, + &setting_view_network_main, ad); +} diff --git a/setting-network/src/setting-network-connection-create.c b/setting-network/src/setting-network-connection-create.c new file mode 100755 index 0000000..76dad9f --- /dev/null +++ b/setting-network/src/setting-network-connection-create.c @@ -0,0 +1,1284 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#define MAX_PDP_APN_LEN_MAX 100 +#define MAX_PDP_AUTH_USERNAME_LEN_MAX 32 +#define MAX_PDP_AUTH_PASSWORD_LEN_MAX 32 +#define MAX_HOME_URL_LEN_MAX 512 +#define MAX_PROXY_LEN_MAX 64 + +static int setting_network_connection_create(void *cb); +static int setting_network_connection_destroy(void *cb); +static int setting_network_connection_update(void *cb); +static int setting_network_connection_cleanup(void *cb); + +setting_view setting_view_network_connection_create = { + .create = setting_network_connection_create, + .destroy = setting_network_connection_destroy, + .update = setting_network_connection_update, + .cleanup = setting_network_connection_cleanup, +}; + +SettingNetworkUG *g_networkUG = NULL; +#define SUPPORT_EXPANDABLE_AUTHTYPE 1 +#define URL_HEAD "http://" +/* *************************************************** + * + *basic func + * + ***************************************************/ + +static void +__network_connection_gl_mouse_up(void *data, Evas *e, Evas_Object *obj, + void *event) +{ + ret_if(!data); + SETTING_TRACE_BEGIN; + SettingNetworkUG *ad = (SettingNetworkUG *) data; + + if (ad->data_acs_name) { + setting_hide_input_pannel_cb(ad->data_acs_name->eo_check); + } + if (ad->data_user_name) { + setting_hide_input_pannel_cb(ad->data_user_name->eo_check); + } + if (ad->data_pwd) { + setting_hide_input_pannel_cb(ad->data_pwd->eo_check); + } + if (ad->data_pxy_addr) { + setting_hide_input_pannel_cb(ad->data_pxy_addr->eo_check); + } + if (ad->data_pxy_port) { + setting_hide_input_pannel_cb(ad->data_pxy_port->eo_check); + } + if (ad->data_hm_url) { + setting_hide_input_pannel_cb(ad->data_hm_url->eo_check); + } + +} + +void __sub_list_rd_change(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + list_item->chk_status = elm_radio_value_get(obj); /* for update */ + + Elm_Object_Item *subItem = list_item->item; + Elm_Object_Item *parentItem = elm_genlist_item_parent_get(subItem); + + Setting_GenGroupItem_Data *data_subItem = elm_object_item_data_get(subItem); /* subItem data */ + Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); /* parent data */ + + ret_if(NULL == data_subItem || NULL == data_parentItem); + + data_parentItem->sub_desc = (char *)g_strdup(_(data_subItem->keyStr)); + elm_object_item_data_set(data_parentItem->item, data_parentItem); + elm_genlist_item_update(data_parentItem->item); + setting_network_edit_connection_display_auth_type + (data_parentItem->userdata, list_item->chk_status); +} + +void __sub_list_sel_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *subitem = (Elm_Object_Item *) event_info; + Elm_Object_Item *parentItem = elm_genlist_item_parent_get(subitem); + elm_genlist_item_selected_set(subitem, 0); + Setting_GenGroupItem_Data *data_subItem = + elm_object_item_data_get(subitem); + Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); /* parent data */ + ret_if(NULL == data_subItem || NULL == data_parentItem); + + elm_radio_value_set(data_subItem->rgd, data_subItem->chk_status); + + data_parentItem->sub_desc = (char *)g_strdup(_(data_subItem->keyStr)); + elm_object_item_data_set(data_parentItem->item, data_parentItem); + elm_genlist_item_update(data_parentItem->item); + setting_network_edit_connection_display_auth_type(data, + data_subItem->chk_status); +} + +static void __setting_network_connection_exp_cb(void *data, Evas_Object *obj, + void *event_info) +{ + ret_if(NULL == data || NULL == event_info); + SETTING_TRACE_BEGIN; + SettingNetworkUG *ad = (SettingNetworkUG *) data; + Elm_Object_Item *parentItem = event_info; /* parent item */ + Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); /* parent data */ + Evas_Object *scroller = elm_object_item_widget_get(parentItem); + + Evas_Object *rgd; + if (data_parentItem == ad->data_auth_type) { + rgd = elm_radio_add(scroller); + elm_radio_value_set(rgd, -1); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + __sub_list_sel_cb, ad, + parentItem, + SWALLOW_Type_1RADIO, rgd, + CONNECTION_CELLULAR_AUTH_TYPE_PAP, + "IDS_ST_MBODY_PAP", + __sub_list_rd_change); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + __sub_list_sel_cb, ad, + parentItem, + SWALLOW_Type_1RADIO, rgd, + CONNECTION_CELLULAR_AUTH_TYPE_CHAP, + "IDS_ST_POP_CHAP", + __sub_list_rd_change); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + __sub_list_sel_cb, ad, + parentItem, + SWALLOW_Type_1RADIO, rgd, + CONNECTION_CELLULAR_AUTH_TYPE_NONE, + "IDS_COM_BODY_NONE", + __sub_list_rd_change); + + elm_radio_value_set(rgd, ad->chkType); + } +} + +static void __genlist_disable_set(Evas_Object *genlist, bool disabled) +{ + SETTING_TRACE_BEGIN; + ret_if (!genlist); + Elm_Object_Item *item = elm_genlist_first_item_get(genlist); + for(;item != elm_genlist_last_item_get(genlist); + item = elm_genlist_item_next_get(item)) + { + elm_object_item_disabled_set(item, disabled); + + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *)elm_object_item_data_get(item); + if (item_data == NULL) { + //SETTING_TRACE("item_data is null"); + continue; + } + if (item_data->swallow_type == SWALLOW_Type_LAYOUT_ENTRY) { + elm_entry_context_menu_disabled_set(item_data->eo_check, disabled); + } + //elm_object_item_signal_emit(item, "elm,state,enabled", "elm"); + } + elm_object_item_disabled_set(item, disabled);//the last one item + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *)elm_object_item_data_get(item); + if (item_data == NULL) { + SETTING_TRACE("item_data is null"); + return; + } + if (item_data->swallow_type == SWALLOW_Type_LAYOUT_ENTRY) { + elm_entry_context_menu_disabled_set(item_data->eo_check, disabled); + } +} +static Eina_Bool __connection_idler(void *data) +{ + SETTING_TRACE_BEGIN; + retv_if (!data, FALSE); + SettingNetworkUG *ad = data; + __genlist_disable_set(ad->scl_edit, TRUE); + setting_network_connection_hide_input_pannel(ad); + return FALSE; +} +void __get_connection_info(void *cb) +{ + SETTING_TRACE_BEGIN; + ret_if(cb == NULL); + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + //int ret; + G_FREE(ad->ed_acs_name_desc); + G_FREE(ad->ed_user_name_desc); + G_FREE(ad->ed_pwd_desc); + + G_FREE(ad->ed_pxy_addr_desc); + G_FREE(ad->ed_pxy_port_desc); + + G_FREE(ad->ed_hm_url_desc); + ad->ed_auth_type_desc = NULL; + ad->chkType = CONNECTION_CELLULAR_AUTH_TYPE_NONE; + + SETTING_TRACE("ad->con_name:%s", ad->con_name); + int ServiceType = CONNECTION_CELLULAR_SERVICE_TYPE_APPLICATION; + if (0 == safeStrCmp(ad->con_name,"IDS_ST_BODY_INTERNET_CONNECTION")) + { + ServiceType = CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET; + } + else if (0 == safeStrCmp(ad->con_name,STR_SETTING_MMS_CONNECTIONS)) + { + ServiceType = CONNECTION_CELLULAR_SERVICE_TYPE_MMS; + } + const char *con_name_utf8 = elm_entry_markup_to_utf8(ad->con_name); + + + //match with the correct profile + connection_profile_iterator_h profile_iter = NULL; + connection_profile_h profile_h = NULL; + char *profile_name = NULL; + char *apn = NULL; + connection_profile_type_e profile_type = CONNECTION_PROFILE_TYPE_CELLULAR; + connection_cellular_service_type_e service_type = CONNECTION_CELLULAR_SERVICE_TYPE_UNKNOWN; + int err = connection_get_profile_iterator(ad->connection, CONNECTION_ITERATOR_TYPE_REGISTERED, &profile_iter); + if (err != CONNECTION_ERROR_NONE) { + SETTING_TRACE_ERROR("Fail to get profile iterator [%d]", err); + FREE(con_name_utf8); + return; + } + + int cnt = 0; + bool found = FALSE; + while (connection_profile_iterator_has_next(profile_iter)) { + //reset and release.. + G_FREE(apn); + G_FREE(profile_name); + + if (cnt >= MAX_PROFILE_NUM || connection_profile_iterator_next(profile_iter, &profile_h) != CONNECTION_ERROR_NONE) + { + break; + } + + connection_profile_get_type(profile_h, &profile_type); + connection_profile_get_cellular_service_type(profile_h, &service_type); + connection_profile_get_cellular_apn(profile_h, &apn); + connection_profile_get_name(profile_h, &profile_name); + SETTING_TRACE("Record[%d] apn[%s], profile_name[%s], profile_type[%d], service_type[%d]", + cnt, apn, profile_name, profile_type, service_type); + if(CONNECTION_PROFILE_TYPE_CELLULAR != profile_type) + continue; + + if (CONNECTION_CELLULAR_SERVICE_TYPE_APPLICATION != service_type) + { + //match with ServiceType + if (ServiceType == service_type) + { + ad->sel_profile_h = profile_h; + found = TRUE; + break; + } + } + else //the customer's profiles + { + if (0 == safeStrCmp(con_name_utf8, apn)) + { + ad->sel_profile_h = profile_h; + found = TRUE; + break; + } + } + cnt++; + } + FREE(con_name_utf8); + if (found)//found sucessfully + { + SETTING_TRACE("found the following record:"); + SETTING_TRACE("\tapn:%s", apn); + SETTING_TRACE("\tprofile_name:%s", profile_name); + SETTING_TRACE("\tservice_type:%d", service_type); + SETTING_TRACE("\tprofile_type:%d", profile_type); + /* load access name */ + //ad->ed_acs_name_desc = ad->prof_list[ad->prof_sel_idx].ProfileInfo.Pdp.Apn; + connection_profile_get_cellular_apn(ad->sel_profile_h, &(ad->ed_acs_name_desc)); + /*ad->ed_user_name_desc = + ad->prof_list[ad->prof_sel_idx].ProfileInfo.Pdp.AuthInfo.UserName; + ad->chkType = + ad->prof_list[ad->prof_sel_idx].ProfileInfo.Pdp.AuthInfo.AuthType; + ad->ed_pwd_desc = + ad->prof_list[ad->prof_sel_idx].ProfileInfo.Pdp.AuthInfo.Password;*/ + connection_cellular_auth_type_e auth_type = CONNECTION_CELLULAR_AUTH_TYPE_NONE; + connection_profile_get_cellular_auth_info(ad->sel_profile_h, &auth_type, &(ad->ed_user_name_desc), &(ad->ed_pwd_desc)); + ad->chkType = auth_type; + + switch (ad->chkType) { + case CONNECTION_CELLULAR_AUTH_TYPE_PAP: + ad->ed_auth_type_desc = _("IDS_ST_MBODY_PAP"); + break; + case CONNECTION_CELLULAR_AUTH_TYPE_CHAP: + ad->ed_auth_type_desc = _("IDS_ST_POP_CHAP"); + break; + case CONNECTION_CELLULAR_AUTH_TYPE_NONE: + ad->ed_auth_type_desc = _("IDS_COM_BODY_NONE"); + break; + default: + ad->chkType = CONNECTION_CELLULAR_AUTH_TYPE_NONE; + ad->ed_auth_type_desc = _("IDS_COM_BODY_NONE"); + break; + } + + + char *full_addr = NULL; + char *addr = NULL; + char *port = NULL; + //Fix the Port 'NULL' issue when enter connection view repeatly.. + connection_profile_get_proxy_address(ad->sel_profile_h, CONNECTION_ADDRESS_FAMILY_IPV4, &full_addr); + char ProxyAddr[MAX_PROXY_LEN_MAX+1] = {0,}; + safeCopyStr(ProxyAddr, full_addr, MAX_PROXY_LEN_MAX); + G_FREE(full_addr); + + SETTING_TRACE("ProxyAddr:%s", ProxyAddr); + //several real format after removing "http://": + // ":80", "1.1.1.1:80","1.1.1.1: ", "127.0.0.1/", "127.0.0.1" + full_addr = ProxyAddr; + int url_head_len = strlen(URL_HEAD); + if (0 == safeStrNCmp(full_addr, URL_HEAD, url_head_len)) + { + full_addr += url_head_len; + } + addr = strsep(&full_addr, ":"); + if (NULL == full_addr)//format like "http://127.0.0.1/" or "http://127.0.0.1" + { + SETTING_TRACE("NULL == full_addr"); + addr = strsep(&addr, "/"); + } + if (is_ip_string(addr)) + { + port = strsep(&full_addr, "/"); + } + else //invalid format,let addr and port to be NULL. + { + addr = NULL; + } + SETTING_TRACE("addr:%s", addr); + SETTING_TRACE("port:%s", port); + ad->ed_pxy_addr_desc = g_strdup(addr); + ad->ed_pxy_port_desc = g_strdup(port); + //if (ad->con_type == NET_SERVICE_MMS) { /* Message Connection */ + if (!safeStrCmp(ad->con_name, STR_SETTING_MMS_CONNECTIONS)) { /* Message Connection */ + //ad->ed_hm_url_desc = ad->prof_list[ad->prof_sel_idx].ProfileInfo.Pdp.HomeURL; + connection_profile_get_cellular_home_url(ad->sel_profile_h, &(ad->ed_hm_url_desc)); + } + } else { + SETTING_TRACE("Didn't find any record, to let add a new one:"); + ad->sel_profile_h = NULL; + ad->ed_auth_type_desc = _("IDS_COM_BODY_NONE"); + ad->chkType = CONNECTION_CELLULAR_AUTH_TYPE_NONE; + } + + //release the memory.. + G_FREE(apn); + G_FREE(profile_name); + return; +} +void __update_genlist_info(void *cb) +{ + SETTING_TRACE_BEGIN; + ret_if(cb == NULL); + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + if (ad->data_acs_name) + { + ad->data_acs_name->sub_desc = g_strdup(ad->ed_acs_name_desc); + } + + if (ad->data_auth_type) + { + ad->data_auth_type->sub_desc = g_strdup(ad->ed_auth_type_desc); + if (ad->sel_profile_h) { + //int authType = ad->prof_list[ad->prof_sel_idx].ProfileInfo.Pdp.AuthInfo.AuthType; + connection_cellular_auth_type_e authType = 0; + char *user_name; + char *pwd; + connection_profile_get_cellular_auth_info(ad->sel_profile_h, &authType, &user_name, &pwd); + ad->chkType = !ad->chkType; + setting_network_edit_connection_display_auth_type(ad, authType); + } + } + if (ad->data_user_name) + { + ad->data_user_name->sub_desc = g_strdup(ad->ed_user_name_desc); + } + if (ad->data_pwd) + { + ad->data_pwd->sub_desc = g_strdup(ad->ed_pwd_desc); + } + + if (ad->data_pxy_addr) + { + ad->data_pxy_addr->sub_desc = g_strdup(ad->ed_pxy_addr_desc); + } + if (ad->data_pxy_port) + { + ad->data_pxy_port->sub_desc = g_strdup(ad->ed_pxy_port_desc); + } + if (ad->data_hm_url) + { + ad->data_hm_url->sub_desc = g_strdup(ad->ed_hm_url_desc); + } + elm_genlist_realized_items_update(ad->scl_edit); + return; +} + +static int setting_network_connection_create(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + + setting_retvm_if(!ad->con_name, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER, "!ad->con_name") + + Evas_Object *scroller = elm_genlist_add(ad->win_main_layout); + elm_object_style_set(scroller, "dialogue"); + retvm_if(scroller == NULL, SETTING_DRAW_ERR_FAIL_SCROLLER, + "Cannot set scroller object as contento of layout"); + elm_genlist_clear(scroller); /* first to clear list */ + + /* connection intializes */ + ad->data_hm_url = NULL; + ad->data_pwd = NULL; + ad->data_user_name = NULL; + ad->data_pxy_addr = NULL; + ad->data_acs_name = NULL; + ad->data_auth_type = NULL; + + ad->navi_it = setting_push_layout_navi_bar(_(ad->con_name), + _("IDS_COM_BODY_BACK"), + _(KeyStr_Edit), + NULL,//_(KeyStr_Reset_Def), + setting_network_edit_connection_click_softkey_back_cb, + setting_network_edit_connection_click_softkey_eidt_cb, + NULL, + ad, scroller, ad->navi_bar, NULL); + + retv_if(!ad->navi_it, SETTING_RETURN_FAIL); + ad->has_form_changed = FALSE; + + setting_enable_expandable_genlist(scroller, ad, + __setting_network_connection_exp_cb, + NULL); + evas_object_event_callback_add(scroller, EVAS_CALLBACK_MOUSE_UP, + __network_connection_gl_mouse_up, ad); + __get_connection_info(ad); + Elm_Object_Item *item; + + /* item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL); */ + item = + elm_genlist_item_append(scroller, &itc_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + ad->data_acs_name = + setting_create_Gendial_field_def(scroller, + &itc_1icon, NULL, + NULL, SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + "IDS_ST_BODY_ACCESS_NAME", + (char *)ad->ed_acs_name_desc, + setting_network_connection_entry_changed_cb); + if (ad->data_acs_name) { + ad->data_acs_name->userdata = ad; + ad->data_acs_name->limit_filter_data = calloc(1, sizeof(Elm_Entry_Filter_Accept_Set)); + if (ad->data_acs_name->limit_filter_data) { + ad->data_acs_name->limit_filter_data->max_byte_count = MAX_PDP_APN_LEN_MAX - 1; + ad->data_acs_name->win_main = ad->win_get; + } + + } else { + SETTING_TRACE_ERROR("ad->data_acs_name is NULL"); + } + + item = + elm_genlist_item_append(scroller, &itc_seperator, NULL, NULL, + ELM_GENLIST_ITEM_GROUP, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + ad->data_auth_type = + setting_create_Gendial_exp_parent_field(scroller, + &itc_2text_3_parent, + NULL, NULL, + SWALLOW_Type_INVALID, + "IDS_ST_BODY_AUTH_TYPE", + (char *)ad->ed_auth_type_desc); + /* ad->data_auth_type->int_slp_setting_binded = INT_SLP_SETTING_INVALID; */ + if (ad->data_auth_type) { + ad->data_auth_type->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_auth_type is NULL"); + } + + ad->item_above_user_name = item = + elm_genlist_item_append(scroller, &itc_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + ad->is_show_user = 0; + if (CONNECTION_CELLULAR_AUTH_TYPE_NONE != ad->chkType) { + ad->data_user_name = + setting_create_Gendial_field_def(scroller, + &itc_1icon, + NULL, NULL, + SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + "IDS_COM_BODY_USER_NAME", + (char *) + ad->ed_user_name_desc, + setting_network_connection_entry_changed_cb); + if (ad->data_user_name) { + ad->data_user_name->userdata = ad; + ad->data_user_name->limit_filter_data = calloc(1, sizeof(Elm_Entry_Filter_Accept_Set)); + if (ad->data_user_name->limit_filter_data) { + ad->data_user_name->limit_filter_data->max_byte_count = MAX_PDP_AUTH_USERNAME_LEN_MAX - 1; + ad->data_user_name->win_main = ad->win_get; + } + } else { + SETTING_TRACE_ERROR("ad->data_user_name is NULL"); + } + + ad->data_pwd = + setting_create_Gendial_field_def(scroller, + &itc_1icon, + NULL, NULL, + SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + "IDS_COM_BODY_PASSWORD", + (char *)ad->ed_pwd_desc, + setting_network_connection_entry_changed_cb); + if (ad->data_pwd) { + ad->data_pwd->userdata = ad; + ad->is_show_user = 1; + ad->data_pwd->isPasswordFlag = TRUE; + ad->data_pwd->limit_filter_data = calloc(1, sizeof(Elm_Entry_Filter_Accept_Set)); + if (ad->data_pwd->limit_filter_data) { + ad->data_pwd->limit_filter_data->max_byte_count = MAX_PDP_AUTH_PASSWORD_LEN_MAX - 1; + ad->data_pwd->win_main = ad->win_get; + } + } else { + SETTING_TRACE_ERROR("ad->data_pwd is NULL"); + } + + ad->item_above_proxy_add = item = + elm_genlist_item_append(scroller, &itc_seperator, + NULL, NULL, ELM_GENLIST_ITEM_NONE, + NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } + + ad->data_pxy_addr = + setting_create_Gendial_field_def(scroller, + &itc_1icon, NULL, + NULL, SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + "IDS_ST_BODY_CONNECTIONSETTINGS_PROXY_ADDRESS", + (char *)ad->ed_pxy_addr_desc, + setting_network_connection_entry_changed_cb); + if (ad->data_pxy_addr) { + ad->data_pxy_addr->userdata = ad; + ad->data_pxy_addr->input_type = ELM_INPUT_PANEL_LAYOUT_IP; + } else { + SETTING_TRACE_ERROR("ad->data_pxy_addr is NULL"); + } + + ad->data_pxy_port = + setting_create_Gendial_field_def(scroller, + &itc_1icon, NULL, + NULL, SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + "IDS_ST_BODY_PROXY_PORT", + (char *)ad->ed_pxy_port_desc, + setting_network_connection_entry_changed_cb); + if (ad->data_pxy_port) { + ad->data_pxy_port->userdata = ad; + ad->data_pxy_port->input_type = ELM_INPUT_PANEL_LAYOUT_NUMBERONLY; + } else { + SETTING_TRACE_ERROR("ad->data_pxy_port is NULL"); + } + + if (!safeStrCmp(ad->con_name, STR_SETTING_MMS_CONNECTIONS)) { /* mms Connection */ + ad->data_hm_url = + setting_create_Gendial_field_def(scroller, + &itc_1icon, + NULL, NULL, + SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + "IDS_ST_BODY_HOME_URL", + (char *)ad->ed_hm_url_desc, + setting_network_connection_entry_changed_cb); + if (ad->data_hm_url) { + ad->data_hm_url->userdata = ad; + ad->data_hm_url->input_type = ELM_INPUT_PANEL_LAYOUT_URL; + ad->data_hm_url->limit_filter_data = calloc(1, sizeof(Elm_Entry_Filter_Accept_Set)); + if (ad->data_hm_url->limit_filter_data) { + ad->data_hm_url->limit_filter_data->max_byte_count = MAX_HOME_URL_LEN_MAX - 1; + ad->data_hm_url->win_main = ad->win_get; + } + } else { + SETTING_TRACE_ERROR("ad->data_hm_url is NULL"); + } + /* ad->is_show_url = 1; */ + } + + item = elm_genlist_item_append(scroller, &itc_bottom_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + setting_view_network_connection_create.is_create = 1; + ad->scl_edit = scroller; + __genlist_disable_set(ad->scl_edit, TRUE); + ecore_idler_add(__connection_idler, ad); + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_connection_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + ad->navi_it = NULL; + ad->bottom_btn = NULL; + ad->back_btn = NULL; + //manager separatly, + if (ad->l_button) + { + evas_object_del(ad->l_button); + ad->l_button = NULL; + } + /*if (ad->m_button) + { + evas_object_del(ad->m_button); + ad->m_button = NULL; + }*/ + if (ad->r_button) + { + evas_object_del(ad->r_button); + ad->r_button = NULL; + } + FREE(ad->con_name); + G_FREE(ad->ed_acs_name_desc); + G_FREE(ad->ed_user_name_desc); + G_FREE(ad->ed_pwd_desc); + + G_FREE(ad->ed_pxy_addr_desc); + G_FREE(ad->ed_pxy_port_desc); + + G_FREE(ad->ed_hm_url_desc); + //if (ad->prof_list) + //{ + // connection_profile_destroy(ad->prof_list); + // ad->prof_list = NULL; + //} + + elm_naviframe_item_pop(ad->navi_bar); + setting_view_network_connection_create.is_create = 0; + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_connection_update(void *cb) +{ + SETTING_TRACE_BEGIN; + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_connection_cleanup(void *cb) +{ + return setting_network_connection_destroy(cb); +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +static int __save_connection(void *data) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + const char *acs_name = NULL; + const char *usr_name = NULL; + const char *pwd = NULL; + const char *addr = NULL; + const char *port = NULL; + const char *home = NULL; + + if (ad->data_acs_name) + acs_name = elm_entry_markup_to_utf8(ad->data_acs_name->sub_desc); + if (ad->data_user_name) + usr_name = elm_entry_markup_to_utf8(ad->data_user_name->sub_desc); + if (ad->data_pwd) + pwd = elm_entry_markup_to_utf8(ad->data_pwd->sub_desc); + if (ad->data_pxy_addr) + addr = elm_entry_markup_to_utf8(ad->data_pxy_addr->sub_desc); + if (ad->data_pxy_port) + port = elm_entry_markup_to_utf8(ad->data_pxy_port->sub_desc); + + if (!acs_name) + acs_name = strdup(""); + if (!usr_name) + usr_name = strdup(""); + if (!pwd) + pwd = strdup(""); + if (!addr) + addr = strdup(""); + if (!port) + port = strdup(""); + SETTING_TRACE("acs_name:%s", acs_name); + SETTING_TRACE("usr_name:%s", usr_name); + SETTING_TRACE("pwd:%s", pwd); + + SETTING_TRACE("addr:%s", addr); + SETTING_TRACE("port:%s", port); + SETTING_TRACE("home:%s", home); + + char sz_text[MAX_PROXY_LEN_MAX + 1] = { 0, }; + int type; + int ret = SETTING_RETURN_SUCCESS; + int err; + + if (!safeStrCmp(acs_name, "")) { + setting_create_simple_popup(ad, ad->win_get, + NULL, _(Insert_Access_Name_desc)); + FREE(acs_name); + FREE(usr_name); + FREE(pwd); + FREE(addr); + FREE(port); + return SETTING_DNET_RETURN_NULL_ACCESS_NAME; + } + //if (test_update_cellular_info(profile) == -1) + bool add_flag = FALSE;//add a new profile + connection_profile_h con_info = NULL; + if (ad->sel_profile_h) { + con_info = ad->sel_profile_h; + if(0 != safeStrCmp(ad->con_name, STR_SETTING_MMS_CONNECTIONS) + && 0 != safeStrCmp(ad->con_name, "IDS_ST_BODY_INTERNET_CONNECTION")) + { + //need to change con_name + FREE(ad->con_name); + ad->con_name = strdup(acs_name); + } + SETTING_TRACE("ad->con_name:%s", ad->con_name); + + } else { + SETTING_TRACE("ad->con_name:%s", ad->con_name); + if(!safeStrCmp(ad->con_name, STR_SETTING_MMS_CONNECTIONS)) + { + connection_profile_create(CONNECTION_PROFILE_TYPE_CELLULAR, _(ad->con_name), &con_info); + connection_profile_set_cellular_service_type(con_info,CONNECTION_CELLULAR_SERVICE_TYPE_MMS); + } + else if(!safeStrCmp(ad->con_name, "IDS_ST_BODY_INTERNET_CONNECTION")) + { + connection_profile_create(CONNECTION_PROFILE_TYPE_CELLULAR, _(ad->con_name), &con_info); + connection_profile_set_cellular_service_type(con_info,CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET); + } + else + { + //need to change con_name + FREE(ad->con_name); + ad->con_name = strdup(acs_name); + connection_profile_create(CONNECTION_PROFILE_TYPE_CELLULAR, _(ad->con_name), &con_info); + connection_profile_set_cellular_service_type(con_info,CONNECTION_CELLULAR_SERVICE_TYPE_APPLICATION); + } + + SETTING_TRACE("ad->con_name:%s", ad->con_name); + add_flag = TRUE; + } + + /* save access name */ + connection_profile_set_cellular_apn(con_info, acs_name); + FREE(acs_name); + + /* save auth type */ + /* type = elm_radio_value_get(ad->chk_type); */ + type = ad->chkType; + /* save user name */ + if (!safeStrCmp(usr_name, "") + && CONNECTION_CELLULAR_AUTH_TYPE_NONE != type) { + setting_create_simple_popup(ad, ad->win_get, + NULL, _(Insert_User_Name_Desc)); + FREE(usr_name); + FREE(pwd); + FREE(addr); + FREE(port); + return SETTING_DNET_RETURN_NULL_USER_NAME; + } + + /* save password */ + if (!safeStrCmp(pwd, "") + && CONNECTION_CELLULAR_AUTH_TYPE_NONE != type) { + setting_create_simple_popup(ad, ad->win_get, + NULL, _("IDS_ST_BODY_ENTER_PASSWORD")); + FREE(usr_name); + FREE(pwd); + FREE(addr); + FREE(port); + return SETTING_DNET_RETURN_NULL_PASSWORD; + } + + connection_profile_set_cellular_auth_info(con_info, type, usr_name, pwd); + + /* save proxy addr */ + SETTING_TRACE("addr:port[%s:%s]", addr, port); + if (!safeStrCmp(addr, "")) { + /* check proxy port */ + if (!safeStrCmp(port, "")) + { + //it is the normal case. + } + else //like ":80",it's forbiden + { + setting_create_simple_popup(ad, ad->win_get, + NULL, _("Incorrect proxy address, please add correct adress or clear the port field.")); + FREE(usr_name); + FREE(pwd); + FREE(addr); + FREE(port); + return SETTING_DNET_RETURN_INVALID_PROXY_ADDR; + } + } else if (!is_ip_string(addr)) { + setting_create_simple_popup(ad, ad->win_get, + NULL, _("IDS_ST_HEADER_INCORRECT_PROXY_ADDRESS")); + FREE(usr_name); + FREE(pwd); + FREE(addr); + FREE(port); + return SETTING_DNET_RETURN_INVALID_PROXY_ADDR; + } + + ret = snprintf(sz_text, sizeof(sz_text), "%s:%s", addr, port); + retv_if(ret < 0, SETTING_DNET_RETURN_ERR); + connection_profile_set_proxy_address(con_info, CONNECTION_ADDRESS_FAMILY_IPV4, sz_text); + + /* save home url(message connection only) */ + if (!safeStrCmp(ad->con_name, STR_SETTING_MMS_CONNECTIONS)) { /* Message Connection */ + home = elm_entry_markup_to_utf8(ad->data_hm_url->sub_desc); + if (home == (char *)NULL) { + connection_profile_set_cellular_home_url(con_info, URL_HEAD); + } else { + if (!safeStrCmp(home, "")) { + FREE(home); + home = strdup(URL_HEAD); + ret = SETTING_DNET_RETURN_NULL_HOMEURL; + } + connection_profile_set_cellular_home_url(con_info, home); + } + } else if (!safeStrCmp(ad->con_name, "IDS_ST_BODY_INTERNET_CONNECTION")) { + if (add_flag) + { + //For internet, it needs call following api to set the default profile. + connection_set_default_cellular_service_profile(ad->connection, CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET, con_info); + } + } + + FREE(usr_name); + FREE(pwd); + FREE(addr); + FREE(port); + FREE(home); + //SETTING_TRACE("ad->con_type:%d", ad->con_type); + /* save connection */ + if (add_flag) { + //con_info->profile_type = NET_DEVICE_CELLULAR; + //con_info->ProfileState = NET_STATE_TYPE_UNKNOWN; + //con_info->ProfileInfo.Pdp.ProtocolType = NET_PDP_TYPE_GPRS; + err = connection_add_profile(ad->connection, con_info); + if (err != CONNECTION_ERROR_NONE) { + SETTING_TRACE_ERROR + ("%s*** [ERR] connection_add_profile. err=%d ***%s", + SETTING_FONT_RED, err, SETTING_FONT_BLACK); + ret = SETTING_DNET_RETURN_ERR; + setting_create_simple_popup(ad, ad->win_get, + NULL, _("IDS_COM_POP_FAILED")); + return ret; + } + connection_profile_destroy(con_info); + } else { + + err = connection_update_profile(ad->connection, con_info); + if (err != CONNECTION_ERROR_NONE) { + SETTING_TRACE_ERROR + ("%s*** [ERR] net_modify_profile. err=%d ***%s", + SETTING_FONT_RED, err, SETTING_FONT_BLACK); + ret = SETTING_DNET_RETURN_ERR; + setting_create_simple_popup(ad, ad->win_get, + NULL, _("IDS_COM_POP_FAILED")); + } + } + return ret; +} + +/* *************************************************** + * + *call back func + * + ***************************************************/ +static void +setting_network_edit_connection_click_softkey_eidt_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + //setting_enable_evas_object(ad->scl_edit); + __genlist_disable_set(ad->scl_edit, FALSE); + /* create buttons */ + if (!ad->l_button) //go into first time + { + ad->l_button = setting_create_button(ad->navi_bar, _("IDS_COM_SK_DONE"), + "naviframe/title/icon/edit", + setting_network_edit_connection_click_softkey_save_cb, + ad); + } + + if (!ad->r_button) //go into first time + { + ad->r_button = setting_create_button(ad->navi_bar, _("IDS_COM_SK_CANCEL"), + NAVI_BACK_BUTTON_STYLE, + setting_network_edit_connection_click_softkey_cancel_cb, + ad); + } + /*if (!ad->m_button) //go into first time + { + ad->m_button = setting_create_button(ad->navi_bar, NULL, + BTN_STYLE_DEF, + NULL, ad); + }*/ + if (ad->l_button) { + elm_object_item_part_content_set(ad->navi_it, NAVI_BTN_STYLE_LEFT, ad->l_button); + evas_object_show(ad->l_button); + } + if (ad->r_button) { + elm_object_item_part_content_set(ad->navi_it, NAVI_BTN_STYLE_RIGHT, ad->r_button); + ad->has_form_changed = TRUE;//intialize + setting_network_connection_check_entry_empty(ad); + ad->has_form_changed = FALSE;//restore + } + /*if (ad->m_button) { + elm_object_item_part_content_set(ad->navi_it, NAVI_BTN_STYLE_MORE, ad->m_button); + evas_object_show(ad->r_button); + }*/ + + //remove '<-' button + ad->back_btn = elm_object_item_part_content_unset(ad->navi_it, NAVI_BTN_STYLE_PREV); + elm_object_item_part_content_set(ad->navi_it, NAVI_BTN_STYLE_PREV, NULL); + evas_object_hide(ad->back_btn); + + //remove other buttons + ad->bottom_btn = elm_object_item_part_content_unset(ad->navi_it, "toolbar_button1"); + elm_object_item_part_content_set(ad->navi_it, "toolbar_button1", NULL); + evas_object_hide(ad->bottom_btn); +} + + +static void +setting_network_edit_connection_click_softkey_save_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + /* elm_box_unpack_all(ad->bx_blk); */ + /* elm_dialoguegroup_remove_all(ad->dg_blk); */ + + int ret = __save_connection(ad); + /* need special handle */ + if (SETTING_DNET_RETURN_NULL_ACCESS_NAME == ret + || SETTING_DNET_RETURN_NULL_USER_NAME == ret + || SETTING_DNET_RETURN_NULL_PASSWORD == ret + || SETTING_DNET_RETURN_INVALID_PROXY_ADDR == ret + || SETTING_DNET_RETURN_ERR == ret) { + return; + } + if (ret != SETTING_RETURN_SUCCESS) { + SETTING_TRACE_ERROR + ("%s*** [ERR] __save_connection ***%s", + SETTING_FONT_RED, SETTING_FONT_BLACK); + } + + setting_create_popup_without_btn(ad, ad->win_get, NULL, _(KeyStr_Saved), NULL, POPUP_INTERVAL, FALSE, FALSE); + //re-fetch connection info.. + __get_connection_info(ad); + + //UI update + elm_object_item_text_set(ad->navi_it, _(ad->con_name)); + setting_network_edit_connection_click_softkey_cancel_cb(ad, ad->r_button, NULL); +} + +static void +setting_network_edit_connection_click_softkey_back_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + /* elm_box_unpack_all(ad->bx_blk); */ + /* elm_dialoguegroup_remove_all(ad->dg_blk); */ + setting_view_change(&setting_view_network_connection_create, + &setting_view_network_con, ad); +} +static void +setting_network_edit_connection_click_softkey_cancel_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + ad->l_button = elm_object_item_part_content_unset(ad->navi_it, NAVI_BTN_STYLE_LEFT); + elm_object_item_part_content_set(ad->navi_it, NAVI_BTN_STYLE_LEFT, NULL); + evas_object_hide(ad->l_button); +/* + ad->m_button = elm_object_item_part_content_unset(ad->navi_it, NAVI_BTN_STYLE_MORE); + elm_object_item_part_content_set(ad->navi_it, NAVI_BTN_STYLE_MORE, NULL); + evas_object_hide(ad->m_button);*/ + + ad->r_button = elm_object_item_part_content_unset(ad->navi_it, NAVI_BTN_STYLE_RIGHT); + elm_object_item_part_content_set(ad->navi_it, NAVI_BTN_STYLE_RIGHT, NULL); + evas_object_hide(ad->r_button); + //setting_disable_evas_object(ad->r_button); + setting_undo_dim_evas_object(ad->r_button, TRUE); + + elm_object_item_part_content_set(ad->navi_it, NAVI_BTN_STYLE_PREV, ad->back_btn); + elm_object_item_part_content_set(ad->navi_it, "toolbar_button1", ad->bottom_btn); + evas_object_show(ad->back_btn); + evas_object_show(ad->bottom_btn); + + __get_connection_info(ad); + __update_genlist_info(ad); + if(ad->data_auth_type) elm_genlist_item_expanded_set(ad->data_auth_type->item, FALSE); + ecore_idler_add(__connection_idler, ad); +} +static void _gl_Gendial_sel(void *data, Evas_Object *obj, void *event_info) +{ + /* SETTING_TRACE_BEGIN; */ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + return; +} + +static void setting_network_connection_check_entry_empty(SettingNetworkUG *ad) +{ + SETTING_TRACE_BEGIN; + if (!ad->has_form_changed) + { + SETTING_TRACE_DEBUG("ad->has_form_changed == FALSE!"); + return; + } + bool isFoundEmptyEntry = FALSE; + + do { + if (ad->data_acs_name && isEmptyStr(ad->data_acs_name->sub_desc)) { + SETTING_TRACE("entry_str:%s", ad->data_acs_name->sub_desc); + isFoundEmptyEntry = TRUE; + break; + } + if (ad->data_user_name && isEmptyStr(ad->data_user_name->sub_desc)) { + SETTING_TRACE("entry_str:%s", ad->data_user_name->sub_desc); + isFoundEmptyEntry = TRUE; + break; + } + if (ad->data_pwd && isEmptyStr(ad->data_pwd->sub_desc)) { + SETTING_TRACE("entry_str:%s", ad->data_pwd->sub_desc); + isFoundEmptyEntry = TRUE; + break; + } + if (ad->data_hm_url && isEmptyStr(ad->data_hm_url->sub_desc)) { + SETTING_TRACE("entry_str:%s", ad->data_hm_url->sub_desc); + isFoundEmptyEntry = TRUE; + break; + } + } while (0); + Evas_Object *done_btn = elm_object_item_part_content_get(ad->navi_it, NAVI_BTN_STYLE_LEFT); + if (isFoundEmptyEntry) { + if (!evas_object_pass_events_get(done_btn)) {//it had not yet been disabled + setting_disable_evas_object(done_btn); + setting_dim_evas_object(done_btn, TRUE); + } + else + { + //do nothing..if invoke setting_dim_evas_object many times, the done button will be dimer until it cannot be see. + //refer to the API of setting_dim_evas_object(). The API is supplied by Setting itself, winset doesn't support until now as I now. + } + } else { + setting_enable_evas_object(done_btn); + setting_undo_dim_evas_object(done_btn, TRUE); + } +} + +static void +setting_network_edit_connection_display_auth_type(SettingNetworkUG *ad, + int auth_type) +{ + SETTING_TRACE_BEGIN; + retm_if(ad == NULL, "Data parameter is NULL"); + if (ad->chkType == auth_type) return; + + ad->chkType = auth_type; /* for update genlist */ + if (CONNECTION_CELLULAR_AUTH_TYPE_NONE != auth_type) { /* to show */ + SETTING_TRACE("ad->is_show_user:%d", ad->is_show_user); + if (ad->is_show_user == 0) { /* do only when hiden */ + SETTING_TRACE("to create"); + + ad->data_user_name = + (Setting_GenGroupItem_Data *) calloc(1, + sizeof + (Setting_GenGroupItem_Data)); + setting_retm_if(ad->data_user_name == NULL, "calloc failed"); + ad->data_user_name->keyStr = + (char *)g_strdup("IDS_COM_BODY_USER_NAME"); + ad->data_user_name->sub_desc = + (char *)g_strdup(ad->ed_user_name_desc); + ad->data_user_name->swallow_type = + SWALLOW_Type_LAYOUT_ENTRY; + ad->data_user_name->userdata = ad; + ad->data_user_name->chk_change_cb = + setting_network_connection_entry_changed_cb; + ad->data_user_name->limit_filter_data = calloc(1, sizeof(Elm_Entry_Filter_Accept_Set)); + if (ad->data_user_name->limit_filter_data) { + ad->data_user_name->limit_filter_data->max_byte_count = MAX_PDP_AUTH_USERNAME_LEN_MAX - 1; + ad->data_user_name->win_main = ad->win_get; + } + ad->data_user_name->item = + elm_genlist_item_insert_after(ad->scl_edit, + &itc_1icon, + ad->data_user_name, + NULL, + ad->item_above_user_name, + ELM_GENLIST_ITEM_NONE, + _gl_Gendial_sel, ad); + + ad->data_pwd = + (Setting_GenGroupItem_Data *) calloc(1, + sizeof + (Setting_GenGroupItem_Data)); + + setting_retm_if(ad->data_pwd == NULL, "calloc failed"); + ad->data_pwd->keyStr = + (char *)g_strdup("IDS_COM_BODY_PASSWORD"); + ad->data_pwd->sub_desc = + (char *)g_strdup(ad->ed_pwd_desc); + ad->data_pwd->swallow_type = SWALLOW_Type_LAYOUT_ENTRY; + ad->data_pwd->userdata = ad; + ad->data_pwd->chk_change_cb = + setting_network_connection_entry_changed_cb; + ad->data_pwd->isPasswordFlag = TRUE; + /* ad->data_pwd->chk_change_cb = chk_change_cb; */ + ad->data_pwd->limit_filter_data = calloc(1, sizeof(Elm_Entry_Filter_Accept_Set)); + if (ad->data_pwd->limit_filter_data) { + ad->data_pwd->limit_filter_data->max_byte_count = MAX_PDP_AUTH_PASSWORD_LEN_MAX - 1; + ad->data_pwd->win_main = ad->win_get; + } + ad->data_pwd->item = + elm_genlist_item_insert_after(ad->scl_edit, + &itc_1icon, + ad->data_pwd, NULL, + ad-> + data_user_name->item, + ELM_GENLIST_ITEM_NONE, + _gl_Gendial_sel, ad); + + ad->item_above_proxy_add = + elm_genlist_item_insert_after(ad->scl_edit, + &itc_seperator, + NULL, NULL, + ad->data_pwd->item, + ELM_GENLIST_ITEM_NONE, + NULL, NULL); + elm_genlist_item_select_mode_set + (ad->item_above_proxy_add, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + ad->has_form_changed = TRUE; + setting_network_connection_check_entry_empty(ad); + /* ad->is_show_user = 1; */ + } + ad->is_show_user = 1; + } else { /* to hide */ + + SETTING_TRACE("ad->is_show_user:%d", ad->is_show_user); + if (ad->is_show_user == 1) { /* do only when shown */ + SETTING_TRACE("to destroy"); + if (ad->data_user_name) { + elm_object_item_del(ad->data_user_name->item); + ad->data_user_name = NULL; + } + if (ad->data_pwd) { + elm_object_item_del(ad->data_pwd->item); + ad->data_pwd = NULL; + } + if (ad->item_above_proxy_add) { + elm_object_item_del(ad->item_above_proxy_add); + ad->item_above_proxy_add = NULL; + } + + } + ad->has_form_changed = TRUE; + setting_network_connection_check_entry_empty(ad); + ad->is_show_user = 0; + + } +} + +static void +setting_network_connection_entry_changed_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + SettingNetworkUG *ad = list_item->userdata; + const char *entry_str = elm_entry_entry_get(obj); + list_item->sub_desc = (char *)g_strdup(entry_str); + //SETTING_TRACE("list_item->sub_desc:%s", list_item->sub_desc); + ad->has_form_changed = TRUE; + setting_network_connection_check_entry_empty(ad); +} +static void +setting_network_connection_hide_input_pannel(void *data) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + SettingNetworkUG *ad = data; + if (ad->data_acs_name) { + setting_hide_input_pannel_cb(ad->data_acs_name->eo_check); + } + if (ad->data_user_name) { + setting_hide_input_pannel_cb(ad->data_user_name->eo_check); + } + if (ad->data_pwd) { + setting_hide_input_pannel_cb(ad->data_pwd->eo_check); + } + if (ad->data_pxy_addr) { + setting_hide_input_pannel_cb(ad->data_pxy_addr->eo_check); + } + if (ad->data_pxy_port) { + setting_hide_input_pannel_cb(ad->data_pxy_port->eo_check); + } + if (ad->data_hm_url) { + setting_hide_input_pannel_cb(ad->data_hm_url->eo_check); + } +} + diff --git a/setting-network/src/setting-network-main-help.c b/setting-network/src/setting-network-main-help.c new file mode 100755 index 0000000..6063b97 --- /dev/null +++ b/setting-network/src/setting-network-main-help.c @@ -0,0 +1,172 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 + +#define SELECT_NETWORK "1. Select network
"/*1. Select network*/\ + "User can select network operator which are supported in "\ + "current location. Even if you select specific network "\ + "operator in list, you may not use it, because your SIM card"\ + " is not verified with it.
-Recommend : Select automatic" + +#define NETWORK_MODE "2. Network mode
"/*2. Network mode*/\ + "Network mode list means possible network bands to be "\ + "attached. According to the condition of current network, "\ + "phone may be attached or not with user selection."\ + "
-Recommend : Select automatic" + +#ifdef ENABLED_PREFERRED_NETWORKS +#define PERFER_NETWORKS "3. Preferred networks
"/*3. Preferred networks*/\ + "User defined network list which is stored in SIM card. "\ + "If the phone couldn`t be registered with high priority "\ + "procedure, phone will try to register to network by using "\ + "user defined network list. The first record indicates the "\ + "highest priority and the last record indicates the lowest." + +#define DATA_ROAMING "4. Data roaming setting
"/*4. Data roaming setting*/\ + "User can select data roaming availability. If user sets to "\ + "'OFF', user can not use data service when phone is registered "\ + "to roaming network (not home network) currently." +#else +#define PERFER_NETWORKS "" +#define DATA_ROAMING "3. Data roaming setting
"/*3. Data roaming setting*/\ + "User can select data roaming availability. If user sets to "\ + "'OFF', user can not use data service when phone is registered "\ + "to roaming network (not home network) currently." +#endif + +static int setting_network_main_help_create(void *cb); +static int setting_network_main_help_destroy(void *cb); +static int setting_network_main_help_update(void *cb); +static int setting_network_main_help_cleanup(void *cb); + +setting_view setting_view_network_main_help = { + .create = setting_network_main_help_create, + .destroy = setting_network_main_help_destroy, + .update = setting_network_main_help_update, + .cleanup = setting_network_main_help_cleanup, +}; + +/* *************************************************** + * + *basic func + * + ***************************************************/ + +static int setting_network_main_help_create(void *cb) +{ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SETTING_TRACE_BEGIN; + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + + Evas_Object *genlist; + setting_push_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _("IDS_COM_BODY_HELP"), + _("IDS_COM_BODY_BACK"), + NULL, + setting_network_main_help_click_back_cb, + NULL, ad, &genlist, + ad->navi_bar); + + //SELECT_NETWORK + setting_create_Gendial_field_def(genlist, &itc_multiline_text, + NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, NULL, NULL, + 0, SELECT_NETWORK, NULL, + NULL); + + + //NETWORK_MODE + setting_create_Gendial_field_def(genlist, &itc_multiline_text, + NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, NULL, NULL, + 0, NETWORK_MODE, NULL, + NULL); + + + //PERFER_NETWORKS + #ifdef ENABLED_PREFERRED_NETWORKS + setting_create_Gendial_field_def(genlist, &itc_multiline_text, + NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, NULL, NULL, + 0, PERFER_NETWORKS, NULL, + NULL); + #endif + + //DATA_ROAMING + setting_create_Gendial_field_def(genlist, &itc_multiline_text, + NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, NULL, NULL, + 0, DATA_ROAMING, NULL, + NULL); + + setting_view_network_main_help.is_create = 1; + SETTING_TRACE_END; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_main_help_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + elm_naviframe_item_pop(ad->navi_bar); + setting_view_network_main_help.is_create = 0; + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_main_help_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_main_help_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + return setting_network_main_help_destroy(cb); +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void +setting_network_main_help_click_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + setting_view_change(&setting_view_network_main_help, + &setting_view_network_main, ad); +} diff --git a/setting-network/src/setting-network-main.c b/setting-network/src/setting-network-main.c new file mode 100755 index 0000000..e0ad18c --- /dev/null +++ b/setting-network/src/setting-network-main.c @@ -0,0 +1,722 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 + +#define MOBILE_DATA_WITHOUT_WIFI_STR "IDS_ST_BODY_MOBILE_DATA_WILL_BE_USED_IF_YOU_DOWNLOAD_OR_UPLOAD_DATA_WITHOUT_WI_FI_CONNECTION" +#define UMTS_MODE_WORK_OUTSIDE_STR "IDS_ST_BODY_UMTS_MODE_ONLY_WORKS_INSIDE_3G_COVERAGE_AREA" +#define BAND_OPERATE_OUTSIDE_USA_CANADA_STR "IDS_ST_BODY_THIS_BAND_MAY_NOT_WORK_OUTSIDE_THE_USA_AND_CANADA" + +static int setting_network_main_create(void *cb); +static int setting_network_main_destroy(void *cb); +static int setting_network_main_update(void *cb); +static int setting_network_main_cleanup(void *cb); + +setting_view setting_view_network_main = { + .create = setting_network_main_create, + .destroy = setting_network_main_destroy, + .update = setting_network_main_update, + .cleanup = setting_network_main_cleanup, +}; + +static void setting_network_main_item_Gendial_mouse_up_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_network_main_click_softkey_help_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_network_main_click_softkey_back_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_network_main_chk_btn_cb(void *data, Evas_Object *obj, + void *event_info); +static void setting_network_use_packet_resp_cb(void *data, Evas_Object *obj, + void *event_info); +static void __setting_network_data_roaming_resp_cb(void *data, Evas_Object *obj, + void *event_info); + + +/* *************************************************** + * + *basic func + * + ***************************************************/ +void __network_sub_list_sel_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + ret_if(NULL == data); + SettingNetworkUG *ad = (SettingNetworkUG *) data; + Elm_Object_Item *subitem = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(subitem, 0); + Setting_GenGroupItem_Data *data_subItem = elm_object_item_data_get(subitem); + SETTING_TRACE("data_subItem->chk_status:%d", data_subItem->chk_status); + SETTING_TRACE("elm_radio_value_get(ad->data_net_mode->rgd):%d", elm_radio_value_get(ad->data_net_mode->rgd)); + if (data_subItem->chk_status == elm_radio_value_get(ad->data_net_mode->rgd)) + { + return; + } + elm_radio_value_set(ad->data_net_mode->rgd, data_subItem->chk_status); + + ad->net_mode = data_subItem->chk_status; + int tapi_ret = tel_set_network_mode(ad->handle, data_subItem->chk_status, setting_tapi_set_band_cb, ad); + if (tapi_ret != TAPI_API_SUCCESS) { + SETTING_TRACE_DEBUG + ("%s*** [ERR] tel_set_network_mode. tapi_ret=%d ***%s", + SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _(Invok_API_Failed_Desc), NULL, POPUP_INTERVAL, FALSE, FALSE); + //rollback + int err; + setting_get_int_slp_key(ad->data_net_mode->int_slp_setting_binded, + &(ad->net_mode), &err); + /** @todo check 'err' variable for exception handling */ + elm_radio_value_set(ad->data_net_mode->rgd, ad->net_mode); + return; + } + + //it will be deleted in callback set by tel_set_network_mode(that is setting_tapi_set_band_cb.) + ad->network_ug_pop = setting_create_popup_without_btn(ad, ad->win_get, NULL, + _("IDS_COM_POP_PROCESSING"), NULL, + 0.0, TRUE, TRUE); +} + + +static void +__setting_network_main_exp_cb(void *data, Evas_Object *obj, void *event_info) +{ + ret_if(NULL == data || NULL == event_info); + SETTING_TRACE_BEGIN; + SettingNetworkUG *ad = (SettingNetworkUG *) data; + Elm_Object_Item *parentItem = event_info; /* parent item */ + Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); /* parent data */ + Evas_Object *scroller = elm_object_item_widget_get(parentItem); + + Evas_Object *rgd; + if (data_parentItem == ad->data_net_mode) { + rgd = elm_radio_add(scroller); + elm_radio_value_set(rgd, -1); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + __network_sub_list_sel_cb, + ad, parentItem, + SWALLOW_Type_1RADIO, rgd, + TAPI_NETWORK_MODE_AUTO, + Keystr_NetBrand_Auto, NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + __network_sub_list_sel_cb, + ad, parentItem, + SWALLOW_Type_1RADIO, rgd, + TAPI_NETWORK_MODE_GSM, + Keystr_NetBrand_GSM, NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + __network_sub_list_sel_cb, + ad, parentItem, + SWALLOW_Type_1RADIO, rgd, + TAPI_NETWORK_MODE_WCDMA, + Keystr_NetBrand_WCDMA, NULL); + + data_parentItem->rgd = rgd; + setting_update_chk_status(rgd, data_parentItem->int_slp_setting_binded); + + } +} + +#define __switch_radio_state(cur_data, dst_state, dst_key) do { \ + if (cur_data)\ + {\ + old_status = cur_data->chk_status;\ + cur_data->chk_status = dst_state;\ + elm_radio_state_value_set(cur_data->eo_check, cur_data->chk_status);\ + if (sel_mode == old_status)\ + {\ + sel_item_data = cur_data;\ + }\ + \ + G_FREE(cur_data->keyStr);\ + cur_data->keyStr = g_strdup(dst_key);\ + elm_genlist_item_fields_update(cur_data->item, "*", ELM_GENLIST_ITEM_FIELD_TEXT);\ + }\ +} while (0); + +static void __3g_change_cb(keynode_t *key, void *data) +{ + SETTING_TRACE_BEGIN; + ret_if(NULL == data); + SettingNetworkUG *ad = data; + int status = vconf_keynode_get_bool(key); + char *vconf_name = vconf_keynode_get_name(key); + SETTING_TRACE("vconf_name:%s, status:%d", vconf_name, status); + + if (!safeStrCmp(vconf_name, VCONFKEY_3G_ENABLE)) { + if(ad->data_use_packet) + { + ad->data_use_packet->chk_status = status; + elm_check_state_set(ad->data_use_packet->eo_check, ad->data_use_packet->chk_status); + } + } +} +static void __data_roaming_change_cb(keynode_t *key, void *data) +{ + SETTING_TRACE_BEGIN; + ret_if(NULL == data); + SettingNetworkUG *ad = data; + int status = vconf_keynode_get_bool(key); + char *vconf_name = vconf_keynode_get_name(key); + SETTING_TRACE("vconf_name:%s, status:%d", vconf_name, status); + + if (!safeStrCmp(vconf_name, VCONFKEY_SETAPPL_STATE_DATA_ROAMING_BOOL) && ad->data_roaming) { + ad->data_roaming->chk_status = status; + elm_check_state_set(ad->data_roaming->eo_check, ad->data_roaming->chk_status); + if (status) + { + int value = 0; + int err = 0; + setting_get_bool_slp_key(BOOL_SLP_SETTING_USE_PACKET_DATA, &value, &err); + setting_retm_if(err != 0, "get vconf failed"); + if (!value) { + setting_set_bool_slp_key(BOOL_SLP_SETTING_USE_PACKET_DATA, + SETTING_ON_OFF_BTN_ON, &err); + } + } + } +} + +static int setting_network_main_create(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + /* ***BEGIN*** Fixed the problem of word twinkle SAMSUNG 2010/7/21 add */ + int value = 0; + int k = -1; + /* ****END**** Fixed the problem of word twinkle SAMSUNG 2010/7/21 add */ + + Evas_Object *scroller; + + ad->ly_main = + setting_create_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _("IDS_ST_BODY_NETWORK"), + dgettext("sys_string", + "IDS_COM_BODY_BACK"), + NULL,//_("IDS_COM_BODY_HELP"), + setting_network_main_click_softkey_back_cb, + setting_network_main_click_softkey_help_cb, + ad, &scroller, + &ad->navi_bar); + + setting_enable_expandable_genlist(scroller, ad, + __setting_network_main_exp_cb, NULL); + + Elm_Object_Item *item = NULL;; + + item = + elm_genlist_item_append(scroller, &itc_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + int value_use_packet; + int err_use_packet; + setting_get_bool_slp_key(BOOL_SLP_SETTING_USE_PACKET_DATA, + &value_use_packet, &err_use_packet); + /** @todo check 'err_use_packet' variable for exception handling */ + ad->data_use_packet = + setting_create_Gendial_field_def(scroller, &itc_1text_1icon, + setting_network_main_item_Gendial_mouse_up_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, value_use_packet, + KeyStr_UsePacketData, NULL, + setting_network_main_chk_btn_cb); + if (ad->data_use_packet) { + ad->data_use_packet->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_use_packet is NULL"); + } + + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, Data_packet_Desc, NULL, + NULL); + elm_genlist_item_select_mode_set(elm_genlist_item_append(scroller, &(itc_seperator), NULL, NULL,ELM_GENLIST_ITEM_NONE, NULL, NULL), + ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* data roaming */ + int value_data_roaming = 0; + int err_data_roaming = 0; + setting_get_bool_slp_key(BOOL_SLP_SETTING_DATA_ROAMING, + &value_data_roaming, &err_data_roaming); + if (err_data_roaming != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + ad->data_roaming = setting_create_Gendial_field_def(scroller, &itc_1text_1icon, + setting_network_main_item_Gendial_mouse_up_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, value_data_roaming, + KeyStr_DataRoaming, NULL, + setting_network_main_chk_btn_cb); + if (ad->data_roaming) { + ad->data_roaming->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_roaming is NULL"); + } + + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, SETTING_NETWORK_DATA_ROMING_DESC, NULL, + NULL); + elm_genlist_item_select_mode_set(elm_genlist_item_append(scroller, &(itc_seperator), NULL, NULL,ELM_GENLIST_ITEM_NONE, NULL, NULL), + ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + + /* (void)setting_create_Gendial_field_titleItem(scroller, &(ad->itc_group_item), speciliztion, NULL); */ + + /* Don't need to check flight mode,if flight mode is on, thw whole Network function will be disable*/ + /* ***BEGIN*** Fixed the problem of word twinkle SAMSUNG 2010/7/21 add */ + ad->sel_net = TAPI_NETWORK_SELECTIONMODE_AUTOMATIC; + ad->sel_act = TAPI_NETWORK_SYSTEM_NO_SRV; + vconf_get_int(VCONFKEY_SETAPPL_SELECT_NETWORK_INT, &ad->sel_net); + vconf_get_int(VCONFKEY_SETAPPL_SELECT_OLD_NT_ACT, &ad->sel_act); + + FREE(ad->sel_network); + //ad->sel_network = vconf_get_str(VCONFKEY_TELEPHONY_NWNAME); + ad->sel_network = get_pa_select_network(); + SETTING_TRACE("pa_sel_net_name:%s", ad->sel_network); + if (isEmptyStr(ad->sel_network)) { + ad->sel_network = strndup(Keystr_UNKNOWN_NETWORK, strlen(Keystr_UNKNOWN_NETWORK)+1); + } + SETTING_TRACE("pa_net_name:%s", ad->sel_network); + SETTING_TRACE("old act:%d", ad->sel_act); + SETTING_TRACE("old network mode:%d", ad->sel_net); + + char sel_network_desc[MAX_COMMON_BUFFER_LEN] = { 0, }; + if (TAPI_NETWORK_SELECTIONMODE_MANUAL == value) { + snprintf(sel_network_desc, MAX_COMMON_BUFFER_LEN, + "%s, %s (%s)", _("IDS_COM_BODY_MANUAL"), _(ad->sel_network), + setting_network_get_act_str(ad->sel_act)); + } + else{ + snprintf(sel_network_desc, MAX_COMMON_BUFFER_LEN, + "%s, %s", _("IDS_COM_BODY_AUTOMATIC"), _(ad->sel_network)); + } + + ad->data_sel_net = setting_create_Gendial_field_def(scroller, + &itc_2text_3, + setting_network_main_item_Gendial_mouse_up_cb, + ad, SWALLOW_Type_INVALID, + NULL, NULL, 0, + "IDS_ST_BODY_SELECT_NETWORK", + sel_network_desc, NULL); + if (ad->data_sel_net) { + ad->data_sel_net->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_sel_net is NULL"); + } + /* ***BEGIN*** Fixed the problem of word twinkle SAMSUNG 2010/7/21 add */ + /* hide NETWORK MODE in Emulator*/ + char *sub_des = NULL; + value = TAPI_NETWORK_MODE_AUTO; + k = vconf_get_int(VCONFKEY_SETAPPL_NETWORK_MODE_INT, &value); + if (-1 != k) { + SETTING_TRACE("VCONFKEY_SETAPPL_NETWORK_MODE_INT value:%d", value); + switch (value) { + case TAPI_NETWORK_MODE_AUTO: + case TAPI_NETWORK_MODE_LTE|TAPI_NETWORK_MODE_GSM|TAPI_NETWORK_MODE_WCDMA: + { + sub_des = _(Keystr_NetBrand_Auto); + break; + } + + case TAPI_NETWORK_MODE_GSM: + sub_des = _(Keystr_NetBrand_GSM); + break; + case TAPI_NETWORK_MODE_WCDMA: + sub_des = _(Keystr_NetBrand_WCDMA); + break; + case TAPI_NETWORK_MODE_LTE|TAPI_NETWORK_MODE_WCDMA: + sub_des = _(Keystr_NetBrand_LTE_WCDMA); + break; + case TAPI_NETWORK_MODE_GSM|TAPI_NETWORK_MODE_WCDMA: + sub_des = _(Keystr_NetBrand_Auto_WCDMA_GSM); + break; + default: + break; + } + } + + ad->data_net_mode = + setting_create_Gendial_exp_parent_field(scroller, + &itc_2text_3_parent, + NULL, NULL, + SWALLOW_Type_INVALID, + "IDS_ST_BODY_NETWORK_MODE", + sub_des); + if (ad->data_net_mode) { + ad->data_net_mode->int_slp_setting_binded = + INT_SLP_SETTING_NETWORK_MODE; + ad->data_net_mode->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_back is NULL"); + } + + setting_create_Gendial_field_def(scroller, &itc_1text, + setting_network_main_item_Gendial_mouse_up_cb, + ad, SWALLOW_Type_INVALID, NULL, NULL, + 0, CONNECTION_DSC, + NULL, NULL); + + item = elm_genlist_item_append(scroller, &itc_bottom_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + vconf_notify_key_changed(VCONFKEY_3G_ENABLE, __3g_change_cb, ad); + vconf_notify_key_changed(VCONFKEY_SETAPPL_STATE_DATA_ROAMING_BOOL, __data_roaming_change_cb, ad); + + setting_view_network_main.is_create = 1; + setting_view_update(&setting_view_network_main, ad); + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_main_destroy(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + vconf_ignore_key_changed(VCONFKEY_3G_ENABLE, __3g_change_cb); + vconf_ignore_key_changed(VCONFKEY_SETAPPL_STATE_DATA_ROAMING_BOOL, __data_roaming_change_cb); + + if (ad->ly_main != NULL) { + evas_object_del(ad->ly_main); + } + if(ad->network_ug_pop) + { + evas_object_del(ad->network_ug_pop); + ad->network_ug_pop = NULL; + } + ad->data_sel_net = NULL;//reset NULL after genlis destoryed with ly_main. + + setting_view_network_main.is_create = 0; + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_main_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + + if (ad->ly_main != NULL) { + + evas_object_show(ad->ly_main); + } + SETTING_TRACE_END; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_main_cleanup(void *cb) +{ + /* error check */ + /* retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); */ + + /* SettingNetworkUG *ad = (SettingNetworkUG *)cb; */ + + /* all the view in view stack shared the ad->ly_main, it cannot be hided!!! */ + /* if(ad->ly_main != NULL) */ + /* { */ + /* evas_object_hide(ad->ly_main); */ + /* } */ + + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void +setting_network_main_click_softkey_help_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + setting_view_change(&setting_view_network_main, + &setting_view_network_main_help, ad); +} + +static void +setting_network_main_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + /* Send destroy request */ + ug_destroy_me(ad->ug); +} + +static void +setting_network_main_item_Gendial_mouse_up_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + + SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); + int ret; + + if (!safeStrCmp("IDS_ST_BODY_SELECT_NETWORK", list_item->keyStr)) { + ret = + setting_view_change(&setting_view_network_main, + &setting_view_network_select_network, + ad); + } + else if (!safeStrCmp(KeyStr_UsePacketData, list_item->keyStr)) { + int old_status = elm_check_state_get(list_item->eo_check); + /* new status */ + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + if (!list_item->chk_status) { + ad->popup = + setting_create_popup_with_btn(ad, ad->win_get, + NULL, _(SETTING_NETWORK_USE_PACKET_DATA_OFF_DESC), + setting_network_use_packet_resp_cb, + 0, 2, _("IDS_COM_SK_YES"),_("IDS_COM_SK_NO")); + } else { + ad->popup = + setting_create_popup_with_btn(ad, ad->win_get, + NULL, _(SETTING_NETWORK_USE_PACKET_DATA_ON_DESC), + setting_network_use_packet_resp_cb, + 0, 1, _("IDS_COM_SK_OK")); + } + + } else if (!safeStrCmp(KeyStr_DataRoaming, list_item->keyStr)) { + int old_status = elm_check_state_get(list_item->eo_check); + /* new status */ + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + + char *notify_str = NULL; + if (!list_item->chk_status) { + notify_str = SETTING_NETWORK_DATA_ROMING_OFF_DESC; + ad->popup = setting_create_popup_with_btn(ad, ad->win_get, + NULL, notify_str, + __setting_network_data_roaming_resp_cb, 0, + 1, _("IDS_COM_SK_OK")); + } else { + int err = 0; + setting_set_bool_slp_key(BOOL_SLP_SETTING_DATA_ROAMING, + SETTING_ON_OFF_BTN_ON, &err); + } + } else if(!safeStrCmp(CONNECTION_DSC, list_item->keyStr)) { + ret = setting_view_change(&setting_view_network_main, + &setting_view_network_con, ad); + } +} + +static void +setting_network_main_chk_btn_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + SettingNetworkUG *ad = NULL; + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + ad = list_item->userdata; + list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */ + + if (obj == ad->data_use_packet->eo_check) { + if (!list_item->chk_status) { + ad->popup = + setting_create_popup_with_btn(ad, ad->win_get, + NULL, _(SETTING_NETWORK_USE_PACKET_DATA_OFF_DESC), + setting_network_use_packet_resp_cb, + 0, 2, _("IDS_COM_SK_YES"),_("IDS_COM_SK_NO")); + } else { + ad->popup = + setting_create_popup_with_btn(ad, ad->win_get, + NULL, _(SETTING_NETWORK_USE_PACKET_DATA_ON_DESC), + setting_network_use_packet_resp_cb, + 0, 1, _("IDS_COM_SK_OK")); + } + }else if (obj == ad->data_roaming->eo_check) { + char *notify_str = NULL; + if (!list_item->chk_status) { + notify_str = SETTING_NETWORK_DATA_ROMING_OFF_DESC; + ad->popup = setting_create_popup_with_btn(ad, ad->win_get, + NULL, notify_str, + __setting_network_data_roaming_resp_cb, 0, + 1, _("IDS_COM_SK_OK")); + } else { + int err = 0; + setting_set_bool_slp_key(BOOL_SLP_SETTING_DATA_ROAMING, + SETTING_ON_OFF_BTN_ON, &err); + } + } +} + +static void +setting_network_use_packet_resp_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + int err = 0; /* error check */ + int response_type = btn_type(obj); + + int value = 0; + setting_get_bool_slp_key(BOOL_SLP_SETTING_USE_PACKET_DATA, &value, &err); + setting_retm_if(err != 0, "get vconf failed"); + SETTING_TRACE("value = %d", value); + if (POPUP_RESPONSE_OK == response_type) { + if (value == 0) { + setting_set_bool_slp_key(BOOL_SLP_SETTING_USE_PACKET_DATA, + SETTING_ON_OFF_BTN_ON, &err); + setting_retm_if(err != 0, "set vconf failed"); + + elm_check_state_set(ad->data_use_packet->eo_check, 1); + ad->data_use_packet->chk_status = 1; + + /* if called by other apps, destroy ug */ + if (!safeStrCmp(ad->view_type_string, "DATA_ROAMING")) { + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + ug_destroy_me(ad->ug); + return; + } + } else { + setting_set_bool_slp_key(BOOL_SLP_SETTING_USE_PACKET_DATA, + SETTING_ON_OFF_BTN_OFF, &err); + setting_retm_if(err != 0, "set vconf failed"); + + elm_check_state_set(ad->data_use_packet->eo_check, 0); + ad->data_use_packet->chk_status = 0; + + /* should set data_roming as same as status of use_packet_data */ + int data_roaming_value = 0; + setting_get_bool_slp_key(BOOL_SLP_SETTING_DATA_ROAMING, &data_roaming_value, &err); + setting_retm_if(err != 0, "get vconf failed"); + if (data_roaming_value) { + setting_set_bool_slp_key(BOOL_SLP_SETTING_DATA_ROAMING, + SETTING_ON_OFF_BTN_OFF, &err); + setting_retm_if(err != 0, "set vconf failed"); + + elm_check_state_set(ad->data_roaming->eo_check, 0); + ad->data_roaming->chk_status = 0; + } + } + } else if (POPUP_RESPONSE_CANCEL == response_type) { + /* rollback */ + if (value == 1) { + setting_set_bool_slp_key(BOOL_SLP_SETTING_USE_PACKET_DATA, + SETTING_ON_OFF_BTN_ON, &err); + setting_retm_if(err != 0, "set vconf failed"); + elm_check_state_set(ad->data_use_packet->eo_check, 1); + ad->data_use_packet->chk_status = 1; + } + } + if (ad->popup) + { + evas_object_del(ad->popup); + ad->popup = NULL; + } + +} + +static void __setting_network_data_roaming_resp_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + int response_type = btn_type(obj); + SETTING_TRACE("elm_object_parent_widget_get(obj):%p", elm_object_parent_widget_get(obj)); + SETTING_TRACE("obj:%p", obj); + if (POPUP_RESPONSE_OK == response_type) { + int value = 0; + int err = 0; + setting_get_bool_slp_key(BOOL_SLP_SETTING_DATA_ROAMING, &value, &err); + + if (value == 0) { + setting_set_bool_slp_key(BOOL_SLP_SETTING_DATA_ROAMING, + SETTING_ON_OFF_BTN_ON, &err); + setting_retm_if(err != 0, "set vconf failed"); + + elm_check_state_set(ad->data_roaming->eo_check, 1); + ad->data_roaming->chk_status = 1; + + /* if called by other apps, destroy ug */ + if (!safeStrCmp(ad->view_type_string, "DATA_ROAMING")) { + if (ad->popup) + { + evas_object_del(ad->popup); + ad->popup = NULL; + } + ug_destroy_me(ad->ug); + return; + } + } else { + setting_set_bool_slp_key(BOOL_SLP_SETTING_DATA_ROAMING, + SETTING_ON_OFF_BTN_OFF, &err); + setting_retm_if(err != 0, "set vconf failed"); + + elm_check_state_set(ad->data_roaming->eo_check, 0); + ad->data_roaming->chk_status = 0; + } + } + + if (ad->popup) + { + evas_object_del(ad->popup); + ad->popup = NULL; + } +} + diff --git a/setting-network/src/setting-network-preferred-network-delete.c b/setting-network/src/setting-network-preferred-network-delete.c new file mode 100755 index 0000000..b4a571e --- /dev/null +++ b/setting-network/src/setting-network-preferred-network-delete.c @@ -0,0 +1,703 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 + +static int setting_network_preferred_network_delete_create(void *cb); +static int setting_network_preferred_network_delete_destroy(void *cb); +static int setting_network_preferred_network_delete_update(void *cb); +static int setting_network_preferred_network_delete_cleanup(void *cb); + +typedef struct { + bool is_checked; + Evas_Object *eo_check; + int prefer_idx; + Setting_GenGroupItem_Data *data_Genitem; +} preferred_list_item_t; + +static int check_count = 0; + +setting_view setting_view_network_preferred_network_delete = { + .create = setting_network_preferred_network_delete_create, + .destroy = setting_network_preferred_network_delete_destroy, + .update = setting_network_preferred_network_delete_update, + .cleanup = setting_network_preferred_network_delete_cleanup, +}; + +static void setting_network_preferred_network_delete_select_all_cb(void *data, + Evas_Object * + obj, void + *event_info); +static void setting_network_preferred_network_delete_check_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_network_perferred_network_delete_mouse_up_cb(void *data, + Evas_Object * + obj, void + *event_info); + +static void +setting_network_preferred_network_delete_click_softkey_cancel_cb(void *data, + Evas_Object * + obj, void + *event_info); +static void +setting_network_preferred_network_delete_click_softkey_delete_cb(void *data, + Evas_Object * + obj, void + *event_info); +static void setting_network_preferred_network_delete_no_cb(void *cb); +static void setting_network_preferred_network_delete_yes_cb(void *cb); + +/* *************************************************** + * + *basic func + * + ***************************************************/ + +static int setting_network_preferred_network_delete_create(void *cb) +{ + SETTING_TRACE_BEGIN; + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + + Evas_Object *layout = elm_layout_add(ad->win_main_layout); + elm_layout_file_set(layout, SETTING_THEME_EDJ_NAME, "selinfo_bottom"); + evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, 0.0); + ad->sub_clear_layout = layout; + + setting_push_layout_navi_bar(_("IDS_COM_SK_DELETE"), + dgettext("sys_string", "IDS_COM_SK_CANCEL"), + dgettext("sys_string", "IDS_COM_SK_DELETE"), + NULL, + setting_network_preferred_network_delete_click_softkey_cancel_cb, + setting_network_preferred_network_delete_click_softkey_delete_cb, + NULL, ad, layout, ad->navi_bar, NULL); + /* elm_object_item_disabled_set(elm_toolbar_last_item_get(ad->controllbar_clear), EINA_TRUE); */ + + Evas_Object *sub_layout = elm_layout_add(ad->win_main_layout); + elm_layout_file_set(sub_layout, SETTING_THEME_EDJ_NAME, + "search_layout"); + evas_object_size_hint_weight_set(sub_layout, EVAS_HINT_EXPAND, 0.0); + evas_object_show(sub_layout); + + ad->gl_sel_all = elm_genlist_add(ad->win_main_layout); + elm_object_style_set(ad->gl_sel_all, "dialogue"); + retvm_if(ad->gl_sel_all == NULL, SETTING_RETURN_FAIL, + "gl_sel_all == NULL"); + elm_genlist_clear(ad->gl_sel_all); /* first to clear list */ + elm_genlist_bounce_set(ad->gl_sel_all, 0, 0); + + ad->scl_pref_del = elm_genlist_add(ad->win_main_layout); + elm_object_style_set(ad->scl_pref_del, "dialogue"); + elm_genlist_clear(ad->scl_pref_del); /* first to clear list */ + + elm_object_part_content_set(sub_layout, "search_list", ad->scl_pref_del); + elm_object_part_content_set(sub_layout, "search_bar", ad->gl_sel_all); + elm_object_part_content_set(layout, "elm.swallow.contents", sub_layout); + + setting_network_preferred_network_delete_draw_network_list(ad); + setting_view_network_preferred_network_delete.is_create = 1; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_preferred_network_delete_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + + elm_naviframe_item_pop(ad->navi_bar); + setting_view_network_preferred_network_delete.is_create = 0; + + /* free data */ + preferred_list_item_t *list_item; + if (ad->item_check_list != NULL) { + Eina_List *l = NULL; + EINA_LIST_FOREACH(ad->item_check_list, l, list_item) { + FREE(list_item); + } + eina_list_free(ad->item_check_list); + ad->item_check_list = NULL; + } + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_preferred_network_delete_update(void *cb) +{ + SETTING_TRACE_BEGIN; + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + + setting_network_preferred_network_delete_refresh_view(ad); + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_preferred_network_delete_cleanup(void *cb) +{ + return setting_network_preferred_network_delete_destroy(cb); +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +void +setting_network_preferred_network_delete_refresh_view(SettingNetworkUG *ad) +{ + SETTING_TRACE_BEGIN; + /* int i =0; */ + + if (ad->item_check_list) { + eina_list_free(ad->item_check_list); + ad->item_check_list = NULL; + } + /* create list */ + setting_network_preferred_network_delete_draw_network_list(ad); + +} + +void +setting_network_preferred_network_delete_draw_network_list(SettingNetworkUG * + ad) +{ + SETTING_TRACE_BEGIN; + int i = 0; + preferred_list_item_t *list_item = NULL; + + /* free data */ + if (ad->item_check_list != NULL) { + Eina_List *l = NULL; + EINA_LIST_FOREACH(ad->item_check_list, l, list_item) { + FREE(list_item); + } + eina_list_free(ad->item_check_list); + ad->item_check_list = NULL; + } + + elm_genlist_clear(ad->scl_pref_del); /* first to clear list */ + + check_count = 0; + + ad->data_cl_select_all = + setting_create_Gendial_field_def(ad->gl_sel_all, &itc_sel_all, + setting_network_perferred_network_delete_mouse_up_cb, + ad, SWALLOW_Type_1CHECK, NULL, + NULL, 0, KeyStr_Select_All, NULL, + setting_network_preferred_network_delete_select_all_cb); + if (ad->data_cl_select_all) { + ad->data_cl_select_all->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_cl_select_all is NULL"); + } + + for (i = 0; i < ad->pref_list.NumOfPrefPlmns; i++) { + list_item = calloc(1, sizeof(preferred_list_item_t)); + setting_retm_if(!list_item, "calloc failed"); + list_item->prefer_idx = i; + list_item->is_checked = 0; + + list_item->data_Genitem = + setting_create_Gendial_field_def(ad->scl_pref_del, + &itc_cm_1text_1icon_2, + setting_network_perferred_network_delete_mouse_up_cb, + ad, SWALLOW_Type_1CHECK, + NULL, NULL, 0, + _(ad->pref_list.PrefPlmnRecord[i].network_name), NULL, + setting_network_preferred_network_delete_check_cb); + if (list_item->data_Genitem) { + list_item->data_Genitem->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_Genitem is NULL"); + } + + ad->item_check_list = + eina_list_append(ad->item_check_list, list_item); + } + return; +} + +static void +setting_network_preferred_network_delete_select_all_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + SettingNetworkUG *ad = list_item->userdata; + setting_create_sel_info_popup(ad->sub_clear_layout, + &(ad->selInfoPop_layout), + &(ad->selInfoPop)); + int state = list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */ + Eina_List *check_list = ad->item_check_list; + preferred_list_item_t *pre_list_item = NULL; + + if (state) { + while (check_list) { + pre_list_item = (preferred_list_item_t *) + eina_list_data_get(check_list); + if (NULL == pre_list_item) + continue; + elm_check_state_set(pre_list_item-> + data_Genitem->eo_check, 1); + pre_list_item->data_Genitem->chk_status = 1; + check_list = eina_list_next(check_list); + } + check_count = ad->pref_list.NumOfPrefPlmns; + + char text[MAX_DISPLAY_NAME_LEN_ON_UI]; + snprintf(text, sizeof(text), "%d Items Selected", check_count); + edje_object_part_text_set(_EDJ(ad->selInfoPop_layout), + "elm.text", text); + } else { + while (check_list) { + pre_list_item = (preferred_list_item_t *) + eina_list_data_get(check_list); + if (NULL == pre_list_item) + continue; + elm_check_state_set(pre_list_item-> + data_Genitem->eo_check, 0); + pre_list_item->data_Genitem->chk_status = 0; + check_list = eina_list_next(check_list); + } + check_count = 0; + evas_object_hide(ad->selInfoPop); + } + + SETTING_TRACE("check_count:%d", check_count); + return; +} + +static void +setting_network_preferred_network_delete_check_cb(void *data, Evas_Object *obj, + void *event_info) +{ + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + SettingNetworkUG *ad = list_item->userdata; + setting_create_sel_info_popup(ad->sub_clear_layout, + &(ad->selInfoPop_layout), + &(ad->selInfoPop)); + + list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */ + if (list_item->chk_status) { + check_count++; + } else { + check_count--; + } + + if (check_count < ad->pref_list.NumOfPrefPlmns) { + elm_check_state_set(ad->data_cl_select_all->eo_check, 0); + ad->data_cl_select_all->chk_status = 0; + } else { + elm_check_state_set(ad->data_cl_select_all->eo_check, 1); + ad->data_cl_select_all->chk_status = 1; + } + + SETTING_TRACE("check count is [%d]", check_count); + if (!check_count) { + evas_object_hide(ad->selInfoPop); + return; + } + + char text[MAX_DISPLAY_NAME_LEN_ON_UI +1] = {0, }; + snprintf(text, MAX_DISPLAY_NAME_LEN_ON_UI, "%d %s", check_count, KeyStr_Item_Sel); + + + /* text set and timeout set */ + edje_object_part_text_set(_EDJ(ad->selInfoPop_layout), "elm.text", + text); + +} + +static void +setting_network_perferred_network_delete_mouse_up_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + int old_status = elm_check_state_get(list_item->eo_check); + /* new status */ + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + SETTING_TRACE("list_item->keyStr:%s", list_item->keyStr); + + SettingNetworkUG *ad = list_item->userdata; + setting_create_sel_info_popup(ad->sub_clear_layout, + &(ad->selInfoPop_layout), + &(ad->selInfoPop)); + int state = elm_check_state_get(list_item->eo_check); /* for genlist update status */ + Eina_List *check_list = ad->item_check_list; + preferred_list_item_t *pre_list_item = NULL; + + if (0 == safeStrCmp(KeyStr_Select_All, list_item->keyStr)) { /* if(obj == chk_sel_all) */ + SETTING_TRACE("Select All"); + if (state) { + while (check_list) { + pre_list_item = (preferred_list_item_t *) + eina_list_data_get(check_list); + if (NULL == pre_list_item) + continue; + elm_check_state_set + (pre_list_item->data_Genitem->eo_check, 1); + pre_list_item->data_Genitem->chk_status = 1; + check_list = eina_list_next(check_list); + } + check_count = ad->pref_list.NumOfPrefPlmns; + + char text[MAX_DISPLAY_NAME_LEN_ON_UI]; + snprintf(text, sizeof(text), "%d Items Selected", + check_count); + edje_object_part_text_set(_EDJ(ad->selInfoPop_layout), + "elm.text", text); + } else { + while (check_list) { + pre_list_item = (preferred_list_item_t *) + eina_list_data_get(check_list); + if (NULL == pre_list_item) + continue; + elm_check_state_set + (pre_list_item->data_Genitem->eo_check, 0); + pre_list_item->data_Genitem->chk_status = 0; + check_list = eina_list_next(check_list); + } + check_count = 0; + evas_object_hide(ad->selInfoPop); + } + } else { + SETTING_TRACE("Select %s", list_item->keyStr); + if (state) { + check_count++; + } else { + check_count--; + } + + if (check_count < ad->pref_list.NumOfPrefPlmns) { + elm_check_state_set(ad->data_cl_select_all->eo_check, + 0); + ad->data_cl_select_all->chk_status = 0; + } else { + elm_check_state_set(ad->data_cl_select_all->eo_check, + 1); + ad->data_cl_select_all->chk_status = 1; + } + + if (!check_count) { + evas_object_hide(ad->selInfoPop); + return; + } + + char text[MAX_DISPLAY_NAME_LEN_ON_UI +1] = {0, }; + snprintf(text, MAX_DISPLAY_NAME_LEN_ON_UI, "%d %s", check_count, KeyStr_Item_Sel); + + /* text set and timeout set */ + edje_object_part_text_set(_EDJ(ad->selInfoPop_layout), + "elm.text", text); + } + SETTING_TRACE("check_count:%d", check_count); +} + +static bool +setting_network_preferred_network_delete_one(SettingNetworkUG *ad, + preferred_list_item_t *list_item) +{ + retvm_if(list_item == NULL, FALSE, "list_item parameter is NULL"); + bool ret = TRUE; + int tapi_ret = TAPI_API_SUCCESS; + TelNetworkPreferredPlmnInfo_t preff_plmn_info = { 0, }; + memcpy(&preff_plmn_info, + &ad->pref_list.PrefPlmnRecord[list_item->prefer_idx], + sizeof(TelNetworkPreferredPlmnInfo_t)); + SETTING_TRACE_WARNING + ("preff_plmn_info.network_name = %s, preff_plmn_info.Index = %d", + preff_plmn_info.network_name, preff_plmn_info.Index); + tapi_ret = + tel_set_network_preferred_plmn(ad->handle, TAPI_NETWORK_PREF_PLMN_DELETE, + &preff_plmn_info, setting_tapi_set_preferred_plmn_cb, ad); + if (tapi_ret != TAPI_API_SUCCESS) { + SETTING_TRACE_DEBUG + ("%s*** [ERR] tel_set_network_preferred_plmn(PLMN_DEL) err=%d ***%s", + SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("Delete Failed"), NULL, POPUP_INTERVAL, FALSE, FALSE); + ret = FALSE; + } + return ret; +} + +void setting_network_preferred_network_delete_ok(void *data) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + SettingNetworkUG *ad = (SettingNetworkUG *) data; + bool ret = TRUE; + preferred_list_item_t *list_item = NULL; + int total_count = eina_list_count(ad->checked_data_list); + ad->deleted_number++; + if (ad->deleted_number >= total_count) { + if (ad->network_ug_pop != NULL) { + evas_object_del(ad->network_ug_pop); + ad->network_ug_pop = NULL; + } + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_COM_POP_SUCCESS"), NULL, POPUP_INTERVAL, FALSE, FALSE); + + int tapi_ret = TAPI_API_SUCCESS; + + tapi_ret = tel_get_network_preferred_plmn(ad->handle, setting_tapi_get_preferred_plmn_cb, ad); + if (tapi_ret != TAPI_API_SUCCESS) { + SETTING_TRACE_DEBUG + ("%s*** [ERR] tel_get_network_preferred_plmn. err=%d ***%s", + SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); + } + } else { + /* update info */ + char info[MAX_DISPLAY_NAME_LEN_ON_UI] = { 0 }; + snprintf(info, sizeof(info), "%s (%d/%d)", + _("IDS_COM_SK_DELETE"), ad->deleted_number, + total_count); + elm_object_text_set(ad->popup_label, info); + /* delete next */ + list_item = + eina_list_nth(ad->checked_data_list, ad->deleted_number); + ret = + setting_network_preferred_network_delete_one(ad, list_item); + if (!ret) { + setting_network_preferred_network_delete_failed(ad); + } + } +} + +void setting_network_preferred_network_delete_failed(void *data) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + SettingNetworkUG *ad = (SettingNetworkUG *) data; + if (ad->network_ug_pop != NULL) { + evas_object_del(ad->network_ug_pop); + ad->network_ug_pop = NULL; + } + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("Failed!"), NULL, POPUP_INTERVAL, FALSE, FALSE); + + + int tapi_ret = TAPI_API_SUCCESS; + + tapi_ret = tel_get_network_preferred_plmn(ad->handle, setting_tapi_get_preferred_plmn_cb, ad); + if (tapi_ret != TAPI_API_SUCCESS) { + SETTING_TRACE_DEBUG + ("%s*** [ERR] tel_get_network_preferred_plmn. err=%d ***%s", + SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); + } +} + +static void setting_network_preferred_network_create_delete_pop(void *data) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + SettingNetworkUG *ad = (SettingNetworkUG *) data; + if (ad->network_ug_pop != NULL) { + evas_object_del(ad->network_ug_pop); + ad->network_ug_pop = NULL; + } + Evas_Object *popup; + popup = elm_popup_add(ad->win_get); + evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + Evas_Object *box, *progressbar; + ad->popup_label = elm_label_add(popup); + char info[MAX_DISPLAY_NAME_LEN_ON_UI] = { 0 }; + snprintf(info, sizeof(info), "%s (%d/%d)", _("IDS_COM_SK_DELETE"), + ad->deleted_number, eina_list_count(ad->checked_data_list)); + elm_object_text_set(ad->popup_label, info); + evas_object_show(ad->popup_label); + box = elm_box_add(popup); + progressbar = elm_progressbar_add(popup); + elm_object_style_set(progressbar, "pending_list"); + elm_progressbar_pulse(progressbar, EINA_TRUE); + evas_object_size_hint_align_set(progressbar, EVAS_HINT_FILL, 0.5); + evas_object_size_hint_weight_set(progressbar, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + elm_progressbar_pulse(progressbar, EINA_TRUE); + evas_object_show(progressbar); + elm_box_pack_end(box, ad->popup_label); + elm_box_pack_end(box, progressbar); + evas_object_show(box); + elm_object_content_set(popup, box); + evas_object_show(popup); + ad->network_ug_pop = popup; +} + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void setting_network_preferred_network_delete_yes_cb(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(cb == NULL, "Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + bool ret = TRUE; + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + ad->deleted_number = 0; + eina_list_free(ad->checked_data_list); + ad->checked_data_list = NULL; + Eina_List *check_list = ad->item_check_list; + preferred_list_item_t *list_item = NULL; + bool isChecked = FALSE; + while (check_list) { + list_item = + (preferred_list_item_t *) eina_list_data_get(check_list); + if (NULL == list_item) + continue; + isChecked = list_item->data_Genitem->chk_status; + + if (isChecked) { + ad->checked_data_list = + eina_list_prepend(ad->checked_data_list, list_item); + } + check_list = eina_list_next(check_list); + } + setting_network_preferred_network_create_delete_pop(ad); + list_item = eina_list_nth(ad->checked_data_list, ad->deleted_number); + ret = setting_network_preferred_network_delete_one(ad, list_item); + if (!ret) { + setting_network_preferred_network_delete_failed(ad); + } + ad->op_type = SETTING_NETWORK_PREFERRED_NETWORK_DELETE; +} + +static void setting_network_preferred_network_delete_no_cb(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(cb == NULL, "Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } +} + +static void setting_preferred_network_delete_resp_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + int response_type = btn_type(obj); + if (POPUP_RESPONSE_OK == response_type) { + setting_network_preferred_network_delete_yes_cb(data); + } else if (POPUP_RESPONSE_CANCEL == response_type) { + setting_network_preferred_network_delete_no_cb(data); + } +} + +static void +setting_network_preferred_network_delete_click_softkey_delete_cb(void *data, + Evas_Object * + obj, void + *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + + if (ad->pref_list.NumOfPrefPlmns == 1) { + setting_create_simple_popup(ad, ad->win_get, + NULL, _("Do not Delete!")); + } else { + int sel_count = 0; + Eina_List *check_list = ad->item_check_list; + preferred_list_item_t *list_item = NULL; + while (check_list) { + list_item = (preferred_list_item_t *) + eina_list_data_get(check_list); + if (NULL == list_item) + continue; + SETTING_TRACE("item[%d]'s check flag is %d", + list_item->prefer_idx, + list_item->data_Genitem->chk_status); + if (list_item->data_Genitem->chk_status) { + sel_count++; + } + check_list = eina_list_next(check_list); + } + + if (0 == sel_count) { + setting_create_simple_popup(ad, ad->win_get, + NULL, _("Please select item(s) to process!")); + return; + } + + char notify_str[MAX_DISPLAY_NAME_LEN_ON_UI] = { 0 }; + if (1 == sel_count) { + snprintf(notify_str, sizeof(notify_str), + "%s 1 network?", _("IDS_COM_SK_DELETE")); + } else { + snprintf(notify_str, sizeof(notify_str), + "%s %d networks?", _("IDS_COM_SK_DELETE"), + sel_count); + } + ad->popup = setting_create_popup_with_btn(ad, ad->win_get, NULL, notify_str, + setting_preferred_network_delete_resp_cb, + 0, 2, _("IDS_COM_SK_OK"),_("IDS_COM_SK_CANCEL")); + } + + if (ad->selInfoPop) { + evas_object_del(ad->selInfoPop); + ad->selInfoPop = NULL; + } +} + +static void +setting_network_preferred_network_delete_click_softkey_cancel_cb(void *data, + Evas_Object * + obj, void + *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + if (ad->selInfoPop) { + evas_object_del(ad->selInfoPop); + ad->selInfoPop = NULL; + } + + ad->op_type = SETTING_NETWORK_PREFERRED_NETWORK_NONE; + setting_view_change(&setting_view_network_preferred_network_delete, + &setting_view_network_preferred_network, ad); +} diff --git a/setting-network/src/setting-network-preferred-network-edit.c b/setting-network/src/setting-network-preferred-network-edit.c new file mode 100755 index 0000000..ed6aa2a --- /dev/null +++ b/setting-network/src/setting-network-preferred-network-edit.c @@ -0,0 +1,272 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 + +static int setting_network_preferred_network_edit_create(void *cb); +static int setting_network_preferred_network_edit_destroy(void *cb); +static int setting_network_preferred_network_edit_update(void *cb); +static int setting_network_preferred_network_edit_cleanup(void *cb); + +setting_view setting_view_network_preferred_network_edit = { + .create = setting_network_preferred_network_edit_create, + .destroy = setting_network_preferred_network_edit_destroy, + .update = setting_network_preferred_network_edit_update, + .cleanup = setting_network_preferred_network_edit_cleanup, +}; + +/* *************************************************** + * + *basic func + * + ***************************************************/ + +static int setting_network_preferred_network_edit_create(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SETTING_TRACE_BEGIN; + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + + Evas_Object *scroller = NULL; + /* Evas_Object *outer_box = NULL; */ + setting_push_layout_navi_bar_genlist(ad->win_main_layout, ad->win_get, + _(ad-> + pref_list.PrefPlmnRecord + [ad->sel_pref_idx].network_name), + dgettext("sys_string", + "IDS_COM_SK_CANCEL"), + dgettext("sys_string", + "IDS_COM_SK_DONE"), + setting_network_preferred_network_edit_click_softkey_cancel_cb, + setting_network_preffered_network_edit_click_softkey_save_cb, + ad, &scroller, ad->navi_bar); + Elm_Object_Item *item = NULL;; + + item = + elm_genlist_item_append(scroller, &itc_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + char mcc[SETTING_NETWORK_PREFERRED_NETWORK_CODE_LEN] = { 0, }; + char mnc[SETTING_NETWORK_PREFERRED_NETWORK_CODE_LEN] = { 0, }; + int network_type = 0; + /* SETTING_TRACE("Plmn:%s", ad->pref_list.PrefPlmnRecord[ad->sel_pref_idx].Plmn); */ + memcpy(&mcc, ad->pref_list.PrefPlmnRecord[ad->sel_pref_idx].Plmn, 3); + memcpy(&mnc, ad->pref_list.PrefPlmnRecord[ad->sel_pref_idx].Plmn + 3, + 3); + + if (ad->pref_list.PrefPlmnRecord[ad->sel_pref_idx].SystemType == + TAPI_NETWORK_SYSTEM_GSM) { + network_type = 0; + } else { + network_type = 1; + } + ad->data_edit_mcc = + setting_create_Gendial_field_def(scroller, + &itc_1icon, NULL, + NULL, SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + "IDS_ST_BODY_COUNTRY_CODE", _(mcc), + setting_network_preffered_network_edit_entry_changed_cb); + if (ad->data_edit_mcc) { + ad->data_edit_mcc->userdata = ad; + ad->data_edit_mcc->input_type = ELM_INPUT_PANEL_LAYOUT_NUMBERONLY; + } else { + SETTING_TRACE_ERROR("ad->data_edit_mcc is NULL"); + } + + ad->data_edit_mnc = + setting_create_Gendial_field_def(scroller, + &itc_1icon, NULL, + NULL, SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + "IDS_ST_BODY_NETWORK_CODE", _(mnc), + setting_network_preffered_network_edit_entry_changed_cb); + if (ad->data_edit_mnc) { + ad->data_edit_mnc->userdata = ad; + ad->data_edit_mnc->input_type = ELM_INPUT_PANEL_LAYOUT_NUMBERONLY; + } else { + SETTING_TRACE_ERROR("ad->data_edit_mnc is NULL"); + } + + (void)setting_create_Gendial_field_titleItem(scroller, + &itc_group_item, + "IDS_ST_BODY_NETWORK_TYPE", + NULL); + ad->chk_edit_type = elm_radio_add(scroller); + elm_radio_state_value_set(ad->chk_edit_type, -1); + + setting_create_Gendial_field_1radio(scroller, &itc_1text_1icon_2, + setting_mouse_up_Gendial_list_radio_cb, + ad->chk_edit_type, + SWALLOW_Type_1RADIO, + ad->chk_edit_type, 0, "IDS_ST_BODY_GSM", NULL); + + setting_create_Gendial_field_1radio(scroller, &itc_1text_1icon_2, + setting_mouse_up_Gendial_list_radio_cb, + ad->chk_edit_type, + SWALLOW_Type_1RADIO, + ad->chk_edit_type, 1, "UMTS", NULL); + elm_radio_value_set(ad->chk_edit_type, network_type); + setting_view_network_preferred_network_edit.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_preferred_network_edit_destroy(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SETTING_TRACE_BEGIN; + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + + elm_naviframe_item_pop(ad->navi_bar); + setting_view_network_preferred_network_edit.is_create = 0; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_preferred_network_edit_update(void *cb) +{ + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_preferred_network_edit_cleanup(void *cb) +{ + return setting_network_preferred_network_edit_destroy(cb); +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/* *************************************************** + * + *call back func + * + ***************************************************/ +static void +setting_network_preffered_network_edit_entry_changed_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + const char *entry_str = elm_entry_entry_get(obj); + /* SETTING_TRACE("entry_str:%s", entry_str); */ + list_item->sub_desc = (char *)g_strdup(entry_str); +} + +static void +setting_network_preffered_network_edit_click_softkey_save_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + /* error check */ + retm_if(data == NULL, + "[Setting > Network > Preferred Net] Data parameter for setting_network_preffered_network_edit_click_softkey_save_cb is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + int tapi_ret = TAPI_API_SUCCESS; + TelNetworkPreferredPlmnInfo_t pref_plmn_info = { 0, }; + + int network_type = 0; + const char *mcc = NULL; + const char *mnc = NULL; + if (ad->data_edit_mcc) { + mcc = ad->data_edit_mcc->sub_desc; + } + if (ad->data_edit_mnc) { + mnc = ad->data_edit_mnc->sub_desc; + } + + setting_retm_if(isEmptyStr(mcc) + || isEmptyStr(mcc), + "mcc or mnc got from editfiled error"); + SETTING_TRACE("mcc:%s, mnc:%s", mcc, mnc); + int mcc_len = safeStrLen(mcc); + int mnc_len = safeStrLen(mnc); + if (COUNTRY_CODE_LEN != mcc_len) { + if ((NETWORK_CODE_LEN < mnc_len) || (mnc_len <= 0)) { + setting_create_popup_without_btn(ad, ad->win_get, + NULL, _("please input country code made up of 3 digital number and network code made up of 1 ~ 3 digital number"), + NULL, POPUP_INTERVAL, FALSE, FALSE); + } else { + setting_create_popup_without_btn(ad, ad->win_get, + NULL, _("please input country code made up of 3 digital number"), + NULL, POPUP_INTERVAL, FALSE, FALSE); + } + return; + } + + if ((NETWORK_CODE_LEN < mnc_len) || (mnc_len <= 0)) { + setting_create_popup_without_btn(ad, ad->win_get, + NULL, _("please input network code made up of 1 ~ 3 digital number"), + NULL, POPUP_INTERVAL, FALSE, FALSE); + return; + } + + network_type = elm_radio_value_get(ad->chk_edit_type); + + memset(&pref_plmn_info, 0x00, sizeof(TelNetworkPreferredPlmnInfo_t)); + memcpy(&pref_plmn_info, + &ad->pref_list.PrefPlmnRecord[ad->sel_pref_idx], + sizeof(TelNetworkPreferredPlmnInfo_t)); + + safeCopyStr((char *)pref_plmn_info.Plmn, mcc, 3); + safeCopyStr((char *)pref_plmn_info.Plmn + 3, mnc, 3); + + /* save network type */ + if (network_type == 0) { + pref_plmn_info.SystemType = TAPI_NETWORK_SYSTEM_GSM; + } else { + pref_plmn_info.SystemType = TAPI_NETWORK_SYSTEM_UMTS; + } + ad->network_ug_pop = + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_ST_POP_SAVING"), + NULL, 0.0, TRUE, TRUE); + + tapi_ret = + tel_set_network_preferred_plmn(ad->handle, TAPI_NETWORK_PREF_PLMN_EDIT, + &pref_plmn_info, setting_tapi_set_preferred_plmn_cb, ad); + if (tapi_ret != TAPI_API_SUCCESS) { + SETTING_TRACE_DEBUG + ("%s*** [ERR] tel_set_network_preferred_plmn(PLMN_EDIT) err=%d ***%s", + SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("Save Failed!"), NULL, POPUP_INTERVAL, FALSE, FALSE); + } + + ad->op_type = SETTING_NETWORK_PREFERRED_NETWORK_EDIT; +} + +static void +setting_network_preferred_network_edit_click_softkey_cancel_cb(void *data, + Evas_Object * + obj, + void *event_info) +{ + SettingNetworkUG *ad = (SettingNetworkUG *) data; + + /* error check */ + retm_if(data == NULL, + "[Setting > Network > Preferred Net] Data parameter for setting_network_preffered_network_edit_click_softkey_save_cb is NULL"); + ad->op_type = SETTING_NETWORK_PREFERRED_NETWORK_NONE; + setting_view_change(&setting_view_network_preferred_network_edit, + &setting_view_network_preferred_network, ad); +} diff --git a/setting-network/src/setting-network-preferred-network-list.c b/setting-network/src/setting-network-preferred-network-list.c new file mode 100755 index 0000000..b50d5bd --- /dev/null +++ b/setting-network/src/setting-network-preferred-network-list.c @@ -0,0 +1,549 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 + +static int setting_network_preferred_network_list_create(void *cb); +static int setting_network_preferred_network_list_destroy(void *cb); +static int setting_network_preferred_network_list_update(void *cb); +static int setting_network_preferred_network_list_cleanup(void *cb); + +static Evas_Object *__gl_network_radio_group = NULL; + +setting_view setting_view_network_preferred_network_list = { + .create = setting_network_preferred_network_list_create, + .destroy = setting_network_preferred_network_list_destroy, + .update = setting_network_preferred_network_list_update, + .cleanup = setting_network_preferred_network_list_cleanup, +}; + +#define LIST_COUNT 100 +#define MAX_PLMN_LEN 6 + +/* *************************************************** + * + *basic func + * + ***************************************************/ + +static int gl_network_genlist_label_initialize(SettingNetworkUG *ad) +{ + Elm_Object_Item *gl_item = NULL; + char *sel_mem = NULL; + + if (ad->gl_network) { + gl_item = elm_genlist_first_item_get(ad->gl_network); + while (gl_item) { + sel_mem = (char *)elm_object_item_data_get(gl_item); + if (sel_mem) { + FREE(sel_mem); + } + gl_item = elm_genlist_item_next_get(gl_item); + } + elm_genlist_clear(ad->gl_network); + + return 0; + } + + return SETTING_RETURN_FAIL; +} + +static char *gl_network_genlist_text_get(void *data, Evas_Object *obj, + const char *part) +{ + char buf[PATH_MAX]; + + struct gl_network_data *sel_mem = (struct gl_network_data *)data; + + if (safeStrCmp(part, "elm.text") == 0) { + /* strcpy(buf, data); */ + /* sprintf(buf, "%s", sel_mem->name); */ + snprintf(buf, sizeof(buf), "%s", sel_mem->name); + return strdup(buf); + } else { + safeCopyStr(buf, "", strlen("")); + return strdup(buf); + } +} + +static void gl_network_genlist_delete(void *data, Evas_Object *obj) +{ + struct gl_network_data *one_item = (struct gl_network_data *)data; + if (data) { + FREE(one_item); + } + return; +} + +static Evas_Object *gl_network_getlist_content_get(void *data, Evas_Object *obj, + const char *part) +{ + Evas_Object *radio = NULL; + struct gl_network_data *sel_mem = (struct gl_network_data *)data; + + if (safeStrCmp(part, "elm.swallow.end") == 0 + || safeStrCmp(part, "elm.icon") == 0) { + radio = elm_radio_add(obj); + retv_if(radio == NULL, NULL); + elm_radio_state_value_set(radio, sel_mem->index); + elm_radio_group_add(radio, __gl_network_radio_group); + } + return radio; +} + +static void gl_network_genlist_select(void *data, Evas_Object *obj, + void *event_info) +{ + SettingNetworkUG *ad = (SettingNetworkUG *) data; + Elm_Object_Item *item = NULL; + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + + ad->cur_sel_mem = + (struct gl_network_data *)elm_object_item_data_get(item); + + if (ad->cur_sel_mem == NULL) { + return; + } + + ad->cur_sel_index = ad->cur_sel_mem->index; + elm_radio_value_set(__gl_network_radio_group, ad->cur_sel_index); + /* SETTING_TRACE_WARNING("******sel_mem->index = %d, elm_radio_value_get = %d", ad->cur_sel_index, elm_radio_value_get(__gl_network_radio_group)); */ + return; +} + +static void __get_preferred_network_list_item_name(char *name, + settings_preferred_network_table + network) +{ + setting_retm_if(NULL == name, "NULL == name") + const char *nw_type_str = NULL; + switch (network.nw_type) { + case SETTING_PREFERRED_NETWORK_TYPE_GSM_900: + { + nw_type_str = "GSM900"; + break; + } + case SETTING_PREFERRED_NETWORK_TYPE_DCS_1800: + { + nw_type_str = "DCS"; + break; + } + case SETTING_PREFERRED_NETWORK_TYPE_PCS_1900: + { + nw_type_str = "PCS"; + break; + } + case SETTING_PREFERRED_NETWORK_TYPE_GSM_SAT: + { + nw_type_str = "GSMSAT"; + break; + } + case SETTING_PREFERRED_NETWORK_TYPE_GSM_850: + { + nw_type_str = "GSM850"; + break; + } + case SETTING_PREFERRED_NETWORK_TYPE_UMTS: + { + nw_type_str = "UMTS"; + break; + } + default: + { + nw_type_str = NULL; + break; + } + } + snprintf(name, 255, "%s (%s)", network.short_name_ptr, nw_type_str); +} + +static Eina_Bool __genlist_update(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(NULL == data, 0, "NULL == data") + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + Elm_Object_Item *gl_item = NULL; + const char *match_str = NULL; + + SETTING_TRACE("match_str:%s", match_str); + + struct gl_network_data *one_item; + elm_genlist_clear(ad->gl_network); + int i; + int items = (sizeof(network_table) / sizeof(network_table[0])); + for (i = 0; i < items; i++) { + one_item = + (struct gl_network_data *)calloc(1, + sizeof(struct + gl_network_data)); + setting_retvm_if(!one_item, FALSE, "calloc failed"); + one_item->index = i; + /* one_item->name = __get_preferred_network_list_item_name(network_table[i]); */ + __get_preferred_network_list_item_name(one_item->name, + network_table[i]); + + if ('\0' == ad->search_text[0] + || ('\0' == one_item->name[0] && is_substr_ncase(one_item->name, ad->search_text))) { /* is substring */ + /* SETTING_TRACE("Adding item[%s]", one_item->name); */ + /* SETTING_TRACE("ad->gl_network:%p", ad->gl_network); */ + gl_item = + elm_genlist_item_append(ad->gl_network, &ad->itc, + one_item, NULL, + ELM_GENLIST_ITEM_NONE, + gl_network_genlist_select, + ad); + } else { + FREE(one_item); + } + } + ad->add_view_timer = NULL; + return FALSE; +} + +/* ***search bar****/ +static void __searchbar_changed_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == data, "NULL == data") + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + + if (elm_object_focus_get(ad->nw_search_bar)) { + if (elm_entry_is_empty(obj)) + elm_object_signal_emit(ad->nw_search_bar, "elm,state,eraser,hide", "elm"); + else + elm_object_signal_emit(ad->nw_search_bar, "elm,state,eraser,show", "elm"); + } + + const char *str = elm_object_text_get(obj); + /* SETTING_TRACE("the string in searchbar:%s, len(str):%d", str, strlen(str)); */ + /* SETTING_TRACE("ad->search_text: %s", ad->search_text); */ + + if (str == NULL) { + SETTING_TRACE_ERROR("Searchbar text is NULL!"); + return; + } + /* if(!safeStrCmp(str, dgettext("sys_string", "IDS_COM_SK_SEARCH"))) return; */ + if (!safeStrCmp(str, ad->search_text)) { + return; + } + /* Evas_Object *entry = elm_searchbar_entry_get(ad->nw_search_bar); */ + + if (strlen(str) > MAX_SEARCH_STR_LEN) { + /* the content of entry won't change if enter too many characters */ + elm_object_text_set(obj, ad->search_text); + /* elm_entry_cursor_end_set(entry); */ + /* if input too long, show popup */ + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("Input too long!"), NULL, POPUP_INTERVAL, FALSE, FALSE); + + return; + } + + memset(ad->search_text, '\0', MAX_SEARCH_STR_LEN + 1); + safeCopyStr(ad->search_text, str, MAX_SEARCH_STR_LEN); + + /* SETTING_TRACE("ad->search_text:%s", ad->search_text); */ + /* if(safeStrCmp(ad->search_text, dgettext("sys_string", "IDS_COM_SK_SEARCH"))) */ + /* { */ + SETTING_TRACE("Update the search view text, search_text=%s", + ad->search_text); + + if (ad->add_view_timer) { + /* ecore_idler_del(ad->add_view_timer); */ + /* ad->add_view_timer = NULL; */ + } + + ad->add_view_timer = ecore_idler_add(__genlist_update, ad); + /* } */ + +} + +static void __searchbar_cancel_clicked_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + SettingNetworkUG *ad = (SettingNetworkUG *) data; + + /* memset(ad->search_text, '\0', MAX_SEARCH_STR_LEN + 1); */ + /* safeCopyStr(ad->search_text, dgettext("sys_string", "IDS_COM_SK_SEARCH"), MAX_SEARCH_STR_LEN); */ + /* elm_searchbar_text_set(ad->nw_search_bar, dgettext("sys_string", "IDS_COM_SK_SEARCH")); */ + + Evas_Object *entry = elm_object_part_content_get(ad->nw_search_bar, "elm.swallow.content"); + Ecore_IMF_Context *imf_context = (Ecore_IMF_Context*)elm_entry_imf_context_get(entry); + if (imf_context) { + ecore_imf_context_input_panel_hide(imf_context); + } + /* ad->add_view_timer = ecore_idler_add(__genlist_update, ad); */ + +} + +static void __searchbar_focused_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == data, "NULL == data"); + SettingNetworkUG *ad = (SettingNetworkUG *) data; + + if (!elm_entry_is_empty(obj)) + elm_object_signal_emit(ad->nw_search_bar, "elm,state,eraser,show", "elm"); + elm_object_signal_emit(ad->nw_search_bar, "elm,state,guidetext,hide", "elm"); + elm_object_signal_emit(ad->nw_search_bar, "cancel,in", ""); +} + +static Evas_Object *__add_searchbar_add(Evas_Object *parent, void *data) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(NULL == data, NULL, "NULL == data"); + + Evas_Object *searchbar_layout = elm_layout_add(parent); + elm_layout_theme_set(searchbar_layout, "layout", "searchbar", "cancel_button"); + + Evas_Object *entry = elm_entry_add(searchbar_layout); + elm_entry_scrollable_set(entry, EINA_TRUE); + elm_entry_single_line_set(entry, EINA_TRUE); + elm_entry_input_panel_layout_set(entry, ELM_INPUT_PANEL_LAYOUT_NORMAL); + elm_object_part_content_set(searchbar_layout, "elm.swallow.content", entry); + elm_object_part_text_set(searchbar_layout, "elm.guidetext", dgettext("sys_string", "IDS_COM_SK_SEARCH")); + + evas_object_size_hint_weight_set(searchbar_layout, EVAS_HINT_EXPAND, 0); + evas_object_size_hint_align_set(searchbar_layout, EVAS_HINT_FILL, 0.0); + evas_object_size_hint_min_set(searchbar_layout, 480, 66); + + evas_object_smart_callback_add(entry, "changed", __searchbar_changed_cb, data); + evas_object_smart_callback_add(entry, "focused", __searchbar_focused_cb, data); + + Evas_Object *cancel_btn = elm_button_add(searchbar_layout); + elm_object_part_content_set(searchbar_layout, "button_cancel", cancel_btn); + elm_object_style_set(cancel_btn, "searchbar/default"); + //elm_object_text_set(cancel_btn, "Cancel"); + + evas_object_smart_callback_add(cancel_btn, "clicked", + __searchbar_cancel_clicked_cb, data); + + edje_object_part_swallow(_EDJ(parent), "search_bar", searchbar_layout); + + return searchbar_layout; +} + +static int setting_network_preferred_network_list_create(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + + Evas_Object *sub_layout = elm_layout_add(ad->win_main_layout); + elm_layout_file_set(sub_layout, SETTING_THEME_EDJ_NAME, + "search_layout"); + evas_object_size_hint_weight_set(sub_layout, EVAS_HINT_EXPAND, 0.0); + evas_object_show(sub_layout); + + /* add basic layout */ + setting_push_layout_navi_bar(_(STR_SETTING_NETWORK_LIST), + dgettext("sys_string", "IDS_COM_SK_CANCEL"), + dgettext("sys_string", "IDS_COM_ADD"), + NULL, + setting_network_preferred_network_list_click_softkey_cancel, + setting_network_preferred_network_list_click_softkey_add, + NULL, ad, sub_layout, ad->navi_bar, NULL); + + Evas_Object *gl_network = NULL; + gl_network_genlist_label_initialize(ad); + + ad->cur_sel_index = -1; + ad->itc.item_style = "1text.1icon.2"; + ad->itc.func.text_get = gl_network_genlist_text_get; + ad->itc.func.content_get = gl_network_getlist_content_get; + ad->itc.func.state_get = NULL; + ad->itc.func.del = gl_network_genlist_delete; + + ad->gl_network = gl_network = elm_genlist_add(ad->win_main_layout); + elm_object_style_set(ad->gl_network, "dialogue"); + elm_genlist_clear(gl_network); + evas_object_show(gl_network); + + __gl_network_radio_group = elm_radio_add(ad->win_main_layout); + elm_radio_state_value_set(__gl_network_radio_group, -1); + + ad->nw_search_bar = __add_searchbar_add(sub_layout, ad); + edje_object_part_swallow(_EDJ(sub_layout), "search_list", + ad->gl_network); + __genlist_update(ad); + + elm_radio_value_set(__gl_network_radio_group, -100); + setting_view_network_preferred_network_list.is_create = 1; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_preferred_network_list_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + if (__gl_network_radio_group != NULL) { + evas_object_del(__gl_network_radio_group); + } + if (ad->gl_network != NULL) { + elm_genlist_clear(ad->gl_network); + evas_object_del(ad->gl_network); + ad->gl_network = NULL; + } + if (ad->add_view_timer) { + ecore_idler_del(ad->add_view_timer); + ad->add_view_timer = NULL; + } + elm_naviframe_item_pop(ad->navi_bar); + setting_view_network_preferred_network_list.is_create = 0; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_preferred_network_list_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + /* SettingNetworkUG *ad = (SettingNetworkUG*)cb; */ + + /* change background style */ + /* if (ad->bg) */ + /* elm_object_style_set(ad->bg, "list"); */ + + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_preferred_network_list_cleanup(void *cb) +{ + return setting_network_preferred_network_list_destroy(cb); +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void +setting_network_preferred_network_list_click_softkey_cancel(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, + "[Setting > Network > Preferred list] Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + + setting_view_change(&setting_view_network_preferred_network_list, + &setting_view_network_preferred_network, ad); +} + +static void +setting_network_preferred_network_list_click_softkey_add(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, + "[Setting > Network > Preferred list] Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + + int sel = 0; + int tapi_ret = TAPI_API_SUCCESS; + TelNetworkPreferredPlmnInfo_t pref_plmn_info = { 0, }; + + /* sel = ad->cur_sel_index; */ + sel = elm_radio_value_get(__gl_network_radio_group); + SETTING_TRACE + ("setting_network_preferred_network_list_click_softkey_add: sel = %d", + sel); + + if (sel < 0) { + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("Please select item(s) to process!"), NULL, POPUP_INTERVAL, FALSE, FALSE); + + return; + } + + /* sprintf((char *)pref_plmn_info.Plmn, "%d", network_table[sel].mcc); */ + /* sprintf((char *)pref_plmn_info.Plmn+3, "%d", network_table[sel].mnc); */ + int ret = 0; + ret = snprintf((char *)pref_plmn_info.Plmn, MAX_PLMN_LEN / 2, "%d", + network_table[sel].mcc); + ret_if(ret < 0); + + ret = snprintf((char *)pref_plmn_info.Plmn + (MAX_PLMN_LEN / 2), + MAX_PLMN_LEN / 2, "%d", network_table[sel].mnc); + ret_if(ret < 0); + + SETTING_TRACE("selected item is:%s", network_table[sel].short_name_ptr); + + switch (network_table[sel].nw_type) { + case SETTING_PREFERRED_NETWORK_TYPE_GSM_900: + case SETTING_PREFERRED_NETWORK_TYPE_DCS_1800: + case SETTING_PREFERRED_NETWORK_TYPE_PCS_1900: + case SETTING_PREFERRED_NETWORK_TYPE_GSM_SAT: + case SETTING_PREFERRED_NETWORK_TYPE_GSM_850: + pref_plmn_info.SystemType = TAPI_NETWORK_SYSTEM_GSM; + break; + + case SETTING_PREFERRED_NETWORK_TYPE_UMTS: + pref_plmn_info.SystemType = TAPI_NETWORK_SYSTEM_UMTS; + break; + default: + break; + } + + pref_plmn_info.Index = + ad->pref_list.PrefPlmnRecord[ad->pref_list.NumOfPrefPlmns - + 1].Index + 1; + + ad->network_ug_pop = + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_ST_POP_SAVING"), + NULL, 0.0, TRUE, TRUE); + SETTING_TRACE_DEBUG("%s*** plmn=%s, index=%d ***%s", + SETTING_FONT_BGREEN, pref_plmn_info.Plmn, + (int)(pref_plmn_info.Index), SETTING_FONT_BLACK); + + tapi_ret = + tel_set_network_preferred_plmn(ad->handle, TAPI_NETWORK_PREF_PLMN_ADD, + &pref_plmn_info, setting_tapi_set_preferred_plmn_cb, ad); + if (tapi_ret != TAPI_API_SUCCESS) { + SETTING_TRACE_DEBUG + ("%s*** [ERR] tel_set_network_preferred_plmn(PLMN_ADD) err=%d ***%s", + SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("Save Failed!"), NULL, POPUP_INTERVAL, FALSE, FALSE); + } + + ad->op_type = SETTING_NETWORK_PREFERRED_NETWORK_LIST; +} diff --git a/setting-network/src/setting-network-preferred-network-new.c b/setting-network/src/setting-network-preferred-network-new.c new file mode 100755 index 0000000..21c549e --- /dev/null +++ b/setting-network/src/setting-network-preferred-network-new.c @@ -0,0 +1,261 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include + +static int setting_network_preferred_network_new_create(void *cb); +static int setting_network_preferred_network_new_destroy(void *cb); +static int setting_network_preferred_network_new_update(void *cb); +static int setting_network_preferred_network_new_cleanup(void *cb); + +setting_view setting_view_network_preferred_network_new = { + .create = setting_network_preferred_network_new_create, + .destroy = setting_network_preferred_network_new_destroy, + .update = setting_network_preferred_network_new_update, + .cleanup = setting_network_preferred_network_new_cleanup, +}; + +/* *************************************************** + * + *basic func + * + ***************************************************/ + +static int setting_network_preferred_network_new_create(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SETTING_TRACE_BEGIN; + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + + Evas_Object *scroller = NULL; + /* Add basic layout */ + setting_push_layout_navi_bar_genlist(ad->win_main_layout, ad->win_get, + _("IDS_ST_HEADER_NEW_NETWORK"), + _("IDS_COM_SK_CANCEL"), + _("IDS_COM_SK_DONE"), + setting_network_preferred_network_new_click_softkey_cancel_cb, + setting_network_preffered_network_new_click_softkey_save_cb, + ad, &scroller, ad->navi_bar); + Elm_Object_Item *item = NULL;; + + item = + elm_genlist_item_append(scroller, &itc_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + ad->data_new_mcc = + setting_create_Gendial_field_def(scroller, + &itc_1icon, NULL, + NULL, SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + "IDS_ST_BODY_COUNTRY_CODE", + _("000"), + setting_network_preferred_network_new_entry_changed_cb); + if (ad->data_new_mcc) { + ad->data_new_mcc->userdata = ad; + ad->data_new_mcc->input_type = ELM_INPUT_PANEL_LAYOUT_NUMBERONLY; + } else { + SETTING_TRACE_ERROR("ad->data_new_mcc is NULL"); + } + + ad->data_new_mnc = + setting_create_Gendial_field_def(scroller, + &itc_1icon, NULL, + NULL, SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + "IDS_ST_BODY_NETWORK_CODE", + _("000"), + setting_network_preferred_network_new_entry_changed_cb); + if (ad->data_new_mnc) { + ad->data_new_mnc->userdata = ad; + ad->data_new_mnc->input_type = ELM_INPUT_PANEL_LAYOUT_NUMBERONLY; + } else { + SETTING_TRACE_ERROR("ad->data_new_mnc is NULL"); + } + + (void)setting_create_Gendial_field_titleItem(scroller, + &itc_group_item, + "IDS_ST_BODY_NETWORK_TYPE", + NULL); + ad->chk_new_type = elm_radio_add(scroller); + elm_radio_state_value_set(ad->chk_new_type, 0); + + setting_create_Gendial_field_1radio(scroller, &itc_1text_1icon_2, + setting_mouse_up_Gendial_list_radio_cb, + ad->chk_new_type, + SWALLOW_Type_1RADIO, + ad->chk_new_type, 0, "IDS_ST_BODY_GSM", NULL); + + setting_create_Gendial_field_1radio(scroller, &itc_1text_1icon_2, + setting_mouse_up_Gendial_list_radio_cb, + ad->chk_new_type, + SWALLOW_Type_1RADIO, + ad->chk_new_type, 1, "UMTS", NULL); + setting_view_network_preferred_network_new.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_preferred_network_new_destroy(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + + elm_naviframe_item_pop(ad->navi_bar); + setting_view_network_preferred_network_new.is_create = 0; + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_preferred_network_new_update(void *cb) +{ + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_preferred_network_new_cleanup(void *cb) +{ + return setting_network_preferred_network_new_destroy(cb); +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/* *************************************************** + * + *call back func + * + ***************************************************/ +static void +setting_network_preferred_network_new_entry_changed_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + /* SettingNetworkUG *ad = list_item->userdata; */ + const char *entry_str = elm_entry_entry_get(obj); + /* SETTING_TRACE("entry_str:%s", entry_str); */ + list_item->sub_desc = (char *)g_strdup(entry_str); +} + +static void +setting_network_preffered_network_new_click_softkey_save_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, + "[Setting > Netwrok > Preferred New] Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + + int tapi_ret = TAPI_API_SUCCESS; + + TelNetworkPreferredPlmnInfo_t pref_plmn_info = { 0, }; + + int network_type = 0; + const char *mcc = NULL; + const char *mnc = NULL; + if (ad->data_new_mcc) { + mcc = ad->data_new_mcc->sub_desc; + } + if (ad->data_new_mnc) { + mnc = ad->data_new_mnc->sub_desc; + } + + setting_retm_if(isEmptyStr(mcc) + || isEmptyStr(mnc), + "mcc or mnc got from editfiled error"); + int mcc_len = strlen(mcc); + int mnc_len = strlen(mnc); + if (COUNTRY_CODE_LEN != mcc_len) { + if ((NETWORK_CODE_LEN < mnc_len) || (mnc_len <= 0)) { + setting_create_popup_without_btn(ad, ad->win_get, + NULL, _("please input country code made up of 3 digital number and network code made up of 1 ~ 3 digital number"), + NULL, POPUP_INTERVAL, FALSE, FALSE); + } else { + setting_create_popup_without_btn(ad, ad->win_get, + NULL, _("please input country code made up of 3 digital number"), + NULL, POPUP_INTERVAL, FALSE, FALSE); + } + return; + } + + if ((NETWORK_CODE_LEN < mnc_len) || (mnc_len <= 0)) { + setting_create_popup_without_btn(ad, ad->win_get, + NULL, _("please input network code made up of 1 ~ 3 digital number"), + NULL, POPUP_INTERVAL, FALSE, FALSE); + return; + } + + network_type = elm_radio_value_get(ad->chk_new_type); + + /* save mcc, mnc */ + safeCopyStr((char *)pref_plmn_info.Plmn, (char *)mcc, 3); + safeCopyStr((char *)pref_plmn_info.Plmn + 3, (char *)mnc, 3); + + SETTING_TRACE_DEBUG("%s*** mcc=%s, mnc=%s, plmn=%s ***%s", + SETTING_FONT_BGREEN, mcc, mnc, + (char *)(pref_plmn_info.Plmn), SETTING_FONT_BLACK); + + /* save network type */ + if (network_type == 0) { + pref_plmn_info.SystemType = TAPI_NETWORK_SYSTEM_GSM; + } else { + pref_plmn_info.SystemType = TAPI_NETWORK_SYSTEM_UMTS; + } + + pref_plmn_info.Index = + ad->pref_list.PrefPlmnRecord[ad->pref_list.NumOfPrefPlmns - + 1].Index + 1; + + ad->network_ug_pop = + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_ST_POP_SAVING"), + NULL, 0.0, TRUE, TRUE); + tapi_ret = + tel_set_network_preferred_plmn(ad->handle, TAPI_NETWORK_PREF_PLMN_ADD, + &pref_plmn_info, setting_tapi_set_preferred_plmn_cb, ad); + if (tapi_ret != TAPI_API_SUCCESS) { + SETTING_TRACE_DEBUG + ("%s*** [ERR] tel_set_network_preferred_plmn(PLMN_ADD) err=%d ***%s", + SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("Save Failed!"), NULL, POPUP_INTERVAL, FALSE, FALSE); + } + + ad->op_type = SETTING_NETWORK_PREFERRED_NETWORK_NEW; +} + +static void +setting_network_preferred_network_new_click_softkey_cancel_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SettingNetworkUG *ad = (SettingNetworkUG *) data; + + /* error check */ + retm_if(data == NULL, + "[Setting > Network > Preferred New] Data parameter is NULL"); + ad->op_type = SETTING_NETWORK_PREFERRED_NETWORK_NONE; + setting_view_change(&setting_view_network_preferred_network_new, + &setting_view_network_preferred_network, ad); +} diff --git a/setting-network/src/setting-network-preferred-network.c b/setting-network/src/setting-network-preferred-network.c new file mode 100755 index 0000000..f932dd9 --- /dev/null +++ b/setting-network/src/setting-network-preferred-network.c @@ -0,0 +1,325 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 + +static int setting_network_preferred_network_create(void *cb); +static int setting_network_preferred_network_destroy(void *cb); +static int setting_network_preferred_network_update(void *cb); +static int setting_network_preferred_network_cleanup(void *cb); + +setting_view setting_view_network_preferred_network = { + .create = setting_network_preferred_network_create, + .destroy = setting_network_preferred_network_destroy, + .update = setting_network_preferred_network_update, + .cleanup = setting_network_preferred_network_cleanup, +}; + +static void setting_network_preferred_network_Gendial_list_item_mouse_up_cb(void + *data, + Evas_Object + *obj, + void + *event_info); +static void setting_network_preferred_network_click_softkey_add_cb(void *data, + Evas_Object * + obj, void + *event_info); +static void setting_network_preferred_network_click_softkey_delete_cb(void + *data, + Evas_Object + *obj, + void + *event_info); +static void setting_network_preferred_network_click_softkey_back_cb(void *data, + Evas_Object + *obj, void + *event_info); +static void setting_network_preferred_network_click_ctxpopup_menu_1_cb(void + *data, + Evas_Object + *obj, + void + *event_info); +static void setting_network_preferred_network_click_ctxpopup_menu_2_cb(void + *data, + Evas_Object + *obj, + void + *event_info); + +static int setting_network_preferred_network_draw_network_list(void *data); + +/* *************************************************** + * + *basic func + * + ***************************************************/ + +static int setting_network_preferred_network_create(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + + int tapi_ret = TAPI_API_SUCCESS; + + bool keep = TRUE; + tapi_ret = tel_get_network_preferred_plmn(ad->handle, setting_tapi_get_preferred_plmn_cb, ad); + if (tapi_ret != TAPI_API_SUCCESS) { + SETTING_TRACE_DEBUG + ("%s*** [ERR] tel_get_network_preferred_plmn. err=%d ***%s", + SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); + keep = FALSE; + } + + ad->scl_pref = elm_genlist_add(ad->win_main_layout); + elm_object_style_set(ad->scl_pref , "dialogue"); + retvm_if(ad->scl_pref == NULL, SETTING_RETURN_FAIL, + "Cannot set scroller object as contento of layout"); + elm_genlist_clear(ad->scl_pref); /* first to clear list */ + + setting_push_layout_navi_bar(_("IDS_ST_BODY_PREFERRED_NETWORKS"), + _("IDS_COM_BODY_BACK"), _("IDS_COM_ADD"), + _("IDS_COM_SK_DELETE"), + setting_network_preferred_network_click_softkey_back_cb, + setting_network_preferred_network_click_softkey_add_cb, + setting_network_preferred_network_click_softkey_delete_cb, + ad, ad->scl_pref, ad->navi_bar, NULL); + + /* create preffered network list */ + setting_network_preferred_network_draw_network_list(ad); + /* ad->pop_pref_sch = setting_network_preferred_network_create_search_popup(ad); */ + ad->network_ug_pop = + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_COM_POP_SEARCHING"), + NULL, 0.0, TRUE, TRUE); + + setting_view_network_preferred_network.is_create = 1; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_preferred_network_destroy(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + elm_naviframe_item_pop(ad->navi_bar); + setting_view_network_preferred_network.is_create = 0; + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_preferred_network_update(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + + setting_network_preferred_network_refresh_view(ad); + + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_preferred_network_cleanup(void *cb) +{ + return setting_network_preferred_network_destroy(cb); +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +int setting_network_preferred_network_refresh_view(void *data) +{ + /* error check */ + retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SettingNetworkUG *ad = (SettingNetworkUG *) data; + + setting_network_preferred_network_draw_network_list(ad); + + return 0; +} + +static int setting_network_preferred_network_draw_network_list(void *data) +{ + /* error check */ + retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SettingNetworkUG *ad = (SettingNetworkUG *) data; + + int i = 0; + elm_genlist_clear(ad->scl_pref); /* first to clear list */ + for (i = 0; i < ad->pref_list.NumOfPrefPlmns; i++) { + setting_create_Gendial_field_def(ad->scl_pref, &itc_1text, + setting_network_preferred_network_Gendial_list_item_mouse_up_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, + ad-> + pref_list.PrefPlmnRecord + [i].network_name, NULL, NULL); + } + + return 0; +} + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void +setting_network_preferred_network_Gendial_list_item_mouse_up_cb(void *data, + Evas_Object * + obj, void + *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + + SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); + int i; + + for (i = 0; i < ad->pref_list.NumOfPrefPlmns; i++) { + if (!safeStrCmp + (ad->pref_list.PrefPlmnRecord[i].network_name, + list_item->keyStr)) { + break; + } + } + + SETTING_TRACE("i:%d", i); + ad->sel_pref_idx = ad->pref_list.PrefPlmnRecord[i].Index; + setting_view_change(&setting_view_network_preferred_network, + &setting_view_network_preferred_network_edit, ad); +} + +static void +setting_network_preferred_network_click_softkey_back_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + /* error check */ + retm_if(data == NULL, + "[Setting > Network > Preferred Net] Data parameter is NULL"); + SettingNetworkUG *ad = (SettingNetworkUG *) data; + + setting_view_change(&setting_view_network_preferred_network, + &setting_view_network_main, ad); +} + +static void +setting_network_preferred_network_click_ctxpopup_menu_1_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + /* error check */ + retm_if(data == NULL, + "[Setting > Network > Preferred Net] Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + + evas_object_del(ad->popup); + + setting_view_change(&setting_view_network_preferred_network, + &setting_view_network_preferred_network_list, ad); +} + +static void +setting_network_preferred_network_click_ctxpopup_menu_2_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + /* error check */ + retm_if(data == NULL, + "[Setting > Network > Preferred Net] Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + + evas_object_del(ad->popup); + + setting_view_change(&setting_view_network_preferred_network, + &setting_view_network_preferred_network_new, ad); +} + +static void +setting_network_preferred_network_click_softkey_add_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, + "[Setting > Network > Preferred Net] Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + + ad->popup = elm_ctxpopup_add(ad->navi_bar); + /* evas_object_smart_callback_add(ad->popup, "hide", _ctxpopup_cb, ad->popup); */ + + elm_ctxpopup_item_append(ad->popup, _("IDS_ST_BODY_NETWORK_LIST"), NULL, + setting_network_preferred_network_click_ctxpopup_menu_1_cb, + ad); + elm_ctxpopup_item_append(ad->popup, _("IDS_ST_POP_TEXT_NEW_NETWORK"), + NULL, + setting_network_preferred_network_click_ctxpopup_menu_2_cb, + ad); + + evas_object_resize(ad->popup, 480 * WIDGET_SCALE_FACTOR, + 300 * WIDGET_SCALE_FACTOR); + + Evas_Coord x, y, w, h; + evas_object_geometry_get(obj, &x, &y, &w, &h); + evas_object_move(ad->popup, (x + w / 2) * WIDGET_SCALE_FACTOR, + (y + h) * WIDGET_SCALE_FACTOR); + evas_object_show(ad->popup); +} + +static void +setting_network_preferred_network_click_softkey_delete_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + /* error check */ + retm_if(data == NULL, + "[Setting > Network > Preferred Net] Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + + if (ad->pref_list.NumOfPrefPlmns == 0) { + setting_create_simple_popup(ad, ad->win_get, + NULL, _("No Network to delete!")); + } else { + setting_view_change(&setting_view_network_preferred_network, + &setting_view_network_preferred_network_delete, + ad); + } +} diff --git a/setting-network/src/setting-network-select-network.c b/setting-network/src/setting-network-select-network.c new file mode 100755 index 0000000..90ac3eb --- /dev/null +++ b/setting-network/src/setting-network-select-network.c @@ -0,0 +1,305 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 + +static int setting_network_select_network_create(void *cb); +static int setting_network_select_network_destroy(void *cb); +static int setting_network_select_network_update(void *cb); +static int setting_network_select_network_cleanup(void *cb); + +setting_view setting_view_network_select_network = { + .create = setting_network_select_network_create, + .destroy = setting_network_select_network_destroy, + .update = setting_network_select_network_update, + .cleanup = setting_network_select_network_cleanup, +}; + +/* *************************************************** + * + *basic func + * + ***************************************************/ + +static int setting_network_select_network_create(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + ad->net_restore = NET_RESTORE_NONE; + + setting_push_layout_navi_bar_genlist(ad->win_main_layout, ad->win_get, + _("IDS_ST_BODY_SELECT_NETWORK"), + _("IDS_COM_BODY_BACK"), + NULL, + setting_network_select_network_click_softkey_cancel_cb, + NULL, + ad, &ad->genlist_sel_network, ad->navi_bar); + + Elm_Object_Item *item = elm_genlist_item_append(ad->genlist_sel_network, + &(itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* scroller is a genlist */ + ad->chk_sel = elm_radio_add(ad->genlist_sel_network); + elm_radio_state_value_set(ad->chk_sel, -1); + vconf_get_int(VCONFKEY_SETAPPL_SELECT_NETWORK_INT, &ad->sel_net);//retrieve here + SETTING_TRACE("ad->sel_net:%d", ad->sel_net); + + vconf_get_int(VCONFKEY_SETAPPL_SELECT_OLD_NT_ACT, &ad->sel_act);//retrieve here + SETTING_TRACE("ad->sel_act:%d", ad->sel_act); + + FREE(ad->sel_network); + //ad->sel_network = vconf_get_str(VCONFKEY_TELEPHONY_NWNAME); + ad->sel_network = get_pa_select_network(); + SETTING_TRACE("pa_sel_net_name:%s", ad->sel_network); + if (isEmptyStr(ad->sel_network)) { + ad->sel_network = strndup(Keystr_UNKNOWN_NETWORK, strlen(Keystr_UNKNOWN_NETWORK)+1); + } + + if (TAPI_NETWORK_SELECTIONMODE_AUTOMATIC == ad->sel_net) { + ad->data_auto_network_item = setting_create_Gendial_field_1radio( + ad->genlist_sel_network, + &(itc_2text_1icon_7), + setting_network_Gendial_select_plmn_cb, + ad, SWALLOW_Type_1TOGGLE, + NULL, TRUE, + "IDS_COM_BODY_AUTOMATIC", + setting_network_select_network_chk_changed); + setting_retvm_if(NULL == ad->data_auto_network_item, + SETTING_RETURN_FAIL, "Failed to calloc memory"); + char *sub_text = setting_customize_text(_(ad->sel_network), 0, BLUE_COLOR, NULL); + ad->data_auto_network_item->sub_desc = (char *)g_strdup(sub_text); + FREE(sub_text); + ad->data_auto_network_item->userdata = ad; + + } else if(TAPI_NETWORK_SELECTIONMODE_MANUAL == ad->sel_net) { + int tapi_ret; + + //new PDP concept: + //when user select network manully, it should disable 3g service, or it will no network to be found. + int err; + int old_pdp_value = 0; + int old_roaming_value = 0; + setting_get_bool_slp_key(BOOL_SLP_SETTING_USE_PACKET_DATA, &old_pdp_value, &err); + setting_get_bool_slp_key(BOOL_SLP_SETTING_DATA_ROAMING, &old_roaming_value, &err); + if (old_pdp_value) + { + SETTING_TRACE("Disable user packet data"); + setting_set_bool_slp_key(BOOL_SLP_SETTING_USE_PACKET_DATA, FALSE, &err); + ad->net_restore++; + if (old_roaming_value) + { + SETTING_TRACE("Disable data roaming"); + setting_set_bool_slp_key(BOOL_SLP_SETTING_DATA_ROAMING, FALSE, &err); + ad->net_restore++; + } + #ifdef FUTURE_FEATURE //feature in the future. + setting_create_popup_without_btn(ad, ad->win_get, NULL, _(NotifyStr_PDP_OFF), NULL, POPUP_INTERVAL, FALSE, FALSE); + #endif + } + + //searching list + tapi_ret = tel_search_network(ad->handle, setting_tapi_search_network_cb, ad); //ASYNC API - TAPI_EVENT_NETWORK_SEARCH_CNF + if(tapi_ret != TAPI_API_SUCCESS) { // error handling.. + SETTING_TRACE_DEBUG("%s*** [ERR] tel_search_network. tapi_ret=%d ***%s", SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _(STR_SETTING_OPERATION_FAILED), NULL, POPUP_INTERVAL, FALSE, FALSE); + // put error handler on the end of this function. + goto err_handle; + } + ad->b_searching_network = TRUE; + + ad->data_auto_network_item = setting_create_Gendial_field_1radio( + ad->genlist_sel_network, + &(itc_2text_1icon_7), + setting_network_Gendial_select_plmn_cb, + ad, SWALLOW_Type_1TOGGLE, + NULL, FALSE, "IDS_COM_BODY_AUTOMATIC", + setting_network_select_network_chk_changed); + + setting_retvm_if(NULL == ad->data_auto_network_item, + SETTING_RETURN_FAIL, "Failed to calloc memory"); + //ad->data_auto_network_item->sub_desc = (char *)g_strdup(ad->sel_network);//just a simple display + char *sub_text = setting_customize_text(_(ad->sel_network), 0, GRAY_COLOR, NULL); + ad->data_auto_network_item->sub_desc = (char *)g_strdup(sub_text); + FREE(sub_text); + ad->data_auto_network_item->userdata = ad; + if (0 != safeStrCmp("IDS_ST_BODY_NOSERVICE", ad->sel_network) + && 0 != safeStrCmp("EMERGENCY", ad->sel_network)) + { + //normal case: + Setting_GenGroupItem_Data *item_Data = NULL; + + char sel_network_desc[MAX_COMMON_BUFFER_LEN] = { 0, }; + snprintf(sel_network_desc, MAX_COMMON_BUFFER_LEN, "%s (%s)", + _(ad->sel_network),setting_network_get_act_str(ad->sel_act)); + + item_Data = setting_create_Gendial_field_1radio( + ad->genlist_sel_network, + &itc_1text_2icon_2, + setting_network_Gendial_select_plmn_cb, ad, + SWALLOW_Type_1RADIO, + ad->chk_sel, TAPI_NETWORK_SELECTIONMODE_MANUAL, + sel_network_desc, + setting_network_select_network_chk_changed); + setting_retvm_if(NULL == item_Data, SETTING_RETURN_FAIL, "Failed to calloc memory"); + item_Data->userdata = ad; + + ad->data_search_network_item = setting_create_Gendial_field_1radio( + ad->genlist_sel_network, + &itc_1text_2icon_2, + NULL, NULL, + SWALLOW_Type_1RADIO_1SEARCH, + ad->chk_sel, -1, NULL, NULL); + + elm_radio_value_set(ad->chk_sel, TAPI_NETWORK_SELECTIONMODE_MANUAL); + + } + else + { + //no service case: + ad->data_search_network_item = setting_create_Gendial_field_1radio( + ad->genlist_sel_network, + &itc_1text_2icon_2, + NULL, NULL, + SWALLOW_Type_1RADIO_1SEARCH, + ad->chk_sel, -1, NULL, NULL); + + } + } + + setting_view_network_select_network.is_create = TRUE; + return SETTING_RETURN_SUCCESS; + +err_handle: + setting_view_network_select_network.is_create = TRUE; + return SETTING_RETURN_FAIL; +} + +static int setting_network_select_network_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + int err; + switch (ad->net_restore) { + case NET_RESTORE_PDP: + //restore the pdp vconf to be true + setting_set_bool_slp_key(BOOL_SLP_SETTING_USE_PACKET_DATA, TRUE, &err); + break; + case NET_RESTORE_PDP_ROAM: + //restore the pdp and roaming vconfs to be true + setting_set_bool_slp_key(BOOL_SLP_SETTING_USE_PACKET_DATA, TRUE, &err); + setting_set_bool_slp_key(BOOL_SLP_SETTING_DATA_ROAMING, TRUE, &err); + break; + case NET_RESTORE_NONE: + default: + SETTING_TRACE("Do need restore any vconf"); + break; + } + ad->net_restore = NET_RESTORE_NONE;//reset the value + + //cancel the searching operation + if (ad->b_searching_network) { + int tapi_ret; + tapi_ret = tel_cancel_network_manual_search(ad->handle, setting_tapi_cancel_manual_search_cb, ad); + if (tapi_ret != TAPI_API_SUCCESS) { + SETTING_TRACE_ERROR("*** [ERR] tel_cancel_network_manual_search. "\ + "tapi_ret=%d ***", tapi_ret); + } + ad->b_searching_network = FALSE; + } + /*roolback..*/ + if (0 != vconf_get_int(VCONFKEY_SETAPPL_SELECT_NETWORK_INT, &ad->sel_net)) { + SETTING_TRACE_ERROR("vconf get failed"); + } + + if (0 != vconf_get_int(VCONFKEY_SETAPPL_SELECT_OLD_NT_ACT, &ad->sel_act)) { + SETTING_TRACE_ERROR("vconf get failed"); + } + + FREE(ad->sel_network); + //ad->sel_network = vconf_get_str(VCONFKEY_TELEPHONY_NWNAME); + ad->sel_network = get_pa_select_network(); + if (isEmptyStr(ad->sel_network)) { + ad->sel_network = strndup(Keystr_UNKNOWN_NETWORK, strlen(Keystr_UNKNOWN_NETWORK)+1); + } + + /*reset..*/ + ad->b_set_manul_network = FALSE; + ad->b_set_auto_network = FALSE; + setting_network_update_sel_network(ad); + + elm_naviframe_item_pop(ad->navi_bar); + + //Following handlers will be used by async listening callback. They must be reset after genlist is 'popuped'. + ad->data_auto_network_item = NULL; + //data_sel_net was created in main view, it won't be destoryed. + //ad->data_sel_net = NULL; + setting_view_network_select_network.is_create = FALSE; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_select_network_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + //SettingNetworkUG *ad = (SettingNetworkUG *) cb; + //elm_radio_value_set(ad->chk_sel, ad->sel_net); + + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_select_network_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + return setting_network_select_network_destroy(cb); +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void +setting_network_select_network_click_softkey_cancel_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + /* error check */ + retm_if(data == NULL, + "[Setting > Network > Select] Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + + setting_view_change(&setting_view_network_select_network, + &setting_view_network_main, ad); +} + diff --git a/setting-network/src/setting-network.c b/setting-network/src/setting-network.c new file mode 100755 index 0000000..ef4ed7d --- /dev/null +++ b/setting-network/src/setting-network.c @@ -0,0 +1,1195 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include +#include +#include + +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif +int setting_network_subscribe_tapi_events(void *data); +int setting_network_unsubscribe_tapi_events(void *data); + +static void __selected_network_change_cb(keynode_t *key, void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(!data, "!data"); + SettingNetworkUG *ad = data; + //char *value = vconf_keynode_get_str(key); + char *vconf_name = vconf_keynode_get_name(key); + + if (!safeStrCmp(vconf_name, VCONFKEY_TELEPHONY_NWNAME) + || !safeStrCmp(vconf_name, VCONFKEY_TELEPHONY_SPN_DISP_CONDITION) + || !safeStrCmp(vconf_name, VCONFKEY_TELEPHONY_SPN_NAME) + || !safeStrCmp(vconf_name, VCONFKEY_TELEPHONY_SVCTYPE) + ) { + //ad->sel_network = strdup(value); + ad->sel_network = get_pa_select_network(); + if (isEmptyStr(ad->sel_network)) { + ad->sel_network = strdup(_(Keystr_UNKNOWN_NETWORK)); + } + + if (0 != vconf_set_int(VCONFKEY_SETAPPL_SELECT_NETWORK_INT, ad->sel_net)) { + SETTING_TRACE_ERROR("vconf[%s] set failed"); + } + + if (0 != vconf_set_int(VCONFKEY_SETAPPL_SELECT_OLD_NT_ACT, ad->sel_act)) { + SETTING_TRACE_ERROR("vconf[%s] set failed"); + } + + setting_network_update_sel_network(ad); + } +} + + +static void setting_network_ug_cb_resize(void *data, Evas *e, + Evas_Object *obj, void *event_info) +{ + SettingNetworkUG *ad = (SettingNetworkUG *) data; + setting_view_update(&setting_view_network_main, ad); +} + + +static void *setting_network_ug_on_create(ui_gadget_h ug, + enum ug_mode mode, service_h service, + void *priv) +{ + setting_retvm_if((!priv), NULL, "!priv"); + + SettingNetworkUG *networkUG = priv; + networkUG->ug = ug; + + networkUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug); + networkUG->win_get = (Evas_Object *) ug_get_window(); + evas_object_show(networkUG->win_main_layout); + networkUG->evas = evas_object_evas_get(networkUG->win_main_layout); + + setting_retvm_if(networkUG->win_main_layout == NULL, NULL, + "cannot get main window "); + + + /* init */ + ecore_imf_init(); + + //pass NULL to let TAPI access default module + networkUG->handle = tel_init(NULL); + if (!networkUG->handle) { + SETTING_TRACE_DEBUG("%s*** [ERR] tel_init. ***%s", + SETTING_FONT_RED, SETTING_FONT_BLACK); + //return NULL; + } + + if (CONNECTION_ERROR_NONE == connection_create(&(networkUG->connection))) { + SETTING_TRACE_ERROR("***Failed to connection_create.***"); + //connection_set_type_changed_cb(connection, test_state_changed_callback, NULL); + //connection_set_ip_address_changed_cb(connection, test_ip_changed_callback, NULL); + //connection_set_proxy_address_changed_cb(connection, test_proxy_changed_callback, NULL); + } + + setting_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR); + + /* register view node table */ + setting_view_node_table_intialize(); + setting_view_node_table_register(&setting_view_network_main, NULL); + setting_view_node_table_register(&setting_view_network_select_network, + &setting_view_network_main); + setting_view_node_table_register(&setting_view_network_main_help, + &setting_view_network_main); + + setting_view_node_table_register(&setting_view_network_con, &setting_view_network_main); + setting_view_node_table_register(&setting_view_network_connection_create, &setting_view_network_con); + setting_view_node_table_register(&setting_view_network_3gcon, + &setting_view_network_main); + + setting_view_node_table_register + (&setting_view_network_preferred_network, + &setting_view_network_main); + setting_view_node_table_register + (&setting_view_network_preferred_network_list, + &setting_view_network_preferred_network); + setting_view_node_table_register + (&setting_view_network_preferred_network_new, + &setting_view_network_preferred_network); + setting_view_node_table_register + (&setting_view_network_preferred_network_edit, + &setting_view_network_preferred_network); + setting_view_node_table_register + (&setting_view_network_preferred_network_delete, + &setting_view_network_preferred_network); + + if (tel_get_network_mode(networkUG->handle, setting_tapi_get_band_cb, networkUG) != TAPI_API_SUCCESS) { + SETTING_TRACE_ERROR("*** [ERR] tel_get_network_band. ***"); + } + + if (tel_get_network_selection_mode(networkUG->handle, setting_tapi_get_plmn_mode_cb, networkUG) != TAPI_API_SUCCESS) { + SETTING_TRACE_ERROR("*** [ERR] tel_get_network_selection_mode. ***"); + } + + if (tel_get_network_serving(networkUG->handle, setting_tapi_get_serving_network_cb, networkUG) != TAPI_API_SUCCESS) { + SETTING_TRACE_ERROR("*** [ERR] tel_get_network_serving. ***"); + } + + /* creating a view. */ + setting_view_node_set_cur_view(&setting_view_network_main); + setting_view_create(&setting_view_network_main, (void *)networkUG); + evas_object_event_callback_add(networkUG->win_main_layout, + EVAS_CALLBACK_RESIZE, + setting_network_ug_cb_resize, networkUG); + + (void)vconf_notify_key_changed(VCONFKEY_TELEPHONY_NWNAME, __selected_network_change_cb, networkUG); + (void)vconf_notify_key_changed(VCONFKEY_TELEPHONY_SPN_DISP_CONDITION, __selected_network_change_cb, networkUG); + (void)vconf_notify_key_changed(VCONFKEY_TELEPHONY_SPN_NAME, __selected_network_change_cb, networkUG); + (void)vconf_notify_key_changed(VCONFKEY_TELEPHONY_SVCTYPE, __selected_network_change_cb, networkUG); + + networkUG->view_type_string = NULL; + service_get_extra_data(service, "viewtype", &(networkUG->view_type_string)); + if(networkUG->view_type_string) { + SETTING_TRACE("viewtype:%s", networkUG->view_type_string); + } + return networkUG->ly_main; +} + + +static void setting_network_ug_on_start(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_network_ug_on_pause(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_network_ug_on_resume(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_network_ug_on_destroy(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if((!priv), "!priv"); + SettingNetworkUG *networkUG = priv; + + (void)vconf_ignore_key_changed(VCONFKEY_TELEPHONY_NWNAME,__selected_network_change_cb); + (void)vconf_ignore_key_changed(VCONFKEY_TELEPHONY_SPN_DISP_CONDITION, __selected_network_change_cb); + (void)vconf_ignore_key_changed(VCONFKEY_TELEPHONY_SPN_NAME, __selected_network_change_cb); + (void)vconf_ignore_key_changed(VCONFKEY_TELEPHONY_SVCTYPE, __selected_network_change_cb); + + evas_object_event_callback_del(networkUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_network_ug_cb_resize); /* fix flash issue for gallery */ + networkUG->ug = ug; + + G_FREE(networkUG->ed_pxy_addr_desc); + G_FREE(networkUG->ed_pxy_port_desc); + FREE(networkUG->sel_network); + /* release */ + ecore_imf_shutdown(); + + /* unregister dnet client */ + if (networkUG->connection) + { + connection_destroy(networkUG->connection); + networkUG->connection = NULL; + } + + if (networkUG->handle && tel_deinit(networkUG->handle) != TAPI_API_SUCCESS) { + SETTING_TRACE_DEBUG + ("%s*** [ERR] setting_network_unsubscribe_tapi_events. ***%s", + SETTING_FONT_RED, SETTING_FONT_BLACK); + } + + setting_network_popup_delete(networkUG); + /* delete the allocated objects. */ + setting_view_destroy(&setting_view_network_select_network, networkUG); + setting_view_destroy(&setting_view_network_main_help, networkUG); + + setting_view_destroy(&setting_view_network_con, networkUG); + setting_view_destroy(&setting_view_network_connection_create, + networkUG); + setting_view_destroy(&setting_view_network_3gcon, networkUG); + + setting_view_destroy(&setting_view_network_preferred_network, + networkUG); + setting_view_destroy(&setting_view_network_preferred_network_list, + networkUG); + setting_view_destroy(&setting_view_network_preferred_network_new, + networkUG); + setting_view_destroy(&setting_view_network_preferred_network_edit, + networkUG); + setting_view_destroy(&setting_view_network_preferred_network_delete, + networkUG); + setting_view_destroy(&setting_view_network_main, networkUG); + + if (NULL != ug_get_layout(networkUG->ug)) { + evas_object_hide((Evas_Object *) ug_get_layout(networkUG->ug)); + evas_object_del((Evas_Object *) ug_get_layout(networkUG->ug)); + } + + SETTING_TRACE_END; +} + +static void setting_network_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) +{ +} + +static void setting_network_ug_on_event(ui_gadget_h ug, + enum ug_event event, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + 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; + case UG_EVENT_REGION_CHANGE: + break; + default: + break; + } +} + +static void setting_network_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + SettingNetworkUG *ad = (SettingNetworkUG *) priv; + + switch (event) { + case UG_KEY_EVENT_END: + { + /* setting_network_popup_delete(ad); */ + if (elm_naviframe_top_item_get(ad->navi_bar) == + elm_naviframe_bottom_item_get(ad->navi_bar)) { + ug_destroy_me(ug); + } else { + /* elm_naviframe_item_pop(ad->navi_bar); */ + setting_view_cb_at_endKey(ad); + } + } + break; + default: + break; + } +} + +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + SettingNetworkUG *networkUG = calloc(1, sizeof(SettingNetworkUG)); + setting_retvm_if(!networkUG, -1, "Create SettingNetworkUG obj failed"); + + ops->create = setting_network_ug_on_create; + ops->start = setting_network_ug_on_start; + ops->pause = setting_network_ug_on_pause; + ops->resume = setting_network_ug_on_resume; + ops->destroy = setting_network_ug_on_destroy; + ops->message = setting_network_ug_on_message; + ops->event = setting_network_ug_on_event; + ops->key_event = setting_network_ug_on_key_event; + ops->priv = networkUG; + ops->opt = UG_OPT_INDICATOR_ENABLE; + + return 0; +} + +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + struct SettingNetworkUG *networkUG; + setting_retm_if(!ops, "ops == NULL"); + + networkUG = ops->priv; + FREE(networkUG); +} + +/* *************************************************** + * + *general func + * + ***************************************************/ +void setting_network_popup_delete(void *data) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, + "setting_network_tapi_popup_create Data parameter is NULL"); + SettingNetworkUG *ad = (SettingNetworkUG *) data; + if (ad->network_ug_pop != NULL) { + evas_object_del(ad->network_ug_pop); + ad->network_ug_pop = NULL; + } +} + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +void setting_tapi_set_band_cb(TapiHandle *handle, int result, void *data, void *user_data) +{ + SETTING_TRACE_BEGIN; + SETTING_TRACE(" - result = 0x%x", result); + ret_if(!user_data); + SettingNetworkUG *ad = user_data; + ret_if(NULL == ad->data_net_mode); + + if(ad->network_ug_pop) + { + evas_object_del(ad->network_ug_pop); + ad->network_ug_pop = NULL; + } + + int err; + if (result == TAPI_NETWORK_NO_ERR) { + setting_set_int_slp_key(ad->data_net_mode->int_slp_setting_binded, + ad->net_mode, &err); + char *sub_des = NULL; + + switch (ad->net_mode) { + case TAPI_NETWORK_MODE_AUTO: + case TAPI_NETWORK_MODE_LTE|TAPI_NETWORK_MODE_GSM|TAPI_NETWORK_MODE_WCDMA: + sub_des = _(Keystr_NetBrand_Auto); + break; + + case TAPI_NETWORK_MODE_GSM: + sub_des = _(Keystr_NetBrand_GSM); + break; + + case TAPI_NETWORK_MODE_WCDMA: + sub_des = _(Keystr_NetBrand_WCDMA); + break; + case TAPI_NETWORK_MODE_LTE|TAPI_NETWORK_MODE_WCDMA: + sub_des = _(Keystr_NetBrand_LTE_WCDMA); + break; + case TAPI_NETWORK_MODE_GSM|TAPI_NETWORK_MODE_WCDMA: + sub_des = _(Keystr_NetBrand_Auto_WCDMA_GSM); + break; + default: + break; + } + if (ad->data_net_mode) { + ad->data_net_mode->sub_desc = (char *)g_strdup(sub_des); + elm_object_item_data_set(ad->data_net_mode->item, ad->data_net_mode); + elm_genlist_item_update(ad->data_net_mode->item); + } + + + } else { + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_COM_POP_FAILED"), NULL, POPUP_INTERVAL, FALSE, FALSE); + //rollback + //get value from vconf + setting_get_int_slp_key(ad->data_net_mode->int_slp_setting_binded, + &(ad->net_mode), &err); + if (ad->data_net_mode->rgd) elm_radio_value_set(ad->data_net_mode->rgd, ad->net_mode); + } +} +void setting_tapi_get_band_cb(TapiHandle *handle, int result, void *data, void *user_data) +{ + SETTING_TRACE_BEGIN; + SETTING_TRACE(" - result = 0x%x", result); + ret_if(!user_data); + SettingNetworkUG *ad = user_data; + + if (result == TAPI_NETWORK_NO_ERR) { + int band; + int temp_net_mode = 0; + memcpy(&band, data, sizeof(int)); + SETTING_TRACE("band:%d", band); + temp_net_mode = band; + /* ***BEGIN*** Fixed the problem of word twinkle SAMSUNG 2010/7/21 modify */ + if (temp_net_mode != ad->net_mode) { + ad->net_mode = temp_net_mode; + const char *sub_desc = NULL; + switch (ad->net_mode) { + case TAPI_NETWORK_MODE_AUTO: + case TAPI_NETWORK_MODE_LTE|TAPI_NETWORK_MODE_GSM|TAPI_NETWORK_MODE_WCDMA: + sub_desc = _(Keystr_NetBrand_Auto); + break; + case TAPI_NETWORK_MODE_GSM: + sub_desc = _(Keystr_NetBrand_GSM); + break; + case TAPI_NETWORK_MODE_WCDMA: + sub_desc = _(Keystr_NetBrand_WCDMA); + break; + case TAPI_NETWORK_MODE_LTE|TAPI_NETWORK_MODE_WCDMA: + sub_desc = _(Keystr_NetBrand_LTE_WCDMA); + break; + case TAPI_NETWORK_MODE_GSM|TAPI_NETWORK_MODE_WCDMA: + sub_desc = _(Keystr_NetBrand_Auto_WCDMA_GSM); + default: + break; + } + if (ad->data_net_mode) { + ad->data_net_mode->sub_desc = (char *)g_strdup(sub_desc); + elm_object_item_data_set (ad->data_net_mode->item, ad->data_net_mode); + elm_genlist_item_update(ad->data_net_mode->item); + + } + vconf_set_int(VCONFKEY_SETAPPL_NETWORK_MODE_INT, ad->net_mode); + } + /* ****END**** Fixed the problem of word twinkle SAMSUNG 2010/7/21 modify */ + } else { + } +} + + +void setting_tapi_set_plmn_mode_cb(TapiHandle *handle, int result, void *data, void *user_data) +{ + SETTING_TRACE_BEGIN; + SETTING_TRACE(" - result = 0x%x", result); + ret_if(!user_data); + SettingNetworkUG *ad = user_data; + + setting_network_popup_delete(ad); + + if ((TAPI_NETWORK_SELECTIONMODE_AUTOMATIC == ad->sel_net + && !ad->b_set_auto_network) || + (TAPI_NETWORK_SELECTIONMODE_MANUAL == ad->sel_net + && !ad->b_set_manul_network)) + { + /*The requeset has already been canceled, return directly*/ + return; + } + + if(result != TAPI_NETWORK_NO_ERR) {/*roolback..*/ + setting_create_popup_without_btn(ad, ad->win_get, NULL, _(keyStr_Failed_Select_Network), NULL, POPUP_INTERVAL, FALSE, FALSE); + + //rollback sel_act and sel_net in setting_view_network_select_network.destroy() + setting_view_change( + &setting_view_network_select_network, + &setting_view_network_main, ad); + + return; + + } + + setting_create_popup_without_btn(ad, ad->win_get, NULL, _(KeyStr_Saved), NULL, POPUP_INTERVAL, FALSE, FALSE); + if (0 != vconf_set_int(VCONFKEY_SETAPPL_SELECT_NETWORK_INT, ad->sel_net)) { + SETTING_TRACE_ERROR("vconf[%s] set failed"); + } + if (0 != vconf_set_int(VCONFKEY_SETAPPL_SELECT_OLD_NT_ACT, ad->sel_act)) { + SETTING_TRACE_ERROR("vconf[%s] set failed"); + } + + ad->b_set_auto_network = FALSE; + ad->b_set_manul_network = FALSE; + setting_network_update_sel_network(ad); +} +void setting_tapi_get_plmn_mode_cb(TapiHandle *handle, int result, void *data, void *user_data) +{ + SETTING_TRACE_BEGIN; + SETTING_TRACE(" - result = 0x%x", result); + ret_if(!user_data); + SettingNetworkUG *ad = user_data; + + if (result == TAPI_NETWORK_NO_ERR) { + TelNetworkSelectionMode_t sel; + memcpy(&sel, data, sizeof(TelNetworkSelectionMode_t)); + SETTING_TRACE_DEBUG("ad->sel_net[%d] %s sel[%d]", ad->sel_net, ad->sel_net == sel ? "==" : "!=", sel); + if (ad->sel_net != sel) { + ad->sel_net = sel; + vconf_set_int(VCONFKEY_SETAPPL_SELECT_NETWORK_INT, ad->sel_net); + setting_network_update_sel_network(ad); + } + } else { + } +} + +void setting_tapi_search_network_cb(TapiHandle *handle, int result, void *data, void *user_data) +{ + ret_if(!data || !user_data); + SettingNetworkUG *ad = user_data; + SETTING_TRACE_BEGIN; + SETTING_TRACE(" - result = %d", result); + setting_network_popup_delete(ad); + + if (!ad->b_searching_network) { + /*The requeset has already been canceled, don't do detail process*/ + return; + } + //setting_finish_progress_genlist_item(ad->data_selected_network_item); + if (ad->data_search_network_item) + { + elm_object_item_del(ad->data_search_network_item->item); + ad->data_search_network_item = NULL; + } + + ad->b_searching_network = FALSE; + int valid_cnt = 0; + if (result == TAPI_NETWORK_NO_ERR) { + int cnt = 0; + memcpy(&(ad->plmn_info), data, sizeof(TelNetworkPlmnList_t)); + + Setting_GenGroupItem_Data *item_data = NULL; + + //const char *pa_net_name = vconf_get_str(VCONFKEY_TELEPHONY_NWNAME); + const char *pa_net_name = get_pa_select_network(); + SETTING_TRACE("VCONFKEY_TELEPHONY_NWNAME:pa_net_name:%s", pa_net_name); + + char name[MAX_COMMON_BUFFER_LEN] = {0, }; + while(cnt < ad->plmn_info.networks_count) { + SETTING_TRACE("network name from TAPI[%d]:%s --%s --(%s)", cnt, + ad->plmn_info.network_list[cnt].network_name, + ad->plmn_info.network_list[cnt].service_provider_name, + setting_network_get_act_str(ad->plmn_info.network_list[cnt].access_technology)); + + if (TAPI_FORBIDDEN_PLMN == ad->plmn_info.network_list[cnt].type_of_plmn) { + cnt++; + continue; + } + + if (TAPI_NETWORK_SELECTIONMODE_MANUAL == ad->sel_net + && 0 == safeStrCmp(pa_net_name, ad->plmn_info.network_list[cnt].network_name) + && ad->plmn_info.network_list[cnt].access_technology == ad->sel_act) + { + //already displayed. + cnt++; + continue; + } + + memset(name, 0, MAX_COMMON_BUFFER_LEN); + snprintf(name, MAX_COMMON_BUFFER_LEN, "%s (%s)", + ad->plmn_info.network_list[cnt].network_name, + setting_network_get_act_str(ad->plmn_info.network_list[cnt].access_technology)); + + item_data = setting_create_Gendial_field_1radio( + ad->genlist_sel_network, + &itc_1text_2icon_2, + setting_network_Gendial_select_plmn_cb, + ad, + SWALLOW_Type_1RADIO, + ad->chk_sel, + TAPI_NETWORK_SELECTIONMODE_MANUAL+valid_cnt+1, + name, + setting_network_select_network_chk_changed); + if (NULL == item_data) + { + SETTING_TRACE_ERROR("Failed to calloc memory"); + cnt++; + continue; + } + item_data->userdata = ad; + if (TAPI_NETWORK_SELECTIONMODE_AUTOMATIC != ad->sel_net + && 0 == safeStrCmp(pa_net_name, ad->plmn_info.network_list[cnt].network_name) + && ad->plmn_info.network_list[cnt].access_technology == ad->sel_act) + { + elm_radio_value_set(ad->chk_sel, item_data->chk_status);//let select nothing + } + cnt++; + valid_cnt++; + } + FREE(pa_net_name); + + SETTING_TRACE("Found %d valid networks in total[%d]", valid_cnt, cnt); + //valid_cnt = 0; for test.. + if (valid_cnt > 0){ + setting_create_popup_without_btn(ad, ad->win_get, NULL, _(keyStr_Searched), NULL, POPUP_INTERVAL, FALSE, FALSE); + } else { //there is no invalid plmn nearby + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("There is no network nearby"), NULL, POPUP_INTERVAL, FALSE, FALSE); + } + } else { + setting_create_popup_without_btn(ad, ad->win_get, NULL, _(keyStr_Failed_Searched), NULL, POPUP_INTERVAL, FALSE, FALSE); + } + if (0 == valid_cnt && TAPI_NETWORK_SELECTIONMODE_AUTOMATIC == ad->sel_net && ad->data_auto_network_item) + { + ad->data_auto_network_item->chk_status = TRUE; + //elm_object_item_data_set(ad->data_auto_network_item->item, ad->data_auto_network_item); + //elm_genlist_item_item_class_update(ad->data_auto_network_item->item, &(itc_2text_1icon_6)); + char *sub_text = setting_customize_text(ad->data_auto_network_item->sub_desc, 0, BLUE_COLOR, NULL); + ad->data_auto_network_item->sub_desc = (char *)g_strdup(sub_text); + FREE(sub_text); + elm_object_item_data_set(ad->data_auto_network_item->item, ad->data_auto_network_item); + elm_genlist_item_update( ad->data_auto_network_item->item); + } +} + + +void setting_tapi_get_serving_network_cb(TapiHandle *handle, int result, void *data, void *user_data) +{ + SETTING_TRACE_BEGIN; + SETTING_TRACE(" - result = 0x%x", result); + ret_if(!user_data || !data); + SettingNetworkUG *ad = user_data; + TelNetworkServing_t *srv_nt = data; + + if (result == TAPI_NETWORK_NO_ERR) + { + ad->sel_act = srv_nt->act; + vconf_set_int(VCONFKEY_SETAPPL_SELECT_OLD_NT_ACT, ad->sel_act); + + FREE(ad->sel_network); + //ad->sel_network = vconf_get_str(VCONFKEY_TELEPHONY_NWNAME); + ad->sel_network = get_pa_select_network(); + if (isEmptyStr(ad->sel_network)) { + ad->sel_network = strndup(Keystr_UNKNOWN_NETWORK, strlen(Keystr_UNKNOWN_NETWORK)+1); + } + setting_network_update_sel_network(ad); + } + else + { + //if failed, do nothing.. + } + SETTING_TRACE_END; + +} + + +void setting_tapi_cancel_manual_search_cb(TapiHandle *handle, int result, void *data, void *user_data) +{ + SETTING_TRACE_BEGIN; + SETTING_TRACE(" - result = 0x%x", result); + ret_if(!user_data); + //SettingNetworkUG *ad = user_data; +} + +void setting_tapi_set_preferred_plmn_cb(TapiHandle *handle, int result, void *data, void *user_data) +{ + SETTING_TRACE_BEGIN; + SETTING_TRACE(" - result = 0x%x", result); + ret_if(!user_data); + SettingNetworkUG *ad = user_data; + setting_network_popup_delete(ad); + + if (result != TAPI_NETWORK_NO_ERR) { + switch (ad->op_type) { + case SETTING_NETWORK_PREFERRED_NETWORK_DELETE: + { + setting_network_preferred_network_delete_failed(ad); + break; + } + default: + { + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_COM_POP_ERROR"), NULL, POPUP_INTERVAL, FALSE, FALSE); + break; + } + } + } else { + int tapi_ret = TAPI_API_SUCCESS; + switch (ad->op_type) { + case SETTING_NETWORK_PREFERRED_NETWORK_NEW: + { + setting_view_change + (&setting_view_network_preferred_network_new, + &setting_view_network_preferred_network,ad); + tapi_ret = + tel_get_network_preferred_plmn + (ad->handle, setting_tapi_get_preferred_plmn_cb, ad); + break; + } + + case SETTING_NETWORK_PREFERRED_NETWORK_LIST: + { + + setting_view_change + (&setting_view_network_preferred_network_list, + &setting_view_network_preferred_network, + ad); + tapi_ret = + tel_get_network_preferred_plmn + (ad->handle, setting_tapi_get_preferred_plmn_cb, ad); + break; + } + + case SETTING_NETWORK_PREFERRED_NETWORK_EDIT: + { + setting_view_change + (&setting_view_network_preferred_network_edit, + &setting_view_network_preferred_network, + ad); + tapi_ret = + tel_get_network_preferred_plmn + (ad->handle, setting_tapi_get_preferred_plmn_cb, ad); + break; + } + case SETTING_NETWORK_PREFERRED_NETWORK_DELETE: + { + setting_network_preferred_network_delete_ok + (ad); + return; + } + default: + { + SETTING_TRACE_DEBUG + (" Unknown prederred network type"); + break; + } + } + + if (tapi_ret != + TAPI_API_SUCCESS) { + SETTING_TRACE_ERROR + ("*** [ERR] tel_get_network_preferred_plmn. err=%d ***", + tapi_ret); + } + } + +} + +void setting_tapi_get_preferred_plmn_cb(TapiHandle *handle, int result, void *data, void *user_data) +{ + SETTING_TRACE_BEGIN; + SETTING_TRACE(" - result = 0x%x", result); + ret_if(!user_data); + SettingNetworkUG *ad = user_data; + + SETTING_TRACE_DEBUG("Case: TAPI_EVENT_NETWORK_GETPREFFEREDPLMN_CNF"); + setting_network_popup_delete(ad); + + if (result == TAPI_NETWORK_NO_ERR) { + memcpy(&(ad->pref_list), data,sizeof(TelNetworkPreferredPlmnList_t)); + + SETTING_TRACE("*********** ad->op_type = %d",ad->op_type); + SETTING_TRACE("ad->pref_list.NumOfPrefPlmns:%d",ad->pref_list.NumOfPrefPlmns); + switch (ad->op_type) { + case SETTING_NETWORK_PREFERRED_NETWORK_DELETE: + { + setting_network_preferred_network_delete_draw_network_list(ad); + break; + } + default: + { + setting_network_preferred_network_refresh_view + (ad); + char info[MAX_DISPLAY_NAME_LEN_ON_UI] = { 0 }; + if (ad->pref_list.NumOfPrefPlmns > 1) { + snprintf(info, sizeof(info), "Get %d preferred networks", + ad->pref_list.NumOfPrefPlmns); + } else { + snprintf(info, sizeof(info), "Get %d preferred network", + ad->pref_list.NumOfPrefPlmns); + } + setting_create_popup_without_btn(ad, ad->win_get, NULL, _(info), NULL, POPUP_INTERVAL, FALSE, FALSE); + break; + } + } + } else { + switch (ad->op_type) { + case SETTING_NETWORK_PREFERRED_NETWORK_DELETE: + { + setting_network_preferred_network_delete_failed + (ad); + break; + } + default: + { + setting_create_popup_without_btn(ad, ad->win_get, NULL, _(keyStr_Failed_Get_PreferNetwork), NULL, POPUP_INTERVAL, FALSE, FALSE); + break; + } + } + } +} + +void __register_network(Setting_GenGroupItem_Data* list_item) +{ + SETTING_TRACE_BEGIN; + ret_if(list_item == NULL); + SETTING_TRACE("process item [%s]", list_item->keyStr); + SettingNetworkUG *ad = list_item->userdata; + ret_if(ad == NULL); + + int tapi_ret = TAPI_API_INVALID_INPUT; + + //cancel the searching operation + + if (ad->data_search_network_item) + { + elm_object_item_del(ad->data_search_network_item->item); + ad->data_search_network_item = NULL; + } + + if (ad->b_searching_network) { + SETTING_TRACE("Sending tel_cancel_network_manual_search.."); + tapi_ret = tel_cancel_network_manual_search(ad->handle, setting_tapi_cancel_manual_search_cb, ad); + if (tapi_ret != TAPI_API_SUCCESS) { + SETTING_TRACE_ERROR("*** [ERR] tel_cancel_network_manual_search. "\ + "tapi_ret=%d ***", tapi_ret); + } + else + { + ad->b_searching_network = FALSE; + } + } + + if (0 == safeStrCmp(list_item->keyStr, "IDS_COM_BODY_AUTOMATIC")) { + ad->sel_net = TAPI_NETWORK_SELECTIONMODE_AUTOMATIC; + SETTING_TRACE("Sending tel_select_network_automatic.."); + tapi_ret = tel_select_network_automatic(ad->handle, setting_tapi_set_plmn_mode_cb, ad); + if (tapi_ret != TAPI_API_SUCCESS) { + SETTING_TRACE_DEBUG("*** [ERR] tel_select_network_automatic."\ + " tapi_ret=%d ***",tapi_ret); + } else { + ad->network_ug_pop = setting_create_popup_without_btn(ad, ad->win_get, NULL, + _("IDS_COM_POP_PROCESSING"), NULL, + 0.0, TRUE, TRUE); + + if (ad->data_auto_network_item) + { + //ad->data_auto_network_item->sub_desc = (char *)g_strdup("...."); + //elm_genlist_item_item_class_update(ad->data_auto_network_item->item, &(itc_2text_1icon_6)); + char *sub_text = setting_customize_text("....", 0, BLUE_COLOR, NULL); + ad->data_auto_network_item->sub_desc = (char *)g_strdup(sub_text); + FREE(sub_text); + elm_object_item_data_set(ad->data_auto_network_item->item, ad->data_auto_network_item); + elm_genlist_item_update( ad->data_auto_network_item->item); + } + + ad->b_set_manul_network = FALSE; + ad->b_set_auto_network = TRUE; + ad->sel_act = -1;//means "Automatic" + } + } else { + ad->sel_net = TAPI_NETWORK_SELECTIONMODE_MANUAL; + ad->b_set_manul_network = TRUE; + ad->b_set_auto_network = FALSE; + + int cnt = 0; + SETTING_TRACE("ad->plmn_info.networks_count:%d", + ad->plmn_info.networks_count); + char name[MAX_COMMON_BUFFER_LEN] = {0, }; + for(; cnt < ad->plmn_info.networks_count; cnt++) + { + SETTING_TRACE("ad->plmn_info.network_list[cnt].network_name:%s", + ad->plmn_info.network_list[cnt].network_name); + memset(name, 0, MAX_COMMON_BUFFER_LEN); + snprintf(name, MAX_COMMON_BUFFER_LEN, "%s (%s)", + ad->plmn_info.network_list[cnt].network_name, + setting_network_get_act_str(ad->plmn_info.network_list[cnt].access_technology)); + + if(!safeStrCmp(list_item->keyStr, name)) + { + break; + } + } + + + SETTING_TRACE_DEBUG("*** [Selected PLMN] name=%s, "\ + "srv provider=%s, PLMN ID=%u, type=%d, "\ + "access tech=%d ***", + ad->plmn_info.network_list[cnt].network_name, + ad->plmn_info.network_list[cnt].service_provider_name, + ad->plmn_info.network_list[cnt].plmn_id, + (int)(ad->plmn_info.network_list[cnt].type_of_plmn), + (int)(ad->plmn_info.network_list[cnt].access_technology)); + + //ASYNC API - TAPI_EVENT_NETWORK_SELECT_CNF + SETTING_TRACE("Sending tel_select_network_manual.."); + char plmn_id[MAX_COMMON_BUFFER_LEN] = {0, }; + snprintf(plmn_id, MAX_COMMON_BUFFER_LEN, "%d", ad->plmn_info.network_list[cnt].plmn_id); + + tapi_ret = tel_select_network_manual(ad->handle, + plmn_id, ad->plmn_info.network_list[cnt].access_technology, + setting_tapi_set_plmn_mode_cb, ad); + if(tapi_ret != TAPI_API_SUCCESS) + { + SETTING_TRACE_DEBUG("%s*** [ERR] "\ + "tel_select_network_manual. "\ + "tapi_ret=%d ***%s", SETTING_FONT_RED, + tapi_ret, SETTING_FONT_BLACK); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_ST_BODY_FAILED_TO_SELECT_NETWORK"), NULL, POPUP_INTERVAL, FALSE, FALSE); + + return; + } + else + { + ad->network_ug_pop = setting_create_popup_without_btn(ad, ad->win_get, NULL, + _("IDS_COM_POP_PROCESSING"), NULL, + 0.0, TRUE, TRUE); + ad->sel_act = ad->plmn_info.network_list[cnt].access_technology; + FREE(ad->sel_network); + ad->sel_network = strdup(ad->plmn_info.network_list[cnt].network_name); + } + } +} + + +void __switch_automatic_network(Setting_GenGroupItem_Data *list_item) +{ + SETTING_TRACE_BEGIN; + ret_if(!list_item || !list_item->userdata || !list_item->keyStr); + ret_if(0 != safeStrCmp(list_item->keyStr, "IDS_COM_BODY_AUTOMATIC")); + SettingNetworkUG *ad = list_item->userdata; + SETTING_TRACE("The value of toogle changes to be %d", list_item->chk_status); + if (list_item->chk_status) //set automatic + { + Elm_Object_Item *last_item = elm_genlist_last_item_get(ad->genlist_sel_network); + SETTING_TRACE("ad->data_auto_network_item->item:%p", ad->data_auto_network_item->item); + for (;;) { + last_item = elm_genlist_last_item_get(ad->genlist_sel_network); + SETTING_TRACE("last_item:%p", last_item); + if (last_item == ad->data_auto_network_item->item) { + break; + } + elm_object_item_del(last_item); + } + + __register_network(list_item); + } + else //select a plmn + { + //__register_network(list_item); + int err; + int old_pdp_value = 0; + int old_roaming_value = 0; + setting_get_bool_slp_key(BOOL_SLP_SETTING_USE_PACKET_DATA, &old_pdp_value, &err); + setting_get_bool_slp_key(BOOL_SLP_SETTING_DATA_ROAMING, &old_roaming_value, &err); + if (old_pdp_value) + { + SETTING_TRACE("Disable user packet data"); + setting_set_bool_slp_key(BOOL_SLP_SETTING_USE_PACKET_DATA, FALSE, &err); + ad->net_restore++; + if (old_roaming_value) + { + SETTING_TRACE("Disable data roaming"); + setting_set_bool_slp_key(BOOL_SLP_SETTING_DATA_ROAMING, FALSE, &err); + ad->net_restore++; + } + #ifdef FUTURE_FEATURE //feature in the future. + setting_create_popup_without_btn(ad, ad->win_get, NULL, _(NotifyStr_PDP_OFF), NULL, POPUP_INTERVAL, FALSE, FALSE); + #endif + } + int tapi_ret; + //searching list + tapi_ret = tel_search_network(ad->handle, setting_tapi_search_network_cb, ad); //ASYNC API - TAPI_EVENT_NETWORK_SEARCH_CNF + if(tapi_ret != TAPI_API_SUCCESS) { // error handling.. + SETTING_TRACE_ERROR("%s*** [ERR] tel_search_network. tapi_ret=%d ***%s", SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _(STR_SETTING_OPERATION_FAILED), NULL, POPUP_INTERVAL, FALSE, FALSE); + + // put error handler on the end of this function. + //rollback.. + list_item->chk_status = TRUE; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + return; + } + ad->b_searching_network = TRUE; + ad->data_search_network_item = setting_create_Gendial_field_1radio( + ad->genlist_sel_network, + &itc_1text_2icon_2, + NULL, NULL, + SWALLOW_Type_1RADIO_1SEARCH, + ad->chk_sel, -1, NULL, NULL); + if (ad->data_auto_network_item) + { + //elm_genlist_item_item_class_update(ad->data_auto_network_item->item, &(itc_2text_1icon_7)); + char *sub_text = setting_customize_text(ad->data_auto_network_item->sub_desc, 0, GRAY_COLOR, NULL); + ad->data_auto_network_item->sub_desc = (char *)g_strdup(sub_text); + FREE(sub_text); + elm_object_item_data_set(ad->data_auto_network_item->item, ad->data_auto_network_item); + elm_genlist_item_update( ad->data_auto_network_item->item); + } + } +} + +void setting_network_select_network_chk_changed(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL || obj == NULL, "Parameter is NULL"); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *)data; + if (0 == safeStrCmp(list_item->keyStr, "IDS_COM_BODY_AUTOMATIC")) + { + list_item->chk_status = elm_check_state_get(obj); + __switch_automatic_network(list_item); + } + else //"IDS_COM_BODY_AUTOMATIC" + { + list_item->chk_status = elm_radio_value_get(obj); + SETTING_TRACE("The value of radio changes to be %d", list_item->chk_status); + __register_network(list_item); + } + +} + + +void setting_network_Gendial_select_plmn_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL || event_info == NULL, "Parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG*)data; + Elm_Object_Item *item = (Elm_Object_Item*)event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data*)elm_object_item_data_get(item); + + SETTING_TRACE("list_item->keyStr:%s", list_item->keyStr); + if (0 == safeStrCmp(list_item->keyStr, "IDS_COM_BODY_AUTOMATIC")) + { + list_item->chk_status = !elm_check_state_get(list_item->eo_check); + elm_check_state_set(list_item->eo_check, list_item->chk_status); + __switch_automatic_network(list_item); + return; + } + else + { + int old_chk_status = elm_radio_value_get(ad->chk_sel); + if (old_chk_status != list_item->chk_status) + { + SETTING_TRACE("The value of radio changes to be %d", + list_item->chk_status); + elm_radio_value_set(ad->chk_sel, list_item->chk_status); + __register_network(list_item); + } + } +} +void setting_network_update_sel_network(void *data) +{ + //SETTING_TRACE_BEGIN; + SettingNetworkUG *ad = data; + //SETTING_TRACE("ad->sel_net:%d", ad->sel_net); + //SETTING_TRACE("ad->sel_network:%s", ad->sel_network); + //SETTING_TRACE("sel_act = [%s(%d)]", setting_network_get_act_str(ad->sel_act),ad->sel_act); + + if (ad->data_auto_network_item) { + if (TAPI_NETWORK_SELECTIONMODE_AUTOMATIC == ad->sel_net) + { + SETTING_TRACE_DEBUG("After set as Automatic, update "\ + "ad->data_auto_network_item to be [%s]", + ad->sel_network); + //ad->data_auto_network_item->sub_desc = (char *)g_strdup(_(ad->sel_network)); + char *sub_text = setting_customize_text(_(ad->sel_network), 0, BLUE_COLOR, NULL); + ad->data_auto_network_item->sub_desc = (char *)g_strdup(sub_text); + FREE(sub_text); + elm_object_item_data_set(ad->data_auto_network_item->item, ad->data_auto_network_item); + elm_genlist_item_update( ad->data_auto_network_item->item); + } else { + } + } + + if (ad->data_sel_net)//it indicates TAPI is not responsed in time + { + char sel_network_desc[MAX_COMMON_BUFFER_LEN] = { 0, }; + if (TAPI_NETWORK_SELECTIONMODE_AUTOMATIC == ad->sel_net) { + snprintf(sel_network_desc, MAX_COMMON_BUFFER_LEN, + "%s, %s", _("IDS_COM_BODY_AUTOMATIC"), _(ad->sel_network)); + + } else { + snprintf(sel_network_desc, MAX_COMMON_BUFFER_LEN, + "%s, %s (%s)", _("IDS_COM_BODY_MANUAL"), _(ad->sel_network), + setting_network_get_act_str(ad->sel_act)); + } + + //SETTING_TRACE("sel_network_desc:%s", sel_network_desc); + + G_FREE(ad->data_sel_net->sub_desc); + ad->data_sel_net->sub_desc = (char *)g_strdup(_(sel_network_desc)); + + elm_object_item_data_set(ad->data_sel_net->item, ad->data_sel_net); + elm_genlist_item_update(ad->data_sel_net->item); + } +} + +const char *setting_network_get_act_str(TelNetworkSystemType_t type) +{ + switch (type) + { + case TAPI_NETWORK_SYSTEM_NO_SRV: //0 + return "NO SERVICE"; + case TAPI_NETWORK_SYSTEM_GSM: //1 + return "GSM"; + case TAPI_NETWORK_SYSTEM_GPRS: //2 + return "GPRS"; + case TAPI_NETWORK_SYSTEM_EGPRS: //3 + return "EGPRS"; + case TAPI_NETWORK_SYSTEM_PCS1900: //4 + return "PCS1900"; + case TAPI_NETWORK_SYSTEM_UMTS: //5 + return "UMTS"; + case TAPI_NETWORK_SYSTEM_GSM_AND_UMTS: + return "GSM and UMTS"; + case TAPI_NETWORK_SYSTEM_HSDPA: + return "HSDPA"; + case TAPI_NETWORK_SYSTEM_IS95A: + return "IS95A"; + case TAPI_NETWORK_SYSTEM_IS95B: + return "IS95B"; + case TAPI_NETWORK_SYSTEM_CDMA_1X: + return "CDMA 1X"; + case TAPI_NETWORK_SYSTEM_EVDO_REV_0: + return "EV-DO rev0"; + case TAPI_NETWORK_SYSTEM_1X_EVDO_REV_0_HYBRID: + return "1X and EV-DO rev0"; + case TAPI_NETWORK_SYSTEM_EVDO_REV_A: + return "EV-DO revA"; + case TAPI_NETWORK_SYSTEM_1X_EVDO_REV_A_HYBRID: + return "1X and EV-DO revA"; + case TAPI_NETWORK_SYSTEM_EVDV: + return "EV-DV"; + default: + return "NO SERVICE"; + } +} + +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + int ret = 0; + /* network */ +#if SUPPORT_RUN_SYSTEM_COMMAND + ret += excuteCmd(SETTING_POSTINST_FILE, 1, "network"); +#else + ret += vconf_set_int(VCONFKEY_SETAPPL_SELECT_NETWORK_INT, TAPI_NETWORK_SELECTIONMODE_AUTOMATIC); + ret += vconf_set_int(VCONFKEY_SETAPPL_SELECT_OLD_NT_ACT, 0); + ret += vconf_set_int(VCONFKEY_SETAPPL_NETWORK_MODE_INT, TAPI_NETWORK_BAND_TYPE_ANY); + ret += vconf_set_bool(VCONFKEY_3G_ENABLE, TRUE); + ret += vconf_set_bool(VCONFKEY_SETAPPL_STATE_DATA_ROAMING_BOOL, TRUE); +#endif + + TapiHandle *tapi_handle = tel_init(NULL); + if (tapi_handle) { + SETTING_TRACE_DEBUG("tel_init sucessfull"); + //1.tel_select_network_automatic + int tapi_ret = tel_select_network_automatic(tapi_handle, NULL, NULL); + if (tapi_ret != TAPI_API_SUCCESS) { + ret++; + SETTING_TRACE_ERROR("tel_select_network_automatic. tapi_ret=%d", tapi_ret); + } + + //2.tel_set_network_mode + tapi_ret = tel_set_network_mode(tapi_handle, TAPI_NETWORK_MODE_AUTO, + NULL, NULL); + if (tapi_ret != TAPI_API_SUCCESS) { + ret++; + SETTING_TRACE_ERROR("tel_set_network_mode. tapi_ret=%d", tapi_ret); + } + + //3.don't need to receive + if (tel_deinit(tapi_handle) == TAPI_API_SUCCESS) { + SETTING_TRACE_DEBUG("tel_deinit sucessfull"); + } + + } + + //Reset connections info.. + // -> need to cowwork with CSC + //ret += excuteCmd("/usr/bin/dbus-send", 1, NET_CON_RESET_DBUS_PARA); + SETTING_TRACE_END; + return ret; +} diff --git a/setting-password/CMakeLists.txt b/setting-password/CMakeLists.txt new file mode 100755 index 0000000..84ce41a --- /dev/null +++ b/setting-password/CMakeLists.txt @@ -0,0 +1,40 @@ + +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_password REQUIRED evas ecore edje elementary utilX appcore-common appcore-efl haptic ecore-imf +ui-gadget-1 capi-appfw-application tapi dlog) + +FOREACH(flag ${pkgs_password_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") +ADD_DEFINITIONS("-fpie") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl, --rpath=/usr/lib") + +ADD_LIBRARY(${SETTING_PASSWORD_UG} SHARED + ./src/setting-password.c + ./src/setting-password-main.c +) + +TARGET_LINK_LIBRARIES(${SETTING_PASSWORD_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_PASSWORD_UG} ${pkgs_password_LDFLAGS}) + +INSTALL(TARGETS ${SETTING_PASSWORD_UG} DESTINATION /usr/ug/lib) + + + + diff --git a/setting-password/include/setting-password-main.h b/setting-password/include/setting-password-main.h new file mode 100755 index 0000000..92d2b59 --- /dev/null +++ b/setting-password/include/setting-password-main.h @@ -0,0 +1,44 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 _SETTING_PASSWORD_MAIN_H_ +#define _SETTING_PASSWORD_MAIN_H_ + +#include + +static int setting_password_main_create_ui(void *data); +static int setting_password_main_create(void *cb); + +static int setting_password_main_draw_1line_password(void *data, void *cb); +static int setting_password_main_draw_2line_password(void *data, void *cb); +static int setting_password_main_draw_3line_password(void *data, void *cb); +static int setting_password_main_clear_1line_password(void *data); +static int setting_password_main_clear_2line_password(void *data); +static int setting_password_main_clear_3line_password(void *data); +static int setting_password_main_check_1line_password(void *data); +static int setting_password_main_check_2line_password(void *data); +static int setting_password_main_check_3line_password(void *data); + +static void setting_password_main_click_softkey_done_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_password_main_click_softkey_cancel_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_password_main_warning_entry_added_byte_popup(SettingPasswordUG *ad, + int min, int max); + +#endif diff --git a/setting-password/include/setting-password.h b/setting-password/include/setting-password.h new file mode 100755 index 0000000..2dc812d --- /dev/null +++ b/setting-password/include/setting-password.h @@ -0,0 +1,208 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 _SETTING_PASSWORD_H_ +#define _SETTING_PASSWORD_H_ + +#include +#include +#include + +#include +#include +#include +#include + +#include + +#include +#include +#include + +//#include + +#define SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH 4 +#define SETTING_PW_UG_NORMAL_PASSWORD_MAX_LENGTH 16 +#define SETTING_PW_UG_PRIVACY_PASSWORD_MIN_LENGTH 4 +#define SETTING_PW_UG_PRIVACY_PASSWORD_MAX_LENGTH 16 +#define SETTING_PW_UG_SIM_MIN_LENGTH 4 +#define SETTING_PW_UG_SIM_MAX_LENGTH 8 +#define SETTING_PW_UG_PIN_MIN_LENGTH 4 +#define SETTING_PW_UG_PIN_MAX_LENGTH 8 +#define SETTING_PW_UG_PUK_MIN_LENGTH 4 +#define SETTING_PW_UG_PUK_MAX_LENGTH 8 +#define SETTING_PW_MAX_TITLE_LENGTH MAX_DISPLAY_NAME_LEN_ON_UI + +#define PASSWORD_EMPTY _("IDS_ST_BODY_PASSWORD_EMPTY") +#define ATTEMPT_DESC _("IDS_ST_POP_PD_ATTEMPT_LEFT") /* "%d attempt left" */ +#define ATTEMPTS_DESC _("IDS_ST_POP_PD_ATTEMPTS_LEFT") /* "%d attempts left" */ +#define PIN_ERR_DESC _("IDS_ST_POP_INCORRECT_PIN_PD_ATTEMPTS_LEFT") /* "Incorrect PIN. %d attempts left" */ +#define PUK1_ERR_DESC _("IDS_ST_POP_INCORRECT_PUK1_PD_ATTEMPTS_LEFT") /* "Incorrect PUK1. %d attempts left" */ +#define PUK2_ERR_DESC _("IDS_ST_POP_INCORRECT_PUK2_PD_ATTEMPTS_LEFT") /* "Incorrect PUK2. %d attempts left" */ +#define PW_ERR_DESC _("IDS_ST_POP_INCORRECT_PASSWORD") /* "Incorrect password" */ +#define PW_ERR_DELAY_DESC _("IDS_ST_BODY_ENTER_PASSWORD_AGAIN_AFTER_PD_SECONDS") /* "Please enter password again after %d seconds" */ +#define PW_ERR_DELAY_TIME 30 +#define ATTEMPT_INFINITE 999999 + +#define PW_SHORT_GUIDE_CURRENT "IDS_ST_BODY_CURRENT" +#define PW_SHORT_GUIDE_NEW "IDS_ST_BODY_NEW" +#define PW_SHORT_GUIDE_CONFIRM "IDS_ST_BODY_CONFIRM" + +typedef enum { + SETTING_PW_TYPE_SIM_LOCK_ON, + SETTING_PW_TYPE_SIM_LOCK_OFF, + SETTING_PW_TYPE_PIN_LOCK_ON, + SETTING_PW_TYPE_PIN_LOCK_OFF, + SETTING_PW_TYPE_CHANGE_PIN1, + SETTING_PW_TYPE_CHANGE_PIN2, + SETTING_PW_TYPE_PIN1_BLOCKED, + SETTING_PW_TYPE_PIN2_BLOCKED, + SETTING_PW_TYPE_RESET, + SETTING_PW_TYPE_MAX, +} setting_pw_type; + +struct _pw_item { + int pw_type_num; + char *pw_type_string; +}; + +/* For Tapi */ +typedef enum { + SIM_OPERATION_OK, + SIM_ERROR, + SIM_REQ_PIN, + SIM_OPERATION_OFF, + SIM_LOCK_ON_SUCCESS, + SIM_LOCK_OFF_SUCCESS, + SIM_PIN_LOCK_ON_SUCCESS, + SIM_PIN_LOCK_OFF_SUCCESS, + SIM_LOCK_ON_FAIL, + SIM_LOCK_INCORRECT_PASSWORD, + SIM_INCORRECT_PIN1_CODE, + SIM_INCORRECT_PIN2_CODE, + SIM_INCORRECT_PUK1_CODE, + SIM_INCORRECT_PUK2_CODE, + SIM_PIN1_CHANGE_SUCCESS, + SIM_PIN2_CHANGE_SUCCESS, + SIM_PIN1_CHANGE_FAIL, + SIM_PIN2_CHANGE_FAIL, + SIM_PIN1_BLOCKED, + SIM_PIN2_BLOCKED, + SIM_PIN1_UNBLOCKED, + SIM_PIN2_UNBLOCKED, + SIM_PUK1_BLOCKED, + SIM_PUK2_BLOCKED, + SIM_REQUIRED_PUK_CODE, + SIM_OPERATION_UNAVAILABLE, + SIM_UNKNOWN_ERROR, +} sim_stat_value; + +typedef enum { + SETTING_PW_NAVIBAR_WITH_NO_BTN, + SETTING_PW_NAVIBAR_WITH_LEFT_BTN, + SETTING_PW_NAVIBAR_WITH_RIGHT_BTN, + SETTING_PW_NAVIBAR_WITH_BOTH_BTN, +} setting_pw_navibar_style_t; + +typedef struct _tapi_request_event { + unsigned int sid; + int event; +} tapi_request_event; + +typedef struct _tapi_receive_info { + sim_stat_value stat; + int retry_cnt; +} tapi_receive_info; + +typedef struct _tapi_request_tapi_info { + tapi_request_event *evt; + int evt_sz; + + void *cb_data; + void (*cb) (tapi_receive_info *, void *); +} tapi_request_tapi_info; + +/** + * Setting Password UG context + * all UG function has void* as an agument. this is casted back to SettingPasswordUG + * and the functions access app context. + */ +typedef struct _SettingPasswordUG { + ui_gadget_h ug; + TapiHandle *handle; + TelSimSecResult_t *verify_puks_result; + + /* add more variables here (move your appdata to here) */ + Evas *evas; + Evas_Object *win_main_layout; + Evas_Object *win_get; + Evas_Object *ly_main; + + setting_pw_type view_type; + char *view_type_string; + + Setting_GenGroupItem_Data *ed_pw1; + Setting_GenGroupItem_Data *ed_pw2; + Setting_GenGroupItem_Data *ed_pw3; + Setting_GenGroupItem_Data *focus_data; + Evas_Object *setpw_notify; + Evas_Object *notify; + + Elm_Object_Item *err_desc; + Elm_Genlist_Item_Class itc_err_desc; + + Elm_Object_Item *navi_it; + Evas_Object *controllbar; + tapi_request_tapi_info *t_info; + Evas_Object *navi_bar; + Elm_Genlist_Item_Class itc_variable_height; + Elm_Genlist_Item_Class itc_seperator; + Elm_Genlist_Item_Class itc_layout; + Elm_Genlist_Item_Class itc_group_item; + Evas_Object *scroller; + int disable_item_type; + + Elm_Genlist_Item_Class itc_title; + + int is_description; + int is_empty; + int rotated; + + bool destroy; + Ecore_Timer *remove_timer; + Ecore_Timer *set_history_timer; + Ecore_Timer *focus_timer; + /* end */ + +} SettingPasswordUG; + +extern setting_view setting_view_password_main; + +void setting_get_pin_lock_info_cb(TapiHandle *handle, int result, void *data, void *user_data); +void setting_get_sim_lock_info_cb(TapiHandle *handle, int result, void *data, void *user_data); + +void setting_sim_change_pins_cb(TapiHandle *handle, int result, void *data, void *user_data); +void setting_sim_verify_puks_cb(TapiHandle *handle, int result, void *data, void *user_data); +void setting_sim_facility_enable_cb(TapiHandle *handle, int result, void *data, void *user_data); +void setting_sim_facility_disable_cb(TapiHandle *handle, int result, void *data, void *user_data); + +void setting_password_ug_popup_resp_cb(void *data, Evas_Object *obj, void *event_info); +void setting_password_ug_create_popup_notitle_nobtn(void *data, char *str, int destroy); + +void setting_password_ug_display_desc(void *data, char *desc, int destroy); + + +#endif diff --git a/setting-password/src/setting-password-main.c b/setting-password/src/setting-password-main.c new file mode 100755 index 0000000..d94ce0b --- /dev/null +++ b/setting-password/src/setting-password-main.c @@ -0,0 +1,1496 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include +#include +#include +#include +#include + + +static int setting_password_main_create(void *cb); +static int setting_password_main_destroy(void *cb); +static int setting_password_main_update(void *cb); +static int setting_password_main_cleanup(void *cb); + +setting_view setting_view_password_main = { + .create = setting_password_main_create, + .destroy = setting_password_main_destroy, + .update = setting_password_main_update, + .cleanup = setting_password_main_cleanup, +}; + +#define ENTRY_CALLBACK_REPEAT_MAX 3 +#define SETTING_COMPARE_PW_FAIL -2 + +/* *************************************************** + * + *basic func + * + ***************************************************/ +static void +__password_main_gl_mouse_up(void *data, Evas *e, Evas_Object *obj, + void *event) +{ + ret_if(!data); + SettingPasswordUG *ad = (SettingPasswordUG *) data; + + if (ad->ed_pw1) { + setting_hide_input_pannel_cb(ad->ed_pw1->eo_check); + } + if (ad->ed_pw2) { + setting_hide_input_pannel_cb(ad->ed_pw2->eo_check); + } + if (ad->ed_pw3) { + setting_hide_input_pannel_cb(ad->ed_pw3->eo_check); + } + +} + +static char *setting_password_main_get_title_str(void *data) +{ + retvm_if(data == NULL, NULL, + "[Setting > Password] Data parameter is NULL"); + SettingPasswordUG *ad = (SettingPasswordUG *) data; + + switch (ad->view_type) { + case SETTING_PW_TYPE_SIM_LOCK_ON: + case SETTING_PW_TYPE_SIM_LOCK_OFF: + return _("IDS_COM_BODY_AUTH_PASSWORD"); + break; + case SETTING_PW_TYPE_PIN_LOCK_ON: + case SETTING_PW_TYPE_PIN_LOCK_OFF: + return _("IDS_ST_BODY_PIN1"); + break; + case SETTING_PW_TYPE_CHANGE_PIN1: + return _("IDS_ST_BODY_CHANGE_PIN1"); + break; + + case SETTING_PW_TYPE_CHANGE_PIN2: + return _("IDS_ST_BODY_CHANGE_PIN2"); + break; + + case SETTING_PW_TYPE_PIN1_BLOCKED: + return _("IDS_ST_BODY_PUK1_CODE"); + break; + case SETTING_PW_TYPE_PIN2_BLOCKED: + + return _("IDS_ST_BODY_PUK2"); + break; + default: + SETTING_TRACE_DEBUG("%s*** Unknown Password Type. ***%s", + SETTING_FONT_BGREEN, SETTING_FONT_BLACK); + break; + } + return NULL; + +} + +Elm_Object_Item* __create_navibar(void *data, Evas_Object *content, Evas_Object *navibar, setting_pw_navibar_style_t style) +{ + SETTING_TRACE_BEGIN; + retv_if(data == NULL || content == NULL || navibar == NULL, NULL); + + SettingPasswordUG *ad = (SettingPasswordUG *)data; + + Elm_Object_Item *navi_item = NULL; + Evas_Object *done_btn = NULL; + + switch(style) + { + case SETTING_PW_NAVIBAR_WITH_LEFT_BTN : + SETTING_TRACE_DEBUG("with left btn"); + navi_item = setting_create_navi_bar_top_buttons(setting_password_main_get_title_str(ad), + NULL, _("IDS_COM_SK_CANCEL"), NULL, + NULL, + setting_password_main_click_softkey_cancel_cb, + NULL, ad, content, navibar); + break; + case SETTING_PW_NAVIBAR_WITH_RIGHT_BTN : + SETTING_TRACE_DEBUG("with right btn"); + navi_item = setting_create_navi_bar_top_buttons(setting_password_main_get_title_str(ad), + _("IDS_COM_SK_DONE"), NULL, NULL, + setting_password_main_click_softkey_done_cb, NULL, + NULL, ad, content, navibar); + break; + case SETTING_PW_NAVIBAR_WITH_BOTH_BTN: + SETTING_TRACE_DEBUG("with both btn"); + navi_item = setting_create_navi_bar_top_buttons(setting_password_main_get_title_str(ad), + _("IDS_COM_SK_DONE"), _("IDS_COM_SK_CANCEL"), NULL, + setting_password_main_click_softkey_done_cb, + setting_password_main_click_softkey_cancel_cb, + NULL, ad, content, navibar); + break; + case SETTING_PW_NAVIBAR_WITH_NO_BTN: + SETTING_TRACE_DEBUG("with no btn"); + navi_item = setting_create_navi_bar_top_buttons(setting_password_main_get_title_str(ad), + NULL, NULL, NULL, + NULL, + NULL, + NULL, ad, content, navibar); + default: + break; + } + retv_if(!navi_item, NULL); + + done_btn = elm_object_item_part_content_get(navi_item, NAVI_BTN_STYLE_LEFT); + if(done_btn != NULL) + { + setting_disable_evas_object(done_btn); + setting_dim_evas_object(done_btn, TRUE); + } + return navi_item; +} + +static int __create_common_password_frame(void *data) +{ + SETTING_TRACE_BEGIN; + retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPasswordUG *ad = (SettingPasswordUG *)data; + Evas_Object *navi_bar = NULL; + static int count = 0; + + count++; + /* CONTENT */ + if(ad->scroller != NULL) + { + evas_object_del(ad->scroller); + } + + Evas_Object *pw_list = elm_genlist_add(ad->win_main_layout); + elm_object_style_set(pw_list, "dialogue"); + if(pw_list == NULL) + return SETTING_RETURN_FAIL; + + elm_genlist_clear(pw_list); /* first to clear list */ + elm_genlist_mode_set(pw_list, ELM_LIST_COMPRESS); + + +#if SUPPORT_BOTTOM_BTNS + ad->ly_main = setting_create_win_layout(ad->win_main_layout, ad->win_get); + retv_if(!ad->ly_main, SETTING_RETURN_FAIL); + + navi_bar = setting_create_navi_bar(ad->ly_main); + retv_if(!navi_bar, SETTING_RETURN_FAIL); + + ad->navi_it = __create_navibar(ad, pw_list, navi_bar, SETTING_PW_NAVIBAR_WITH_BOTH_BTN); + + retv_if(!ad->navi_it, SETTING_RETURN_FAIL); +#else + ad->ly_main = + setting_create_layout_navi_bar(ad->win_main_layout, ad->win_get, + setting_password_main_get_title_str + (ad), _("IDS_COM_SK_CANCEL"), + _("IDS_COM_SK_DONE"), NULL, + setting_password_main_click_softkey_cancel_cb, + setting_password_main_click_softkey_done_cb, + NULL, ad, pw_list /* contents */ , + &navi_bar, &(ad->controllbar)); + elm_object_item_disabled_set(elm_toolbar_last_item_get(ad->controllbar), EINA_TRUE); + + if(ad->ly_main == NULL) + return SETTING_RETURN_FAIL; +#endif + + evas_object_event_callback_add(pw_list, EVAS_CALLBACK_MOUSE_UP, + __password_main_gl_mouse_up, ad); + + Elm_Object_Item *item = elm_genlist_item_append(pw_list, + &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + ad->scroller = pw_list; + + return SETTING_RETURN_SUCCESS; +} + +static int +setting_password_main_create(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPasswordUG *ad = (SettingPasswordUG *) cb; + int ret = 0; + + ret = __create_common_password_frame(ad); + + if(ret < 0) + return SETTING_RETURN_FAIL; + + setting_password_main_create_ui(ad); + + setting_view_password_main.is_create = 1; + + SETTING_TRACE_END; + return SETTING_RETURN_SUCCESS; +} + +static int setting_password_main_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPasswordUG *ad = (SettingPasswordUG *) cb; + + if (ad->focus_timer) { + ecore_timer_del(ad->focus_timer); + ad->focus_timer = NULL; + } + if (ad->remove_timer) { + ecore_timer_del(ad->remove_timer); + ad->remove_timer = NULL; + } + + if (ad->ly_main != NULL) { + evas_object_del(ad->ly_main); + ad->ly_main = NULL; + setting_view_password_main.is_create = 0; + } + SETTING_TRACE_END; + return SETTING_RETURN_SUCCESS; +} + +static int setting_password_main_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPasswordUG *ad = (SettingPasswordUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_show(ad->ly_main); + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_password_main_cleanup(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPasswordUG *ad = (SettingPasswordUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_hide(ad->ly_main); + } + + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +static int setting_password_main_create_ui(void *data) +{ + /* error check */ + retvm_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER, + "[Setting > Password] Data parameter is NULL"); + + SettingPasswordUG *ad = (SettingPasswordUG *) data; + + SETTING_TRACE_DEBUG("ad->view_type=%d ***", ad->view_type); + + switch (ad->view_type) { + case SETTING_PW_TYPE_SIM_LOCK_OFF: + case SETTING_PW_TYPE_PIN_LOCK_ON: + case SETTING_PW_TYPE_PIN_LOCK_OFF: + setting_password_main_draw_1line_password(ad, NULL); + break; + case SETTING_PW_TYPE_SIM_LOCK_ON: + setting_password_main_draw_2line_password(ad, NULL); + break; + + case SETTING_PW_TYPE_CHANGE_PIN1: + case SETTING_PW_TYPE_CHANGE_PIN2: + case SETTING_PW_TYPE_PIN1_BLOCKED: + case SETTING_PW_TYPE_PIN2_BLOCKED: + setting_password_main_draw_3line_password(ad, NULL); + break; + + default: + SETTING_TRACE_DEBUG("%s*** Unknown Password Type. ***%s", + SETTING_FONT_BGREEN, SETTING_FONT_BLACK); + break; + } + + /** @todo this function always return 0, not verifying the function flow with the value */ + return 0; +} + +static void +setting_password_main_entry_changed_cb(void *data, Evas_Object *obj, + void *event_info) +{ + retm_if(data == NULL, "[Setting > Password] Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + SettingPasswordUG *ad = (SettingPasswordUG *) list_item->userdata; + const char *entry_str = elm_entry_entry_get(obj); + list_item->sub_desc = (char *)g_strdup(entry_str); + bool isFoundEmptyEntry = FALSE; + + Evas_Object *layout = elm_object_parent_widget_get(obj); + elm_object_part_text_set(layout, "elm.guidetext", ""); + + do { + if (ad->ed_pw1) { + entry_str = ad->ed_pw1->sub_desc; + if (NULL == entry_str || '\0' == entry_str[0]) { + isFoundEmptyEntry = TRUE; + layout = elm_object_parent_widget_get(ad->ed_pw1->eo_check); + elm_object_part_text_set(layout, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT")); + break; + } + } + if (ad->ed_pw2) { + entry_str = ad->ed_pw2->sub_desc; + if (NULL == entry_str || '\0' == entry_str[0]) { + isFoundEmptyEntry = TRUE; + layout = elm_object_parent_widget_get(ad->ed_pw2->eo_check); + elm_object_part_text_set(layout, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT")); + break; + } + } + if (ad->ed_pw3) { + entry_str = ad->ed_pw3->sub_desc; + if (NULL == entry_str || '\0' == entry_str[0]) { + isFoundEmptyEntry = TRUE; + layout = elm_object_parent_widget_get(ad->ed_pw3->eo_check); + elm_object_part_text_set(layout, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT")); + break; + } + } + + } while (0); + + bool disableFlag = isFoundEmptyEntry; + + #if SUPPORT_BOTTOM_BTNS + Evas_Object *done_btn = elm_object_item_part_content_get(ad->navi_it, NAVI_BTN_STYLE_LEFT); + if (disableFlag) { + if (!evas_object_pass_events_get(done_btn)) { /* it had not yet been disabled */ + setting_disable_evas_object(done_btn); + setting_dim_evas_object(done_btn, TRUE); + }/* else already disabled */ + } else { + setting_enable_evas_object(done_btn); + setting_undo_dim_evas_object(done_btn, TRUE); + } + #else + elm_object_item_disabled_set(elm_toolbar_last_item_get + (ad->controllbar), disableFlag); + #endif + +} + +static Eina_Bool __focus_on_idler(void *data) +{ + /* error check */ + retv_if(data == NULL, FALSE); + + SettingPasswordUG *ad = (SettingPasswordUG *) data; + + if(ad->ed_pw1) + { + if (ad->ed_pw1->isFocusFlag || (ad->ed_pw1->eo_check != NULL)) + { + /* no matter how many edifileds, it only need focus on 1st editfiled */ + elm_object_focus_set(ad->ed_pw1->eo_check, EINA_TRUE); + } + } + + return ECORE_CALLBACK_CANCEL; +} + +static int setting_password_main_draw_1line_password(void *data, void *cb) +{ + /* error check */ + retvm_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER, + "[Setting > Password] Data parameter is NULL"); + + SettingPasswordUG *ad = (SettingPasswordUG *) data; + + switch (ad->view_type) { + case SETTING_PW_TYPE_PIN_LOCK_ON: + case SETTING_PW_TYPE_PIN_LOCK_OFF: + ad->ed_pw1 = + setting_create_Gendial_field_entry(ad->scroller, + & + (ad->itc_variable_height), + NULL, ad, + SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + "IDS_ST_BODY_PIN1", NULL, + setting_password_main_entry_changed_cb, + ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, + TRUE, TRUE, + SETTING_PW_UG_PIN_MAX_LENGTH, + 0, "0123456789", NULL); + break; + + default: + break; + } + + ad->focus_timer = ecore_timer_add(0.4, __focus_on_idler, ad); + + return 0; +} + +static int setting_password_main_clear_1line_password(void *data) +{ + /* error check */ + retvm_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER, + "[Setting > Password] Data parameter is NULL"); + + SettingPasswordUG *ad = (SettingPasswordUG *) data; + retv_if(NULL == ad->ed_pw1, -1); + + ad->ed_pw1->sub_desc = NULL; + ad->ed_pw1->isFocusFlag = FALSE; + + elm_entry_entry_set(ad->ed_pw1->eo_check, ""); + Evas_Object *layout = elm_object_parent_widget_get(ad->ed_pw1->eo_check); + elm_object_part_text_set(layout, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT")); + return 0; +} + +static int setting_password_main_draw_2line_password(void *data, void *cb) +{ + /* error check */ + retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPasswordUG *ad = (SettingPasswordUG *) data; + + switch (ad->view_type) { + case SETTING_PW_TYPE_SIM_LOCK_ON: + ad->ed_pw1 = + setting_create_Gendial_field_entry(ad->scroller, + & + (ad->itc_variable_height), + NULL, ad, + SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + PW_SHORT_GUIDE_NEW, + NULL, + setting_password_main_entry_changed_cb, + ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, + TRUE, TRUE, + SETTING_PW_UG_SIM_MAX_LENGTH, + 0, "0123456789", NULL); + + ad->ed_pw2 = + setting_create_Gendial_field_entry(ad->scroller, + & + (ad->itc_variable_height), + NULL, ad, + SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + PW_SHORT_GUIDE_CONFIRM, + NULL, + setting_password_main_entry_changed_cb, + ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, + TRUE, FALSE, + SETTING_PW_UG_SIM_MAX_LENGTH, + 0, "0123456789", NULL); + break; + + default: + break; + } + + ad->focus_timer = ecore_timer_add(1, __focus_on_idler, ad); + return 0; +} + +static int setting_password_main_clear_2line_password(void *data) +{ + /* error check */ + retvm_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER, + "[Setting > Password] Data parameter is NULL"); + + SettingPasswordUG *ad = (SettingPasswordUG *) data; + Evas_Object *layout = NULL; + + retv_if(NULL == ad->ed_pw1, -1); + ad->ed_pw1->sub_desc = NULL; + ad->ed_pw1->isFocusFlag = FALSE; + elm_entry_entry_set(ad->ed_pw1->eo_check, ""); + layout = elm_object_parent_widget_get(ad->ed_pw1->eo_check); + elm_object_part_text_set(layout, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT")); + + retv_if(NULL == ad->ed_pw2, -1); + ad->ed_pw2->sub_desc = NULL; + ad->ed_pw2->isFocusFlag = FALSE; + elm_entry_entry_set(ad->ed_pw2->eo_check, ""); + layout = elm_object_parent_widget_get(ad->ed_pw2->eo_check); + elm_object_part_text_set(layout, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT")); + return 0; +} + +static int setting_password_main_draw_3line_password(void *data, void *cb) +{ + /* error check */ + retvm_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER, + "[Setting > Password] Data parameter is NULL"); + + SettingPasswordUG *ad = (SettingPasswordUG *) data; + Elm_Input_Panel_Layout ime_style = ELM_INPUT_PANEL_LAYOUT_NORMAL; + + switch (ad->view_type) { + case SETTING_PW_TYPE_CHANGE_PIN1: + ad->ed_pw1 = + setting_create_Gendial_field_entry(ad->scroller, + & + (ad->itc_variable_height), + NULL, ad, + SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + PW_SHORT_GUIDE_CURRENT, + NULL, + setting_password_main_entry_changed_cb, + ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, + TRUE, TRUE, + SETTING_PW_UG_PIN_MAX_LENGTH, + 0, "0123456789", NULL); + + ad->ed_pw2 = + setting_create_Gendial_field_entry(ad->scroller, + & + (ad->itc_variable_height), + NULL, ad, + SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + PW_SHORT_GUIDE_NEW, + NULL, + setting_password_main_entry_changed_cb, + ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, + TRUE, FALSE, + SETTING_PW_UG_PIN_MAX_LENGTH, + 0, "0123456789", NULL); + + ad->ed_pw3 = + setting_create_Gendial_field_entry(ad->scroller, + & + (ad->itc_variable_height), + NULL, ad, + SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + PW_SHORT_GUIDE_CONFIRM, + NULL, + setting_password_main_entry_changed_cb, + ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, + TRUE, FALSE, + SETTING_PW_UG_PIN_MAX_LENGTH, + 0, "0123456789", NULL); + break; + + case SETTING_PW_TYPE_CHANGE_PIN2: + ad->ed_pw1 = + setting_create_Gendial_field_entry(ad->scroller, + & + (ad->itc_variable_height), + NULL, ad, + SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + PW_SHORT_GUIDE_CURRENT, + NULL, + setting_password_main_entry_changed_cb, + ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, + TRUE, TRUE, + SETTING_PW_UG_PIN_MAX_LENGTH, + 0, "0123456789", NULL); + + ad->ed_pw2 = + setting_create_Gendial_field_entry(ad->scroller, + & + (ad->itc_variable_height), + NULL, ad, + SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + PW_SHORT_GUIDE_NEW, + NULL, + setting_password_main_entry_changed_cb, + ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, + TRUE, FALSE, + SETTING_PW_UG_PIN_MAX_LENGTH, + 0, "0123456789", NULL); + + ad->ed_pw3 = + setting_create_Gendial_field_entry(ad->scroller, + & + (ad->itc_variable_height), + NULL, ad, + SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + PW_SHORT_GUIDE_CONFIRM, + NULL, + setting_password_main_entry_changed_cb, + ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, + TRUE, FALSE, + SETTING_PW_UG_PIN_MAX_LENGTH, + 0, "0123456789", NULL); + break; + + case SETTING_PW_TYPE_PIN1_BLOCKED: + ad->ed_pw1 = + setting_create_Gendial_field_entry(ad->scroller, + & + (ad->itc_variable_height), + NULL, ad, + SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + "IDS_ST_BODY_PUK1_CODE", + NULL, + setting_password_main_entry_changed_cb, + ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, + TRUE, TRUE, + SETTING_PW_UG_PIN_MAX_LENGTH, + 0, "0123456789", NULL); + + ad->ed_pw2 = + setting_create_Gendial_field_entry(ad->scroller, + & + (ad->itc_variable_height), + NULL, ad, + SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + "IDS_ST_BODY_NEW_PIN1", + NULL, + setting_password_main_entry_changed_cb, + ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, + TRUE, FALSE, + SETTING_PW_UG_PIN_MAX_LENGTH, + 0, "0123456789", NULL); + + ad->ed_pw3 = + setting_create_Gendial_field_entry(ad->scroller, + & + (ad->itc_variable_height), + NULL, ad, + SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + "IDS_ST_BODY_CONFIRM_NEW_PIN1", + NULL, + setting_password_main_entry_changed_cb, + ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, + TRUE, FALSE, + SETTING_PW_UG_PIN_MAX_LENGTH, + 0, "0123456789", NULL); + break; + + case SETTING_PW_TYPE_PIN2_BLOCKED: + ad->ed_pw1 = + setting_create_Gendial_field_entry(ad->scroller, + & + (ad->itc_variable_height), + NULL, ad, + SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + "IDS_ST_BODY_PUK2", NULL, + setting_password_main_entry_changed_cb, + ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, + TRUE, TRUE, + SETTING_PW_UG_PIN_MAX_LENGTH, + 0, "0123456789", NULL); + + ad->ed_pw2 = + setting_create_Gendial_field_entry(ad->scroller, + & + (ad->itc_variable_height), + NULL, ad, + SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + "IDS_ST_BODY_NEW_PIN2", + NULL, + setting_password_main_entry_changed_cb, + ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, + TRUE, FALSE, + SETTING_PW_UG_PIN_MAX_LENGTH, + 0, "0123456789", NULL); + + ad->ed_pw3 = + setting_create_Gendial_field_entry(ad->scroller, + & + (ad->itc_variable_height), + NULL, ad, + SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + "IDS_ST_BODY_CONFIRM_NEW_PIN2", + NULL, + setting_password_main_entry_changed_cb, + ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, + TRUE, FALSE, + SETTING_PW_UG_PIN_MAX_LENGTH, + 0, "0123456789", NULL); + break; + + default: + break; + } + + ad->focus_timer = ecore_timer_add(1, __focus_on_idler, ad); + return 0; +} + +static int setting_password_main_clear_3line_password(void *data) +{ + /* error check */ + retvm_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER, + "[Setting > Password] Data parameter is NULL"); + + SettingPasswordUG *ad = (SettingPasswordUG *) data; + Evas_Object *layout = NULL; + + retv_if(NULL == ad->ed_pw1, -1); + ad->ed_pw1->sub_desc = NULL; + ad->ed_pw1->isFocusFlag = FALSE; + elm_entry_entry_set(ad->ed_pw1->eo_check, ""); + layout = elm_object_parent_widget_get(ad->ed_pw1->eo_check); + elm_object_part_text_set(layout, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT")); + + retv_if(NULL == ad->ed_pw2, -1); + ad->ed_pw2->sub_desc = NULL; + ad->ed_pw2->isFocusFlag = FALSE; + elm_entry_entry_set(ad->ed_pw2->eo_check, ""); + layout = elm_object_parent_widget_get(ad->ed_pw2->eo_check); + elm_object_part_text_set(layout, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT")); + + retv_if(NULL == ad->ed_pw3, -1); + ad->ed_pw3->sub_desc = NULL; + ad->ed_pw3->isFocusFlag = FALSE; + elm_entry_entry_set(ad->ed_pw3->eo_check, ""); + layout = elm_object_parent_widget_get(ad->ed_pw3->eo_check); + elm_object_part_text_set(layout, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT")); + return 0; +} + +static int setting_password_main_check_1line_password(void *data) +{ + /* error check */ + retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPasswordUG *ad = (SettingPasswordUG *) data; + + const char *entry_str = ad->ed_pw1->sub_desc; + ad->focus_data = ad->ed_pw1; + + /* Empty Check */ + if (isEmptyStr(entry_str)) { + setting_password_ug_display_desc(ad, _("IDS_ST_BODY_PASSWORD_EMPTY"), FALSE); + + return SETTING_ENTRY_RETURN_NULL_STR_ERR; + } + + /* Length Check */ + int entry_str_len = safeStrLen(entry_str); + switch (ad->view_type) { + case SETTING_PW_TYPE_PIN_LOCK_ON: + case SETTING_PW_TYPE_PIN_LOCK_OFF: + { + if (entry_str_len < SETTING_PW_UG_PIN_MIN_LENGTH + || entry_str_len > SETTING_PW_UG_PIN_MAX_LENGTH) { + setting_password_main_warning_entry_added_byte_popup + (ad, SETTING_PW_UG_PIN_MIN_LENGTH, SETTING_PW_UG_PIN_MAX_LENGTH); + return SETTING_ENTRY_REQUIRED_CORRECT_DIGIT_PW; + } + } + break; + case SETTING_PW_TYPE_SIM_LOCK_OFF: + { + if (entry_str_len < SETTING_PW_UG_SIM_MIN_LENGTH + || entry_str_len > SETTING_PW_UG_SIM_MAX_LENGTH) { + setting_password_main_warning_entry_added_byte_popup + (ad, SETTING_PW_UG_SIM_MIN_LENGTH, SETTING_PW_UG_SIM_MAX_LENGTH); + return SETTING_ENTRY_REQUIRED_CORRECT_DIGIT_PW; + } + } + default: + break; + } + return SETTING_RETURN_SUCCESS; +} + +static int setting_password_main_check_2line_password(void *data) +{ + /* error check */ + retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPasswordUG *ad = (SettingPasswordUG *) data; + + const char *entry_str1 = ad->ed_pw1->sub_desc; + const char *entry_str2 = ad->ed_pw2->sub_desc; + ad->focus_data = ad->ed_pw1; + + /* Empty Check */ + if (isEmptyStr(entry_str1)) { + setting_password_ug_display_desc(ad, _("IDS_ST_BODY_PASSWORD_EMPTY"), FALSE); + + return SETTING_ENTRY_RETURN_NULL_STR_ERR; + } + + if (isEmptyStr(entry_str2)) { + ad->focus_data = ad->ed_pw2; + setting_password_ug_display_desc(ad, _("IDS_ST_BODY_PASSWORD_EMPTY"), FALSE); + + return SETTING_ENTRY_RETURN_NULL_STR_ERR; + } + + /* Length Check */ + int entry_str_len = safeStrLen(entry_str1); + switch (ad->view_type) { + case SETTING_PW_TYPE_SIM_LOCK_ON: + { + if (entry_str_len < SETTING_PW_UG_SIM_MIN_LENGTH + || entry_str_len > SETTING_PW_UG_SIM_MAX_LENGTH) { + setting_password_main_warning_entry_added_byte_popup + (ad, SETTING_PW_UG_SIM_MIN_LENGTH, SETTING_PW_UG_SIM_MAX_LENGTH); + return SETTING_ENTRY_REQUIRED_CORRECT_DIGIT_PW; + } + } + break; + default: + break; + } + + /* Match Check */ + if (0 != safeStrCmp(entry_str1, entry_str2)) { + setting_password_ug_display_desc(ad, _("IDS_ST_POP_PASSWORDS_DO_NOT_MATCH"), FALSE); + + return SETTING_ENTRY_NOT_MATCH_NEW_CONF_PW; + } + + return SETTING_RETURN_SUCCESS; +} + +static void +setting_password_main_warning_entry_added_byte_popup(SettingPasswordUG *ad, + int min, int max) +{ + char str[MAX_SPECIALIZITION_LEN + 1] = { 0 }; + + snprintf(str, MAX_SPECIALIZITION_LEN, "%d~%d %s", min, max, _("characters required")); + + setting_password_ug_display_desc(ad, str, FALSE); + +} + +static int setting_password_main_check_3line_password(void *data) +{ + /* error check */ + retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPasswordUG *ad = (SettingPasswordUG *) data; + + const char *entry_str1 = ad->ed_pw1->sub_desc; + const char *entry_str2 = ad->ed_pw2->sub_desc; + const char *entry_str3 = ad->ed_pw3->sub_desc; + ad->focus_data = ad->ed_pw1; + + /* Empty Check */ + if (isEmptyStr(entry_str1)) { + setting_password_ug_display_desc(ad, _("IDS_ST_BODY_PASSWORD_EMPTY"), FALSE); + + return SETTING_ENTRY_RETURN_NULL_STR_ERR; + } + + if (isEmptyStr(entry_str2)) { + ad->focus_data = ad->ed_pw2; + setting_password_ug_display_desc(ad, _("IDS_ST_BODY_PASSWORD_EMPTY"), FALSE); + + return SETTING_ENTRY_RETURN_NULL_STR_ERR; + } + + if (isEmptyStr(entry_str3)) { + ad->focus_data = ad->ed_pw3; + setting_password_ug_display_desc(ad, _("IDS_ST_BODY_PASSWORD_EMPTY"), FALSE); + + return SETTING_ENTRY_RETURN_NULL_STR_ERR; + } + + /* Length Check */ + int entry_str1_len = safeStrLen(entry_str1); + int entry_str2_len = safeStrLen(entry_str2); + int entry_str3_len = safeStrLen(entry_str3); + switch (ad->view_type) { + case SETTING_PW_TYPE_PIN1_BLOCKED: + case SETTING_PW_TYPE_PIN2_BLOCKED: + case SETTING_PW_TYPE_CHANGE_PIN1: + case SETTING_PW_TYPE_CHANGE_PIN2: + { + if (entry_str1_len < SETTING_PW_UG_PIN_MIN_LENGTH + || entry_str1_len > SETTING_PW_UG_PIN_MAX_LENGTH) { + setting_password_main_warning_entry_added_byte_popup + (ad, SETTING_PW_UG_PIN_MIN_LENGTH, SETTING_PW_UG_PIN_MAX_LENGTH); + return SETTING_ENTRY_REQUIRED_CORRECT_DIGIT_PW; + } + if (entry_str2_len < SETTING_PW_UG_PIN_MIN_LENGTH + || entry_str2_len > SETTING_PW_UG_PIN_MAX_LENGTH) { + ad->focus_data = ad->ed_pw2; + setting_password_main_warning_entry_added_byte_popup + (ad, SETTING_PW_UG_PIN_MIN_LENGTH, SETTING_PW_UG_PIN_MAX_LENGTH); + return SETTING_ENTRY_REQUIRED_CORRECT_DIGIT_PW; + } + if (entry_str3_len < SETTING_PW_UG_PIN_MIN_LENGTH + || entry_str3_len > SETTING_PW_UG_PIN_MAX_LENGTH) { + ad->focus_data = ad->ed_pw3; + setting_password_main_warning_entry_added_byte_popup + (ad, SETTING_PW_UG_PIN_MIN_LENGTH, SETTING_PW_UG_PIN_MAX_LENGTH); + return SETTING_ENTRY_REQUIRED_CORRECT_DIGIT_PW; + } + } + break; + default: + break; + } + + /* Match Check */ + if (0 != safeStrCmp(entry_str2, entry_str3)) { + ad->focus_data = ad->ed_pw2; + setting_password_ug_display_desc(ad, _("IDS_ST_POP_PASSWORDS_DO_NOT_MATCH"), FALSE); + + return SETTING_ENTRY_NOT_MATCH_NEW_CONF_PW; + } + + return SETTING_RETURN_SUCCESS; +} + +static void +setting_password_main_click_softkey_cancel_cb(void *data, Evas_Object *obj, + void *event_info) +{ + /* error check */ + retm_if(data == NULL, "[Setting > Password] Data parameter is NULL"); + + SettingPasswordUG *ad = (SettingPasswordUG *) data; + + /* send result : Cancel */ + service_h svc; + if(service_create(&svc)) + return; + + service_add_extra_data(svc, "result", "Cancel"); + ug_send_result(ad->ug, svc); + SETTING_TRACE("Send Result : %s\n", "Cancel"); + + service_destroy(svc); + + /* Send destroy request */ + ug_destroy_me(ad->ug); + +} + +static void +setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, + void *event_info) +{ + /* error check */ + retm_if(data == NULL, "[Setting > Password] Data parameter is NULL"); + + int err = 0; + int ret = 0; + char svalue[SHA256_DIGEST_LENGTH] = { 0, }; + + memset(svalue, 0x0, SHA256_DIGEST_LENGTH); + + SettingPasswordUG *ad = (SettingPasswordUG *) data; + service_h svc; + + SETTING_TRACE("ad->view_type:%d", ad->view_type); + + switch (ad->view_type) { + case SETTING_PW_TYPE_PIN_LOCK_ON: + { + SETTING_TRACE("case SETTING_PW_TYPE_PIN_LOCK_ON"); + + ret = setting_password_main_check_1line_password(ad); + if (ret == SETTING_RETURN_SUCCESS) { + TelSimFacilityPw_t sim_sec_data = { 0, }; + int tapi_ret = TAPI_API_SUCCESS; + const char *entry_str; + + entry_str = ad->ed_pw1->sub_desc; + if (isEmptyStr(entry_str)) { + ad->focus_data = ad->ed_pw1; + SETTING_TRACE_ERROR("[ERR] elm_entry_entry_get(ad->ed_pw1) return NULL!"); + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + return; + } + + sim_sec_data.lock_type = TAPI_SIM_LOCK_SC;//TAPI_SIM_PTYPE_PIN1; + sim_sec_data.pw = (unsigned char *)entry_str; + sim_sec_data.pw_len = safeStrLen(entry_str); + + tapi_ret = tel_enable_sim_facility(ad->handle, &sim_sec_data, setting_sim_facility_enable_cb, ad); + setting_password_main_clear_1line_password(ad); + + if (TAPI_API_SUCCESS != tapi_ret) { + ad->focus_data = ad->ed_pw1; + SETTING_TRACE_DEBUG("%s*** [ERR] tel_enable_sim_facility err=%d ***%s", + SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + } else { + /* Success. Send Message to Caller for Modify Pin Lock slider status */ + SETTING_TRACE_DEBUG("*** [SUCCESS] tel_enable_sim_facility err=%d ***", tapi_ret); + } + } else { + setting_password_main_clear_1line_password(ad); + } + } + return; + case SETTING_PW_TYPE_PIN_LOCK_OFF: + { + SETTING_TRACE("case SETTING_PW_TYPE_PIN_LOCK_OFF"); + + ret = setting_password_main_check_1line_password(ad); + + if (ret == SETTING_RETURN_SUCCESS) { + TelSimFacilityPw_t sim_sec_data = { 0, }; + int tapi_ret = TAPI_API_SUCCESS; + const char *entry_str; + + entry_str = ad->ed_pw1->sub_desc; + if (isEmptyStr(entry_str)) { + ad->focus_data = ad->ed_pw1; + SETTING_TRACE_ERROR("[ERR] elm_entry_entry_get(ad->ed_pw1) return NULL!"); + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + return; + } + + sim_sec_data.lock_type = TAPI_SIM_LOCK_SC;//TAPI_SIM_PTYPE_PIN1 + sim_sec_data.pw = (unsigned char *)entry_str; + sim_sec_data.pw_len = safeStrLen(entry_str); + + tapi_ret = tel_disable_sim_facility(ad->handle, &sim_sec_data, setting_sim_facility_disable_cb, ad); + setting_password_main_clear_1line_password(ad); + + if (TAPI_API_SUCCESS != tapi_ret) { + ad->focus_data = ad->ed_pw1; + SETTING_TRACE_DEBUG("%s*** [ERR] tel_disable_sim_facility err=%d ***%s", + SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + } else { + /* Success. Send Message to Caller for Modify Pin Lock slider status */ + } + } else { + setting_password_main_clear_1line_password(ad); + } + } + return; + case SETTING_PW_TYPE_PIN1_BLOCKED: + { + /* PIN1 Status is "Blocked": User should input puk code and new pin1 code. */ + /* If puk code is correct and success to modify pin1 code, display pin1 code change popup */ + /* But, if this menu is "Pin Lock", pinlock status will not be changed. */ + SETTING_TRACE("case SETTING_PW_TYPE_PIN1_BLOCKED"); + ret = setting_password_main_check_3line_password(ad); + + if (ret == SETTING_RETURN_SUCCESS) { + TelSimSecPw_t puk1_data = { 0, }; + TelSimSecPw_t pin1_data = { 0, }; + int tapi_ret = TAPI_API_SUCCESS; + const char *puk; + const char *new_pin1; + + puk = ad->ed_pw1->sub_desc; + new_pin1 = ad->ed_pw2->sub_desc; + if (isEmptyStr(puk)) { + ad->focus_data = ad->ed_pw1; + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + return; + } + + if (isEmptyStr(new_pin1)) { + ad->focus_data = ad->ed_pw2; + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + return; + } + + puk1_data.type = TAPI_SIM_PTYPE_PUK1; + puk1_data.pw = (unsigned char *)puk; + puk1_data.pw_len = safeStrLen(puk); + + pin1_data.type = TAPI_SIM_PTYPE_PIN1; + pin1_data.pw = (unsigned char *)new_pin1; + pin1_data.pw_len = safeStrLen(new_pin1); + + tapi_ret = tel_verify_sim_puks(ad->handle, &puk1_data, &pin1_data, setting_sim_verify_puks_cb, ad); + setting_password_main_clear_3line_password(ad); + + if (TAPI_API_SUCCESS != tapi_ret) { + ad->focus_data = ad->ed_pw1; + SETTING_TRACE_DEBUG("%s*** [ERR] tel_verify_sim_puks err=%d ***%s", + SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + } else { + /* Success. Send Message to Caller for Modify Pin Lock slider status */ + + } + } else { + setting_password_main_clear_3line_password(ad); + } + } + return; + case SETTING_PW_TYPE_PIN2_BLOCKED: + { + SETTING_TRACE("case SETTING_PW_TYPE_PIN2_BLOCKED"); + ret = setting_password_main_check_3line_password(ad); + + if (ret == SETTING_RETURN_SUCCESS) { + TelSimSecPw_t puk2_data = { 0, }; + TelSimSecPw_t pin2_data = { 0, }; + int tapi_ret = TAPI_API_SUCCESS; + const char *puk; + const char *new_pin2; + + puk = ad->ed_pw1->sub_desc; + new_pin2 = ad->ed_pw2->sub_desc; + if (isEmptyStr(puk)) { + ad->focus_data = ad->ed_pw1; + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + return; + } + + if (isEmptyStr(new_pin2)) { + ad->focus_data = ad->ed_pw2; + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + return; + } + + puk2_data.type = TAPI_SIM_PTYPE_PUK2; + puk2_data.pw = (unsigned char *)puk; + puk2_data.pw_len = safeStrLen(puk); + + pin2_data.type = TAPI_SIM_PTYPE_PIN2; + pin2_data.pw = (unsigned char *)new_pin2; + pin2_data.pw_len = safeStrLen(new_pin2); + + tapi_ret = tel_verify_sim_puks(ad->handle, &puk2_data, &pin2_data, setting_sim_verify_puks_cb, ad); + setting_password_main_clear_3line_password(ad); + + if (TAPI_API_SUCCESS != tapi_ret) { + ad->focus_data = ad->ed_pw1; + SETTING_TRACE_DEBUG("%s*** [ERR] tel_verify_sim_puks err=%d ***%s", + SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + } else { + /* Success. Send Message to Caller for Modify Pin Lock slider status */ + + } + } else { + setting_password_main_clear_3line_password(ad); + } + } + return; + case SETTING_PW_TYPE_CHANGE_PIN1: + { + SETTING_TRACE("case SETTING_PW_TYPE_CHANGE_PIN1"); + + ret = setting_password_main_check_3line_password(ad); + if (ret == SETTING_RETURN_SUCCESS) { + const char *old_pw; + const char *new_pw; + TelSimSecPw_t sim_old_sec_data = { 0, }; + TelSimSecPw_t sim_new_sec_data = { 0, }; + int tapi_ret = TAPI_API_SUCCESS; + + old_pw = ad->ed_pw1->sub_desc; + new_pw = ad->ed_pw2->sub_desc; + if (isEmptyStr(old_pw)) { + ad->focus_data = ad->ed_pw1; + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + return; + } + + if (isEmptyStr(new_pw)) { + ad->focus_data = ad->ed_pw2; + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + return; + } + + sim_old_sec_data.type = TAPI_SIM_PTYPE_PIN1; + sim_new_sec_data.type = TAPI_SIM_PTYPE_PIN1; + sim_old_sec_data.pw = (unsigned char *)old_pw; + sim_old_sec_data.pw_len = safeStrLen(old_pw); + sim_new_sec_data.pw = (unsigned char *)new_pw; + sim_new_sec_data.pw_len = safeStrLen(new_pw); + + tapi_ret = tel_change_sim_pins(ad->handle, &sim_old_sec_data, &sim_new_sec_data, setting_sim_change_pins_cb, ad); + setting_password_main_clear_3line_password(ad); + + if (TAPI_API_SUCCESS != tapi_ret) { + ad->focus_data = ad->ed_pw1; + SETTING_TRACE_DEBUG("%s*** [ERR] TelTapiSimChangePIN err=%d ***%s", + SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + } else { + /* Success popup and send message to caller */ + /* setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_ST_POP_PIN1_CHANGED")); */ + } + } else { + setting_password_main_clear_3line_password(ad); + } + } + return; + case SETTING_PW_TYPE_CHANGE_PIN2: + { + SETTING_TRACE("case SETTING_PW_TYPE_CHANGE_PIN2"); + ret = setting_password_main_check_3line_password(ad); + if (ret == SETTING_RETURN_SUCCESS) { + const char *old_pw; + const char *new_pw; + TelSimSecPw_t sim_old_sec_data = { 0, }; + TelSimSecPw_t sim_new_sec_data = { 0, }; + int tapi_ret = TAPI_API_SUCCESS; + + old_pw = ad->ed_pw1->sub_desc; + new_pw = ad->ed_pw2->sub_desc; + if (isEmptyStr(old_pw)) { + ad->focus_data = ad->ed_pw1; + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + return; + } + + if (isEmptyStr(new_pw)) { + ad->focus_data = ad->ed_pw2; + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + return; + } + + sim_old_sec_data.type = TAPI_SIM_PTYPE_PIN2; + sim_new_sec_data.type = TAPI_SIM_PTYPE_PIN2; + sim_old_sec_data.pw = (unsigned char *)old_pw; + sim_old_sec_data.pw_len = safeStrLen(old_pw); + sim_new_sec_data.pw = (unsigned char *)new_pw; + sim_new_sec_data.pw_len = safeStrLen(new_pw); + + tapi_ret = tel_change_sim_pins(ad->handle, &sim_old_sec_data, &sim_new_sec_data, setting_sim_change_pins_cb, ad); + setting_password_main_clear_3line_password(ad); + + if (TAPI_API_SUCCESS != tapi_ret) { + ad->focus_data = ad->ed_pw1; + SETTING_TRACE_DEBUG("%s*** [ERR] TelTapiSimChangePIN err=%d ***%s", + SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + } else { + /* Success popup and send message to caller */ + /* setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_ST_POP_PIN2_CHANGED")); */ + } + } else { + setting_password_main_clear_3line_password(ad); + } + } + return; + case SETTING_PW_TYPE_SIM_LOCK_ON: + { + SETTING_TRACE("case SETTING_PW_TYPE_SIM_LOCK_ON"); + + ret = setting_password_main_check_2line_password(ad); + + if (ret == SETTING_RETURN_SUCCESS) { + TelSimFacilityPw_t sim_sec_data = { 0, }; + int tapi_ret = TAPI_API_SUCCESS; + const char *entry_str; + entry_str = ad->ed_pw1->sub_desc; + if (isEmptyStr(entry_str)) { + ad->focus_data = ad->ed_pw1; + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + return; + } + + sim_sec_data.lock_type = TAPI_SIM_LOCK_PS;//TAPI_SIM_PTYPE_SIM + sim_sec_data.pw = (unsigned char *)entry_str; + sim_sec_data.pw_len = safeStrLen(entry_str); + + tapi_ret = tel_enable_sim_facility(ad->handle, &sim_sec_data, setting_sim_facility_enable_cb, ad); + setting_password_main_clear_2line_password(ad); + + SETTING_TRACE("SIM Lock password : %s\n", (char *)(sim_sec_data.pw)); + if (TAPI_API_SUCCESS != tapi_ret) { + ad->focus_data = ad->ed_pw1; + SETTING_TRACE_DEBUG("%s*** [ERR] tel_enable_sim_facility err=%d ***%s", + SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + } else { + /* Success. Send Message to Caller for Modify Pin Lock slider status */ + + } + } else { + setting_password_main_clear_2line_password(ad); + } + } + return; + case SETTING_PW_TYPE_SIM_LOCK_OFF: + { + SETTING_TRACE("case SETTING_PW_TYPE_SIM_LOCK_OFF"); + + ret = setting_password_main_check_1line_password(ad); + if (ret == SETTING_RETURN_SUCCESS) { + TelSimFacilityPw_t sim_sec_data = { 0, }; + int tapi_ret = TAPI_API_SUCCESS; + const char *entry_str; + + entry_str = ad->ed_pw1->sub_desc; + if (isEmptyStr(entry_str)) { + ad->focus_data = ad->ed_pw1; + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + return; + } + + sim_sec_data.lock_type = TAPI_SIM_LOCK_PS;//TAPI_SIM_PTYPE_SIM + sim_sec_data.pw = (unsigned char *)entry_str; + sim_sec_data.pw_len = safeStrLen(entry_str); + + tapi_ret = tel_disable_sim_facility(ad->handle, &sim_sec_data, setting_sim_facility_disable_cb, ad); + setting_password_main_clear_1line_password(ad); + + if (TAPI_API_SUCCESS != tapi_ret) { + ad->focus_data = ad->ed_pw1; + SETTING_TRACE_DEBUG("%s*** [ERR] tel_disable_sim_facility err=%d ***%s", + SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + } else { + /* Success. Send Message to Caller for Modify Pin Lock slider status */ + + } + } else { + setting_password_main_clear_1line_password(ad); + } + } + return; +#if SUPPORT_FDN + case SETTING_PW_TYPE_FDN_MODE_ON: + { + SETTING_TRACE("case SETTING_PW_TYPE_FDN_MODE_ON"); + ret = setting_password_main_check_1line_password(ad); + + if(ret == SETTING_RETURN_SUCCESS) + { + const char *entry_str; + int tapi_ret = TAPI_API_INVALID_INPUT; + + TelSimFacilityPw_t sim_sec_data = {0,}; + int ReqId; + + entry_str = ad->ed_pw1->sub_desc; + if(isEmptyStr(entry_str)) + { + ad->focus_data = ad->ed_pw1; + SETTING_TRACE_ERROR("[ERR] elm_entry_entry_get(ad->ed_pw1) return NULL!"); + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + return; + } + sim_sec_data.lock_type = TAPI_SIM_LOCK_FD;//TAPI_SIM_PTYPE_PIN2; + sim_sec_data.pw_len = safeStrLen(entry_str); + sim_sec_data.pw = (unsigned char*)entry_str; + + tapi_ret = tel_enable_sim_facility(ad->handle, &sim_sec_data, setting_sim_facility_enable_cb, ad); + setting_password_main_clear_1line_password(ad); + + if(tapi_ret != TAPI_API_SUCCESS) + { + ad->focus_data = ad->ed_pw1; + SETTING_TRACE_ERROR("[ERR] Failed to enable FDN. Tapi return %d", tapi_ret); + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + return; + } + + /* Success */ + if (service_create(&svc)) + return; + + service_add_extra_data(svc, "result", ad->view_type_string); + ug_send_result(ad->ug, svc); + SETTING_TRACE("Send Result : %s\n", ad->view_type_string); + service_destroy(svc); + //ug_destroy_me(ad->ug); + } + else + { + /* check failed */ + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), TRUE); + } + } + break; + case SETTING_PW_TYPE_FDN_MODE_OFF: + { + SETTING_TRACE("case SETTING_PW_TYPE_FDN_MODE_OFF"); + ret = setting_password_main_check_1line_password(ad); + + if(ret == SETTING_RETURN_SUCCESS) + { + const char *entry_str; + int tapi_ret = TAPI_API_INVALID_INPUT; + + TelSimFacilityPw_t sim_sec_data = {0,}; + + entry_str = ad->ed_pw1->sub_desc; + if(isEmptyStr(entry_str)) + { + ad->focus_data = ad->ed_pw1; + SETTING_TRACE_ERROR("[ERR] elm_entry_entry_get(ad->ed_pw1) return NULL!"); + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + return; + } + sim_sec_data.lock_type = TAPI_SIM_LOCK_FD;//TAPI_SIM_PTYPE_PIN2 + sim_sec_data.pw_len = safeStrLen(entry_str); + sim_sec_data.pw = (unsigned char*)entry_str; + + tapi_ret = tel_disable_sim_facility(ad->handle, &sim_sec_data, setting_sim_facility_disable_cb, ad); + setting_password_main_clear_1line_password(ad); + + if(tapi_ret != TAPI_API_SUCCESS) + { + ad->focus_data = ad->ed_pw1; + SETTING_TRACE_ERROR("[ERR] Failed to disable FDN. Tapi return %d", tapi_ret); + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + return; + } + + /* Success */ + if (service_create(&svc)) + return; + + service_add_extra_data(svc, "result", ad->view_type_string); + ug_send_result(ad->ug, svc); + SETTING_TRACE("Send Result : %s\n", ad->view_type_string); + + service_destroy(svc); + //ug_destroy_me(ad->ug); + } + else + { + /* check failed */ + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), TRUE); + } + } + break; +#endif + default: + return; + } +} diff --git a/setting-password/src/setting-password.c b/setting-password/src/setting-password.c new file mode 100755 index 0000000..df4d816 --- /dev/null +++ b/setting-password/src/setting-password.c @@ -0,0 +1,960 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +//#include + +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif + +static struct _pw_item pw_its[] = { + { SETTING_PW_TYPE_SIM_LOCK_ON, "SETTING_PW_TYPE_SIM_LOCK_ON" }, + { SETTING_PW_TYPE_SIM_LOCK_OFF, "SETTING_PW_TYPE_SIM_LOCK_OFF" }, + { SETTING_PW_TYPE_PIN_LOCK_ON, "SETTING_PW_TYPE_PIN_LOCK_ON" }, + { SETTING_PW_TYPE_PIN_LOCK_OFF, "SETTING_PW_TYPE_PIN_LOCK_OFF" }, + { SETTING_PW_TYPE_CHANGE_PIN1, "SETTING_PW_TYPE_CHANGE_PIN1" }, + { SETTING_PW_TYPE_CHANGE_PIN2, "SETTING_PW_TYPE_CHANGE_PIN2" }, + { SETTING_PW_TYPE_PIN1_BLOCKED, "SETTING_PW_TYPE_PIN1_BLOCKED" }, + { SETTING_PW_TYPE_PIN2_BLOCKED, "SETTING_PW_TYPE_PIN2_BLOCKED" }, + { SETTING_PW_TYPE_RESET, "SETTING_PW_TYPE_RESET" }, + { SETTING_PW_TYPE_MAX, NULL } +}; + +static void setting_tapi_init(SettingPasswordUG *ad); +static void setting_password_ug_display_result_popup(tapi_receive_info *result, SettingPasswordUG *ad); + +static void setting_password_ug_cb_resize(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + SettingPasswordUG *ad = (SettingPasswordUG *) data; + setting_view_update(&setting_view_password_main, ad); +} + +static void setting_tapi_init(SettingPasswordUG *ad) +{ + SETTING_TRACE_BEGIN; + switch (ad->view_type) { + case SETTING_PW_TYPE_SIM_LOCK_ON: + case SETTING_PW_TYPE_SIM_LOCK_OFF: + case SETTING_PW_TYPE_PIN_LOCK_ON: + case SETTING_PW_TYPE_PIN_LOCK_OFF: + case SETTING_PW_TYPE_CHANGE_PIN1: + case SETTING_PW_TYPE_CHANGE_PIN2: + case SETTING_PW_TYPE_PIN1_BLOCKED: + case SETTING_PW_TYPE_PIN2_BLOCKED: + ad->handle = tel_init(NULL); + if (!ad->handle) { + SETTING_TRACE_DEBUG("%s*** [ERR] tel_init. ***%s", + SETTING_FONT_RED, SETTING_FONT_BLACK); + setting_password_ug_create_popup_notitle_nobtn(ad, + _("IDS_COM_POP_ERROR"), + FALSE); + } + + break; + default: + break; + } + SETTING_TRACE_END; +} + +static void setting_tapi_finize(SettingPasswordUG *ad) +{ + SETTING_TRACE_BEGIN; + switch (ad->view_type) { + case SETTING_PW_TYPE_SIM_LOCK_ON: + case SETTING_PW_TYPE_SIM_LOCK_OFF: + case SETTING_PW_TYPE_PIN_LOCK_ON: + case SETTING_PW_TYPE_PIN_LOCK_OFF: + case SETTING_PW_TYPE_CHANGE_PIN1: + case SETTING_PW_TYPE_CHANGE_PIN2: + case SETTING_PW_TYPE_PIN1_BLOCKED: + case SETTING_PW_TYPE_PIN2_BLOCKED: + if (tel_deinit(ad->handle) != TAPI_API_SUCCESS) { + SETTING_TRACE_DEBUG + ("%s*** [ERR] setting_network_unsubscribe_tapi_events. ***%s", + SETTING_FONT_RED, SETTING_FONT_BLACK); + setting_password_ug_create_popup_notitle_nobtn(ad, + _("IDS_COM_POP_ERROR"), + FALSE); + } + break; + default: + break; + } + SETTING_TRACE_END; +} + +setting_pw_type __get_password_view_type(SettingPasswordUG *ad, service_h service) +{ + SETTING_TRACE_BEGIN; + + service_get_extra_data(service, "viewtype", &(ad->view_type_string)); + + SETTING_TRACE("viewtype:%s", ad->view_type_string); + setting_pw_type ret_pw_type = 0; + int i; + + for(i = 0; i < SETTING_PW_TYPE_MAX; i++) + { + if (0 == safeStrCmp(ad->view_type_string, pw_its[i].pw_type_string)) + { + ret_pw_type = pw_its[i].pw_type_num; + break; + } + } + + /* end */ + + return ret_pw_type; +} + +static char *__gl_err_desc_text_get(void *data, Evas_Object *obj, const char *part) +{ + retv_if(data == NULL, NULL); + char buf[256] = {0,}; + + snprintf(buf, sizeof(buf)-1, "%s", (char*)data); + + return strdup(buf); +} + +static void *setting_password_ug_on_create(ui_gadget_h ug, + enum ug_mode mode, service_h service, + void *priv) +{ + setting_retvm_if((!priv), NULL, "!priv"); + + SettingPasswordUG *passwordUG = (SettingPasswordUG *)priv; + passwordUG->ug = ug; + passwordUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug); + passwordUG->win_get = (Evas_Object *) ug_get_window(); + evas_object_show(passwordUG->win_main_layout); + passwordUG->evas = evas_object_evas_get(passwordUG->win_main_layout); + + setting_retvm_if(passwordUG->win_main_layout == NULL, NULL, + "cannot get main window "); + + /* --------------------------------------------------------- */ + char *pa_path = NULL;; + + pa_path = vconf_get_str(VCONFKEY_LANGSET); + if (!pa_path) { + SETTING_TRACE + ("%s*** language setting has no proper value (nil) ***%s", + SETTING_FONT_BGREEN, SETTING_FONT_BLACK); + return NULL; + } + /* set launguage */ + setting_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR); + FREE(pa_path); + + setting_create_Gendial_itc("dialogue/title", &(passwordUG->itc_title)); + setting_create_Gendial_itc("dialogue/1icon",&(passwordUG->itc_variable_height)); + passwordUG->itc_seperator.item_style = "dialogue/separator"; + passwordUG->itc_seperator.func.text_get = NULL; + passwordUG->itc_seperator.func.content_get = NULL; + passwordUG->itc_seperator.func.state_get = NULL; + passwordUG->itc_seperator.func.del = NULL; + + passwordUG->itc_err_desc.item_style = "multiline/1text"; + passwordUG->itc_err_desc.func.text_get = __gl_err_desc_text_get; + passwordUG->itc_err_desc.func.content_get = NULL; + passwordUG->itc_err_desc.func.state_get = NULL; + passwordUG->itc_err_desc.func.del = NULL; + + /* init */ + passwordUG->view_type = __get_password_view_type(passwordUG, service); + setting_tapi_init(passwordUG); + + /* creating a view. */ + setting_view_create(&setting_view_password_main,(void *)passwordUG); + evas_object_event_callback_add(passwordUG->win_main_layout, + EVAS_CALLBACK_RESIZE, + setting_password_ug_cb_resize, + passwordUG); + return passwordUG->ly_main; +} + +static void setting_password_ug_on_start(ui_gadget_h ug, service_h service, void *priv) +{ +} + +static void setting_password_ug_on_pause(ui_gadget_h ug, service_h service, void *priv) +{ +} + +static void setting_password_ug_on_resume(ui_gadget_h ug, service_h service, void *priv) +{ +} + +static void setting_password_ug_on_destroy(ui_gadget_h ug, service_h service, void *priv) +{ + SettingPasswordUG *passwordUG = (SettingPasswordUG *)priv; + + evas_object_event_callback_del(passwordUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_password_ug_cb_resize); /* fix flash issue for gallery */ + passwordUG->ug = ug; + setting_tapi_finize(passwordUG); + + if (passwordUG->t_info) { + FREE(passwordUG->t_info); + } + if(passwordUG->remove_timer) + { + ecore_timer_del(passwordUG->remove_timer); + passwordUG->remove_timer = NULL; + } + + /* delete the allocated objects. */ + setting_view_destroy(&setting_view_password_main, passwordUG); + if (NULL != ug_get_layout(passwordUG->ug)) { + evas_object_hide((Evas_Object *) ug_get_layout(passwordUG->ug)); + evas_object_del((Evas_Object *) ug_get_layout(passwordUG->ug)); + } +} + +static void setting_password_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) +{ + +} + +static void setting_password_ug_on_event(ui_gadget_h ug, + enum ug_event event, service_h service, + void *priv) +{ + if (!priv) + return; + + SettingPasswordUG *ad = (SettingPasswordUG*)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: + case UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN: + case UG_EVENT_ROTATE_LANDSCAPE: + case UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN: + /* Focus entry */ + SETTING_TRACE_DEBUG("get rotation event"); + if(ad->ed_pw1) + { + if (ad->ed_pw1->isFocusFlag || (ad->ed_pw1->eo_check != NULL)) + { + SETTING_TRACE_DEBUG("set focus"); + /* no matter how many edifileds, it only need focus on 1st editfiled */ + elm_object_focus_set(ad->ed_pw1->eo_check, EINA_TRUE); + elm_entry_cursor_end_set(ad->ed_pw1->eo_check); + } + } + + break; + case UG_EVENT_REGION_CHANGE: + break; + default: + break; + } +} + +static void setting_password_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, + service_h service, void *priv) +{ + if (!priv) + return; + + SettingPasswordUG *ad = (SettingPasswordUG*)priv; + + switch (event) { + case UG_KEY_EVENT_END: + if(ad->remove_timer) + { + ecore_timer_del(ad->remove_timer); + ad->remove_timer = NULL; + } + ug_destroy_me(ug); + break; + default: + break; + } +} + +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + SettingPasswordUG *passwordUG = calloc(1, sizeof(SettingPasswordUG)); + setting_retvm_if(!passwordUG, -1, "Create SettingPasswordUG obj failed"); + + ops->create = setting_password_ug_on_create; + ops->start = setting_password_ug_on_start; + ops->pause = setting_password_ug_on_pause; + ops->resume = setting_password_ug_on_resume; + ops->destroy = setting_password_ug_on_destroy; + ops->message = setting_password_ug_on_message; + ops->event = setting_password_ug_on_event; + ops->key_event = setting_password_ug_on_key_event; + ops->priv = passwordUG; + ops->opt = UG_OPT_INDICATOR_ENABLE; + + memset(passwordUG, 0x00, sizeof(SettingPasswordUG)); + + return 0; +} + +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + struct SettingPasswordUG *passwordUG; + setting_retm_if(!ops, "ops == NULL"); + + passwordUG = ops->priv; + if (passwordUG) + FREE(passwordUG); +} + +void setting_get_sim_lock_info_cb(TapiHandle *handle, int result, void *data, void *user_data) +{ + SETTING_TRACE_BEGIN; + ret_if(data == NULL || user_data == NULL); + + TelSimPinOperationResult_t sec_rt = result; + TelSimLockInfo_t *lock = data; + + SettingPasswordUG *ad = (SettingPasswordUG *)user_data; + + SETTING_TRACE_DEBUG("sec_ret[%d], lock_type[%d], lock_status[%d], retry_count[%d]", sec_rt, lock->lock_type, lock->lock_status, lock->retry_count); + + char temp[256] ={0,}; + if(lock->retry_count > 1) + snprintf(temp, 256, _(ATTEMPTS_DESC), lock->retry_count); + else if(lock->retry_count > 0) + snprintf(temp, 256, _(ATTEMPT_DESC), lock->retry_count); + + if(ad->err_desc) + { + elm_object_item_del(ad->err_desc); + ad->err_desc = NULL; + } + + ad->err_desc = elm_genlist_item_append(ad->scroller, &(ad->itc_err_desc), temp, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); +} + +void setting_get_pin_lock_info_cb(TapiHandle *handle, int result, void *data, void *user_data) +{ + SETTING_TRACE_BEGIN; + + TelSimPinOperationResult_t sec_rt = result; + TelSimLockInfo_t *lock = data; + + SettingPasswordUG *ad = (SettingPasswordUG *)user_data; + + SETTING_TRACE_DEBUG("sec_ret[%d], lock_type[%d], lock_status[%d], retry_count[%d]", sec_rt, lock->lock_type, lock->lock_status, lock->retry_count); + + char temp[256] ={0,}; + if(lock->retry_count > 1) + snprintf(temp, 256, _(ATTEMPTS_DESC), lock->retry_count); + else if(lock->retry_count > 0) + snprintf(temp, 256, _(ATTEMPT_DESC), lock->retry_count); + + if(ad->err_desc) + { + elm_object_item_del(ad->err_desc); + ad->err_desc = NULL; + } + + ad->err_desc = elm_genlist_item_append(ad->scroller, &(ad->itc_err_desc), temp, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); +} + +void setting_sim_change_pins_cb(TapiHandle *handle, int result, void *data, void *user_data) +{ + SETTING_TRACE_BEGIN; + ret_if(!user_data || !data); + TelSimPinOperationResult_t sec_rt = result; + tapi_receive_info result_info = { 0, }; + TelSimSecResult_t *sim_event_data = (TelSimSecResult_t *) data; + SETTING_TRACE("sec_rt[%d]", sec_rt); + SETTING_TRACE("sim_event_data->type:%d", sim_event_data->type); + SETTING_TRACE("sim_event_data->retry_count[%d]", sim_event_data->retry_count); + + if (TAPI_SIM_PIN_OPERATION_SUCCESS == sec_rt) { + if (TAPI_SIM_PTYPE_PIN1 == sim_event_data->type) + result_info.stat = SIM_PIN1_CHANGE_SUCCESS; + else if (TAPI_SIM_PTYPE_PIN2 == sim_event_data->type) + result_info.stat = SIM_PIN2_CHANGE_SUCCESS; + } else if (TAPI_SIM_PIN_INCORRECT_PASSWORD == sec_rt) { + if (TAPI_SIM_PTYPE_PIN1 == sim_event_data->type) { + result_info.stat = SIM_INCORRECT_PIN1_CODE; + result_info.retry_cnt = sim_event_data->retry_count; + } else if (TAPI_SIM_PTYPE_PIN2 == sim_event_data->type) { + result_info.stat = SIM_INCORRECT_PIN2_CODE; + result_info.retry_cnt = sim_event_data->retry_count; + } + } else if (TAPI_SIM_PUK_REQUIRED == sec_rt) { + if (TAPI_SIM_PTYPE_PIN1 == sim_event_data->type) + result_info.stat = SIM_PIN1_BLOCKED; + else if (TAPI_SIM_PTYPE_PIN2 == sim_event_data->type) + result_info.stat = SIM_PIN2_BLOCKED; + } else { + SETTING_TRACE_DEBUG + ("%s*** [ERR] INCORRECTED ***%s", + SETTING_FONT_RED, SETTING_FONT_BLACK); + return; + } + setting_password_ug_display_result_popup(&result_info, user_data); +} + +void setting_sim_verify_puks_cb(TapiHandle *handle, int result, void *data, void *user_data) +{ + SETTING_TRACE_BEGIN; + + ret_if(!user_data || !data); + SettingPasswordUG *ad = user_data; + TelSimPinOperationResult_t sec_rt = result; + tapi_receive_info result_info = { 0, }; + TelSimSecResult_t *sim_event_data = (TelSimSecResult_t *) data; + ad->verify_puks_result = sim_event_data; + SETTING_TRACE("sec_rt[%d]", sec_rt); + SETTING_TRACE("sim_event_data->type:%d", sim_event_data->type); + SETTING_TRACE("sim_event_data->retry_count[%d]", sim_event_data->retry_count); + + if (TAPI_SIM_PTYPE_PUK1 == sim_event_data->type) + { + //if (TAPI_SIM_PIN_REQUIRED == sec_rt){ + if (TAPI_SIM_PIN_OPERATION_SUCCESS == sec_rt){ + SETTING_TRACE_DEBUG("SIM_PIN1_UNBLOCKED"); + safeCopyStr(ad->view_type_string, "SETTING_PW_TYPE_PIN1_UNBLOCKED", sizeof("SETTING_PW_TYPE_PIN1_UNBLOCKED")+1); + setting_password_ug_create_popup_notitle_nobtn(ad, _("Verfy PUK1 Sucessfully"), TRUE); + return; + } else if (TAPI_SIM_PIN_INCORRECT_PASSWORD == sec_rt) { + result_info.stat = SIM_INCORRECT_PUK1_CODE; + result_info.retry_cnt = sim_event_data->retry_count; + } else { + result_info.stat = SIM_UNKNOWN_ERROR; + } + } + + else if (TAPI_SIM_PTYPE_PUK2 == sim_event_data->type) + { + //if (TAPI_SIM_PUK_REQUIRED == sec_rt) + if (TAPI_SIM_PIN_OPERATION_SUCCESS == sec_rt){ + SETTING_TRACE_DEBUG("SIM_PIN2_UNBLOCKED"); + safeCopyStr(ad->view_type_string, "SETTING_PW_TYPE_PIN2_UNBLOCKED", sizeof("SETTING_PW_TYPE_PIN2_UNBLOCKED")+1); + setting_password_ug_create_popup_notitle_nobtn(ad, _("Verfy PUK2 Sucessfully"), TRUE); + return; + } else if (TAPI_SIM_PUK_INCORRECT_PASSWORD == sec_rt) { + result_info.stat = SIM_INCORRECT_PUK2_CODE; + result_info.retry_cnt = sim_event_data->retry_count; + } else { + result_info.stat = SIM_UNKNOWN_ERROR; + } + } + else + { + result_info.stat = SIM_UNKNOWN_ERROR; + } + setting_password_ug_display_result_popup(&result_info, user_data); +} + +void setting_sim_facility_enable_cb(TapiHandle *handle, int result, void *data, void *user_data) +{ + SETTING_TRACE_BEGIN; + ret_if(!user_data || !data); + TelSimPinOperationResult_t sec_rt = result; + tapi_receive_info result_info = { 0, }; + TelSimFacilityResult_t *sim_event_data = (TelSimFacilityResult_t *) data; + + SETTING_TRACE("sec_rt[%d]", sec_rt); + SETTING_TRACE("sim_event_data->type:%d", sim_event_data->type); + SETTING_TRACE("sim_event_data->retry_count[%d]", sim_event_data->retry_count); + + /* Sim Lock */ + if (TAPI_SIM_LOCK_PS == sim_event_data->type) { + SETTING_TRACE("CASE TAPI_SIM_PTYPE_SIM == sim_event_data->type"); + if (TAPI_SIM_PIN_OPERATION_SUCCESS == sec_rt) + result_info.stat = SIM_LOCK_ON_SUCCESS; + else if (TAPI_SIM_PIN_INCORRECT_PASSWORD == sec_rt) + result_info.stat = SIM_LOCK_INCORRECT_PASSWORD; + else { + SETTING_TRACE_DEBUG("%s*** [ERR] INCORRECTED ***%s", + SETTING_FONT_RED, + SETTING_FONT_BLACK); + return; + } + } + /* Pin Lock */ + else if (TAPI_SIM_LOCK_SC == sim_event_data->type) { + SETTING_TRACE("CASE TAPI_SIM_PTYPE_PIN1 == sim_event_data->type"); + if (TAPI_SIM_PIN_OPERATION_SUCCESS == sec_rt) + result_info.stat = SIM_PIN_LOCK_ON_SUCCESS; + else if (TAPI_SIM_PIN_INCORRECT_PASSWORD == sec_rt) { + result_info.stat = SIM_INCORRECT_PIN1_CODE; + result_info.retry_cnt = sim_event_data->retry_count; + } else if (TAPI_SIM_PUK_REQUIRED == sec_rt) + result_info.stat = SIM_PIN1_BLOCKED; + + /* Pre CCF */ + else if (TAPI_SIM_INCOMPATIBLE_PIN_OPERATION == sec_rt + || TAPI_SIM_CARD_ERROR == sec_rt) { + /* popup */ + result_info.stat = SIM_OPERATION_UNAVAILABLE; + } + else { + SETTING_TRACE_DEBUG + ("%s*** [ERR] INCORRECTED ***%s", + SETTING_FONT_RED, + SETTING_FONT_BLACK); + return; + } + } + setting_password_ug_display_result_popup(&result_info, user_data); +} +void setting_sim_facility_disable_cb(TapiHandle *handle, int result, void *data, void *user_data) +{ + SETTING_TRACE_BEGIN; + ret_if(!user_data || !data); + TelSimPinOperationResult_t sec_rt = result; + tapi_receive_info result_info = { 0, }; + TelSimFacilityResult_t *sim_event_data = (TelSimFacilityResult_t *) data; + SETTING_TRACE("sec_rt[%d]", sec_rt); + SETTING_TRACE("sim_event_data->type:%d", sim_event_data->type); + SETTING_TRACE("sim_event_data->retry_count[%d]", sim_event_data->retry_count); + + /* Sim Lock */ + if (TAPI_SIM_LOCK_PS == sim_event_data->type) { + SETTING_TRACE_DEBUG("SIM lOCK"); + if (TAPI_SIM_PIN_OPERATION_SUCCESS == sec_rt) + result_info.stat = SIM_LOCK_OFF_SUCCESS; + else if (TAPI_SIM_PIN_INCORRECT_PASSWORD == sec_rt) + result_info.stat = SIM_LOCK_INCORRECT_PASSWORD; + else { + SETTING_TRACE_DEBUG + ("%s*** [ERR] INCORRECTED ***%s", + SETTING_FONT_RED, + SETTING_FONT_BLACK); + return; + } + } + /* Pin Lock */ + else if (TAPI_SIM_LOCK_SC == sim_event_data->type) { + SETTING_TRACE_DEBUG("PIN LOCK"); + if (TAPI_SIM_PIN_OPERATION_SUCCESS == sec_rt) + result_info.stat = SIM_PIN_LOCK_OFF_SUCCESS; + else if (TAPI_SIM_PIN_INCORRECT_PASSWORD == sec_rt) { + result_info.stat = SIM_INCORRECT_PIN1_CODE; + result_info.retry_cnt = sim_event_data->retry_count; + } else if (TAPI_SIM_PUK_REQUIRED == sec_rt) + result_info.stat = SIM_PIN1_BLOCKED; + + /* Pre CCF */ + else if (TAPI_SIM_INCOMPATIBLE_PIN_OPERATION == sec_rt + || TAPI_SIM_CARD_ERROR == sec_rt) { + /* popup */ + result_info.stat = SIM_OPERATION_UNAVAILABLE; + } + else { + SETTING_TRACE_DEBUG + ("%s*** [ERR] INCORRECTED ***%s", + SETTING_FONT_RED, + SETTING_FONT_BLACK); + return; + } + } + setting_password_ug_display_result_popup(&result_info, user_data); +} + +static void setting_password_ug_display_result_popup(tapi_receive_info *result, + SettingPasswordUG *ad) +{ + SETTING_TRACE_BEGIN; + switch (result->stat) { + case SIM_OPERATION_OK: + case SIM_LOCK_ON_SUCCESS: + case SIM_LOCK_OFF_SUCCESS: + case SIM_PIN_LOCK_ON_SUCCESS: + case SIM_PIN_LOCK_OFF_SUCCESS: + { + if (ad->view_type == + SETTING_PW_TYPE_SIM_LOCK_OFF) { + int err = SETTING_RETURN_SUCCESS; + /* reset VCONF */ + setting_set_int_slp_key + (INT_SLP_SETTING_SIM_LOCK_ATTEMPTS_LEFT, + SIM_LOCK_ATTEMPS_MAX, &err); + setting_retm_if(err == SETTING_RETURN_FAIL, + "[Error] set value of vconf fail."); + } + /* Success to Operate */ + service_h svc; + if (service_create(&svc)) + return; + + service_add_extra_data(svc, "result", ad->view_type_string); + ug_send_result(ad->ug, svc); + SETTING_TRACE("Send Result : %s\n", ad->view_type_string); + + service_destroy(svc); + /* Send destroy request */ + ug_destroy_me(ad->ug); + } + break; + case SIM_LOCK_INCORRECT_PASSWORD: + { + SETTING_TRACE_DEBUG("SIM LOCK INCORRECT PASSWORD"); + ad->focus_data = ad->ed_pw1; + setting_password_ug_display_desc(ad, PW_ERR_DESC, FALSE); + } + break; + case SIM_INCORRECT_PIN1_CODE: + { + const char *ret_str = NULL; + char tmp_str[SETTING_STR_SLP_LEN] = {0,}; + + if (result->retry_cnt > 1) { + /* there has '%d' in 'IDS_ST_POP_INCORRECT_PIN_PD_ATTEMPTS_LEFT', must transform */ + int ret = snprintf(tmp_str, SETTING_STR_SLP_LEN, PIN_ERR_DESC, result->retry_cnt); + setting_retm_if(ret < 0, "snprintf fail"); + ret_str = tmp_str; + } else { + int ret = snprintf(tmp_str, SETTING_STR_SLP_LEN, PIN_ERR_DESC, result->retry_cnt); + setting_retm_if(ret < 0, "snprintf fail"); + ret_str = tmp_str; + ret_str = _("IDS_ST_POP_INCORRECT_PIN1_ATTEMPT_LEFT"); + } + ad->focus_data = ad->ed_pw1; + + setting_password_ug_display_desc(ad, (char *)ret_str, FALSE); + + } + break; + case SIM_INCORRECT_PIN2_CODE: + { + char *ret_str = NULL; + char tmp_str[SETTING_STR_SLP_LEN] = {0,}; + + if (result->retry_cnt > 1) { + /* there has '%d' in 'IDS_ST_POP_INCORRECT_PIN_PD_ATTEMPTS_LEFT', must transform */ + int ret = snprintf(tmp_str, SETTING_STR_SLP_LEN, PIN_ERR_DESC, result->retry_cnt); + setting_retm_if(ret < 0, "snprintf fail"); + ret_str = tmp_str; + } else { + ret_str = _("IDS_ST_POP_INCORRECT_PIN1_ATTEMPT_LEFT"); + } + ad->focus_data = ad->ed_pw1; + + setting_password_ug_display_desc(ad, ret_str, FALSE); + + } + break; + case SIM_INCORRECT_PUK1_CODE: + { + char *ret_str = NULL; + char tmp_str[SETTING_STR_SLP_LEN] = {0,}; + + if (result->retry_cnt > 1) { + /* there has '%d' in 'IDS_ST_POP_INCORRECT_PUK1_PD_ATTEMPTS_LEFT', must transform */ + int ret = snprintf(tmp_str, SETTING_STR_SLP_LEN, PUK1_ERR_DESC, result->retry_cnt); + setting_retm_if(ret < 0, "snprintf fail"); + ret_str = tmp_str; + } else { + ret_str = _("IDS_ST_POP_INCORRECT_PUK1_CODE"); + } + ad->focus_data = ad->ed_pw1; + + setting_password_ug_display_desc(ad, ret_str, FALSE); + + } + break; + case SIM_INCORRECT_PUK2_CODE: + { + char *ret_str = NULL; + char tmp_str[SETTING_STR_SLP_LEN] = {0,}; + if (result->retry_cnt > 1) { + /* there has '%d' in 'IDS_ST_POP_INCORRECT_PUK2_PD_ATTEMPTS_LEFT', must transform*/ + int ret = snprintf(tmp_str, SETTING_STR_SLP_LEN, PUK2_ERR_DESC, result->retry_cnt); + setting_retm_if(ret < 0, "snprintf fail"); + ret_str = tmp_str; + } else { + ret_str = _("IDS_ST_POP_INCORRECT_PUK2"); + } + ad->focus_data = ad->ed_pw1; + + setting_password_ug_display_desc(ad, ret_str, FALSE); + + } + break; + case SIM_PIN1_CHANGE_SUCCESS: + setting_password_ug_create_popup_notitle_nobtn(ad, + _("IDS_ST_POP_PIN1_CHANGED"), TRUE); + break; + case SIM_PIN2_CHANGE_SUCCESS: + setting_password_ug_create_popup_notitle_nobtn(ad, + _("IDS_ST_POP_PIN2_CHANGED"), TRUE); + break; + case SIM_PIN1_BLOCKED: + SETTING_TRACE_DEBUG("SIM_PIN1_BLOCKED"); + ad->view_type = SETTING_PW_TYPE_PIN1_BLOCKED; + safeCopyStr(ad->view_type_string, "SETTING_PW_TYPE_PIN1_BLOCKED", safeStrLen("SETTING_PW_TYPE_PIN1_BLOCKED")+1); + setting_password_ug_create_popup_notitle_nobtn(ad, + _("IDS_ST_POP_PIN1_BLOCKED"), FALSE); + break; + case SIM_PIN2_BLOCKED: + SETTING_TRACE_DEBUG("SIM_PIN2_BLOCKED"); + ad->view_type = SETTING_PW_TYPE_PIN2_BLOCKED; + safeCopyStr(ad->view_type_string, "SETTING_PW_TYPE_PIN2_BLOCKED", safeStrLen("SETTING_PW_TYPE_PIN2_BLOCKED")+1); + setting_password_ug_create_popup_notitle_nobtn(ad, + _("IDS_ST_POP_PIN2_BLOCKED"), FALSE); + break; + case SIM_PIN1_UNBLOCKED: + SETTING_TRACE_DEBUG("SIM_PIN1_UNBLOCKED"); + safeCopyStr(ad->view_type_string, "SETTING_PW_TYPE_PIN_LOCK_ON", sizeof("SETTING_PW_TYPE_PIN_LOCK_ON")+1); + setting_password_ug_create_popup_notitle_nobtn(ad, + _("IDS_ST_POP_PIN_UNBLOCKED"), TRUE); + break; + case SIM_PIN2_UNBLOCKED: + setting_password_ug_create_popup_notitle_nobtn(ad, + _("IDS_ST_POP_PIN2_UNBLOCKED"), TRUE); + break; + case SIM_PUK1_BLOCKED: + setting_password_ug_create_popup_notitle_nobtn(ad, + _("IDS_ST_BODY_PUK1_BLOCKED"), TRUE); + /* Phone blocked. Call Permernent UG */ + break; + case SIM_PUK2_BLOCKED: + setting_password_ug_create_popup_notitle_nobtn(ad, + _("IDS_ST_BODY_PUK2_BLOCKED"), TRUE); + /* Call Permernent UG */ + break; + case SIM_REQUIRED_PUK_CODE: + SETTING_TRACE_DEBUG("SIM_REQUIRED_PUK_CODE"); + safeCopyStr(ad->view_type_string, "SETTING_PW_TYPE_PIN1_BLOCKED", sizeof("SETTING_PW_TYPE_PIN1_BLOCKED")+1); + setting_password_ug_create_popup_notitle_nobtn(ad, + _("IDS_ST_POP_PIN1_BLOCKED"), TRUE); + break; + case SIM_OPERATION_UNAVAILABLE: + setting_password_ug_create_popup_notitle_nobtn(ad, + _("IDS_ST_HEADER_UNAVAILABLE"), TRUE); + break; + case SIM_UNKNOWN_ERROR: + setting_password_ug_create_popup_notitle_nobtn(ad, + _("IDS_ST_POP_UNKNOWN_OPERATION"), FALSE); + break; + case SIM_ERROR: + case SIM_REQ_PIN: + case SIM_OPERATION_OFF: + case SIM_LOCK_ON_FAIL: + SETTING_TRACE_DEBUG("SIM_LOCK_ON_FAIL"); + { + int err = SETTING_RETURN_SUCCESS; + + if(result->retry_cnt > 0) + { + setting_password_ug_display_desc(ad, PW_ERR_DESC, FALSE); + } + else + { + char tmp_str[SETTING_STR_SLP_LEN] = {0,}; + int ret = snprintf(tmp_str, SETTING_STR_SLP_LEN, PW_ERR_DELAY_DESC, PW_ERR_DELAY_TIME); + safeCopyStr(ad->view_type_string, "SETTING_PW_TYPE_SIM_LOCK_DISABLE", sizeof("SETTING_PW_TYPE_SIM_LOCK_DISABLE")+1); + setting_password_ug_create_popup_notitle_nobtn(ad, tmp_str, TRUE); + } + } + break; + case SIM_PIN1_CHANGE_FAIL: + case SIM_PIN2_CHANGE_FAIL: + setting_password_ug_create_popup_notitle_nobtn(ad, + _("Change Failed"), TRUE); + break; + default: + break; + } + + SETTING_TRACE_END; +} + +void setting_password_ug_popup_resp_cb(void *data, Evas_Object *obj, + void *event_info) +{ + retm_if(data == NULL, "Data parameter is NULL"); + + service_h svc; + SettingPasswordUG *ad = (SettingPasswordUG *) data; + if (ad->destroy) { + /* Success to Operate */ + + if (service_create(&svc)) + return; + + service_add_extra_data(svc, "result", ad->view_type_string); + ug_send_result(ad->ug, svc); + SETTING_TRACE("Send Result : %s\n", ad->view_type_string); + + service_destroy(svc); + /* Send destroy request */ + ug_destroy_me(ad->ug); + } else { + char *diable_view_type = NULL; + if (ad->view_type == SETTING_PW_TYPE_PIN1_BLOCKED) + { + setting_view_destroy(&setting_view_password_main, ad); + setting_view_create(&setting_view_password_main, ad); + return; + } + else if (ad->view_type == SETTING_PW_TYPE_PIN2_BLOCKED) + { + setting_view_destroy(&setting_view_password_main, ad); + setting_view_create(&setting_view_password_main, ad); + return; + } + + if (ad->disable_item_type == SETTING_PW_TYPE_SIM_LOCK_OFF) { + diable_view_type = "SETTING_PW_TYPE_SIM_LOCK_DISABLE"; + } + + if (diable_view_type) { + /* Success to Operate */ + + if (service_create(&svc)) + return; + + service_add_extra_data(svc, "result", diable_view_type); + ug_send_result(ad->ug, svc); + + service_destroy(svc); + /* Send destroy request */ + ug_destroy_me(ad->ug); + } + if (ad->focus_data) { + ad->focus_data->isFocusFlag = TRUE; + elm_object_item_data_set(ad->focus_data->item, ad->focus_data); + elm_genlist_item_update(ad->focus_data->item); + } + } +} +static Eina_Bool __remove_desc(void *data) +{ + SETTING_TRACE_BEGIN; + retv_if(data == NULL, EINA_FALSE); + + SettingPasswordUG *ad = (SettingPasswordUG *)data; + + if(ad->err_desc) + { + elm_object_item_del(ad->err_desc); + ad->err_desc = NULL; + } + + if(ad->remove_timer) + { + ecore_timer_del(ad->remove_timer); + ad->remove_timer = NULL; + } + + if (ad->destroy) { + /* Success to Operate */ + + service_h svc; + if (service_create(&svc)) + return EINA_FALSE; + + service_add_extra_data(svc, "result", ad->view_type_string); + ug_send_result(ad->ug, svc); + SETTING_TRACE("Send Result : %s\n", ad->view_type_string); + + service_destroy(svc); + /* Send destroy request */ + ug_destroy_me(ad->ug); + } else { + char *diable_view_type = NULL; + if (ad->disable_item_type == SETTING_PW_TYPE_SIM_LOCK_OFF) { + diable_view_type = "SETTING_PW_TYPE_SIM_LOCK_DISABLE"; + } + + if (diable_view_type) { + /* Success to Operate */ + + service_h svc; + if (service_create(&svc)) + return EINA_FALSE; + + service_add_extra_data(svc, "result", diable_view_type); + ug_send_result(ad->ug, svc); + + service_destroy(svc); + /* Send destroy request */ + ug_destroy_me(ad->ug); + } + } + return ECORE_CALLBACK_CANCEL; +} + +void setting_password_ug_display_desc(void *data, char *desc, int destroy) +{ + SETTING_TRACE_BEGIN; + ret_if(data == NULL || desc == NULL); + + SettingPasswordUG *ad = (SettingPasswordUG *)data; + +#ifdef SUPPORT_MDM + if(ad->view_type == SETTING_PW_TYPE_MDM_NEW_POLICY) + return; +#endif + + ad->destroy = destroy; + + if(ad->scroller == NULL) + return; + + if(ad->err_desc) + { + elm_object_item_del(ad->err_desc); + ad->err_desc = NULL; + } + + ad->err_desc = elm_genlist_item_append(ad->scroller, &(ad->itc_err_desc), desc, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); + ad->remove_timer = ecore_timer_add(2.0, __remove_desc, ad); + + /* if pw incorrect, show keyboard again. */ + if(ad->ed_pw1) + { + SETTING_TRACE_DEBUG("FOCUS IN"); + ad->ed_pw1->isFocusFlag = TRUE; + elm_object_focus_set(ad->ed_pw1->eo_check, EINA_TRUE); + } +} + +void +setting_password_ug_create_popup_notitle_nobtn(void *data, char *str, + int destroy) +{ + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingPasswordUG *ad = (SettingPasswordUG *) data; + + ad->destroy = destroy; + if(ad->notify) + { + evas_object_del(ad->notify); + ad->notify = NULL; + } + ad->notify = setting_create_popup_without_btn(ad, ad->ly_main, NULL, str, + setting_password_ug_popup_resp_cb, + POPUP_INTERVAL, FALSE, FALSE); +} + diff --git a/setting-phone/CMakeLists.txt b/setting-phone/CMakeLists.txt new file mode 100755 index 0000000..fa6d5f2 --- /dev/null +++ b/setting-phone/CMakeLists.txt @@ -0,0 +1,37 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_phone REQUIRED evas eina ecore elementary appcore-common vconf appcore-efl haptic tapi ui-gadget-1 capi-appfw-application appsvc libxml-2.0) + +FOREACH(flag ${pkgs_phone_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") +ADD_DEFINITIONS("-fpie") + +#SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") + +ADD_LIBRARY(${SETTING_PHONE_UG} SHARED + ./src/setting-phone.c + ./src/setting-phone-language-region.c + ./src/setting-phone-display-language.c + ./src/setting-phone-region-format.c + ) + +TARGET_LINK_LIBRARIES(${SETTING_PHONE_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} +-lsetting-common -licui18n -licudata -licuuc) +TARGET_LINK_LIBRARIES(${SETTING_PHONE_UG} ${pkgs_phone_LDFLAGS}) + +INSTALL(TARGETS ${SETTING_PHONE_UG} DESTINATION /usr/ug/lib) diff --git a/setting-phone/include/setting-phone-display-language.h b/setting-phone/include/setting-phone-display-language.h new file mode 100755 index 0000000..fe98f6e --- /dev/null +++ b/setting-phone/include/setting-phone-display-language.h @@ -0,0 +1,35 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_PHONE_DISPLAY_LANGUAGE_H__ +#define __SETTING_PHONE_DISPLAY_LANGUAGE_H__ + +#include + +#define SETTING_PHONE_DISPLAY_LANGUAGE_PATH "/usr/lib/locale/" + +static void setting_phone_display_language_click_softkey_cancel_cb(void *data, + Evas_Object * + obj, void + *event_info); +static void setting_phone_display_language_mouse_up_Gendial_list_radio_cb(void + *data, + Evas_Object + *obj, + void + *event_info); +static void setting_phone_display_language_close_popup_ex(void *data); +#endif /* __SETTING_PHONE_DISPLAY_LANGUAGE_H__ */ diff --git a/setting-phone/include/setting-phone-language-region.h b/setting-phone/include/setting-phone-language-region.h new file mode 100755 index 0000000..af56eb1 --- /dev/null +++ b/setting-phone/include/setting-phone-language-region.h @@ -0,0 +1,28 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_PHONE_LANGUAGE_H__ +#define __SETTING_PHONE_LANGUAGE_H__ + +#include + +#define LANGUAGE_STR_LEN 256 +//#define COUNTRY_STR_LEN 50 +#define COUNTRY_STR_LEN 256 +#define LANGUAGE_ITEM_MAX 20 + +extern void setting_phone_lang_change_lang_value(int cur_chk_lang); +#endif /* __SETTING_PHONE_LANGUAGE_H__ */ diff --git a/setting-phone/include/setting-phone-region-format.h b/setting-phone/include/setting-phone-region-format.h new file mode 100755 index 0000000..217bc6b --- /dev/null +++ b/setting-phone/include/setting-phone-region-format.h @@ -0,0 +1,50 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_PHONE_REGION_FORMAT_H__ +#define __SETTING_PHONE_REGION_FORMAT_H__ + +#include +typedef struct _Setting_Region_Table { + char *key; + char *desc; +} Setting_Region_Table; + +#define DATA_FORMAT_SKELETON "yMd" +#define DATA_FORMAT_CATEGORY_NUM 4 +#define DATA_FORMAT_DEFAULT 1 + +#define SETTING_PHONE_REGION_FORMAT_ANIMATOR_START_INDEX 30 + +static int setting_phone_region_format_get_region_fmt(char *list[], + int item_idx[], + char *region_keyStr[], + int *region_num); +static void setting_phone_region_format_click_softkey_cancel_cb(void *data, + Evas_Object * + obj, void + *event_info); +static void setting_phone_region_format_mouse_up_Gendial_list_radio_cb(void + *data, + Evas_Object + *obj, + void + *event_info); +static int setting_phone_region_format_compare_cb(const void *d1, + const void *d2); +static int setting_phone_region_format_set_dateformat(const char *region, + void *data); +#endif /* __SETTING_PHONE_REGION_FORMAT_H__ */ diff --git a/setting-phone/include/setting-phone.h b/setting-phone/include/setting-phone.h new file mode 100755 index 0000000..d26c627 --- /dev/null +++ b/setting-phone/include/setting-phone.h @@ -0,0 +1,162 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_PHONE_H__ +#define __SETTING_PHONE_H__ + +#include +#include + +#include + +#include +#include + +#include + +#ifdef Status +#undef Status +#endif +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +/* Choose default programe*/ +#define Display_APP_Full_Name 1 +#define MAX_APP_NAME 1024 +#define IMAGES_MIME_TYPE "image/png" /* temporary implement */ +#define SOUNDS_MIME_TYPE "audio/mpeg" /* temporary implement */ +#define VIDEOS_MIME_TYPE "video/3gpp" /* temporary implement */ +#define OTHERS_MIME_TYPE "application/pdf" /* temporary implement */ +#define TBL_NAME "menu" +#define MIME_FIELD_NAME "mimetype" +#define NAME_BUF_LEN (128) + +#define REGION_ITEM_MAX 300 + +#define ASK_DEREG_PHONE "Your phone is
already registered.
Are you sure you
wish to deregister?" +#define REGISTRATION_GET_FAILED "Failed to get registration code" +#define REGISTRATION_INDICATOT "



Your device
registration code:

" +#define REGISTRATION_AT "


Register at" +#define DEREGISTRATION_INDICATOT "



Your device
deregistration code:

" +#define EREGISTRATION_AT "


Deregister at" +#define TRANSFER_INFO "Your recommendation information is also sent with the file you transfer" + +typedef struct _SettingPhoneUG SettingPhoneUG; + +/** + * Setting Phone UG context + * all UG function has void* as an agument. this is casted back to SettingPhoneUG + * and the functions access app context. + */ +struct _SettingPhoneUG { + ui_gadget_h ug; + TapiHandle* handle; + + /* add more variables here (move your appdata to here) */ + Evas *evas; + Evas_Object *win_main_layout; + Evas_Object *win_get; + ui_gadget_h ug_loading; + + Evas_Object *gl_lang_region; + Evas_Object *gl_lang; + Evas_Object *gl_region; + + Evas_Object *navi_bar; + Evas_Object *popup; + Evas_Object *popup_clear_license; + void (*popup_cb) (void *data, Evas_Object *obj, void *event_info); + + int intial_shaking_value; + + Evas_Object *ly_language; + + // [UI] license + Evas_Object *chk_lang; + int prev_lang; /** prev is used for special lang. */ + + //bundle *bundle_data; + service_h bundle_data; + setting_view *view_to_load; + TelSimImsiInfo_t imsi; + const char *sim_lang; /** is just used for '0' (automatic). */ + Elm_Genlist_Item_Class itc_1text; + Elm_Genlist_Item_Class itc_1text_1icon_2; + Elm_Genlist_Item_Class itc_1text_1icon; + Elm_Genlist_Item_Class itc_seperator; + Elm_Genlist_Item_Class itc_2text_3_parent; + Elm_Genlist_Item_Class itc_1icon_1text_sub; + Elm_Genlist_Item_Class itc_1icon_2text; + + // [view] Language & Region + Setting_GenGroupItem_Data *data_display_language; + Setting_GenGroupItem_Data *data_region_fmt; + Setting_GenGroupItem_Data *data_region_fmt_example; + + Evas_Object *chk_region; + int prev_region; + char *region_keyStr[REGION_ITEM_MAX]; + char *region_desc[REGION_ITEM_MAX]; + int region_index[REGION_ITEM_MAX]; + int region_num; + int gl_region_index; + int gl_region_cur_index; + int selected_region_idx; + char *region_vconf_str; + Elm_Genlist_Item_Class itc_2text_2; + Elm_Genlist_Item_Class itc_bg_1icon; + UDateTimePatternGenerator *pattern_generator; + char *prev_locale; + Elm_Object_Item *selected_item; + Eina_List *app_list; + Evas_Object *pop_progress; + Evas_Object *search_bar; + char search_text[MAX_SEARCH_STR_LEN + 1]; + Ecore_Idler *search_idler; + Ecore_Animator *animator; +}; + +/* extern setting_view setting_view_phone_main; */ +extern setting_view setting_view_phone_language_region; +extern setting_view setting_view_phone_display_language; +extern setting_view setting_view_phone_region_format; + +/* void setting_phone_lang_changed_cb(void *data); */ +int app_terminate_dead_cb(int pid, void *data); +extern char *setting_phone_lang_get_region_str(const char *region); +extern char *setting_phone_lang_get_by_pattern(const char *locale, + const char *skeleton, + void *data); +extern char *setting_phone_lang_get_example_desc(const char *region, + void *data); +/** +* Change language string to UTF8 format, the invoker need to free the return string +* +* @param unichars The source string will be translated. +* +* @return UTF8 format string. +*/ +extern char *setting_phone_lang_str_to_utf8(const UChar *unichars); + +#endif /* __SETTING_PHONE_H__ */ diff --git a/setting-phone/src/setting-phone-display-language.c b/setting-phone/src/setting-phone-display-language.c new file mode 100755 index 0000000..4b518dd --- /dev/null +++ b/setting-phone/src/setting-phone-display-language.c @@ -0,0 +1,358 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 + + +static int setting_phone_display_language_create(void *cb); +static int setting_phone_display_language_destroy(void *cb); +static int setting_phone_display_language_cleanup(void *cb); + + +setting_view setting_view_phone_display_language = { + .create = setting_phone_display_language_create, + .destroy = setting_phone_display_language_destroy, + .update = NULL, + .cleanup = setting_phone_display_language_cleanup, +}; + +/* + * exit and save + */ +static void setting_phone_display_language_caller_exist_right_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + + SettingPhoneUG *ad = (SettingPhoneUG *) data; +#if 0 + int ret, err; + + int cur_chk_lang = (int)elm_radio_value_get(ad->chk_lang); + + setting_phone_lang_change_lang_value(cur_chk_lang); + + //ret = setting_get_int_slp_key(INT_SLP_SETTING_LANG, &chr_chk_lang, &err); + SETTING_TRACE("---> cur_chk_lang : %d", cur_chk_lang); + ret = setting_set_int_slp_key(INT_SLP_SETTING_LANG, cur_chk_lang, &err); + + if (0 == cur_chk_lang) { + (void)vconf_set_str(VCONFKEY_LANGSET, ad->sim_lang); + } + + /* Just filter out Setting App, other Apps stil need to be terminated + until they implement updating language or region automatically */ + + const char *pa_lang = vconf_get_str(VCONFKEY_LANGSET); + if (pa_lang) { + char *q = strchr(pa_lang, '.'); + if (q) { + *q = '\0'; + } + SETTING_TRACE("pa_lang:%s", pa_lang); + int err = -1; + uloc_setDefault(pa_lang, &err); + free((void *)pa_lang); + pa_lang = NULL; + } else { + SETTING_TRACE_ERROR("get vconf failed"); + } +#endif + + /* Create Bundle and send message */ + service_h svc; + if(service_create(&svc)) + return; + + service_add_extra_data(svc, "result", "rbutton_click"); + ug_send_result(ad->ug, svc); + + service_destroy(svc); + + ug_destroy_me(ad->ug); +} + + +/* *************************************************** + * + *basic func + * + ***************************************************/ + +static int setting_phone_display_language_create(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPhoneUG *ad = (SettingPhoneUG *) cb; + char *title = _("IDS_ST_HEADER_DISPLAY_LANGUAGE"); + + Evas_Object *scroller = NULL; + setting_call_back_func gl_sel_cb = NULL; + + if (&setting_view_phone_display_language == ad->view_to_load) { + char *caller = NULL; + + service_h service = ad->bundle_data; + + service_get_extra_data(service, "caller", &caller); + + if(caller) + { + ad->ly_language = setting_create_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + title, + _("IDS_COM_BODY_BACK"), NULL, + setting_phone_display_language_caller_exist_right_cb, NULL, + ad, &scroller, &ad->navi_bar); + gl_sel_cb = setting_phone_display_language_mouse_up_Gendial_list_radio_cb; + } + else + { + SETTING_TRACE_ERROR("[ERROR] caller is empty"); + return SETTING_RETURN_FAIL; + } + } else { + /* add basic layout */ + setting_push_layout_navi_bar_genlist(ad->win_main_layout, ad->win_get, + title, _("IDS_COM_BODY_BACK"), + NULL, + setting_phone_display_language_click_softkey_cancel_cb, + NULL, ad, &scroller, ad->navi_bar); + gl_sel_cb = setting_phone_display_language_mouse_up_Gendial_list_radio_cb; + } + + ad->gl_lang = scroller; + + Elm_Object_Item *item = NULL; + item = + elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* scroller is a genlist */ + ad->chk_lang = elm_radio_add(scroller); + elm_radio_state_value_set(ad->chk_lang, -1); + + + + // [UI] Automatic + Setting_GenGroupItem_Data *item_data = NULL; + item_data = + setting_create_Gendial_field_def(scroller, + &(ad->itc_1text), + gl_sel_cb, + ad->chk_lang, + SWALLOW_Type_INVALID, NULL, NULL, + 0, + "IDS_COM_BODY_AUTOMATIC", NULL, NULL); + if (item_data) { + item_data->userdata = ad; + } else { + SETTING_TRACE_ERROR("item_data is NULL"); + } + + // create loop operation here + Eina_List* elist = NULL; + setting_lang_entry* pnode = NULL; + int idx = SETTING_LANG_KOREA; // 2 + + // load language table from XML file + Eina_List* langlist = setting_get_language_list(); + + EINA_LIST_FOREACH( langlist, elist, pnode) + { + item_data = + setting_create_Gendial_field_def(scroller, + &(ad->itc_1text), + gl_sel_cb, + ad->chk_lang, + SWALLOW_Type_INVALID, NULL, NULL, + //idx, // <<< WARNING + pnode->number, + pnode->title, NULL, NULL); + if (item_data) { + item_data->userdata = ad; + } else { + SETTING_TRACE_ERROR("item_data is NULL"); + } + idx++; + } + + item = elm_genlist_item_append(scroller, &itc_bottom_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + // set radio button to the selected state. + int index = -1; + int ret, err; + ret = setting_get_int_slp_key(INT_SLP_SETTING_LANG, &index, &err); + elm_radio_value_set(ad->chk_lang, index); + + ad->prev_lang = (int)elm_radio_value_get(ad->chk_lang); + setting_view_phone_display_language.is_create = 1; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_phone_display_language_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SettingPhoneUG *ad = (SettingPhoneUG *) cb; + + /* FIXED : destroy only if it was created. */ + if (setting_view_phone_display_language.is_create) { + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + + if (ad->pop_progress) { + evas_object_del(ad->pop_progress); + ad->pop_progress = NULL; + } + elm_naviframe_item_pop(ad->navi_bar); + setting_view_phone_display_language.is_create = 0; + + setting_get_language_list_destroy(); + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_phone_display_language_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + setting_phone_display_language_destroy(cb); + + return SETTING_RETURN_SUCCESS; +} + +static void +setting_phone_display_language_click_softkey_cancel_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + SettingPhoneUG *ad = (SettingPhoneUG *) data; + setting_view_change(&setting_view_phone_display_language, + &setting_view_phone_language_region, ad); +} + +static void +setting_phone_display_language_mouse_up_Gendial_list_radio_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + setting_retm_if(event_info == NULL, + "Invalid argument: event info is NULL"); + + Evas_Object *radio = (Evas_Object *) data; + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + SettingPhoneUG *ad = (SettingPhoneUG *) list_item->userdata; + + if (ad->popup) { + return; + } + //SETTING_TRACE("---------------------------------------------"); + //SETTING_TRACE("ad->prev_lang = %d ", ad->prev_lang); + //SETTING_TRACE("chk_status = %d ", list_item->chk_status); + //SETTING_TRACE("---------------------------------------------"); + /* if not change, return */ + //if (ad->prev_lang == list_item->chk_status) { + // SETTING_TRACE("NOT CHANGED "); + // return; + //} + + elm_radio_value_set(radio, list_item->chk_status); + setting_phone_display_language_close_popup_ex(ad); +} + +static void setting_phone_display_language_close_popup_ex(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingPhoneUG *ad = (SettingPhoneUG *) data; + + ad->prev_lang = elm_radio_value_get(ad->chk_lang); + SETTING_TRACE("cur_chk_lang = %d", ad->prev_lang); + + // 0. change VCONFKEY_LANGSET + setting_phone_lang_change_lang_value(ad->prev_lang); + + /* if set automatic */ + if (0 == ad->prev_lang) { + vconf_set_str(VCONFKEY_LANGSET, ad->sim_lang); + } + + // 2. GET SELECTED LANG + const char *pa_lang = vconf_get_str(VCONFKEY_LANGSET); + if (pa_lang) { /* remove the */ + char *q = strchr(pa_lang, '.'); + if (q) + *q = '\0'; + } + SETTING_TRACE("pa_lang:%s", pa_lang); + int err = -1; + // 3. SET DEFAULT + // default UI language + uloc_setDefault(pa_lang, &err); + if (U_FAILURE(err)) { + SETTING_TRACE("FAILED : uloc_setDefault error code : %d", err); + } else { + SETTING_TRACE("SUCCESS : uloc_setDefault error code : %d", err); + } + FREE(pa_lang); + + char *caller = NULL; + service_h service = ad->bundle_data; + + service_get_extra_data(service, "caller", &caller); + + if(caller) { + /* Create Bundle and send message */ + service_h svc; + if(service_create(&svc)) + return; + + service_add_extra_data(svc, "result", "rbutton_click"); + ug_send_result(ad->ug, svc); + + service_destroy(svc); + + ug_destroy_me(ad->ug); + + } else { + /* after lang-change, go back to the previous page*/ + elm_naviframe_item_pop(ad->navi_bar); + setting_view_phone_display_language.is_create = 0; + } +} diff --git a/setting-phone/src/setting-phone-language-region.c b/setting-phone/src/setting-phone-language-region.c new file mode 100755 index 0000000..a311fcb --- /dev/null +++ b/setting-phone/src/setting-phone-language-region.c @@ -0,0 +1,262 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 + +static int setting_phone_language_region_create(void *cb); +static int setting_phone_language_region_destroy(void *cb); +static int setting_phone_language_region_update(void *cb); +static int setting_phone_language_region_cleanup(void *cb); + +setting_view setting_view_phone_language_region = { + .create = setting_phone_language_region_create, + .destroy = setting_phone_language_region_destroy, + .update = setting_phone_language_region_update, + .cleanup = setting_phone_language_region_cleanup, +}; + +static void setting_phone_lang_click_softkey_cancel_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_phone_lang_item_Gendial_mouse_up_cb(void *data, + Evas_Object *obj, + void *event_info); + + +/* *************************************************** + * + *basic func + * + ***************************************************/ + +static int setting_phone_language_region_create(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPhoneUG *ad = (SettingPhoneUG *) cb; + Evas_Object *scroller = NULL; + + char *title = _(KeyStr_LanguageRegion); + ad->ly_language = + setting_create_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, title, + _("IDS_COM_BODY_BACK"), + NULL, + setting_phone_lang_click_softkey_cancel_cb, + NULL, ad, &scroller, + &(ad->navi_bar)); + retv_if(ad->ly_language == NULL, SETTING_RETURN_FAIL); + ad->gl_lang_region = scroller; + + Elm_Object_Item *item = NULL; + item = + elm_genlist_item_append(scroller, &(ad->itc_seperator), + NULL, NULL, ELM_GENLIST_ITEM_NONE, + NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + char* pa_display_lang = get_pa_display_language_str(); + ad->data_display_language = + setting_create_Gendial_field_def(scroller, + &(ad->itc_2text_2), + setting_phone_lang_item_Gendial_mouse_up_cb, + ad, SWALLOW_Type_INVALID, + NULL, NULL, 0, + "IDS_ST_HEADER_DISPLAY_LANGUAGE", + pa_display_lang, + NULL); + if (ad->data_display_language) { + ad->data_display_language->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_display_language is NULL"); + } + G_FREE(pa_display_lang); + + char *pa_region = vconf_get_str(VCONFKEY_REGIONFORMAT); + if (pa_region == NULL) { + SETTING_TRACE_ERROR + ("[Error] get value of VCONFKEY_REGIONFORMAT fail."); + } + ad->prev_locale = (char *)g_strdup(pa_region); + ad->data_region_fmt = + setting_create_Gendial_field_def(scroller, + &(ad->itc_2text_2), + setting_phone_lang_item_Gendial_mouse_up_cb, + ad, SWALLOW_Type_INVALID, + NULL, NULL, 0, + "IDS_ST_BODY_REGION", + setting_phone_lang_get_region_str + (pa_region), NULL); + if (ad->data_region_fmt) { + ad->data_region_fmt->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_region_fmt is NULL"); + } + + char *example_desc = + setting_phone_lang_get_example_desc(pa_region, ad); + ad->data_region_fmt_example = + setting_create_Gendial_field_def(scroller, + &(ad->itc_bg_1icon), NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, + example_desc, NULL, NULL); + if (pa_region) { + FREE(pa_region); + } + if (example_desc) { + FREE(example_desc); + } + + setting_view_phone_language_region.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int setting_phone_language_region_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPhoneUG *ad = (SettingPhoneUG *) cb; + + if (ad->ly_language != NULL) { + evas_object_del(ad->ly_language); + ad->ly_language = NULL; + + if (ad->pattern_generator) { + udatpg_close(ad->pattern_generator); + ad->pattern_generator = NULL; + } + setting_view_phone_language_region.is_create = 0; + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_phone_language_region_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPhoneUG *ad = (SettingPhoneUG *) cb; + + if (ad->ly_language != NULL) { + evas_object_show(ad->ly_language); + + /* setting_update_chk_status(ad->chk_lang, INT_SLP_SETTING_LANG); */ + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_phone_language_region_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void +setting_phone_lang_click_softkey_cancel_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingPhoneUG *ad = (SettingPhoneUG *) data; + + ug_destroy_me(ad->ug); +} + +// 0 : automatic +void setting_phone_lang_change_lang_value(int ichk) +{ + SETTING_TRACE_BEGIN; + int err, ret; + + /** @todo ASSERT ( SCOPE CHECK ) */ + + Eina_List* list = setting_get_language_list(); + Eina_List* elist = NULL; + setting_lang_entry* pnode; + + char locale[128] = {0,}; + + EINA_LIST_FOREACH( list, elist, pnode) + { + if (pnode->number == ichk) { + snprintf(locale, 128, "%s", pnode->locale); + } + } + + SETTING_TRACE("table . locale >>>>>> :: %s ", locale); //en_US.UTF8 + + //if (ichk > 0) { + // CHECK 'AUTO' HERE + ret = setting_set_int_slp_key(INT_SLP_SETTING_LANG, ichk, &err); + + if (ichk > 0) + ret = vconf_set_str(VCONFKEY_LANGSET, locale); +} + +static void setting_phone_lang_item_Gendial_mouse_up_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); + + SettingPhoneUG *ad = (SettingPhoneUG *) data; + + int ret = SETTING_RETURN_SUCCESS; + if(!safeStrCmp("IDS_ST_HEADER_DISPLAY_LANGUAGE", list_item->keyStr)) + { + ret = + setting_view_change(&setting_view_phone_language_region, + &setting_view_phone_display_language, + ad); + } + else if(!safeStrCmp("IDS_ST_BODY_REGION", list_item->keyStr)) + { + ret = + setting_view_change(&setting_view_phone_language_region, + &setting_view_phone_region_format, ad); + } +} + diff --git a/setting-phone/src/setting-phone-region-format.c b/setting-phone/src/setting-phone-region-format.c new file mode 100755 index 0000000..c0b45e7 --- /dev/null +++ b/setting-phone/src/setting-phone-region-format.c @@ -0,0 +1,630 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 + +#define MAX_REGION_STRLEN 256 + +static int setting_phone_region_format_create(void *cb); +static int setting_phone_region_format_destroy(void *cb); +static int setting_phone_region_format_cleanup(void *cb); + +setting_view setting_view_phone_region_format = { + .create = setting_phone_region_format_create, + .destroy = setting_phone_region_format_destroy, + .update = NULL, + .cleanup = setting_phone_region_format_cleanup, +}; + +static char *__region_format_vconf_str_get(); +static Eina_Bool __region_animator_cb(void *data); +static void __region_genlist_create(void *data); +static Eina_Bool __region_genlist_update(void *data); +static void __searchbar_changed_cb(void *data, Evas_Object *obj, void *event_info); + +static int setting_phone_region_format_get_region_fmt(char *list[], + int item_idx[], + /*[OUT]*/ char *region_keyStr[], + int *region_num) +{ + const char *loc_list = NULL; + int loc_count = 0; + UChar lang[LANGUAGE_STR_LEN] = { 0, }; + UChar country[COUNTRY_STR_LEN] = { 0, }; + UChar variant[SETTING_STR_SLP_LEN] = { 0, }; + UChar displayname[SETTING_STR_SLP_LEN] = { 0, }; + const char *localeID = NULL; + UErrorCode language_status = U_ZERO_ERROR; + UErrorCode country_status = U_ZERO_ERROR; + UErrorCode variant_status = U_ZERO_ERROR; + UErrorCode displayname_status = U_ZERO_ERROR; + + int tmp_region_num = 0; + *region_num = 0; + + char *str_lang = NULL; + char *str_country = NULL; + char *str_variant = NULL; + char *str_displayname = NULL; + Eina_List *region_list = NULL; + + loc_count = uloc_countAvailable(); + + int i = 0; + localeID = uloc_getDefault(); + SETTING_TRACE("localeID = %s", localeID); + + for (; i < loc_count; i++) { + if (tmp_region_num >= REGION_ITEM_MAX) + break; + + loc_list = uloc_getAvailable(i); + + /* SETTING_TRACE("loc_list = %s", loc_list); */ + uloc_getDisplayLanguage(loc_list, localeID, lang, LANGUAGE_STR_LEN, &language_status); + if (U_FAILURE(language_status)) { + SETTING_TRACE_ERROR("language_status got an error %s:%d ", language_status,language_status); + language_status = U_ZERO_ERROR; /* set the value to the initial value */ + } + + uloc_getDisplayCountry(loc_list, localeID, country, COUNTRY_STR_LEN, &country_status); + if (U_FAILURE(country_status)) { + SETTING_TRACE_ERROR("country_status got an error %s:%d ", country, country_status); + country_status = U_ZERO_ERROR; /* set the value to the initial value */ + } + + uloc_getDisplayVariant(loc_list, localeID, variant, SETTING_STR_SLP_LEN, &variant_status); + if (U_FAILURE(variant_status)) { + SETTING_TRACE_ERROR("variant_status got an error %s:%d ", variant, variant_status); + variant_status = U_ZERO_ERROR; /* set the value to the initial value */ + } + + uloc_getDisplayName(loc_list, localeID, displayname, SETTING_STR_SLP_LEN, &displayname_status); + if (U_FAILURE(displayname_status)) { + SETTING_TRACE_ERROR("displayname_status got an error %s:%d ", displayname, displayname_status); + displayname_status = U_ZERO_ERROR; /* set the value to the initial value */ + } + + str_lang = setting_phone_lang_str_to_utf8(lang); + str_country = setting_phone_lang_str_to_utf8(country); + str_variant = setting_phone_lang_str_to_utf8(variant); + str_displayname = setting_phone_lang_str_to_utf8(displayname); + + /* filter which has variant */ + if (str_lang != NULL && str_country != NULL + && safeStrLen(str_country) > 1 && safeStrLen(str_variant) == 0) { + Setting_Region_Table *item_data = (Setting_Region_Table *) calloc(1, sizeof(Setting_Region_Table)); + //setting_retvm_if(item_data == NULL, -1, "calloc failed") + + if(item_data == NULL) { + SETTING_TRACE_ERROR("calloc failed"); + FREE(str_lang); + FREE(str_country); + FREE(str_variant); + FREE(str_displayname); + return -1; + } + + item_data->desc = (char *)g_strdup(str_displayname); + item_data->key = (char *)g_strdup(loc_list); + region_list = eina_list_append(region_list, item_data); + tmp_region_num++; + } + + FREE(str_lang); + FREE(str_country); + FREE(str_variant); + FREE(str_displayname); + } + + region_list = eina_list_sort(region_list, eina_list_count(region_list), + setting_phone_region_format_compare_cb); + + Eina_List *iter = NULL; + Setting_Region_Table *item_data = NULL; + i = 0; + EINA_LIST_FOREACH(region_list, iter, item_data) { + if (item_data) { + list[i] = (char *)g_strdup(item_data->desc); + item_idx[i] = i; + region_keyStr[i] = (char *)g_strdup(item_data->key); + free(item_data); + item_data = NULL; + i++; + } + } + + eina_list_free(region_list); + SETTING_TRACE("region_num = %d", tmp_region_num); + *region_num = tmp_region_num; + return 0; +} + +static char *__region_format_vconf_str_get() +{ + SETTING_TRACE_BEGIN; + char *tempstr = vconf_get_str(VCONFKEY_REGIONFORMAT); + setting_retvm_if(NULL == tempstr, NULL, "NULL == tempstr"); + + char *str_region = NULL; + char* p = strchr(tempstr, '.'); + + int len = safeStrLen(tempstr) - safeStrLen(".UTF-8"); + if (p) { + if (len > 0) { + str_region = strndup(tempstr, len); //.UTF8 => 5 + } else { + str_region = (char *)g_strdup(tempstr); + SETTING_TRACE_ERROR("region format vconf stored error"); + } + } else { + str_region = (char *)g_strdup("en_US"); + } + + FREE(tempstr); + return str_region; +} + +static Eina_Bool __region_animator_cb(void *data) +{ + //SETTING_TRACE_BEGIN; + setting_retvm_if(NULL == data, ECORE_CALLBACK_CANCEL, "data is NULL"); + SettingPhoneUG *ad = (SettingPhoneUG *) data; + + Setting_GenGroupItem_Data *item_data = NULL; + if (ad->gl_region_cur_index >= ad->region_num) { + if (ad->animator) { + ecore_animator_del(ad->animator); + ad->animator = NULL; + } + elm_radio_value_set(ad->chk_region, ad->selected_region_idx); + if (ad->pop_progress) { + SETTING_TRACE("To delete ad->pop_progress"); + evas_object_del(ad->pop_progress); + ad->pop_progress = NULL; + } + + //if (ad->selected_item) { + //show the last item + // elm_genlist_item_show(ad->selected_item, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE); + //} + ad->prev_region = ad->selected_region_idx; + + Elm_Object_Item *item = NULL; + item = elm_genlist_item_append(ad->gl_region, &itc_bottom_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + return ECORE_CALLBACK_CANCEL; + } + + int i = ad->gl_region_cur_index++; + if (isEmptyStr(ad->search_text) || is_substr_ncase(ad->region_desc[i], ad->search_text)) { + item_data = + setting_create_Gendial_field_def(ad->gl_region, + &(ad->itc_1text), + setting_phone_region_format_mouse_up_Gendial_list_radio_cb, + ad->chk_region, + SWALLOW_Type_INVALID, NULL, NULL, + ad->region_index[i], + ad->region_desc[i]/* HERE */, NULL, NULL); + + if (item_data) { + item_data->userdata = ad; + } else { + SETTING_TRACE_ERROR("item_data is NULL"); + } + + if (!safeStrCmp(ad->region_vconf_str, ad->region_keyStr[i])) { + ad->selected_region_idx = i; + if (item_data) ad->selected_item = item_data->item; + } + } + + return ECORE_CALLBACK_RENEW; + +} + +static void __region_genlist_create(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == data, "data is NULL"); + SettingPhoneUG *ad = (SettingPhoneUG *) data; + + if (ad->pop_progress) { + evas_object_del(ad->pop_progress); + ad->pop_progress = NULL; + } + ad->pop_progress = setting_create_popup_with_progressbar(ad, ad->win_get, + "pending_list", + NULL, NULL, NULL, 0, TRUE, TRUE); + + elm_genlist_clear(ad->gl_region); + G_FREE(ad->region_vconf_str); + ad->region_vconf_str = __region_format_vconf_str_get(); + + Elm_Object_Item *item = NULL; + item = elm_genlist_item_append(ad->gl_region, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + Setting_GenGroupItem_Data *item_data = NULL; + ad->gl_region_index = 0; + ad->selected_item = NULL; + ad->selected_region_idx = -1; + + int i = 0; + for (; i < ad->region_num; i++) { + if (ad->gl_region_index > + SETTING_PHONE_REGION_FORMAT_ANIMATOR_START_INDEX) { + break; + } + + if (isEmptyStr(ad->search_text) || + is_substr_ncase(ad->region_desc[i], ad->search_text)) { + item_data = + setting_create_Gendial_field_def(ad->gl_region, + &(ad->itc_1text), + setting_phone_region_format_mouse_up_Gendial_list_radio_cb, + ad->chk_region, + SWALLOW_Type_INVALID, NULL, NULL, + ad->region_index[i], + ad->region_desc[i], NULL, NULL); + if (item_data) { + item_data->userdata = ad; + } else { + SETTING_TRACE_ERROR("item_data is NULL"); + } + + if (!safeStrCmp(ad->region_vconf_str, ad->region_keyStr[i])) { + ad->selected_region_idx = i; + if (item_data) { + ad->selected_item = item_data->item; + } + } + ad->gl_region_index++; + } + } + ad->gl_region_cur_index = i; + + if (ad->selected_region_idx > -1) { + elm_radio_value_set(ad->chk_region, ad->selected_region_idx); + ad->prev_region = ad->selected_region_idx; + } + if (ad->gl_region_cur_index < ad->region_num && + ad->gl_region_index > SETTING_PHONE_REGION_FORMAT_ANIMATOR_START_INDEX) { + //to continue adding items using animator + SETTING_TRACE("to continue adding items using animator"); + if (ad->animator) { + ecore_animator_del(ad->animator); + ad->animator = NULL; + } + + ad->animator = ecore_animator_add(__region_animator_cb, ad); + } + else {//had finished adding items + SETTING_TRACE("had finished adding items"); + //if(ad->selected_item) { + //show the selected_item item + // elm_genlist_item_show(ad->selected_item, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE); + //} + if (ad->pop_progress) { + SETTING_TRACE("To delete ad->pop_progress"); + evas_object_del(ad->pop_progress); + ad->pop_progress = NULL; + } + } +} + +static Eina_Bool __region_genlist_update(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(NULL == data, ECORE_CALLBACK_CANCEL, "data is NULL"); + SettingPhoneUG *ad = (SettingPhoneUG *) data; + + elm_genlist_clear(ad->gl_region); + G_FREE(ad->region_vconf_str); + ad->region_vconf_str = __region_format_vconf_str_get(); + + Setting_GenGroupItem_Data *item_data = NULL; + ad->selected_region_idx = -1; + + int i = 0; + int noResult = TRUE; + for (; i < ad->region_num; i++) { + if (isEmptyStr(ad->search_text) || + is_substr_ncase(ad->region_desc[i], ad->search_text)) { + item_data = + setting_create_Gendial_field_def(ad->gl_region, + &(ad->itc_1text), + setting_phone_region_format_mouse_up_Gendial_list_radio_cb, + ad->chk_region, + SWALLOW_Type_INVALID, NULL, NULL, + ad->region_index[i], + ad->region_desc[i], NULL, NULL); + if (item_data) { + item_data->userdata = ad; + } else { + SETTING_TRACE_ERROR("item_data is NULL"); + } + + if (!safeStrCmp(ad->region_vconf_str, ad->region_keyStr[i])) { + ad->selected_region_idx = i; + } + noResult = FALSE; + } + } + + if (ad->selected_region_idx > -1) { + elm_radio_value_set(ad->chk_region, ad->selected_region_idx); + } + + if (noResult) { + item_data = + setting_create_Gendial_field_def(ad->gl_region, + &(ad->itc_1text), NULL, NULL, + SWALLOW_Type_INVALID, NULL, NULL, 0, + _("No search result"), NULL, NULL); + } + + ad->search_idler = NULL; + return ECORE_CALLBACK_CANCEL; +} + +static void __searchbar_changed_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingPhoneUG *ad = (SettingPhoneUG *)data; + setting_searchbar_redraw(ad, ad->search_bar, ad->search_text, + &(ad->search_idler), + __region_genlist_update); +} + +/* *************************************************** + * + *basic func + * + ***************************************************/ + +static int setting_phone_region_format_create(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPhoneUG *ad = (SettingPhoneUG *) cb; + Evas_Object *sub_layout = elm_layout_add(ad->navi_bar); + elm_layout_theme_set(sub_layout, "layout", "application", "searchbar_base"); + elm_object_signal_emit(sub_layout, "elm,state,show,searchbar", "elm"); + + setting_push_layout_navi_bar(_("IDS_ST_BODY_REGION"), + _("IDS_COM_BODY_BACK"), + NULL, + NULL, + setting_phone_region_format_click_softkey_cancel_cb, + NULL, + NULL, ad, sub_layout, ad->navi_bar, NULL); + + ad->gl_region = elm_genlist_add(ad->navi_bar); + elm_object_style_set(ad->gl_region, "dialogue"); + + ad->chk_region = elm_radio_add(ad->gl_region); + elm_radio_state_value_set(ad->chk_region, -1); + elm_radio_value_set(ad->chk_region, -1); + + int ret = setting_phone_region_format_get_region_fmt(ad->region_desc, + ad->region_index, + ad->region_keyStr, + &ad->region_num); + if (ret != 0) { + SETTING_TRACE_ERROR("get region format list failed"); + } + + ad->prev_region = 0; + memset(ad->search_text, '\0', MAX_SEARCH_STR_LEN + 1); + + __region_genlist_create(ad); + + ad->search_bar = setting_create_searchbar(ad, sub_layout, __searchbar_changed_cb, NULL); + + elm_object_part_content_set(sub_layout, "elm.swallow.content", ad->gl_region); + + setting_view_phone_region_format.is_create = 1; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_phone_region_format_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SettingPhoneUG *ad = (SettingPhoneUG *) cb; + + /* FIXED : destroy only if it was created. */ + if (setting_view_phone_region_format.is_create) { + if (ad->search_idler) { + ecore_idler_del(ad->search_idler); + ad->search_idler = NULL; + } + if (ad->animator) + { + ecore_animator_del(ad->animator); + ad->animator = NULL; + } + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + if (ad->pop_progress) { + evas_object_del(ad->pop_progress); + ad->pop_progress = NULL; + } + + elm_naviframe_item_pop(ad->navi_bar); + setting_view_phone_region_format.is_create = 0; + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_phone_region_format_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + setting_phone_region_format_destroy(cb); + return SETTING_RETURN_SUCCESS; +} + +static void +setting_phone_region_format_click_softkey_cancel_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + SettingPhoneUG *ad = (SettingPhoneUG *) data; + setting_view_change(&setting_view_phone_region_format, + &setting_view_phone_language_region, ad); +} + +static void +setting_phone_region_format_mouse_up_Gendial_list_radio_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + setting_retm_if(event_info == NULL, + "Invalid argument: event info is NULL"); + + Evas_Object *radio = (Evas_Object *) data; + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + SettingPhoneUG *ad = (SettingPhoneUG *) list_item->userdata; + + SETTING_TRACE("region_keyStr = %s", + ad->region_keyStr[list_item->chk_status]); + /* if not change, return */ + //if (ad->prev_region == list_item->chk_status) { + // return; + //} + elm_radio_value_set(radio, list_item->chk_status); + + ad->prev_region = list_item->chk_status; + SETTING_TRACE("cur_chk_region = %d", ad->prev_region); + + char region[MAX_REGION_STRLEN] = {0,}; + snprintf(region, MAX_REGION_STRLEN, "%s.UTF-8", ad->region_keyStr[ad->prev_region]); + + int ret = setting_phone_region_format_set_dateformat(ad->region_keyStr[ad->prev_region], ad); + setting_retm_if(ret == SETTING_RETURN_FAIL, "[Error] set date format fail"); + + ret = vconf_set_str(VCONFKEY_REGIONFORMAT,region); + setting_retm_if(ret != 0, "[Error] set value of VCONFKEY_REGIONFORMAT fail"); + + /* after changed, go back to the previous page*/ + setting_view_change(&setting_view_phone_region_format , + &setting_view_phone_language_region, ad); +} + +static int +setting_phone_region_format_compare_cb(const void *d1, const void *d2) +{ + Setting_Region_Table *r1 = (Setting_Region_Table *) d1; + Setting_Region_Table *r2 = (Setting_Region_Table *) d2; + return safeStrCmp(r1->desc, r2->desc); +} + +static int setting_phone_region_format_set_dateformat(const char *region, + void *data) +{ + /* SETTING_TRACE_BEGIN; */ + setting_retvm_if(!region, SETTING_RETURN_FAIL, + "region parameter is NULL"); + setting_retvm_if(data == NULL, SETTING_RETURN_FAIL, + "Data parameter is NULL"); + + SettingPhoneUG *ad = (SettingPhoneUG *) data; + + char *ret_str = NULL; + UChar *uret = NULL; + UChar customSkeleton[SETTING_STR_SLP_LEN] = { 0, }; + UErrorCode status = U_ZERO_ERROR; + + UChar bestPattern[SETTING_STR_SLP_LEN] = { 0, }; + char bestPatternString[SETTING_STR_SLP_LEN] = { 0, }; + char *skeleton = DATA_FORMAT_SKELETON; + + uret = u_uastrncpy(customSkeleton, skeleton, safeStrLen(skeleton)); + setting_retvm_if(!uret, SETTING_RETURN_FAIL, "u_uastrncpy is fail"); + + if (ad->pattern_generator == NULL + || safeStrCmp(region, ad->prev_locale) != 0) { + if (ad->pattern_generator != NULL) { + udatpg_close(ad->pattern_generator); + ad->pattern_generator = NULL; + } + ad->pattern_generator = udatpg_open(region, &status); + } + + int32_t bestPatternCapacity = + (int32_t) (sizeof(bestPattern) / sizeof((bestPattern)[0])); + (void)udatpg_getBestPattern(ad->pattern_generator, customSkeleton, + u_strlen(customSkeleton), bestPattern, + bestPatternCapacity, &status); + + ret_str = u_austrcpy(bestPatternString, bestPattern); + setting_retvm_if(!ret_str, SETTING_RETURN_FAIL, "u_uastrncpy is fail"); + /* SETTING_TRACE("bestPatternString : %s, bestPatternLength: %d", bestPatternString, bestPatternLength); */ + + int i = 0; + int j = 0; + int len = safeStrLen(bestPatternString); + char region_format[len]; + /* only save 'y', 'M', 'd' charactor */ + for (; i < len; i++) { + if (bestPatternString[i] == 'y' || bestPatternString[i] == 'M' + || bestPatternString[i] == 'd') { + region_format[j++] = bestPatternString[i]; + } + } + region_format[len] = '\0'; + + char *date_format_str[DATA_FORMAT_CATEGORY_NUM] = { + "dMy", "Mdy", "yMd", "ydM" }; + int date_format_vconf_value = DATA_FORMAT_DEFAULT; /* default is "Mdy" */ + for (i = 0; i < DATA_FORMAT_CATEGORY_NUM; i++) { + if (!safeStrCmp(region_format, date_format_str[i])) { + date_format_vconf_value = i; + } + } + SETTING_TRACE("bestPatternString : %s, format: %s, index: %d", + bestPatternString, region_format, + date_format_vconf_value); + + int err = SETTING_RETURN_SUCCESS; + setting_set_int_slp_key(INT_SLP_SETTING_DATE_FORMAT, + date_format_vconf_value, &err); + setting_retvm_if(err == SETTING_RETURN_FAIL, SETTING_RETURN_FAIL, + "set vconf fail"); + G_FREE(ad->prev_locale); + ad->prev_locale = (char *)g_strdup(region); + return SETTING_RETURN_SUCCESS; +} diff --git a/setting-phone/src/setting-phone.c b/setting-phone/src/setting-phone.c new file mode 100755 index 0000000..61a65f4 --- /dev/null +++ b/setting-phone/src/setting-phone.c @@ -0,0 +1,700 @@ +/* + * setting + * Copyright (c) 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://floralicense.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. + */ + +/** + *@defgroup setting-phone + *UG creation code for setting-phone + * + * - display + * - event notification + * - dispaly language + * - region format + */ + +#include +#include +#include +#include "unicode/unum.h" + +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif + +setting_view *__get_phone_view_to_load(service_h service) +{ + SETTING_TRACE_BEGIN; + + char *viewtype = NULL; + + service_get_extra_data(service, "viewtype", &viewtype); + if(!viewtype) + return NULL; + + SETTING_TRACE("viewtype:%s", viewtype); + + if (!safeStrCmp(viewtype, "language")) { + char *caller = NULL; + + service_get_extra_data(service, "caller", &caller); + if (caller) { + setting_view_node_table_register(&setting_view_phone_display_language, NULL); + return &setting_view_phone_display_language; + } else { + setting_view_node_table_register(&setting_view_phone_language_region, NULL); + setting_view_node_table_register(&setting_view_phone_display_language, + &setting_view_phone_language_region); + setting_view_node_table_register(&setting_view_phone_region_format, + &setting_view_phone_language_region); + + return &setting_view_phone_language_region; + } + } else { + return NULL; /* &setting_view_phone_main; */ + } +} + +Evas_Object *__get_phone_layout_to_return(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + SettingPhoneUG *phoneUG = priv; + char *viewtype = NULL; + + service_get_extra_data(service, "viewtype", &viewtype); + if(!viewtype) + return NULL; + SETTING_TRACE("viewtype:%s", viewtype); + + if (!safeStrCmp(viewtype, "language")) { + return phoneUG->ly_language; + } else { + return NULL; /* &setting_view_phone_main; */ + } + +} + + +const char *get_language_by_mobile_country_code(int mcc) +{ + const char *simLanguage = NULL; + + switch (mcc) { + case 262: /* GERMAN */ + simLanguage = "de_DE.UTF-8"; + break; + case 204: /* DUTCH */ + simLanguage = "nl_NL.UTF-8"; + break; + case 214: /* SPAINISH */ + simLanguage = "es_ES.UTF-8"; + break; + case 268: /* PORTUGUESE */ + simLanguage = "pt_PT.UTF-8"; + break; + case 202: /* GREEK */ + simLanguage = "el_GR.UTF-8"; + break; + case 222: /* ITALIAN */ + simLanguage = "it_IT.UTF-8"; + break; + case 208: /* FRENCH */ + simLanguage = "fr_FR.UTF-8"; + break; + case 286: /* TURKISH */ + simLanguage = "tr_TR.UTF-8"; + break; + case 450: /* KOREAN */ + simLanguage = "ko_KR.UTF-8"; + break; + case 440: /* JAPAN */ + simLanguage = "ja_JP.UTF-8"; + break; + case 460: /* CHINA */ + simLanguage = "zh_CN.UTF-8"; + break; + case 454: /* CANTONESE */ + simLanguage = "zh_HK.UTF-8"; + break; + case 466: /* TAIWAN */ + simLanguage = "zh_TW.UTF-8"; + break; + case 250: /* RUSSIAN */ + simLanguage = "ru_RU.UTF-8"; + break; + default: /* get value from db/menu_widget/language at vconf */ + simLanguage = "en_US.UTF-8"; + break; + } + return simLanguage; + +} + + +static void setting_phone_update_item(void *data) +{ + setting_retm_if(data == NULL, "data is NULL"); + SettingPhoneUG *ad = (SettingPhoneUG *) data; + + Setting_GenGroupItem_Data* item_to_update = NULL; + + item_to_update = ad->data_display_language; + retm_if (!item_to_update, "ad->data_display_language is NULL"); + + if (item_to_update) { + item_to_update->sub_desc = get_pa_display_language_str(); + elm_object_item_data_set(item_to_update->item, item_to_update); + elm_genlist_item_update(item_to_update->item); + } + + char *pa_region = vconf_get_str(VCONFKEY_REGIONFORMAT); + if (pa_region == NULL) { + SETTING_TRACE_ERROR + ("[Error] get value of VCONFKEY_REGIONFORMAT fail."); + return; + } + + item_to_update = ad->data_region_fmt; + retm_if (!item_to_update, "ad->data_region_fmt is NULL"); + + if (item_to_update) { + item_to_update->sub_desc = setting_phone_lang_get_region_str(pa_region); + elm_object_item_data_set(item_to_update->item, item_to_update); + elm_genlist_item_update(item_to_update->item); + } + + if (ad->data_region_fmt_example) { + char *example_desc = + setting_phone_lang_get_example_desc(pa_region, ad); + ad->data_region_fmt_example->keyStr = + (char *)g_strdup(example_desc); + FREE(example_desc); + elm_object_item_data_set(ad->data_region_fmt_example->item, ad->data_region_fmt_example); + elm_genlist_item_update(ad->data_region_fmt_example->item); + } + +#if 0 + if (ad->pop_progress) + { + evas_object_del(ad->pop_progress); + ad->popup = NULL; + } +#endif +} + +char *setting_phone_lang_get_region_str(const char *region) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(region == NULL, NULL, "region parameter is NULL"); + const char *localeID = NULL; + UChar displayname[SETTING_STR_SLP_LEN] = { 0, }; + UErrorCode status = U_ZERO_ERROR; + char *ret_str = NULL; + + const char *pa_lang = vconf_get_str(VCONFKEY_LANGSET); + if (pa_lang) { + char *q = strchr(pa_lang, '.'); + if (q) { + *q = '\0'; + } + SETTING_TRACE("pa_lang:%s", pa_lang); + int err = -1; + uloc_setDefault(pa_lang, &err); + free((void *)pa_lang); + pa_lang = NULL; + } else { + SETTING_TRACE_ERROR("get vconf failed"); + } + + localeID = uloc_getDefault(); + uloc_getDisplayName(region, localeID, displayname, SETTING_STR_SLP_LEN, + &status); + + if (U_FAILURE(status)) { + SETTING_TRACE("NO : uloc_getDisplayName : %d ", status); + } else { + SETTING_TRACE(" OK : uloc_getDisplayName : %s ", displayname); + } + + char *str_displayname = setting_phone_lang_str_to_utf8(displayname); + ret_str = (char *)g_strdup(str_displayname); + + if (str_displayname) { + FREE(str_displayname); + } + return ret_str; +} + +/** +* Change language string to UTF8 format, the invoker need to free the return string +* +* @param unichars The source string will be translated. +* +* @return UTF8 format string. +*/ +char *setting_phone_lang_str_to_utf8(const UChar *unichars) +{ + retv_if(unichars == NULL, NULL); + int len = 0; + int len_str = 0; + int len_utf8 = 0; + char *str = NULL; + UErrorCode status = U_ZERO_ERROR; + + len = u_strlen(unichars); + len_str = sizeof(char) *4 * (len + 1); + str = (char *)calloc(1, len_str); + if (!str) + return NULL; + + u_strToUTF8(str, len_str, &len_utf8, unichars, len, &status); + return str; +} + +char *setting_phone_lang_get_by_pattern(const char *locale, + const char *skeleton, void *data) +{ + setting_retvm_if(!locale, NULL, "locale parameter is NULL"); + setting_retvm_if(data == NULL, NULL, "Data parameter is NULL"); + + SettingPhoneUG *ad = (SettingPhoneUG *) data; + + char *ret_str = NULL; + UChar customSkeleton[SETTING_STR_SLP_LEN] = { 0, }; + UErrorCode status = U_ZERO_ERROR; + UDateFormat *formatter = NULL; + + UChar bestPattern[SETTING_STR_SLP_LEN] = { 0, }; + UChar formatted[SETTING_STR_SLP_LEN] = { 0, }; + + char bestPatternString[SETTING_STR_SLP_LEN] = { 0, }; + char formattedString[SETTING_STR_SLP_LEN] = { 0, }; + + u_uastrncpy(customSkeleton, skeleton, safeStrLen(skeleton)); + + if (ad->pattern_generator == NULL + || safeStrCmp(locale, ad->prev_locale) != 0) { + if (ad->pattern_generator != NULL) { + udatpg_close(ad->pattern_generator); + ad->pattern_generator = NULL; + } + ad->pattern_generator = udatpg_open(locale, &status); + } + + int32_t bestPatternCapacity = + (int32_t) (sizeof(bestPattern) / sizeof((bestPattern)[0])); + (void)udatpg_getBestPattern(ad->pattern_generator, customSkeleton, + u_strlen(customSkeleton), bestPattern, + bestPatternCapacity, &status); + + u_austrcpy(bestPatternString, bestPattern); + SETTING_TRACE("BestPattern is %s", bestPatternString); + + UDate date = ucal_getNow(); + formatter = + udat_open(UDAT_IGNORE, UDAT_IGNORE, locale, NULL, -1, bestPattern, + -1, &status); + int32_t formattedCapacity = + (int32_t) (sizeof(formatted) / sizeof((formatted)[0])); + (void)udat_format(formatter, date, formatted, formattedCapacity, NULL, + &status); + u_austrcpy(formattedString, formatted); + SETTING_TRACE("DATE & TIME is %s", formattedString); + + udat_close(formatter); + + ret_str = g_strdup(formattedString); + return ret_str; +} + +static char *__setting_phone_number_format_get(const char *region) +{ + setting_retvm_if(region == NULL, NULL, "region parameter is NULL"); + UNumberFormat *fmt = NULL; + UErrorCode status = U_ZERO_ERROR; + UChar number_uchar[MAX_DISPLAY_NAME_LEN_ON_UI] = {0,}; + char number_char[MAX_DISPLAY_NAME_LEN_ON_UI] = {0,}; + double example_number = 1234567.89; + + fmt = unum_open(UNUM_DEFAULT, NULL, -1, region, NULL, &status); + unum_formatDouble(fmt, example_number, number_uchar, MAX_DISPLAY_NAME_LEN_ON_UI, NULL, &status); + u_austrcpy(number_char, number_uchar); + SETTING_TRACE("number_char = %s", number_char); + unum_close(fmt); + + return g_strdup(number_char); /* should be freed by caller */ +} + +char *setting_phone_lang_get_example_desc(const char *region, void *data) +{ + setting_retvm_if(region == NULL, NULL, "region parameter is NULL"); + setting_retvm_if(data == NULL, NULL, "Data parameter is NULL"); + char *date = setting_phone_lang_get_by_pattern(region, + UDAT_YEAR_MONTH_WEEKDAY_DAY, + data); + + enum appcore_time_format timeformat = APPCORE_TIME_FORMAT_12; + int ret = appcore_get_timeformat(&timeformat); + if (ret == -1) { + SETTING_TRACE_ERROR("call appcore_get_timeformat fail."); + timeformat = APPCORE_TIME_FORMAT_12; + } + + char *time_skeleton = "hhmm"; + if (timeformat == APPCORE_TIME_FORMAT_24) { + time_skeleton = "HHmm"; + } + + char *time = setting_phone_lang_get_by_pattern(region, time_skeleton, data); + + char *number = __setting_phone_number_format_get(region); + + Eina_Strbuf *temp_str = eina_strbuf_new(); + char *r_str_text = NULL; + eina_strbuf_append_printf(temp_str, + "%s", _("IDS_ST_BODY_REGIONAL_EXAMPLE")); + eina_strbuf_append_printf(temp_str, "
%s : %s", _("IDS_ST_BODY_DATE"), date); + eina_strbuf_append_printf(temp_str, "
%s : %s", _("IDS_COM_BODY_DETAILS_TIME"), time); + eina_strbuf_append_printf(temp_str, "
%s : %s", _("IDS_ST_BODY_NUMBER"), number); + + r_str_text = eina_strbuf_string_steal(temp_str); + /* eina_strbuf_string_free(temp_str); */ + eina_strbuf_free(temp_str); + G_FREE(date); + G_FREE(time); + G_FREE(number); + return r_str_text; /* will be freed in calling place */ +} + + +static void setting_phone_ug_cb_resize(void *data, Evas *e, Evas_Object *obj, + void *event_info) +{ + SettingPhoneUG *ad = (SettingPhoneUG *) data; + /* setting_view_update(&setting_view_about_main, ad); */ + setting_view_update(ad->view_to_load, ad); +} + +static void *setting_phone_ug_on_create(ui_gadget_h ug, enum ug_mode mode, + service_h service, void *priv) +{ + setting_retvm_if((!priv), NULL, "!priv"); + SETTING_TRACE_BEGIN; + SettingPhoneUG *phoneUG = priv; + phoneUG->ug = ug; + + phoneUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug); + phoneUG->win_get = (Evas_Object *) ug_get_window(); + evas_object_show(phoneUG->win_main_layout); + phoneUG->evas = evas_object_evas_get(phoneUG->win_main_layout); + + setting_retvm_if(phoneUG->win_main_layout == NULL, NULL, + "cannot get main window "); + + /* --------------------------------------------------------- */ + char *pa_path = NULL;; + + pa_path = vconf_get_str(VCONFKEY_LANGSET); + if (!pa_path) { + SETTING_TRACE + ("%s*** language setting has no proper value (nil) ***%s", + SETTING_FONT_BGREEN, SETTING_FONT_BLACK); + return NULL; + } + /* set launguage */ + setting_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR); + FREE(pa_path); + /* --------------------------------------------------------- */ + int value = 0; + int err; + int ret = setting_get_int_slp_key(INT_SLP_SETTING_SIM_SLOT, &value, &err); + if (ret != 0) { + SETTING_TRACE("fail to get vconf"); + } + if (value == VCONFKEY_TELEPHONY_SIM_INSERTED) { + phoneUG->handle = tel_init(NULL); + SETTING_TRACE("phoneUG->handle:%d", phoneUG->handle); + memset(&(phoneUG->imsi), 0, sizeof(TelSimImsiInfo_t)); + if (phoneUG->handle + && TAPI_API_SUCCESS == tel_get_sim_imsi(phoneUG->handle, &(phoneUG->imsi))) { + SETTING_TRACE("********************************************"); + //SETTING_TRACE("imsi.bValid: [%d]", phoneUG->imsi.bValid); + SETTING_TRACE("imsi.szMcc: [%s]", phoneUG->imsi.szMcc); + SETTING_TRACE("imsi.szMnc: [%s]", phoneUG->imsi.szMnc); + SETTING_TRACE("imsi.szMsin: [%s]", phoneUG->imsi.szMsin); + SETTING_TRACE("********************************************"); + + phoneUG->sim_lang = get_language_by_mobile_country_code(atoi(phoneUG->imsi.szMcc)); + } + } + if (!phoneUG->sim_lang) { + /* if CSC has updated configuration for setting, initial vconf value changes. */ + phoneUG->sim_lang = vconf_get_str(VCONFKEY_LANGSET); /* allocated */ + } + SETTING_TRACE("sim_lang: [%s]", phoneUG->sim_lang); + + /* register view node table */ + setting_view_node_table_intialize(); + + setting_create_Gendial_itc("dialogue/1text.1icon.2", + &(phoneUG->itc_1text_1icon_2)); + setting_create_Gendial_itc("dialogue/1text.1icon", + &(phoneUG->itc_1text_1icon)); + + // 2 text - genlist > items + setting_create_Gendial_itc("dialogue/2text", &(phoneUG->itc_1icon_2text)); + + setting_create_Gendial_itc("dialogue/1text", &(phoneUG->itc_1text)); + setting_create_Gendial_itc("dialogue/2text.3/expandable", + &(phoneUG->itc_2text_3_parent)); + setting_create_Gendial_itc("dialogue/1text.1icon/expandable2", + &(phoneUG->itc_1icon_1text_sub)); + + phoneUG->itc_seperator.item_style = "dialogue/separator"; + phoneUG->itc_seperator.func.text_get = NULL; + phoneUG->itc_seperator.func.content_get = NULL; + phoneUG->itc_seperator.func.state_get = NULL; + phoneUG->itc_seperator.func.del = NULL; + + setting_create_Gendial_itc("dialogue/2text.3", &(phoneUG->itc_2text_2)); + setting_create_Gendial_itc("multiline/1text", + &(phoneUG->itc_bg_1icon)); + phoneUG->pattern_generator = NULL; + phoneUG->prev_locale = NULL; + /* creating a view. */ + phoneUG->bundle_data = service; + phoneUG->view_to_load = __get_phone_view_to_load(service); + setting_retvm_if(NULL == phoneUG->view_to_load, NULL, + "NULL == phoneUG->view_to_load"); + setting_view_node_set_cur_view(phoneUG->view_to_load); + setting_view_create(phoneUG->view_to_load, (void *)phoneUG); + evas_object_event_callback_add(phoneUG->win_main_layout, + EVAS_CALLBACK_RESIZE, + setting_phone_ug_cb_resize, phoneUG); + return __get_phone_layout_to_return(service, phoneUG); +} + +static void setting_phone_ug_on_start(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_phone_ug_on_pause(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_phone_ug_on_resume(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_phone_ug_on_destroy(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if((!ug || !priv), "!ug || !priv"); + SettingPhoneUG *phoneUG = priv; + + evas_object_event_callback_del(phoneUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_phone_ug_cb_resize); /* fix flash issue for gallery */ + phoneUG->ug = ug; + + if (phoneUG->handle && tel_deinit(phoneUG->handle) != TAPI_API_SUCCESS) { + SETTING_TRACE_ERROR("tel_deinit failed"); + } + /* called when this shared gadget is terminated. similar with app_exit */ + if (&setting_view_phone_language_region == phoneUG->view_to_load) { + setting_view_destroy(&setting_view_phone_display_language, + phoneUG); + setting_view_destroy(&setting_view_phone_region_format, + phoneUG); + setting_view_destroy(&setting_view_phone_language_region, phoneUG); + } + + if (NULL != ug_get_layout(phoneUG->ug)) { + evas_object_hide((Evas_Object *) ug_get_layout(phoneUG->ug)); + evas_object_del((Evas_Object *) ug_get_layout(phoneUG->ug)); + } + + SETTING_TRACE_END; +} + +static void setting_phone_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == priv, "priv is NULL"); + char *pid_str = NULL; + + service_get_extra_data(msg, "DEADPID", &pid_str); + if (pid_str) + { + errno = 0; + int pid = (int)g_ascii_strtod(pid_str, NULL); + SETTING_TRACE_DEBUG("pid = %d",pid); + setting_retm_if(errno == ERANGE, "call g_ascii_strtod fail"); + + int ret = app_terminate_dead_cb(pid, priv); + setting_retm_if(ret != 0, "call app_terminate_dead_cb fail"); + } +} + +static void setting_phone_ug_on_event(ui_gadget_h ug, enum ug_event event, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + + SettingPhoneUG *ad = (SettingPhoneUG *) priv; + switch (event) { + case UG_EVENT_LOW_MEMORY: + break; + case UG_EVENT_LOW_BATTERY: + break; + case UG_EVENT_REGION_CHANGE: + { + if (ad->gl_lang_region && setting_view_phone_language_region.is_create) { + elm_genlist_realized_items_update(ad->gl_lang_region); + Elm_Object_Item *navi_it = elm_naviframe_top_item_get(ad->navi_bar); + ret_if(!navi_it); + elm_object_item_text_set(navi_it, _(KeyStr_LanguageRegion)); + setting_phone_update_item(ad); + } + } + break; + case UG_EVENT_LANG_CHANGE: + { + if (ad->gl_lang_region && setting_view_phone_language_region.is_create) { + elm_genlist_realized_items_update(ad->gl_lang_region); + Elm_Object_Item *navi_it = elm_naviframe_top_item_get(ad->navi_bar); + ret_if(!navi_it); + elm_object_item_text_set(navi_it, _(KeyStr_LanguageRegion)); + setting_phone_update_item(ad); + } + + if (ad->pop_progress) { + evas_object_del(ad->pop_progress); + ad->popup = NULL; + } + } + 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 setting_phone_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + SettingPhoneUG *ad = (SettingPhoneUG *) priv; + + SETTING_TRACE("event:%d", event); + switch (event) { + case UG_KEY_EVENT_END: + { + if (elm_naviframe_top_item_get(ad->navi_bar) == + elm_naviframe_bottom_item_get(ad->navi_bar)) { + ug_destroy_me(ug); + } else { + setting_view_cb_at_endKey(ad); + } + } + break; + default: + break; + } +} + +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + SettingPhoneUG *phoneUG = calloc(1, sizeof(SettingPhoneUG)); + setting_retvm_if(!phoneUG, -1, "Create SettingPhoneUG obj failed"); + + ops->create = setting_phone_ug_on_create; + ops->start = setting_phone_ug_on_start; + ops->pause = setting_phone_ug_on_pause; + ops->resume = setting_phone_ug_on_resume; + ops->destroy = setting_phone_ug_on_destroy; + ops->message = setting_phone_ug_on_message; + ops->event = setting_phone_ug_on_event; + ops->key_event = setting_phone_ug_on_key_event; + ops->priv = phoneUG; + ops->opt = UG_OPT_INDICATOR_ENABLE; + + return 0; +} + +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + struct SettingPhoneUG *phoneUG; + setting_retm_if(!ops, "ops == NULL"); + + phoneUG = ops->priv; + if (phoneUG) + FREE(phoneUG); +} + +/*****/ +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + + int ret = 0; + char *ug_type = NULL; + + service_get_extra_data(service, "viewtype", &ug_type); +#if SUPPORT_RUN_SYSTEM_COMMAND + ret += excuteCmd(SETTING_POSTINST_FILE, 1, ug_type); +#else + if (0 == safeStrCmp(ug_type, "language")) { + // INT_SLP_SETTING_LANG + ret += vconf_set_int(VCONFKEY_SETAPPL_LANG_INT, 9); + ret += vconf_set_str(VCONFKEY_LANGSET, "en_GB.UTF-8"); + ret += vconf_set_str(VCONFKEY_REGIONFORMAT,"en_GB.UTF-8"); + } + +#endif + if (0 == safeStrCmp(ug_type, "language")) + { + SETTING_TRACE("Begin to reset language & region..."); + + //b .reset default localeid + int err = -1; + uloc_setDefault("en_US", &err); + + //c. reset date&time format + vconf_set_int(VCONFKEY_SETAPPL_DATE_FORMAT_INT, SETTING_DATE_FORMAT_DD_MM_YYYY); + + //d. terminate other apps + // ret += aul_app_get_running_app_info(app_terminate_func, NULL); + } + /* DO NOTHING */ + return ret; + +} + +/*****/ diff --git a/setting-powersaving/CMakeLists.txt b/setting-powersaving/CMakeLists.txt new file mode 100755 index 0000000..e72f5be --- /dev/null +++ b/setting-powersaving/CMakeLists.txt @@ -0,0 +1,39 @@ + + +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_powersaving REQUIRED evas ecore edje elementary appcore-common appcore-efl devman ui-gadget-1 capi-appfw-application dlog) + +FOREACH(flag ${pkgs_powersaving_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") +ADD_DEFINITIONS("-fpie") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl, --rpath=/usr/lib") + +ADD_LIBRARY(${SETTING_POWERSAVING_UG} SHARED + ./src/setting-powersaving.c + ./src/setting-powersaving-main.c + ./src/setting-powersaving-about.c + ./src/setting-powersaving-customed.c + ./src/setting-powersaving-brightness.c +) + +TARGET_LINK_LIBRARIES(${SETTING_POWERSAVING_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_POWERSAVING_UG} ${pkgs_powersaving_LDFLAGS}) +INSTALL(TARGETS ${SETTING_POWERSAVING_UG} DESTINATION /usr/ug/lib) + diff --git a/setting-powersaving/include/setting-powersaving-about.h b/setting-powersaving/include/setting-powersaving-about.h new file mode 100755 index 0000000..069effc --- /dev/null +++ b/setting-powersaving/include/setting-powersaving-about.h @@ -0,0 +1,27 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_POWERSAVING_ABOUT_H__ +#define __SETTING_POWERSAVING_ABOUT_H__ + +#include + +static void setting_powersaving_about_click_back_cb(void *data, + Evas_Object *obj, + void *event_info); + +#endif /* __SETTING_POWERSAVING_ABOUT_H__ */ diff --git a/setting-powersaving/include/setting-powersaving-brightness.h b/setting-powersaving/include/setting-powersaving-brightness.h new file mode 100755 index 0000000..6125c5c --- /dev/null +++ b/setting-powersaving/include/setting-powersaving-brightness.h @@ -0,0 +1,42 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_POWERSAVING_BRIGHTNESS_H__ +#define __SETTING_POWERSAVING_BRIGHTNESS_H__ + +#include + + +static void setting_powersaving_brightness_click_softkey_cancel_cb(void *data, + Evas_Object * + obj, void + *event_info); +static void setting_powersaving_brightness_chk_btn_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_powersaving_brightness_mouse_up_Gendial_list_cb(void *data, + Evas_Object + *obj, void + *event_info); +static void setting_powersaving_birghtness_bright_slider_value_change_cb(void + *data, + Evas_Object + *obj, + void + *event_info); + +#endif /* __SETTING_POWERSAVING_BRIGHTNESS_H__ */ diff --git a/setting-powersaving/include/setting-powersaving-customed.h b/setting-powersaving/include/setting-powersaving-customed.h new file mode 100755 index 0000000..3a1fa5a --- /dev/null +++ b/setting-powersaving/include/setting-powersaving-customed.h @@ -0,0 +1,37 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_POWERSAVING_CUSTOMED_H__ +#define __SETTING_POWERSAVING_CUSTOMED_H__ + +#include + +static void setting_powersaving_customed_click_softkey_cancel_cb(void *data, + Evas_Object * + obj, void + *event_info); + +static void setting_powersaving_customed_mouse_up_Gendial_list_cb(void *data, + Evas_Object * + obj, void + *event_info); + +static void setting_powersaving_customed_use_chk_btn_cb(void *data, + Evas_Object *obj, + void *event_info); + +#endif /* __SETTING_POWERSAVING_CUSTOMED_H__ */ diff --git a/setting-powersaving/include/setting-powersaving-main.h b/setting-powersaving/include/setting-powersaving-main.h new file mode 100755 index 0000000..d315a77 --- /dev/null +++ b/setting-powersaving/include/setting-powersaving-main.h @@ -0,0 +1,35 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_POWERSAVING_MAIN_H__ +#define __SETTING_POWERSAVING_MAIN_H__ + +#include + +#define NEVER_SHOW_AGAIN "IDS_COM_BODY_NEVER_SHOW_AGAIN" +#define POWERSAVING_REMINDER "IDS_ST_BODY_BATTERY_LIFE_EXTENDED_BUT_PERFORMANCE_RESTRICTED_BRIGHTNESS_LOW_MSG" + +static void setting_powersaving_main_mouse_up_Gendial_list_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_powersaving_main_click_softkey_back_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_powersaving_main_motion_active_chk_btn_cb(void *data, + Evas_Object *obj, + void *event_info); +#endif /* __SETTING_POWERSAVING_MAIN_H__ */ diff --git a/setting-powersaving/include/setting-powersaving.h b/setting-powersaving/include/setting-powersaving.h new file mode 100755 index 0000000..3ae6176 --- /dev/null +++ b/setting-powersaving/include/setting-powersaving.h @@ -0,0 +1,133 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_POWERSAVING_H__ +#define __SETTING_POWERSAVING_H__ + +#include +#include + +#include + +#include + +#include +#include + +#include +#define SUPPORT_UI0_3 0 +#define SUPPORT_UI0_4 1 + +/* string resources..*/ +//in main view +#define KeyStr_Powersaving_Mode "IDS_ST_BODY_POWER_SAVING_MODE" +#define KeyStr_Powersaving_Mode_DSC "Use default settings for power saving. Settings will be enabled immediately." + +/* To do : strings of custom power saving will be removed. */ +#define KeyStr_Powersaving_Customed_Mode "Custom power saving mode" +#define KeyStr_Powersaving_Customed "Custom power saving settings" +#define KeyStr_Powersaving_Level_DSC "Use settings for power saving. Settings will be enabled when battery level is below the value you set." + +#define KeyStr_Powersaving_Tips "IDS_ST_MBODY_POWER_SAVING_TIPS" +#define KeyStr_Powersaving_About "IDS_ST_BODY_LEARN_ABOUT_POWER_SAVING" + +//in "Custom settings" view +#define __TURN_Off "Turn off " +#define KeyStr_WIFI_Off __TURN_Off"Wi-Fi" +#define KeyStr_BT_Off __TURN_Off"Bluetooth" +#define KeyStr_GPS_Off __TURN_Off"GPS" +#define KeyStr_SYNC_Off __TURN_Off"Data sync" +#define KeyStr_HOTSPOT_Off __TURN_Off"Portable Wi-Fi hotspot" +#define KeyStr_Adjust_Bright "Adjust brightness" + +#define KeyStr_Powersaving_AT "Enable power saving at" +#define KeyStr_Screen_Timeout "IDS_ST_BACKLIGHT_TIME" + +#define SETTING_POWERSAVING_AT_10_STR "10% battery power" +#define SETTING_POWERSAVING_AT_20_STR "20% battery power" +#define SETTING_POWERSAVING_AT_30_STR "30% battery power" +#define SETTING_POWERSAVING_AT_40_STR "40% battery power" +#define SETTING_POWERSAVING_AT_50_STR "50% battery power" +/* To do : end */ + + +//v0.4 +#define KeyStr_PS_SETTINGS "IDS_ST_BODY_POWER_SAVING_MODE_SETTINGS" +#define KeyStr_CPU_PS "IDS_ST_BODY_CPU_POWER_SAVING" +#define KeyStr_CPU_PS_DSC "IDS_ST_BODY_LIMIT_THE_MAXIMUM_PERFORMANCE_OF_THE_CPU" +#define KeyStr_DISPLAY_PS "IDS_ST_BODY_SCREEN_POWER_SAVING" +#define KeyStr_DISPLAY_PS_DSC "IDS_ST_BODY_USE_LOW_POWER_LEVEL_FOR_SCREEN" +#define KeyStr_BG_COLOR "IDS_ST_DISPLAYSETTINGS_BODY_MAINGREETINGEDITSTYLEBGCOLOUR" +#define KeyStr_BG_COLOR_DSC "IDS_ST_BODY_CHANGE_BACKGROUND_COLOUR_TO_SAVE_POWER_IN_EMAIL_AND_INTERNET" +#define KeyStr_SCREEN_VIB "IDS_ST_BODY_TURN_OFF_HAPTIC_FEEDBACK" +#define KeyStr_SCREEN_VIB_DSC "IDS_ST_BODY_TURNING_OFF_HAPTIC_FEEDBACK_CAN_EXTEND_BATTERY_LIFE" + +#define SETTING_POWERSAVING_ALL_SUB_ITEMS_OFF "To turn on the Power saving mode. At least one item should be selected" + +typedef struct _SettingPowersavingUG SettingPowersavingUG; + +/** + *Setting Powersaving UG context + *all UG function has void * as an agument. this is casted back to SettingPowersavingUG + *and the functions access app context. + */ +struct _SettingPowersavingUG { + ui_gadget_h ug; + + /* add more variables here (move your appdata to here) */ + Evas *evas; + Evas_Object *win_main_layout; + Evas_Object *win_get; + Evas_Object *popup; + Evas_Object *popup_chk; + + Evas_Object *ly_main; + Evas_Object *navi_bar; + + Setting_GenGroupItem_Data *data_powersaving_active; + Setting_GenGroupItem_Data *data_customed_active; + Setting_GenGroupItem_Data *data_customed_setting; + Setting_GenGroupItem_Data *data_powersaving_about; + //v0.4 + Setting_GenGroupItem_Data *data_cpu_ps; + Setting_GenGroupItem_Data *data_display_ps; + Setting_GenGroupItem_Data *data_bg_color; + Setting_GenGroupItem_Data *data_screen_vib; + + Setting_GenGroupItem_Data *data_saving_at; + Setting_GenGroupItem_Data *data_screen_timeout; + Setting_GenGroupItem_Data *data_wifi_off; + Setting_GenGroupItem_Data *data_bt_off; + Setting_GenGroupItem_Data *data_gps_off; + Setting_GenGroupItem_Data *data_sync_off; + Setting_GenGroupItem_Data *data_hotspot_off; + Setting_GenGroupItem_Data *data_adjust_bright; + Setting_GenGroupItem_Data *data_brightness; + + Setting_GenGroupItem_Data *data_br_auto; + Setting_GenGroupItem_Data *data_br_sli; + +}; + +extern setting_view setting_view_powersaving_main; +extern setting_view setting_view_powersaving_customed; +extern setting_view setting_view_powersaving_about; +extern setting_view setting_view_powersaving_brightness; +extern void setting_powersaving_ug_exp_cb(void *data, Evas_Object *obj, void *event_info); +extern char *setting_powersaving_ug_get_brightness_str(); + +#endif /* __SETTING_POWERSAVING_H__ */ diff --git a/setting-powersaving/src/setting-powersaving-about.c b/setting-powersaving/src/setting-powersaving-about.c new file mode 100755 index 0000000..c87513d --- /dev/null +++ b/setting-powersaving/src/setting-powersaving-about.c @@ -0,0 +1,219 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#if SUPPORT_UI0_4 +#define CPU_PS_DESC_DETAIL "IDS_ST_BODY_THIS_OPTION_LIMITS_THE_MAXIMUM_CPU_PERFORMANCE_AND_HELPS_TO_CONSERVE_BATTERY_LIFE_IT_WILL_NOT_EFFECT_NORMAL_USAGE_LIKE_BROWSING_AND_VIDEO_PLAYBACK_MSG" +#define CPU_PS_DESC KeyStr_CPU_PS + +#define DISPLAY_PS_DESC_DETAIL "IDS_ST_BODY_THIS_OPTION_REDUCES_THE_SCREEN_FRAME_RATE_AND_LOWERS_THE_BRIGHTNESS_IT_HELPS_TO_EXTEND_BATTERY_LIFE_WHEN_THE_SCREEN_IS_TURNED_ON" +#define DISPLAY_PS_DESC KeyStr_DISPLAY_PS + +#define BG_COLOR_DESC_DETAIL "IDS_ST_BODY_THIS_OPTION_CHANGES_THE_BACKGROUND_COLOUR_BRIGHTNESS_LEVEL_SO_THAT_IT_CONSUMES_LESS_BATTERY_MSG" +#define BG_COLOR_DESC KeyStr_BG_COLOR + +#define VIBRATION_DESC_DETAIL "IDS_ST_BODY_THE_VIBRATE_FUNCTION_USES_ADDITIONAL_BATTERY_POWER" +#define VIBRATION_DESC KeyStr_SCREEN_VIB +#else +#define MAIN_DESC "1. System power saving settings
"\ + "Set system functions below
"\ + " 1.Dual core max
"\ + " 2.Brightness
"\ + " 3.UI rendering speed" + +#define WIFI_DESC "2. Wi-Fi
"\ + "Turn off Wi-Fi, Turning off Wi-Fi can extend battery life, "\ + "However, if you surf the Web frequently, using Wi-Fi can "\ + "save more battery than using the cellular network." + +#define BT_DESC "3. Bluetooth
"\ + "Turn off Bluetooth. Not using Bluetooth headset or Car home "\ + "mode can extend battery life" + +#define GPS_DESC "4. GPS
"\ + "Applications using GPS location data reduce battery life. "\ + "Turning off BDU GPS can extend battery life" + +#define SYNC_DESC "5. Data sync
"\ + "Applications such as Gmail, Calendar, and Twitter are auto"\ + "synced via wireless network at specific intervals. Syncing "\ + "data manually can extend battery life" + +#define HOTSPOT_DESC "6. Portable Wi-Fi hotspot
"\ + "Turn off Portable Wi-Fi hotspot. Sharing mobile internet"\ + " connection with other devices can reduce battery life. "\ + "Turn off portable Wi-Fi hotspot to extend battery life." + +#define BRIGHT_DESC "7. Brightness
"\ + "Lowering the brightness of the screen can extend battery life."\ + "Selecting Automatic brightness will adjust screen brightness"\ + " to ambient automatically" + +#define ETC_DESC "8. Etc.
"\ + "1.Disabling Use packet data(Settings > Wireless and network >"\ + " Mobile networks) helps extend battery.
"\ + "2.Disabling Auto sync (Settings > Account and sync) "\ + "helps extend battery" +#endif +static int setting_powersaving_about_create(void *cb); +static int setting_powersaving_about_destroy(void *cb); +static int setting_powersaving_about_update(void *cb); +static int setting_powersaving_about_cleanup(void *cb); + +setting_view setting_view_powersaving_about = { + .create = setting_powersaving_about_create, + .destroy = setting_powersaving_about_destroy, + .update = setting_powersaving_about_update, + .cleanup = setting_powersaving_about_cleanup, +}; + +/* *************************************************** + * + *basic func + * + ***************************************************/ + +static int setting_powersaving_about_create(void *cb) +{ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPowersavingUG *ad = (SettingPowersavingUG *) cb; + char temp[MAX_COMMON_BUFFER_LEN] ={0,}; + + Evas_Object *genlist; + setting_push_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _(KeyStr_Powersaving_About), + _("IDS_COM_BODY_BACK"), + NULL, + setting_powersaving_about_click_back_cb, + NULL, ad, &genlist, ad->navi_bar); + #if SUPPORT_UI0_4 + Setting_GenGroupItem_Data *item_data = NULL; + snprintf(temp, MAX_COMMON_BUFFER_LEN, "1. %s
%s", _(CPU_PS_DESC), _(CPU_PS_DESC_DETAIL)); + item_data = setting_create_Gendial_field_def(genlist, &itc_multiline_text, + NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, temp, NULL, NULL); + elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + memset(temp, 0x00, MAX_COMMON_BUFFER_LEN); + snprintf(temp, MAX_COMMON_BUFFER_LEN, "2. %s
%s", _(VIBRATION_DESC), _(VIBRATION_DESC_DETAIL)); + item_data = setting_create_Gendial_field_def(genlist, &itc_multiline_text, + NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, temp, NULL, NULL); + elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + #else + setting_create_Gendial_field_def(genlist, &itc_multiline_text, + NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, MAIN_DESC, NULL, NULL); + + setting_create_Gendial_field_def(genlist, &itc_multiline_text, + NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, WIFI_DESC, NULL, NULL); + + setting_create_Gendial_field_def(genlist, &itc_multiline_text, + NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, BT_DESC, NULL, NULL); + + setting_create_Gendial_field_def(genlist, &itc_multiline_text, + NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, GPS_DESC, NULL, NULL); + setting_create_Gendial_field_def(genlist, &itc_multiline_text, NULL, ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, SYNC_DESC, NULL, NULL); + + setting_create_Gendial_field_def(genlist, &itc_multiline_text, + NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, HOTSPOT_DESC, NULL, + NULL); + + setting_create_Gendial_field_def(genlist, &itc_multiline_text, + NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, BRIGHT_DESC, NULL, + NULL); + + setting_create_Gendial_field_def(genlist, &itc_multiline_text, NULL, ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, ETC_DESC, NULL, NULL); + #endif + setting_view_powersaving_about.is_create = 1; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_powersaving_about_destroy(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPowersavingUG *ad = (SettingPowersavingUG *) cb; + + elm_naviframe_item_pop(ad->navi_bar); + setting_view_powersaving_about.is_create = 0; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_powersaving_about_update(void *cb) +{ + return SETTING_RETURN_SUCCESS; +} + +static int setting_powersaving_about_cleanup(void *cb) +{ + return setting_powersaving_about_destroy(cb); +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void +setting_powersaving_about_click_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + /* error check */ + setting_retm_if(data == NULL, " Data parameter is NULL"); + + SettingPowersavingUG *ad = (SettingPowersavingUG *) data; + setting_view_change(&setting_view_powersaving_about, + &setting_view_powersaving_main, ad); +} diff --git a/setting-powersaving/src/setting-powersaving-brightness.c b/setting-powersaving/src/setting-powersaving-brightness.c new file mode 100755 index 0000000..a680504 --- /dev/null +++ b/setting-powersaving/src/setting-powersaving-brightness.c @@ -0,0 +1,286 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 + +#define Left_Bright_Icon IMG_BRIGTHNESS_LEFT +#define Right_Bright_Icon IMG_BRIGHTNESS_RIGHT + +static int setting_powersaving_brightness_create(void *cb); +static int setting_powersaving_brightness_destroy(void *cb); +static int setting_powersaving_brightness_update(void *cb); +static int setting_powersaving_brightness_cleanup(void *cb); + +setting_view setting_view_powersaving_brightness = { + .create = setting_powersaving_brightness_create, + .destroy = setting_powersaving_brightness_destroy, + .update = setting_powersaving_brightness_update, + .cleanup = setting_powersaving_brightness_cleanup, +}; + +/* *************************************************** + * + *basic func + * + ***************************************************/ + +static int setting_powersaving_brightness_create(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPowersavingUG *ad = (SettingPowersavingUG *) cb; + + Evas_Object *navi_bar = ad->navi_bar; + Evas_Object *sub_layout = elm_layout_add(navi_bar); + elm_layout_file_set(sub_layout, SETTING_THEME_EDJ_NAME, + "search_layout"); + + Evas_Object *genlist = elm_genlist_add(ad->win_main_layout); + elm_object_style_set(genlist, "dialogue"); + retvm_if(genlist == NULL, SETTING_RETURN_FAIL, + "Cannot set scroller object as contento of layout"); + elm_genlist_clear(genlist); /* first to clear list */ + + setting_push_layout_navi_bar(_(KeyStr_Brightness), + _("IDS_COM_BODY_BACK"), NULL, NULL, + setting_powersaving_brightness_click_softkey_cancel_cb, + NULL, + NULL, ad, sub_layout, navi_bar, NULL);; + elm_object_part_content_set(sub_layout, "search_list2", genlist); + + int auto_value = 0; + int value = 10; + + Elm_Object_Item *item = NULL;; + + item = + elm_genlist_item_append(genlist, &itc_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + // [control] AUTOMATIC - boolean - vconf + vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BRT_AUTO_STATUS, &auto_value); //if failed, keep intial value + SETTING_TRACE("auto_value:%d", auto_value); + + // [UI] AUTOMATIC - boolean + ad->data_br_auto = + setting_create_Gendial_field_def(genlist, &itc_1text_1icon, + setting_powersaving_brightness_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, auto_value, + "IDS_COM_BODY_AUTOMATIC", NULL, + setting_powersaving_brightness_chk_btn_cb); + if (ad->data_br_auto) { + __BACK_POINTER_SET(ad->data_br_auto); + ad->data_br_auto->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_br_auto is NULL"); + } + + /* check manual */ + vconf_get_int(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BRT_VALUE, &value); //if failed, keep intial value + SETTING_TRACE("auto_value:%d", value); + ad->data_br_sli = + setting_create_Gendial_field_def(genlist, &itc_1icon, NULL, + NULL, SWALLOW_Type_LAYOUT_SLIDER, + Left_Bright_Icon, + Right_Bright_Icon, value, NULL, + NULL, + setting_powersaving_birghtness_bright_slider_value_change_cb); + + if (ad->data_br_sli) { + __BACK_POINTER_SET(ad->data_br_sli); + + ad->data_br_sli->win_main = ad->win_main_layout; + ad->data_br_sli->evas = ad->evas; + ad->data_br_sli->isIndicatorVisible = true; + ad->data_br_sli->slider_min = 1; + ad->data_br_sli->slider_max = 100; + ad->data_br_sli->userdata = ad; + + } else { + SETTING_TRACE_ERROR("ad->data_br_sli is NULL"); + } + + if (auto_value && ad->data_br_sli) { + setting_disable_genlist_item(ad->data_br_sli->item); + } + + setting_view_powersaving_brightness.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int setting_powersaving_brightness_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPowersavingUG *ad = (SettingPowersavingUG *) cb; + elm_naviframe_item_pop(ad->navi_bar); + + setting_view_powersaving_brightness.is_create = 0; + return SETTING_RETURN_SUCCESS; +} + +static int setting_powersaving_brightness_update(void *cb) +{ + SETTING_TRACE_BEGIN; + return SETTING_RETURN_SUCCESS; + +} + +static int setting_powersaving_brightness_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + setting_powersaving_brightness_destroy(cb); + + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void +setting_powersaving_brightness_click_softkey_cancel_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + SettingPowersavingUG *ad = (SettingPowersavingUG *) data; + + setting_view_change(&setting_view_powersaving_brightness, + &setting_view_powersaving_customed, ad); +} + +static void +setting_powersaving_brightness_chk_btn_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + SettingPowersavingUG *ad = list_item->userdata; + list_item->chk_status = elm_check_state_get(obj);/* for genlist update status */ + + int err; + // enable /disable toggle button + if (list_item->chk_status) { + setting_disable_genlist_item(ad->data_br_sli->item); + } else { + setting_enable_genlist_item(ad->data_br_sli->item); + } + + err = vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BRT_AUTO_STATUS, + list_item->chk_status); + + return; +} + +/** + *[UI] 'Automatic' toggle + */ +static void setting_powersaving_brightness_mouse_up_Gendial_list_cb(void *data, + Evas_Object + *obj, + void + *event_info) +{ + /* error check */ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + retm_if(data == NULL, "Invalid argument: data is NULL"); + SettingPowersavingUG *ad = data; + + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + int old_status = elm_check_state_get(list_item->eo_check); + /* new status */ + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + int err; + + if (0 == safeStrCmp("IDS_COM_BODY_AUTOMATIC", list_item->keyStr)) { + err = + vconf_set_bool + (VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BRT_AUTO_STATUS, + list_item->chk_status); + if (err < 0) { + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + return; + } + + if (list_item->chk_status) { + setting_disable_genlist_item(ad->data_br_sli->item); + } else { + setting_enable_genlist_item(ad->data_br_sli->item); + } + } +} + +static void +setting_powersaving_birghtness_bright_slider_value_change_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + int value = 0; + SettingPowersavingUG *ad = NULL; + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + ad = list_item->userdata; + + value = elm_check_state_get(ad->data_br_auto->eo_check); + if (value == 1) { /* it is automatic setting mode, */ + /* do nothing */ + return; + } + + double val = elm_slider_value_get(obj); + value = (int)(val + 0.5); + SETTING_TRACE("value:%d", value); + + int ret = + vconf_set_int(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BRT_VALUE, value); + if (ret < 0) //rollback + { + elm_check_state_set(ad->data_br_auto->eo_check, + ad->data_br_sli->chk_status); + return; + } + ad->data_br_sli->chk_status = value; +} diff --git a/setting-powersaving/src/setting-powersaving-customed.c b/setting-powersaving/src/setting-powersaving-customed.c new file mode 100755 index 0000000..777d14d --- /dev/null +++ b/setting-powersaving/src/setting-powersaving-customed.c @@ -0,0 +1,453 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 + +static int setting_powersaving_customed_create(void *cb); +static int setting_powersaving_customed_destroy(void *cb); +static int setting_powersaving_customed_update(void *cb); +static int setting_powersaving_customed_cleanup(void *cb); + +setting_view setting_view_powersaving_customed = { + .create = setting_powersaving_customed_create, + .destroy = setting_powersaving_customed_destroy, + .update = setting_powersaving_customed_update, + .cleanup = setting_powersaving_customed_cleanup, +}; + +/* *************************************************** + * + *basic func + * + ***************************************************/ + +static int setting_powersaving_customed_create(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPowersavingUG *ad = (SettingPowersavingUG *) cb; + + Evas_Object *scroller = NULL; + + /* add basic layout */ + setting_push_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _(KeyStr_Powersaving_Customed), + _("IDS_COM_BODY_BACK"), + NULL, + setting_powersaving_customed_click_softkey_cancel_cb, + NULL, ad, &scroller, ad->navi_bar); + Elm_Object_Item *item = NULL; + /* add separator */ + item = elm_genlist_item_append(scroller, &itc_seperator, + NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + char *str_value = NULL; +#if SUPPORT_UI0_3 + setting_enable_expandable_genlist(scroller, ad, setting_powersaving_ug_exp_cb,NULL); + str_value = get_pa_powersaving_at_str(); + ad->data_saving_at = + setting_create_Gendial_exp_parent_field(scroller, + &itc_2text_3_parent, + NULL, NULL, + SWALLOW_Type_INVALID, + KeyStr_Powersaving_AT, + str_value); + + if (ad->data_saving_at) { + ad->data_saving_at->int_slp_setting_binded = + INT_SLP_SETTING_POWERSAVING_AT; + } else { + SETTING_TRACE_ERROR("ad->data_back is NULL"); + } + __BACK_POINTER_SET(ad->data_saving_at); + G_FREE(str_value); +#endif + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, + "Turn off each settings when it is not in use.", + NULL, NULL); + elm_genlist_item_select_mode_set(elm_genlist_item_append(scroller, &(itc_seperator), NULL, NULL,ELM_GENLIST_ITEM_NONE, NULL, NULL), + ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + int ret; + int value = 1; + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_WIFI, &value); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + + + ad->data_wifi_off = setting_create_Gendial_field_def(scroller, + &itc_1text_1icon_2, + setting_powersaving_customed_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_1CHECK, + NULL, NULL, value, + KeyStr_WIFI_Off, + NULL, + setting_powersaving_customed_use_chk_btn_cb); + if (ad->data_wifi_off) { + __BACK_POINTER_SET(ad->data_wifi_off); + ad->data_wifi_off->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_use_tilt is NULL"); + } + + value = 1; + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BT, &value); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + + ad->data_bt_off = setting_create_Gendial_field_def(scroller, + &itc_1text_1icon_2, + setting_powersaving_customed_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_1CHECK, + NULL, NULL, value, + KeyStr_BT_Off, NULL, + setting_powersaving_customed_use_chk_btn_cb); + if (ad->data_bt_off) { + __BACK_POINTER_SET(ad->data_bt_off); + ad->data_bt_off->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_use_tilt is NULL"); + } + + value = 1; + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_GPS, &value); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + + ad->data_gps_off = setting_create_Gendial_field_def(scroller, + &itc_1text_1icon_2, + setting_powersaving_customed_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_1CHECK, + NULL, NULL, value, + KeyStr_GPS_Off, + NULL, + setting_powersaving_customed_use_chk_btn_cb); + if (ad->data_gps_off) { + __BACK_POINTER_SET(ad->data_gps_off); + ad->data_gps_off->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_use_tilt is NULL"); + } + value = 1; + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_DATASYNC, &value); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + + ad->data_sync_off = setting_create_Gendial_field_def(scroller, + &itc_1text_1icon_2, + setting_powersaving_customed_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_1CHECK, + NULL, NULL, value, + KeyStr_SYNC_Off, + NULL, + setting_powersaving_customed_use_chk_btn_cb); + if (ad->data_sync_off) { + __BACK_POINTER_SET(ad->data_sync_off); + ad->data_sync_off->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_use_tilt is NULL"); + } + + value = 1; + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_HOTSPOT, &value); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + + ad->data_hotspot_off = setting_create_Gendial_field_def(scroller, + &itc_1text_1icon_2, + setting_powersaving_customed_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_1CHECK, + NULL, NULL, value, + KeyStr_HOTSPOT_Off, + NULL, + setting_powersaving_customed_use_chk_btn_cb); + if (ad->data_hotspot_off) { + __BACK_POINTER_SET(ad->data_hotspot_off); + ad->data_hotspot_off->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_use_tilt is NULL"); + } + + /* add separator */ + item = elm_genlist_item_append(scroller, &itc_seperator, + NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* ADJUST BRIGHTNESS */ + int adjust_value; + value = 1; + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BRT_STATUS, &value); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + adjust_value = value; + + ad->data_adjust_bright = setting_create_Gendial_field_def(scroller, + &itc_1text_1icon, + setting_powersaving_customed_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_1TOGGLE, + NULL, NULL, value, + KeyStr_Adjust_Bright, + NULL, + setting_powersaving_customed_use_chk_btn_cb); + if (ad->data_adjust_bright) { + __BACK_POINTER_SET(ad->data_adjust_bright); + ad->data_adjust_bright->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_use_tilt is NULL"); + } + + + /* BRIGHTNESS */ + str_value = setting_powersaving_ug_get_brightness_str(); + ad->data_brightness = + setting_create_Gendial_field_def(scroller, &itc_2text_3, + setting_powersaving_customed_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, KeyStr_Brightness, + str_value, NULL); + if (ad->data_brightness) { + ad->data_brightness->userdata = ad; + __BACK_POINTER_SET(ad->data_screen_timeout); + } else { + SETTING_TRACE_ERROR("ad->data_br is NULL"); + } + G_FREE(str_value); + + + /* add separator */ + item = elm_genlist_item_append(scroller, &itc_seperator, + NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + + /* BACKLIGHT */ + str_value = get_pa_screen_timeout_str(); + ad->data_screen_timeout = + setting_create_Gendial_exp_parent_field(scroller, + &itc_2text_3_parent, + NULL, NULL, + SWALLOW_Type_INVALID, + KeyStr_Screen_Timeout, + str_value); + + if (ad->data_screen_timeout) { + ad->data_screen_timeout->int_slp_setting_binded = + INT_SLP_SETTING_POWERSAVING_SCREEN_TIMEOUT; + } else { + SETTING_TRACE_ERROR("ad->data_back is NULL"); + } + __BACK_POINTER_SET(ad->data_screen_timeout); + G_FREE(str_value); + + if (!adjust_value && ad->data_brightness) { + setting_disable_genlist_item(ad->data_brightness->item); + } + + setting_view_powersaving_customed.is_create = 1; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_powersaving_customed_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPowersavingUG *ad = (SettingPowersavingUG *) cb; + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + + elm_naviframe_item_pop(ad->navi_bar); + + setting_view_powersaving_customed.is_create = 0; + return SETTING_RETURN_SUCCESS; +} + +static int setting_powersaving_customed_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SettingPowersavingUG *ad = (SettingPowersavingUG *) cb; + if (ad->data_brightness) + { + ad->data_brightness->sub_desc = setting_powersaving_ug_get_brightness_str(); + elm_object_item_data_set(ad->data_brightness->item, ad->data_brightness); + elm_genlist_item_update(ad->data_brightness->item); + } + return SETTING_RETURN_SUCCESS; + +} + +static int setting_powersaving_customed_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + setting_powersaving_customed_destroy(cb); + + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void +setting_powersaving_customed_click_softkey_cancel_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + SettingPowersavingUG *ad = (SettingPowersavingUG *) data; + + setting_view_change(&setting_view_powersaving_customed, + &setting_view_powersaving_main, ad); + +} + +static void setting_powersaving_customed_mouse_up_Gendial_list_cb(void *data, + Evas_Object * + obj, void + *event_info) +{ + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + SettingPowersavingUG *ad = (SettingPowersavingUG *) data; + + SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); + + if (!safeStrCmp(KeyStr_Brightness, list_item->keyStr)) { + setting_view_change(&setting_view_powersaving_customed, + &setting_view_powersaving_brightness, ad); + return; + } + + const char *vconf = NULL; + if (!safeStrCmp(KeyStr_WIFI_Off, list_item->keyStr)) { + vconf = VCONFKEY_SETAPPL_PWRSV_CUSTMODE_WIFI; + } else if (!safeStrCmp(KeyStr_BT_Off, list_item->keyStr)) { + vconf = VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BT; + } else if (!safeStrCmp(KeyStr_GPS_Off, list_item->keyStr)) { + vconf = VCONFKEY_SETAPPL_PWRSV_CUSTMODE_GPS; + } else if (!safeStrCmp(KeyStr_SYNC_Off, list_item->keyStr)) { + vconf = VCONFKEY_SETAPPL_PWRSV_CUSTMODE_DATASYNC; + } else if (!safeStrCmp(KeyStr_HOTSPOT_Off, list_item->keyStr)) { + vconf = VCONFKEY_SETAPPL_PWRSV_CUSTMODE_HOTSPOT; + } else if (!safeStrCmp(KeyStr_Adjust_Bright, list_item->keyStr)) { + vconf = VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BRT_STATUS; + } + int old_status = elm_check_state_get(list_item->eo_check); + int ret = vconf_set_bool(vconf, !old_status); + setting_retm_if(0 != ret, "Failed to set vconf [%s]", vconf); + /* new status */ + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + if (!safeStrCmp(KeyStr_Adjust_Bright, list_item->keyStr) && ad->data_brightness) { + if (0 == list_item->chk_status) { + setting_disable_genlist_item(ad->data_brightness->item); + } else { + setting_enable_genlist_item(ad->data_brightness->item); + } + } + + return; +} + +static void +setting_powersaving_customed_use_chk_btn_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + SettingPowersavingUG *ad = list_item->userdata; + + list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */ + + const char *vconf = NULL; + if (!safeStrCmp(KeyStr_WIFI_Off, list_item->keyStr)) { + vconf = VCONFKEY_SETAPPL_PWRSV_CUSTMODE_WIFI; + } else if (!safeStrCmp(KeyStr_BT_Off, list_item->keyStr)) { + vconf = VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BT; + } else if (!safeStrCmp(KeyStr_GPS_Off, list_item->keyStr)) { + vconf = VCONFKEY_SETAPPL_PWRSV_CUSTMODE_GPS; + } else if (!safeStrCmp(KeyStr_SYNC_Off, list_item->keyStr)) { + vconf = VCONFKEY_SETAPPL_PWRSV_CUSTMODE_DATASYNC; + } else if (!safeStrCmp(KeyStr_HOTSPOT_Off, list_item->keyStr)) { + vconf = VCONFKEY_SETAPPL_PWRSV_CUSTMODE_HOTSPOT; + } else if (!safeStrCmp(KeyStr_Adjust_Bright, list_item->keyStr)) { + vconf = VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BRT_STATUS; + } + + int err = vconf_set_bool(vconf, list_item->chk_status); + if (0 != err) { /* rollback */ + SETTING_TRACE_ERROR("Set vconf Failed"); + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + } + if (!safeStrCmp(KeyStr_Adjust_Bright, list_item->keyStr) && ad->data_brightness) { + if (0 == list_item->chk_status) { + setting_disable_genlist_item(ad->data_brightness->item); + } else { + setting_enable_genlist_item(ad->data_brightness->item); + } + } + + return; +} diff --git a/setting-powersaving/src/setting-powersaving-main.c b/setting-powersaving/src/setting-powersaving-main.c new file mode 100755 index 0000000..e927f67 --- /dev/null +++ b/setting-powersaving/src/setting-powersaving-main.c @@ -0,0 +1,939 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +//#include +#include + +static int setting_powersaving_main_create(void *cb); +static int setting_powersaving_main_destroy(void *cb); +static int setting_powersaving_main_update(void *cb); +static int setting_powersaving_main_cleanup(void *cb); +static void setting_powersaving_view_disable(void *data, bool disable); + +setting_view setting_view_powersaving_main = { + .create = setting_powersaving_main_create, + .destroy = setting_powersaving_main_destroy, + .update = setting_powersaving_main_update, + .cleanup = setting_powersaving_main_cleanup, +}; + +static void __setting_powersaving_main_vconf_change_cb(keynode_t *key, void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == key, "key is NULL"); + setting_retm_if(NULL == data, "data is NULL"); + SettingPowersavingUG *ad = (SettingPowersavingUG *)data; + + int status = vconf_keynode_get_bool(key); + char *vconf_name = vconf_keynode_get_name(key); + + if (!safeStrCmp(vconf_name, VCONFKEY_SETAPPL_PWRSV_SYSMODE_STATUS)) { + SETTING_TRACE("status:%d", status); + setting_powersaving_view_disable(ad, !status); + ad->data_powersaving_active->chk_status = status; + elm_check_state_set(ad->data_powersaving_active->eo_check, ad->data_powersaving_active->chk_status); + int ret = 0; + if (status) {//powersaving is on + int pwrsv_vib = 0; + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_SCREEN_VIB, &pwrsv_vib); + setting_retm_if(ret != 0, "get vconf failed"); + if (pwrsv_vib){ + //touch feedback virbration + int value = 0; + ret = vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, &value); + setting_retm_if(ret != 0, "get vconf failed"); + ret = vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, value);//backup + setting_retm_if(ret != 0, "set vconf failed"); + ret = vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, 0); + setting_retm_if(ret != 0, "set vconf failed"); + } + } else {//powersaving is off + //touch feedback virbration + int value = 0; + ret = vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, &value); + setting_retm_if(ret != 0, "get vconf failed"); + ret = vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, value); + setting_retm_if(ret != 0, "set vconf failed"); + } + + } else { + SETTING_TRACE_ERROR("vconf_name is wrong"); + } +} + + +/* *************************************************** + * + *basic func + * + ***************************************************/ +static int setting_powersaving_main_create(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPowersavingUG *ad = (SettingPowersavingUG *) cb; + Evas_Object *scroller = NULL; + + /* add basic layout */ + ad->ly_main = + setting_create_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _(KeyStr_Powersaving), + _("IDS_COM_BODY_BACK"), NULL, + setting_powersaving_main_click_softkey_back_cb, + NULL, ad, &scroller, + &(ad->navi_bar)); + Elm_Object_Item *item = NULL;; + /* add separator */ + item = elm_genlist_item_append(scroller, &itc_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* Powersaving Mode Activation */ + int ret; + int value = 1; + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_SYSMODE_STATUS, &value); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + int active_value = value; + + ad->data_powersaving_active = setting_create_Gendial_field_def(scroller, + &itc_1text_1icon, + setting_powersaving_main_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_1TOGGLE, + NULL, + NULL, + value, + KeyStr_Powersaving_Mode, + NULL, + setting_powersaving_main_motion_active_chk_btn_cb); + if (ad->data_powersaving_active) { + __BACK_POINTER_SET(ad->data_powersaving_active); + ad->data_powersaving_active->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_powersaving_active is NULL"); + } +#if SUPPORT_UI0_4 + (void)setting_create_Gendial_field_titleItem(scroller, + &itc_group_item, + KeyStr_PS_SETTINGS, + NULL); + //A. + value = 0; + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_CPU, &value); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + ad->data_cpu_ps = setting_create_Gendial_field_def(scroller, + &itc_1text_1icon, + setting_powersaving_main_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_1TOGGLE, + NULL, + NULL, + value, + KeyStr_CPU_PS, + NULL, + setting_powersaving_main_motion_active_chk_btn_cb); + if (ad->data_cpu_ps) { + __BACK_POINTER_SET(ad->data_cpu_ps); + ad->data_cpu_ps->userdata = ad; + } + + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, + KeyStr_CPU_PS_DSC, NULL, + NULL); + elm_genlist_item_select_mode_set(elm_genlist_item_append(scroller, &(itc_seperator), NULL, NULL,ELM_GENLIST_ITEM_NONE, NULL, NULL), + ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + +#if DISABLED_CODE + //B. + value = 0; + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_DISPLAY, &value); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + ad->data_display_ps = setting_create_Gendial_field_def(scroller, + &itc_1text_1icon, + setting_powersaving_main_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_1TOGGLE, + NULL, + NULL, + value, + KeyStr_DISPLAY_PS, + NULL, + setting_powersaving_main_motion_active_chk_btn_cb); + if (ad->data_display_ps) { + __BACK_POINTER_SET(ad->data_display_ps); + ad->data_display_ps->userdata = ad; + } + + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, + KeyStr_DISPLAY_PS_DSC, NULL, + NULL); + elm_genlist_item_select_mode_set(elm_genlist_item_append(scroller, &(itc_seperator), NULL, NULL,ELM_GENLIST_ITEM_NONE, NULL, NULL), + ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + //C. + value = 0; + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BG_COLOR, &value); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + ad->data_bg_color = setting_create_Gendial_field_def(scroller, + &itc_1text_1icon, + setting_powersaving_main_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_1TOGGLE, + NULL, + NULL, + value, + KeyStr_BG_COLOR, + NULL, + setting_powersaving_main_motion_active_chk_btn_cb); + if (ad->data_bg_color) { + __BACK_POINTER_SET(ad->data_bg_color); + ad->data_bg_color->userdata = ad; + } + + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, + KeyStr_BG_COLOR_DSC, NULL, + NULL); + elm_genlist_item_select_mode_set(elm_genlist_item_append(scroller, &(itc_seperator), NULL, NULL,ELM_GENLIST_ITEM_NONE, NULL, NULL), + ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); +#endif + + //D. + value = 0; + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_SCREEN_VIB, &value); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + ad->data_screen_vib = setting_create_Gendial_field_def(scroller, + &itc_1text_1icon, + setting_powersaving_main_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_1TOGGLE, + NULL, + NULL, + value, + KeyStr_SCREEN_VIB, + NULL, + setting_powersaving_main_motion_active_chk_btn_cb); + if (ad->data_screen_vib) { + __BACK_POINTER_SET(ad->data_screen_vib); + ad->data_screen_vib->userdata = ad; + } + + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, + KeyStr_SCREEN_VIB_DSC, NULL, + NULL); + /****Powersaving Tips*/ + (void)setting_create_Gendial_field_titleItem(scroller, + &itc_group_item, + KeyStr_Powersaving_Tips, + NULL); + + /****Customed Setting*/ + ad->data_powersaving_about = + setting_create_Gendial_field_def(scroller, &itc_1text, + setting_powersaving_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, KeyStr_Powersaving_About, + NULL, NULL); + __BACK_POINTER_SET(ad->data_powersaving_about); + + item = elm_genlist_item_append(scroller, &itc_bottom_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + setting_powersaving_view_disable(ad, !active_value); +#else +#if SUPPORT_UI0_3 + /****Powersaving Mode description*/ + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, + KeyStr_Powersaving_Mode_DSC, NULL, + NULL); + elm_genlist_item_select_mode_set(elm_genlist_item_append(scroller, &(itc_seperator), NULL, NULL,ELM_GENLIST_ITEM_NONE, NULL, NULL), + ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + /****customed Setting Mode active*/ + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_STATUS, &value); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + bool customed_flag = (bool) value; + ad->data_customed_active = setting_create_Gendial_field_def(scroller, + &itc_1text_1icon, + setting_powersaving_main_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_1TOGGLE, + NULL, NULL, + value, + KeyStr_Powersaving_Customed_Mode, + NULL, + setting_powersaving_main_motion_active_chk_btn_cb); + if (ad->data_customed_active) { + __BACK_POINTER_SET(ad->data_customed_active); + ad->data_customed_active->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_powersaving_active is NULL"); + } +#else + setting_enable_expandable_genlist(scroller, ad, setting_powersaving_ug_exp_cb,NULL); + char *str_value = get_pa_powersaving_at_str(); + ad->data_saving_at = + setting_create_Gendial_exp_parent_field(scroller, + &itc_2text_3_parent, + NULL, NULL, + SWALLOW_Type_INVALID, + KeyStr_Powersaving_AT, + str_value); + + if (ad->data_saving_at) { + ad->data_saving_at->int_slp_setting_binded = + INT_SLP_SETTING_POWERSAVING_AT; + } else { + SETTING_TRACE_ERROR("ad->data_back is NULL"); + } + __BACK_POINTER_SET(ad->data_saving_at); + G_FREE(str_value); +#endif + /****Customed Setting*/ + ad->data_customed_setting = + setting_create_Gendial_field_def(scroller, &itc_1text, + setting_powersaving_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, + KeyStr_Powersaving_Customed, NULL, + NULL); + __BACK_POINTER_SET(ad->data_customed_setting); + + /* Powersaving and battery level Description */ + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, + KeyStr_Powersaving_Level_DSC, NULL, + NULL); + + /****Powersaving Tips*/ + (void)setting_create_Gendial_field_titleItem(scroller, + &itc_group_item, + KeyStr_Powersaving_Tips, + NULL); + + /****Customed Setting*/ + ad->data_powersaving_about = + setting_create_Gendial_field_def(scroller, &itc_1text, + setting_powersaving_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, KeyStr_Powersaving_About, + NULL, NULL); + __BACK_POINTER_SET(ad->data_powersaving_about); +#if SUPPORT_UI0_3 + if (!customed_flag && ad->data_customed_setting) { + setting_disable_genlist_item(ad->data_customed_setting->item); + } +#else + if (!active_value) + { + if (ad->data_saving_at) { + setting_disable_genlist_item(ad->data_saving_at->item); + } + + if (ad->data_customed_setting) { + setting_disable_genlist_item(ad->data_customed_setting->item); + } + } +#endif +#endif + + ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_PWRSV_SYSMODE_STATUS, + __setting_powersaving_main_vconf_change_cb, ad); + if (ret != 0) { + SETTING_TRACE_ERROR("call vconf_notify_key_changed failed"); + } + + setting_view_powersaving_main.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + + +static int setting_powersaving_main_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPowersavingUG *ad = (SettingPowersavingUG *) cb; + + int ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_PWRSV_SYSMODE_STATUS, + __setting_powersaving_main_vconf_change_cb); + if (ret != 0) { + SETTING_TRACE_ERROR("call vconf_ignore_key_changed failed"); + } + + if (ad->ly_main != NULL) { + evas_object_del(ad->ly_main); + setting_view_powersaving_main.is_create = 0; + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_powersaving_main_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + return SETTING_RETURN_SUCCESS; +} + +static int setting_powersaving_main_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *general func + * + ***************************************************/ +static void +__powersaving_on_resp_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == data, "NULL == data"); + int response_type = btn_type(obj); + SettingPowersavingUG *ad = (SettingPowersavingUG *) data; + if (POPUP_RESPONSE_OK == response_type) { //need set vconf + if (ad->data_powersaving_active) { + int err = + vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_SYSMODE_STATUS, + ad->data_powersaving_active->chk_status); + if (0 != err) { //if set failed, need rollback + SETTING_TRACE_ERROR("Set vconf Failed"); + ad->data_powersaving_active->chk_status = + !ad->data_powersaving_active->chk_status; + elm_check_state_set(ad-> + data_powersaving_active-> + eo_check, + ad-> + data_powersaving_active-> + chk_status); + return; + } + if (ad->data_powersaving_active->chk_status) {//powersaving is on + int pwrsv_vib = 0; + vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_SCREEN_VIB, &pwrsv_vib); + if (pwrsv_vib){ + //touch feedback virbration + int value = 0; + vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, &value); + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, value);//backup + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, 0); + } + } else {//powersaving is off + //touch feedback virbration + int value = 0; + vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, &value); + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, value); + } + + if (ad->popup_chk && elm_check_state_get(ad->popup_chk)) { + (void) + vconf_set_bool + (VCONFKEY_SETAPPL_PWRSV_SYSMODE_STATUS_REMINDER, + FALSE); + } + } + } else if (POPUP_RESPONSE_CANCEL == response_type) { //need rollback + if (ad->data_powersaving_active) { + ad->data_powersaving_active->chk_status = + !ad->data_powersaving_active->chk_status; + elm_check_state_set(ad->data_powersaving_active-> + eo_check, + ad->data_powersaving_active-> + chk_status); + if (ad->data_saving_at) { + setting_disable_genlist_item(ad->data_saving_at->item); + } + if (ad->data_customed_setting) { + setting_disable_genlist_item(ad->data_customed_setting->item); + } + if (ad->data_cpu_ps) { + setting_disable_genlist_item(ad->data_cpu_ps->item); + } + if (ad->data_display_ps) { + setting_disable_genlist_item(ad->data_display_ps->item); + } + if (ad->data_bg_color) { + setting_disable_genlist_item(ad->data_bg_color->item); + } + if (ad->data_screen_vib) { + setting_disable_genlist_item(ad->data_screen_vib->item); + } + } + } + + evas_object_del(ad->popup); + ad->popup = NULL; + ad->popup_chk = NULL; +} + +static void +setting_powersaving_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + SettingPowersavingUG *ad = (SettingPowersavingUG *) data; + + SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); + + if (!safeStrCmp(KeyStr_Powersaving_Mode, list_item->keyStr)) { + list_item->chk_status = + !elm_check_state_get(list_item->eo_check); + elm_check_state_set(list_item->eo_check, list_item->chk_status); + + setting_powersaving_view_disable(ad, !list_item->chk_status); + + int reminder_flag = TRUE; + int ret = + vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_SYSMODE_STATUS_REMINDER, + &reminder_flag); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + SETTING_TRACE("reminder_flag:%d", reminder_flag); + if (list_item->chk_status && reminder_flag) { + ad->popup = + setting_create_popup_with_image_check(ad, ad->win_get, + NULL, + _(POWERSAVING_REMINDER), NULL,NULL, + _(NEVER_SHOW_AGAIN), + &(ad->popup_chk), + __powersaving_on_resp_cb, + 0, + 2, _("IDS_COM_SK_OK"), + _("IDS_COM_SK_CANCEL")); + return; + } + ret = + vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_SYSMODE_STATUS, list_item->chk_status); + if (0 != ret) { /* rollback */ + SETTING_TRACE_ERROR("Set vconf Failed"); + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(list_item->eo_check, + list_item->chk_status); + return; + } + if (list_item->chk_status) {//powersaving is on + int pwrsv_vib = 0; + vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_SCREEN_VIB, &pwrsv_vib); + if (pwrsv_vib){ + //touch feedback virbration + int value = 0; + vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, &value); + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, value);//backup + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, 0); + } + } else {//powersaving is off + //touch feedback virbration + int value = 0; + vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, &value); + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, value); + } + + } + else if (!safeStrCmp(KeyStr_Powersaving_Customed_Mode, list_item->keyStr)) { + int old_status = elm_check_state_get(list_item->eo_check); + int ret = vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_STATUS, !old_status); + setting_retm_if(0 != ret, "Failed to set vconf [%s]", + VCONFKEY_SETAPPL_PWRSV_CUSTMODE_STATUS); + /* new status */ + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + if (0 == list_item->chk_status) { + //not active + if (ad->data_customed_setting) { + setting_disable_genlist_item(ad->data_customed_setting->item); + } + } else { + //Powersavings actived + if (ad->data_customed_setting) { + setting_enable_genlist_item(ad->data_customed_setting->item); + } + } + } + else if (!safeStrCmp(KeyStr_Powersaving_Customed, list_item->keyStr)) { + setting_view_change(&setting_view_powersaving_main, + &setting_view_powersaving_customed, ad); + } else if (!safeStrCmp(KeyStr_Powersaving_About, list_item->keyStr)) { + setting_view_change(&setting_view_powersaving_main, + &setting_view_powersaving_about, ad); + } + else if(!safeStrCmp(KeyStr_CPU_PS, list_item->keyStr)) + { + list_item->chk_status = + !elm_check_state_get(list_item->eo_check); + elm_check_state_set(list_item->eo_check, list_item->chk_status); + int err = vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_CPU, list_item->chk_status); + if (0 != err) { + /* rollback */ + SETTING_TRACE_ERROR("Set vconf Failed"); + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + return; + } + } + else if(!safeStrCmp(KeyStr_DISPLAY_PS, list_item->keyStr)) + { + list_item->chk_status = + !elm_check_state_get(list_item->eo_check); + elm_check_state_set(list_item->eo_check, list_item->chk_status); + int err = vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_DISPLAY, list_item->chk_status); + if (0 != err) { + /* rollback */ + SETTING_TRACE_ERROR("Set vconf Failed"); + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + return; + } + } + else if(!safeStrCmp(KeyStr_BG_COLOR, list_item->keyStr)) + { + list_item->chk_status = + !elm_check_state_get(list_item->eo_check); + elm_check_state_set(list_item->eo_check, list_item->chk_status); + int err = vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BG_COLOR, list_item->chk_status); + if (0 != err) { + /* rollback */ + SETTING_TRACE_ERROR("Set vconf Failed"); + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + return; + } + } + else if(!safeStrCmp(KeyStr_SCREEN_VIB, list_item->keyStr)) + { + list_item->chk_status = + !elm_check_state_get(list_item->eo_check); + elm_check_state_set(list_item->eo_check, list_item->chk_status); + int err = vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_SCREEN_VIB, list_item->chk_status); + if (0 != err) { + /* rollback */ + SETTING_TRACE_ERROR("Set vconf Failed"); + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + return; + } + + //take it into effect + int value = 0; + if (list_item->chk_status){ + //touch feedback virbration + vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, &value); + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, value);//backup + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, 0); + } else { + //touch feedback virbration + vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, &value); + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, value); + } + } +} + +static void __setting_powersaving_main_popup_rsp_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingPowersavingUG *ad = (SettingPowersavingUG *) data; + + if (obj) { + evas_object_del(obj); + obj = NULL; + } + ad->popup = NULL; + + int ret = vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_SYSMODE_STATUS, 0); + setting_retm_if(0 != ret, "Failed to set vconf value"); +} + +static void +setting_powersaving_main_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "[Setting > Powersaving] Data parameter is NULL"); + SettingPowersavingUG *ad = (SettingPowersavingUG *) data; + + int ret = 0; + int value = 0; + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_SYSMODE_STATUS, &value); + setting_retm_if(0 != ret, "Failed to get vconf value"); + + if (value) { + int sub_item_value = 0; + + /* check VCONFKEY_SETAPPL_PWRSV_CUSTMODE_CPU */ + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_CPU, &sub_item_value); + setting_retm_if(0 != ret, "Failed to get vconf value"); + if (sub_item_value) { + ug_destroy_me(ad->ug); + return; + } + + /* check VCONFKEY_SETAPPL_PWRSV_CUSTMODE_DISPLAY */ + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_DISPLAY, &sub_item_value); + setting_retm_if(0 != ret, "Failed to get vconf value"); + if (sub_item_value) { + ug_destroy_me(ad->ug); + return; + } + + /* check VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BG_COLOR */ + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BG_COLOR, &sub_item_value); + setting_retm_if(0 != ret, "Failed to get vconf value"); + if (sub_item_value) { + ug_destroy_me(ad->ug); + return; + } + + /* check VCONFKEY_SETAPPL_PWRSV_CUSTMODE_SCREEN_VIB */ + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_SCREEN_VIB, &sub_item_value); + setting_retm_if(0 != ret, "Failed to get vconf value"); + if (sub_item_value) { + ug_destroy_me(ad->ug); + return; + } + + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, NULL, _(SETTING_POWERSAVING_ALL_SUB_ITEMS_OFF), + __setting_powersaving_main_popup_rsp_cb, POPUP_INTERVAL, TRUE, TRUE); + } else { + /* Send destroy request */ + ug_destroy_me(ad->ug); + } +} + +static void +setting_powersaving_main_motion_active_chk_btn_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + SettingPowersavingUG *ad = list_item->userdata; + list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */ + if (!safeStrCmp(KeyStr_Powersaving_Mode, list_item->keyStr)) { + setting_powersaving_view_disable(ad, !list_item->chk_status); + int reminder_flag = TRUE; + int ret = + vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_SYSMODE_STATUS_REMINDER, + &reminder_flag); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + SETTING_TRACE("reminder_flag:%d", reminder_flag); + if (list_item->chk_status && reminder_flag) { + ad->popup = + setting_create_popup_with_image_check(ad, ad->win_get, + NULL, + _(POWERSAVING_REMINDER), NULL,NULL, + _(NEVER_SHOW_AGAIN), + &(ad->popup_chk), + __powersaving_on_resp_cb, + 0, + 2, _("IDS_COM_SK_OK"), + _("IDS_COM_SK_CANCEL")); + return; + } + + ret = + vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_SYSMODE_STATUS, + list_item->chk_status); + if (0 != ret) { /* rollback */ + SETTING_TRACE_ERROR("Set vconf Failed"); + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + return; + } + if (list_item->chk_status) {//powersaving is on + int pwrsv_vib = 0; + vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_SCREEN_VIB, &pwrsv_vib); + if (pwrsv_vib){ + //touch feedback virbration + int value = 0; + vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, &value); + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, value);//backup + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, 0); + } + } else {//powersaving is off + //touch feedback virbration + int value = 0; + vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, &value); + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, value); + } + } + else if(!safeStrCmp(KeyStr_Powersaving_Customed_Mode, list_item->keyStr)) + { + int err = vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_STATUS, + list_item->chk_status); + if (0 != err) { + /* rollback */ + SETTING_TRACE_ERROR("Set vconf Failed"); + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + return; + } + if (0 == list_item->chk_status) { + //not active + if (ad->data_customed_setting) + { + setting_disable_genlist_item(ad->data_customed_setting->item); + } + } else { + //Powersavings actived + if (ad->data_customed_setting) { + setting_enable_genlist_item(ad->data_customed_setting->item); + } + } + } + else if(!safeStrCmp(KeyStr_CPU_PS, list_item->keyStr)) + { + int err = vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_CPU, list_item->chk_status); + if (0 != err) { + /* rollback */ + SETTING_TRACE_ERROR("Set vconf Failed"); + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + return; + } + } + else if(!safeStrCmp(KeyStr_DISPLAY_PS, list_item->keyStr)) + { + int err = vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_DISPLAY, list_item->chk_status); + if (0 != err) { + /* rollback */ + SETTING_TRACE_ERROR("Set vconf Failed"); + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + return; + } + } + else if(!safeStrCmp(KeyStr_BG_COLOR, list_item->keyStr)) + { + int err = vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BG_COLOR, list_item->chk_status); + if (0 != err) { + /* rollback */ + SETTING_TRACE_ERROR("Set vconf Failed"); + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + return; + } + if (list_item->chk_status) + { + // do nothing + } + } + else if(!safeStrCmp(KeyStr_SCREEN_VIB, list_item->keyStr)) + { + int err = vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_SCREEN_VIB, list_item->chk_status); + if (0 != err) { + /* rollback */ + SETTING_TRACE_ERROR("Set vconf Failed"); + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + return; + } + + //take it into effect + int value = 0; + if (list_item->chk_status){ + //touch feedback virbration + vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, &value); + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, value);//backup + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, 0); + } else { + //touch feedback virbration + vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, &value); + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, value); + } + } + + + return; +} +static void setting_powersaving_view_disable(void *data, bool disable) +{ + SETTING_TRACE_BEGIN; + /* error check */ + ret_if(data == NULL); + SettingPowersavingUG *ad = (SettingPowersavingUG *) data; + if (disable) + { + if (ad->data_cpu_ps) setting_disable_genlist_item(ad->data_cpu_ps->item); + if (ad->data_display_ps) setting_disable_genlist_item(ad->data_display_ps->item); + if (ad->data_bg_color) setting_disable_genlist_item(ad->data_bg_color->item); + if (ad->data_screen_vib) setting_disable_genlist_item(ad->data_screen_vib->item); + } + else + { + if (ad->data_cpu_ps) setting_enable_genlist_item(ad->data_cpu_ps->item); + if (ad->data_display_ps) setting_enable_genlist_item(ad->data_display_ps->item); + if (ad->data_bg_color) setting_enable_genlist_item(ad->data_bg_color->item); + if (ad->data_screen_vib) setting_enable_genlist_item(ad->data_screen_vib->item); + } +} + diff --git a/setting-powersaving/src/setting-powersaving.c b/setting-powersaving/src/setting-powersaving.c new file mode 100755 index 0000000..e420c56 --- /dev/null +++ b/setting-powersaving/src/setting-powersaving.c @@ -0,0 +1,340 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 + +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif + +static void setting_powersaving_ug_cb_resize(void *data, Evas *e, + Evas_Object *obj, + void *event_info) +{ + SettingPowersavingUG *ad = (SettingPowersavingUG *) data; + setting_view_update(&setting_view_powersaving_main, ad); +} + +static void *setting_powersaving_ug_on_create(ui_gadget_h ug, + enum ug_mode mode, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if((!priv), NULL, "!priv"); + + SettingPowersavingUG *powersavingUG = priv; + powersavingUG->ug = ug; + setting_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR); + + powersavingUG->win_main_layout = + (Evas_Object *) ug_get_parent_layout(ug); + powersavingUG->win_get = (Evas_Object *) ug_get_window(); + + evas_object_show(powersavingUG->win_main_layout); + powersavingUG->evas = + evas_object_evas_get(powersavingUG->win_main_layout); + + setting_retvm_if(powersavingUG->win_main_layout == NULL, NULL, + "cannot get main window "); + + /* register view node table */ + setting_view_node_table_intialize(); /* do detail registering in __get_motion_view_to_load() */ + + /* creating a view. */ + setting_view_node_table_register(&setting_view_powersaving_main, NULL); + setting_view_node_table_register(&setting_view_powersaving_about, + &setting_view_powersaving_main); + setting_view_node_table_register(&setting_view_powersaving_customed, + &setting_view_powersaving_main); + setting_view_node_table_register(&setting_view_powersaving_brightness, + &setting_view_powersaving_customed); + + setting_view_node_set_cur_view(&setting_view_powersaving_main); + setting_view_create(&setting_view_powersaving_main, + (void *)powersavingUG); + evas_object_event_callback_add(powersavingUG->win_main_layout, + EVAS_CALLBACK_RESIZE, + setting_powersaving_ug_cb_resize, + powersavingUG); + return powersavingUG->ly_main; +} + +static void setting_powersaving_ug_on_start(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_powersaving_ug_on_pause(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_powersaving_ug_on_resume(ui_gadget_h ug, + service_h service, void *priv) +{ +} + +static void setting_powersaving_ug_on_destroy(ui_gadget_h ug, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if((!priv), "!priv"); + SettingPowersavingUG *powersavingUG = priv; + + evas_object_event_callback_del(powersavingUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_powersaving_ug_cb_resize); /* fix flash issue for gallery */ + powersavingUG->ug = ug; + /* called when this shared gadget is terminated. similar with app_exit */ + setting_view_destroy(&setting_view_powersaving_brightness, + powersavingUG); + setting_view_destroy(&setting_view_powersaving_customed, powersavingUG); + setting_view_destroy(&setting_view_powersaving_about, powersavingUG); + setting_view_destroy(&setting_view_powersaving_main, powersavingUG); + + if (NULL != ug_get_layout(powersavingUG->ug)) { + evas_object_hide((Evas_Object *) + ug_get_layout(powersavingUG->ug)); + evas_object_del((Evas_Object *) + ug_get_layout(powersavingUG->ug)); + } + + SETTING_TRACE_END; +} + +static void setting_powersaving_ug_on_message(ui_gadget_h ug, + service_h msg, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; +} + +static void setting_powersaving_ug_on_event(ui_gadget_h ug, + enum ug_event event, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + 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; + case UG_EVENT_REGION_CHANGE: + break; + default: + break; + } +} + +static void setting_powersaving_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + + switch (event) { + case UG_KEY_EVENT_END: + break; + default: + break; + } +} + +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + SettingPowersavingUG *powersavingUG = + calloc(1, sizeof(SettingPowersavingUG)); + setting_retvm_if(!powersavingUG, -1, + "Create SettingPowersavingUG obj failed"); + + ops->create = setting_powersaving_ug_on_create; + ops->start = setting_powersaving_ug_on_start; + ops->pause = setting_powersaving_ug_on_pause; + ops->resume = setting_powersaving_ug_on_resume; + ops->destroy = setting_powersaving_ug_on_destroy; + ops->message = setting_powersaving_ug_on_message; + ops->event = setting_powersaving_ug_on_event; + ops->key_event = setting_powersaving_ug_on_key_event; + ops->priv = powersavingUG; + ops->opt = UG_OPT_INDICATOR_ENABLE; + + return 0; +} + +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + struct SettingPowersavingUG *powersavingUG; + setting_retm_if(!ops, "ops == NULL"); + + powersavingUG = ops->priv; + if (powersavingUG) { + FREE(powersavingUG); + } +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +void setting_powersaving_ug_exp_cb(void *data, Evas_Object *obj, void *event_info) +{ + ret_if(NULL == data || NULL == event_info); + SETTING_TRACE_BEGIN; + SettingPowersavingUG *ad = (SettingPowersavingUG *) data; + Elm_Object_Item *parentItem = event_info; /* parent item */ + Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); /* parent data */ + Evas_Object *scroller = elm_object_item_widget_get(parentItem); + + Evas_Object *rgd; + if (data_parentItem == ad->data_saving_at) { + rgd = elm_radio_add(scroller); + elm_radio_value_set(rgd, -1); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + 10, + SETTING_POWERSAVING_AT_10_STR, + NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + 20, + SETTING_POWERSAVING_AT_20_STR, + NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + 30, + SETTING_POWERSAVING_AT_30_STR, + NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + 40, + SETTING_POWERSAVING_AT_40_STR, + NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + 50, + SETTING_POWERSAVING_AT_50_STR, + NULL); + setting_update_chk_status(rgd,data_parentItem->int_slp_setting_binded); + } + else if (data_parentItem == ad->data_screen_timeout) { + rgd = elm_radio_add(scroller); + elm_radio_value_set(rgd, -1); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + SETTING_BACKLIGHT_TIME_8SEC, + "IDS_ST_BODY_8_SECONDS", + NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + SETTING_BACKLIGHT_TIME_15SEC, + "IDS_ST_BODY_15SEC", NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + SETTING_BACKLIGHT_TIME_30SEC, + "IDS_ST_BODY_30SEC", NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + SETTING_BACKLIGHT_TIME_1MIN, + "IDS_COM_BODY_1_MINUTE", + NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + SETTING_BACKLIGHT_TIME_3MIN, + "IDS_ST_BODY_3MINUTES", + NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + SETTING_BACKLIGHT_TIME_10MIN, + "IDS_ST_BODY_10_MINUTES", + NULL); + + setting_update_chk_status(rgd,data_parentItem->int_slp_setting_binded); + } +} + +char *setting_powersaving_ug_get_brightness_str() +{ + int auto_value = 0; + int back_value = 10; + char str_back[MAX_DISPLAY_NAME_LEN_ON_UI + 1] = {0, }; + vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BRT_AUTO_STATUS, &auto_value); //if failed, keep intial value + vconf_get_int(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BRT_VALUE, &back_value); //if failed, keep intial value + if (auto_value) + { + snprintf(str_back, MAX_DISPLAY_NAME_LEN_ON_UI, "%s", _("IDS_COM_BODY_AUTOMATIC")); + } + else + { + snprintf(str_back, MAX_DISPLAY_NAME_LEN_ON_UI, "%d%% %s", back_value, _(KeyStr_Brightness)); + } + return (char *)g_strdup(str_back); +} + + +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + + int ret = 0; + ret += excuteCmd(SETTING_POSTINST_FILE, 1, "powersaving"); + return ret; +} diff --git a/setting-profile/CMakeLists.txt b/setting-profile/CMakeLists.txt new file mode 100755 index 0000000..a92a4e6 --- /dev/null +++ b/setting-profile/CMakeLists.txt @@ -0,0 +1,34 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_profile REQUIRED ecore ecore-file evas elementary utilX appcore-common appcore-efl haptic ui-gadget-1 capi-appfw-application vconf capi-media-player capi-media-sound-manager dlog svi devman capi-system-device) + +FOREACH(flag ${pkgs_profile_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") +ADD_DEFINITIONS("-fpie") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") + +ADD_LIBRARY(${SETTING_PROFILE_UG} SHARED + ./src/setting-profile.c + ./src/setting-profile-sound-main.c + ) + +TARGET_LINK_LIBRARIES(${SETTING_PROFILE_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_PROFILE_UG} ${pkgs_profile_LDFLAGS}) + +INSTALL(TARGETS ${SETTING_PROFILE_UG} DESTINATION /usr/ug/lib) diff --git a/setting-profile/include/setting-profile-sound-main.h b/setting-profile/include/setting-profile-sound-main.h new file mode 100755 index 0000000..046c6d0 --- /dev/null +++ b/setting-profile/include/setting-profile-sound-main.h @@ -0,0 +1,50 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_PROFILE_SOUND_MAIN_H__ +#define __SETTING_PROFILE_SOUND_MAIN_H__ + +#include + +#define SETTING_SOUND_REPEAT_TYPE_LEN 4 +#define SETTING_SOUND_VOLUME_TIMER_INTERVAL 0.2 + +/* string resources*/ +#define SETTING_SOUND_TEXT_UG_TITLE "IDS_COM_BODY_SOUNDS" +#define SETTING_SOUND_TEXT_UG_BACK "IDS_COM_BODY_BACK" + +#define SETTING_SOUND_TEXT_SOUND "IDS_ST_BODY_SOUNDS" +#define SETTING_SOUND_TEXT_VIBRATION "IDS_ST_BODY_CALLALERTTYPE_VIBRATION" + +#define SETTING_SOUND_TEXT_INCOMING_CALL "IDS_ST_BODY_INCOMING_CALL" +#define SETTING_SOUND_TEXT_NOTIFICATION "IDS_ST_BODY_NOTIFICATION" +#define SETTING_SOUND_TEXT_SYSTEM "IDS_COM_BODY_SYSTEM" +#define SETTING_SOUND_TEXT_MEDIA "IDS_COM_BODY_MEDIA" + +#define SETTING_SOUND_TEXT_CALL_RINGTONE "IDS_ST_BODY_INCOMING_CALL_RINGTONE" +#define SETTING_SOUND_TEXT_CALL_VIBRATION "IDS_ST_BODY_INCOMING_CALL_VIBRATION" + +#define SETTING_SOUND_TEXT_MSG_ALERT "IDS_ST_BODY_MESSAGE_ALERT" +#define SETTING_SOUND_TEXT_MSG_RINGTONE_REPEAT "IDS_ST_BODY_MSG_ALERT_REPETITION" +#define SETTING_SOUND_TEXT_EMAIL_ALERT "IDS_ST_BODY_EMAIL_ALERT" +#define SETTING_SOUND_TEXT_EMAIL_RINGTONE_REPEAT "IDS_ST_BODY_EMAIL_ALERT_REPETITION" +#define SETTING_SOUND_TEXT_LOCK_SOUND "IDS_ST_BODY_SCREEN_LOCK_SOUND" + +#define SETTING_PROFILE_SOUND_ALERTS_PATH SETTING_DEFAULT_ALERT_PATH +#define SETTING_PROFILE_SOUND_RINGTONES_PATH SETTING_DEFAULT_RINGTONE_PATH +/* end */ + +#endif diff --git a/setting-profile/include/setting-profile.h b/setting-profile/include/setting-profile.h new file mode 100755 index 0000000..9ef72eb --- /dev/null +++ b/setting-profile/include/setting-profile.h @@ -0,0 +1,197 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_PROFILE_H__ +#define __SETTING_PROFILE_H__ + +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include + +#define MIGRATION_HAPTIC 1 + +#define HAPTIC_TEST_ITERATION 1 +#define VOLUME_DEN (15.0) /* ie equals float(SETTING_SOUND_VOL_MAX) */ + +#define SETTING_SOUND_TEXT_REPEAT_ONCE "IDS_ST_BODY_ONCE" +#define SETTING_SOUND_TEXT_REPEAT_2MIN "IDS_ST_BODY_EVERY_2MIN" +#define SETTING_SOUND_TEXT_REPEAT_5MIN "IDS_ST_BODY_EVERY_5MIN" +#define SETTING_SOUND_TEXT_REPEAT_10MIN "IDS_ST_BODY_EVERY_10MINUTES" + +#define SETTING_SOUND_REPEAT_TYPE_LEN 4 + +typedef enum { + SETTING_PROF_VIEW_VOL = 0, + SETTING_PROF_VIEW_RTN, + SETTING_PROF_VIEW_MAX +} setting_profile_types; + +typedef enum { + SETTING_VOL_TYPE_RINGTONE = 0, + SETTING_VOL_TYPE_NOTIFICATION, + SETTING_VOL_TYPE_MEDIA, + SETTING_VOL_TYPE_SYSTEM, + SETTING_VOL_TYPE_NOTI_VIB, + SETTING_VOL_TYPE_HAPTIC_VIB, + SETTING_VOL_TYPE_MAX +} setting_volume_types; + +typedef enum { + SETTING_VOL_SOUND_GROUP = 0, + SETTING_VOL_VIBRATION_GROUP, + SETTING_VOL_GROUP_MAX +} setting_volume_groups; + +#define SETTING_VIB_VOL_MAX 5 +#define SETTING_VIB_VOL_MIN 1 +#define SETTING_SOUND_VOL_MAX 15 +#define SETTING_SOUND_VOL_MIN 1 +#define SETTING_SYSTEM_VOL_MAX 15 +#define SETTING_SYSTEM_VOL_MIN 0 +#define SETTING_SOUND_CONTROLBAR_ITEM_LEN 10 + +#define SETTING_DEFAULT_RINGTONE_VOL_INT 13 +#define SETTING_DEFAULT_NOTI_VOL_INT 7 +#define SETTING_DEFAULT_MEDIA_VOL_INT 7 +#define SETTING_DEFAULT_SYSTEM_VOL_INT 5 +#define SETTING_DEFAULT_NOTI_VIB_INT 5 +#define SETTING_DEFAULT_HAPTIC_VIB_INT 3 +#define SETTING_DEFAULT_ALERT_REPEAT_TYPE_INT 0 +#define SETTING_SOUND_VIB_TYPE_LEN 5 + +#define SETTING_DEFAULT_RINGTONE_PATH "/opt/share/settings/Ringtones" +#define SETTING_DEFAULT_ALERT_PATH "/opt/share/settings/Alerts" +#define SETTING_PROFILE_MMC_PATH "/opt/storage/sdcard/" +#define SETTING_DEFAULT_VIB_PATH "/usr/share/svi/haptic/default/" + +#define DELIM "/" + +#define SETTING_DEFAULT_CALL_TONE SETTING_DEFAULT_RINGTONE_PATH""DELIM"ringtone_sdk.mp3" +#define SETTING_DEFAULT_MSG_TONE SETTING_DEFAULT_ALERT_PATH""DELIM"General notification_sdk.wav" +#define SETTING_DEFAULT_EMAIL_TONE SETTING_DEFAULT_MSG_TONE +#define SETTING_DEFAULT_MEDIA_TONE SETTING_DEFAULT_CALL_TONE + +#define IMG_CTRL_ICON_RINGTONE SETTING_ICON_PATH_CFG"A01-1_controlbar_icon_ringtones.png" +#define IMG_CTRL_ICON_VOLUME SETTING_ICON_PATH_CFG"A01-1_controlbar_icon_volume.png" + +#define SETTING_VIB_FEEDBACK_RATE 20 + +typedef struct _SettingProfileUG SettingProfileUG; + +/** + * Setting Profile UG context + * all UG function has void* as an agument. this is casted back to SettingProfileUG + * and the functions access app context. + */ +struct _SettingProfileUG { + ui_gadget_h ug; + ui_gadget_h ug_loading; + + /* add more variables here (move your appdata to here) */ + Evas *evas; + Evas_Object *win_main_layout; + Evas_Object *win_get; + Evas_Object *navi_bar; + Evas_Object *ctrl_bar; + Evas_Object *view_layout; + Evas_Object *ly_main; + Evas_Object *sub_view[SETTING_PROF_VIEW_MAX]; + Elm_Object_Item *ctrl_item[SETTING_SOUND_CONTROLBAR_ITEM_LEN]; + + Elm_Genlist_Item_Class itc_1text_1icon; + Elm_Genlist_Item_Class itc_group_item; + Elm_Genlist_Item_Class itc_2text_2; + Elm_Genlist_Item_Class itc_layout; + Elm_Genlist_Item_Class itc_seperator; + Elm_Genlist_Item_Class itc_bg_1icon; + Elm_Genlist_Item_Class itc_2text_3_parent; + Elm_Genlist_Item_Class itc_1icon_1text_sub; + + /* Volume tab */ + Setting_GenGroupItem_Data *data_sound; + Setting_GenGroupItem_Data *data_vibration; + Setting_GenGroupItem_Data *data_call_volume; + Setting_GenGroupItem_Data *data_noti_volume; + Setting_GenGroupItem_Data *data_vib_volume; + Setting_GenGroupItem_Data *data_touch_volume; + Setting_GenGroupItem_Data *data_touch_vib; + Setting_GenGroupItem_Data *data_media_volume; + + player_h *mp_ringtone; + player_h *mp_noti; + player_h *mp_sys; + player_h *mp_media; + + Ecore_Timer *volume_timer; + setting_volume_types cur_vol_type; + + haptic_device_h hnd_hpt; + int playing_volume; + char *song_playing; + char *ringtone_type; + + Ecore_Event_Handler *event_handler; + + /* Ringtone tab */ + Setting_GenGroupItem_Data *data_call_alert_tone; + Setting_GenGroupItem_Data *data_call_alert_vib; + Setting_GenGroupItem_Data *data_msg_alert_tone; + Setting_GenGroupItem_Data *data_email_alert_tone; + Setting_GenGroupItem_Data *data_msg_alert_repeat; + Setting_GenGroupItem_Data *data_email_alert_repeat; + Setting_GenGroupItem_Data *data_lock_sound; + Setting_GenGroupItem_Data *data_touch_sounds; + +}; + +extern setting_view setting_view_profile_sound_main; + +void setting_profile_play_sound_origin(player_h **mp_handle, void *data, + void *cb, char *ringtone_file, float vol, + sound_type_e sound_type); +int setting_profile_check_file_exist(void *data, const char *file_path); + +player_h *setting_profile_play_sound(void *data, void *cb, + char *ringtone_file, + int vol, + sound_type_e sound_type); + +int setting_profile_stop_sound(void *data, player_h *player); +void setting_profile_change_player_volume(player_h **mp_handle, float vol); +int setting_profile_close_other_mm_players_but_type(void *data, + sound_type_e type); +int setting_profile_close_all_mm_players(void *data); +void setting_profile_play_vibration(void *data, int value); + +int setting_profile_get_call_playing_vib_by_vconf_value(int call_vib_value); + +void __setting_profile_ug_key_grab(SettingProfileUG *ad); +void __setting_profile_ug_key_ungrab(SettingProfileUG *ad); + + +#endif diff --git a/setting-profile/src/setting-profile-sound-main.c b/setting-profile/src/setting-profile-sound-main.c new file mode 100755 index 0000000..8f6505b --- /dev/null +++ b/setting-profile/src/setting-profile-sound-main.c @@ -0,0 +1,1656 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include + +#define VOLUME_STR _("IDS_ST_BODY_VOLUME") +#define RINGTONE_STR _("IDS_COM_BODY_RINGTONES") + +#define SOUND_DESC "IDS_ST_BODY_ADJUST_VOLUME_AND_INTENSITY_FOR_SOUNDS_WHEN_MSG" + +char *repeat_type[SETTING_SOUND_REPEAT_TYPE_LEN] = { + SETTING_SOUND_TEXT_REPEAT_ONCE, + SETTING_SOUND_TEXT_REPEAT_2MIN, + SETTING_SOUND_TEXT_REPEAT_5MIN, + SETTING_SOUND_TEXT_REPEAT_10MIN + }; + +static int setting_profile_sound_main_create(void *cb); +static int setting_profile_sound_main_destroy(void *cb); +static int setting_profile_sound_main_update(void *cb); +static int setting_profile_sound_main_cleanup(void *cb); + +static void setting_profile_layout_ug_cb(ui_gadget_h ug, + enum ug_mode mode, void *priv); + +static void setting_profile_sound_main_click_softkey_cancel_cb(void *data, + Evas_Object *obj, void *event_info); + +static void setting_profile_sound_main_Gendial_chk_cb(void *data, + Evas_Object *obj, void *event_info); + +static void setting_profile_sound_main_mouse_up_Gendial_list_cb(void *data, + Evas_Object *obj, void *event_info); + +static void setting_profile_sound_main_call_ringtone_sound_slider_value_change_cb(void *data, + Evas_Object *obj, void *event_info); + +static void setting_profile_sound_main_noti_sound_slider_value_change_cb(void *data, + Evas_Object *obj, void *event_info); + +static void setting_profile_sound_main_media_sound_slider_value_change_cb(void *data, + Evas_Object *obj, void *event_info); + +static void setting_profile_sound_main_vib_sound_slider_value_change_cb(void *data, + Evas_Object *obj, void *event_info); + +static void setting_profile_sound_main_touchVib_sound_slider_value_change_cb(void *data, + Evas_Object *obj, void *event_info); + +static void settings_profile_sound_main_sys_sound_slider_value_change_cb(void *data, + Evas_Object *obj, void *event_info); + + +setting_view setting_view_profile_sound_main = { + .create = setting_profile_sound_main_create, + .destroy = setting_profile_sound_main_destroy, + .update = setting_profile_sound_main_update, + .cleanup = setting_profile_sound_main_cleanup, +}; + +/* *************************************************** + * + *basic func + * + ***************************************************/ +void __change_state_of_sliderbars(void *data) +{ + ret_if(data == NULL); + SettingProfileUG *ad = (SettingProfileUG *) data; + + int sound_on = TRUE; + int vibration_on = TRUE; + + if (vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &sound_on) == 0) { + if (sound_on == FALSE) { + /* disable slider bar of call ringtone, notification, media, and system volume */ + if (ad->data_call_volume) { + setting_disable_genlist_item(ad->data_call_volume->item); + } + if (ad->data_noti_volume) { + setting_disable_genlist_item(ad->data_noti_volume->item); + } + if (ad->data_media_volume) { + setting_disable_genlist_item(ad->data_media_volume->item); + } + if (ad->data_touch_volume) { + setting_disable_genlist_item(ad->data_touch_volume->item); + } + } + } + + if (vconf_get_bool + (VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &vibration_on) == 0) { + if (vibration_on == FALSE) { + /* disable slider bar of notification and system vibration */ + if (ad->data_vib_volume) { + setting_disable_genlist_item(ad->data_vib_volume->item); + } + if (ad->data_touch_vib) { + setting_disable_genlist_item(ad->data_touch_vib->item); + } + } + } +} + +void __sound_sub_list_sel_cb(void *data, Evas_Object *obj, void *event_info) +{ + /* error check */ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + retm_if(data == NULL, "Invalid argument: data is NULL"); + + SettingProfileUG *ad = (SettingProfileUG *) data; + Elm_Object_Item *subitem = (Elm_Object_Item *) event_info; + Elm_Object_Item *parentItem = elm_genlist_item_parent_get(subitem); + elm_genlist_item_selected_set(subitem, 0); + Setting_GenGroupItem_Data *data_subItem = + elm_object_item_data_get(subitem); + Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); + if (NULL == data_subItem || NULL == data_parentItem) + return; + + elm_radio_value_set(data_subItem->rgd, data_subItem->chk_status); + int err; + setting_set_int_slp_key(data_parentItem->int_slp_setting_binded, + data_subItem->chk_status, &err); + + if (data_parentItem && data_parentItem->item) { + data_parentItem->sub_desc = + (char *)g_strdup(_(data_subItem->keyStr)); + elm_object_item_data_set(data_parentItem->item, data_parentItem); + elm_genlist_item_update(data_parentItem->item); + } + + if (data_parentItem->int_slp_setting_binded == + INT_SLP_SETTING_CALL_ALERT_VIB) { + if(ad->hnd_hpt < 0) + { + SETTING_TRACE_DEBUG("[ERROR] Can't use haptic handle."); + return; + } + if (haptic_stop_all_effects(ad->hnd_hpt) != 0) { + SETTING_TRACE("ERROR haptic_stop_all_effects"); + /* return; */ + } + setting_profile_play_vibration(ad, + setting_profile_get_call_playing_vib_by_vconf_value + (data_subItem->chk_status)); + } +} + +static void __sound_exp_cb(void *data, Evas_Object *obj, void *event_info) +{ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + retm_if(data == NULL, "Invalid argument: data is NULL"); + + SettingProfileUG *ad = (SettingProfileUG *) data; + Elm_Object_Item *parentItem = event_info; /* parent item */ + Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); /* parent data */ + Evas_Object *scroller = elm_object_item_widget_get(parentItem); + + Evas_Object *rgd; + if (data_parentItem == ad->data_call_alert_vib) { + rgd = elm_radio_add(scroller); + elm_radio_value_set(rgd, -1); + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + __sound_sub_list_sel_cb, + ad, parentItem, + SWALLOW_Type_1RADIO, rgd, + 0, + "IDS_ST_BODY_VIBRATION_1", + NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + __sound_sub_list_sel_cb, + ad, parentItem, + SWALLOW_Type_1RADIO, rgd, + 1, + "IDS_ST_BODY_VIBRATION_2", + NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + __sound_sub_list_sel_cb, + ad, parentItem, + SWALLOW_Type_1RADIO, rgd, + 2, + "IDS_ST_BODY_VIBRATION_3", + NULL); + + setting_update_chk_status(rgd, + data_parentItem-> + int_slp_setting_binded); + + } else if (data_parentItem == ad->data_msg_alert_repeat + || data_parentItem == ad->data_email_alert_repeat) { + rgd = elm_radio_add(scroller); + elm_radio_value_set(rgd, -1); + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + __sound_sub_list_sel_cb, + ad, parentItem, + SWALLOW_Type_1RADIO, rgd, + 0, + _(SETTING_SOUND_TEXT_REPEAT_ONCE), + NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + __sound_sub_list_sel_cb, + ad, parentItem, + SWALLOW_Type_1RADIO, rgd, + 1, + _(SETTING_SOUND_TEXT_REPEAT_2MIN), + NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + __sound_sub_list_sel_cb, + ad, parentItem, + SWALLOW_Type_1RADIO, rgd, + 2, + _(SETTING_SOUND_TEXT_REPEAT_5MIN), + NULL); + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + __sound_sub_list_sel_cb, + ad, parentItem, + SWALLOW_Type_1RADIO, rgd, + 3, + _(SETTING_SOUND_TEXT_REPEAT_10MIN), + NULL); + + setting_update_chk_status(rgd, + data_parentItem->int_slp_setting_binded); + } +} + +static void __mm_player_msg_cb(void *user_param) +{ + ret_if(user_param == NULL); + SettingProfileUG *ad = (SettingProfileUG *)user_param; + /*switch(message) + { + case MM_MESSAGE_END_OF_STREAM: + SETTING_TRACE_DEBUG("End of Stream"); + setting_profile_close_all_mm_players(ad); + return TRUE; + default: + return FALSE; + }*/ + SETTING_TRACE("completed_cb is called."); + setting_profile_close_all_mm_players(ad); +} + +void __ringtone_start_change_cb(void *data, Evas_Object *obj, void *event_info) +{ + ret_if(data == NULL); + + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + SettingProfileUG *ad = list_item->userdata; + + ad->cur_vol_type = SETTING_VOL_TYPE_RINGTONE; + setting_profile_close_other_mm_players_but_type(ad, SOUND_TYPE_RINGTONE); +} +void __noti_start_change_cb(void *data, Evas_Object *obj, void *event_info) +{ + ret_if(data == NULL); + + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + SettingProfileUG *ad = list_item->userdata; + + ad->cur_vol_type = SETTING_VOL_TYPE_NOTIFICATION; + setting_profile_close_other_mm_players_but_type(ad, SOUND_TYPE_NOTIFICATION); +} +void __media_start_change_cb(void *data, Evas_Object *obj, void *event_info) +{ + ret_if(data == NULL); + + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + SettingProfileUG *ad = list_item->userdata; + + ad->cur_vol_type = SETTING_VOL_TYPE_MEDIA; + setting_profile_close_other_mm_players_but_type(ad, SOUND_TYPE_MEDIA); +} +void __system_start_change_cb(void *data, Evas_Object *obj, void *event_info) +{ + ret_if(data == NULL); + + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + SettingProfileUG *ad = list_item->userdata; + + ad->cur_vol_type = SETTING_VOL_TYPE_SYSTEM; + setting_profile_close_other_mm_players_but_type(ad, SOUND_TYPE_SYSTEM); +} + +void __noti_vib_start_change_cb(void *data, Evas_Object *obj, void *event_info) +{ + ret_if(data == NULL); + + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + SettingProfileUG *ad = list_item->userdata; + + ad->cur_vol_type = SETTING_VOL_TYPE_NOTI_VIB; + setting_profile_close_all_mm_players(ad); + + int err = 0; + char pattern_file[MAX_COMMON_BUFFER_LEN] = {0,}; + svi_get_path(SVI_TYPE_VIB, SVI_VIB_NOTIFICATION_GENERAL, pattern_file, MAX_COMMON_BUFFER_LEN); + haptic_stop_all_effects(ad->hnd_hpt); + err = haptic_vibrate_file_with_detail(ad->hnd_hpt, pattern_file, 1, list_item->chk_status * SETTING_VIB_FEEDBACK_RATE, HAPTIC_PRIORITY_MIN, NULL); + if (err < 0) + SETTING_TRACE("Failed to play haptic monotone"); +} + +void __haptic_vib_start_change_cb(void *data, Evas_Object *obj, void *event_info) + { + SETTING_TRACE_BEGIN; + ret_if(data == NULL); + + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + SettingProfileUG *ad = list_item->userdata; + + ad->cur_vol_type = SETTING_VOL_TYPE_HAPTIC_VIB; + setting_profile_close_all_mm_players(ad); + + int err = 0; + char pattern_file[MAX_COMMON_BUFFER_LEN] = {0,}; + svi_get_path(SVI_TYPE_VIB, SVI_VIB_OPERATION_VIBRATION, pattern_file, MAX_COMMON_BUFFER_LEN); + haptic_stop_all_effects(ad->hnd_hpt); + err = haptic_vibrate_file_with_detail(ad->hnd_hpt, pattern_file, 1, list_item->chk_status * SETTING_VIB_FEEDBACK_RATE, HAPTIC_PRIORITY_MIN, NULL); + + if (err < 0) + SETTING_TRACE("Failed to play haptic monotone"); +} + +void __volume_stop_change_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + ret_if(data == NULL); + + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + SettingProfileUG *ad = list_item->userdata; + + char *pa_tone_path = NULL; + player_h **player = NULL; + + double value = elm_slider_value_get(obj); + list_item->chk_status = (unsigned int)(value+0.5); + + switch(ad->cur_vol_type) + { + case SETTING_VOL_TYPE_RINGTONE: + sound_manager_set_volume(SOUND_TYPE_RINGTONE, list_item->chk_status); + player = &(ad->mp_ringtone); + if(*player != NULL) + return; + SETTING_TRACE_DEBUG("ringtone player will be created"); + pa_tone_path = vconf_get_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR); + if(pa_tone_path == NULL) + { + pa_tone_path = (char *)strdup(SETTING_DEFAULT_CALL_TONE); + + if(vconf_set_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, pa_tone_path) < 0) { + FREE(pa_tone_path); + return; + } + } + setting_profile_play_sound_origin(player, ad, __mm_player_msg_cb, + pa_tone_path, + (float)value, + SOUND_TYPE_RINGTONE); + break; + case SETTING_VOL_TYPE_NOTIFICATION: + sound_manager_set_volume(SOUND_TYPE_NOTIFICATION, list_item->chk_status); + player = &(ad->mp_noti); + if(*player != NULL) + return; + SETTING_TRACE_DEBUG("noti player will be created"); + pa_tone_path = vconf_get_str(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR); + if(pa_tone_path == NULL) + { + pa_tone_path = (char *)strdup(SETTING_DEFAULT_MSG_TONE); + if(vconf_set_str(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, SETTING_DEFAULT_MSG_TONE) < 0) { + FREE(pa_tone_path); + return; + } + } + setting_profile_play_sound_origin(player, ad, __mm_player_msg_cb, + pa_tone_path, + (float)value, + SOUND_TYPE_NOTIFICATION); + break; + case SETTING_VOL_TYPE_MEDIA: + sound_manager_set_volume(SOUND_TYPE_MEDIA, list_item->chk_status); + player = &(ad->mp_media); + if(*player != NULL) + return; + SETTING_TRACE_DEBUG("media player will be created"); + pa_tone_path = (char*)strdup(SETTING_DEFAULT_MEDIA_TONE); + + setting_profile_play_sound_origin(player, ad, __mm_player_msg_cb, + pa_tone_path, + (float)value, + SOUND_TYPE_MEDIA); + break; + case SETTING_VOL_TYPE_SYSTEM: + sound_manager_set_volume(SOUND_TYPE_SYSTEM, list_item->chk_status); + player = &(ad->mp_sys); + if(*player != NULL) + return; + SETTING_TRACE_DEBUG("ringtone player will be created"); + char pattern_file[MAX_COMMON_BUFFER_LEN] = {0,}; + svi_get_path(SVI_TYPE_SND, SVI_SND_TOUCH_TOUCH1, pattern_file, sizeof(pattern_file)); + + setting_profile_play_sound_origin(player, ad, __mm_player_msg_cb, + pattern_file, + (float)value, + SOUND_TYPE_SYSTEM); + break; + default: + return; + } + + if(pa_tone_path) { + free(pa_tone_path); + pa_tone_path = NULL; + } + + SETTING_TRACE_END; +} + +void __vibration_stop_change_cb(void *data, Evas_Object *obj, void *event_info) +{ + ret_if(data == NULL); + + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + SettingProfileUG *ad = list_item->userdata; + + if (haptic_stop_all_effects(ad->hnd_hpt) != 0) { + SETTING_TRACE("ERROR haptic_stop_all_effects"); + /* return; */ + } +#if DISABLED_CODE + double value = 0.0; + switch(ad->cur_vol_type) + { + case SETTING_VOL_TYPE_NOTI_VIB: + if(ad->data_vib_volume) + { + value = elm_slider_value_get(ad->data_vib_volume->eo_check); + list_item->chk_status = (int)(value + 0.5); + vconf_set_int(VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT, list_item->chk_status); + if(value < 0.5) + elm_slider_value_set(ad->data_vib_volume->eo_check, 0); + else + elm_slider_value_set(ad->data_vib_volume->eo_check, list_item->chk_status); + } + break; + case SETTING_VOL_TYPE_HAPTIC_VIB: + if(ad->data_touch_vib) + { + value = elm_slider_value_get(ad->data_touch_vib->eo_check); + list_item->chk_status = (int)(value + 0.5); + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, list_item->chk_status); + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, list_item->chk_status); + if(value < 0.5) + elm_slider_value_set(ad->data_touch_vib->eo_check, 0); + else + elm_slider_value_set(ad->data_touch_vib->eo_check, (unsigned int)(value+0.5)); + } + break; + default: + break; + } +#endif + ad->cur_vol_type = SETTING_VOL_TYPE_MAX; + SETTING_TRACE_END; +} + +static void __main_list_unrealized_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + ret_if(data == NULL); + + SettingProfileUG *ad = (SettingProfileUG *) data; + + Elm_Object_Item *item = (Elm_Object_Item *)event_info; + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + /* backup each slider's value */ + if(list_item == ad->data_call_volume) + sound_manager_set_volume(SOUND_TYPE_RINGTONE, ad->data_call_volume->chk_status); + else if(list_item == ad->data_noti_volume) + sound_manager_set_volume(SOUND_TYPE_NOTIFICATION, ad->data_noti_volume->chk_status); + else if(list_item == ad->data_media_volume) + sound_manager_set_volume(SOUND_TYPE_MEDIA, ad->data_media_volume->chk_status); + else if(list_item == ad->data_touch_volume) + sound_manager_set_volume(SOUND_TYPE_SYSTEM, ad->data_touch_volume->chk_status); + else if(list_item == ad->data_vib_volume) + vconf_set_int(VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT, ad->data_vib_volume->chk_status); + else if(list_item == ad->data_touch_vib) + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, ad->data_touch_vib->chk_status); +} + +static Evas_Object *__get_main_list(void *data) +{ + retv_if(data == NULL, NULL); + + SettingProfileUG *ad = (SettingProfileUG *) data; + + __setting_profile_ug_key_grab(ad); + + if(ad->sub_view[SETTING_PROF_VIEW_VOL]) + return ad->sub_view[SETTING_PROF_VIEW_VOL]; + + Evas_Object *genlist = elm_genlist_add(ad->navi_bar); + elm_object_style_set(genlist, "dialogue"); + retvm_if(genlist == NULL, NULL, + "Cannot set genlist object as contento of layout"); + elm_genlist_clear(genlist); /* first to clear list */ + + int vconf_value = 0; + int mm_value = 0; + + Elm_Object_Item *item = elm_genlist_item_append(genlist, + &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* a.use sound */ + if (vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &vconf_value) < 0) + vconf_value = TRUE; /* default value of sound : on */ + ad->data_sound = + setting_create_Gendial_field_def(genlist, &(ad->itc_1text_1icon), + setting_profile_sound_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, vconf_value, + SETTING_SOUND_TEXT_SOUND, NULL, + setting_profile_sound_main_Gendial_chk_cb); + if (ad->data_sound) { + ad->data_sound->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_sound is NULL"); + } + /* b.use vib */ + if (vconf_get_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &vconf_value) < 0) + vconf_value = TRUE; /* default value of vibration : on */ + ad->data_vibration = + setting_create_Gendial_field_def(genlist, &(ad->itc_1text_1icon), + setting_profile_sound_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, vconf_value, + SETTING_SOUND_TEXT_VIBRATION, NULL, + setting_profile_sound_main_Gendial_chk_cb); + if (ad->data_vibration) { + ad->data_vibration->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_vibration is NULL"); + } + + (void)setting_create_Gendial_field_titleItem(genlist, + &(ad->itc_group_item), + "IDS_ST_BODY_VOLUME", NULL); + + /* d.call volumn. */ + if(sound_manager_get_volume(SOUND_TYPE_RINGTONE, &mm_value) < 0) + mm_value = SETTING_DEFAULT_RINGTONE_VOL_INT; + ad->data_call_volume = + setting_create_Gendial_field_def(genlist, &(ad->itc_layout), NULL, + NULL, + SWALLOW_Type_LAYOUT_SLIDER, + IMG_SLIDER_BTN_VOLUME01, + IMG_SLIDER_BTN_VOLUME02, mm_value, + SETTING_SOUND_TEXT_INCOMING_CALL, + NULL, + setting_profile_sound_main_call_ringtone_sound_slider_value_change_cb); + if (ad->data_call_volume) { + ad->data_call_volume->win_main = ad->win_main_layout; + ad->data_call_volume->evas = ad->evas; + ad->data_call_volume->isIndicatorVisible = true; + ad->data_call_volume->slider_min = 0; + ad->data_call_volume->slider_max = SETTING_SOUND_VOL_MAX; + ad->data_call_volume->userdata = ad; + ad->data_call_volume->start_change_cb = __ringtone_start_change_cb; + ad->data_call_volume->stop_change_cb = __volume_stop_change_cb; + ad->data_call_volume->belongs_to = SETTING_VOL_SOUND_GROUP; + } else { + SETTING_TRACE_ERROR("ad->data_call_volume is NULL"); + } + + /* e.noti volumn */ + if(sound_manager_get_volume(SOUND_TYPE_NOTIFICATION, &mm_value) < 0) + mm_value = SETTING_DEFAULT_NOTI_VOL_INT; + + (void)setting_create_Gendial_field_titleItem(genlist, + &(itc_group_item), + SETTING_SOUND_TEXT_NOTIFICATION, NULL); + ad->data_noti_volume = + setting_create_Gendial_field_def(genlist, &(ad->itc_layout), NULL, + NULL, + SWALLOW_Type_LAYOUT_SLIDER, + IMG_SLIDER_BTN_VOLUME01, + IMG_SLIDER_BTN_VOLUME02, mm_value, + NULL,//SETTING_SOUND_TEXT_NOTIFICATION, + NULL, + setting_profile_sound_main_noti_sound_slider_value_change_cb); + if (ad->data_noti_volume) { + ad->data_noti_volume->win_main = ad->win_main_layout; + ad->data_noti_volume->evas = ad->evas; + ad->data_noti_volume->isIndicatorVisible = true; + ad->data_noti_volume->slider_min = 0; + ad->data_noti_volume->slider_max = SETTING_SOUND_VOL_MAX; + ad->data_noti_volume->userdata = ad; + ad->data_noti_volume->start_change_cb = __noti_start_change_cb; + ad->data_noti_volume->stop_change_cb = __volume_stop_change_cb; + ad->data_noti_volume->belongs_to = SETTING_VOL_SOUND_GROUP; + } else { + SETTING_TRACE_ERROR("ad->data_noti_volume is NULL"); + } + + /* g.media volume */ + if(sound_manager_get_volume(SOUND_TYPE_MEDIA, &mm_value) < 0) + mm_value = SETTING_DEFAULT_MEDIA_VOL_INT; + + (void)setting_create_Gendial_field_titleItem(genlist, + &(itc_group_item), + SETTING_SOUND_TEXT_MEDIA, NULL); + ad->data_media_volume = + setting_create_Gendial_field_def(genlist, &(ad->itc_layout), NULL, + NULL, + SWALLOW_Type_LAYOUT_SLIDER, + IMG_SLIDER_BTN_VOLUME01, + IMG_SLIDER_BTN_VOLUME02, mm_value, + NULL, NULL, + setting_profile_sound_main_media_sound_slider_value_change_cb); + if (ad->data_media_volume) { + ad->data_media_volume->win_main = ad->win_main_layout; + ad->data_media_volume->evas = ad->evas; + ad->data_media_volume->isIndicatorVisible = true; + ad->data_media_volume->slider_min = 0; + ad->data_media_volume->slider_max = SETTING_SOUND_VOL_MAX; + ad->data_media_volume->userdata = ad; + ad->data_media_volume->start_change_cb = __media_start_change_cb; + ad->data_media_volume->stop_change_cb = __volume_stop_change_cb; + ad->data_media_volume->belongs_to = SETTING_VOL_SOUND_GROUP; + } else { + SETTING_TRACE_ERROR("ad->data_media_volume is NULL"); + } + + /* h.system volume */ + if(sound_manager_get_volume(SOUND_TYPE_SYSTEM, &mm_value) < 0) + { + SETTING_TRACE_DEBUG("Fail to get volume"); + mm_value = SETTING_DEFAULT_SYSTEM_VOL_INT; + } + (void)setting_create_Gendial_field_titleItem(genlist, + &(itc_group_item), + SETTING_SOUND_TEXT_SYSTEM, NULL); + ad->data_touch_volume = + setting_create_Gendial_field_def(genlist, &(ad->itc_layout), NULL, + NULL, + SWALLOW_Type_LAYOUT_SLIDER, + IMG_SLIDER_BTN_VOLUME01, + IMG_SLIDER_BTN_VOLUME02, mm_value, + NULL, NULL, + settings_profile_sound_main_sys_sound_slider_value_change_cb); + if (ad->data_touch_volume) { + ad->data_touch_volume->win_main = ad->win_main_layout; + ad->data_touch_volume->evas = ad->evas; + ad->data_touch_volume->isIndicatorVisible = true; + ad->data_touch_volume->slider_min = 0; + ad->data_touch_volume->slider_max = SETTING_SOUND_VOL_MAX; + ad->data_touch_volume->userdata = ad; + ad->data_touch_volume->start_change_cb = __system_start_change_cb; + ad->data_touch_volume->stop_change_cb = __volume_stop_change_cb; + ad->data_touch_volume->belongs_to = SETTING_VOL_SOUND_GROUP; + } else { + SETTING_TRACE_ERROR("ad->data_touch_volume is NULL"); + } + + (void)setting_create_Gendial_field_titleItem(genlist, + &(ad->itc_group_item), + "IDS_ST_BODY_CALLALERTTYPE_VIBRATION", NULL); + + /* f.noti vib */ + if (vconf_get_int(VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT, &vconf_value) < 0) + vconf_value = SETTING_DEFAULT_NOTI_VIB_INT; /* default value of notification vibration volume : 5 */ + + (void)setting_create_Gendial_field_titleItem(genlist, + &(itc_group_item), + SETTING_SOUND_TEXT_NOTIFICATION, NULL); + ad->data_vib_volume = + setting_create_Gendial_field_def(genlist, &(ad->itc_layout), NULL, + NULL, + SWALLOW_Type_LAYOUT_SLIDER, + IMG_VIBRATION_ICON_01, + IMG_VIBRATION_ICON_02, vconf_value, + NULL,//SETTING_SOUND_TEXT_NOTIFICATION, + NULL, + setting_profile_sound_main_vib_sound_slider_value_change_cb); + if (ad->data_vib_volume) { + ad->data_vib_volume->win_main = ad->win_main_layout; + ad->data_vib_volume->evas = ad->evas; + ad->data_vib_volume->isIndicatorVisible = true; + ad->data_vib_volume->slider_min = 0; + ad->data_vib_volume->slider_max = SETTING_VIB_VOL_MAX; + ad->data_vib_volume->userdata = ad; + ad->data_vib_volume->start_change_cb = __noti_vib_start_change_cb; + ad->data_vib_volume->stop_change_cb = __vibration_stop_change_cb; + ad->data_vib_volume->belongs_to = SETTING_VOL_VIBRATION_GROUP; + } else { + SETTING_TRACE_ERROR("ad->data_vib_volume is NULL"); + } + + /* i.haptic vib */ + if (vconf_get_int + (VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, &vconf_value) < 0) + vconf_value = SETTING_DEFAULT_HAPTIC_VIB_INT; /* default value of haptic vibration volume : 3 */ + + (void)setting_create_Gendial_field_titleItem(genlist, + &(itc_group_item), + "IDS_ST_BODY_SOUNDFEEDBACK_HAPTIC_FEEDBACK", NULL); + ad->data_touch_vib = + setting_create_Gendial_field_def(genlist, &(ad->itc_layout), NULL, + NULL, + SWALLOW_Type_LAYOUT_SLIDER, + IMG_VIBRATION_ICON_01, + IMG_VIBRATION_ICON_02, vconf_value, + NULL, NULL, + setting_profile_sound_main_touchVib_sound_slider_value_change_cb); + if (ad->data_touch_vib) { + ad->data_touch_vib->win_main = ad->win_main_layout; + ad->data_touch_vib->evas = ad->evas; + ad->data_touch_vib->isIndicatorVisible = true; + ad->data_touch_vib->slider_min = 0; + ad->data_touch_vib->slider_max = SETTING_VIB_VOL_MAX; + ad->data_touch_vib->userdata = ad; + ad->data_touch_vib->start_change_cb = __haptic_vib_start_change_cb; + ad->data_touch_vib->stop_change_cb = __vibration_stop_change_cb; + ad->data_touch_vib->belongs_to = SETTING_VOL_VIBRATION_GROUP; + } else { + SETTING_TRACE_ERROR("ad->data_touch_vib is NULL"); + } + + setting_create_Gendial_field_def(genlist, &(ad->itc_bg_1icon), + NULL, ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, SOUND_DESC, NULL, NULL); + elm_genlist_item_select_mode_set(elm_genlist_item_append(genlist, &(itc_seperator), NULL, NULL,ELM_GENLIST_ITEM_NONE, NULL, NULL), + ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* Touch sounds */ + if (vconf_get_bool(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL, &vconf_value) < 0) + vconf_value = TRUE; /* default value of touch sounds : on */ + + ad->data_touch_sounds = + setting_create_Gendial_field_def(genlist, &(ad->itc_1text_1icon), + setting_profile_sound_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, vconf_value, + "IDS_ST_BODY_TOUCH_SOUNDS", + NULL, + setting_profile_sound_main_Gendial_chk_cb); + if (ad->data_touch_sounds) { + ad->data_touch_sounds->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_lock_sound is NULL"); + } + + setting_create_Gendial_field_def(genlist, &(ad->itc_bg_1icon), + NULL, ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, "IDS_ST_BODY_PLAY_SOUND_WHEN_MAKING_SCREEN_SELECTION", NULL, NULL); + elm_genlist_item_select_mode_set(elm_genlist_item_append(genlist, &(itc_seperator), NULL, NULL,ELM_GENLIST_ITEM_NONE, NULL, NULL), + ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + __change_state_of_sliderbars(ad); + + //evas_object_smart_callback_add(genlist, "unrealized", __main_list_unrealized_cb, ad); + + ad->sub_view[SETTING_PROF_VIEW_VOL] = genlist; + + return ad->sub_view[SETTING_PROF_VIEW_VOL]; +} + +static Evas_Object *__get_ringtone_list(void *data) +{ + retv_if(data == NULL, NULL); + SettingProfileUG *ad = (SettingProfileUG *) data; + + if(ad->sub_view[SETTING_PROF_VIEW_RTN]) + return ad->sub_view[SETTING_PROF_VIEW_RTN]; + + Evas_Object *genlist = elm_genlist_add(ad->navi_bar); + elm_object_style_set(genlist, "dialogue"); + retvm_if(genlist == NULL, NULL, + "Cannot set genlist object as contento of layout"); + elm_genlist_clear(genlist); /* first to clear list */ + setting_enable_expandable_genlist(genlist, ad, __sound_exp_cb, NULL); + + /* a. incoming call group */ + (void)setting_create_Gendial_field_titleItem(genlist, + &(ad->itc_group_item), + SETTING_SOUND_TEXT_INCOMING_CALL, + NULL); + + /* a-1. ringtone */ + int vconf_ret = 0; + char *sub_desc = NULL; + char *pa_ringtone = vconf_get_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR); + if(setting_profile_check_file_exist(ad, pa_ringtone) == SETTING_RETURN_FAIL) + { + pa_ringtone = (char *)strdup(SETTING_DEFAULT_CALL_TONE); + vconf_ret = vconf_set_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, pa_ringtone); + if(vconf_ret < 0) + SETTING_TRACE_DEBUG("failed to set vconf"); + } + sub_desc = setting_file_basename(pa_ringtone); + + ad->data_call_alert_tone = + setting_create_Gendial_field_def(genlist, &(ad->itc_2text_2), + setting_profile_sound_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, SETTING_SOUND_TEXT_CALL_RINGTONE, + sub_desc, NULL); + if (ad->data_call_alert_tone) { + ad->data_call_alert_tone->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_call_alert_tone is NULL"); + } + + FREE(pa_ringtone); + G_FREE(sub_desc); + + /* b. notification */ + (void)setting_create_Gendial_field_titleItem(genlist, + &(ad->itc_group_item), + SETTING_SOUND_TEXT_NOTIFICATION, + NULL); + + int repeat_value = 0; + + /* b-1. msg ringtone */ + pa_ringtone = vconf_get_str(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR); + if(setting_profile_check_file_exist(ad, pa_ringtone) == SETTING_RETURN_FAIL) + { + pa_ringtone = (char *)strdup(SETTING_DEFAULT_MSG_TONE); + vconf_ret = vconf_set_str(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, SETTING_DEFAULT_MSG_TONE); + if(vconf_ret < 0) + SETTING_TRACE_DEBUG("failed to set vconf"); + } + sub_desc = setting_file_basename(pa_ringtone); + + ad->data_msg_alert_tone = + setting_create_Gendial_field_def(genlist, &(ad->itc_2text_2), + setting_profile_sound_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, + SETTING_SOUND_TEXT_MSG_ALERT, + sub_desc, NULL); + if (ad->data_msg_alert_tone) { + ad->data_msg_alert_tone->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_msg_alert_tone is NULL"); + } + FREE(pa_ringtone); + G_FREE(sub_desc); + + /* b-2. msg alert repetition */ + if (vconf_get_int + (VCONFKEY_SETAPPL_NOTI_MSG_ALERT_REP_TYPE_INT, &repeat_value) != 0) + repeat_value = SETTING_DEFAULT_ALERT_REPEAT_TYPE_INT; /* default 0 : repeat once */ + ad->data_msg_alert_repeat = + setting_create_Gendial_exp_parent_field(genlist, + &(ad->itc_2text_3_parent), + setting_profile_sound_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, + SETTING_SOUND_TEXT_MSG_RINGTONE_REPEAT, + _(repeat_type[repeat_value])); + if (ad->data_msg_alert_repeat) { + ad->data_msg_alert_repeat->int_slp_setting_binded = + INT_SLP_SETTING_MSG_ALERT_REPEAT; + } else { + SETTING_TRACE_ERROR("ad->data_msg_alert_repeat is NULL"); + } + + /* b-3. email ringtone */ + pa_ringtone = vconf_get_str(VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR); + if(setting_profile_check_file_exist(ad, pa_ringtone) == SETTING_RETURN_FAIL) + { + pa_ringtone = (char *)strdup(SETTING_DEFAULT_EMAIL_TONE); + vconf_ret = vconf_set_str(VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR, SETTING_DEFAULT_EMAIL_TONE); + if(vconf_ret < 0) + SETTING_TRACE_DEBUG("failed to set vconf"); + } + sub_desc = setting_file_basename(pa_ringtone); + + ad->data_email_alert_tone = + setting_create_Gendial_field_def(genlist, &(ad->itc_2text_2), + setting_profile_sound_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, + SETTING_SOUND_TEXT_EMAIL_ALERT, + sub_desc, NULL); + if (ad->data_email_alert_tone) { + ad->data_email_alert_tone->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_email_alert_tone is NULL"); + } + FREE(pa_ringtone); + G_FREE(sub_desc); + + /* b-4. email alert repetition */ + if (vconf_get_int + (VCONFKEY_SETAPPL_NOTI_EMAIL_ALERT_REP_TYPE_INT, + &repeat_value) != 0) + repeat_value = SETTING_DEFAULT_ALERT_REPEAT_TYPE_INT; /* default 0 : repeat once */ + ad->data_email_alert_repeat = + setting_create_Gendial_exp_parent_field(genlist, + &(ad->itc_2text_3_parent), + setting_profile_sound_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, + SETTING_SOUND_TEXT_EMAIL_RINGTONE_REPEAT, + _(repeat_type[repeat_value])); + if (ad->data_email_alert_repeat) { + ad->data_email_alert_repeat->int_slp_setting_binded = + INT_SLP_SETTING_EMAIL_ALERT_REPEAT; + } else { + SETTING_TRACE_ERROR("ad->data_email_alert_repeat is NULL"); + } + + Elm_Object_Item *item = NULL; + item = elm_genlist_item_append(genlist, &itc_bottom_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + ad->sub_view[SETTING_PROF_VIEW_RTN] = genlist; + + return ad->sub_view[SETTING_PROF_VIEW_RTN]; +} + +static void __view_change_cb(void *data, Evas_Object *obj, void *event_info) +{ + //appcore_measure_start(); + retm_if(event_info == NULL, "Invalid argmuent: event info is NULL"); + retm_if(data == NULL, "Invalid argmuent: data is NULL"); + + SettingProfileUG *ad = (SettingProfileUG *) data; + + if (haptic_stop_all_effects(ad->hnd_hpt) != 0) { + SETTING_TRACE("ERROR haptic_stop_all_effects"); + /* return; */ + } + setting_profile_close_all_mm_players(ad); + + Evas_Object *sub_view = NULL; + Elm_Object_Item *sel_item = elm_toolbar_selected_item_get(obj); + const char *tab_lable = elm_object_item_text_get(sel_item); + ret_if(!tab_lable); + //SETTING_TRACE("tab_lable:%s", tab_lable); + if (0 == safeStrCmp(tab_lable, VOLUME_STR)) { + if(ad->hnd_hpt) + haptic_stop_all_effects(ad->hnd_hpt); + sub_view = __get_main_list(ad); + } else if (0 == safeStrCmp(tab_lable, RINGTONE_STR)) { + sub_view = __get_ringtone_list(ad); + } + + Evas_Object *old_sub_view = elm_object_part_content_get(ad->view_layout, "elm.swallow.content"); + ret_if(old_sub_view == sub_view); + + if (sub_view) { + if (old_sub_view) + { + elm_object_part_content_unset(ad->view_layout, "elm.swallow.content"); + evas_object_hide(old_sub_view); + } + elm_object_part_content_set(ad->view_layout, "elm.swallow.content", sub_view); + evas_object_show(sub_view); + } +} + +static int setting_profile_sound_main_create(void *cb) +{ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingProfileUG *ad = (SettingProfileUG *) cb; + + ad->ly_main = setting_create_win_layout(ad->win_main_layout, ad->win_get); + ad->navi_bar = setting_create_navi_bar(ad->ly_main); + + /* view layout */ + Evas_Object *view_layout = elm_layout_add(ad->win_main_layout); + elm_layout_theme_set(view_layout, "layout", "application", "default"); + evas_object_show(view_layout); + ad->view_layout = view_layout; + + Evas_Object *tabbar= elm_toolbar_add(ad->navi_bar); + if(tabbar == NULL) + return SETTING_RETURN_FAIL; + + elm_object_part_content_set(view_layout, "elm.swallow.tabbar", tabbar); + ad->ctrl_bar = tabbar; + elm_toolbar_shrink_mode_set(tabbar, ELM_TOOLBAR_SHRINK_EXPAND); + elm_object_style_set(tabbar, "tabbar"); + elm_toolbar_transverse_expanded_set(tabbar, EINA_TRUE); + + ad->ctrl_item[0] = elm_toolbar_item_append(tabbar, + IMG_CTRL_ICON_VOLUME, + VOLUME_STR, __view_change_cb, ad); + + ad->ctrl_item[1] = elm_toolbar_item_append(tabbar, + IMG_CTRL_ICON_RINGTONE, + RINGTONE_STR, __view_change_cb, ad); + + elm_toolbar_select_mode_set(tabbar, ELM_OBJECT_SELECT_MODE_ALWAYS); + elm_toolbar_item_selected_set(ad->ctrl_item[0], EINA_TRUE); + + Evas_Object *ug_back_btn = elm_button_add(ad->navi_bar); + elm_object_style_set(ug_back_btn, NAVI_BACK_BUTTON_STYLE); + evas_object_smart_callback_add(ug_back_btn, "clicked", setting_profile_sound_main_click_softkey_cancel_cb, ad); + + Elm_Object_Item *navi_it = elm_naviframe_item_push(ad->navi_bar, _(KeyStr_Sounds), ug_back_btn, NULL, ad->view_layout, "tabbar"); + elm_object_item_part_content_set(navi_it, "tabbar", tabbar); + //elm_naviframe_item_title_visible_set(navi_it, EINA_FALSE); + + setting_view_profile_sound_main.is_create = TRUE; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_profile_sound_main_destroy(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingProfileUG *ad = (SettingProfileUG *) cb; + + __setting_profile_ug_key_ungrab(ad); + + if (ad->ly_main != NULL) { + //Fix the memory leak, + //Manage ad->sub_view[] separately, unset first, then delete in together + if (ad->view_layout) + { + elm_object_part_content_unset(ad->view_layout, "elm.swallow.content"); + } + int i = SETTING_PROF_VIEW_VOL; + for (; i < SETTING_PROF_VIEW_MAX; i++ ) + { + evas_object_del(ad->sub_view[i]); + } + + evas_object_del(ad->ly_main); + setting_view_profile_sound_main.is_create = FALSE; + } + return SETTING_RETURN_SUCCESS; +} + +static int setting_profile_sound_main_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingProfileUG *ad = (SettingProfileUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_show(ad->ly_main); + } + + int volume = 0; + + sound_manager_get_volume(SOUND_TYPE_RINGTONE, &volume); + SETTING_TRACE_DEBUG("ringtone volume is %d", volume); + if(ad->data_call_volume && ad->data_call_volume->eo_check) + elm_slider_value_set(ad->data_call_volume->eo_check, (double)volume); + + return SETTING_RETURN_SUCCESS; +} + +static int setting_profile_sound_main_cleanup(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingProfileUG *ad = (SettingProfileUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_hide(ad->ly_main); + } + + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void setting_profile_sound_main_click_softkey_cancel_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + /* error check */ + ret_if(data == NULL); + + SettingProfileUG *ad = (SettingProfileUG *) data; + + /* close mm plaer */ + setting_profile_close_all_mm_players(ad); + /* close vibration */ + if (haptic_stop_all_effects(ad->hnd_hpt) != 0) { + SETTING_TRACE("ERROR haptic_stop_all_effects"); + /* return; */ + } + + /* Send destroy request */ + ug_destroy_me(ad->ug); + + return; +} + +static void setting_profile_sound_main_destroy_myfile_ug_cb(ui_gadget_h ug, void *priv) +{ + ret_if(priv == NULL); + SettingProfileUG *ad = (SettingProfileUG *) priv; + + __setting_profile_ug_key_grab(ad); + + if (ug) { + ug_destroy(ug); + ad->ug_loading = NULL; + } +} + +static void +setting_profile_sound_main_result_myfile_ug_cb(ui_gadget_h ug, + service_h result, void *priv) +{ + ret_if(priv == NULL); + + SettingProfileUG *ad = (SettingProfileUG *) priv; + char *ringtone_file = NULL; + char *ringtone_path = NULL; + + service_get_extra_data(result, "result", &ringtone_path); + if(!ringtone_path) + return; + + SETTING_TRACE("ringtone_path:%s", ringtone_path); + + if (ringtone_path != NULL) { + ringtone_file = setting_file_basename(ringtone_path); + SETTING_TRACE("ringtone_file:%s", ringtone_file); + + if (0 == safeStrCmp(ad->ringtone_type, SETTING_SOUND_TEXT_CALL_RINGTONE)) { + if (vconf_set_str + (VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, ringtone_path) == 0) { + if (ad->data_call_alert_tone) { + ad->data_call_alert_tone->sub_desc = (char *)g_strdup(ringtone_file); + + elm_object_item_data_set(ad->data_call_alert_tone->item, ad->data_call_alert_tone); + elm_genlist_item_update(ad->data_call_alert_tone->item); + } + } + } else if (0 == + safeStrCmp(ad->ringtone_type, SETTING_SOUND_TEXT_MSG_ALERT)) { + if (vconf_set_str + (VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, ringtone_path) == 0) { + if (ad->data_msg_alert_tone) { + ad->data_msg_alert_tone->sub_desc = (char *)g_strdup(ringtone_file); + + elm_object_item_data_set(ad->data_msg_alert_tone->item, ad->data_msg_alert_tone); + elm_genlist_item_update(ad->data_msg_alert_tone->item); + } + } + } else if (0 == + safeStrCmp(ad->ringtone_type, SETTING_SOUND_TEXT_EMAIL_ALERT)) { + if (vconf_set_str + (VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR, ringtone_path) == 0) { + if (ad->data_email_alert_tone) { + ad->data_email_alert_tone->sub_desc = (char *)g_strdup(ringtone_file); + + elm_object_item_data_set(ad->data_email_alert_tone->item, ad->data_email_alert_tone); + elm_genlist_item_update(ad->data_email_alert_tone->item); + } + } + } + } + + G_FREE(ringtone_file); + return; +} + +static void +setting_profile_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode, + void *priv) +{ + ret_if(priv == NULL); + + SettingProfileUG *ad = (SettingProfileUG *) priv; + Evas_Object *base; + + base = (Evas_Object *) ug_get_layout(ug); + if (!base) + return; + + switch (mode) { + case UG_MODE_FULLVIEW: + evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + //elm_win_resize_object_add(ad->win_get, base); + evas_object_show(base); + break; + default: + break; + } +} + + +static void setting_profile_sound_main_create_myfile_ug(SettingProfileUG *ad) +{ + ret_if(ad == NULL); + + if(ad->ug_loading) + { + SETTING_TRACE("Myfiles ug is already loaded."); + return; + } + + struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs)); + if (!cbs) + return; + + cbs->layout_cb = setting_profile_layout_ug_cb; + cbs->result_cb = setting_profile_sound_main_result_myfile_ug_cb; + cbs->destroy_cb = setting_profile_sound_main_destroy_myfile_ug_cb; + cbs->priv = (void *)ad; + + service_h svc; + if (service_create(&svc)) { + FREE(cbs); + return; + } + + const char *pa_cur_ringtone = NULL; + const char *dir_path = NULL; + if (0 == safeStrCmp(ad->ringtone_type, SETTING_SOUND_TEXT_CALL_RINGTONE)) { + pa_cur_ringtone = vconf_get_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR); + if (pa_cur_ringtone == NULL) + { + pa_cur_ringtone = (char *)strdup(SETTING_DEFAULT_CALL_TONE); + } + dir_path = SETTING_PROFILE_SOUND_RINGTONES_PATH; + } else if (0 == safeStrCmp(ad->ringtone_type, SETTING_SOUND_TEXT_MSG_ALERT)) { + pa_cur_ringtone = vconf_get_str(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR); + if (pa_cur_ringtone == NULL) + pa_cur_ringtone = (char *)strdup(SETTING_DEFAULT_MSG_TONE); + dir_path = SETTING_PROFILE_SOUND_ALERTS_PATH; + } else if (0 == safeStrCmp(ad->ringtone_type, SETTING_SOUND_TEXT_EMAIL_ALERT)) { + pa_cur_ringtone = vconf_get_str(VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR); + if (pa_cur_ringtone == NULL) + pa_cur_ringtone = (char *)strdup(SETTING_DEFAULT_EMAIL_TONE); + dir_path = SETTING_PROFILE_SOUND_ALERTS_PATH; + } + SETTING_TRACE("pa_cur_ringtone:\t%s", pa_cur_ringtone); + SETTING_TRACE("dir_path:\t%s", dir_path); + + service_add_extra_data(svc, "marked_mode", pa_cur_ringtone); + service_add_extra_data(svc, "path", dir_path); + service_add_extra_data(svc, "select_type", "SINGLE_FILE"); + service_add_extra_data(svc, "file_type", "SOUND"); + service_add_extra_data(svc, "drm_type", "DRM_ALL"); + + SETTING_TRACE("ad->ug->layout:%p", (void *)ug_get_layout(ad->ug)); + ad->ug_loading = ug_create(ad->ug, "myfile-efl", UG_MODE_FULLVIEW, svc, cbs); + if (NULL == ad->ug_loading) { /* error handling */ + SETTING_TRACE_ERROR("NULL == ad->ug_loading"); + } + + service_destroy(svc); + FREE(cbs); + + /** @todo verify it's valid */ + if(pa_cur_ringtone) { + free(pa_cur_ringtone); + pa_cur_ringtone = NULL; + } + + __setting_profile_ug_key_ungrab(ad); + return; +} + +static void +setting_profile_sound_main_Gendial_chk_cb(void *data, Evas_Object *obj, + void *event_info) +{ + /* error check */ + ret_if(data == NULL); + + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + SettingProfileUG *ad = list_item->userdata; + + int state = list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */ + + /* restore the selected check status */ + list_item->chk_status = state; + elm_check_state_set(list_item->eo_check, state); + + if (!safeStrCmp(SETTING_SOUND_TEXT_SOUND, list_item->keyStr)) { + if (vconf_set_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, list_item->chk_status) < 0) { + list_item->chk_status = !state; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + } + + if (list_item->chk_status) { + setting_enable_genlist_item(ad->data_call_volume->item); + setting_enable_genlist_item(ad->data_noti_volume->item); + setting_enable_genlist_item(ad->data_media_volume->item); + setting_enable_genlist_item(ad->data_touch_volume->item); + } else { + setting_profile_close_all_mm_players(ad); + setting_disable_genlist_item(ad->data_call_volume->item); + setting_disable_genlist_item(ad->data_noti_volume->item); + setting_disable_genlist_item(ad->data_media_volume->item); + setting_disable_genlist_item(ad->data_touch_volume->item); + } + } else if (!safeStrCmp(SETTING_SOUND_TEXT_VIBRATION, list_item->keyStr)) { + if (vconf_set_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, list_item->chk_status) < 0) { + list_item->chk_status = !state; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + } + if (list_item->chk_status) { + setting_enable_genlist_item(ad->data_vib_volume->item); + setting_enable_genlist_item(ad->data_touch_vib->item); + + /* Play vib if vib turns on */ + int err = 0; + char pattern_file[MAX_COMMON_BUFFER_LEN] = {0,}; + svi_get_path(SVI_TYPE_VIB, SVI_VIB_NOTIFICATION_GENERAL, pattern_file, sizeof(pattern_file)); + haptic_stop_all_effects(ad->hnd_hpt); + err = haptic_vibrate_file_with_detail(ad->hnd_hpt, pattern_file, 1, (int)(elm_slider_value_get(ad->data_vib_volume->eo_check)+0.5) * SETTING_VIB_FEEDBACK_RATE, HAPTIC_PRIORITY_MIN, NULL); + + if (err < 0) + SETTING_TRACE("Failed to play haptic monotone"); + } else { + if (haptic_stop_all_effects(ad->hnd_hpt) != 0) { + SETTING_TRACE("ERROR haptic_stop_all_effects"); + } + setting_disable_genlist_item(ad->data_vib_volume->item); + setting_disable_genlist_item(ad->data_touch_vib->item); + } + } + /* additional items */ + else if (!safeStrCmp(SETTING_SOUND_TEXT_LOCK_SOUND, list_item->keyStr)) { + if (vconf_set_bool(VCONFKEY_SETAPPL_SOUND_LOCK_BOOL, list_item->chk_status) < 0) { + list_item->chk_status = !state; + elm_check_state_set(list_item->eo_check, !state); + } + } + else if (!safeStrCmp("IDS_ST_BODY_TOUCH_SOUNDS", list_item->keyStr)) { + if (vconf_set_bool(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL, list_item->chk_status) < 0) { + list_item->chk_status = !state; + elm_check_state_set(list_item->eo_check, !state); + } + } + + /* end */ + +} + +static void +setting_profile_sound_main_mouse_up_Gendial_list_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + /* error check */ + ret_if(data == NULL); + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + SettingProfileUG *ad = data; + + if(ad->hnd_hpt) + haptic_stop_all_effects(ad->hnd_hpt); + + SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); + if (!safeStrCmp(SETTING_SOUND_TEXT_CALL_RINGTONE, list_item->keyStr) + || !safeStrCmp(SETTING_SOUND_TEXT_MSG_ALERT, list_item->keyStr) + || !safeStrCmp(SETTING_SOUND_TEXT_EMAIL_ALERT, list_item->keyStr)) { + ad->ringtone_type = list_item->keyStr; + setting_profile_sound_main_create_myfile_ug(ad); + } else if (!safeStrCmp(SETTING_SOUND_TEXT_SOUND, list_item->keyStr)) { + int old_status = elm_check_state_get(list_item->eo_check); + if (vconf_set_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, !old_status) == 0) { + /* new status */ + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + if (list_item->chk_status) { + setting_enable_genlist_item(ad->data_call_volume->item); + setting_enable_genlist_item(ad->data_noti_volume->item); + setting_enable_genlist_item(ad->data_media_volume->item); + setting_enable_genlist_item(ad->data_touch_volume->item); + } else { + setting_profile_close_all_mm_players(ad); + setting_disable_genlist_item(ad->data_call_volume->item); + setting_disable_genlist_item(ad->data_noti_volume->item); + setting_disable_genlist_item(ad->data_media_volume->item); + setting_disable_genlist_item(ad->data_touch_volume->item); + } + } + return; + } else if (!safeStrCmp(SETTING_SOUND_TEXT_VIBRATION, list_item->keyStr)) { + int old_status = elm_check_state_get(list_item->eo_check); + if (vconf_set_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, !old_status) == 0) { + /* new status */ + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + if (list_item->chk_status) { + setting_enable_genlist_item(ad->data_vib_volume->item); + setting_enable_genlist_item(ad->data_touch_vib->item); + + /* Play vib if vib turns on */ + int err = 0; + char pattern_file[MAX_COMMON_BUFFER_LEN] = {0,}; + svi_get_path(SVI_TYPE_VIB, SVI_VIB_NOTIFICATION_GENERAL, pattern_file, sizeof(pattern_file)); + haptic_stop_all_effects(ad->hnd_hpt); + err = haptic_vibrate_file_with_detail(ad->hnd_hpt, pattern_file, 1, (int)(elm_slider_value_get(ad->data_vib_volume->eo_check)+0.5) * SETTING_VIB_FEEDBACK_RATE, HAPTIC_PRIORITY_MIN, NULL); + + if (err < 0) + SETTING_TRACE("Failed to play haptic monotone"); + } else { + if (haptic_stop_all_effects(ad->hnd_hpt) != 0) { + SETTING_TRACE("ERROR haptic_stop_all_effects"); + } + setting_disable_genlist_item(ad->data_vib_volume->item); + setting_disable_genlist_item(ad->data_touch_vib->item); + } + } + return; + } + else if (!safeStrCmp("IDS_ST_BODY_TOUCH_SOUNDS", list_item->keyStr)) { + int old_status = elm_check_state_get(list_item->eo_check); + /* To do : set vconfkey for touch sounds */ + if (vconf_set_bool(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL, !old_status) == 0) { + /* new status */ + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + } + } + /* end */ + else if (ad->data_msg_alert_repeat == list_item + || ad->data_email_alert_repeat == list_item) { + bool status = !elm_genlist_item_expanded_get(item); + elm_genlist_item_expanded_set(item, status); + } +} + +static void +setting_profile_sound_main_call_ringtone_sound_slider_value_change_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + /* error check */ + ret_if(data == NULL); + + double val = elm_slider_value_get(obj); + + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + SettingProfileUG *ad = list_item->userdata; + + if(ad->mp_ringtone == NULL) + return; + + if(list_item->chk_status != (int)(val+0.5)) + { + list_item->chk_status = (int)(val+0.5); + sound_manager_set_volume(SOUND_TYPE_RINGTONE, list_item->chk_status); + SETTING_TRACE_DEBUG("ringtone volume is %d, %f", list_item->chk_status, val); + } +} + +static void +setting_profile_sound_main_noti_sound_slider_value_change_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + /* error check */ + ret_if(data == NULL); + + double val = elm_slider_value_get(obj); + + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + SettingProfileUG *ad = list_item->userdata; + + if(ad->mp_noti == NULL) + return; + + if(list_item->chk_status != (int)(val+0.5)) + { + list_item->chk_status = val; + sound_manager_set_volume(SOUND_TYPE_NOTIFICATION, list_item->chk_status); + SETTING_TRACE_DEBUG("notification volume is %d, %f", list_item->chk_status, val); + } +} + +static void +setting_profile_sound_main_media_sound_slider_value_change_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + /* error check */ + ret_if(data == NULL); + + double val = elm_slider_value_get(obj); + + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + SettingProfileUG *ad = list_item->userdata; + + if(ad->mp_media == NULL) + return; + if(list_item->chk_status != (int)(val+0.5)) + { + list_item->chk_status = val; + sound_manager_set_volume(SOUND_TYPE_MEDIA, list_item->chk_status); + SETTING_TRACE_DEBUG("media volume is %d, %f", list_item->chk_status, val); + } +} + +static void +settings_profile_sound_main_sys_sound_slider_value_change_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + /* error check */ + ret_if(data == NULL); + + double val = elm_slider_value_get(obj); + + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + SettingProfileUG *ad = list_item->userdata; + + if(ad->mp_sys == NULL) + return; + + if(list_item->chk_status != (int)(val+0.5)) + { + list_item->chk_status = val; + sound_manager_set_volume(SOUND_TYPE_SYSTEM, list_item->chk_status); + SETTING_TRACE_DEBUG("system volume is %d, %f", list_item->chk_status, val); + } +} + +static void +setting_profile_sound_main_vib_sound_slider_value_change_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + ret_if(data == NULL); + + static double priv_val_db = 5.0; + static int priv_val_int = 0; + double val = elm_slider_value_get(obj); + SETTING_TRACE("val = %f", val); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + SettingProfileUG *ad = list_item->userdata; + + int value; + int err; + + value = (int)(val + 0.5); /* to sync displayed value on slider */ + list_item->chk_status = value; + if (value != priv_val_int) { + vconf_set_int(VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT, value); + SETTING_TRACE_DEBUG("current %d", value); + char pattern_file[MAX_COMMON_BUFFER_LEN] = {0,}; + svi_get_path(SVI_TYPE_VIB, SVI_VIB_NOTIFICATION_GENERAL, pattern_file, sizeof(pattern_file)); + haptic_stop_all_effects(ad->hnd_hpt); + err = haptic_vibrate_file_with_detail(ad->hnd_hpt, pattern_file, 1, list_item->chk_status * SETTING_VIB_FEEDBACK_RATE, HAPTIC_PRIORITY_MIN, NULL); + + if (err < 0) + SETTING_TRACE("Failed to play haptic monotone"); + priv_val_int = value; + } + priv_val_db = val; + +} + +static void +setting_profile_sound_main_touchVib_sound_slider_value_change_cb(void *data, + Evas_Object * + obj, void + *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + ret_if(data == NULL); + + static double priv_val_db = 3.0; + static int priv_val_int = 0; + double val = elm_slider_value_get(obj); + SETTING_TRACE("val = %f", val); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + SettingProfileUG *ad = list_item->userdata; + + int value; + int err; + + value = (int)(val + 0.5); /* to sync displayed value on slider */ + list_item->chk_status = value; + if (value != priv_val_int) { + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, value); + SETTING_TRACE_DEBUG("current %d", value); + char pattern_file[MAX_COMMON_BUFFER_LEN] = {0,}; + svi_get_path(SVI_TYPE_VIB, SVI_VIB_OPERATION_VIBRATION, pattern_file, sizeof(pattern_file)); + haptic_stop_all_effects(ad->hnd_hpt); + err = haptic_vibrate_file_with_detail(ad->hnd_hpt, pattern_file, 1, list_item->chk_status * SETTING_VIB_FEEDBACK_RATE, HAPTIC_PRIORITY_MIN, NULL); + + if (err < 0) + SETTING_TRACE("Failed to play haptic monotone"); + priv_val_int = value; + } + priv_val_db = val; +} + diff --git a/setting-profile/src/setting-profile.c b/setting-profile/src/setting-profile.c new file mode 100755 index 0000000..cae80ba --- /dev/null +++ b/setting-profile/src/setting-profile.c @@ -0,0 +1,1199 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include +#include +#include + +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif + +SettingProfileUG *g_ProfileUG = NULL; /* just a handler */ + +extern char *repeat_type[]; + +static void setting_profile_ug_cb_resize(void *data, Evas *e, + Evas_Object *obj, void *event_info) +{ + ret_if(data == NULL); + + SettingProfileUG *ad = (SettingProfileUG *) data; + setting_view_update(&setting_view_profile_sound_main, ad); + +} + +/** + *@ To sync Setting App volume with Volume Hard key volume + */ + +void __sound_volume_changed_cb(sound_type_e type, unsigned int volume, void *user_data) +{ + SETTING_TRACE_BEGIN; + ret_if(!user_data); + SettingProfileUG *ad = user_data; + Setting_GenGroupItem_Data *item_data = NULL; + + Evas_Object *slider = NULL; + switch (type) + { + case SOUND_TYPE_SYSTEM: + SETTING_TRACE_DEBUG("system"); + if (ad->data_touch_volume) + item_data = ad->data_touch_volume; + //slider = ad->data_touch_volume->eo_check; + break; + case SOUND_TYPE_NOTIFICATION: + SETTING_TRACE_DEBUG("notification"); + if (ad->data_noti_volume) + item_data = ad->data_noti_volume; + //slider = ad->data_noti_volume->eo_check; + break; + case SOUND_TYPE_RINGTONE: + SETTING_TRACE_DEBUG("ringtone"); + if (ad->data_call_volume) + item_data = ad->data_call_volume; + //slider = ad->data_call_volume->eo_check; + break; + case SOUND_TYPE_MEDIA: + SETTING_TRACE_DEBUG("media"); + if (ad->data_media_volume) + item_data = ad->data_media_volume; + //slider = ad->data_media_volume->eo_check; + break; + //At present, there are only 4 types supported:RINGTONE,NOTIFICATION,SYSTEM,MEDIA + default: + SETTING_TRACE_ERROR("Invalid sound type:%d", type); + return; + } + + if (item_data && item_data->eo_check) + { + SETTING_TRACE_DEBUG("update slider value"); + int volume = 0; + double old_volume = 0; + sound_manager_get_volume(type, &volume); /* system */ + SETTING_TRACE_DEBUG("get_volume is %d", volume); + + old_volume = elm_slider_value_get(item_data->eo_check); + SETTING_TRACE_DEBUG("slider volume is %d", old_volume); + if ((int)volume != (int)(old_volume + 0.5)) { /* reset again */ + elm_slider_value_set(item_data->eo_check, (double)volume); + SETTING_TRACE_DEBUG("update to new value %d", volume); + item_data->chk_status = volume; + elm_genlist_item_update(item_data->item); + } + } +} + +#if DISABLED_CODE +static char* __gl_sound_slider_text_get(void *data, Evas_Object *obj, const char *part) +{ + retv_if(data == NULL, NULL); + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data*)data; + + if(item_data->keyStr) + return (char*)g_strdup(_(item_data->keyStr)); + else + return NULL; +} +#endif +static Evas_Object* __gl_sound_slider_content_get(void *data, Evas_Object *obj, const char *part) +{ + //appcore_measure_start(); + retv_if(data == NULL, NULL); + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data*)data; + Evas_Object *slider = setting_create_slider(obj, item_data->evas, + item_data->l_swallow_path, + item_data->r_swallow_path, + item_data->chk_status, + item_data->isIndicatorVisible, + item_data->slider_min, + item_data->slider_max, + item_data->chk_change_cb, + item_data->start_change_cb, + item_data->stop_change_cb, + item_data); + + if(slider == NULL) + return NULL; + + item_data->eo_check = slider; + + evas_object_pass_events_set(slider, EINA_TRUE); + evas_object_propagate_events_set(slider, EINA_FALSE); + + if(item_data->userdata == NULL) + return NULL; + + SettingProfileUG *ad = (SettingProfileUG*)item_data->userdata; + + if((item_data->belongs_to == SETTING_VOL_SOUND_GROUP) + && (ad->data_sound) + && (ad->data_sound->chk_status == FALSE)) + setting_disable_genlist_item(item_data->item); + else if((item_data->belongs_to == SETTING_VOL_VIBRATION_GROUP) + && (ad->data_vibration) + && (ad->data_vibration->chk_status == FALSE)) + setting_disable_genlist_item(item_data->item); + + return slider; +} + +static void __gl_sound_slider_del(void *data, Evas_Object *obj) +{ + Setting_GenGroupItem_Data *item_data = + (Setting_GenGroupItem_Data *) data; + if (item_data) { + G_FREE(item_data->keyStr); + G_FREE(item_data->sub_desc); + G_FREE((item_data->l_swallow_path)); + G_FREE((item_data->r_swallow_path)); + G_FREE(item_data->item_style); + + + if (item_data->digits_filter_data) + { + G_FREE(item_data->digits_filter_data->accepted); + G_FREE(item_data->digits_filter_data->rejected); + FREE(item_data->digits_filter_data); + + } + + if (item_data->notify) { + evas_object_del(item_data->notify); + item_data->notify = NULL; + } + + FREE(item_data->limit_filter_data); + FREE(item_data); + } + return; +} + +static void setting_profile_vconf_change_cb(keynode_t *key, void *data) +{ + ret_if(data == NULL); + + SettingProfileUG *ad = data; + int status = 0; + int ret = 0; + char *pa_ringtone = NULL; + char *sub_desc = NULL; + char *vconf_name = vconf_keynode_get_name(key); + + if (!safeStrCmp(vconf_name, VCONFKEY_SYSMAN_MMC_STATUS)) { + status = vconf_keynode_get_int(key); + SETTING_TRACE("status:%d", status); + if (VCONFKEY_SYSMAN_MMC_MOUNTED != status) { + ret_if((!ad->mp_ringtone && !ad->mp_noti && !ad->mp_media && !ad->mp_sys)); + SETTING_TRACE("song_playing:%s", ad->song_playing); + + if (!safeStrNCmp(SETTING_PROFILE_MMC_PATH, ad->song_playing, + safeStrLen(SETTING_PROFILE_MMC_PATH))) { + /* close mm plaer */ + setting_profile_close_all_mm_players(ad); + /* close vibration */ + #if MIGRATION_HAPTIC + if (haptic_stop_all_effects(ad->hnd_hpt) != 0) { + SETTING_TRACE("ERROR haptic_stop_all_effects"); + } + #endif + } + /* when remove mmc card, change default tone */ + char *call_tone = vconf_get_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR); + if(call_tone && !safeStrNCmp(SETTING_PROFILE_MMC_PATH, call_tone, safeStrLen(SETTING_PROFILE_MMC_PATH))) + { + ret = vconf_set_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, SETTING_DEFAULT_CALL_TONE); + if(ret < 0) + SETTING_TRACE_DEBUG("failed to set vconf"); + } + } + } + else if (!safeStrCmp(vconf_name, VCONFKEY_SETAPPL_SOUND_STATUS_BOOL)) { + status = vconf_keynode_get_bool(key); + SETTING_TRACE_DEBUG("sound status is changed. %d", status); + elm_check_state_set(ad->data_sound->eo_check, status); + if(status) + { + setting_enable_genlist_item(ad->data_call_volume->item); + setting_enable_genlist_item(ad->data_noti_volume->item); + setting_enable_genlist_item(ad->data_media_volume->item); + setting_enable_genlist_item(ad->data_touch_volume->item); + } + else + { + setting_disable_genlist_item(ad->data_call_volume->item); + setting_disable_genlist_item(ad->data_noti_volume->item); + setting_disable_genlist_item(ad->data_media_volume->item); + setting_disable_genlist_item(ad->data_touch_volume->item); + } + } + else if (!safeStrCmp(vconf_name, VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL)) { + status = vconf_keynode_get_bool(key); + SETTING_TRACE_DEBUG("vibration status is changed. %d", status); + elm_check_state_set(ad->data_vibration->eo_check, status); + if(status) + { + setting_enable_genlist_item(ad->data_vib_volume->item); + setting_enable_genlist_item(ad->data_touch_vib->item); + } + else + { + setting_disable_genlist_item(ad->data_vib_volume->item); + setting_disable_genlist_item(ad->data_touch_vib->item); + } + } + else if (!safeStrCmp(vconf_name, VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR)) { + pa_ringtone = (char *)g_strdup(vconf_keynode_get_str(key)); + if(setting_profile_check_file_exist(ad, pa_ringtone) == SETTING_RETURN_FAIL) + { + G_FREE(pa_ringtone); + pa_ringtone = (char *)strdup(SETTING_DEFAULT_CALL_TONE); + ret = vconf_set_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, pa_ringtone); + if(ret < 0) + SETTING_TRACE_DEBUG("failed to set vconf"); + } + sub_desc = setting_file_basename(pa_ringtone); + if(ad->data_call_alert_tone) + { + ad->data_call_alert_tone->sub_desc = (char*)g_strdup(sub_desc); + elm_genlist_item_update(ad->data_call_alert_tone->item); + } + G_FREE(pa_ringtone); + G_FREE(sub_desc); + } + else if (!safeStrCmp(vconf_name, VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR)) { + pa_ringtone = (char *)g_strdup(vconf_keynode_get_str(key)); + if(setting_profile_check_file_exist(ad, pa_ringtone) == SETTING_RETURN_FAIL) + { + G_FREE(pa_ringtone); + pa_ringtone = (char *)g_strdup(SETTING_DEFAULT_MSG_TONE); + ret = vconf_set_str(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, pa_ringtone); + if(ret < 0) + SETTING_TRACE_DEBUG("failed to set vconf"); + } + sub_desc = setting_file_basename(pa_ringtone); + if(ad->data_msg_alert_tone) + { + ad->data_msg_alert_tone->sub_desc = (char*)g_strdup(sub_desc); + elm_genlist_item_update(ad->data_msg_alert_tone->item); + } + G_FREE(pa_ringtone); + G_FREE(sub_desc); + } + else if (!safeStrCmp(vconf_name, VCONFKEY_SETAPPL_NOTI_MSG_ALERT_REP_TYPE_INT)) { + status = vconf_keynode_get_int(key); + + if(status >= 0 && ad->data_msg_alert_repeat) + { + ad->data_msg_alert_repeat->sub_desc = (char*)g_strdup(_(repeat_type[status])); + elm_genlist_item_update(ad->data_msg_alert_repeat->item); + } + } + else if (!safeStrCmp(vconf_name, VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR)) { + pa_ringtone = (char *)g_strdup(vconf_keynode_get_str(key)); + if(setting_profile_check_file_exist(ad, pa_ringtone) == SETTING_RETURN_FAIL) + { + G_FREE(pa_ringtone); + pa_ringtone = (char *)g_strdup(SETTING_DEFAULT_EMAIL_TONE); + ret = vconf_set_str(VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR, pa_ringtone); + if(ret < 0) + SETTING_TRACE_DEBUG("failed to set vconf"); + } + sub_desc = setting_file_basename(pa_ringtone); + if(ad->data_email_alert_tone) + { + ad->data_email_alert_tone->sub_desc = (char*)g_strdup(sub_desc); + elm_genlist_item_update(ad->data_email_alert_tone->item); + } + G_FREE(pa_ringtone); + G_FREE(sub_desc); + } + else if (!safeStrCmp(vconf_name, VCONFKEY_SETAPPL_NOTI_EMAIL_ALERT_REP_TYPE_INT)) { + status = vconf_keynode_get_int(key); + + if(status >= 0 && ad->data_email_alert_repeat) + { + ad->data_email_alert_repeat->sub_desc = (char*)g_strdup(_(repeat_type[status])); + elm_genlist_item_update(ad->data_email_alert_repeat->item); + } + } +} + +int setting_profile_listen_vconf_change(void *data) +{ + retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + int ret = 0; + + ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_MMC_STATUS, + setting_profile_vconf_change_cb, data); + setting_retvm_if(ret < 0, ret, "%s notifications Failed(%d)", + (char *)VCONFKEY_SYSMAN_MMC_STATUS, ret); + + ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, + setting_profile_vconf_change_cb, data); + setting_retvm_if(ret < 0, ret, "%s notifications Failed(%d)", + (char *)VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, ret); + + ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, + setting_profile_vconf_change_cb, data); + setting_retvm_if(ret < 0, ret, "%s notifications Failed(%d)", + (char *)VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, ret); + + /* add ringtone tab's vconfkeys */ + // incoming call ringtone. + ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, + setting_profile_vconf_change_cb, data); + setting_retvm_if(ret < 0, ret, "%s notifications Failed(%d)", + (char *)VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, ret); + // message alert tone + ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, + setting_profile_vconf_change_cb, data); + setting_retvm_if(ret < 0, ret, "%s notifications Failed(%d)", + (char *)VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, ret); + // message alert repitition. + ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_NOTI_MSG_ALERT_REP_TYPE_INT, + setting_profile_vconf_change_cb, data); + setting_retvm_if(ret < 0, ret, "%s notifications Failed(%d)", + (char *)VCONFKEY_SETAPPL_NOTI_MSG_ALERT_REP_TYPE_INT, ret); + // email alert tone. + ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR, + setting_profile_vconf_change_cb, data); + setting_retvm_if(ret < 0, ret, "%s notifications Failed(%d)", + (char *)VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR, ret); + // email_alert_repitition + ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_NOTI_EMAIL_ALERT_REP_TYPE_INT, + setting_profile_vconf_change_cb, data); + setting_retvm_if(ret < 0, ret, "%s notifications Failed(%d)", + (char *)VCONFKEY_SETAPPL_NOTI_EMAIL_ALERT_REP_TYPE_INT, ret); + + return 0; +} + +int setting_profile_unlisten_vconf_change(void *data) +{ + /* unused listen */ + (void)vconf_ignore_key_changed(VCONFKEY_SYSMAN_MMC_STATUS, + setting_profile_vconf_change_cb); + (void)vconf_ignore_key_changed(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, + setting_profile_vconf_change_cb); + (void)vconf_ignore_key_changed(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, + setting_profile_vconf_change_cb); + + (void)vconf_ignore_key_changed(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, + setting_profile_vconf_change_cb); + (void)vconf_ignore_key_changed(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, + setting_profile_vconf_change_cb); + (void)vconf_ignore_key_changed(VCONFKEY_SETAPPL_NOTI_MSG_ALERT_REP_TYPE_INT, + setting_profile_vconf_change_cb); + (void)vconf_ignore_key_changed(VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR, + setting_profile_vconf_change_cb); + (void)vconf_ignore_key_changed(VCONFKEY_SETAPPL_NOTI_EMAIL_ALERT_REP_TYPE_INT, + setting_profile_vconf_change_cb); + + return 0; +} + +void __setting_profile_ug_key_grab(SettingProfileUG *ad) +{ + SETTING_TRACE_BEGIN; + Ecore_X_Window xwin = 0; + Ecore_X_Display *disp = NULL; + + int ret = 0; + + if(ad == NULL) + return; + + disp = ecore_x_display_get(); + xwin = elm_win_xwindow_get((Evas_Object*)ug_get_window()); + + ret = utilx_grab_key(disp, xwin, KEY_VOLUMEUP, TOP_POSITION_GRAB); + if(ret) + return; + ret = utilx_grab_key(disp, xwin, KEY_VOLUMEDOWN, TOP_POSITION_GRAB); + if(ret) + return; + + ad->event_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, NULL, NULL); + SETTING_TRACE_END; +} +void __setting_profile_ug_key_ungrab(SettingProfileUG *ad) +{ + SETTING_TRACE_BEGIN; + Ecore_X_Window xwin = 0; + Ecore_X_Display *disp = NULL; + + int ret = 0; + + if(ad == NULL) + return; + + disp = ecore_x_display_get(); + xwin = elm_win_xwindow_get((Evas_Object*)ug_get_window()); + + ret = utilx_ungrab_key(disp, xwin, KEY_VOLUMEUP); + if(ret) + return; + ret = utilx_ungrab_key(disp, xwin, KEY_VOLUMEDOWN); + if(ret) + return; + + ecore_event_handler_del(ad->event_handler); +} + +static void *setting_profile_ug_on_create(ui_gadget_h ug, + enum ug_mode mode, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + //appcore_measure_start(); + retv_if(priv == NULL, NULL); + + SettingProfileUG *profileUG = priv; + profileUG->ug = ug; + g_ProfileUG = profileUG; + + profileUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug); + profileUG->win_get = (Evas_Object *) ug_get_window(); + + evas_object_show(profileUG->win_main_layout); + profileUG->evas = evas_object_evas_get(profileUG->win_main_layout); + + setting_retvm_if(profileUG->win_main_layout == NULL, NULL, "cannot get main window "); + + //At present, there are only 4 types supported:RINGTONE,NOTIFICATION,SYSTEM,MEDIA + sound_manager_set_volume_changed_cb(__sound_volume_changed_cb, profileUG); + + setting_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR); + + /* register view node table */ + setting_view_node_table_intialize(); + setting_view_node_table_register(&setting_view_profile_sound_main, NULL); + + setting_create_Gendial_itc("dialogue/1text.1icon", &(profileUG->itc_1text_1icon)); + setting_create_Gendial_itc("dialogue/title", &(profileUG->itc_group_item)); + setting_create_Gendial_itc("dialogue/2text.3", &(profileUG->itc_2text_2)); + profileUG->itc_layout.item_style = "dialogue/1icon"; + profileUG->itc_layout.func.text_get = NULL; //__gl_sound_slider_text_get; + profileUG->itc_layout.func.content_get = __gl_sound_slider_content_get; + profileUG->itc_layout.func.state_get = NULL; + profileUG->itc_layout.func.del = __gl_sound_slider_del; + + setting_create_Gendial_itc("dialogue/2text.3/expandable", &(profileUG->itc_2text_3_parent)); + setting_create_Gendial_itc("dialogue/1text.1icon/expandable2", &(profileUG->itc_1icon_1text_sub)); + setting_create_Gendial_itc("multiline/1text", &(profileUG->itc_bg_1icon)); + + profileUG->itc_seperator.item_style = "dialogue/separator"; + profileUG->itc_seperator.func.text_get = NULL; + profileUG->itc_seperator.func.content_get = NULL; + profileUG->itc_seperator.func.state_get = NULL; + profileUG->itc_seperator.func.del = NULL; + + /* creating a view. */ + setting_view_node_set_cur_view(&setting_view_profile_sound_main); + setting_view_create(&setting_view_profile_sound_main, (void *)profileUG); + + evas_object_event_callback_add(profileUG->win_main_layout, + EVAS_CALLBACK_RESIZE, + setting_profile_ug_cb_resize, profileUG); + + setting_profile_listen_vconf_change(profileUG); + + return profileUG->ly_main; +} + +static void setting_profile_ug_on_start(ui_gadget_h ug, service_h service, void *priv) +{ +} + +static void setting_profile_ug_on_pause(ui_gadget_h ug, service_h service, void *priv) +{ + ret_if(priv == NULL); + SettingProfileUG *profileUG = (SettingProfileUG*)priv; + + /* if click home key, players have to be closed */ + setting_profile_close_all_mm_players(profileUG); +} + +static void setting_profile_ug_on_resume(ui_gadget_h ug, service_h service, void *priv) +{ + ret_if(priv == NULL); + SettingProfileUG *profileUG = (SettingProfileUG *)priv; + + /* update path of tones */ + char *pa_tone_path = NULL; + + if(profileUG->data_call_volume) + { + int volume; + SETTING_TRACE_DEBUG("ringtone volume %x", profileUG->data_call_volume); + sound_manager_get_volume(SOUND_TYPE_RINGTONE, &volume); /* system */ + SETTING_TRACE_DEBUG("get_volume is %d", volume); + elm_slider_value_set(profileUG->data_call_volume->eo_check, (double)volume); + SETTING_TRACE_DEBUG("update to new value %d", volume); + } + if(profileUG->data_noti_volume) + { + int volume; + SETTING_TRACE_DEBUG("noti volume %x", profileUG->data_noti_volume); + sound_manager_get_volume(SOUND_TYPE_NOTIFICATION, &volume); /* system */ + SETTING_TRACE_DEBUG("get_volume is %d", volume); + elm_slider_value_set(profileUG->data_noti_volume->eo_check, (double)volume); + SETTING_TRACE_DEBUG("update to new value %d", volume); + } + if(profileUG->data_media_volume) + { + int volume; + SETTING_TRACE_DEBUG("media volume %x", profileUG->data_media_volume); + sound_manager_get_volume(SOUND_TYPE_MEDIA, &volume); /* system */ + SETTING_TRACE_DEBUG("get_volume is %d", volume); + elm_slider_value_set(profileUG->data_media_volume->eo_check, (double)volume); + SETTING_TRACE_DEBUG("update to new value %d", volume); + } + if(profileUG->data_touch_volume) + { + int volume; + SETTING_TRACE_DEBUG("system volume %x", profileUG->data_touch_volume); + sound_manager_get_volume(SOUND_TYPE_SYSTEM, &volume); /* system */ + SETTING_TRACE_DEBUG("get_volume is %d", volume); + elm_slider_value_set(profileUG->data_touch_volume->eo_check, (double)volume); + SETTING_TRACE_DEBUG("update to new value %d", volume); + } + + /* 1. incoming call ringtone */ + if(profileUG->data_call_alert_tone) + { + SETTING_TRACE_DEBUG("change call_alert_tone %x", profileUG->data_call_alert_tone); + pa_tone_path = vconf_get_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR); + if((pa_tone_path == NULL) || (setting_profile_check_file_exist(profileUG, pa_tone_path) == SETTING_RETURN_FAIL)) + { + pa_tone_path = (char *)strdup(SETTING_DEFAULT_CALL_TONE); + if(vconf_set_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, pa_tone_path) < 0) + return; + profileUG->data_call_alert_tone->sub_desc = setting_file_basename(pa_tone_path); + elm_genlist_item_update(profileUG->data_call_alert_tone->item); + } + + FREE(pa_tone_path); + } + + /* 2. message ringtone */ + if(profileUG->data_msg_alert_tone) + { + SETTING_TRACE_DEBUG("change msg_alert_tone %x", profileUG->data_msg_alert_tone); + pa_tone_path = vconf_get_str(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR); + if((pa_tone_path == NULL) || (setting_profile_check_file_exist(profileUG, pa_tone_path) == SETTING_RETURN_FAIL)) + { + pa_tone_path = (char *)strdup(SETTING_DEFAULT_MSG_TONE); + if(vconf_set_str(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, SETTING_DEFAULT_MSG_TONE) < 0) { + FREE(pa_tone_path); + return; + } + + profileUG->data_msg_alert_tone->sub_desc = setting_file_basename(pa_tone_path); + elm_genlist_item_update(profileUG->data_msg_alert_tone->item); + } + + FREE(pa_tone_path); + + } + + /* 3. email ringtone */ + if(profileUG->data_email_alert_tone) + { + SETTING_TRACE_DEBUG("change email_alert_tone %x", profileUG->data_email_alert_tone); + pa_tone_path = vconf_get_str(VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR); + if((pa_tone_path == NULL) || (setting_profile_check_file_exist(profileUG, pa_tone_path) == SETTING_RETURN_FAIL)) + { + pa_tone_path = (char *)strdup(SETTING_DEFAULT_MSG_TONE); + if(vconf_set_str(VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR, SETTING_DEFAULT_MSG_TONE) < 0) { + FREE(pa_tone_path); + return; + } + profileUG->data_email_alert_tone->sub_desc = setting_file_basename(pa_tone_path); + elm_genlist_item_update(profileUG->data_email_alert_tone->item); + } + + FREE(pa_tone_path); + + } +} + +static void setting_profile_ug_on_destroy(ui_gadget_h ug, service_h service, void *priv) +{ + ret_if(priv == NULL); + + SettingProfileUG *profileUG = priv; + + setting_profile_unlisten_vconf_change(profileUG); + evas_object_event_callback_del(profileUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_profile_ug_cb_resize); /* fix flash issue for gallery */ + profileUG->ug = ug; + + //At present, there are only 4 types supported:RINGTONE,NOTIFICATION,SYSTEM,MEDIA + sound_manager_unset_volume_changed_cb(); + + + int ret = haptic_close(profileUG->hnd_hpt); + if (ret != 0) { + SETTING_TRACE_DEBUG("%s*** [ERR] Failed haptic_deinitialize ***%s", + SETTING_FONT_RED, SETTING_FONT_BLACK); + } + setting_profile_close_all_mm_players(profileUG); + + /* it is the view manage strategy to invoke view's destory operation. */ + setting_view_destroy(&setting_view_profile_sound_main, profileUG); + if (NULL != ug_get_layout(profileUG->ug)) { + evas_object_hide((Evas_Object *) ug_get_layout(profileUG->ug)); + evas_object_del((Evas_Object *) ug_get_layout(profileUG->ug)); + } +} + +static void setting_profile_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) +{ + +} + +static void setting_profile_ug_on_event(ui_gadget_h ug, + enum ug_event event, service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + SettingProfileUG *ad = (SettingProfileUG *)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; + case UG_EVENT_REGION_CHANGE: + break; + default: + break; + } +} + +static void setting_profile_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, service_h service, void *priv) +{ + ret_if(priv == NULL); + + SettingProfileUG *ad = (SettingProfileUG *) priv; + + switch (event) { + case UG_KEY_EVENT_END: + if (elm_naviframe_top_item_get(ad->navi_bar) == + elm_naviframe_bottom_item_get(ad->navi_bar)) { + ug_destroy_me(ug); + } else { + if (&setting_view_profile_sound_main == + setting_view_node_get_cur_view()) { + + /* close mm plaer */ + setting_profile_close_all_mm_players(ad); + /* close vibration */ + #if MIGRATION_HAPTIC + if (haptic_stop_all_effects(ad->hnd_hpt) != 0) { + SETTING_TRACE("ERROR haptic_stop_all_effects"); + } + #endif + } + setting_view_cb_at_endKey(ad); + } + break; + default: + break; + } +} + +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + //appcore_measure_start(); + SettingProfileUG *profileUG = calloc(1, sizeof(SettingProfileUG)); + setting_retvm_if(!profileUG, -1, "Create SettingProfileUG obj failed"); + + ops->create = setting_profile_ug_on_create; + ops->start = setting_profile_ug_on_start; + ops->pause = setting_profile_ug_on_pause; + ops->resume = setting_profile_ug_on_resume; + ops->destroy = setting_profile_ug_on_destroy; + ops->message = setting_profile_ug_on_message; + ops->event = setting_profile_ug_on_event; + ops->key_event = setting_profile_ug_on_key_event; + ops->priv = profileUG; + ops->opt = UG_OPT_INDICATOR_ENABLE; + /* Haptic init */ + SETTING_TRACE("before haptic initilization"); + int haptic_return = 0; + haptic_return = haptic_open(HAPTIC_DEVICE_0, &(profileUG->hnd_hpt)); + SETTING_TRACE("profileUG->hnd_hpt : %d", profileUG->hnd_hpt); + if (haptic_return < 0) { + SETTING_TRACE_DEBUG("%s*** [ERR] Failed haptic_open ***%s", + SETTING_FONT_RED, SETTING_FONT_BLACK); + } + + return 0; +} + +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + ret_if(ops == NULL); + + struct SettingProfileUG *profileUG; + profileUG = ops->priv; + if (profileUG) + FREE(profileUG); +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +int setting_profile_check_file_exist(void *data, const char *file_path) +{ + retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + retv_if(file_path == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + if (!ecore_file_exists(file_path)) { + SETTING_TRACE_ERROR("Cannot find the ringtone file[%s]!", file_path); + return SETTING_RETURN_FAIL; + } + + int mmc_status = VCONFKEY_SYSMAN_MMC_REMOVED; + vconf_get_int(VCONFKEY_SYSMAN_MMC_STATUS, &mmc_status); + if (VCONFKEY_SYSMAN_MMC_MOUNTED != mmc_status) + { + if (!safeStrNCmp(SETTING_PROFILE_MMC_PATH, file_path, safeStrLen(SETTING_PROFILE_MMC_PATH))) + { + return SETTING_RETURN_FAIL; + } + } + return SETTING_RETURN_SUCCESS; +} + +player_h *setting_profile_play_sound(void *data, void *cb, + char *ringtone_file, + int vol, + sound_type_e sound_type) +{ + /* error check */ + retv_if(data == NULL, NULL); + + SettingProfileUG *ad = (SettingProfileUG *) data; + + int is_existing = setting_profile_check_file_exist(ad, ringtone_file); + if(is_existing == SETTING_RETURN_FAIL || NULL == ringtone_file) + { + char pattern_file[MAX_COMMON_BUFFER_LEN] = {0,}; + switch(sound_type) + { + case SOUND_TYPE_RINGTONE: + ad->song_playing = (char *)g_strdup(SETTING_DEFAULT_CALL_TONE); + break; + case SOUND_TYPE_MEDIA: + ad->song_playing = (char *)g_strdup(SETTING_DEFAULT_MEDIA_TONE); + break; + case SOUND_TYPE_NOTIFICATION: + ad->song_playing = (char *)g_strdup(SETTING_DEFAULT_MSG_TONE); + break; + case SOUND_TYPE_SYSTEM: + svi_get_path(SVI_TYPE_SND, SVI_SND_TOUCH_TOUCH1, pattern_file, sizeof(pattern_file)); + retv_if(pattern_file == NULL, NULL); + ad->song_playing = (char *)g_strdup(pattern_file); + break; + default: + ad->song_playing = (char *)g_strdup(SETTING_DEFAULT_CALL_TONE); + break; + } + + } + else { + ad->song_playing = (char *)g_strdup(ringtone_file); + } + + player_h *player = calloc(1, sizeof(player_h)); + if (!player) { + SETTING_TRACE_ERROR("failed to calloc player_h"); + return NULL; + } + + int err = 0; + + err = player_create(player); + if (err != PLAYER_ERROR_NONE) { + SETTING_TRACE_ERROR("creating the player handle failed[%d]", err); + free(player); + return NULL; + } + + err = player_set_sound_type(*player, sound_type); + if (err != PLAYER_ERROR_NONE) { + SETTING_TRACE_ERROR("error to set sound_type[%d]", err); + player_destroy(*player); + free(player); + return NULL; + } + SETTING_TRACE_DEBUG("player_set_sound_type [%d]", sound_type); + + err = player_set_uri(*player, ad->song_playing); + if (err != PLAYER_ERROR_NONE) { + SETTING_TRACE_ERROR("error to set attribute---profile_uri[%d]", err); + player_destroy(*player); + free(player); + return NULL; + } + + err = player_prepare(*player); + if (err != PLAYER_ERROR_NONE) { + SETTING_TRACE_ERROR("realizing the player handle failed[%d]", err); + player_destroy(*player); + free(player); + return NULL; + } + + player_state_e state = -1; + player_get_state(*player, &state); + SETTING_TRACE("state:%d", state); + + if (state != PLAYER_STATE_READY) { + SETTING_TRACE_ERROR("state of player is invalid %d", err); + player_unprepare(*player); + player_destroy(*player); + free(player); + return NULL; + } + + player_set_completed_cb(*player, cb, ad); + err = player_start(*player); + if (err != PLAYER_ERROR_NONE) { /* if directly return error.. */ + SETTING_TRACE_ERROR("player_start [%d]", err); + player_unset_completed_cb(*player); + player_unprepare(*player); + player_destroy(*player); + free(player); + return NULL; + } + + SETTING_TRACE("waiting.."); + ad->playing_volume = vol; + + return player; +} + +#define EXP 0.001 +void setting_profile_play_sound_origin(player_h **mp_handle, void *data, + void *cb, char *ringtone_file, + /* int vol, */ + float vol, + sound_type_e sound_type) +{ + /* error check */ + ret_if(data == NULL); + + if (vol < EXP) { + SETTING_TRACE_DEBUG("vol < EXP"); + if (*mp_handle) { + if (setting_profile_stop_sound(data, *mp_handle) != SETTING_RETURN_SUCCESS) { + /* error */ + } else { + *mp_handle = NULL; + } + } + return; + } + + SettingProfileUG *ad = (SettingProfileUG *) data; + if (*mp_handle == NULL) { + *mp_handle = setting_profile_play_sound(ad, cb, ringtone_file, vol, sound_type); + } +} + +int setting_profile_stop_sound(void *data, player_h *player) +{ + SETTING_TRACE_BEGIN; + retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingProfileUG *ad = (SettingProfileUG *) data; + if (ad->song_playing) { + g_free(ad->song_playing); + ad->song_playing = NULL; + } + + player_state_e state = -1; + int ret = SETTING_RETURN_SUCCESS; + int prev_behavior = 0; /* instead of do_while(0) and break */ + + player_get_state(*player, &state); + if (state == PLAYER_STATE_PLAYING) { + if (player_stop(*player) != PLAYER_ERROR_NONE) { + SETTING_TRACE("mm player stop failed"); + ret = SETTING_MMPLAYER_STOP_ERR; + prev_behavior++; /* instead of do_while(0) and break */ + } + } + + if ((prev_behavior == 0) && (player_unprepare(*player) != PLAYER_ERROR_NONE)) { + SETTING_TRACE("mm player unrealize failed"); + ret = SETTING_MMPLAYER_UNREALIZE_ERR; + prev_behavior++; /* instead of do_while(0) and break */ + } + + if ((prev_behavior == 0) && (player_destroy(*player) != PLAYER_ERROR_NONE)) { + SETTING_TRACE("mm player destroy failed"); + ret = SETTING_MMPLAYER_DESTROY_ERR; + } + + free(player); + player = NULL; + return ret; +} + +int __close_player(void *data, setting_volume_types type) +{ + /* error check */ + retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingProfileUG *ad = (SettingProfileUG *) data; + player_h **player= NULL; + + double value = 0.0; + + switch(type) + { + case SETTING_VOL_TYPE_RINGTONE: + retv_if(ad->mp_ringtone == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + player = &(ad->mp_ringtone); + value = elm_slider_value_get(ad->data_call_volume->eo_check); + sound_manager_set_volume(SOUND_TYPE_RINGTONE, (unsigned int)(value+0.5)); + break; + case SETTING_VOL_TYPE_NOTIFICATION: + retv_if(ad->mp_noti == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + player = &(ad->mp_noti); + value = elm_slider_value_get(ad->data_noti_volume->eo_check); + sound_manager_set_volume(SOUND_TYPE_NOTIFICATION, (unsigned int)(value+0.5)); + break; + case SETTING_VOL_TYPE_MEDIA: + retv_if(ad->mp_media == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + player = &(ad->mp_media); + value = elm_slider_value_get(ad->data_media_volume->eo_check); + sound_manager_set_volume(SOUND_TYPE_MEDIA, (unsigned int)(value+0.5)); + break; + case SETTING_VOL_TYPE_SYSTEM: + retv_if(ad->mp_sys == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + player = &(ad->mp_sys); + value = elm_slider_value_get(ad->data_touch_volume->eo_check); + sound_manager_set_volume(SOUND_TYPE_SYSTEM, (unsigned int)(value+0.5)); + break; + case SETTING_VOL_TYPE_NOTI_VIB: + case SETTING_VOL_TYPE_HAPTIC_VIB: + default: + return SETTING_RETURN_FAIL; + } + + if (*player) { + if (setting_profile_stop_sound(ad, *player)) { + *player = NULL; + } else { + return SETTING_RETURN_FAIL; + } + } + + return SETTING_RETURN_SUCCESS; +} + +int +setting_profile_close_other_mm_players_but_type(void *data, sound_type_e type) +{ + /* error check */ + retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingProfileUG *ad = (SettingProfileUG *) data; + + int ret = 0; + + switch (type) + { + case SOUND_TYPE_RINGTONE: /* close noti, media and system players */ + if (__close_player(ad, SETTING_VOL_TYPE_NOTIFICATION) != SETTING_RETURN_SUCCESS) + ret++; + if (__close_player(ad, SETTING_VOL_TYPE_MEDIA) != SETTING_RETURN_SUCCESS) + ret++; + if (__close_player(ad, SETTING_VOL_TYPE_SYSTEM) != SETTING_RETURN_SUCCESS) + ret++; + break; + case SOUND_TYPE_NOTIFICATION: /* close ringtone, media and system players */ + if (__close_player(ad, SETTING_VOL_TYPE_RINGTONE) != SETTING_RETURN_SUCCESS) + ret++; + if (__close_player(ad, SETTING_VOL_TYPE_MEDIA) != SETTING_RETURN_SUCCESS) + ret++; + if (__close_player(ad, SETTING_VOL_TYPE_SYSTEM) != SETTING_RETURN_SUCCESS) + ret++; + break; + case SOUND_TYPE_MEDIA: /* close ringtone, noti and system players */ + if (__close_player(ad, SETTING_VOL_TYPE_RINGTONE) != SETTING_RETURN_SUCCESS) + ret++; + if (__close_player(ad, SETTING_VOL_TYPE_NOTIFICATION) != SETTING_RETURN_SUCCESS) + ret++; + if (__close_player(ad, SETTING_VOL_TYPE_SYSTEM) != SETTING_RETURN_SUCCESS) + ret++; + break; + case SOUND_TYPE_SYSTEM: /* close ringtone, noti and media players */ + if (__close_player(ad, SETTING_VOL_TYPE_RINGTONE) != SETTING_RETURN_SUCCESS) + ret++; + if (__close_player(ad, SETTING_VOL_TYPE_NOTIFICATION) != SETTING_RETURN_SUCCESS) + ret++; + if (__close_player(ad, SETTING_VOL_TYPE_MEDIA) != SETTING_RETURN_SUCCESS) + ret++; + break; + default: /* if unknown type, dont close any player */ + break; + } + + if (ret == 0) + return SETTING_RETURN_SUCCESS; + else + return SETTING_RETURN_FAIL; +} + +int setting_profile_close_all_mm_players(void *data) +{ + /* error check */ + retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingProfileUG *ad = (SettingProfileUG *) data; + + int ret = 0; + + if (__close_player(ad, SETTING_VOL_TYPE_RINGTONE) != SETTING_RETURN_SUCCESS) + ret++; + if (__close_player(ad, SETTING_VOL_TYPE_NOTIFICATION) != SETTING_RETURN_SUCCESS) + ret++; + if (__close_player(ad, SETTING_VOL_TYPE_MEDIA) != SETTING_RETURN_SUCCESS) + ret++; + if (__close_player(ad, SETTING_VOL_TYPE_SYSTEM) != SETTING_RETURN_SUCCESS) + ret++; + + if(ad->volume_timer) + { + ecore_timer_del(ad->volume_timer); + ad->volume_timer = NULL; + ad->cur_vol_type = SETTING_VOL_TYPE_MAX; + SETTING_TRACE_DEBUG("[AA] volume timer is deleted"); + } + + if (ret == 0) + return SETTING_RETURN_SUCCESS; + else + return SETTING_RETURN_FAIL; +} + +void setting_profile_play_vibration(void *data, int value) +{ + /* error check */ + ret_if(data == NULL); + + SettingProfileUG *ad = (SettingProfileUG *) data; + + char pattern_file[MAX_COMMON_BUFFER_LEN] = {0,}; + svi_get_path(SVI_TYPE_VIB, value, pattern_file, sizeof(pattern_file)); + +#if MIGRATION_HAPTIC + if(ad->hnd_hpt < 0) + { + SETTING_TRACE_DEBUG("[ERROR] Can't use haptic handle."); + return; + } + if(haptic_vibrate_file_with_detail(ad->hnd_hpt, pattern_file, 1, HAPTIC_FEEDBACK_AUTO, HAPTIC_PRIORITY_MIN, NULL) != 0){ + SETTING_TRACE("ERROR device_haptic_play_pattern"); + } +#endif +} + +int setting_profile_get_call_playing_vib_by_vconf_value(int call_vib_value) +{ + /* select vibration pattern */ + switch (call_vib_value) { + case SETTING_CALL_ALERT_VIB_TYPE1: + { + return SVI_VIB_NOTIFICATION_INCOMING_CALL01; + } + case SETTING_CALL_ALERT_VIB_TYPE2: + { + return SVI_VIB_NOTIFICATION_INCOMING_CALL02; + } + case SETTING_CALL_ALERT_VIB_TYPE3: + { + return SVI_VIB_NOTIFICATION_INCOMING_CALL03; + } + default: + return SVI_VIB_NOTIFICATION_INCOMING_CALL01; + } +} + +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + int ret = 0; + +#if SUPPORT_RUN_SYSTEM_COMMAND + ret += excuteCmd(SETTING_POSTINST_FILE, 1, "sounds"); +#else + + ret += vconf_set_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, TRUE); + ret += vconf_set_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, FALSE); /* after support incoming call vibration, it should be change to TRUE */ + ret += vconf_set_int(VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT, SETTING_DEFAULT_NOTI_VIB_INT); + ret += vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, SETTING_DEFAULT_HAPTIC_VIB_INT); + ret += vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, SETTING_DEFAULT_HAPTIC_VIB_INT); + + ret += vconf_set_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, SETTING_DEFAULT_CALL_TONE); + + ret += vconf_set_int(VCONFKEY_SETAPPL_CALL_VIBRATION_PATTERN_INT, SETTING_CALL_ALERT_VIB_TYPE3); + + ret += vconf_set_str(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, SETTING_DEFAULT_MSG_TONE); + ret += vconf_set_int(VCONFKEY_SETAPPL_NOTI_MSG_ALERT_REP_TYPE_INT, SETTING_DEFAULT_ALERT_REPEAT_TYPE_INT); + + ret += vconf_set_str(VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR, SETTING_DEFAULT_EMAIL_TONE); + ret += vconf_set_int(VCONFKEY_SETAPPL_NOTI_EMAIL_ALERT_REP_TYPE_INT, SETTING_DEFAULT_ALERT_REPEAT_TYPE_INT); + + ret += vconf_set_bool(VCONFKEY_SETAPPL_SOUND_LOCK_BOOL, TRUE); + + /* if ret is 0, finish completely */ + /* if ret is minus, it means times of failure */ +#endif + sound_manager_set_volume(SOUND_TYPE_RINGTONE, SETTING_DEFAULT_RINGTONE_VOL_INT); + sound_manager_set_volume(SOUND_TYPE_NOTIFICATION, SETTING_DEFAULT_NOTI_VOL_INT); + sound_manager_set_volume(SOUND_TYPE_MEDIA, SETTING_DEFAULT_MEDIA_VOL_INT); + sound_manager_set_volume(SOUND_TYPE_SYSTEM, SETTING_DEFAULT_SYSTEM_VOL_INT); + return ret; +} + diff --git a/setting-reset/CMakeLists.txt b/setting-reset/CMakeLists.txt new file mode 100644 index 0000000..aaf7dd3 --- /dev/null +++ b/setting-reset/CMakeLists.txt @@ -0,0 +1,34 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_reset REQUIRED evas ecore elementary appcore-common appcore-efl tapi json-glib-1.0 ui-gadget-1 capi-appfw-application mm-sound dlog) + +FOREACH(flag ${pkgs_reset_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") +ADD_DEFINITIONS("-fpie") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") + +ADD_LIBRARY(${SETTING_RESET_UG} SHARED + ./src/setting-reset.c + ./src/setting-reset-main.c + ./src/setting-reset-settings.c) + +TARGET_LINK_LIBRARIES(${SETTING_RESET_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_RESET_UG} ${pkgs_reset_LDFLAGS}) + +INSTALL(TARGETS ${SETTING_RESET_UG} DESTINATION /usr/ug/lib) diff --git a/setting-reset/include/setting-reset-main.h b/setting-reset/include/setting-reset-main.h new file mode 100755 index 0000000..f937e21 --- /dev/null +++ b/setting-reset/include/setting-reset-main.h @@ -0,0 +1,25 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_RESET_MAIN_H__ +#define __SETTING_RESET_MAIN_H__ + +#include +#include + +extern setting_view setting_view_reset_password; + +#endif /* __SETTING_RESET_MAIN_H__ */ diff --git a/setting-reset/include/setting-reset-settings.h b/setting-reset/include/setting-reset-settings.h new file mode 100755 index 0000000..e066531 --- /dev/null +++ b/setting-reset/include/setting-reset-settings.h @@ -0,0 +1,28 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_RESET_SETTINGS_H__ +#define __SETTING_RESET_SETTINGS_H__ + +#include + +#define SUPPORT_ATTEMPT_COUNT 0 + +extern setting_view setting_view_reset_password; + +void __reset_all_button_cb(void *data, Evas_Object *obj, void *event_info); + +#endif /* __SETTING_RESET_SETTINGS_H__ */ diff --git a/setting-reset/include/setting-reset.h b/setting-reset/include/setting-reset.h new file mode 100755 index 0000000..a8d8f38 --- /dev/null +++ b/setting-reset/include/setting-reset.h @@ -0,0 +1,109 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_RESET_H__ +#define __SETTING_RESET_H__ + +#include +#include + +#include + +#include + +#include +#include + +#define RESET_RESULT_STR "IDS_ST_POP_RESETTING_ING" +#define RESET_SUCESS_STR "IDS_COM_POP_SUCCESS" +#define LOAD_LIB_FAILED_STR "Exception"//"Load LIB failed" +#define UNDEFINE_STR "Undefined" //"Resetting undefined" + +#define RESET_FAILED_STR "IDS_COM_POP_FAILED"//"Reset failed" +#define VCONF_RESET_FAILED_STR "IDS_COM_POP_FAILED"//"vconf set failed" + +#define ADN_STR " and " +#define CLOSEING_STR " had been reseted just now, Setting will be closed" + +//#define RESET_ALL "Reset all" +#define RESET_ALL "IDS_ST_BODY_RESET_ALL" + +//#define RESET_ALL_DESC "IDS_ST_BODY_ALL_SETTINGS_WILL_REVERT_TO_DEFAULT_VALUES" +#define RESET_ALL_DESC "IDS_ST_BODY_AFTER_RESETTING_PHONE_WILL_RESTART_AUTOMATICALLY" + +#define RESET_SETTINGS_STR "IDS_ST_BODY_BACKUP_AND_RESET" //"Reset settings" +#define SIM_CARD_PROFILE_SETTINGS_STR "IDS_ST_MBODY_SIM_CARD_PROFILE_SETTINGS" //"SIM card profile sttings" +#define FACTORY_RESET_STR "IDS_ST_MBODY_FACTORY_RESET" //"Factory reset" + +#define SIMPLY_SUPPORT_ALL_RESET 0 +#define SUPPORT_RESET_DETAILS 1 +#define SUPPORT_SIM_CARD_PROFILE 0 +#define SUPPORT_FACTORY_RESET 1 +#define SUPPORT_RESET_OLD 0 + +typedef struct _SettingResetUG SettingResetUG; + +/** + * Setting Reset UG context + * all UG function has void* as an agument. this is casted back to SettingResetUG + * and the functions access app context. + */ +struct _SettingResetUG { + ui_gadget_h ug; + ui_gadget_h ug_loading; + + /* add more variables here (move your appdata to here) */ + Evas *evas; + Evas_Object *win_main_layout; /* window_layout */ + Evas_Object *win_get; /* win_main */ + Evas_Object *ly_main; + Evas_Object *notify; + Evas_Object *old_notify; + Evas_Object *ask_popup; + Evas_Object *pop_progress; + Evas_Object *view_layout; + Evas_Object *navi_bar; + Evas_Object *controllbar; + Evas_Object *reset_list; + Evas_Object *main_scroller; + + Evas_Object *pop_factory_reset; + + Setting_Done_List_Data list_data; + Ecore_Animator *animator; + Ecore_Idler *reset_all_idler; + int gl_index; + Elm_Genlist_Item_Class itc_1text; + Elm_Genlist_Item_Class itc_1icon; +#if SUPPORT_RESET_DETAILS + Elm_Genlist_Item_Class itc_dlg_1text; + Elm_Genlist_Item_Class itc_seperator; + Evas_Object *ly_reset; + Evas_Object *pop; +#endif + Evas_Object *pop_btn; +}; + +extern setting_view setting_view_reset_main; +extern setting_view setting_view_reset_settings; + +int setting_reset_flight_mode(); +int setting_reset_rotation_lock(void); +void setting_reset_result_popup_resp_cb(void *data, Evas_Object *obj, void *event_info); +void setting_reset_result_popup_update(void *data); +void setting_reset_special_process(void *data); + +#endif /* __SETTING_RESET_H__ */ diff --git a/setting-reset/src/setting-reset-main.c b/setting-reset/src/setting-reset-main.c new file mode 100755 index 0000000..3784b39 --- /dev/null +++ b/setting-reset/src/setting-reset-main.c @@ -0,0 +1,375 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include + + +#define RESULT_FONT_SIZE 28//18 +#define ITEM_NAME_FONT_SIZE 35//22 + +static int setting_reset_main_create(void *cb); +static int setting_reset_main_destroy(void *cb); +static int setting_reset_main_update(void *cb); +static int setting_reset_main_cleanup(void *cb); + +setting_view setting_view_reset_main = { + .create = setting_reset_main_create, + .destroy = setting_reset_main_destroy, + .update = setting_reset_main_update, + .cleanup = setting_reset_main_cleanup, +}; + +static void setting_reset_main_click_softkey_cancel_cb(void *data, + Evas_Object *obj, + void *event_info); +#if SUPPORT_RESET_DETAILS +static void setting_reset_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, void *event_info); +#endif + +/* *************************************************** + * + *basic func + * + ***************************************************/ +static int setting_reset_main_create(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingResetUG *ad = (SettingResetUG *) cb; + Evas_Object *scroller = NULL; +#if SIMPLY_SUPPORT_ALL_RESET + ad->ly_main = + setting_create_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _("IDS_COM_BODY_RESET"), + _("IDS_COM_BODY_BACK"), NULL, + setting_reset_main_click_softkey_cancel_cb, + NULL, ad, &scroller, + &(ad->navi_bar)); + /* Description */ + setting_create_Gendial_field_def(scroller, &(ad->itc_1text), NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, RESET_ALL_DESC, + NULL, NULL); + elm_genlist_item_select_mode_set(elm_genlist_item_append(scroller, &(itc_seperator), NULL, NULL,ELM_GENLIST_ITEM_NONE, NULL, NULL), + ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + /* Button */ + Setting_GenGroupItem_Data *item_data = + (Setting_GenGroupItem_Data *) calloc(1, + sizeof + (Setting_GenGroupItem_Data)); + setting_retvm_if(!item_data, SETTING_RETURN_FAIL, "calloc failed"); + item_data->userdata = ad; + item_data->keyStr = (char *)g_strdup(RESET_ALL); + item_data->swallow_type = SWALLOW_Type_1BUTTON; + + item_data->chk_change_cb = __reset_all_button_cb; + item_data->item = elm_genlist_item_append(scroller, &(ad->itc_1icon), item_data, NULL, + ELM_GENLIST_ITEM_NONE, + NULL, NULL); + setting_view_reset_main.is_create = 1; + ad->main_scroller = scroller; + return SETTING_RETURN_SUCCESS; +#endif + +#if SUPPORT_RESET_DETAILS + ad->ly_main = + setting_create_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _("IDS_COM_BODY_RESET"), + _("IDS_COM_BODY_BACK"), NULL, + setting_reset_main_click_softkey_cancel_cb, + NULL, ad, &scroller, + &(ad->navi_bar)); + + Elm_Object_Item *item = NULL;; + + item = + elm_genlist_item_append(scroller, &itc_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* 1. Reset settings */ + setting_create_Gendial_field_def(scroller, &itc_1text, + setting_reset_main_mouse_up_Gendial_list_cb,ad, + SWALLOW_Type_INVALID, + NULL, NULL, + 0, RESET_SETTINGS_STR, NULL, NULL); +#if SUPPORT_SIM_CARD_PROFILE + /* 2. SIM card profile settings */ + #ifdef TARGET + int is_sim_profile_enabled = csc_svc_sim_auto_setting_chk_feature_enable(); + int err = 0; + int value = VCONFKEY_TELEPHONY_SIM_UNKNOWN; + setting_get_int_slp_key(INT_SLP_SETTING_SIM_SLOT, &value, &err); + if (is_sim_profile_enabled && VCONFKEY_TELEPHONY_SIM_INSERTED == value) { + setting_create_Gendial_field_def(scroller, &itc_1text, + setting_reset_main_mouse_up_Gendial_list_cb,ad, + SWALLOW_Type_INVALID, + NULL, NULL, + 0, SIM_CARD_PROFILE_SETTINGS_STR, NULL, NULL); + } else { + SETTING_TRACE("is_sim_profile_enabled:%d", is_sim_profile_enabled); + SETTING_TRACE("value:%d", value); + } + #else + SETTING_TRACE("TARGET MACRO disabled"); + #endif + +#endif + +#if DISABLED_CODE + /* Description */ + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, RESET_ALL_DESC, + NULL, NULL); +#endif + setting_view_reset_main.is_create = 1; + ad->main_scroller = scroller; + return SETTING_RETURN_SUCCESS; + +#endif + +#if SUPPORT_RESET_OLD + Evas_Object *navi_bar = NULL; + + Evas_Object *controllbar = NULL; + + Evas_Object *view_layout = elm_layout_add(ad->win_main_layout); + elm_layout_file_set(view_layout, SETTING_THEME_EDJ_NAME, + "selinfo_bottom"); + evas_object_size_hint_weight_set(view_layout, EVAS_HINT_EXPAND, 0.0); + + /* Evas_Object * win_layout, Evas_Object * win_obj */ + ad->ly_main = + setting_create_layout_navi_bar(ad->win_main_layout, ad->win_get, + _("IDS_COM_BODY_RESET"), + _("IDS_COM_SK_CANCEL"), + _("IDS_COM_BODY_RESET"), NULL, + setting_reset_main_click_softkey_cancel_cb, + setting_reset_main_click_softkey_reset_cb, + NULL, ad, view_layout, &navi_bar, + &controllbar); + elm_object_item_disabled_set(elm_toolbar_last_item_get + (controllbar), EINA_TRUE); + + /* ******************************************create frame */ + Setting_Done_List_Data *list_data = &(ad->list_data); /* define a handle */ + int idx = 0; + list_data->win_main = ad->ly_main; + list_data->UG_data = ad; + list_data->ly_parent = view_layout; + list_data->controllbar = controllbar; + + + list_data->chk_items[idx++].item_name = KeyStr_Select_All; + char *ug_args; + char *item_name; + + int i = 0; + int j = 0; + + for (; i < setting_cfg_get_category_length(); i++) { + SETTING_TRACE("group is:%s", _(setting_cfg_get_category_name(i))); + + for (j = 0; j < setting_cfg_get_menu_length(i); j++) { + /*SETTING_TRACE("i:%d\tj:%d", i, j);*/ + if (Cfg_Item_unResetable == + setting_cfg_get_resetable_flag_idx(i, j)) + { + continue; + } + list_data->chk_items[idx].ug_args = ug_args = + setting_cfg_get_ug_args_idx(i, j); + list_data->chk_items[idx].item_name = item_name = + setting_cfg_get_keyname_idx(i, j); + + SETTING_TRACE("process %s:\t%s",_(item_name), ug_args); + idx++; + } + } + + list_data->cur_item_num = idx; + SETTING_TRACE("list_data->cur_item_num:%d", list_data->cur_item_num); + scroller = setting_create_done_list(list_data); + elm_object_part_content_set(view_layout, "elm.swallow.contents", scroller); + + ad->view_layout = view_layout; + ad->navi_bar = navi_bar; + ad->controllbar = controllbar; + /* *******************************************update info */ + + setting_view_reset_main.is_create = 1; + ad->itc_1text.func.text_get = __result_gl_text_get; + return SETTING_RETURN_SUCCESS; +#endif +} + +static int setting_reset_main_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingResetUG *ad = (SettingResetUG *) cb; + if (ad->notify) { + evas_object_del(ad->notify); + ad->notify = NULL; + } + if (ad->old_notify) { + evas_object_del(ad->old_notify); + ad->old_notify = NULL; + } + if (ad->pop_progress) + { + evas_object_del(ad->pop_progress); + ad->pop_progress = NULL; + } + + if (ad->ask_popup) + { + evas_object_del(ad->ask_popup); + ad->ask_popup = NULL; + } + if (ad->animator) + { + ecore_animator_del(ad->animator); + ad->animator = NULL; + } + + if (ad->ly_main != NULL) { + evas_object_del(ad->ly_main); + setting_view_reset_main.is_create = 0; + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_reset_main_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingResetUG *ad = (SettingResetUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_show(ad->ly_main); + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_reset_main_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingResetUG *ad = (SettingResetUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_hide(ad->ly_main); + } + + return SETTING_RETURN_SUCCESS; +} + +static void setting_reset_reboot_resp_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + int response_type = btn_type(obj); + if (POPUP_RESPONSE_OK == response_type) { // OK cliked + csc_svc_sim_auto_setting_clear_active_operator(); + // reboot here + sysman_request_reboot(); + + } else if (POPUP_RESPONSE_CANCEL == response_type) { // cancel clicked + // DO NOTHING + } + + SettingResetUG *ad = data; + if (ad->pop) + { + evas_object_del(ad->pop); + ad->pop = NULL; + } +} + +#if SUPPORT_RESET_DETAILS +static void +setting_reset_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, void *event_info) +{ + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + SettingResetUG *ad = (SettingResetUG *) data; + + SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); + + if (!safeStrCmp(RESET_SETTINGS_STR, list_item->keyStr)) + { + setting_view_change(&setting_view_reset_main, &setting_view_reset_settings, ad); + } +#if SUPPORT_SIM_CARD_PROFILE + else if (!safeStrCmp(SIM_CARD_PROFILE_SETTINGS_STR, list_item->keyStr)) + { + SETTING_TRACE("SIM-CARD PROFILE"); + #ifdef TARGET + ad->pop = setting_create_popup_with_btn(ad, ad->win_get, NULL, + _("IDS_ST_BODY_RESET_SIM_CARD_PROFILE_SETTINGS_TO_DEFAULT_AND_SELECT_ANOTHER_SERVICE_PROVIDER_MSG"), + //setting_time_reboot_resp_cb, + setting_reset_reboot_resp_cb, + 0, 2, + dgettext("sys_string", "IDS_COM_SK_OK"), + _("IDS_COM_SK_CANCEL")); + #endif + } +#endif + /* to do : */ +} +#endif + +static void +setting_reset_main_click_softkey_cancel_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingResetUG *ad = (SettingResetUG *) data; + if (ad->list_data.selInfoPop) { + evas_object_del(ad->list_data.selInfoPop); + ad->list_data.selInfoPop = NULL; + } + /* Send destroy request */ + ug_destroy_me(ad->ug); +} + diff --git a/setting-reset/src/setting-reset-settings.c b/setting-reset/src/setting-reset-settings.c new file mode 100755 index 0000000..d443fdc --- /dev/null +++ b/setting-reset/src/setting-reset-settings.c @@ -0,0 +1,810 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include +#include +#include + +#define RESULT_FONT_SIZE 28//18 +#define ITEM_NAME_FONT_SIZE 35//22 + +static int setting_reset_settings_create(void *cb); +static int setting_reset_settings_destroy(void *cb); +static int setting_reset_settings_update(void *cb); +static int setting_reset_settings_cleanup(void *cb); + +setting_view setting_view_reset_settings = { + .create = setting_reset_settings_create, + .destroy = setting_reset_settings_destroy, + .update = setting_reset_settings_update, + .cleanup = setting_reset_settings_cleanup, +}; + +static void setting_reset_settings_click_softkey_reset_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_reset_settings_click_softkey_cancel_cb(void *data, + Evas_Object *obj, + void *event_info); + +static bool setting_reset_settings_create_password_sg(void *data); +static void setting_reset_settings_check_state(Setting_Done_List_Data *list_data); +static void setting_reset_settings_result_password_ug_cb(ui_gadget_h ug, + service_h result, + void *priv); + +/* *************************************************** + * + *basic func + * + ***************************************************/ +static char *__result_gl_text_get(void *data, Evas_Object *obj, + const char *part) +{ + retv_if(!data, NULL); + Setting_GenGroupItem_Data *item_data = + (Setting_GenGroupItem_Data *) data; + //SETTING_TRACE("part:%s", part); + + if (!safeStrCmp(part, "elm.text") || !safeStrCmp(part, "elm.text.1")) { /* title */ + char label[HELP_MSG_BUFF_SIZE + 1] = { 0, }; + if (item_data->keyStr) + { + const char *key = setting_customize_text(_(item_data->keyStr), ITEM_NAME_FONT_SIZE, NULL, NULL); + safeStrNCat(label, key,HELP_MSG_BUFF_SIZE); + FREE(key); + } + if (item_data->sub_desc) + { + char desc[SETTING_STR_SLP_LEN + 1] = { 0, }; + snprintf(desc, SETTING_STR_SLP_LEN, ": %s", _(item_data->sub_desc)); + const char *sub_desc = setting_customize_text(desc, RESULT_FONT_SIZE, NULL, NULL); + safeStrNCat(label, sub_desc,HELP_MSG_BUFF_SIZE); + FREE(sub_desc); + } + return (char *)g_strdup(label); + } + return NULL; +} +#if SIMPLY_SUPPORT_ALL_RESET +static void __processing_popup_response_cb(void *data, Evas_Object *obj, + void *event_info) +{ + ret_if(!data); + SettingResetUG *ad = data; + setting_reset_special_process(ad); + if (obj) { + evas_object_del(obj); + obj = NULL; + } + ad->notify= NULL; + + // key ungrab: after showing the result popup + Ecore_X_Display *disp = ecore_x_display_get(); + Ecore_X_Window xwin = elm_win_xwindow_get((Evas_Object*)ug_get_window()); + int ret = utilx_ungrab_key(disp, xwin, KEY_HOME); + if (ret) { + SETTING_TRACE_ERROR("KEY_HOME ungrab error ret[%d]", ret); + } +} +bool __reset_all_idler(void *data) +{ + SETTING_TRACE_BEGIN; + retv_if(!data, FALSE); + SettingResetUG *ad = data; + + int i = 0; + int j = 0; + int idx = 0; + const char *result_str = RESET_SUCESS_STR; + char ug_file[PATH_MAX + 1]; + char *path = NULL; + service_h svc; + int ret = -1; + char *ug_args; + char *item_name; + + for (; i < setting_cfg_get_category_length(); i++) { + //SETTING_TRACE("group is:%s", _(setting_cfg_get_category_name(i))); + + result_str = RESET_SUCESS_STR; + for (j = 0; j < setting_cfg_get_menu_length(i); j++) { + /*SETTING_TRACE("i:%d\tj:%d", i, j);*/ + if (Cfg_Item_unResetable == + setting_cfg_get_resetable_flag_idx(i, j)) + { + //SETTING_TRACE("process %s:%s skipped",_(item_name), ug_args); + continue; + } + ug_args = setting_cfg_get_ug_args_idx(i, j); + item_name = setting_cfg_get_keyname_idx(i, j); + if (item_name) + SETTING_TRACE(">>> process %s:%s",_(item_name), ug_args); + + idx++; + if (NULL == ug_args) /*special process*/ + { + ret = -1; + if (!safeStrCmp(KeyStr_FlightMode, item_name)) { + //Invoke aync API and ignore the response message + ret = setting_reset_flight_mode(); + } else if (!safeStrCmp(KeyStr_Landscape, item_name)) { + ret = setting_reset_rotation_lock(); + } + //.. + if (0 > ret) + { + result_str = RESET_FAILED_STR; + } + + + } + else + { + path = get_ug_path_from_ug_args((void *)ug_args); + svc = get_bundle_from_ug_args((void *)ug_args); + + //if (snprintf(ug_file, PATH_MAX, "%s/libug-%s.so", SETTING_UG_PATH, path) < 0) + // return FALSE; + + ret = setting_invoke_reset_function(path, svc, NULL); + //SETTING_TRACE("load %s[plugin_ret:%d]", ug_file, ret); + + if (OPERATE_LIB_SUCESS > ret) + { + result_str = RESET_FAILED_STR; + + } + + service_destroy(svc); + FREE(path); + memset(ug_file, 0, PATH_MAX); + } + SETTING_TRACE("process %s:%s %s",_(item_name), ug_args, _(result_str)); + } + } + + //list_data->cur_item_num = idx; + SETTING_TRACE_DEBUG("Reset totally %d items. result_str:%s", idx, result_str); + //setting_create_popup_with_notitle(NULL, ad->win_get, _(result_str)); + elm_popup_desc_set(ad->notify, _(result_str)); + elm_popup_mode_set(ad->notify, POPUP_INTERVAL); + elm_popup_timeout_set(ad->notify, 2); + + if (ad->reset_all_idler) { + ecore_idler_del(ad->reset_all_idler); + ad->reset_all_idler = NULL; + } + return FALSE; +} + +void __reset_all_button_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + ret_if(!data); + Setting_GenGroupItem_Data *item_Data = data; + ret_if(!item_Data->userdata); + SettingResetUG *ad = item_Data->userdata; + + + char pw_pass[SETTING_STR_SLP_LEN] = { 0, }; + int err = 0; + + /* Check Password Setting status */ + int ret = + setting_get_string_slp_key(STR_SLP_LIST_PHONE_PASSWORD, + pw_pass, &err); + SETTING_TRACE("pw_pass:%s", pw_pass); + if (SETTING_RETURN_SUCCESS == ret && '\0' != pw_pass[0]) { + setting_reset_settings_create_password_sg(ad); + return; + } + + // key grab: before showing processing popup + Ecore_X_Display *disp = ecore_x_display_get(); + Ecore_X_Window xwin = elm_win_xwindow_get((Evas_Object*)ug_get_window()); + ret = utilx_grab_key(disp, xwin, KEY_HOME, TOP_POSITION_GRAB); + if (ret) { + SETTING_TRACE_ERROR("KEY_HOME grab error ret[%d]", ret); + } + + ad->notify = + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_COM_POP_PROCESSING"), __processing_popup_response_cb, 0, 1, 1); + if (ad->reset_all_idler) { + ecore_idler_del(ad->reset_all_idler); + ad->reset_all_idler = NULL; + } + + ad->reset_all_idler = + ecore_idler_add((Ecore_Task_Cb) __reset_all_idler, ad); +} +#endif +static int setting_reset_settings_create(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingResetUG *ad = (SettingResetUG *) cb; + Evas_Object *scroller = NULL; + + Evas_Object *view_layout = elm_layout_add(ad->win_main_layout); + elm_layout_file_set(view_layout, SETTING_THEME_EDJ_NAME, + "selinfo_bottom"); + evas_object_size_hint_weight_set(view_layout, EVAS_HINT_EXPAND, 0.0); + + /* Evas_Object * win_layout, Evas_Object * win_obj */ + Elm_Object_Item *navi_it = setting_push_layout_navi_bar(_(RESET_SETTINGS_STR), + _("IDS_COM_BODY_RESET"), + _("IDS_COM_SK_CANCEL"), NULL, + setting_reset_settings_click_softkey_reset_cb, + setting_reset_settings_click_softkey_cancel_cb, + NULL, ad, view_layout, ad->navi_bar, + NULL); + + /* ******************************************create frame */ + Setting_Done_List_Data *list_data = &(ad->list_data); /* define a handle */ + int idx = 0; + list_data->win_main = ad->win_main_layout; + list_data->UG_data = ad; + list_data->ly_parent = view_layout; + list_data->select_all_checked = EINA_FALSE; + list_data->navi_it = navi_it; + + char *ug_args; + char *item_name; + + int i = 0; + int j = 0; + + for (; i < setting_cfg_get_category_length(); i++) { + SETTING_TRACE("group is:%s", _(setting_cfg_get_category_name(i))); + + for (j = 0; j < setting_cfg_get_menu_length(i); j++) { + /*SETTING_TRACE("i:%d\tj:%d", i, j);*/ + if (Cfg_Item_unResetable == + setting_cfg_get_resetable_flag_idx(i, j)) + { + continue; + } + ug_args = setting_cfg_get_ug_args_idx(i, j); + if (!is_ug_installed_by_ug_args(ug_args)) + { + continue; + } + + item_name = setting_cfg_get_keyname_idx(i, j); + if (isEmulBin()) + { + if (!safeStrCmp(KeyStr_FlightMode, item_name)) { + continue; /* hide Flight Mode in Emulator*/ + } else if (!safeStrCmp(KeyStr_WiFi, item_name)) { + continue; /* hide WIFI in Emulator*/ + } else if (!safeStrCmp(KeyStr_MobileAP, item_name)) { + continue; /* hide Tethering in Emulator*/ + } else if (!safeStrCmp(KeyStr_WiFiDirect, item_name)) { + continue; /* hide WiFiDirect in Emulator*/ + } else if (!safeStrCmp(KeyStr_Network, item_name)) { + continue; /* hide Network in Emulator*/ + } else if (!safeStrCmp(KeyStr_Bluetooth, item_name)) { + continue; /* hide Bluetooth in Emulator*/ + } else if (!safeStrCmp(KeyStr_DateTime, item_name)) { + continue; /* hide Date&Time in Emulator*/ + } else if (!safeStrCmp(KeyStr_Security, item_name)) { + continue; /* hide Security in Emulator*/ + } else if (!safeStrCmp(KeyStr_Memory, item_name)) { + continue; /* hide Memory in Emulator*/ + } else if (!safeStrCmp(KeyStr_Powersaving, item_name)) { + continue; /* hide Powersaving in Emulator*/ + } else if (!safeStrCmp(KeyStr_Email, item_name)) { + continue; + } + } + + list_data->chk_items[idx].ug_args = ug_args; + list_data->chk_items[idx].item_name = item_name = + setting_cfg_get_keyname_idx(i, j); + + SETTING_TRACE("process %s:\t%s",_(item_name), ug_args); + idx++; + } + } + + list_data->cur_item_num = idx; + SETTING_TRACE("list_data->cur_item_num:%d", list_data->cur_item_num); + scroller = setting_create_done_list(list_data); + elm_object_part_content_set(view_layout, "elm.swallow.contents", scroller); + + if(idx == 0 || !setting_done_list_is_some_item_selected(list_data)) { + Evas_Object *reset_btn = elm_object_item_part_content_get(navi_it, "toolbar_button1"); + elm_object_disabled_set(reset_btn, EINA_TRUE); + } + + ad->view_layout = view_layout; + ad->reset_list = elm_object_part_content_get(scroller, "search_list"); + /* *******************************************update info */ + + setting_view_reset_settings.is_create = 1; + ad->itc_1text.func.text_get = __result_gl_text_get; + return SETTING_RETURN_SUCCESS; +} + +static int setting_reset_settings_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingResetUG *ad = (SettingResetUG *) cb; + + if (ad->list_data.selInfoPop) { + evas_object_del(ad->list_data.selInfoPop); + ad->list_data.selInfoPop = NULL; + } + if (ad->notify) { + evas_object_del(ad->notify); + ad->notify = NULL; + } + if (ad->old_notify) { + evas_object_del(ad->old_notify); + ad->old_notify = NULL; + } + if (ad->pop) + { + evas_object_del(ad->pop); + ad->pop = NULL; + } + if (ad->pop_progress) + { + evas_object_del(ad->pop_progress); + ad->pop_progress = NULL; + } + + if (ad->ask_popup) + { + evas_object_del(ad->ask_popup); + ad->ask_popup = NULL; + } + if (ad->animator) + { + ecore_animator_del(ad->animator); + ad->animator = NULL; + } + + if (ad->reset_all_idler) { + ecore_idler_del(ad->reset_all_idler); + ad->reset_all_idler = NULL; + } + + ad->pop_btn = NULL; + + elm_naviframe_item_pop(ad->navi_bar); + setting_view_reset_settings.is_create = 0; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_reset_settings_update(void *cb) +{ + SETTING_TRACE_BEGIN; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_reset_settings_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + //SettingResetUG *ad = (SettingResetUG *) cb; + + setting_reset_settings_destroy(cb); + + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *general func + * + ***************************************************/ +bool __delay_reset_location(void *data) +{ + SETTING_TRACE_BEGIN; + retv_if(!data, FALSE); + Setting_GenGroupItem_Data *item_data = data; + int plugin_ret = setting_invoke_reset_function("setting-location-efl", NULL, NULL); + SETTING_TRACE("load libug-%s.so[plugin_ret:%d]", "setting-location-efl", plugin_ret); + const char *result_str = NULL; + if (LOAD_LIB_FAILED == plugin_ret) // -1 + { + result_str = LOAD_LIB_FAILED_STR; + + } else if (UNDEFINED_LIB_SYMBOL == plugin_ret) // -2 + { + result_str = UNDEFINE_STR; + } else if (OPERATE_LIB_SUCESS > plugin_ret){ // 0 + result_str = RESET_FAILED_STR; + + } else { + return FALSE; + } + + item_data->sub_desc = (char *) g_strdup(_(result_str)); + elm_object_item_data_set(item_data->item, item_data); + elm_genlist_item_update(item_data->item); + return FALSE; +} + +static void __reset_an_item(Setting_Done_List_Data *list_data, + const char *item_name, + const char *ug_args) +{ + SettingResetUG *ad = (SettingResetUG *) list_data->UG_data; + if(ad == NULL) + return; + + Evas_Object *genlist = elm_object_content_get(ad->notify); + Setting_GenGroupItem_Data *item_data = NULL; + const char *result_str = RESET_SUCESS_STR; + if (NULL == ug_args) /*special process*/ + { + int ret = -1; + if (!safeStrCmp(KeyStr_FlightMode, item_name)) { + //Invoke aync API and ignore the response message + ret = setting_reset_flight_mode(); + } else if (!safeStrCmp(KeyStr_Landscape, item_name)) { + ret = setting_reset_rotation_lock(); + } + //.. + if (0 > ret) + { + result_str = VCONF_RESET_FAILED_STR; + } + + item_data = setting_create_Gendial_field_def(genlist, &(ad->itc_1text), + NULL, ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, + (char *)item_name, + (char *)result_str, NULL); + } else + { + char *path = get_ug_path_from_ug_args((void *)ug_args); + service_h svc = get_bundle_from_ug_args((void *)ug_args); + int plugin_ret = OPERATE_LIB_SUCESS; + if (!isEmulBin() || 0 != safeStrCmp(KeyStr_Location, item_name)) //KeyStr_Location is too slow to display in emulator + { + plugin_ret = setting_invoke_reset_function(path, svc, NULL); + SETTING_TRACE("load libug-%s.so[plugin_ret:%d]", path, plugin_ret); + } + else + { + item_data = setting_create_Gendial_field_def(genlist, &(ad->itc_1text), + NULL, ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, + (char *)item_name, + (char *)result_str, NULL); + ecore_idler_add((Ecore_Task_Cb) __delay_reset_location, item_data); + + service_destroy(svc); + FREE(path); + return; + } + + if (LOAD_LIB_FAILED == plugin_ret) // -1 + { + result_str = LOAD_LIB_FAILED_STR; + + } else if (UNDEFINED_LIB_SYMBOL == plugin_ret) // -2 + { + result_str = UNDEFINE_STR; + } else if (OPERATE_LIB_SUCESS <= plugin_ret){ // 0 + result_str = RESET_SUCESS_STR; + + } else { + result_str = RESET_FAILED_STR; + } + + service_destroy(svc); + if (path){ + FREE(path); + path = NULL; + } + + item_data = setting_create_Gendial_field_def(genlist, &(ad->itc_1text), + NULL, ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, + (char *)item_name, + (char *)result_str, NULL); + } + + if (item_data) + elm_genlist_item_show(item_data->item, ELM_GENLIST_ITEM_SCROLLTO_IN);//show the last item + else + SETTING_TRACE_ERROR("error : item_data is NULL"); +} + +static Eina_Bool __reset_animator_cb(void *data) +{ + SettingResetUG *ad = (SettingResetUG *) data; + + SETTING_TRACE("Processing the %dth of %d", + ad->gl_index, ad->list_data.cur_item_num); + if (ad->gl_index >= ad->list_data.cur_item_num) { + ecore_animator_del(ad->animator); + ad->animator = NULL; + if (ad->pop_progress) { + evas_object_del(ad->pop_progress); + ad->pop_progress = NULL; + } + //Evas_Object *btn = elm_object_part_content_get(ad->notify, "button1"); + if (ad->pop_btn) + { + setting_enable_evas_object(ad->pop_btn); + setting_undo_dim_evas_object(ad->pop_btn, TRUE); + } + + Evas_Object *genlist = elm_object_content_get(ad->notify); + if(genlist) + elm_genlist_item_show(elm_genlist_first_item_get(genlist), ELM_GENLIST_ITEM_SCROLLTO_TOP); + if(ad->reset_list) + elm_genlist_item_show(elm_genlist_first_item_get(ad->reset_list), ELM_GENLIST_ITEM_SCROLLTO_TOP); + + if(!setting_done_list_is_some_item_selected(&ad->list_data)) { + if (ad->list_data.navi_it) { + Evas_Object *button = elm_object_item_part_content_get(ad->list_data.navi_it, "toolbar_button1"); + elm_object_disabled_set(button, EINA_TRUE); + } + } + return ECORE_CALLBACK_CANCEL; + } + if (ad->list_data.chk_items[ad->gl_index].data_GenItem->chk_status) { + elm_genlist_item_show(ad->list_data.chk_items[ad->gl_index].data_GenItem->item, ELM_GENLIST_ITEM_SCROLLTO_IN);//show the last item + __reset_an_item(&(ad->list_data), + ad->list_data.chk_items[ad->gl_index].item_name, + ad->list_data.chk_items[ad->gl_index].ug_args); + /*unselect item*/ + elm_check_state_set(ad->list_data.chk_items[ad->gl_index].data_GenItem->eo_check, 0); + ad->list_data.chk_items[ad->gl_index].data_GenItem->chk_status = 0; + } + + ad->gl_index++; + return ECORE_CALLBACK_RENEW; +} + +bool __reset_delay_idler(void *data) +{ + SETTING_TRACE_BEGIN; + retv_if(!data, FALSE); + SettingResetUG *ad = data; + ad->gl_index = 0; + ad->animator = ecore_animator_add(__reset_animator_cb, ad); + return FALSE; +} + +static void setting_reset_settings_check_state(Setting_Done_List_Data *list_data) +{ + /* reset */ + SETTING_TRACE_DEBUG("********resetting*******"); + + SettingResetUG *ad = (SettingResetUG *) list_data->UG_data; + ad->notify = elm_popup_add(ad->win_get); + elm_object_style_set(ad->notify,"menustyle"); + elm_object_part_text_set(ad->notify, "title,text", _(RESET_RESULT_STR)); + evas_object_size_hint_weight_set(ad->notify, + EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + Evas_Object *btn = setting_create_button(ad->notify, _("IDS_COM_SK_OK"), NULL, setting_reset_result_popup_resp_cb, ad); + elm_object_part_content_set(ad->notify, "button1", btn); + elm_object_style_set(btn, "popup_button/default"); + setting_disable_evas_object(btn); + setting_dim_evas_object(btn, TRUE); + ad->pop_btn = btn; + + Evas_Object *genlist = elm_genlist_add(ad->notify); + elm_object_style_set(genlist, "dialogue"); + evas_object_size_hint_weight_set(genlist, + EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(genlist, + EVAS_HINT_FILL, + EVAS_HINT_FILL); + /* add separator */ + setting_create_Gendial_field_titleItem(genlist, + &itc_group_item, + RESET_RESULT_STR, + NULL); + //ad->gl_index = 0; + //ad->animator = ecore_animator_add(__reset_animator_cb, ad); + //Don't append any item until the popup is fully showed up + ecore_idler_add((Ecore_Task_Cb) __reset_delay_idler, ad); + elm_object_content_set(ad->notify, genlist); + elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS); + evas_object_show(ad->notify); + + /* reset sel_all item */ + elm_check_state_set(list_data->select_all_checkbox, 0); + list_data->select_all_checked = EINA_FALSE; + +} + +static void +setting_reset_settings_result_password_ug_cb(ui_gadget_h ug, service_h result, + void *priv) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(priv == NULL, "Data parameter is NULL"); + + SettingResetUG *ad = (SettingResetUG *) priv; + + char *ret_str = NULL; + + service_get_extra_data(result, "result", &ret_str); + + retm_if(ret_str == NULL, "result paremeter is NULL"); + SETTING_TRACE("result:%s", ret_str); + + if (ret_str) { + if (0 == safeStrCmp("Cancel", ret_str)) { + /* Do not reset */ + } + else if (0 == safeStrCmp("SETTING_PW_TYPE_RESET", ret_str)) { + /* Reset */ +#if SIMPLY_SUPPORT_ALL_RESET + ad->notify = + setting_create_popup_witout_btn(ad, ad->win_get, _("IDS_COM_POP_PROCESSING"), NULL, __processing_popup_response_cb, 0); + if (ad->reset_all_idler) { + ecore_idler_del(ad->reset_all_idler); + ad->reset_all_idler = NULL; + } + ad->reset_all_idler = + ecore_idler_add((Ecore_Task_Cb) __reset_all_idler, ad); +#else + /* if return value from passwordUG, create popup for resetting. */ + setting_reset_settings_check_state(&(ad->list_data)); +#endif + } + } +} + +static void +setting_reset_settings_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode, + void *priv) +{ + SettingResetUG *ad = (SettingResetUG *) priv; + Evas_Object *base; + + if (!priv) + return; + SETTING_TRACE_BEGIN; + + base = (Evas_Object *) ug_get_layout(ug); + if (!base) + return; + + switch (mode) { + case UG_MODE_FULLVIEW: + evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + //elm_win_resize_object_add(ad->win_get, base); + evas_object_show(base); + break; + default: + break; + } + SETTING_TRACE_END; +} + +static void setting_reset_settings_destroy_password_ug_cb(ui_gadget_h ug, + void *priv) +{ + SETTING_TRACE_BEGIN; + ret_if(!priv); + SettingResetUG *ad = (SettingResetUG *) priv; + if (ug) { + ug_destroy(ug); + ad->ug_loading = NULL; + } + +} + +static bool setting_reset_settings_create_password_sg(void *data) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(data == NULL, FALSE); + + SettingResetUG *ad = (SettingResetUG *) data; + + struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs)); + if (!cbs) + return FALSE; + cbs->layout_cb = setting_reset_settings_layout_ug_cb; + cbs->result_cb = setting_reset_settings_result_password_ug_cb; + cbs->destroy_cb = setting_reset_settings_destroy_password_ug_cb; + cbs->priv = (void *)ad; + + service_h svc; + if (service_create(&svc)) { + FREE(cbs); + return FALSE; + } + + service_add_extra_data(svc, "viewtype", "SETTING_PW_TYPE_RESET"); + + ad->ug_loading = + ug_create(ad->ug, "setting-password-efl", UG_MODE_FULLVIEW, svc, cbs); + if (NULL == ad->ug_loading) { /* error handling */ + } + + service_destroy(svc); + FREE(cbs); + + return TRUE; +} + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void +setting_reset_settings_click_softkey_cancel_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingResetUG *ad = (SettingResetUG *) data; + + setting_view_change(&setting_view_reset_settings, &setting_view_reset_main, ad); +} + +static void +setting_reset_settings_click_softkey_reset_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingResetUG *ad = (SettingResetUG *) data; + //int screen_lock_type = 0; + + //every time clicking 'Reset' button, restore following VCONFs + //vconf_set_bool(VCONFKEY_SETAPPL_FONT_CHANGED, FALSE); + + if (ad->list_data.selInfoPop) { + evas_object_del(ad->list_data.selInfoPop); + ad->list_data.selInfoPop = NULL; + } + + if (!setting_done_list_is_some_item_selected(&(ad->list_data))) { + setting_create_simple_popup(NULL, ad->win_get, NULL, "No item selected"); + } else { + + setting_reset_settings_check_state(&(ad->list_data)); + + } +} diff --git a/setting-reset/src/setting-reset.c b/setting-reset/src/setting-reset.c new file mode 100755 index 0000000..f997f65 --- /dev/null +++ b/setting-reset/src/setting-reset.c @@ -0,0 +1,351 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include +#include +#include + +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif + +static void setting_reset_ug_cb_resize(void *data, Evas *e, Evas_Object *obj, + void *event_info) +{ + SettingResetUG *ad = (SettingResetUG *) data; + setting_view_update(&setting_view_reset_main, ad); +} + +static void *setting_reset_ug_on_create(ui_gadget_h ug, enum ug_mode mode, + service_h service, void *priv) +{ + setting_retvm_if((!priv), NULL, "!priv"); + + SettingResetUG *resetUG = priv; + resetUG->ug = ug; + + resetUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug); + resetUG->win_get = (Evas_Object *) ug_get_window(); + + evas_object_show(resetUG->win_main_layout); + resetUG->evas = evas_object_evas_get(resetUG->win_main_layout); + + setting_retvm_if(resetUG->win_main_layout == NULL, NULL, + "cannot get main window "); + + setting_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR); + + setting_create_Gendial_itc("multiline/1text", &(resetUG->itc_1text)); + setting_create_Gendial_itc("dialogue/bg/1icon", &(resetUG->itc_1icon)); + + /* creating a view. */ + setting_view_node_table_register(&setting_view_reset_main, NULL); + setting_view_node_table_register(&setting_view_reset_settings, &setting_view_reset_main); + setting_view_node_set_cur_view(&setting_view_reset_main); + + setting_view_create(&setting_view_reset_main, (void *)resetUG); + evas_object_event_callback_add(resetUG->win_main_layout, + EVAS_CALLBACK_RESIZE, + setting_reset_ug_cb_resize, resetUG); + return resetUG->ly_main; +} + +static void setting_reset_ug_on_start(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_reset_ug_on_pause(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_reset_ug_on_resume(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_reset_ug_on_destroy(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if((!priv), "!priv"); + SettingResetUG *resetUG = priv; + + evas_object_event_callback_del(resetUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_reset_ug_cb_resize); /* fix flash issue for gallery */ + resetUG->ug = ug; + /* delete the allocated objects. */ + setting_view_destroy(&setting_view_reset_settings, resetUG); + setting_view_destroy(&setting_view_reset_main, resetUG); + + if (NULL != ug_get_layout(resetUG->ug)) { + evas_object_hide((Evas_Object *) ug_get_layout(resetUG->ug)); + evas_object_del((Evas_Object *) ug_get_layout(resetUG->ug)); + } + + SETTING_TRACE_END; +} + +static void setting_reset_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; +} + +static void setting_reset_ug_on_event(ui_gadget_h ug, enum ug_event event, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(!priv, "!priv"); + SettingResetUG *ad = (SettingResetUG *) priv; + switch (event) { + case UG_EVENT_LOW_MEMORY: + break; + case UG_EVENT_LOW_BATTERY: + break; + case UG_EVENT_LANG_CHANGE: + { + /* navigation item in reset setting view */ + Elm_Object_Item *navi_it = elm_naviframe_top_item_get(ad->navi_bar); + ret_if(!navi_it); + elm_object_item_text_set(navi_it, _(RESET_SETTINGS_STR)); + + /* navigation item in reset main view */ + navi_it = elm_naviframe_bottom_item_get(ad->navi_bar); + ret_if(!navi_it); + elm_object_item_text_set(navi_it, _("IDS_COM_BODY_RESET")); + + if (ad->main_scroller) + { + elm_genlist_realized_items_update(ad->main_scroller); + } + SETTING_TRACE("ad->main_scroller:%p", ad->main_scroller); + + if (ad->controllbar) + { + Elm_Object_Item *item = NULL; + item = elm_toolbar_first_item_get(ad->controllbar); + if (item) + { +#if SUPPORT_BOTTOM_BTNS + elm_object_item_text_set(item, _("IDS_COM_BODY_RESET")); +#else + Evas_Object *eo_btn = elm_object_item_part_content_get(item, "object"); + setting_retm_if(eo_btn == NULL, "get eo_lbtn failed"); + elm_object_text_set(eo_btn, _("IDS_COM_SK_CANCEL")); +#endif + } + + item = elm_toolbar_last_item_get(ad->controllbar); + if (item) + { +#if SUPPORT_BOTTOM_BTNS + elm_object_item_text_set(item, _("IDS_COM_SK_CANCEL")); +#else + Evas_Object *eo_btn = elm_object_item_part_content_get(item, "object"); + setting_retm_if(eo_btn == NULL, "get eo_lbtn failed"); + elm_object_text_set(eo_btn, _("IDS_COM_BODY_RESET")); +#endif + } + } + Evas_Object *sub_layout = elm_object_part_content_get(ad->view_layout, "elm.swallow.contents"); + if (sub_layout) + { + Evas_Object *select_all_layout = elm_object_part_content_get(sub_layout, "search_bar"); + if (select_all_layout) { + elm_object_part_text_set(select_all_layout, "elm.text", _(KeyStr_Select_All)); + } + } + + if (ad->reset_list) + elm_genlist_realized_items_update(ad->reset_list); + + // setting_reset_result_popup_update(ad); + + 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; + case UG_EVENT_REGION_CHANGE: + break; + default: + break; + } +} + +static void setting_reset_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + + switch (event) { + case UG_KEY_EVENT_END: + ug_destroy_me(ug); + break; + default: + break; + } +} + +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + SettingResetUG *resetUG = calloc(1, sizeof(SettingResetUG)); + setting_retvm_if(!resetUG, -1, "Create SettingResetUG obj failed"); + + ops->create = setting_reset_ug_on_create; + ops->start = setting_reset_ug_on_start; + ops->pause = setting_reset_ug_on_pause; + ops->resume = setting_reset_ug_on_resume; + ops->destroy = setting_reset_ug_on_destroy; + ops->message = setting_reset_ug_on_message; + ops->event = setting_reset_ug_on_event; + ops->key_event = setting_reset_ug_on_key_event; + ops->priv = resetUG; + ops->opt = UG_OPT_INDICATOR_ENABLE; + + return 0; +} + +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + struct SettingResetUG *resetUG; + setting_retm_if(!ops, "ops == NULL"); + + resetUG = ops->priv; + if (resetUG) + FREE(resetUG); +} + +/* *************************************************** + * + *general func + * + ***************************************************/ +#if DISABLED_CODE +static void __ask_popup_response_cb(void *data, Evas_Object *obj, void *event_info) +{ + if (btn_type(obj) == POPUP_RESPONSE_OK) { + elm_exit();//exit the Setting app + } + + ret_if(!data); + SettingResetUG *ad = data; + if (ad->ask_popup) { + evas_object_del(ad->ask_popup); + ad->ask_popup = NULL; + } +} +#endif + +void setting_reset_result_popup_resp_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + ret_if(!data); + SettingResetUG *ad = data; + if (btn_type(obj) == POPUP_RESPONSE_OK) { + } + if (ad->notify) { + evas_object_del(ad->notify); + ad->notify = NULL; + } + + if (ad->old_notify) { + evas_object_del(ad->old_notify); + ad->old_notify = NULL; + } + ad->pop_btn = NULL; +} + +/** + * language change makes B/S on resetting "Language&Region UG" + */ +void setting_reset_result_popup_update(void *data) +{ +#if 1 + SETTING_TRACE_BEGIN; + ret_if(!data); + SettingResetUG *ad = data; + if (ad->notify) { + elm_object_part_text_set(ad->notify, "title,text", _(RESET_RESULT_STR)); + Evas_Object *btn = elm_object_part_content_get(ad->notify, "button1"); + elm_object_style_set(btn, "popup_button/default"); + if (btn) + { + elm_object_text_set(btn, _("IDS_COM_SK_OK")); + } + Evas_Object *genlist = elm_object_content_get(ad->notify); + if(genlist) + { + elm_genlist_realized_items_update(genlist); + elm_object_content_set(ad->notify, genlist); + } + //evas_object_show(ad->notify); + } +#endif +} + + +static void __tapi_flight_mode_cb(TapiHandle *handle, int result, void *data, void *user_data) +{ + SETTING_TRACE_BEGIN; + SETTING_TRACE("result:%d", result); +} +int setting_reset_flight_mode() +{ + int ret = -1; + TapiHandle *handle = tel_init(NULL); + if (!handle) { + SETTING_TRACE_ERROR("tel_init error"); + } + + //if callback is NULL,it will return failed directly. + if (tel_set_flight_mode(handle, TAPI_POWER_FLIGHT_MODE_LEAVE, __tapi_flight_mode_cb, NULL) == 0) { +#if SUPPORT_RUN_SYSTEM_COMMAND + ret = excuteCmd(SETTING_POSTINST_FILE, 1, "flightmode"); +#else + ret = vconf_set_bool(VCONFKEY_TELEPHONY_FLIGHT_MODE, FALSE); +#endif + } else { + SETTING_TRACE_ERROR("tel_set_flight_mode error"); + } + + + if (tel_deinit(handle) != 0) { + SETTING_TRACE_ERROR("tel_deinit error"); + } + return ret; +} + +int setting_reset_rotation_lock(void) +{ +#if SUPPORT_RUN_SYSTEM_COMMAND + return excuteCmd(SETTING_POSTINST_FILE, 1, "rotationLock"); +#else + return vconf_set_bool(VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL, FALSE); +#endif +} + diff --git a/setting-security/CMakeLists.txt b/setting-security/CMakeLists.txt new file mode 100755 index 0000000..1183688 --- /dev/null +++ b/setting-security/CMakeLists.txt @@ -0,0 +1,36 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_security REQUIRED ecore evas elementary tapi dlog +ui-gadget-1 capi-appfw-application appcore-common ail utilX) + +FOREACH(flag ${pkgs_security_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") +ADD_DEFINITIONS("-fpie") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") + +ADD_LIBRARY(${SETTING_SECURITY_UG} SHARED + ./src/setting-security.c + ./src/setting-security-main.c + ./src/setting-security-sim-settings.c + ) + +TARGET_LINK_LIBRARIES(${SETTING_SECURITY_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_SECURITY_UG} ${pkgs_security_LDFLAGS}) + +INSTALL(TARGETS ${SETTING_SECURITY_UG} DESTINATION /usr/ug/lib) diff --git a/setting-security/include/setting-security-main.h b/setting-security/include/setting-security-main.h new file mode 100755 index 0000000..dbbb2e0 --- /dev/null +++ b/setting-security/include/setting-security-main.h @@ -0,0 +1,24 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_SECURITY_MAIN_H__ +#define __SETTING_SECURITY_MAIN_H__ + +#include + +void setting_security_main_vconf_change_cb(keynode_t *key, void *data); +int _handle_sim_exception(void *data, int sim_status); +#endif diff --git a/setting-security/include/setting-security-sim-settings.h b/setting-security/include/setting-security-sim-settings.h new file mode 100755 index 0000000..810da87 --- /dev/null +++ b/setting-security/include/setting-security-sim-settings.h @@ -0,0 +1,34 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_SECURITY_SIM_SETTINGS_H__ +#define __SETTING_SECURITY_SIM_SETTINGS_H__ + +#include + + +static void +setting_security_sim_settings_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, + void *event_info); +static void +setting_security_sim_settings_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info); + +static void +setting_security_sim_settings_chk_btn_cb(void *data, Evas_Object *obj, + void *event_info); + +#endif diff --git a/setting-security/include/setting-security.h b/setting-security/include/setting-security.h new file mode 100755 index 0000000..4bf784d --- /dev/null +++ b/setting-security/include/setting-security.h @@ -0,0 +1,120 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_SECURITY_H__ +#define __SETTING_SECURITY_H__ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +#define USELESS_SIM_CARD "Not useful SIM card" + +#if SUPPORT_PARENTAL_MODE +#define Keystr_ParentalMode "Parental mode" +#endif + +typedef struct _SettingSecurityUG SettingSecurityUG; + +typedef enum { + SETTING_SEC_PW_SIM_LOCK_ON, + SETTING_SEC_PW_SIM_LOCK_OFF, + SETTING_SEC_PW_SIM_LOCK_DISABLED, + SETTING_SEC_PW_PIN_LOCK_ON, + SETTING_SEC_PW_PIN_LOCK_OFF, + SETTING_SEC_PW_CHANGE_PIN1, + SETTING_SEC_PW_CHANGE_PIN2, + SETTING_SEC_PW_PIN1_BLOCKED, + SETTING_SEC_PW_PIN2_BLOCKED, + SETTING_SEC_PW_PIN1_UNBLOCKED, + SETTING_SEC_PW_PIN2_UNBLOCKED, + SETTING_SEC_PW_MAX +} setting_sec_pw_type; + +struct _security_item { + int pw_type_num; + char *pw_type_string; + int (*passwd_handler)(SettingSecurityUG *ad, void* data); +}; + +/** + * Setting Security UG context + * all UG function has void* as an agument. this is casted back to SettingSecurityUG + * and the functions access app context. + */ +struct _SettingSecurityUG { + ui_gadget_h ug; + TapiHandle *handle; + TelSimFacilityStatus_t sim_status; + TelSimFacilityStatus_t pin1_status; + TelSimFacilityStatus_t pin2_status;//it indicates fdn status too + + /* add more variables here (move your appdata to here) */ + Evas *evas; + Evas_Object *win_main_layout; + Evas_Object *win_get; + Evas_Object *notify; + + Evas_Object *ly_main; + Evas_Object *navi_bar; + Evas_Object *sim_popup; + ui_gadget_h ug_passwd; + + Setting_GenGroupItem_Data *data_sim_lk; + Setting_GenGroupItem_Data *data_pin_lk; + Setting_GenGroupItem_Data *data_change_pin1; + Setting_GenGroupItem_Data *data_change_pin2; + /* for simple password */ + + Elm_Genlist_Item_Class itc_1text; + Elm_Genlist_Item_Class itc_1text_1icon; + Elm_Genlist_Item_Class itc_seperator; + Elm_Genlist_Item_Class itc_2text_2; + + setting_sec_pw_type pw_type; + + char *input_pwd; + + int sel_item; /**< It's used to check PIN1, PIN2 _BLOCKED. 0:click pin lock, 1:change pin1 code, 2:fdn, 3: change pin2 code */ + Ecore_Timer *update_view_timer; +}; + +extern setting_view setting_view_security_main; +extern setting_view setting_view_security_sim_settings; + +SettingSecurityUG *g_ad; /* for tapi callback */ + +void setting_security_result_password_ug_cb(ui_gadget_h ug, + service_h service, void *priv); +void setting_security_sim_get_facility_cb(TapiHandle *handle, int result, void *data, void *user_data); +void setting_security_pin_get_facility_cb(TapiHandle *handle, int result, void *data, void *user_data); + +gboolean setting_security_create_password_sg(void *data); + +#endif diff --git a/setting-security/src/setting-security-main.c b/setting-security/src/setting-security-main.c new file mode 100755 index 0000000..8f063c2 --- /dev/null +++ b/setting-security/src/setting-security-main.c @@ -0,0 +1,253 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include +#include +#include + +#include +#include +#include + +static int setting_security_main_create(void *cb); +static int setting_security_main_destroy(void *cb); +static int setting_security_main_update(void *cb); +static int setting_security_main_cleanup(void *cb); + +setting_view setting_view_security_main = { + .create = setting_security_main_create, + .destroy = setting_security_main_destroy, + .update = setting_security_main_update, + .cleanup = setting_security_main_cleanup, +}; + +static void setting_security_main_click_softkey_back_cb(void *data, + Evas_Object *obj, + void *event_info); +#if DISABLED_CODE +static void setting_security_main_chk_btn_cb(void *data, Evas_Object *obj, + void *event_info); +#endif +static void setting_security_main_mouse_up_Gendial_list_cb(void *data, + Evas_Object *obj, + void *event_info); +#if DISABLED_CODE +static void setting_security_main_update_view(void *data, char *keyStr); +static void setting_security_main_create_timer(void *data); +static Eina_Bool setting_security_main_timer_update_cb(void *data); +#endif + +static void setting_security_main_check_vconf_value(void *data); + + +/* *************************************************** + ** + **basic func + ** + ****************************************************/ + +static int setting_security_main_create(void *cb) +{ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SETTING_TRACE_BEGIN; + SettingSecurityUG *ad = (SettingSecurityUG *) cb; + + Evas_Object *scroller; + + int ret = 0; + int value = 0; + int err = 0; + + gboolean b_status = FALSE; + int tapi_ret; + + /* add basic layout */ + char setBtnStr[MAX_DISPLAY_NAME_LEN_ON_UI]; + snprintf(setBtnStr, sizeof(setBtnStr), "%s", + (char *)dgettext("sys_string", "IDS_COM_BODY_BACK")); + ad->ly_main = + setting_create_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _("IDS_ST_BODY_SECURITY"), + setBtnStr, NULL, + setting_security_main_click_softkey_back_cb, + NULL, ad, &scroller, + &ad->navi_bar); + + Elm_Object_Item *item = NULL; + + /* SIM settings */ + if(ad->handle && !isEmulBin()) + { + /* check status of sim and tapi */ + ret = setting_get_int_slp_key(INT_SLP_SETTING_SIM_SLOT, &value, &err); + tapi_ret = tel_check_modem_power_status(ad->handle, &b_status); + + if ((tapi_ret == TAPI_API_SUCCESS) && (b_status == TAPI_PHONE_POWER_STATUS_ON) && (value == VCONFKEY_TELEPHONY_SIM_INSERTED)) + { + /* separator */ + item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + setting_create_Gendial_field_def(scroller, &(ad->itc_1text), + setting_security_main_mouse_up_Gendial_list_cb,ad, + SWALLOW_Type_INVALID, + NULL, NULL, + 0,"IDS_ST_BODY_SIM_CARD_SETTINGS", NULL, NULL); + } + } + + /* update info */ + + setting_view_security_main.is_create = 1; + + g_ad = (SettingSecurityUG *) malloc(sizeof(SettingSecurityUG) *1); + retv_if(!g_ad, -1); + memcpy(g_ad, ad, sizeof(SettingSecurityUG)); + + SETTING_TRACE_END; + return SETTING_RETURN_SUCCESS; +} + +static int setting_security_main_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingSecurityUG *ad = (SettingSecurityUG *) cb; + + if (ad->update_view_timer) { + ecore_timer_del(ad->update_view_timer); + ad->update_view_timer = NULL; + } + + if (ad->ly_main != NULL) { + evas_object_del(ad->ly_main); + + FREE(g_ad); + } + if(ad->input_pwd) + FREE(ad->input_pwd); + + setting_view_security_main.is_create = 0; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_security_main_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingSecurityUG *ad = (SettingSecurityUG *) cb; + + evas_object_show(ad->ly_main); + + return SETTING_RETURN_SUCCESS; +} + +static int setting_security_main_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + ** + **call back func + ** + ****************************************************/ +static void +setting_security_main_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "[Setting > Security] Data parameter is NULL"); + + SettingSecurityUG *ad = (SettingSecurityUG *) data; + + /* Send destroy request */ + ug_destroy_me(ad->ug); +} + +int _handle_sim_exception(void *data, int sim_status) +{ + retv_if(data == NULL, SETTING_RETURN_FAIL); + + SettingSecurityUG *ad = (SettingSecurityUG *) data; + + switch (sim_status) { + case VCONFKEY_TELEPHONY_SIM_INSERTED: + break; + + case VCONFKEY_TELEPHONY_SIM_NOT_PRESENT: + + setting_create_simple_popup(NULL, ad->win_get, + NULL, _("IDS_ST_SECURITY_BODY_NOIMSI")); + SETTING_TRACE_DEBUG + ("%s*** [ERR] INCORRECTED SIM. sim_slot_type=%d ***%s", + SETTING_FONT_RED, sim_status, SETTING_FONT_BLACK); + return SETTING_RETURN_FAIL; + + break; + + case VCONFKEY_TELEPHONY_SIM_CARD_ERROR: + case VCONFKEY_TELEPHONY_SIM_UNKNOWN: + + setting_create_simple_popup(NULL, ad->win_get, + NULL, _("IDS_COM_BODY_INVALID_SIM_CARD")); + SETTING_TRACE_DEBUG + ("%s*** [ERR] INCORRECTED SIM. sim_slot_type=%d ***%s", + SETTING_FONT_RED, sim_status, SETTING_FONT_BLACK); + return SETTING_RETURN_FAIL; + + break; + default: + break; + } + return SETTING_RETURN_SUCCESS; +} + +static void +setting_security_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + SettingSecurityUG *ad = (SettingSecurityUG *) data; + + SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); + + if(!safeStrCmp("IDS_ST_BODY_SIM_CARD_SETTINGS", list_item->keyStr)) { + setting_view_change(&setting_view_security_main, &setting_view_security_sim_settings, ad); + } +} diff --git a/setting-security/src/setting-security-sim-settings.c b/setting-security/src/setting-security-sim-settings.c new file mode 100755 index 0000000..7813a5f --- /dev/null +++ b/setting-security/src/setting-security-sim-settings.c @@ -0,0 +1,540 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include +#include +#include + +#include +#include +#include + +static int setting_security_sim_settings_create(void *cb); +static int setting_security_sim_settings_destroy(void *cb); +static int setting_security_sim_settings_update(void *cb); +static int setting_security_sim_settings_cleanup(void *cb); + +setting_view setting_view_security_sim_settings = { + .create = setting_security_sim_settings_create, + .destroy = setting_security_sim_settings_destroy, + .update = setting_security_sim_settings_update, + .cleanup = setting_security_sim_settings_cleanup, +}; + +/* *************************************************** + ** + **basic func + ** + ****************************************************/ + +static int setting_security_sim_settings_create(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingSecurityUG *ad = (SettingSecurityUG *) cb; + + Evas_Object *scroller; + Elm_Object_Item *item = NULL; + + /* add basic layout */ + setting_push_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _("SIM settings"), + dgettext("sys_string", "IDS_COM_BODY_BACK"), NULL, + setting_security_sim_settings_click_softkey_back_cb, + NULL, ad, &scroller, ad->navi_bar); + + /* separator */ + item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* to do : sim settings menu */ + + /* f. sim lock */ + //if TAPI is responsed in time, ad->sim_status will have invalid value, + //or else ad->data_sim_lk will be updated by setting_security_sim_get_facility_cb + ad->data_sim_lk = setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + setting_security_sim_settings_mouse_up_Gendial_list_cb, ad, + SWALLOW_Type_1TOGGLE, + NULL, NULL, + ad->sim_status,"IDS_ST_BODY_SIM_LOCK", NULL, setting_security_sim_settings_chk_btn_cb); + if(ad->data_sim_lk) + ad->data_sim_lk->userdata = ad; + else { + SETTING_TRACE_ERROR("ad->data_sim_lk is null"); + return SETTING_RETURN_FAIL; + } + + //setting_security_main_update_view(ad, "IDS_ST_BODY_SIM_LOCK"); + + item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* g. pin lock */ + //if TAPI is responsed in time, ad->sim_status will have invalid value, + //or else ad->data_pin_lk will be updated by setting_security_sim_get_facility_cb + ad->data_pin_lk = setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + setting_security_sim_settings_mouse_up_Gendial_list_cb, ad, + SWALLOW_Type_1TOGGLE, + NULL, NULL, + ad->pin1_status,"IDS_COM_BODY_PIN_LOCK", NULL, setting_security_sim_settings_chk_btn_cb); + if(ad->data_pin_lk) + ad->data_pin_lk->userdata = ad; + + /* h. change pin1 */ + ad->data_change_pin1 = setting_create_Gendial_field_def(scroller, &(ad->itc_1text), + setting_security_sim_settings_mouse_up_Gendial_list_cb,ad, + SWALLOW_Type_INVALID, + NULL, NULL, + 0,"IDS_ST_BODY_CHANGE_PIN1", NULL, NULL); + + if(!ad->pin1_status) + setting_disable_genlist_item(ad->data_change_pin1->item); + + /* i. change pin2 */ + ad->data_change_pin2 = setting_create_Gendial_field_def(scroller, &(ad->itc_1text), + setting_security_sim_settings_mouse_up_Gendial_list_cb,ad, + SWALLOW_Type_INVALID, + NULL, NULL, + 0,"IDS_ST_BODY_CHANGE_PIN2", NULL, NULL); + +#if SUPPORT_FDN + /* j. FDN */ + //if TAPI is responsed in time, ad->sim_status will have invalid value, + //or else ad->data_fdn will be updated by setting_security_sim_get_facility_cb + ad->data_fdn = setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + setting_security_sim_settings_mouse_up_Gendial_list_cb, ad, + SWALLOW_Type_1TOGGLE, + NULL, NULL, + ad->pin2_status, Keystr_FDN, NULL, setting_security_sim_settings_chk_btn_cb); + if(ad->data_fdn) + ad->data_fdn->userdata = ad; +#endif + + setting_view_security_sim_settings.is_create = 1; + + return SETTING_RETURN_SUCCESS; + +} + +static int setting_security_sim_settings_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingSecurityUG *ad = (SettingSecurityUG *) cb; + + elm_naviframe_item_pop(ad->navi_bar); + + setting_view_security_sim_settings.is_create = 0; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_security_sim_settings_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingSecurityUG *ad = (SettingSecurityUG *) cb; + + SETTING_TRACE("Update SIM menu"); + if (ad->data_sim_lk)//it indicates TAPI is not responsed in time + { + ad->data_sim_lk->chk_status = ad->sim_status; + elm_check_state_set(ad->data_sim_lk->eo_check, ad->sim_status); + } + + SETTING_TRACE("Update PIN menu"); + if (ad->data_pin_lk)//it indicates TAPI is not responsed in time + { + ad->data_pin_lk->chk_status = ad->pin1_status; + elm_check_state_set(ad->data_pin_lk->eo_check, ad->pin1_status); + if(ad->data_pin_lk->chk_status == 0) + setting_disable_genlist_item(ad->data_change_pin1->item); + else + setting_enable_genlist_item(ad->data_change_pin1->item); + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_security_sim_settings_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingSecurityUG *ad = (SettingSecurityUG *) cb; + return setting_security_sim_settings_destroy(ad); +} + +/* *************************************************** + ** + **call back func + ** + ****************************************************/ + +static void get_pin_lock_info_cb(TapiHandle *handle, int result, void *data, void *user_data) +{ + SETTING_TRACE_BEGIN; + + TelSimPinOperationResult_t sec_rt = result; + TelSimLockInfo_t *lock = data; + + SettingSecurityUG *ad = (SettingSecurityUG *)user_data; + + /* delete popup */ + if(ad->sim_popup) + { + evas_object_del(ad->sim_popup); + ad->sim_popup = NULL; + } + + int old_state = elm_check_state_get(ad->data_pin_lk->eo_check); + if (old_state) { + SETTING_TRACE("Current status of PIN Lock is ON"); + ad->pw_type = SETTING_SEC_PW_PIN_LOCK_OFF; + } else { + SETTING_TRACE("Current status of PIN Lock is OFF"); + ad->pw_type = SETTING_SEC_PW_PIN_LOCK_ON; + } + + SETTING_TRACE_DEBUG("sec_ret[%d], lock_type[%d], lock_status[%d], retry_count[%d]", sec_rt, lock->lock_type, lock->lock_status, lock->retry_count); + if(lock->lock_status == 2) /* PUK */ + { + SETTING_TRACE("Current status of PIN Lock is Blocked"); + ad->pw_type = SETTING_SEC_PW_PIN1_BLOCKED; + } + else if(lock->lock_status == 5) /* Blocked */ + { + setting_create_simple_popup(NULL, ad->win_get, + NULL, _("PUK is blocked. Can't use PIN Lock")); + return; + } + + setting_security_create_password_sg(ad); +} + + void _draw_pin_onoff_status(void *data, Evas_Object *check) +{ + SETTING_TRACE("PIN Lock"); + + ret_if(data == NULL); + + SettingSecurityUG *ad = (SettingSecurityUG *) data; + int value = 0; + int err = 0; + int ret = 0; + + ad->sel_item = 0; /* 0:click pin lock, 1:change pin1 code, 2:fdn, 3: change pin2 code */ + + ret = setting_get_int_slp_key(INT_SLP_SETTING_SIM_SLOT, &value, &err); + + ret = _handle_sim_exception(ad, value); + if(ret == SETTING_RETURN_FAIL) + return; + + /* check sim status */ + int tapi_ret = TAPI_API_INVALID_INPUT; + TelSimCardType_t sim_card = TAPI_SIM_CARD_TYPE_UNKNOWN; + + tapi_ret = tel_get_sim_type(ad->handle, &sim_card); + SETTING_TRACE("SIM Type is %d", (int)sim_card); + if (sim_card == (TelSimCardType_t) TAPI_SIM_CARD_TYPE_UNKNOWN) { + SETTING_TRACE_DEBUG + ("%s*** [ERR] tel_get_sim_type. sim_card=%d ***%s", + SETTING_FONT_RED, sim_card, SETTING_FONT_BLACK); + setting_create_simple_popup(NULL, ad->win_get, + NULL, _("IDS_COM_BODY_INVALID_SIM_CARD")); + return; + } + + /* create popup */ + if(ad->sim_popup) + { + evas_object_del(ad->sim_popup); + ad->sim_popup = NULL; + } + ad->sim_popup = setting_create_popup_without_btn(ad, ad->win_get, + NULL, _("Waiting response of SIM ..."), + NULL, + 0, FALSE, FALSE); + + if(tel_get_sim_lock_info(ad->handle, TAPI_SIM_LOCK_SC, get_pin_lock_info_cb, ad) != 0) + { + SETTING_TRACE_ERROR("failed to call tel_get_sim_lock_info()"); + } +} + +static void get_sim_lock_info_cb(TapiHandle *handle, int result, void *data, void *user_data) +{ + SETTING_TRACE_BEGIN; + ret_if(data == NULL || user_data == NULL); + + TelSimPinOperationResult_t sec_rt = result; + TelSimLockInfo_t *lock = data; + + SettingSecurityUG *ad = (SettingSecurityUG *)user_data; + + /* delete popup */ + if(ad->sim_popup) + { + evas_object_del(ad->sim_popup); + ad->sim_popup = NULL; + } + + int old_state = elm_check_state_get(ad->data_sim_lk->eo_check); + if (old_state) { + SETTING_TRACE("Current status of SIM Lock is ON"); + ad->pw_type = SETTING_SEC_PW_SIM_LOCK_OFF; + } else { + SETTING_TRACE("Current status of SIM Lock is OFF"); + ad->pw_type = SETTING_SEC_PW_SIM_LOCK_ON; + } + + SETTING_TRACE_DEBUG("sec_ret[%d], lock_type[%d], lock_status[%d], retry_count[%d]", sec_rt, lock->lock_type, lock->lock_status, lock->retry_count); + + if(lock->lock_status == 5) /* Blocked */ + { + setting_create_simple_popup(NULL, ad->win_get, + NULL, _("SIM is blocked. Can't use SIM Lock")); + return; + } + + setting_security_create_password_sg(ad); +} + +void _draw_sim_onoff_status(void *data, Evas_Object *check) +{ + ret_if(data == NULL); + + SettingSecurityUG *ad = (SettingSecurityUG *) data; + int value = 0; + int err = 0; + int ret = 0; + + ret = setting_get_int_slp_key(INT_SLP_SETTING_SIM_SLOT, &value, &err); + ret = _handle_sim_exception(ad, value); + if(ret == SETTING_RETURN_FAIL) + return; + + /* create popup */ + if(ad->sim_popup) + { + evas_object_del(ad->sim_popup); + ad->sim_popup = NULL; + } + ad->sim_popup = setting_create_popup_without_btn(ad, ad->win_get, + NULL, _("Waiting response of SIM ..."), + NULL, + 0, FALSE, FALSE); + + if(tel_get_sim_lock_info(ad->handle, TAPI_SIM_LOCK_PS, get_sim_lock_info_cb, ad) != 0) + { + SETTING_TRACE_ERROR("failed to call tel_get_sim_lock_info()"); + } +} + +static void get_change_pin_info_cb(TapiHandle *handle, int result, void *data, void *user_data) +{ + SETTING_TRACE_BEGIN; + ret_if(data == NULL || user_data == NULL); + + TelSimPinOperationResult_t sec_rt = result; + TelSimLockInfo_t *lock = data; + + SettingSecurityUG *ad = (SettingSecurityUG *)user_data; + + SETTING_TRACE_DEBUG("sec_ret[%d], lock_type[%d], lock_status[%d], retry_count[%d]", sec_rt, lock->lock_type, lock->lock_status, lock->retry_count); + if(lock->lock_type == TAPI_SIM_LOCK_SC && lock->lock_status == 2) /* PUK required */ + { + SETTING_TRACE("Current status of PIN Lock is Blocked"); + ad->pw_type = SETTING_SEC_PW_PIN1_BLOCKED; + } + else if(lock->lock_type == TAPI_SIM_LOCK_SC && lock->lock_status == 1) /* PIN required */ + { + ad->pw_type = SETTING_SEC_PW_CHANGE_PIN1; + } + else if(lock->lock_type == TAPI_SIM_LOCK_FD && lock->lock_status == 4) /* PUK2 required */ + { + SETTING_TRACE("Current status of Change PIN2 is Blocked"); + ad->pw_type = SETTING_SEC_PW_PIN2_BLOCKED; + } + else if(lock->lock_type == TAPI_SIM_LOCK_FD && lock->lock_status == 3) /* PIN2 required */ + { + ad->pw_type = SETTING_SEC_PW_CHANGE_PIN2; + } + else if(lock->lock_status == 5) /* Blocked */ + { + setting_create_simple_popup(NULL, ad->win_get, + NULL, _("Permanent block SIM")); + return; + } + + setting_security_create_password_sg(ad); +} + +void _mouse_up_change_pin(void *data, int sel_item) +{ + ret_if(data == NULL); + + SettingSecurityUG *ad = (SettingSecurityUG *) data; + + ad->sel_item = sel_item; /* 0:click pin lock, 1:change pin1 code, 2:fdn, 3: change pin2 code */ + int ret; + int value = 0; + int err; + + ret = setting_get_int_slp_key(INT_SLP_SETTING_SIM_SLOT, &value, &err); + + switch (value) { + case VCONFKEY_TELEPHONY_SIM_INSERTED: + break; + case VCONFKEY_TELEPHONY_SIM_NOT_PRESENT: + setting_create_simple_popup(NULL, ad->win_get, + NULL, _("IDS_ST_SECURITY_BODY_NOIMSI")); + SETTING_TRACE_DEBUG + ("%s*** [ERR] INCORRECTED SIM. sim_slot_type=%d ***%s", + SETTING_FONT_RED, value, SETTING_FONT_BLACK); + return; + break; + case VCONFKEY_TELEPHONY_SIM_CARD_ERROR: + case VCONFKEY_TELEPHONY_SIM_UNKNOWN: + setting_create_simple_popup(NULL, ad->win_get, + NULL, _("IDS_COM_BODY_INVALID_SIM_CARD")); + SETTING_TRACE_DEBUG + ("%s*** [ERR] INCORRECTED SIM. sim_slot_type=%d ***%s", + SETTING_FONT_RED, value, SETTING_FONT_BLACK); + return; + break; + default: + break; + } + + /* check sim status */ + TapiResult_t tapi_ret = TAPI_API_INVALID_INPUT; + TelSimCardType_t sim_card = TAPI_SIM_CARD_TYPE_UNKNOWN; + + tapi_ret = tel_get_sim_type(ad->handle, &sim_card); + + if (sim_card == (TelSimCardType_t) SETTING_TAPI_UNKNOWN_SIM_TYPE) { + SETTING_TRACE_DEBUG + ("%s*** [ERR] tel_get_sim_type. sim_card=%d ***%s", + SETTING_FONT_RED, sim_card, SETTING_FONT_BLACK); + setting_create_simple_popup(NULL, ad->win_get, + NULL, _("IDS_COM_BODY_INVALID_SIM_CARD")); + return; + } + if(sel_item == 1 && (ad->pin1_status == TAPI_SIM_FACILITY_ENABLED)) + { + if(tel_get_sim_lock_info(ad->handle, TAPI_SIM_LOCK_SC, get_change_pin_info_cb, ad) != 0) + { + SETTING_TRACE_ERROR("failed to call tel_get_sim_lock_info()"); + } + } + else if(sel_item == 3) + { + if(tel_get_sim_lock_info(ad->handle, TAPI_SIM_LOCK_FD, get_change_pin_info_cb, ad) != 0) + { + SETTING_TRACE_ERROR("failed to call tel_get_sim_lock_info()"); + } + //ad->pw_type = SETTING_SEC_PW_CHANGE_PIN2; + //setting_security_create_password_sg(ad); + } +} + +static void +setting_security_sim_settings_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + + SettingSecurityUG *ad = (SettingSecurityUG *) data; + + SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); + + if (!safeStrCmp("IDS_ST_BODY_SIM_LOCK", list_item->keyStr)) { + //it invokes async TAPIs to enable/disable, so don't change the status at first to avoid rollback + _draw_sim_onoff_status(ad, list_item->eo_check); + + }else if (!safeStrCmp("IDS_COM_BODY_PIN_LOCK", list_item->keyStr)) { + //it invokes async TAPIs to enable/disable, so don't change the status at first to avoid rollback + _draw_pin_onoff_status(ad, list_item->eo_check); + + } else if (!safeStrCmp("IDS_ST_BODY_CHANGE_PIN1", list_item->keyStr)) { + _mouse_up_change_pin(ad, 1); /* 0:click pin lock, 1:change pin1 code, 2:fdn, 3: change pin2 code */ + } else if (!safeStrCmp("IDS_ST_BODY_CHANGE_PIN2", list_item->keyStr)) { + _mouse_up_change_pin(ad, 3); /* 0:click pin lock, 1:change pin1 code, 2:fdn, 3: change pin2 code */ + } +} + +static void +setting_security_sim_settings_chk_btn_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "[Setting > Reset] Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + SettingSecurityUG *ad = list_item->userdata; + + list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */ + + if (!safeStrCmp("IDS_ST_BODY_SIM_LOCK", list_item->keyStr)) { + //Rollback state of toggle. + //it invokes async TAPIs to enable/disable, so don't change the status at first to avoid rollback + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + _draw_sim_onoff_status(ad, obj); + + }else if (!safeStrCmp("IDS_COM_BODY_PIN_LOCK", list_item->keyStr)) { + //Rollback state of toggle. + //it invokes async TAPIs to enable/disable, so don't change the status at first to avoid rollback + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + _draw_pin_onoff_status(ad, obj); + + } +} + + +static void +setting_security_sim_settings_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "[Setting > Security] Data parameter is NULL"); + + SettingSecurityUG *ad = (SettingSecurityUG *) data; + + setting_view_change(&setting_view_security_sim_settings, &setting_view_security_main, ad); + SETTING_TRACE_END; +} diff --git a/setting-security/src/setting-security.c b/setting-security/src/setting-security.c new file mode 100755 index 0000000..b610932 --- /dev/null +++ b/setting-security/src/setting-security.c @@ -0,0 +1,663 @@ +/* + * setting + * Copyright (c) 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://floralicense.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. + */ + +/** + *@defgroup setting-security + *UG creation code for setting-security + */ + +#include +#define Max_Passwd_View_Type_Len 64 +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif + + +int pwd_handler_do_nothing(SettingSecurityUG *data, void* arg) +{ + SETTING_TRACE_BEGIN; + //SettingSecurityUG *ad = (SettingSecurityUG *)data; + // DO NOTHING + return 0; +} + +int pwd_handler_sec_pw_sim_lock_on(SettingSecurityUG *data, void* arg) +{ + SETTING_TRACE_BEGIN; + SettingSecurityUG *ad = (SettingSecurityUG *)data; + if (tel_get_sim_facility(ad->handle, TAPI_SIM_LOCK_PS, setting_security_sim_get_facility_cb, ad) != TAPI_API_SUCCESS) + { + SETTING_TRACE_ERROR("tel_get_sim_facility(TAPI_SIM_LOCK_PS) failed"); + } + return 0; +} + + +int pwd_handler_sec_pw_sim_lock_off(SettingSecurityUG *data, void* arg) +{ + SETTING_TRACE_BEGIN; + SettingSecurityUG *ad = (SettingSecurityUG *)data; + if (tel_get_sim_facility(ad->handle, TAPI_SIM_LOCK_PS, setting_security_sim_get_facility_cb, ad) != TAPI_API_SUCCESS) + { + SETTING_TRACE_ERROR("tel_get_sim_facility(TAPI_SIM_LOCK_PS) failed"); + } + return 0; +} + + +int pwd_handler_sec_pw_pin_lock_on(SettingSecurityUG *data, void* arg) +{ + SETTING_TRACE_BEGIN; + SettingSecurityUG *ad = (SettingSecurityUG *)data; + if (tel_get_sim_facility(ad->handle, TAPI_SIM_LOCK_SC, setting_security_pin_get_facility_cb, ad) != TAPI_API_SUCCESS) + { + SETTING_TRACE_ERROR("tel_get_sim_facility(TAPI_SIM_LOCK_PS) failed"); + } + return 0; +} + + +int pwd_handler_sec_pw_pin_lock_off(SettingSecurityUG *data, void* arg) +{ + SETTING_TRACE_BEGIN; + SettingSecurityUG *ad = (SettingSecurityUG *)data; + if (tel_get_sim_facility(ad->handle, TAPI_SIM_LOCK_SC, setting_security_pin_get_facility_cb, ad) != TAPI_API_SUCCESS) + { + SETTING_TRACE_ERROR("tel_get_sim_facility(TAPI_SIM_LOCK_PS) failed"); + } + return 0; +} + + +int pwd_handler_sec_pw_sim_lock_disabled(SettingSecurityUG *data, void* arg) +{ + SETTING_TRACE_BEGIN; + SettingSecurityUG *ad = (SettingSecurityUG *)data; + // [in] Evas_Object *checkbtn + if (ad->data_sim_lk) + setting_disable_genlist_item(ad->data_sim_lk->item); + + return 0; +} + + +int pwd_handler_sec_pw_change_pin1(SettingSecurityUG *data, void* arg) +{ + SETTING_TRACE_BEGIN; + SettingSecurityUG *ad = (SettingSecurityUG *)data; + if (tel_get_sim_facility(ad->handle, TAPI_SIM_LOCK_SC, setting_security_pin_get_facility_cb, ad) != TAPI_API_SUCCESS) + { + SETTING_TRACE_ERROR("tel_get_sim_facility(TAPI_SIM_LOCK_PS) failed"); + } + return 0; +} + +int pwd_handler_sec_pw_change_pin2(SettingSecurityUG *data, void* arg) +{ + SETTING_TRACE_BEGIN; + return 0; +} + + +int pwd_handler_sec_pw_pin1_blocked(SettingSecurityUG *data, void* arg) +{ + SETTING_TRACE_BEGIN; + SettingSecurityUG *ad = (SettingSecurityUG *)data; +#if DISABLED_CODE + if (tel_get_sim_facility(ad->handle, TAPI_SIM_LOCK_SC, setting_security_sim_get_facility_cb, ad) != TAPI_API_SUCCESS) + { + SETTING_TRACE_ERROR("tel_get_sim_facility(TAPI_SIM_LOCK_PS) failed"); + } +#endif + return 0; +} + + +int pwd_handler_sec_pw_pin2_blocked(SettingSecurityUG *data, void* arg) +{ + SETTING_TRACE_BEGIN; + SettingSecurityUG *ad = (SettingSecurityUG *)data; +#if SUPPORT_FDN + if (tel_get_sim_facility(ad->handle, TAPI_SIM_LOCK_FD, setting_security_sim_get_facility_cb, ad) != TAPI_API_SUCCESS) + { + SETTING_TRACE_ERROR("tel_get_sim_facility(TAPI_SIM_LOCK_PS) failed"); + } +#endif + + return 0; +} + +static struct _security_item security_table[] = { + { SETTING_SEC_PW_SIM_LOCK_ON, "SETTING_PW_TYPE_SIM_LOCK_ON", pwd_handler_sec_pw_sim_lock_on }, + { SETTING_SEC_PW_SIM_LOCK_OFF, "SETTING_PW_TYPE_SIM_LOCK_OFF", pwd_handler_sec_pw_sim_lock_off }, + { SETTING_SEC_PW_SIM_LOCK_DISABLED, "SETTING_PW_TYPE_SIM_LOCK_DISABLE", pwd_handler_sec_pw_sim_lock_disabled}, + { SETTING_SEC_PW_PIN_LOCK_ON, "SETTING_PW_TYPE_PIN_LOCK_ON", pwd_handler_sec_pw_pin_lock_on }, + { SETTING_SEC_PW_PIN_LOCK_OFF, "SETTING_PW_TYPE_PIN_LOCK_OFF", pwd_handler_sec_pw_pin_lock_off }, + { SETTING_SEC_PW_CHANGE_PIN1, "SETTING_PW_TYPE_CHANGE_PIN1", pwd_handler_sec_pw_change_pin1}, + { SETTING_SEC_PW_CHANGE_PIN2, "SETTING_PW_TYPE_CHANGE_PIN2", pwd_handler_sec_pw_change_pin2}, + { SETTING_SEC_PW_PIN1_BLOCKED, "SETTING_PW_TYPE_PIN1_BLOCKED", pwd_handler_sec_pw_pin1_blocked}, + { SETTING_SEC_PW_PIN2_BLOCKED, "SETTING_PW_TYPE_PIN2_BLOCKED", pwd_handler_do_nothing}, + { SETTING_SEC_PW_PIN1_UNBLOCKED, "SETTING_PW_TYPE_PIN1_UNBLOCKED", pwd_handler_sec_pw_pin_lock_on}, + { SETTING_SEC_PW_PIN2_UNBLOCKED, "SETTING_PW_TYPE_PIN2_UNBLOCKED", pwd_handler_do_nothing}, + /*------------------------------------------------------------------------------------------------------------*/ + { SETTING_SEC_PW_MAX, NULL, pwd_handler_do_nothing} +}; + +static void setting_security_ug_cb_resize(void *data, Evas *e, + Evas_Object *obj, void *event_info) +{ + ret_if(data == NULL); + + SettingSecurityUG *ad = (SettingSecurityUG *) data; /* ad is point to data */ + setting_view_update(&setting_view_security_main, ad); +} + +static void *setting_security_ug_on_create(ui_gadget_h ug, + enum ug_mode mode, service_h service, + void *priv) +{ + setting_retvm_if((!priv), NULL, "!priv"); + + SettingSecurityUG *securityUG = priv; + securityUG->ug = ug; + + securityUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug); + securityUG->win_get = (Evas_Object *) ug_get_window(); + evas_object_show(securityUG->win_main_layout); + securityUG->evas = evas_object_evas_get(securityUG->win_main_layout); + + setting_retvm_if(securityUG->win_main_layout == NULL, NULL, + "[Setting >> Security] cannot get main window "); + + setting_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR); + + /* register view node table */ + setting_view_node_table_intialize(); + setting_view_node_table_register(&setting_view_security_main, NULL); + setting_view_node_table_register(&setting_view_security_sim_settings, &setting_view_security_main); + + setting_create_Gendial_itc("dialogue/1text", &(securityUG->itc_1text)); + setting_create_Gendial_itc("dialogue/2text.3", &(securityUG->itc_2text_2)); + setting_create_Gendial_itc("dialogue/1text.1icon", &(securityUG->itc_1text_1icon)); + + securityUG->itc_seperator.item_style = "dialogue/separator"; + securityUG->itc_seperator.func.text_get = NULL; + securityUG->itc_seperator.func.content_get = NULL; + securityUG->itc_seperator.func.state_get = NULL; + securityUG->itc_seperator.func.del = NULL; + + securityUG->update_view_timer = NULL; + /* creating a view. */ + securityUG->handle = tel_init(NULL); + if (!securityUG->handle) { + SETTING_TRACE_ERROR("*** [ERR] tel_init. ***"); + //return NULL; + } + else { + if (TAPI_API_SUCCESS != tel_get_sim_facility(securityUG->handle, TAPI_SIM_LOCK_PS, setting_security_sim_get_facility_cb, securityUG)) { + SETTING_TRACE_ERROR("*** [ERR] tel_get_sim_facility(sim_status). ***"); + } + + if (TAPI_API_SUCCESS != tel_get_sim_facility(securityUG->handle, TAPI_SIM_LOCK_SC, setting_security_sim_get_facility_cb, securityUG)) { + SETTING_TRACE_ERROR("*** [ERR] tel_get_sim_facility(pin1). ***"); + } + } + + setting_view_node_set_cur_view(&setting_view_security_main); + setting_view_create(&setting_view_security_main, (void *)securityUG); + evas_object_event_callback_add(securityUG->win_main_layout, + EVAS_CALLBACK_RESIZE, + setting_security_ug_cb_resize, + securityUG); + + return securityUG->ly_main; +} + +static void setting_security_ug_on_start(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_security_ug_on_pause(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_security_ug_on_resume(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_security_ug_on_destroy(ui_gadget_h ug, service_h service, + void *priv) +{ + setting_retm_if((!priv), "!priv"); + SettingSecurityUG *securityUG = priv; + + evas_object_event_callback_del(securityUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_security_ug_cb_resize); /* fix flash issue for gallery */ + securityUG->ug = ug; + if (securityUG->handle && tel_deinit(securityUG->handle) != TAPI_API_SUCCESS) { + SETTING_TRACE_DEBUG + ("%s*** [ERR] setting_network_unsubscribe_tapi_events. ***%s", + SETTING_FONT_RED, SETTING_FONT_BLACK); + } + + /* delete the allocated objects. */ + if (TRUE == setting_view_security_sim_settings.is_create) { + setting_view_destroy(&setting_view_security_sim_settings, securityUG); + } + if (TRUE == setting_view_security_main.is_create) { + setting_view_destroy(&setting_view_security_main, securityUG); + } + + if (NULL != ug_get_layout(securityUG->ug)) { + evas_object_hide((Evas_Object *) ug_get_layout(securityUG->ug)); + evas_object_del((Evas_Object *) ug_get_layout(securityUG->ug)); + } +} + +static void setting_security_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) +{ + +} + +static void setting_security_ug_on_event(ui_gadget_h ug, + enum ug_event event, service_h service, + 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; + case UG_EVENT_REGION_CHANGE: + break; + default: + break; + } +} + +static void setting_security_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, + service_h service, void *priv) +{ + if (!priv) + return; + SettingSecurityUG *ad = (SettingSecurityUG *) priv; /* ad is point to priv */ + switch (event) { + case UG_KEY_EVENT_END: + { + if (elm_naviframe_top_item_get(ad->navi_bar) == + elm_naviframe_bottom_item_get(ad->navi_bar)) { + ug_destroy_me(ug); + } else { + /* elm_naviframe_item_pop(ad->navi_bar); */ + setting_view_cb_at_endKey(ad); + } + } + break; + + default: + break; + } +} + +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + SettingSecurityUG *securityUG = calloc(1, sizeof(SettingSecurityUG)); + setting_retvm_if(!securityUG, -1, + "Create SettingSecurityUG obj failed"); + + ops->create = setting_security_ug_on_create; + ops->start = setting_security_ug_on_start; + ops->pause = setting_security_ug_on_pause; + ops->resume = setting_security_ug_on_resume; + ops->destroy = setting_security_ug_on_destroy; + ops->message = setting_security_ug_on_message; + ops->event = setting_security_ug_on_event; + ops->key_event = setting_security_ug_on_key_event; + ops->priv = securityUG; + ops->opt = UG_OPT_INDICATOR_ENABLE; + + return 0; +} + +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + struct SettingSecurityUG *securityUG; + setting_retm_if(!ops, "ops == NULL"); + + securityUG = ops->priv; + if (securityUG) + FREE(securityUG); +} + +/* *************************************************** + * + *general func + * + ***************************************************/ +void setting_security_sim_get_facility_cb(TapiHandle *handle, int result, void *data, void *user_data) +{ + SETTING_TRACE_BEGIN; + + ret_if(!user_data); + SETTING_TRACE_DEBUG("user_data is not NULL"); + + ret_if(!data); + SETTING_TRACE_DEBUG("data is not NULL"); + + TelSimPinOperationResult_t sec_rt = result; + TelSimFacilityInfo_t *fi = data; + SettingSecurityUG *ad = user_data; + + + if(ad->sim_popup) + { + evas_object_del(ad->sim_popup); + ad->sim_popup = NULL; + } + + SETTING_TRACE("sec_rt[%d]", sec_rt); + SETTING_TRACE("fi->type[%d]", fi->type); + SETTING_TRACE("fi->f_status[%d]", fi->f_status); + if (sec_rt == TAPI_SIM_PIN_OPERATION_SUCCESS) + { + SETTING_TRACE_DEBUG("PIN_OPERATION_SUCCESS"); + switch (fi->type) + { + case TAPI_SIM_LOCK_PS://sim status + ad->sim_status = fi->f_status; + break; + default: + break; + } + } + else + { + //if failed, do nothing.. + } + + /* Update SIM Settings view if created. */ + if(setting_view_security_sim_settings.is_create == 1) + { + SETTING_TRACE_DEBUG("SIM settings view is already created. [%d]", setting_view_security_sim_settings.is_create); + setting_view_update(&setting_view_security_sim_settings, ad); + } + else + { + SETTING_TRACE_DEBUG("Change view"); + setting_view_change(&setting_view_security_main, &setting_view_security_sim_settings, ad); + } + + SETTING_TRACE_END; +} + +void setting_security_pin_get_facility_cb(TapiHandle *handle, int result, void *data, void *user_data) +{ + SETTING_TRACE_BEGIN; + + ret_if(!user_data); + SETTING_TRACE_DEBUG("user_data is not NULL"); + + ret_if(!data); + SETTING_TRACE_DEBUG("data is not NULL"); + + TelSimPinOperationResult_t sec_rt = result; + TelSimFacilityInfo_t *fi = data; + SettingSecurityUG *ad = user_data; + + if(ad->sim_popup) + { + evas_object_del(ad->sim_popup); + ad->sim_popup = NULL; + } + + SETTING_TRACE("sec_rt[%d]", sec_rt); + SETTING_TRACE("fi->type[%d]", fi->type); + SETTING_TRACE("fi->f_status[%d]", fi->f_status); + if (sec_rt == TAPI_SIM_PIN_OPERATION_SUCCESS) + { + SETTING_TRACE_DEBUG("PIN_OPERATION_SUCCESS"); + switch (fi->type) + { + case TAPI_SIM_LOCK_SC://pin1 status + ad->pin1_status = fi->f_status; + break; + case TAPI_SIM_LOCK_FD://pin2/fdn status + ad->pin2_status = fi->f_status; + break; + default: + break; + } + } + else + { + //if failed, do nothing.. + } + + /* Update SIM Settings view if created. */ + if(setting_view_security_sim_settings.is_create == 1) + { + SETTING_TRACE_DEBUG("SIM settings view is already created. [%d]", setting_view_security_sim_settings.is_create); + setting_view_update(&setting_view_security_sim_settings, ad); + } + else + { + SETTING_TRACE_DEBUG("Change view"); + setting_view_change(&setting_view_security_main, &setting_view_security_sim_settings, ad); + } + + SETTING_TRACE_END; +} + +void setting_security_layout_passwd_ug_cb(ui_gadget_h ug, + enum ug_mode mode, void *priv) +{ + if (!priv) + return; + + SettingSecurityUG *ad = (SettingSecurityUG *) priv; + Evas_Object *base = ug_get_layout(ug); + if (!base) + return; + + switch (mode) { + case UG_MODE_FULLVIEW: + evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + //elm_win_resize_object_add(ad->win_get, base); + evas_object_show(base); + break; + default: + break; + } + + return; +} + +void setting_security_destroy_password_ug_cb(ui_gadget_h ug, + void *priv) +{ + SETTING_TRACE_BEGIN; + ret_if(priv == NULL); + SettingSecurityUG *ad = (SettingSecurityUG *) priv; + if (ug) { + ug_destroy(ug); + ad->ug_passwd = NULL; + } +} + +gboolean setting_security_create_password_sg(void *data) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(data == NULL, FALSE); + + SettingSecurityUG *ad = (SettingSecurityUG *) data; /* ad is point to data */ + + /* prevent the ug from being loaded again due to window event queuing */ + /* added by JTS: CQ H0100135346 */ + if (ad->ug_passwd) { + SETTING_TRACE("Password UG is already loaded."); + return FALSE; + } + + if((ad->pw_type < 0) || (ad->pw_type > SETTING_SEC_PW_MAX)) + return FALSE; + + char str[Max_Passwd_View_Type_Len + 1] = { 0, }; + safeCopyStr(str, security_table[ad->pw_type].pw_type_string, Max_Passwd_View_Type_Len); + + struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs)); + + if (!cbs) + return FALSE; + cbs->layout_cb = setting_security_layout_passwd_ug_cb; + cbs->result_cb = setting_security_result_password_ug_cb; + cbs->destroy_cb = setting_security_destroy_password_ug_cb; + cbs->priv = (void *)ad; + + service_h svc; + if (service_create(&svc)) { + FREE(cbs); + return FALSE; + } + + service_add_extra_data(svc, "viewtype", str); + if(ad->input_pwd) + { + SETTING_TRACE_DEBUG("Send current : %s", ad->input_pwd); + service_add_extra_data(svc, "current", ad->input_pwd); + } + ad->ug_passwd = ug_create(ad->ug, "setting-password-efl", UG_MODE_FULLVIEW, svc, cbs); + if (NULL == ad->ug_passwd) { /* error handling */ + evas_object_show(ad->ly_main); + } + + service_destroy(svc); + FREE(cbs); + + return TRUE; +} + +/* *************************************************** + * + *call back func + * + ***************************************************/ +// -1 on fail +// 0~n on success +int _get_security_table_index(char* name) +{ + int i=0; + + for(i=0;ipw_type: %d result :%s", ad->pw_type, result); + ret_if(NULL == result); + + if(safeStrCmp(result, "Cancel") == 0) + { + /* To do : rollback previouse status. */ + } + else + { + int index = _get_security_table_index(result); + int ret; + if (index != -1) + { + ret = security_table[index].passwd_handler(ad, NULL); + } else { + SETTING_TRACE_ERROR("no table entry"); + } + if(ad->input_pwd) + FREE(ad->input_pwd); + } + + evas_object_show(ad->ly_main); + SETTING_TRACE_END; +} + +#ifdef Status +#undef Status +#endif + + +/*****/ +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + int ret = 0; +#if SUPPORT_RUN_SYSTEM_COMMAND + ret += excuteCmd(SETTING_POSTINST_FILE, 1, "security"); +#else + + /* it may write some stragne thing into /opt/data/setting/set_info */ + /* setting_store_init_password(""); */ + struct stat st; + if (stat(PWD_FILE, &st) == 0)//file exist + { + if (remove(PWD_FILE) != 0) //delete the file + { + perror("remove"); + SETTING_TRACE("Failed to remove %s", PWD_FILE); + ret += -1; + } + } + + #if SUPPORT_RCS_FOR_DEMO + ret += vconf_set_bool("db/setting/rcs", FALSE); + #endif +#endif + return ret; +} + diff --git a/setting-storage/CMakeLists.txt b/setting-storage/CMakeLists.txt new file mode 100755 index 0000000..234769b --- /dev/null +++ b/setting-storage/CMakeLists.txt @@ -0,0 +1,37 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_storage REQUIRED ecore ecore-file evas elementary appcore-common appcore-efl ui-gadget-1 capi-appfw-application sysman fontconfig +libxml-2.0 ail pkgmgr capi-content-media-content) + +FOREACH(flag ${pkgs_storage_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") +ADD_DEFINITIONS("-fpie") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") + +ADD_LIBRARY(${SETTING_STORAGE_UG} SHARED + ./src/setting-storage.c + ./src/setting-storage-main.c + ./src/setting-storage-default-storage.c + ./src/setting-storage-miscellaneous-files.c + ) + +TARGET_LINK_LIBRARIES(${SETTING_STORAGE_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_STORAGE_UG} ${pkgs_storage_LDFLAGS}) + +INSTALL(TARGETS ${SETTING_STORAGE_UG} DESTINATION /usr/ug/lib) diff --git a/setting-storage/cscope.files b/setting-storage/cscope.files new file mode 100644 index 0000000..5ea24df --- /dev/null +++ b/setting-storage/cscope.files @@ -0,0 +1,4 @@ +./src/setting-storage.c +./src/setting-storage-main.c +./include/setting-storage.h +./include/setting-storage-main.h diff --git a/setting-storage/cscope.out b/setting-storage/cscope.out new file mode 100644 index 0000000..43f2359 --- /dev/null +++ b/setting-storage/cscope.out @@ -0,0 +1,17021 @@ +cscope 15 $HOME/scp-image/settings-beat/setting-storage 0000094857 + @include/setting-storage-main.h + +21 #iâdeà +__SETTING_STORAGE_MAIN_H__ + + +22  + #__SETTING_STORAGE_MAIN_H__ + + + ) + +24  + ~<£‰šg-¡Üage.h +> + + @include/setting-storage.h + +21 #iâdeà +__SETTING_STORAGE_H__ + + +22  + #__SETTING_STORAGE_H__ + + + ) + +24  + ~<¡dio.h +> + +25  + ~<­pcÜe-eæ.h +> + +26  + ~ + +28  + ~ + +29  + ~ + +30  + ~ + +31  + ~ + +33  + ~<£‰šg-commÚ-d¿w-widg‘.h +> + +34  + ~<£‰šg-commÚ-v›w.h +> + +36  +_S‘tšgStÜageUG + + tS‘tšgStÜageUG +; + +43  + s_S‘tšgStÜageUG + { + +44  +ui_gadg‘ + * + mug +; + +47 +Evas + * + mevas +; + +48 +Evas_Objeù + * + mwš_maš_Ïyout +; + +49 +Evas_Objeù + * + mwš_g‘ +; + +51 +Evas_Objeù + * + mly_maš +; + +53 +Evas_Objeù + * + mg’li¡ +; + +54 +Evas_Objeù + * + mÇvib¬ +; + +57 +Evas_Objeù + * + mpÝup +; + +58 +Elm_G’li¡_I‹m_CÏss + + m™c_2‹xt_3_·»Á +; + +59 +Elm_G’li¡_I‹m_CÏss + + m™c_1icÚ_1‹xt_sub +; + +60 +Elm_G’li¡_I‹m_CÏss + + m™c_1‹xt_1icÚ_2 +; + +61 +Elm_G’li¡_I‹m_CÏss + + m™c_2‹xt_2 +; + +62 +Elm_G’li¡_I‹m_CÏss + + m™c_group_™em +; + +63 +Elm_G’li¡_I‹m_CÏss + + m™c_bg_1icÚ +; + +64 +Elm_G’li¡_I‹m_CÏss + + m™c_£³¿tÜ +; + +66 +S‘tšg_G’GroupI‹m_D©a + * + msub™em +; + +67 +S‘tšg_G’GroupI‹m_D©a + * + m¡Üage_ty³ +; + +68 +S‘tšg_G’GroupI‹m_D©a + * + m¡Üage_size +; + +70  + m´ev_¡Üage +; + +71 * + m¡Üage_Çme +; + +74 +£‰šg_v›w + +£‰šg_v›w_¡Üage_maš +; + +76  +£‰šg_¡Üage_upd©e_vcÚf_key +(* +d©a +, +£‰šg_vcÚf_ty³ + +ty³ +, + +77  +¦p_key +); + + @src/setting-storage-main.c + +21  + ~<£‰šg-¡Üage-maš.h +> + +22  + ~ + +23  + ~<¡ÜagecÚfig/¡ÜagecÚfig.h +> + +24  + ~ + +25  + ~ + +26  + ~ + +27  + ~ + +29  +£‰šg_¡Üage_maš_ü—‹ +(* +cb +); + +30  +£‰šg_¡Üage_maš_de¡roy +(* +cb +); + +31  +£‰šg_¡Üage_maš_upd©e +(* +cb +); + +32  +£‰šg_¡Üage_maš_þ—nup +(* +cb +); + +34  +__£‰šg_¡Üage_maš_þick_soákey_back_cb +(* +d©a +, +Evas_Objeù + * +obj +, + +35 * +ev’t_šfo +); + +37 +£‰šg_v›w + + g£‰šg_v›w_¡Üage_maš + = { + +38 . +ü—‹ + = +£‰šg_¡Üage_maš_ü—‹ +, + +39 . + gde¡roy + = +£‰šg_¡Üage_maš_de¡roy +, + +40 . + gupd©e + = +£‰šg_¡Üage_maš_upd©e +, + +41 . + gþ—nup + = +£‰šg_¡Üage_maš_þ—nup +, + +44 * + $__£‰šg_¡Üage_maš_g‘_¡Üage_size +( +v®ue +) + +46 cÚ¡ * +¡Üage_size_¬r +[] = { + +47 + `_ +("IDS_ST_BODY_SMALL_M_TEXTSIZE"), + +48 + `_ +("IDS_ST_BODY_NORMAL_T_PROFILE"), + +49 + `_ +("IDS_ST_BODY_TEXTSTYLE_LARGE"), + +50 + `_ +("Huge"), + +51 + `_ +("Giant"), + +53  +v®ue +) + +55  +SYSTEM_SETTINGS_FONT_SIZE_SMALL +: + +56  (*) +¡Üage_size_¬r +[0]; + +57  +SYSTEM_SETTINGS_FONT_SIZE_NORMAL +: + +58  (*) +¡Üage_size_¬r +[1]; + +59  +SYSTEM_SETTINGS_FONT_SIZE_LARGE +: + +60  (*) +¡Üage_size_¬r +[2]; + +61  +SYSTEM_SETTINGS_FONT_SIZE_HUGE +: + +62  (*) +¡Üage_size_¬r +[3]; + +63  +SYSTEM_SETTINGS_FONT_SIZE_GIANT +: + +64  (*) +¡Üage_size_¬r +[4]; + +66  (*) +¡Üage_size_¬r +[1]; + +68 + } +} + +70  +Eša_Li¡ + * + $__£‰šg_¡Üage_maš_avažabË_li¡_g‘ +() + +72 +SETTING_TRACE_BEGIN + + +73 +FcObjeùS‘ + * +os + = +NULL +; + +74 +FcStÜageS‘ + * +fs + = +NULL +; + +75 +FcP©‹º + * +·t + = +NULL +; + +76 +Eša_Li¡ + * +li¡ + = +NULL +; + +77 +FcCÚfig + * +¡Üage_cÚfig + = +NULL +; + +79 +¡Üage_cÚfig + = + `FcIn™LßdCÚfigAndStÜages +(); + +81 + `£‰šg_»tvm_if +( +¡Üage_cÚfig + =ð +NULL +, NULL, "Failed: FcInitLoadConfigAndStorages"); + +83 +·t + = + `FcP©‹ºC»©e +(); + +85 +os + = + `FcObjeùS‘Bužd +( +FC_FAMILY +, +FC_FILE +, (*) 0); + +87 ià( +os +) { + +88 +fs + = + `FcStÜageLi¡ +( +¡Üage_cÚfig +, +·t +, +os +); + +89 + `FcObjeùS‘De¡roy +( +os +); + +90 +os + = +NULL +; + +93 ià( +·t +) { + +94 + `FcP©‹ºDe¡roy +( +·t +); + +95 +·t + = +NULL +; + +98 ià( +fs +) { + +99  +j +; + +100 + `SETTING_TRACE_DEBUG +("fs->n¡Üagð%d", +fs +-> +n¡Üage +); + +102  +j + = 0; j < +fs +-> +n¡Üage +; j++) { + +103 +FcCh¬8 + * +çmžy + = +NULL +; + +104 +FcCh¬8 + * +fže + = +NULL +; + +106 ià( + `FcP©‹ºG‘SŒšg +( +fs +-> +¡Üages +[ +j +], +FC_FILE +, 0, & +fže +è=ð +FcResuÉM©ch +) { + +108  +´–ßd_·th_Ën + = + `§ãSŒL’ +( +SETTING_FONT_PRELOAD_FONT_PATH +); + +109  +dowÆßd_·th_Ën + = + `§ãSŒL’ +( +SETTING_FONT_DOWNLOADED_FONT_PATH +); + +110 ià(! + `§ãSŒNCmp +((cÚ¡ *) +fže +, +SETTING_FONT_PRELOAD_FONT_PATH +, +´–ßd_·th_Ën +) || + +111 ! + `§ãSŒNCmp +((cÚ¡ *) +fže +, +SETTING_FONT_DOWNLOADED_FONT_PATH +, +dowÆßd_·th_Ën +)) { + +112 ià( + `FcP©‹ºG‘SŒšg +( +fs +-> +¡Üages +[ +j +], +FC_FAMILY +, 0, & +çmžy +è!ð +FcResuÉM©ch +) { + +113 + `SETTING_TRACE_DEBUG +("Family‚ame is invalid"); + +118 ià( + `eša_li¡_d©a_fšd +( +li¡ +, +çmžy +è=ð +NULL +) { + +119 +li¡ + = + `eša_li¡_­³nd +Öi¡, +çmžy +); + +126 + `FcStÜageS‘De¡roy +( +fs +); + +127 +fs + = +NULL +; + +130 + `FcCÚfigDe¡roy +( +¡Üage_cÚfig +); + +131 +¡Üage_cÚfig + = +NULL +; + +132  +li¡ +; + +133 + } +} + +135  + $__£‰šg_¡Üage_maš_Ïunch_ug_de¡roy_cb +( +ui_gadg‘ + * +ug +, * +´iv +) + +137 +SETTING_TRACE_BEGIN +; + +140 + `»tm_if +( +´iv + =ð +NULL +, "priv is NULL"); + +141 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +´iv +; + +142 ià( +ug +) { + +143 + `ug_de¡roy +( +ug +); + +145 +Elm_Objeù_I‹m + * +Çvi_™ + = + `–m_Çviäame_tÝ_™em_g‘ +( +ad +-> +Çvib¬ +); + +146 + `»tm_if +( +Çvi_™ + =ð +NULL +, "navi_it is NULL"); + +147 +Evas_Objeù + * +back_bŠ + = + `–m_objeù_™em_·¹_cڋÁ_g‘ +( +Çvi_™ +, "prev_btn"); + +149 ià( +back_bŠ + !ð +NULL +) { + +150 + `–m_objeù_¡yË_£t +( +back_bŠ +, +NAVI_BACK_BUTTON_STYLE +); + +154  +v®ue + = -1; + +155  +”r + = -1; + +156  +»t + = + `£‰šg_g‘_št_¦p_key +( +INT_SLP_SETTING_ACCESSIBILITY_FONT_SIZE +, & +v®ue +, & +”r +); + +157 + `»tm_if +( +»t + != 0, "get vconf failed"); + +159 ià( +ad +-> +¡Üage_size +) { + +160 + `G_FREE +( +ad +-> +¡Üage_size +-> +sub_desc +); + +161 +ad +-> +¡Üage_size +-> +sub_desc + = + `g_¡rdup +( + `__£‰šg_¡Üage_maš_g‘_¡Üage_size +( +v®ue +)); + +163 + `–m_objeù_™em_d©a_£t +( +ad +-> +¡Üage_size +-> +™em +,‡d->storage_size); + +164 + `–m_g’li¡_™em_upd©e +( +ad +-> +¡Üage_size +-> +™em +); + +166 + } +} + +168  + $__£‰šg_¡Üage_maš_Ïunch_ug_Ïyout_cb +( +ui_gadg‘ + * +ug +, +ug_mode + +mode +, * +´iv +) + +170 +SETTING_TRACE_BEGIN +; + +171 + `»tm_if +( +ug + =ð +NULL +, "ug is NULL"); + +172 + `»tm_if +( +´iv + =ð +NULL +, "priv is NULL"); + +173 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +´iv +; + +174 +Evas_Objeù + * +ba£ + = +NULL +; + +175 +ba£ + = ( +Evas_Objeù + *è + `ug_g‘_Ïyout +( +ug +); + +176 + `»tm_if +( +ba£ + =ð +NULL +, "base is NULL"); + +178  +mode +) { + +179  +UG_MODE_FULLVIEW +: + +180 + `evas_objeù_size_hšt_weight_£t +( +ba£ +, +EVAS_HINT_EXPAND +, EVAS_HINT_EXPAND); + +181 + `–m_wš_»size_objeù_add +( +ad +-> +wš_g‘ +, +ba£ +); + +182 + `evas_objeù_show +( +ba£ +); + +187 +SETTING_TRACE_END +; + +188 + } +} + +191  + $__£‰šg_¡Üage_maš_Ïunch_ug +(* +d©a +) + +193 +SETTING_TRACE_BEGIN +; + +195 + `»tm_if +( +d©a + =ð +NULL +, "Data…arameter is NULL"); + +197 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +d©a +; + +199 +bundË + * +b + = + `bundË_ü—‹ +(); + +200 ià(! +b +) { + +204 + `bundË_add +( +b +, "caller", "storage_size"); + +206  +ug_cbs + * +cbs + = (ug_cb *) + `ÿÎoc +(1, (ug_cbs)); + +207 ià(! +cbs +) { + +208 + `SETTING_TRACE_ERROR +("calloc failed"); + +209 + `bundË_ä“ +( +b +); + +212 +cbs +-> +Ïyout_cb + = +__£‰šg_¡Üage_maš_Ïunch_ug_Ïyout_cb +; + +213 +cbs +-> +»suÉ_cb + = +NULL +; + +214 +cbs +-> +de¡roy_cb + = +__£‰šg_¡Üage_maš_Ïunch_ug_de¡roy_cb +; + +215 +cbs +-> +´iv + = (*) +ad +; + +217  +ui_gadg‘ + * +ug + = + `ug_ü—‹ +( +ad +->ug, "£‰šg-acûssibž™y-eæ", +UG_MODE_FULLVIEW +, +b +, +cbs +); + +218 ià( +NULL + =ð +ug +) { + +219 + `SETTING_TRACE_ERROR +("NULL == ug"); + +222 + `bundË_ä“ +( +b +); + +223 + `FREE +( +cbs +); + +224 + } +} + +226  + $__£‰šg_¡Üage_maš_g’li¡_£l_cb +(* +d©a +, +Evas_Objeù + * +obj +, * +ev’t_šfo +) + +229 + `£‰šg_»tm_if +( +d©a + =ð +NULL +, "Data…arameter is NULL"); + +231 + `»tm_if +( +ev’t_šfo + =ð +NULL +, "Invalid‡rgument:ƒvent info is NULL"); + +232 +Elm_Objeù_I‹m + * +™em + = (Elm_Objeù_I‹m *è +ev’t_šfo +; + +233 + `–m_g’li¡_™em_£Ëùed_£t +( +™em +, 0); + +234 +S‘tšg_G’GroupI‹m_D©a + * +li¡_™em + = (S‘tšg_G’GroupI‹m_D©¨*) + `–m_objeù_™em_d©a_g‘ +( +™em +); + +236 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *) +d©a +; + +238 ià( +ad +-> +¡Üage_size + =ð +li¡_™em +) { + +239 + `__£‰šg_¡Üage_maš_Ïunch_ug +( +ad +); + +241 + } +} + +243  + $__£‰šg_¡Üage_maš_g’li¡_™em_ü—‹ +(* +d©a +) + +245 +SETTING_TRACE_BEGIN +; + +246 + `£‰šg_»tm_if +( +NULL + =ð +d©a +, "data is NULL"); + +248 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *) +d©a +; + +249 +Elm_Objeù_I‹m + * +™em + = +NULL +; + +250 +™em + = + `–m_g’li¡_™em_­³nd +( +ad +-> +g’li¡ +, &×d-> +™c_£³¿tÜ +), +NULL +, NULL, + +251 +ELM_GENLIST_ITEM_NONE +, +NULL +, NULL); + +252 + `–m_g’li¡_™em_£Ëù_mode_£t +( +™em +, +ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY +); + +254 * +¡Üage_ty³_Çme + = +NULL +; + +255 +¡Üage_ty³_Çme + = + `cur_¡Üage_g‘ +(); + +257 +ad +-> +¡Üage_ty³ + = + `£‰šg_ü—‹_G’dŸl_exp_·»Á_f›ld +×d-> +g’li¡ +, + +258 &( +ad +-> +™c_2‹xt_3_·»Á +), + +259 +NULL +, NULL, + +260 +SWALLOW_Ty³_INVALID +, + +261 +SETTING_FONT_TYPE_STR +, + +262 +¡Üage_ty³_Çme +); + +263 ià( +ad +-> +¡Üage_ty³ +) { + +264 +ad +-> +¡Üage_ty³ +-> +u£rd©a + =‡d; + +266 + `SETTING_TRACE_ERROR +("ad->storage_type is NULL"); + +268 + `G_FREE +( +ad +-> +¡Üage_Çme +); + +269 +ad +-> +¡Üage_Çme + = + `g_¡rdup +( +¡Üage_ty³_Çme +); + +270 + `G_FREE +( +¡Üage_ty³_Çme +); + +273  +v®ue + = -1; + +274  +”r + = -1; + +275  +»t + = + `£‰šg_g‘_št_¦p_key +( +INT_SLP_SETTING_ACCESSIBILITY_FONT_SIZE +, & +v®ue +, & +”r +); + +276 ià( +»t + != 0) { + +277 + `SETTING_TRACE_ERROR +("get vconf failed"); + +280 +ad +-> +¡Üage_size + = + `£‰šg_ü—‹_G’dŸl_f›ld_def +×d-> +g’li¡ +, &×d-> +™c_2‹xt_2 +), + +281 +__£‰šg_¡Üage_maš_g’li¡_£l_cb +, + +282 +ad +, +SWALLOW_Ty³_INVALID +, +NULL +, + +283 +NULL +, +v®ue +, +SETTING_FONT_SIZE_STR +, + +284 + `__£‰šg_¡Üage_maš_g‘_¡Üage_size +( +v®ue +), +NULL +); + +285 ià( +ad +-> +¡Üage_size +) { + +286 +ad +-> +¡Üage_size +-> +u£rd©a + =‡d; + +288 + `SETTING_TRACE_ERROR +("ad->storage_size is NULL"); + +291 + `£‰šg_ü—‹_G’dŸl_f›ld_def +( +ad +-> +g’li¡ +, &×d-> +™c_bg_1icÚ +), +NULL +, + +292 +ad +, +SWALLOW_Ty³_LAYOUT_SPECIALIZTION +, + +293 +NULL +, NULL, 0, +SETTING_FONT_SIZE_DESC +, NULL, + +294 +NULL +); + +295 + } +} + +301  + $__£‰šg_¡Üage_maš_¡Üage_£t +(* +¡Üage_Çme +) + +303 + `»tm_if +( +¡Üage_Çme + =ð +NULL +, "Invalid‡rgument: storage_name is NULL"); + +304 +xmlDocPŒ + +doc + = (xmlDocPŒ) + `¡Üage_cÚf_doc_·r£ +( +SETTING_FONT_CONF_FILE +, +¡Üage_Çme +); + +306 if( +doc + !ð +NULL +) { + +307 + `xmlSaveFÜm©Fže +( +SETTING_FONT_CONF_FILE +, +doc +, 0); + +308 + `xmlF»eDoc +( +doc +); + +309 +doc + = +NULL +; + +312 + `¡Üage_cÚfig_£t +( +¡Üage_Çme +); + +315 +EcÜe_X_Wšdow + +ecÜe_wš + = + `ecÜe_x_wšdow_roÙ_fœ¡_g‘ +(); + +316 +EcÜe_X_Atom + +©om + = + `ecÜe_x_©om_g‘ +("FONT_TYPE_change"); + +317 + `ecÜe_x_wšdow_´Ý_¡ršg_£t +( +ecÜe_wš +, +©om +, "slp"); + +318 + } +} + +320  + $__£‰šg_¡Üage_maš_pÝup_cb +(* +d©a +, +Evas_Objeù + * +obj +, * +ev’t_šfo +) + +322 +SETTING_TRACE_BEGIN +; + +323 + `£‰šg_»tm_if +( +d©a + =ð +NULL +, "Data…arameter is NULL"); + +324 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +d©a +; + +326  + `bŠ_ty³ +( +obj +)) { + +327  +POPUP_RESPONSE_OK +: + +329 +ad +-> +¡Üage_ty³ +-> +sub_desc + = (*) + `g_¡rdup +( + `_ +×d-> +sub™em +-> +keySŒ +)); + +330 + `–m_objeù_™em_d©a_£t +( +ad +-> +¡Üage_ty³ +-> +™em +,‡d->storage_type); + +331 + `–m_g’li¡_™em_upd©e +( +ad +-> +¡Üage_ty³ +-> +™em +); + +333 +ad +-> +´ev_¡Üage + =‡d-> +sub™em +-> +chk_¡©us +; + +334 + `G_FREE +( +ad +-> +¡Üage_Çme +); + +335 +ad +-> +¡Üage_Çme + = (*) + `g_¡rdup +( + `_ +×d-> +sub™em +-> +keySŒ +)); + +336 + `SETTING_TRACE +("ad->sub™em->keySŒ = %s", +ad +-> +sub™em +-> +keySŒ +); + +337 + `__£‰šg_¡Üage_maš_¡Üage_£t +( +ad +-> +sub™em +-> +keySŒ +); + +338 + `ug_de¡roy_me +( +ad +-> +ug +); + +341  +POPUP_RESPONSE_CANCEL +: + +343 + `–m_¿dio_v®ue_£t +( +ad +-> +sub™em +-> +rgd +,‡d-> +´ev_¡Üage +); + +353 ià( +ad +-> +pÝup +) { + +354 + `evas_objeù_d– +( +ad +-> +pÝup +); + +355 +ad +-> +pÝup + = +NULL +; + +357 + } +} + +359  + $__£‰šg_¡Üage_maš_pÝup +(* +d©a +) + +361 +SETTING_TRACE_BEGIN +; + +362 + `£‰šg_»tm_if +( +d©a + =ð +NULL +, "Data…arameter is NULL"); + +363 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +d©a +; + +365  +pÝup_desc +[ +SETTING_STR_SLP_LEN + + 1] = {0,}; + +366 + `¢´štf +( +pÝup_desc +, +SETTING_STR_SLP_LEN +, "% %s?", + `_ +( +SETTING_FONT_POPUP_DESC +), +ad +-> +sub™em +-> +keySŒ +); + +368 +ad +-> +pÝup + = + `£‰šg_ü—‹_pÝup_w™h_bŠ +×d,‡d-> +wš_g‘ +, +NULL +, + +369 +pÝup_desc +, + +370 +__£‰šg_¡Üage_maš_pÝup_cb +, 0, + +371 2, + `_ +("IDS_COM_SK_YES"),_("IDS_COM_SK_NO")); + +372 + } +} + +378  + $__£‰šg_¡Üage_maš_sub_li¡_£l_cb +(* +d©a +, +Evas_Objeù + * +obj +, * +ev’t_šfo +) + +380 +SETTING_TRACE_BEGIN +; + +382 + `»tm_if +( +ev’t_šfo + =ð +NULL +, "Invalid‡rgument:ƒvent info is NULL"); + +383 +Elm_Objeù_I‹m + * +sub™em + = (Elm_Objeù_I‹m *è +ev’t_šfo +; + +384 + `–m_g’li¡_™em_£Ëùed_£t +( +sub™em +, 0); + +385 +S‘tšg_G’GroupI‹m_D©a + * +d©a_subI‹m + = + `–m_objeù_™em_d©a_g‘ +( +sub™em +); + +386 + `»t_if +( +NULL + =ð +d©a_subI‹m +); + +388 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +d©a +; + +391 ià( +ad +-> +´ev_¡Üage + =ð +d©a_subI‹m +-> +chk_¡©us +) { + +392 + `SETTING_TRACE +("NOT CHANGED "); + +396 +ad +-> +sub™em + = +d©a_subI‹m +; + +397 + `–m_¿dio_v®ue_£t +( +ad +-> +sub™em +-> +rgd +,‡d->sub™em-> +chk_¡©us +); + +399 + `__£‰šg_¡Üage_maš_pÝup +( +ad +); + +400 + } +} + +402  + $__£‰šg_¡Üage_maš_exp_cb +(* +d©a +, +Evas_Objeù + * +obj +, * +ev’t_šfo +) + +404 + `»t_if +( +NULL + =ð +d©a + || NULL =ð +ev’t_šfo +); + +405 +SETTING_TRACE_BEGIN +; + +406 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +d©a +; + +407 +Elm_Objeù_I‹m + * +·»ÁI‹m + = +ev’t_šfo +; + +408 +S‘tšg_G’GroupI‹m_D©a + * +d©a_·»ÁI‹m + = + `–m_objeù_™em_d©a_g‘ +( +·»ÁI‹m +); + +409 +Evas_Objeù + * +süÞËr + = + `–m_objeù_™em_widg‘_g‘ +( +·»ÁI‹m +); + +411 +Evas_Objeù + * +rgd + = +NULL +; + +412 ià( +d©a_·»ÁI‹m + =ð +ad +-> +¡Üage_ty³ +) { + +413 +rgd + = + `–m_¿dio_add +( +süÞËr +); + +414 + `–m_¿dio_v®ue_£t +( +rgd +, -1); + +416 +Eša_Li¡ + * +¡Üage_li¡ + = +NULL +; + +417 +Eša_Li¡ + * +l + = +NULL +; + +418 +FcCh¬8 + * +¡Üage_d©a + = +NULL +; + +419 +¡Üage_li¡ + = + `__£‰šg_¡Üage_maš_avažabË_li¡_g‘ +(); + +421  +i + = 0; + +422  +m©ched_¡Üage + = -1; + +423 +S‘tšg_G’GroupI‹m_D©a + * +™em + = +NULL +; + +424 + `EINA_LIST_FOREACH +( +¡Üage_li¡ +, +l +, +¡Üage_d©a +) + +426 +™em + = + `£‰šg_ü—‹_G’dŸl_exp_sub_f›ld +( +süÞËr +, &( +ad +-> +™c_1icÚ_1‹xt_sub +), + +427 +__£‰šg_¡Üage_maš_sub_li¡_£l_cb +, +ad +, + +428 +·»ÁI‹m +, +SWALLOW_Ty³_1RADIO +, +rgd +, + +429 +i +, (cÚ¡ *) +¡Üage_d©a +, + +430 +NULL +); + +432 ià( +™em +) { + +433 +™em +-> +u£rd©a + = +ad +; + +434 ià(! + `§ãSŒCmp +( +ad +-> +¡Üage_Çme +, (cÚ¡ *) +¡Üage_d©a +)) { + +435 +m©ched_¡Üage + = +i +; + +439 +i +++; + +443 ià( +m©ched_¡Üage + != -1) { + +444 + `–m_¿dio_v®ue_£t +( +rgd +, +m©ched_¡Üage +); + +447 +ad +-> +´ev_¡Üage + = +m©ched_¡Üage +; + +449 + } +} + +457  + $£‰šg_¡Üage_maš_ü—‹ +(* +cb +) + +459 +SETTING_TRACE_BEGIN +; + +461 + `»tv_if +( +cb + =ð +NULL +, +SETTING_GENERAL_ERR_NULL_DATA_PARAMETER +); + +463 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +cb +; + +465 + `»tvm_if +( +ad +-> +wš_maš_Ïyout + =ð +NULL +, +SETTING_DRAW_ERR_FAIL_LOAD_EDJ +, + +468 +ad +-> +ly_maš + = + +469 + `£‰šg_ü—‹_Ïyout_Çvi_b¬_g’li¡ +( +ad +-> +wš_maš_Ïyout +, + +470 +ad +-> +wš_g‘ +, + +471 + `_ +( +KeySŒ_StÜage +), + +472 + `_ +("IDS_COM_BODY_BACK"), + +473 +NULL +, + +474 +__£‰šg_¡Üage_maš_þick_soákey_back_cb +, + +475 +NULL +, + +476 +ad +, &ad-> +g’li¡ +, &ad-> +Çvib¬ +); + +478 + `£‰šg_’abË_ex·ndabË_g’li¡ +( +ad +-> +g’li¡ +,‡d, + +479 +__£‰šg_¡Üage_maš_exp_cb +, +NULL +); + +481 + `__£‰šg_¡Üage_maš_g’li¡_™em_ü—‹ +( +ad +); + +483 +£‰šg_v›w_¡Üage_maš +. +is_ü—‹ + = 1; + +484  +SETTING_RETURN_SUCCESS +; + +485 + } +} + +487  + $£‰šg_¡Üage_maš_de¡roy +(* +cb +) + +490 + `»tv_if +( +cb + =ð +NULL +, +SETTING_GENERAL_ERR_NULL_DATA_PARAMETER +); + +492 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +cb +; + +494 ià( +ad +-> +pÝup +) { + +495 + `evas_objeù_d– +( +ad +-> +pÝup +); + +496 +ad +-> +pÝup + = +NULL +; + +499 ià( +ad +-> +ly_maš + !ð +NULL +) { + +500 + `evas_objeù_d– +( +ad +-> +ly_maš +); + +501 +£‰šg_v›w_¡Üage_maš +. +is_ü—‹ + = 0; + +504  +SETTING_RETURN_SUCCESS +; + +505 + } +} + +507  + $£‰šg_¡Üage_maš_upd©e +(* +cb +) + +509 +SETTING_TRACE_BEGIN +; + +511 + `»tv_if +( +cb + =ð +NULL +, +SETTING_GENERAL_ERR_NULL_DATA_PARAMETER +); + +513 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +cb +; + +515 ià( +ad +-> +ly_maš + !ð +NULL +) { + +516 + `evas_objeù_show +( +ad +-> +ly_maš +); + +518 + `£‰šg_¡Üage_upd©e_vcÚf_key +( +ad +, +SETTING_VCONF_INT_TYPE +, + +519 +INT_SLP_SETTING_LCD_TIMEOUT_NORMAL +); + +522  +SETTING_RETURN_SUCCESS +; + +523 + } +} + +525  + $£‰šg_¡Üage_maš_þ—nup +(* +cb +) + +528 + `»tv_if +( +cb + =ð +NULL +, +SETTING_GENERAL_ERR_NULL_DATA_PARAMETER +); + +530 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +cb +; + +532 ià( +ad +-> +ly_maš + !ð +NULL +) { + +533 + `evas_objeù_hide +( +ad +-> +ly_maš +); + +536  +SETTING_RETURN_SUCCESS +; + +537 + } +} + +545  + $__£‰šg_¡Üage_maš_þick_soákey_back_cb +(* +d©a +, +Evas_Objeù + * +obj +, + +546 * +ev’t_šfo +) + +549 + `»t_if +( +d©a + =ð +NULL +); + +551 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +d©a +; + +553 + `ug_de¡roy_me +( +ad +-> +ug +); + +554 + } +} + + @src/setting-storage.c + +21  + ~<£‰šg-¡Üage.h +> + +22 #iâdeà +UG_MODULE_API + + +23  + #UG_MODULE_API + + `__©Œibu‹__ + (( + `visibž™y +("deçuÉ"))) + + ) + +26  + $£‰šg_¡Üage_ug_cb_»size +(* +d©a +, +Evas + * +e +, +Evas_Objeù + * +obj +, + +27 * +ev’t_šfo +) + +29 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +d©a +; + +30 + `£‰šg_v›w_upd©e +(& +£‰šg_v›w_¡Üage_maš +, +ad +); + +31 + } +} + +33 * + $£‰šg_¡Üage_ug_Ú_ü—‹ +( +ui_gadg‘ + * +ug +, +ug_mode + +mode +, + +34 +bundË + * +d©a +, * +´iv +) + +36 + `£‰šg_»tvm_if +((! +ug + || ! +´iv +), +NULL +, "!ug || !priv"); + +38 +S‘tšgStÜageUG + * +¡ÜageUG + = +´iv +; + +39 +¡ÜageUG +-> +ug + = ug; + +40 +¡ÜageUG +-> +wš_maš_Ïyout + = ( +Evas_Objeù + *è + `ug_g‘_·»Á_Ïyout +( +ug +); + +41 +¡ÜageUG +-> +wš_g‘ + = ( +Evas_Objeù + *è + `ug_g‘_wšdow +(); + +42 + `evas_objeù_show +( +¡ÜageUG +-> +wš_maš_Ïyout +); + +43 +¡ÜageUG +-> +evas + = + `evas_objeù_evas_g‘ +(¡ÜageUG-> +wš_maš_Ïyout +); + +45 + `£‰šg_»tvm_if +( +¡ÜageUG +-> +wš_maš_Ïyout + =ð +NULL +, NULL, + +48 +¡ÜageUG +-> +™c_£³¿tÜ +. +™em_¡yË + = "dialogue/separator/21/with_line"; + +49 +¡ÜageUG +-> +™c_£³¿tÜ +. +func +. +‹xt_g‘ + = +NULL +; + +50 +¡ÜageUG +-> +™c_£³¿tÜ +. +func +. +cڋÁ_g‘ + = +NULL +; + +51 +¡ÜageUG +-> +™c_£³¿tÜ +. +func +. +¡©e_g‘ + = +NULL +; + +52 +¡ÜageUG +-> +™c_£³¿tÜ +. +func +. +d– + = +NULL +; + +54 + `£‰šg_ü—‹_G’dŸl_™c +("dŸlogue/2‹xt.3/ex·ndabË", &( +¡ÜageUG +-> +™c_2‹xt_3_·»Á +)); + +55 + `£‰šg_ü—‹_G’dŸl_™c +("dŸlogue/1‹xt.1icÚ/ex·ndabË2", &( +¡ÜageUG +-> +™c_1icÚ_1‹xt_sub +)); + +56 + `£‰šg_ü—‹_G’dŸl_™c +("dŸlogue/2‹xt.3", &( +¡ÜageUG +-> +™c_2‹xt_2 +)); + +57 + `£‰šg_ü—‹_G’dŸl_™c +("dŸlogue/1‹xt.1icÚ.2", &( +¡ÜageUG +-> +™c_1‹xt_1icÚ_2 +)); + +58 + `£‰šg_ü—‹_G’dŸl_™c +("dŸlogue/t™Ë", &( +¡ÜageUG +-> +™c_group_™em +)); + +59 + `£‰šg_ü—‹_G’dŸl_™c +("muɞše/1‹xt", &( +¡ÜageUG +-> +™c_bg_1icÚ +)); + +62 + `£‰šg_v›w_ü—‹ +(& +£‰šg_v›w_¡Üage_maš +, (*) +¡ÜageUG +); + +63 + `evas_objeù_ev’t_ÿÎback_add +( +¡ÜageUG +-> +wš_maš_Ïyout +, + +64 +EVAS_CALLBACK_RESIZE +, + +65 +£‰šg_¡Üage_ug_cb_»size +, +¡ÜageUG +); + +66  +¡ÜageUG +-> +ly_maš +; + +67 + } +} + +69  + $£‰šg_¡Üage_ug_Ú_¡¬t +( +ui_gadg‘ + * +ug +, +bundË + * +d©a +, + +70 * +´iv +) + +72 + } +} + +74  + $£‰šg_¡Üage_ug_Ú_·u£ +( +ui_gadg‘ + * +ug +, +bundË + * +d©a +, + +75 * +´iv +) + +77 + } +} + +79  + $£‰šg_¡Üage_ug_Ú_»sume +( +ui_gadg‘ + * +ug +, +bundË + * +d©a +, + +80 * +´iv +) + +82 + } +} + +84  + $£‰šg_¡Üage_ug_Ú_de¡roy +( +ui_gadg‘ + * +ug +, +bundË + * +d©a +, + +85 * +´iv +) + +87 +SETTING_TRACE_BEGIN +; + +88 + `£‰šg_»tm_if +((! +ug + || ! +´iv +), "!ug || !priv"); + +89 +S‘tšgStÜageUG + * +¡ÜageUG + = +´iv +; + +91 + `evas_objeù_ev’t_ÿÎback_d– +( +¡ÜageUG +-> +wš_maš_Ïyout +, +EVAS_CALLBACK_RESIZE +, +£‰šg_¡Üage_ug_cb_»size +); + +92 +¡ÜageUG +-> +ug + = ug; + +95 + `£‰šg_v›w_de¡roy +(& +£‰šg_v›w_¡Üage_maš +, +¡ÜageUG +); + +96 ià( +NULL + !ð + `ug_g‘_Ïyout +( +¡ÜageUG +-> +ug +)) { + +97 + `evas_objeù_hide +(( +Evas_Objeù + *è + `ug_g‘_Ïyout +( +¡ÜageUG +-> +ug +)); + +98 + `evas_objeù_d– +(( +Evas_Objeù + *è + `ug_g‘_Ïyout +( +¡ÜageUG +-> +ug +)); + +101 +SETTING_TRACE_END +; + +102 + } +} + +104  + $£‰šg_¡Üage_ug_Ú_mes§ge +( +ui_gadg‘ + * +ug +, +bundË + * +msg +, + +105 +bundË + * +d©a +, * +´iv +) + +107 +SETTING_TRACE_BEGIN +; + +108 + } +} + +110  + $£‰šg_¡Üage_ug_Ú_ev’t +( +ui_gadg‘ + * +ug +, +ug_ev’t + +ev’t +, + +111 +bundË + * +d©a +, * +´iv +) + +113 +SETTING_TRACE_BEGIN +; + +114  +ev’t +) { + +115  +UG_EVENT_LOW_MEMORY +: + +117  +UG_EVENT_LOW_BATTERY +: + +119  +UG_EVENT_LANG_CHANGE +: + +121  +UG_EVENT_ROTATE_PORTRAIT +: + +123  +UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN +: + +125  +UG_EVENT_ROTATE_LANDSCAPE +: + +127  +UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN +: + +129  +UG_EVENT_REGION_CHANGE +: + +134 + } +} + +136  + $£‰šg_¡Üage_ug_Ú_key_ev’t +( +ui_gadg‘ + * +ug +, + +137 +ug_key_ev’t + +ev’t +, +bundË + * +d©a +, + +138 * +´iv +) + +140 +SETTING_TRACE_BEGIN +; + +141 ià(! +ug +) + +144  +ev’t +) { + +145  +UG_KEY_EVENT_END +: + +146 + `ug_de¡roy_me +( +ug +); + +151 + } +} + +153 +UG_MODULE_API +  + $UG_MODULE_INIT +( +ug_moduË_Ýs + * +Ýs +) + +155 +SETTING_TRACE_BEGIN +; + +156 +S‘tšgStÜageUG + * +¡ÜageUG + = + `ÿÎoc +(1, (SettingStorageUG)); + +157 + `£‰šg_»tvm_if +(! +¡ÜageUG +, -1, "Create SettingStorageUG obj failed"); + +159 +Ýs +-> +ü—‹ + = +£‰šg_¡Üage_ug_Ú_ü—‹ +; + +160 +Ýs +-> +¡¬t + = +£‰šg_¡Üage_ug_Ú_¡¬t +; + +161 +Ýs +-> +·u£ + = +£‰šg_¡Üage_ug_Ú_·u£ +; + +162 +Ýs +-> +»sume + = +£‰šg_¡Üage_ug_Ú_»sume +; + +163 +Ýs +-> +de¡roy + = +£‰šg_¡Üage_ug_Ú_de¡roy +; + +164 +Ýs +-> +mes§ge + = +£‰šg_¡Üage_ug_Ú_mes§ge +; + +165 +Ýs +-> +ev’t + = +£‰šg_¡Üage_ug_Ú_ev’t +; + +166 +Ýs +-> +key_ev’t + = +£‰šg_¡Üage_ug_Ú_key_ev’t +; + +167 +Ýs +-> +´iv + = +¡ÜageUG +; + +168 +Ýs +-> +Ýt + = +UG_OPT_INDICATOR_ENABLE +; + +171 + } +} + +173 +UG_MODULE_API +  + $UG_MODULE_EXIT +( +ug_moduË_Ýs + * +Ýs +) + +175 +SETTING_TRACE_BEGIN +; + +176  +S‘tšgStÜageUG + * +¡ÜageUG +; + +177 + `£‰šg_»tm_if +(! +Ýs +, "ops == NULL"); + +179 +¡ÜageUG + = +Ýs +-> +´iv +; + +180 ià( +¡ÜageUG +) { + +181 + `FREE +( +¡ÜageUG +); + +183 + } +} + +191  + $£‰šg_¡Üage_upd©e_vcÚf_key_št_ty³ +(* +d©a +, + +192 +£‰šg_št_¦p_li¡ + +¦p_key +) + +194 +SETTING_TRACE_BEGIN +; + +196 ià( +d©a + =ð +NULL +) { + +197  +SETTING_GENERAL_ERR_NULL_DATA_PARAMETER +; + +200  +»t + = +SETTING_RETURN_FAIL +; + +201  +v®ue +; + +202  +”r +; + +205 +»t + = + `£‰šg_g‘_št_¦p_key +( +¦p_key +, & +v®ue +, & +”r +); + +207  +¦p_key +) { + +228 +»t + = +SETTING_GENERAL_ERR_NOT_FIND_VALUE_SWITCH +; + +232  +»t +; + +233 + } +} + +235  + $£‰šg_¡Üage_upd©e_vcÚf_key +(* +d©a +, +£‰šg_vcÚf_ty³ + +ty³ +, + +236  +¦p_key +) + +238 +SETTING_TRACE_BEGIN +; + +240 ià( +d©a + =ð +NULL +) { + +241  +SETTING_GENERAL_ERR_NULL_DATA_PARAMETER +; + +244  +»t + = +SETTING_RETURN_FAIL +; + +245 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +d©a +; + +247  +ty³ +) { + +248  +SETTING_VCONF_INT_TYPE +: + +249 +»t + = + `£‰šg_¡Üage_upd©e_vcÚf_key_št_ty³ +( +ad +, +¦p_key +); + +252  +SETTING_VCONF_BOOL_TYPE +: + +255  +SETTING_VCONF_STR_TYPE +: + +262  +»t +; + +263 + } +} + +267 +UG_MODULE_API +  + $£‰šg_¶ugš_»£t +( +bundË + * +d©a +, * +´iv +) + +269 +SETTING_TRACE_BEGIN +; + +271  +»t + = 0; + +272 #ià +SUPPORT_RUN_SYSTEM_COMMAND + + +273 +»t + +ð + `excu‹Cmd +( +SETTING_POSTINST_FILE +, 1, "storage"); + +275 +»t + +ð + `vcÚf_£t_št +( +VCONFKEY_SETAPPL_FONT_SIZE_INT +, +SETTING_FONT_SIZE_SMALL +); + +276 +»t + +ð + `vcÚf_£t_št +( +VCONFKEY_SETAPPL_FONT_TYPE_INT +, 0); + +278  +»t +; + +279 + } +} + + @/usr/include/stdio.h + +24 #iâdeà +_STDIO_H + + +26 #ià! +defšed + +__Ãed_FILE + && !defšed +__Ãed___FILE + + +27  + #_STDIO_H + 1 + + ) + +28  + ~<ã©u»s.h +> + +30 + g__BEGIN_DECLS + + +32  + #__Ãed_size_t + + + ) + +33  + #__Ãed_NULL + + + ) + +34  + ~<¡ddef.h +> + +36  + ~ + +37  + #__Ãed_FILE + + + ) + +38  + #__Ãed___FILE + + + ) + +42 #ià! +defšed + +__FILE_defšed + && defšed +__Ãed_FILE + + +45  + g_IO_FILE +; + +47 +__BEGIN_NAMESPACE_STD + + +49  +_IO_FILE + + tFILE +; + +50 + g__END_NAMESPACE_STD + + +51 #ià +defšed + +__USE_LARGEFILE64 + || defšed +__USE_SVID + || defšed +__USE_POSIX + \ + +52 || +defšed + + g__USE_BSD + || defšed + g__USE_ISOC99 + || defšed + g__USE_XOPEN + \ + +53 || +defšed + +__USE_POSIX2 + + +54 + $__USING_NAMESPACE_STD +( +FILE +) + +57  + #__FILE_defšed + 1 + + ) + +59 #undeà +__Ãed_FILE + + +62 #ià! +defšed + +____FILE_defšed + && defšed +__Ãed___FILE + + +65  +_IO_FILE + + t__FILE +; + +67  + #____FILE_defšed + 1 + + ) + +69 #undeà +__Ãed___FILE + + +72 #ifdef +_STDIO_H + + +73  + #_STDIO_USES_IOSTREAM + + + ) + +75  + ~ + +77 #ià +defšed + +__USE_XOPEN + || defšed +__USE_XOPEN2K8 + + +78 #ifdeà +__GNUC__ + + +79 #iâdeà +_VA_LIST_DEFINED + + +80  +_G_va_li¡ + + tva_li¡ +; + +81  + #_VA_LIST_DEFINED + + + ) + +84  + ~<¡d¬g.h +> + +88 #ifdeà +__USE_XOPEN2K8 + + +89 #iâdeà +__off_t_defšed + + +90 #iâdeà +__USE_FILE_OFFSET64 + + +91  +__off_t + + toff_t +; + +93  +__off64_t + + toff_t +; + +95  + #__off_t_defšed + + + ) + +97 #ià +defšed + +__USE_LARGEFILE64 + && !defšed +__off64_t_defšed + + +98  +__off64_t + + toff64_t +; + +99  + #__off64_t_defšed + + + ) + +102 #iâdeà +__ssize_t_defšed + + +103  +__ssize_t + + tssize_t +; + +104  + #__ssize_t_defšed + + + ) + +109 +__BEGIN_NAMESPACE_STD + + +110 #iâdeà +__USE_FILE_OFFSET64 + + +111  +_G_åos_t + + tåos_t +; + +113  +_G_åos64_t + + tåos_t +; + +115 +__END_NAMESPACE_STD + + +116 #ifdeà +__USE_LARGEFILE64 + + +117  +_G_åos64_t + + tåos64_t +; + +121  + #_IOFBF + 0 + + ) + +122  + #_IOLBF + 1 + + ) + +123  + #_IONBF + 2 + + ) + +127 #iâdeà +BUFSIZ + + +128  + #BUFSIZ + +_IO_BUFSIZ + + + ) + +134 #iâdeà +EOF + + +135  + #EOF + (-1) + + ) + +141  + #SEEK_SET + 0 + + ) + +142  + #SEEK_CUR + 1 + + ) + +143  + #SEEK_END + 2 + + ) + +144 #ifdeà +__USE_GNU + + +145  + #SEEK_DATA + 3 + + ) + +146  + #SEEK_HOLE + 4 + + ) + +150 #ià +defšed + +__USE_SVID + || defšed +__USE_XOPEN + + +152  + #P_tmpdœ + "/tmp" + + ) + +165  + ~ + +169  +_IO_FILE + * +¡dš +; + +170  +_IO_FILE + * +¡dout +; + +171  +_IO_FILE + * +¡d”r +; + +173  + #¡dš + +¡dš + + + ) + +174  + #¡dout + +¡dout + + + ) + +175  + #¡d”r + +¡d”r + + + ) + +177 +__BEGIN_NAMESPACE_STD + + +179  + $»move + ( +__cÚ¡ + * +__fž’ame +è +__THROW +; + +181  + $»Çme + ( +__cÚ¡ + * +__Þd +, __cÚ¡ * +__Ãw +è +__THROW +; + +182 +__END_NAMESPACE_STD + + +184 #ifdeà +__USE_ATFILE + + +186  + $»Çm—t + ( +__Þdfd +, +__cÚ¡ + * +__Þd +,  +__Ãwfd +, + +187 +__cÚ¡ + * +__Ãw +è +__THROW +; + +190 +__BEGIN_NAMESPACE_STD + + +195 #iâdeà +__USE_FILE_OFFSET64 + + +196 +FILE + * + $tmpfže + (è +__wur +; + +198 #ifdeà +__REDIRECT + + +199 +FILE + * + `__REDIRECT + ( +tmpfže +, (), +tmpfže64 +è +__wur +; + +201  + #tmpfže + +tmpfže64 + + + ) + +205 #ifdeà +__USE_LARGEFILE64 + + +206 +FILE + * + $tmpfže64 + (è +__wur +; + +210 * + $tm²am + (* +__s +è +__THROW + +__wur +; + +211 +__END_NAMESPACE_STD + + +213 #ifdeà +__USE_MISC + + +216 * + $tm²am_r + (* +__s +è +__THROW + +__wur +; + +220 #ià +defšed + +__USE_SVID + || defšed +__USE_XOPEN + + +228 * + $‹m²am + ( +__cÚ¡ + * +__dœ +, __cÚ¡ * +__pfx +) + +229 +__THROW + +__©Œibu‹_m®loc__ + +__wur +; + +233 +__BEGIN_NAMESPACE_STD + + +238  + `fþo£ + ( +FILE + * +__¡»am +); + +243  + `fæush + ( +FILE + * +__¡»am +); + +244 +__END_NAMESPACE_STD + + +246 #ifdeà +__USE_MISC + + +253  + `fæush_uÆocked + ( +FILE + * +__¡»am +); + +256 #ifdeà +__USE_GNU + + +263  + `fþo£®l + (); + +267 +__BEGIN_NAMESPACE_STD + + +268 #iâdeà +__USE_FILE_OFFSET64 + + +273 +FILE + * + $fݒ + ( +__cÚ¡ + * +__»¡riù + +__fž’ame +, + +274 +__cÚ¡ + * +__»¡riù + +__modes +è +__wur +; + +279 +FILE + * + $äeݒ + ( +__cÚ¡ + * +__»¡riù + +__fž’ame +, + +280 +__cÚ¡ + * +__»¡riù + +__modes +, + +281 +FILE + * +__»¡riù + +__¡»am +è +__wur +; + +283 #ifdeà +__REDIRECT + + +284 +FILE + * + `__REDIRECT + ( +fݒ +, ( +__cÚ¡ + * +__»¡riù + +__fž’ame +, + +285 +__cÚ¡ + * +__»¡riù + +__modes +), +fݒ64 +) + +286 +__wur +; + +287 +FILE + * + `__REDIRECT + ( +äeݒ +, ( +__cÚ¡ + * +__»¡riù + +__fž’ame +, + +288 +__cÚ¡ + * +__»¡riù + +__modes +, + +289 +FILE + * +__»¡riù + +__¡»am +), +äeݒ64 +) + +290 +__wur +; + +292  + #fݒ + +fݒ64 + + + ) + +293  + #äeݒ + +äeݒ64 + + + ) + +296 +__END_NAMESPACE_STD + + +297 #ifdeà +__USE_LARGEFILE64 + + +298 +FILE + * + $fݒ64 + ( +__cÚ¡ + * +__»¡riù + +__fž’ame +, + +299 +__cÚ¡ + * +__»¡riù + +__modes +è +__wur +; + +300 +FILE + * + $äeݒ64 + ( +__cÚ¡ + * +__»¡riù + +__fž’ame +, + +301 +__cÚ¡ + * +__»¡riù + +__modes +, + +302 +FILE + * +__»¡riù + +__¡»am +è +__wur +; + +305 #ifdef +__USE_POSIX + + +307 +FILE + * + $fdݒ + ( +__fd +, +__cÚ¡ + * +__modes +è +__THROW + +__wur +; + +310 #ifdef +__USE_GNU + + +313 +FILE + * + $fݒcook› + (* +__»¡riù + +__magic_cook› +, + +314 +__cÚ¡ + * +__»¡riù + +__modes +, + +315 +_IO_cook›_io_funùiÚs_t + +__io_funcs +è +__THROW + +__wur +; + +318 #ifdeà +__USE_XOPEN2K8 + + +320 +FILE + * + $fmemݒ + (* +__s +, +size_t + +__Ën +, +__cÚ¡ + * +__modes +) + +321 +__THROW + +__wur +; + +326 +FILE + * + $ݒ_mem¡»am + (** +__buæoc +, +size_t + * +__siz–oc +è +__THROW + +__wur +; + +330 +__BEGIN_NAMESPACE_STD + + +333  + $£tbuf + ( +FILE + * +__»¡riù + +__¡»am +, *__»¡riù +__buf +è +__THROW +; + +337  + $£tvbuf + ( +FILE + * +__»¡riù + +__¡»am +, *__»¡riù +__buf +, + +338  +__modes +, +size_t + +__n +è +__THROW +; + +339 +__END_NAMESPACE_STD + + +341 #ifdef +__USE_BSD + + +344  + $£tbufãr + ( +FILE + * +__»¡riù + +__¡»am +, *__»¡riù +__buf +, + +345 +size_t + +__size +è +__THROW +; + +348  + $£Žšebuf + ( +FILE + * +__¡»am +è +__THROW +; + +352 +__BEGIN_NAMESPACE_STD + + +357  + `årštf + ( +FILE + * +__»¡riù + +__¡»am +, + +358 +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...); + +363  + `´štf + ( +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...); + +365  + $¥rštf + (* +__»¡riù + +__s +, + +366 +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...è +__THROWNL +; + +372  + `vårštf + ( +FILE + * +__»¡riù + +__s +, +__cÚ¡ + *__»¡riù +__fÜm© +, + +373 +_G_va_li¡ + +__¬g +); + +378  + `v´štf + ( +__cÚ¡ + * +__»¡riù + +__fÜm© +, +_G_va_li¡ + +__¬g +); + +380  + $v¥rštf + (* +__»¡riù + +__s +, +__cÚ¡ + *__»¡riù +__fÜm© +, + +381 +_G_va_li¡ + +__¬g +è +__THROWNL +; + +382 +__END_NAMESPACE_STD + + +384 #ià +defšed + +__USE_BSD + || defšed +__USE_ISOC99 + || defšed +__USE_UNIX98 + + +385 +__BEGIN_NAMESPACE_C99 + + +387  + $¢´štf + (* +__»¡riù + +__s +, +size_t + +__maxËn +, + +388 +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...) + +389 +__THROWNL + + `__©Œibu‹__ + (( + `__fÜm©__ + ( +__´štf__ +, 3, 4))); + +391  + $v¢´štf + (* +__»¡riù + +__s +, +size_t + +__maxËn +, + +392 +__cÚ¡ + * +__»¡riù + +__fÜm© +, +_G_va_li¡ + +__¬g +) + +393 +__THROWNL + + `__©Œibu‹__ + (( + `__fÜm©__ + ( +__´štf__ +, 3, 0))); + +394 +__END_NAMESPACE_C99 + + +397 #ifdeà +__USE_GNU + + +400  + $va¥rštf + (** +__»¡riù + +__±r +, +__cÚ¡ + *__»¡riù +__f +, + +401 +_G_va_li¡ + +__¬g +) + +402 +__THROWNL + + `__©Œibu‹__ + (( + $__fÜm©__ + ( +__´štf__ +, 2, 0))è +__wur +; + +403  + $__a¥rštf + (** +__»¡riù + +__±r +, + +404 +__cÚ¡ + * +__»¡riù + +__fmt +, ...) + +405 +__THROWNL + + `__©Œibu‹__ + (( + $__fÜm©__ + ( +__´štf__ +, 2, 3))è +__wur +; + +406  + $a¥rštf + (** +__»¡riù + +__±r +, + +407 +__cÚ¡ + * +__»¡riù + +__fmt +, ...) + +408 +__THROWNL + + `__©Œibu‹__ + (( + $__fÜm©__ + ( +__´štf__ +, 2, 3))è +__wur +; + +411 #ifdeà +__USE_XOPEN2K8 + + +418  + $vd´štf + ( +__fd +, +__cÚ¡ + * +__»¡riù + +__fmt +, + +419 +_G_va_li¡ + +__¬g +) + +420 + `__©Œibu‹__ + (( + `__fÜm©__ + ( +__´štf__ +, 2, 0))); + +421  + $d´štf + ( +__fd +, +__cÚ¡ + * +__»¡riù + +__fmt +, ...) + +422 + `__©Œibu‹__ + (( + `__fÜm©__ + ( +__´štf__ +, 2, 3))); + +426 +__BEGIN_NAMESPACE_STD + + +431  + $fsÿnf + ( +FILE + * +__»¡riù + +__¡»am +, + +432 +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...è +__wur +; + +437  + $sÿnf + ( +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...è +__wur +; + +439  + $ssÿnf + ( +__cÚ¡ + * +__»¡riù + +__s +, + +440 +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...è +__THROW +; + +442 #ià +defšed + +__USE_ISOC99 + && !defšed +__USE_GNU + \ + +443 && (! +defšed + +__LDBL_COMPAT + || !defšed +__REDIRECT +) \ + +444 && ( +defšed + +__STRICT_ANSI__ + || defšed +__USE_XOPEN2K +) + +445 #ifdeà +__REDIRECT + + +449  + `__REDIRECT + ( +fsÿnf +, ( +FILE + * +__»¡riù + +__¡»am +, + +450 +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...), + +451 +__isoc99_fsÿnf +è +__wur +; + +452  + `__REDIRECT + ( +sÿnf +, ( +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...), + +453 +__isoc99_sÿnf +è +__wur +; + +454  + `__REDIRECT_NTH + ( +ssÿnf +, ( +__cÚ¡ + * +__»¡riù + +__s +, + +455 +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...), + +456 +__isoc99_ssÿnf +); + +458  + $__isoc99_fsÿnf + ( +FILE + * +__»¡riù + +__¡»am +, + +459 +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...è +__wur +; + +460  + $__isoc99_sÿnf + ( +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...è +__wur +; + +461  + $__isoc99_ssÿnf + ( +__cÚ¡ + * +__»¡riù + +__s +, + +462 +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...è +__THROW +; + +463  + #fsÿnf + +__isoc99_fsÿnf + + + ) + +464  + #sÿnf + +__isoc99_sÿnf + + + ) + +465  + #ssÿnf + +__isoc99_ssÿnf + + + ) + +469 +__END_NAMESPACE_STD + + +471 #ifdef +__USE_ISOC99 + + +472 +__BEGIN_NAMESPACE_C99 + + +477  + $vfsÿnf + ( +FILE + * +__»¡riù + +__s +, +__cÚ¡ + *__»¡riù +__fÜm© +, + +478 +_G_va_li¡ + +__¬g +) + +479 + `__©Œibu‹__ + (( + $__fÜm©__ + ( +__sÿnf__ +, 2, 0))è +__wur +; + +485  + $vsÿnf + ( +__cÚ¡ + * +__»¡riù + +__fÜm© +, +_G_va_li¡ + +__¬g +) + +486 + `__©Œibu‹__ + (( + $__fÜm©__ + ( +__sÿnf__ +, 1, 0))è +__wur +; + +489  + $vssÿnf + ( +__cÚ¡ + * +__»¡riù + +__s +, + +490 +__cÚ¡ + * +__»¡riù + +__fÜm© +, +_G_va_li¡ + +__¬g +) + +491 +__THROW + + `__©Œibu‹__ + (( + `__fÜm©__ + ( +__sÿnf__ +, 2, 0))); + +493 #ià! +defšed + +__USE_GNU + \ + +494 && (! +defšed + +__LDBL_COMPAT + || !defšed +__REDIRECT +) \ + +495 && ( +defšed + +__STRICT_ANSI__ + || defšed +__USE_XOPEN2K +) + +496 #ifdeà +__REDIRECT + + +500  + `__REDIRECT + ( +vfsÿnf +, + +501 ( +FILE + * +__»¡riù + +__s +, + +502 +__cÚ¡ + * +__»¡riù + +__fÜm© +, +_G_va_li¡ + +__¬g +), + +503 +__isoc99_vfsÿnf +) + +504 + `__©Œibu‹__ + (( + $__fÜm©__ + ( +__sÿnf__ +, 2, 0))è +__wur +; + +505  + `__REDIRECT + ( +vsÿnf +, ( +__cÚ¡ + * +__»¡riù + +__fÜm© +, + +506 +_G_va_li¡ + +__¬g +), +__isoc99_vsÿnf +) + +507 + `__©Œibu‹__ + (( + $__fÜm©__ + ( +__sÿnf__ +, 1, 0))è +__wur +; + +508  + `__REDIRECT_NTH + ( +vssÿnf +, + +509 ( +__cÚ¡ + * +__»¡riù + +__s +, + +510 +__cÚ¡ + * +__»¡riù + +__fÜm© +, + +511 +_G_va_li¡ + +__¬g +), +__isoc99_vssÿnf +) + +512 + `__©Œibu‹__ + (( + `__fÜm©__ + ( +__sÿnf__ +, 2, 0))); + +514  + $__isoc99_vfsÿnf + ( +FILE + * +__»¡riù + +__s +, + +515 +__cÚ¡ + * +__»¡riù + +__fÜm© +, + +516 +_G_va_li¡ + +__¬g +è +__wur +; + +517  + $__isoc99_vsÿnf + ( +__cÚ¡ + * +__»¡riù + +__fÜm© +, + +518 +_G_va_li¡ + +__¬g +è +__wur +; + +519  + $__isoc99_vssÿnf + ( +__cÚ¡ + * +__»¡riù + +__s +, + +520 +__cÚ¡ + * +__»¡riù + +__fÜm© +, + +521 +_G_va_li¡ + +__¬g +è +__THROW +; + +522  + #vfsÿnf + +__isoc99_vfsÿnf + + + ) + +523  + #vsÿnf + +__isoc99_vsÿnf + + + ) + +524  + #vssÿnf + +__isoc99_vssÿnf + + + ) + +528 +__END_NAMESPACE_C99 + + +532 +__BEGIN_NAMESPACE_STD + + +537  + `fg‘c + ( +FILE + * +__¡»am +); + +538  + `g‘c + ( +FILE + * +__¡»am +); + +544  + `g‘ch¬ + (); + +545 +__END_NAMESPACE_STD + + +549  + #g‘c +( +_å +è + `_IO_g‘c + (_å) + + ) + +551 #ià +defšed + +__USE_POSIX + || defšed +__USE_MISC + + +556  + `g‘c_uÆocked + ( +FILE + * +__¡»am +); + +557  + `g‘ch¬_uÆocked + (); + +560 #ifdeà +__USE_MISC + + +567  + `fg‘c_uÆocked + ( +FILE + * +__¡»am +); + +571 +__BEGIN_NAMESPACE_STD + + +579  + `åutc + ( +__c +, +FILE + * +__¡»am +); + +580  + `putc + ( +__c +, +FILE + * +__¡»am +); + +586  + `putch¬ + ( +__c +); + +587 +__END_NAMESPACE_STD + + +591  + #putc +( +_ch +, +_å +è + `_IO_putc + (_ch, _å) + + ) + +593 #ifdeà +__USE_MISC + + +600  + `åutc_uÆocked + ( +__c +, +FILE + * +__¡»am +); + +603 #ià +defšed + +__USE_POSIX + || defšed +__USE_MISC + + +608  + `putc_uÆocked + ( +__c +, +FILE + * +__¡»am +); + +609  + `putch¬_uÆocked + ( +__c +); + +613 #ià +defšed + +__USE_SVID + || defšed +__USE_MISC + \ + +614 || ( +defšed + +__USE_XOPEN + && !defšed +__USE_XOPEN2K +) + +616  + `g‘w + ( +FILE + * +__¡»am +); + +619  + `putw + ( +__w +, +FILE + * +__¡»am +); + +623 +__BEGIN_NAMESPACE_STD + + +628 * + $fg‘s + (* +__»¡riù + +__s +,  +__n +, +FILE + *__»¡riù +__¡»am +) + +629 +__wur +; + +636 * + $g‘s + (* +__s +è +__wur +; + +637 +__END_NAMESPACE_STD + + +639 #ifdeà +__USE_GNU + + +646 * + $fg‘s_uÆocked + (* +__»¡riù + +__s +,  +__n +, + +647 +FILE + * +__»¡riù + +__¡»am +è +__wur +; + +651 #ifdef +__USE_XOPEN2K8 + + +662 +_IO_ssize_t + + $__g‘d–im + (** +__»¡riù + +__lš•Œ +, + +663 +size_t + * +__»¡riù + +__n +,  +__d–im™” +, + +664 +FILE + * +__»¡riù + +__¡»am +è +__wur +; + +665 +_IO_ssize_t + + $g‘d–im + (** +__»¡riù + +__lš•Œ +, + +666 +size_t + * +__»¡riù + +__n +,  +__d–im™” +, + +667 +FILE + * +__»¡riù + +__¡»am +è +__wur +; + +675 +_IO_ssize_t + + $g‘lše + (** +__»¡riù + +__lš•Œ +, + +676 +size_t + * +__»¡riù + +__n +, + +677 +FILE + * +__»¡riù + +__¡»am +è +__wur +; + +681 +__BEGIN_NAMESPACE_STD + + +686  + `åuts + ( +__cÚ¡ + * +__»¡riù + +__s +, +FILE + *__»¡riù +__¡»am +); + +692  + `puts + ( +__cÚ¡ + * +__s +); + +699  + `ung‘c + ( +__c +, +FILE + * +__¡»am +); + +706 +size_t + + $ä—d + (* +__»¡riù + +__±r +, +size_t + +__size +, + +707 +size_t + +__n +, +FILE + * +__»¡riù + +__¡»am +è +__wur +; + +712 +size_t + + `fwr™e + ( +__cÚ¡ + * +__»¡riù + +__±r +, size_ˆ +__size +, + +713 +size_t + +__n +, +FILE + * +__»¡riù + +__s +); + +714 +__END_NAMESPACE_STD + + +716 #ifdeà +__USE_GNU + + +723  + `åuts_uÆocked + ( +__cÚ¡ + * +__»¡riù + +__s +, + +724 +FILE + * +__»¡riù + +__¡»am +); + +727 #ifdeà +__USE_MISC + + +734 +size_t + + $ä—d_uÆocked + (* +__»¡riù + +__±r +, +size_t + +__size +, + +735 +size_t + +__n +, +FILE + * +__»¡riù + +__¡»am +è +__wur +; + +736 +size_t + + `fwr™e_uÆocked + ( +__cÚ¡ + * +__»¡riù + +__±r +, size_ˆ +__size +, + +737 +size_t + +__n +, +FILE + * +__»¡riù + +__¡»am +); + +741 +__BEGIN_NAMESPACE_STD + + +746  + `f£ek + ( +FILE + * +__¡»am +,  +__off +,  +__wh’û +); + +751  + $á–l + ( +FILE + * +__¡»am +è +__wur +; + +756  + `»wšd + ( +FILE + * +__¡»am +); + +757 +__END_NAMESPACE_STD + + +764 #ià +defšed + +__USE_LARGEFILE + || defšed +__USE_XOPEN2K + + +765 #iâdeà +__USE_FILE_OFFSET64 + + +770  + `f£eko + ( +FILE + * +__¡»am +, +__off_t + +__off +,  +__wh’û +); + +775 +__off_t + + $á–lo + ( +FILE + * +__¡»am +è +__wur +; + +777 #ifdeà +__REDIRECT + + +778  + `__REDIRECT + ( +f£eko +, + +779 ( +FILE + * +__¡»am +, +__off64_t + +__off +,  +__wh’û +), + +780 +f£eko64 +); + +781 +__off64_t + + `__REDIRECT + ( +á–lo +, ( +FILE + * +__¡»am +), +á–lo64 +); + +783  + #f£eko + +f£eko64 + + + ) + +784  + #á–lo + +á–lo64 + + + ) + +789 +__BEGIN_NAMESPACE_STD + + +790 #iâdeà +__USE_FILE_OFFSET64 + + +795  + `fg‘pos + ( +FILE + * +__»¡riù + +__¡»am +, +åos_t + *__»¡riù +__pos +); + +800  + `f£os + ( +FILE + * +__¡»am +, +__cÚ¡ + +åos_t + * +__pos +); + +802 #ifdeà +__REDIRECT + + +803  + `__REDIRECT + ( +fg‘pos +, ( +FILE + * +__»¡riù + +__¡»am +, + +804 +åos_t + * +__»¡riù + +__pos +), +fg‘pos64 +); + +805  + `__REDIRECT + ( +f£os +, + +806 ( +FILE + * +__¡»am +, +__cÚ¡ + +åos_t + * +__pos +), +f£os64 +); + +808  + #fg‘pos + +fg‘pos64 + + + ) + +809  + #f£os + +f£os64 + + + ) + +812 +__END_NAMESPACE_STD + + +814 #ifdeà +__USE_LARGEFILE64 + + +815  + `f£eko64 + ( +FILE + * +__¡»am +, +__off64_t + +__off +,  +__wh’û +); + +816 +__off64_t + + $á–lo64 + ( +FILE + * +__¡»am +è +__wur +; + +817  + `fg‘pos64 + ( +FILE + * +__»¡riù + +__¡»am +, +åos64_t + *__»¡riù +__pos +); + +818  + `f£os64 + ( +FILE + * +__¡»am +, +__cÚ¡ + +åos64_t + * +__pos +); + +821 +__BEGIN_NAMESPACE_STD + + +823  + $þ—»¼ + ( +FILE + * +__¡»am +è +__THROW +; + +825  + $ãof + ( +FILE + * +__¡»am +è +__THROW + +__wur +; + +827  + $ã¼Ü + ( +FILE + * +__¡»am +è +__THROW + +__wur +; + +828 +__END_NAMESPACE_STD + + +830 #ifdeà +__USE_MISC + + +832  + $þ—»¼_uÆocked + ( +FILE + * +__¡»am +è +__THROW +; + +833  + $ãof_uÆocked + ( +FILE + * +__¡»am +è +__THROW + +__wur +; + +834  + $ã¼Ü_uÆocked + ( +FILE + * +__¡»am +è +__THROW + +__wur +; + +838 +__BEGIN_NAMESPACE_STD + + +843  + `³¼Ü + ( +__cÚ¡ + * +__s +); + +844 +__END_NAMESPACE_STD + + +850  + ~ + +853 #ifdef +__USE_POSIX + + +855  + $fž’o + ( +FILE + * +__¡»am +è +__THROW + +__wur +; + +858 #ifdeà +__USE_MISC + + +860  + $fž’o_uÆocked + ( +FILE + * +__¡»am +è +__THROW + +__wur +; + +864 #ià( +defšed + +__USE_POSIX2 + || defšed +__USE_SVID + || defšed +__USE_BSD + || \ + +865 +defšed + +__USE_MISC +) + +870 +FILE + * + $pݒ + ( +__cÚ¡ + * +__commªd +, __cÚ¡ * +__modes +è +__wur +; + +876  + `pþo£ + ( +FILE + * +__¡»am +); + +880 #ifdef +__USE_POSIX + + +882 * + $ù”mid + (* +__s +è +__THROW +; + +886 #ifdeà +__USE_XOPEN + + +888 * + `cu£rid + (* +__s +); + +892 #ifdef +__USE_GNU + + +893  +ob¡ack +; + +896  + $ob¡ack_´štf + ( +ob¡ack + * +__»¡riù + +__ob¡ack +, + +897 +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...) + +898 +__THROWNL + + `__©Œibu‹__ + (( + `__fÜm©__ + ( +__´štf__ +, 2, 3))); + +899  + $ob¡ack_v´štf + ( +ob¡ack + * +__»¡riù + +__ob¡ack +, + +900 +__cÚ¡ + * +__»¡riù + +__fÜm© +, + +901 +_G_va_li¡ + +__¬gs +) + +902 +__THROWNL + + `__©Œibu‹__ + (( + `__fÜm©__ + ( +__´štf__ +, 2, 0))); + +906 #ià +defšed + +__USE_POSIX + || defšed +__USE_MISC + + +910  + $æockfže + ( +FILE + * +__¡»am +è +__THROW +; + +914  + $árylockfže + ( +FILE + * +__¡»am +è +__THROW + +__wur +; + +917  + $fuÆockfže + ( +FILE + * +__¡»am +è +__THROW +; + +920 #ià +defšed + +__USE_XOPEN + && !defšed +__USE_XOPEN2K + && !defšed +__USE_GNU + + +924  + #__Ãed_g‘Ýt + + + ) + +925  + ~ + +930 #ifdeà +__USE_EXTERN_INLINES + + +931  + ~ + +933 #ià +__USE_FORTIFY_LEVEL + > 0 && +defšed + +__ex‹º_®ways_šlše + + +934  + ~ + +936 #ifdeà +__LDBL_COMPAT + + +937  + ~ + +940 +__END_DECLS + + + @/usr/include/features.h + +20 #iâdef +_FEATURES_H + + +21  + #_FEATURES_H + 1 + + ) + +98 #undeà +__USE_ISOC99 + + +99 #undeà +__USE_ISOC95 + + +100 #undeà +__USE_POSIX + + +101 #undeà +__USE_POSIX2 + + +102 #undeà +__USE_POSIX199309 + + +103 #undeà +__USE_POSIX199506 + + +104 #undeà +__USE_XOPEN + + +105 #undeà +__USE_XOPEN_EXTENDED + + +106 #undeà +__USE_UNIX98 + + +107 #undeà +__USE_XOPEN2K + + +108 #undeà +__USE_XOPEN2KXSI + + +109 #undeà +__USE_XOPEN2K8 + + +110 #undeà +__USE_XOPEN2K8XSI + + +111 #undeà +__USE_LARGEFILE + + +112 #undeà +__USE_LARGEFILE64 + + +113 #undeà +__USE_FILE_OFFSET64 + + +114 #undeà +__USE_BSD + + +115 #undeà +__USE_SVID + + +116 #undeà +__USE_MISC + + +117 #undeà +__USE_ATFILE + + +118 #undeà +__USE_GNU + + +119 #undeà +__USE_REENTRANT + + +120 #undeà +__USE_FORTIFY_LEVEL + + +121 #undeà +__FAVOR_BSD + + +122 #undeà +__KERNEL_STRICT_NAMES + + +126 #iâdeà +_LOOSE_KERNEL_NAMES + + +127  + #__KERNEL_STRICT_NAMES + + + ) + +131  + #__USE_ANSI + 1 + + ) + +140 #ià +defšed + +__GNUC__ + && defšed +__GNUC_MINOR__ + + +141  + #__GNUC_PREREQ +( +maj +, +mš +) \ + +142 (( +__GNUC__ + << 16è+ +__GNUC_MINOR__ + >ð(( +maj +è<< 16è+ ( +mš +)) + + ) + +144  + #__GNUC_PREREQ +( +maj +, +mš +è0 + + ) + +149 #ià +defšed + +_BSD_SOURCE + && \ + +150 !( +defšed + + g_POSIX_SOURCE + || defšed + g_POSIX_C_SOURCE + || \ + +151 +defšed + + g_XOPEN_SOURCE + || defšed + g_GNU_SOURCE + || defšed + g_SVID_SOURCE +) + +152  + #__FAVOR_BSD + 1 + + ) + +156 #ifdeà +_GNU_SOURCE + + +157 #undeà +_ISOC95_SOURCE + + +158  + #_ISOC95_SOURCE + 1 + + ) + +159 #undeà +_ISOC99_SOURCE + + +160  + #_ISOC99_SOURCE + 1 + + ) + +161 #undeà +_POSIX_SOURCE + + +162  + #_POSIX_SOURCE + 1 + + ) + +163 #undeà +_POSIX_C_SOURCE + + +164  + #_POSIX_C_SOURCE + 200809L + + ) + +165 #undeà +_XOPEN_SOURCE + + +166  + #_XOPEN_SOURCE + 700 + + ) + +167 #undeà +_XOPEN_SOURCE_EXTENDED + + +168  + #_XOPEN_SOURCE_EXTENDED + 1 + + ) + +169 #undeà +_LARGEFILE64_SOURCE + + +170  + #_LARGEFILE64_SOURCE + 1 + + ) + +171 #undeà +_BSD_SOURCE + + +172  + #_BSD_SOURCE + 1 + + ) + +173 #undeà +_SVID_SOURCE + + +174  + #_SVID_SOURCE + 1 + + ) + +175 #undeà +_ATFILE_SOURCE + + +176  + #_ATFILE_SOURCE + 1 + + ) + +181 #ià(! +defšed + +__STRICT_ANSI__ + && !defšed +_ISOC99_SOURCE + && \ + +182 ! +defšed + + g_POSIX_SOURCE + && !defšed + g_POSIX_C_SOURCE + && \ + +183 ! +defšed + + g_XOPEN_SOURCE + && !defšed + g_BSD_SOURCE + && !defšed + g_SVID_SOURCE +) + +184  + #_BSD_SOURCE + 1 + + ) + +185  + #_SVID_SOURCE + 1 + + ) + +192 #ià( +defšed + +_ISOC99_SOURCE + || defšed +_ISOC9X_SOURCE + \ + +193 || ( +defšed + + g__STDC_VERSION__ + && __STDC_VERSION__ >= 199901L)) + +194  + #__USE_ISOC99 + 1 + + ) + +198 #ià( +defšed + +_ISOC99_SOURCE + || defšed +_ISOC9X_SOURCE + \ + +199 || ( +defšed + +__STDC_VERSION__ + && __STDC_VERSION__ >= 199409L)) + +200  + #__USE_ISOC95 + 1 + + ) + +205 #ià((! +defšed + +__STRICT_ANSI__ + || ( +_XOPEN_SOURCE + - 0) >= 500) && \ + +206 ! +defšed + +_POSIX_SOURCE + && !defšed +_POSIX_C_SOURCE +) + +207  + #_POSIX_SOURCE + 1 + + ) + +208 #ià +defšed + +_XOPEN_SOURCE + && (_XOPEN_SOURCE - 0) < 500 + +209  + #_POSIX_C_SOURCE + 2 + + ) + +210 #–ià +defšed + +_XOPEN_SOURCE + && (_XOPEN_SOURCE - 0) < 600 + +211  + #_POSIX_C_SOURCE + 199506L + + ) + +212 #–ià +defšed + +_XOPEN_SOURCE + && (_XOPEN_SOURCE - 0) < 700 + +213  + #_POSIX_C_SOURCE + 200112L + + ) + +215  + #_POSIX_C_SOURCE + 200809L + + ) + +217  + #__USE_POSIX_IMPLICITLY + 1 + + ) + +220 #ià +defšed + +_POSIX_SOURCE + || +_POSIX_C_SOURCE + >ð1 || defšed +_XOPEN_SOURCE + + +221  + #__USE_POSIX + 1 + + ) + +224 #ià +defšed + +_POSIX_C_SOURCE + && _POSIX_C_SOURCE >ð2 || defšed +_XOPEN_SOURCE + + +225  + #__USE_POSIX2 + 1 + + ) + +228 #ià( +_POSIX_C_SOURCE + - 0) >= 199309L + +229  + #__USE_POSIX199309 + 1 + + ) + +232 #ià( +_POSIX_C_SOURCE + - 0) >= 199506L + +233  + #__USE_POSIX199506 + 1 + + ) + +236 #ià( +_POSIX_C_SOURCE + - 0) >= 200112L + +237  + #__USE_XOPEN2K + 1 + + ) + +238 #undeà +__USE_ISOC95 + + +239  + #__USE_ISOC95 + 1 + + ) + +240 #undeà +__USE_ISOC99 + + +241  + #__USE_ISOC99 + 1 + + ) + +244 #ià( +_POSIX_C_SOURCE + - 0) >= 200809L + +245  + #__USE_XOPEN2K8 + 1 + + ) + +246 #undeà +_ATFILE_SOURCE + + +247  + #_ATFILE_SOURCE + 1 + + ) + +250 #ifdef +_XOPEN_SOURCE + + +251  + #__USE_XOPEN + 1 + + ) + +252 #ià( +_XOPEN_SOURCE + - 0) >= 500 + +253  + #__USE_XOPEN_EXTENDED + 1 + + ) + +254  + #__USE_UNIX98 + 1 + + ) + +255 #undeà +_LARGEFILE_SOURCE + + +256  + #_LARGEFILE_SOURCE + 1 + + ) + +257 #ià( +_XOPEN_SOURCE + - 0) >= 600 + +258 #ià( +_XOPEN_SOURCE + - 0) >= 700 + +259  + #__USE_XOPEN2K8 + 1 + + ) + +260  + #__USE_XOPEN2K8XSI + 1 + + ) + +262  + #__USE_XOPEN2K + 1 + + ) + +263  + #__USE_XOPEN2KXSI + 1 + + ) + +264 #undeà +__USE_ISOC95 + + +265  + #__USE_ISOC95 + 1 + + ) + +266 #undeà +__USE_ISOC99 + + +267  + #__USE_ISOC99 + 1 + + ) + +270 #ifdeà +_XOPEN_SOURCE_EXTENDED + + +271  + #__USE_XOPEN_EXTENDED + 1 + + ) + +276 #ifdeà +_LARGEFILE_SOURCE + + +277  + #__USE_LARGEFILE + 1 + + ) + +280 #ifdeà +_LARGEFILE64_SOURCE + + +281  + #__USE_LARGEFILE64 + 1 + + ) + +284 #ià +defšed + +_FILE_OFFSET_BITS + && _FILE_OFFSET_BITS == 64 + +285  + #__USE_FILE_OFFSET64 + 1 + + ) + +288 #ià +defšed + +_BSD_SOURCE + || defšed +_SVID_SOURCE + + +289  + #__USE_MISC + 1 + + ) + +292 #ifdef +_BSD_SOURCE + + +293  + #__USE_BSD + 1 + + ) + +296 #ifdef +_SVID_SOURCE + + +297  + #__USE_SVID + 1 + + ) + +300 #ifdef +_ATFILE_SOURCE + + +301  + #__USE_ATFILE + 1 + + ) + +304 #ifdef +_GNU_SOURCE + + +305  + #__USE_GNU + 1 + + ) + +308 #ià +defšed + +_REENTRANT + || defšed +_THREAD_SAFE + + +309  + #__USE_REENTRANT + 1 + + ) + +312 #ià +defšed + +_FORTIFY_SOURCE + && _FORTIFY_SOURCE > 0 \ + +313 && +__GNUC_PREREQ + (4, 1è&& +defšed + + g__OPTIMIZE__ + && __OPTIMIZE__ > 0 + +314 #ià +_FORTIFY_SOURCE + > 1 + +315  + #__USE_FORTIFY_LEVEL + 2 + + ) + +317  + #__USE_FORTIFY_LEVEL + 1 + + ) + +320  + #__USE_FORTIFY_LEVEL + 0 + + ) + +324  + ~ + +327  + #__STDC_ISO_10646__ + 200009L + + ) + +335 #undeà +__GNU_LIBRARY__ + + +336  + #__GNU_LIBRARY__ + 6 + + ) + +340  + #__GLIBC__ + 2 + + ) + +341  + #__GLIBC_MINOR__ + 15 + + ) + +343  + #__GLIBC_PREREQ +( +maj +, +mš +) \ + +344 (( +__GLIBC__ + << 16è+ +__GLIBC_MINOR__ + >ð(( +maj +è<< 16è+ ( +mš +)) + + ) + +347 #ià +defšed + +__GNUC__ + \ + +348 || ( +defšed + + g__PGI + && defšed + g__i386__ + ) \ + +349 || ( +defšed + + g__INTEL_COMPILER + && (defšed + g__i386__ + || defšed + g__Ÿ64__ +)) \ + +350 || ( +defšed + + g__STDC_VERSION__ + && __STDC_VERSION__ >= 199901L) + +351  + #__GLIBC_HAVE_LONG_LONG + 1 + + ) + +355 #iâdeà +__ASSEMBLER__ + + +356 #iâdeà +_SYS_CDEFS_H + + +357  + ~ + +362 #ià +defšed + +__USE_FILE_OFFSET64 + && !defšed +__REDIRECT + + +363  + #__USE_LARGEFILE + 1 + + ) + +364  + #__USE_LARGEFILE64 + 1 + + ) + +370 #ià +__GNUC_PREREQ + (2, 7è&& +defšed + +__OPTIMIZE__ + \ + +371 && ! +defšed + + g__OPTIMIZE_SIZE__ + && !defšed + g__NO_INLINE__ + \ + +372 && +defšed + + g__ex‹º_šlše + + +373  + #__USE_EXTERN_INLINES + 1 + + ) + +378 #ià +__GNUC_PREREQ + (2, 7è&& +defšed + +__OPTIMIZE__ + \ + +379 && ( +defšed + + g_LIBC + || !defšed + g__OPTIMIZE_SIZE__ +è&& !defšed + g__NO_INLINE__ + \ + +380 && +defšed + + g__ex‹º_šlše + + +381  + #__USE_EXTERN_INLINES_IN_LIBC + 1 + + ) + +389  + ~ + + @/usr/include/getopt.h + +21 #iâdeà +_GETOPT_H + + +23 #iâdeà +__Ãed_g‘Ýt + + +24  + #_GETOPT_H + 1 + + ) + +34 #ià! +defšed + +__GNU_LIBRARY__ + + +35  + ~<ùy³.h +> + +38 #iâdeà +__THROW + + +39 #iâdeà +__GNUC_PREREQ + + +40  + #__GNUC_PREREQ +( +maj +, +mš +è(0) + + ) + +42 #ià +defšed + +__ýlu¥lus + && +__GNUC_PREREQ + (2,8) + +43  + #__THROW + + `throw + () + + ) + +45  + #__THROW + + + ) + +49 #ifdef +__ýlu¥lus + + +59 * +ݏrg +; + +73  +Ýtšd +; + +78  +݋¼ +; + +82  +ÝtÝt +; + +84 #iâdeà +__Ãed_g‘Ýt + + +106  + sÝtiÚ + + +108 cÚ¡ * + gÇme +; + +111  + ghas_¬g +; + +112 * + gæag +; + +113  + gv® +; + +118  + #no_¬gum’t + 0 + + ) + +119  + #»quœed_¬gum’t + 1 + + ) + +120  + #ÝtiÚ®_¬gum’t + 2 + + ) + +148 #ifdeà +__GNU_LIBRARY__ + + +152  +g‘Ýt + ( +___¬gc +, *cÚ¡ * +___¬gv +, cÚ¡ * +__shÜtÝts +) + +153 +__THROW +; + +155 #ià +defšed + +__Ãed_g‘Ýt + && defšed +__USE_POSIX2 + \ + +156 && ! +defšed + + g__USE_POSIX_IMPLICITLY + && !defšed + g__USE_GNU + + +160 #ifdeà +__REDIRECT + + +161  +__REDIRECT_NTH + ( +g‘Ýt +, ( +___¬gc +, *cÚ¡ * +___¬gv +, + +162 cÚ¡ * +__shÜtÝts +), + +163 +__posix_g‘Ýt +); + +165  +__posix_g‘Ýt + ( +___¬gc +, *cÚ¡ * +___¬gv +, + +166 cÚ¡ * +__shÜtÝts +è +__THROW +; + +167  + #g‘Ýt + +__posix_g‘Ýt + + + ) + +171  +g‘Ýt + (); + +174 #iâdeà +__Ãed_g‘Ýt + + +175  +g‘Ýt_lÚg + ( +___¬gc +, *cÚ¡ * +___¬gv +, + +176 cÚ¡ * +__shÜtÝts +, + +177 cÚ¡  +ÝtiÚ + * +__lÚgÝts +, * +__lÚgšd +) + +178 +__THROW +; + +179  +g‘Ýt_lÚg_Úly + ( +___¬gc +, *cÚ¡ * +___¬gv +, + +180 cÚ¡ * +__shÜtÝts +, + +181 cÚ¡  +ÝtiÚ + * +__lÚgÝts +, * +__lÚgšd +) + +182 +__THROW +; + +186 #ifdef +__ýlu¥lus + + +191 #undeà +__Ãed_g‘Ýt + + + @/usr/include/libio.h + +29 #iâdeà +_IO_STDIO_H + + +30  + #_IO_STDIO_H + + + ) + +32  + ~<_G_cÚfig.h +> + +34  + #_IO_pos_t + +_G_åos_t + + + ) + +35  + #_IO_åos_t + +_G_åos_t + + + ) + +36  + #_IO_åos64_t + +_G_åos64_t + + + ) + +37  + #_IO_size_t + +_G_size_t + + + ) + +38  + #_IO_ssize_t + +_G_ssize_t + + + ) + +39  + #_IO_off_t + +_G_off_t + + + ) + +40  + #_IO_off64_t + +_G_off64_t + + + ) + +41  + #_IO_pid_t + +_G_pid_t + + + ) + +42  + #_IO_uid_t + +_G_uid_t + + + ) + +43  + #_IO_icÚv_t + +_G_icÚv_t + + + ) + +44  + #_IO_HAVE_SYS_WAIT + +_G_HAVE_SYS_WAIT + + + ) + +45  + #_IO_HAVE_ST_BLKSIZE + +_G_HAVE_ST_BLKSIZE + + + ) + +46  + #_IO_BUFSIZ + +_G_BUFSIZ + + + ) + +47  + #_IO_va_li¡ + +_G_va_li¡ + + + ) + +48  + #_IO_wšt_t + +_G_wšt_t + + + ) + +50 #ifdeà +_G_NEED_STDARG_H + + +52  + #__Ãed___va_li¡ + + + ) + +53  + ~<¡d¬g.h +> + +54 #ifdeà +__GNUC_VA_LIST + + +55 #undeà +_IO_va_li¡ + + +56  + #_IO_va_li¡ + +__gnuc_va_li¡ + + + ) + +60 #iâdeà +__P + + +61 #ià +_G_HAVE_SYS_CDEFS + + +62  + ~ + +64 #ifdeà +__STDC__ + + +65  + #__P +( +p +è + ) +p + +66  + #__PMT +( +p +è + ) +p + +68  + #__P +( +p +è() + + ) + +69  + #__PMT +( +p +è() + + ) + +75 #iâdeà +_PARAMS + + +76  + #_PARAMS +( +´Ùos +è + `__P +ÕrÙos) + + ) + +79 #iâdeà +__STDC__ + + +81 cÚ¡ + + ) + +84  + #_IO_UNIFIED_JUMPTABLES + 1 + + ) + +85 #iâdeà +_G_HAVE_PRINTF_FP + + +86  + #_IO_USE_DTOA + 1 + + ) + +89 #iâdeà +EOF + + +90  + #EOF + (-1) + + ) + +92 #iâdeà +NULL + + +93 #ià +defšed + +__GNUG__ + && \ + +94 ( + g__GNUC__ + > 2 || (__GNUC__ =ð2 && +__GNUC_MINOR__ + >= 8)) + +95  + #NULL + ( +__nuÎ +) + + ) + +97 #ià! +defšed +( +__ýlu¥lus +) + +98  + #NULL + ((*)0) + + ) + +100  + #NULL + (0) + + ) + +105  + #_IOS_INPUT + 1 + + ) + +106  + #_IOS_OUTPUT + 2 + + ) + +107  + #_IOS_ATEND + 4 + + ) + +108  + #_IOS_APPEND + 8 + + ) + +109  + #_IOS_TRUNC + 16 + + ) + +110  + #_IOS_NOCREATE + 32 + + ) + +111  + #_IOS_NOREPLACE + 64 + + ) + +112  + #_IOS_BIN + 128 + + ) + +120  + #_IO_MAGIC + 0xFBAD0000 + + ) + +121  + #_OLD_STDIO_MAGIC + 0xFABC0000 + + ) + +122  + #_IO_MAGIC_MASK + 0xFFFF0000 + + ) + +123  + #_IO_USER_BUF + 1 + + ) + +124  + #_IO_UNBUFFERED + 2 + + ) + +125  + #_IO_NO_READS + 4 + + ) + +126  + #_IO_NO_WRITES + 8 + + ) + +127  + #_IO_EOF_SEEN + 0x10 + + ) + +128  + #_IO_ERR_SEEN + 0x20 + + ) + +129  + #_IO_DELETE_DONT_CLOSE + 0x40 + + ) + +130  + #_IO_LINKED + 0x80 + + ) + +131  + #_IO_IN_BACKUP + 0x100 + + ) + +132  + #_IO_LINE_BUF + 0x200 + + ) + +133  + #_IO_TIED_PUT_GET + 0x400 + + ) + +134  + #_IO_CURRENTLY_PUTTING + 0x800 + + ) + +135  + #_IO_IS_APPENDING + 0x1000 + + ) + +136  + #_IO_IS_FILEBUF + 0x2000 + + ) + +137  + #_IO_BAD_SEEN + 0x4000 + + ) + +138  + #_IO_USER_LOCK + 0x8000 + + ) + +140  + #_IO_FLAGS2_MMAP + 1 + + ) + +141  + #_IO_FLAGS2_NOTCANCEL + 2 + + ) + +142 #ifdeà +_LIBC + + +143  + #_IO_FLAGS2_FORTIFY + 4 + + ) + +145  + #_IO_FLAGS2_USER_WBUF + 8 + + ) + +146 #ifdeà +_LIBC + + +147  + #_IO_FLAGS2_SCANF_STD + 16 + + ) + +148  + #_IO_FLAGS2_NOCLOSE + 32 + + ) + +149  + #_IO_FLAGS2_CLOEXEC + 64 + + ) + +153  + #_IO_SKIPWS + 01 + + ) + +154  + #_IO_LEFT + 02 + + ) + +155  + #_IO_RIGHT + 04 + + ) + +156  + #_IO_INTERNAL + 010 + + ) + +157  + #_IO_DEC + 020 + + ) + +158  + #_IO_OCT + 040 + + ) + +159  + #_IO_HEX + 0100 + + ) + +160  + #_IO_SHOWBASE + 0200 + + ) + +161  + #_IO_SHOWPOINT + 0400 + + ) + +162  + #_IO_UPPERCASE + 01000 + + ) + +163  + #_IO_SHOWPOS + 02000 + + ) + +164  + #_IO_SCIENTIFIC + 04000 + + ) + +165  + #_IO_FIXED + 010000 + + ) + +166  + #_IO_UNITBUF + 020000 + + ) + +167  + #_IO_STDIO + 040000 + + ) + +168  + #_IO_DONT_CLOSE + 0100000 + + ) + +169  + #_IO_BOOLALPHA + 0200000 + + ) + +172  +_IO_jump_t +;  + g_IO_FILE +; + +175 #ifdeà +_IO_MTSAFE_IO + + +176 #ià +defšed + +__GLIBC__ + && __GLIBC__ >= 2 + +177  + ~ + +182  + t_IO_lock_t +; + +188  + s_IO_m¬k” + { + +189  +_IO_m¬k” + * + m_Ãxt +; + +190  +_IO_FILE + * + m_sbuf +; + +194  + m_pos +; + +196  +£t_¡»ampos +( +¡»ampos + +¥ +è{ + m_¥os + = sp; } + +197  +£t_off£t +( +off£t +è{ + m_pos + = off£t; + m_¥os + = ( +¡»ampos +)(-2); } + +198 + mpublic +: + +199 +¡»amm¬k” +( +¡»ambuf + * +sb +); + +200 ~ +¡»amm¬k” +(); + +201  +§všg +(è{  + m_¥os + == -2; } + +202  +d– +( +¡»amm¬k” +&); + +203  +d– +(); + +208 + e__codecvt_»suÉ + + +210 + m__codecvt_ok +, + +211 + m__codecvt_·¹Ÿl +, + +212 + m__codecvt_”rÜ +, + +213 + m__codecvt_nocÚv + + +216 #ià +defšed + +_LIBC + || defšed +_GLIBCPP_USE_WCHAR_T + + +219  + s_IO_codecvt + + +221 (* + m__codecvt_de¡r +è( + m_IO_codecvt + *); + +222 +__codecvt_»suÉ + (* +__codecvt_do_out +è( + m_IO_codecvt + *, + +223 + m__mb¡©e_t + *, + +224 cÚ¡ + mwch¬_t + *, + +225 cÚ¡ + mwch¬_t + *, + +226 cÚ¡ + mwch¬_t + **, *, + +228 +__codecvt_»suÉ + (* +__codecvt_do_unshiá +è( + m_IO_codecvt + *, + +229 + m__mb¡©e_t + *, *, + +231 +__codecvt_»suÉ + (* +__codecvt_do_š +è( + m_IO_codecvt + *, + +232 + m__mb¡©e_t + *, + +234 cÚ¡ **, + mwch¬_t + *, + +235 + mwch¬_t + *, wchar_t **); + +236 (* + m__codecvt_do_’codšg +è( + m_IO_codecvt + *); + +237 (* + m__codecvt_do_®ways_nocÚv +è( + m_IO_codecvt + *); + +238 (* + m__codecvt_do_Ëngth +è( + m_IO_codecvt + *, + m__mb¡©e_t + *, + +239 cÚ¡ *, cÚ¡ *, + m_IO_size_t +); + +240 (* + m__codecvt_do_max_Ëngth +è( + m_IO_codecvt + *); + +242 +_IO_icÚv_t + + m__cd_š +; + +243 +_IO_icÚv_t + + m__cd_out +; + +247  + s_IO_wide_d©a + + +249 +wch¬_t + * + m_IO_»ad_±r +; + +250 +wch¬_t + * + m_IO_»ad_’d +; + +251 +wch¬_t + * + m_IO_»ad_ba£ +; + +252 +wch¬_t + * + m_IO_wr™e_ba£ +; + +253 +wch¬_t + * + m_IO_wr™e_±r +; + +254 +wch¬_t + * + m_IO_wr™e_’d +; + +255 +wch¬_t + * + m_IO_buf_ba£ +; + +256 +wch¬_t + * + m_IO_buf_’d +; + +258 +wch¬_t + * + m_IO_§ve_ba£ +; + +259 +wch¬_t + * + m_IO_backup_ba£ +; + +261 +wch¬_t + * + m_IO_§ve_’d +; + +263 +__mb¡©e_t + + m_IO_¡©e +; + +264 +__mb¡©e_t + + m_IO_Ï¡_¡©e +; + +265  +_IO_codecvt + + m_codecvt +; + +267 +wch¬_t + + m_shÜtbuf +[1]; + +269 cÚ¡  +_IO_jump_t + * + m_wide_vbË +; + +273  + s_IO_FILE + { + +274  + m_æags +; + +275  + #_IO_fže_æags + +_æags + + + ) + +279 * + m_IO_»ad_±r +; + +280 * + m_IO_»ad_’d +; + +281 * + m_IO_»ad_ba£ +; + +282 * + m_IO_wr™e_ba£ +; + +283 * + m_IO_wr™e_±r +; + +284 * + m_IO_wr™e_’d +; + +285 * + m_IO_buf_ba£ +; + +286 * + m_IO_buf_’d +; + +288 * + m_IO_§ve_ba£ +; + +289 * + m_IO_backup_ba£ +; + +290 * + m_IO_§ve_’d +; + +292  +_IO_m¬k” + * + m_m¬k”s +; + +294  +_IO_FILE + * + m_chaš +; + +296  + m_fž’o +; + +298  + m_blksize +; + +300  + m_æags2 +; + +302 +_IO_off_t + + m_Þd_off£t +; + +304  + #__HAVE_COLUMN + + + ) + +306  + m_cur_cÞumn +; + +307 sigÃd  + m_vbË_off£t +; + +308  + m_shÜtbuf +[1]; + +312 +_IO_lock_t + * + m_lock +; + +313 #ifdeà +_IO_USE_OLD_IO_FILE + + +316  + s_IO_FILE_com¶‘e + + +318  +_IO_FILE + + m_fže +; + +320 #ià +defšed + +_G_IO_IO_FILE_VERSION + && _G_IO_IO_FILE_VERSION == 0x20001 + +321 +_IO_off64_t + + m_off£t +; + +322 #ià +defšed + +_LIBC + || defšed +_GLIBCPP_USE_WCHAR_T + + +324  +_IO_codecvt + * + m_codecvt +; + +325  +_IO_wide_d©a + * + m_wide_d©a +; + +326  +_IO_FILE + * + m_䓻s_li¡ +; + +327 * + m_䓻s_buf +; + +328 +size_t + + m_䓻s_size +; + +330 * + m__·d1 +; + +331 * + m__·d2 +; + +332 * + m__·d3 +; + +333 * + m__·d4 +; + +334 +size_t + + m__·d5 +; + +336  + m_mode +; + +338  + m_unu£d2 +[15 *  (è- 4 *  (*è-  ( +size_t +)]; + +342 #iâdeà +__ýlu¥lus + + +343  +_IO_FILE + + t_IO_FILE +; + +346  + g_IO_FILE_¶us +; + +348  +_IO_FILE_¶us + +_IO_2_1_¡dš_ +; + +349  +_IO_FILE_¶us + +_IO_2_1_¡dout_ +; + +350  +_IO_FILE_¶us + +_IO_2_1_¡d”r_ +; + +351 #iâdeà +_LIBC + + +352  + #_IO_¡dš + (( +_IO_FILE +*)(& +_IO_2_1_¡dš_ +)) + + ) + +353  + #_IO_¡dout + (( +_IO_FILE +*)(& +_IO_2_1_¡dout_ +)) + + ) + +354  + #_IO_¡d”r + (( +_IO_FILE +*)(& +_IO_2_1_¡d”r_ +)) + + ) + +356 +_IO_FILE + * +_IO_¡dš + +©Œibu‹_hidd’ +; + +357 +_IO_FILE + * +_IO_¡dout + +©Œibu‹_hidd’ +; + +358 +_IO_FILE + * +_IO_¡d”r + +©Œibu‹_hidd’ +; + +366  +__ssize_t + + t__io_»ad_â + (* + t__cook› +, * + t__buf +, + tsize_t + + t__nby‹s +); + +374  +__ssize_t + + t__io_wr™e_â + (* + t__cook› +, + t__cÚ¡ + * + t__buf +, + +375 + tsize_t + + t__n +); + +383  + t__io_£ek_â + (* + t__cook› +, + t_IO_off64_t + * + t__pos +,  + t__w +); + +386  + t__io_þo£_â + (* + t__cook› +); + +389 #ifdeà +_GNU_SOURCE + + +391  +__io_»ad_â + + tcook›_»ad_funùiÚ_t +; + +392  +__io_wr™e_â + + tcook›_wr™e_funùiÚ_t +; + +393  +__io_£ek_â + + tcook›_£ek_funùiÚ_t +; + +394  +__io_þo£_â + + tcook›_þo£_funùiÚ_t +; + +399 +__io_»ad_â + * + m»ad +; + +400 +__io_wr™e_â + * + mwr™e +; + +401 +__io_£ek_â + * + m£ek +; + +402 +__io_þo£_â + * + mþo£ +; + +403 } + t_IO_cook›_io_funùiÚs_t +; + +404  +_IO_cook›_io_funùiÚs_t + + tcook›_io_funùiÚs_t +; + +406  + g_IO_cook›_fže +; + +409  +_IO_cook›_š™ + ( +_IO_cook›_fže + * +__cfže +,  +__»ad_wr™e +, + +410 * +__cook› +, +_IO_cook›_io_funùiÚs_t + +__âs +); + +414 #ifdeà +__ýlu¥lus + + +418  +__und”æow + ( +_IO_FILE + *); + +419  +__uæow + ( +_IO_FILE + *); + +420  +__ov”æow + ( +_IO_FILE + *, ); + +421 #ià +defšed + +_LIBC + || defšed +_GLIBCPP_USE_WCHAR_T + + +422 +_IO_wšt_t + +__wund”æow + ( +_IO_FILE + *); + +423 +_IO_wšt_t + +__wuæow + ( +_IO_FILE + *); + +424 +_IO_wšt_t + +__wov”æow + ( +_IO_FILE + *, _IO_wint_t); + +427 #ià +__GNUC__ + >= 3 + +428  + #_IO_BE +( +ex´ +, +»s +è + `__bužtš_ex³ù + (Óx´),„es) + + ) + +430  + #_IO_BE +( +ex´ +, +»s +èÓx´) + + ) + +433  + #_IO_g‘c_uÆocked +( +_å +) \ + +434 ( + `_IO_BE + (( +_å +)-> +_IO_»ad_±r + >ð(_å)-> +_IO_»ad_’d +, 0) \ + +435 ? + `__uæow + ( +_å +è: *(*è(_å)-> +_IO_»ad_±r +++) + + ) + +436  + #_IO_³ekc_uÆocked +( +_å +) \ + +437 ( + `_IO_BE + (( +_å +)-> +_IO_»ad_±r + >ð(_å)-> +_IO_»ad_’d +, 0) \ + +438 && + `__und”æow + ( +_å +è=ð +EOF + ? EOF \ + +439 : *(*è( +_å +)-> +_IO_»ad_±r +) + + ) + +440  + #_IO_putc_uÆocked +( +_ch +, +_å +) \ + +441 ( + `_IO_BE + (( +_å +)-> +_IO_wr™e_±r + >ð(_å)-> +_IO_wr™e_’d +, 0) \ + +442 ? + `__ov”æow + ( +_å +, (è( +_ch +)) \ + +443 : (è(*( +_å +)-> +_IO_wr™e_±r +++ = ( +_ch +))) + + ) + +445 #ià +defšed + +_LIBC + || defšed +_GLIBCPP_USE_WCHAR_T + + +446  + #_IO_g‘wc_uÆocked +( +_å +) \ + +447 ( + `_IO_BE + (( +_å +)-> +_wide_d©a + =ð +NULL + \ + +448 || (( +_å +)-> +_wide_d©a +-> +_IO_»ad_±r + \ + +449 >ð( +_å +)-> +_wide_d©a +-> +_IO_»ad_’d +), 0) \ + +450 ? + `__wuæow + ( +_å +è: ( +_IO_wšt_t +è*(_å)-> +_wide_d©a +-> +_IO_»ad_±r +++) + + ) + +451  + #_IO_putwc_uÆocked +( +_wch +, +_å +) \ + +452 ( + `_IO_BE + (( +_å +)-> +_wide_d©a + =ð +NULL + \ + +453 || (( +_å +)-> +_wide_d©a +-> +_IO_wr™e_±r + \ + +454 >ð( +_å +)-> +_wide_d©a +-> +_IO_wr™e_’d +), 0) \ + +455 ? + `__wov”æow + ( +_å +, +_wch +) \ + +456 : ( +_IO_wšt_t +è(*( +_å +)-> +_wide_d©a +-> +_IO_wr™e_±r +++ = ( +_wch +))) + + ) + +459  + #_IO_ãof_uÆocked +( +__å +è(((__å)-> +_æags + & +_IO_EOF_SEEN +è!ð0) + + ) + +460  + #_IO_ã¼Ü_uÆocked +( +__å +è(((__å)-> +_æags + & +_IO_ERR_SEEN +è!ð0) + + ) + +462  +_IO_g‘c + ( +_IO_FILE + * +__å +); + +463  +_IO_putc + ( +__c +, +_IO_FILE + * +__å +); + +464  +_IO_ãof + ( +_IO_FILE + * +__å +è +__THROW +; + +465  +_IO_ã¼Ü + ( +_IO_FILE + * +__å +è +__THROW +; + +467  +_IO_³ekc_locked + ( +_IO_FILE + * +__å +); + +470  + #_IO_PENDING_OUTPUT_COUNT +( +_å +) \ + +471 (( +_å +)-> +_IO_wr™e_±r + - (_å)-> +_IO_wr™e_ba£ +) + + ) + +473  +_IO_æockfže + ( +_IO_FILE + *è +__THROW +; + +474  +_IO_fuÆockfže + ( +_IO_FILE + *è +__THROW +; + +475  +_IO_árylockfže + ( +_IO_FILE + *è +__THROW +; + +477 #ifdeà +_IO_MTSAFE_IO + + +478  + #_IO_³ekc +( +_å +è + `_IO_³ekc_locked + (_å) + + ) + +479  + #_IO_æockfže +( +_å +) \ + +480 ià((( +_å +)-> +_æags + & +_IO_USER_LOCK +è=ð0è + `_IO_æockfže + (_å) + + ) + +481  + #_IO_fuÆockfže +( +_å +) \ + +482 ià((( +_å +)-> +_æags + & +_IO_USER_LOCK +è=ð0è + `_IO_fuÆockfže + (_å) + + ) + +484  + #_IO_³ekc +( +_å +è + `_IO_³ekc_uÆocked + (_å) + + ) + +485  + #_IO_æockfže +( +_å +è + + ) + +486  + #_IO_fuÆockfže +( +_å +è + + ) + +487  + #_IO_árylockfže +( +_å +è + + ) + +488  + #_IO_þ—nup_»giÚ_¡¬t +( +_fù +, +_å +è + + ) + +489  + #_IO_þ—nup_»giÚ_’d +( +_Do™ +è + + ) + +492  +_IO_vfsÿnf + ( +_IO_FILE + * +__»¡riù +, const * __restrict, + +493 +_IO_va_li¡ +, * +__»¡riù +); + +494  +_IO_vårštf + ( +_IO_FILE + * +__»¡riù +, const *__restrict, + +495 +_IO_va_li¡ +); + +496 +_IO_ssize_t + +_IO_·dn + ( +_IO_FILE + *, , _IO_ssize_t); + +497 +_IO_size_t + +_IO_sg‘n + ( +_IO_FILE + *, *, _IO_size_t); + +499 +_IO_off64_t + +_IO_£ekoff + ( +_IO_FILE + *, _IO_off64_t, , ); + +500 +_IO_off64_t + +_IO_£ekpos + ( +_IO_FILE + *, _IO_off64_t, ); + +502  +_IO_ä“_backup_¬— + ( +_IO_FILE + *è +__THROW +; + +504 #ià +defšed + +_LIBC + || defšed +_GLIBCPP_USE_WCHAR_T + + +505 +_IO_wšt_t + +_IO_g‘wc + ( +_IO_FILE + * +__å +); + +506 +_IO_wšt_t + +_IO_putwc + ( +wch¬_t + +__wc +, +_IO_FILE + * +__å +); + +507  +_IO_fwide + ( +_IO_FILE + * +__å +,  +__mode +è +__THROW +; + +508 #ià +__GNUC__ + >= 2 + +511 #ià +defšed + +_LIBC + && defšed +SHARED + + +512  + ~ + +513 #ià +SHLIB_COMPAT + ( +libc +, +GLIBC_2_0 +, +GLIBC_2_1 +) + +514  + #_IO_fwide_maybe_šcom·tibË + \ + +515 ( + `__bužtš_ex³ù + (& +_IO_¡dš_u£d + =ð +NULL +, 0)) + + ) + +516 cÚ¡  +_IO_¡dš_u£d +; + +517 +w—k_ex‹º + ( +_IO_¡dš_u£d +); + +520 #iâdeà +_IO_fwide_maybe_šcom·tibË + + +521  + #_IO_fwide_maybe_šcom·tibË + (0) + + ) + +525  + #_IO_fwide +( +__å +, +__mode +) \ + +526 ({  +__»suÉ + = ( +__mode +); \ + +527 ià( +__»suÉ + < 0 && ! +_IO_fwide_maybe_šcom·tibË +) \ + +529 ià(( +__å +)-> +_mode + == 0) \ + +531 ( +__å +)-> +_mode + = -1; \ + +532 +__»suÉ + = ( +__å +)-> +_mode +; \ + +534 ià( + `__bužtš_cÚ¡ªt_p + ( +__mode +) && (__mode) == 0) \ + +535 +__»suÉ + = +_IO_fwide_maybe_šcom·tibË + ? -1 : ( +__å +)-> +_mode +; \ + +537 +__»suÉ + = + `_IO_fwide + ( +__å +, __result); \ + +538 +__»suÉ +; }) + + ) + +541  +_IO_vfwsÿnf + ( +_IO_FILE + * +__»¡riù +, cÚ¡ +wch¬_t + * __restrict, + +542 +_IO_va_li¡ +, * +__»¡riù +); + +543  +_IO_vfw´štf + ( +_IO_FILE + * +__»¡riù +, cÚ¡ +wch¬_t + *__restrict, + +544 +_IO_va_li¡ +); + +545 +_IO_ssize_t + +_IO_w·dn + ( +_IO_FILE + *, +wšt_t +, _IO_ssize_t); + +546  +_IO_ä“_wbackup_¬— + ( +_IO_FILE + *è +__THROW +; + +549 #ifdeà +__LDBL_COMPAT + + +550  + ~ + +553 #ifdeà +__ýlu¥lus + + + @/usr/include/_G_config.h + +4 #iâdeà +_G_cÚfig_h + + +5  + #_G_cÚfig_h + 1 + + ) + +9  + ~ + +10  + #__Ãed_size_t + + + ) + +11 #ià +defšed + +_LIBC + || defšed +_GLIBCPP_USE_WCHAR_T + + +12  + #__Ãed_wch¬_t + + + ) + +14  + #__Ãed_NULL + + + ) + +15  + ~<¡ddef.h +> + +16  + #__Ãed_mb¡©e_t + + + ) + +17 #ià +defšed + +_LIBC + || defšed +_GLIBCPP_USE_WCHAR_T + + +18  + #__Ãed_wšt_t + + + ) + +20  + ~ + +21  + #_G_size_t + +size_t + + + ) + +24 +__off_t + + m__pos +; + +25 +__mb¡©e_t + + m__¡©e +; + +26 } + t_G_åos_t +; + +29 +__off64_t + + m__pos +; + +30 +__mb¡©e_t + + m__¡©e +; + +31 } + t_G_åos64_t +; + +32  + #_G_ssize_t + +__ssize_t + + + ) + +33  + #_G_off_t + +__off_t + + + ) + +34  + #_G_off64_t + +__off64_t + + + ) + +35  + #_G_pid_t + +__pid_t + + + ) + +36  + #_G_uid_t + +__uid_t + + + ) + +37  + #_G_wch¬_t + +wch¬_t + + + ) + +38  + #_G_wšt_t + +wšt_t + + + ) + +39  + #_G_¡©64 + +¡©64 + + + ) + +40 #ià +defšed + +_LIBC + || defšed +_GLIBCPP_USE_WCHAR_T + + +41  + ~ + +44  +__gcÚv_šfo + + m__cd +; + +47  +__gcÚv_šfo + + m__cd +; + +48  +__gcÚv_¡•_d©a + + m__d©a +; + +49 } + m__combšed +; + +50 } + t_G_icÚv_t +; + +53  + t_G_št16_t + + t__©Œibu‹__ + (( + t__mode__ + ( + t__HI__ +))); + +54  + t_G_št32_t + + t__©Œibu‹__ + (( + t__mode__ + ( + t__SI__ +))); + +55  + t_G_ušt16_t + + t__©Œibu‹__ + (( + t__mode__ + ( + t__HI__ +))); + +56  + t_G_ušt32_t + + t__©Œibu‹__ + (( + t__mode__ + ( + t__SI__ +))); + +58  + #_G_HAVE_BOOL + 1 + + ) + +62  + #_G_HAVE_ATEXIT + 1 + + ) + +63  + #_G_HAVE_SYS_CDEFS + 1 + + ) + +64  + #_G_HAVE_SYS_WAIT + 1 + + ) + +65  + #_G_NEED_STDARG_H + 1 + + ) + +66  + #_G_va_li¡ + +__gnuc_va_li¡ + + + ) + +68  + #_G_HAVE_PRINTF_FP + 1 + + ) + +69  + #_G_HAVE_MMAP + 1 + + ) + +70  + #_G_HAVE_MREMAP + 1 + + ) + +71  + #_G_HAVE_LONG_DOUBLE_IO + 1 + + ) + +72  + #_G_HAVE_IO_FILE_OPEN + 1 + + ) + +73  + #_G_HAVE_IO_GETLINE_INFO + 1 + + ) + +75  + #_G_IO_IO_FILE_VERSION + 0x20001 + + ) + +77  + #_G_OPEN64 + +__ݒ64 + + + ) + +78  + #_G_LSEEK64 + +__l£ek64 + + + ) + +79  + #_G_MMAP64 + +__mm­64 + + + ) + +80  + #_G_FSTAT64 +( +fd +, +buf +è + `__fx¡©64 + ( +_STAT_VER +, fd, buf) + + ) + +83  + #_G_HAVE_ST_BLKSIZE + + `defšed + ( +_STATBUF_ST_BLKSIZE +) + + ) + +85  + #_G_BUFSIZ + 8192 + + ) + +88  + #_G_NAMES_HAVE_UNDERSCORE + 0 + + ) + +89  + #_G_VTABLE_LABEL_HAS_LENGTH + 1 + + ) + +90  + #_G_USING_THUNKS + 1 + + ) + +91  + #_G_VTABLE_LABEL_PREFIX + "__vt_" + + ) + +92  + #_G_VTABLE_LABEL_PREFIX_ID + +__vt_ + + + ) + +95 #ià +defšed + +__ýlu¥lus + || defšed +__STDC__ + + +96  + #_G_ARGS +( +ARGLIST +è + ) +ARGLIST + +98  + #_G_ARGS +( +ARGLIST +è() + + ) + + @/usr/include/ctype.h + +24 #iâdef +_CTYPE_H + + +25  + #_CTYPE_H + 1 + + ) + +27  + ~<ã©u»s.h +> + +28  + ~ + +30 + g__BEGIN_DECLS + + +32 #iâdeà +_ISb™ + + +41  + ~<’dŸn.h +> + +42 #ià +__BYTE_ORDER + =ð +__BIG_ENDIAN + + +43  + #_ISb™ +( +b™ +è(1 << (b™)) + + ) + +45  + #_ISb™ +( +b™ +è((b™è< 8 ? ((1 << (b™)è<< 8è: ((1 << (b™)è>> 8)) + + ) + +50 + m_ISuµ” + = +_ISb™ + (0), + +51 + m_ISlow” + = +_ISb™ + (1), + +52 + m_IS®pha + = +_ISb™ + (2), + +53 + m_ISdig™ + = +_ISb™ + (3), + +54 + m_ISxdig™ + = +_ISb™ + (4), + +55 + m_IS¥aû + = +_ISb™ + (5), + +56 + m_IS´št + = +_ISb™ + (6), + +57 + m_ISg¿ph + = +_ISb™ + (7), + +58 + m_ISbÏnk + = +_ISb™ + (8), + +59 + m_ISúŒl + = +_ISb™ + (9), + +60 + m_ISpunù + = +_ISb™ + (10), + +61 + m_IS®num + = +_ISb™ + (11) + +81 +__cÚ¡ + ** + $__ùy³_b_loc + () + +82 +__THROW + + `__©Œibu‹__ + (( +__cÚ¡ +)); + +83 +__cÚ¡ + +__št32_t + ** + $__ùy³_tÞow”_loc + () + +84 +__THROW + + `__©Œibu‹__ + (( +__cÚ¡ +)); + +85 +__cÚ¡ + +__št32_t + ** + $__ùy³_touµ”_loc + () + +86 +__THROW + + `__©Œibu‹__ + (( +__cÚ¡ +)); + +89 #iâdeà +__ýlu¥lus + + +90  + #__isùy³ +( +c +, +ty³ +) \ + +91 ((* + `__ùy³_b_loc + ())[(è( +c +)] & (è +ty³ +) + + ) + +92 #–ià +defšed + +__USE_EXTERN_INLINES + + +93  + #__isùy³_f +( +ty³ +) \ + +94 +__ex‹º_šlše + \ + +95 +is +## + `ty³ + ( +__c +è +__THROW + \ + +97  (* + `__ùy³_b_loc + ())[(è( +__c +)] & (è +_IS +## +ty³ +; \ + +98 + } + + ) +} + +101  + #__i§scii +( +c +è(((cè& ~0x7fè=ð0è + + ) + +102  + #__tßscii +( +c +è((cè& 0x7fè + + ) + +104  + #__exùy³ +( +Çme +è  + `Çme + (è +__THROW + + + ) + +106 +__BEGIN_NAMESPACE_STD + + +112 +__exùy³ + ( +i§Êum +); + +113 +__exùy³ + ( +i§Íha +); + +114 +__exùy³ + ( +isúŒl +); + +115 +__exùy³ + ( +isdig™ +); + +116 +__exùy³ + ( +i¦ow” +); + +117 +__exùy³ + ( +isg¿ph +); + +118 +__exùy³ + ( +i¥ršt +); + +119 +__exùy³ + ( +i¥unù +); + +120 +__exùy³ + ( +is¥aû +); + +121 +__exùy³ + ( +isuµ” +); + +122 +__exùy³ + ( +isxdig™ +); + +126  + $tÞow” + ( +__c +è +__THROW +; + +129  + $touµ” + ( +__c +è +__THROW +; + +131 +__END_NAMESPACE_STD + + +135 #ifdef +__USE_ISOC99 + + +136 +__BEGIN_NAMESPACE_C99 + + +138 + `__exùy³ + ( +isbÏnk +); + +140 +__END_NAMESPACE_C99 + + +143 #ifdeà +__USE_GNU + + +145  + $isùy³ + ( +__c +,  +__mask +è +__THROW +; + +148 #ià +defšed + +__USE_SVID + || defšed +__USE_MISC + || defšed +__USE_XOPEN + + +152  + $i§scii + ( +__c +è +__THROW +; + +156  + $tßscii + ( +__c +è +__THROW +; + +160 + `__exùy³ + ( +_touµ” +); + +161 + `__exùy³ + ( +_tÞow” +); + +165  + #__tobody +( +c +, +f +, +a +, +¬gs +) \ + +166 ( +__ex‹nsiÚ__ + \ + +167 ({  +__»s +; \ + +168 ià( ( +c +) > 1) \ + +170 ià( + `__bužtš_cÚ¡ªt_p + ( +c +)) \ + +172  +__c + = ( +c +); \ + +173 +__»s + = +__c + < -128 || __ø> 255 ? __ø: ( +a +)[__c]; \ + +176 +__»s + = +f + +¬gs +; \ + +179 +__»s + = ( +a +)[(è( +c +)]; \ + +180 +__»s +; + } +})) + + ) + +182 #ià! +defšed + +__NO_CTYPE + + +183 #ifdeà +__isùy³_f + + +184 + $__isùy³_f + ( +®num +) + +185 + $__isùy³_f + ( +®pha +) + +186 + $__isùy³_f + ( +úŒl +) + +187 + $__isùy³_f + ( +dig™ +) + +188 + $__isùy³_f + ( +low” +) + +189 + $__isùy³_f + ( +g¿ph +) + +190 + $__isùy³_f + ( +´št +) + +191 + $__isùy³_f + ( +punù +) + +192 + $__isùy³_f + ( +¥aû +) + +193 + $__isùy³_f + ( +uµ” +) + +194 + $__isùy³_f + ( +xdig™ +) + +195 #ifdeà +__USE_ISOC99 + + +196 + $__isùy³_f + ( +bÏnk +) + +198 #–ià +defšed + +__isùy³ + + +199  + #i§Êum +( +c +è + `__isùy³ +((c), +_IS®num +) + + ) + +200  + #i§Íha +( +c +è + `__isùy³ +((c), +_IS®pha +) + + ) + +201  + #isúŒl +( +c +è + `__isùy³ +((c), +_ISúŒl +) + + ) + +202  + #isdig™ +( +c +è + `__isùy³ +((c), +_ISdig™ +) + + ) + +203  + #i¦ow” +( +c +è + `__isùy³ +((c), +_ISlow” +) + + ) + +204  + #isg¿ph +( +c +è + `__isùy³ +((c), +_ISg¿ph +) + + ) + +205  + #i¥ršt +( +c +è + `__isùy³ +((c), +_IS´št +) + + ) + +206  + #i¥unù +( +c +è + `__isùy³ +((c), +_ISpunù +) + + ) + +207  + #is¥aû +( +c +è + `__isùy³ +((c), +_IS¥aû +) + + ) + +208  + #isuµ” +( +c +è + `__isùy³ +((c), +_ISuµ” +) + + ) + +209  + #isxdig™ +( +c +è + `__isùy³ +((c), +_ISxdig™ +) + + ) + +210 #ifdeà +__USE_ISOC99 + + +211  + #isbÏnk +( +c +è + `__isùy³ +((c), +_ISbÏnk +) + + ) + +215 #ifdeà +__USE_EXTERN_INLINES + + +216 +__ex‹º_šlše +  + +217 + `__NTH + ( + $tÞow” + ( +__c +)) + +219  +__c + >ð-128 && __ø< 256 ? (* + `__ùy³_tÞow”_loc + ())[__c] : __c; + +220 + } +} + +222 +__ex‹º_šlše +  + +223 +__NTH + ( + $touµ” + ( +__c +)) + +225  +__c + >ð-128 && __ø< 256 ? (* + `__ùy³_touµ”_loc + ())[__c] : __c; + +226 + } +} + +229 #ià +__GNUC__ + >ð2 && +defšed + +__OPTIMIZE__ + && !defšed +__ýlu¥lus + + +230  + #tÞow” +( +c +è + `__tobody + (c, +tÞow” +, * + `__ùy³_tÞow”_loc + (), (c)) + + ) + +231  + #touµ” +( +c +è + `__tobody + (c, +touµ” +, * + `__ùy³_touµ”_loc + (), (c)) + + ) + +234 #ià +defšed + +__USE_SVID + || defšed +__USE_MISC + || defšed +__USE_XOPEN + + +235  + #i§scii +( +c +è + `__i§scii + (c) + + ) + +236  + #tßscii +( +c +è + `__tßscii + (c) + + ) + +238  + #_tÞow” +( +c +è((è(* + `__ùy³_tÞow”_loc + ())[(è(c)]) + + ) + +239  + #_touµ” +( +c +è((è(* + `__ùy³_touµ”_loc + ())[(è(c)]) + + ) + +245 #ifdeà +__USE_XOPEN2K8 + + +259  + ~ + +263  + #__isùy³_l +( +c +, +ty³ +, +loÿË +) \ + +264 (( +loÿË +)-> +__ùy³_b +[(è( +c +)] & (è +ty³ +) + + ) + +266  + #__exùy³_l +( +Çme +) \ + +267  + `Çme + (, +__loÿË_t +è +__THROW + + + ) + +273 +__exùy³_l + ( +i§Êum_l +); + +274 +__exùy³_l + ( +i§Íha_l +); + +275 +__exùy³_l + ( +isúŒl_l +); + +276 +__exùy³_l + ( +isdig™_l +); + +277 +__exùy³_l + ( +i¦ow”_l +); + +278 +__exùy³_l + ( +isg¿ph_l +); + +279 +__exùy³_l + ( +i¥ršt_l +); + +280 +__exùy³_l + ( +i¥unù_l +); + +281 +__exùy³_l + ( +is¥aû_l +); + +282 +__exùy³_l + ( +isuµ”_l +); + +283 +__exùy³_l + ( +isxdig™_l +); + +285 +__exùy³_l + ( +isbÏnk_l +); + +289  + $__tÞow”_l + ( +__c +, +__loÿË_t + +__l +è +__THROW +; + +290  + $tÞow”_l + ( +__c +, +__loÿË_t + +__l +è +__THROW +; + +293  + $__touµ”_l + ( +__c +, +__loÿË_t + +__l +è +__THROW +; + +294  + $touµ”_l + ( +__c +, +__loÿË_t + +__l +è +__THROW +; + +296 #ià +__GNUC__ + >ð2 && +defšed + +__OPTIMIZE__ + && !defšed +__ýlu¥lus + + +297  + #__tÞow”_l +( +c +, +loÿË +) \ + +298 + `__tobody + ( +c +, +__tÞow”_l +, ( +loÿË +)-> +__ùy³_tÞow” +, (c,†oÿË)) + + ) + +299  + #__touµ”_l +( +c +, +loÿË +) \ + +300 + `__tobody + ( +c +, +__touµ”_l +, ( +loÿË +)-> +__ùy³_touµ” +, (c,†oÿË)) + + ) + +301  + #tÞow”_l +( +c +, +loÿË +è + `__tÞow”_l + ((c), (loÿË)) + + ) + +302  + #touµ”_l +( +c +, +loÿË +è + `__touµ”_l + ((c), (loÿË)) + + ) + +306 #iâdeà +__NO_CTYPE + + +307  + #__i§Êum_l +( +c +, +l +è + `__isùy³_l +((c), +_IS®num +, (l)) + + ) + +308  + #__i§Íha_l +( +c +, +l +è + `__isùy³_l +((c), +_IS®pha +, (l)) + + ) + +309  + #__isúŒl_l +( +c +, +l +è + `__isùy³_l +((c), +_ISúŒl +, (l)) + + ) + +310  + #__isdig™_l +( +c +, +l +è + `__isùy³_l +((c), +_ISdig™ +, (l)) + + ) + +311  + #__i¦ow”_l +( +c +, +l +è + `__isùy³_l +((c), +_ISlow” +, (l)) + + ) + +312  + #__isg¿ph_l +( +c +, +l +è + `__isùy³_l +((c), +_ISg¿ph +, (l)) + + ) + +313  + #__i¥ršt_l +( +c +, +l +è + `__isùy³_l +((c), +_IS´št +, (l)) + + ) + +314  + #__i¥unù_l +( +c +, +l +è + `__isùy³_l +((c), +_ISpunù +, (l)) + + ) + +315  + #__is¥aû_l +( +c +, +l +è + `__isùy³_l +((c), +_IS¥aû +, (l)) + + ) + +316  + #__isuµ”_l +( +c +, +l +è + `__isùy³_l +((c), +_ISuµ” +, (l)) + + ) + +317  + #__isxdig™_l +( +c +, +l +è + `__isùy³_l +((c), +_ISxdig™ +, (l)) + + ) + +319  + #__isbÏnk_l +( +c +, +l +è + `__isùy³_l +((c), +_ISbÏnk +, (l)) + + ) + +321 #ià +defšed + +__USE_SVID + || defšed +__USE_MISC + + +322  + #__i§scii_l +( +c +, +l +è(Ö), + `__i§scii + (c)) + + ) + +323  + #__tßscii_l +( +c +, +l +è(Ö), + `__tßscii + (c)) + + ) + +326  + #i§Êum_l +( +c +, +l +è + `__i§Êum_l + ((c), (l)) + + ) + +327  + #i§Íha_l +( +c +, +l +è + `__i§Íha_l + ((c), (l)) + + ) + +328  + #isúŒl_l +( +c +, +l +è + `__isúŒl_l + ((c), (l)) + + ) + +329  + #isdig™_l +( +c +, +l +è + `__isdig™_l + ((c), (l)) + + ) + +330  + #i¦ow”_l +( +c +, +l +è + `__i¦ow”_l + ((c), (l)) + + ) + +331  + #isg¿ph_l +( +c +, +l +è + `__isg¿ph_l + ((c), (l)) + + ) + +332  + #i¥ršt_l +( +c +, +l +è + `__i¥ršt_l + ((c), (l)) + + ) + +333  + #i¥unù_l +( +c +, +l +è + `__i¥unù_l + ((c), (l)) + + ) + +334  + #is¥aû_l +( +c +, +l +è + `__is¥aû_l + ((c), (l)) + + ) + +335  + #isuµ”_l +( +c +, +l +è + `__isuµ”_l + ((c), (l)) + + ) + +336  + #isxdig™_l +( +c +, +l +è + `__isxdig™_l + ((c), (l)) + + ) + +338  + #isbÏnk_l +( +c +, +l +è + `__isbÏnk_l + ((c), (l)) + + ) + +340 #ià +defšed + +__USE_SVID + || defšed +__USE_MISC + + +341  + #i§scii_l +( +c +, +l +è + `__i§scii_l + ((c), (l)) + + ) + +342  + #tßscii_l +( +c +, +l +è + `__tßscii_l + ((c), (l)) + + ) + +349 +__END_DECLS + + + @/usr/include/endian.h + +19 #iâdef +_ENDIAN_H + + +20  + #_ENDIAN_H + 1 + + ) + +22  + ~<ã©u»s.h +> + +32  + #__LITTLE_ENDIAN + 1234 + + ) + +33  + #__BIG_ENDIAN + 4321 + + ) + +34  + #__PDP_ENDIAN + 3412 + + ) + +37  + ~ + +41 #iâdeà +__FLOAT_WORD_ORDER + + +42  + #__FLOAT_WORD_ORDER + +__BYTE_ORDER + + + ) + +45 #ifdef +__USE_BSD + + +46  + #LITTLE_ENDIAN + +__LITTLE_ENDIAN + + + ) + +47  + #BIG_ENDIAN + +__BIG_ENDIAN + + + ) + +48  + #PDP_ENDIAN + +__PDP_ENDIAN + + + ) + +49  + #BYTE_ORDER + +__BYTE_ORDER + + + ) + +52 #ià +__BYTE_ORDER + =ð +__LITTLE_ENDIAN + + +53  + #__LONG_LONG_PAIR +( +HI +, +LO +èLO, + ) +HI + +54 #–ià +__BYTE_ORDER + =ð +__BIG_ENDIAN + + +55  + #__LONG_LONG_PAIR +( +HI +, +LO +èHI, + ) +LO + +59 #ifdeà +__USE_BSD + + +61  + ~ + +63 #ià +__BYTE_ORDER + =ð +__LITTLE_ENDIAN + + +64  + #htobe16 +( +x +è + `__bsw­_16 + (x) + + ) + +65  + #htÞe16 +( +x +è(x) + + ) + +66  + #be16toh +( +x +è + `__bsw­_16 + (x) + + ) + +67  + #Ë16toh +( +x +è(x) + + ) + +69  + #htobe32 +( +x +è + `__bsw­_32 + (x) + + ) + +70  + #htÞe32 +( +x +è(x) + + ) + +71  + #be32toh +( +x +è + `__bsw­_32 + (x) + + ) + +72  + #Ë32toh +( +x +è(x) + + ) + +74  + #htobe64 +( +x +è + `__bsw­_64 + (x) + + ) + +75  + #htÞe64 +( +x +è(x) + + ) + +76  + #be64toh +( +x +è + `__bsw­_64 + (x) + + ) + +77  + #Ë64toh +( +x +è(x) + + ) + +79  + #htobe16 +( +x +è(x) + + ) + +80  + #htÞe16 +( +x +è + `__bsw­_16 + (x) + + ) + +81  + #be16toh +( +x +è(x) + + ) + +82  + #Ë16toh +( +x +è + `__bsw­_16 + (x) + + ) + +84  + #htobe32 +( +x +è(x) + + ) + +85  + #htÞe32 +( +x +è + `__bsw­_32 + (x) + + ) + +86  + #be32toh +( +x +è(x) + + ) + +87  + #Ë32toh +( +x +è + `__bsw­_32 + (x) + + ) + +89  + #htobe64 +( +x +è(x) + + ) + +90  + #htÞe64 +( +x +è + `__bsw­_64 + (x) + + ) + +91  + #be64toh +( +x +è(x) + + ) + +92  + #Ë64toh +( +x +è + `__bsw­_64 + (x) + + ) + + @/usr/include/gconv.h + +23 #iâdeà +_GCONV_H + + +24  + #_GCONV_H + 1 + + ) + +26  + ~<ã©u»s.h +> + +27  + #__Ãed_mb¡©e_t + + + ) + +28  + #__Ãed_wšt_t + + + ) + +29  + ~ + +30  + #__Ãed_size_t + + + ) + +31  + #__Ãed_wch¬_t + + + ) + +32  + ~<¡ddef.h +> + +35  + #__UNKNOWN_10646_CHAR + (( +wch¬_t +è0xfffd) + + ) + +40 + m__GCONV_OK + = 0, + +41 + m__GCONV_NOCONV +, + +42 + m__GCONV_NODB +, + +43 + m__GCONV_NOMEM +, + +45 + m__GCONV_EMPTY_INPUT +, + +46 + m__GCONV_FULL_OUTPUT +, + +47 + m__GCONV_ILLEGAL_INPUT +, + +48 + m__GCONV_INCOMPLETE_INPUT +, + +50 + m__GCONV_ILLEGAL_DESCRIPTOR +, + +51 + m__GCONV_INTERNAL_ERROR + + +58 + m__GCONV_IS_LAST + = 0x0001, + +59 + m__GCONV_IGNORE_ERRORS + = 0x0002, + +60 + m__GCONV_SWAP + = 0x0004 + +65  + g__gcÚv_¡• +; + +66  + g__gcÚv_¡•_d©a +; + +67  + g__gcÚv_lßded_objeù +; + +68  + g__gcÚv_Œªs_d©a +; + +72 (* + t__gcÚv_fù +è( + t__gcÚv_¡• + *,  + t__gcÚv_¡•_d©a + *, + +73 + t__cÚ¡ + **, __const *, + +74 **, + tsize_t + *, , ); + +77  + $wšt_t + (* + t__gcÚv_btowc_fù +è( + t__gcÚv_¡• + *, ); + +80 (* + t__gcÚv_š™_fù +è( + t__gcÚv_¡• + *); + +81 (* + t__gcÚv_’d_fù +è( + t__gcÚv_¡• + *); + +85 (* + t__gcÚv_Œªs_fù +è( + t__gcÚv_¡• + *, + +86  + t__gcÚv_¡•_d©a + *, *, + +87 + t__cÚ¡ + *, + +88 + t__cÚ¡ + **, + +89 + t__cÚ¡ + *, **, + +90 + tsize_t + *); + +93 (* + t__gcÚv_Œªs_cڋxt_fù +è(*, + t__cÚ¡ + *, + +94 + t__cÚ¡ + *, + +98 (* + t__gcÚv_Œªs_qu”y_fù +è( + t__cÚ¡ + *, __const ***, + +99 + tsize_t + *); + +102 (* + t__gcÚv_Œªs_š™_fù +) (**, const *); + +103 (* + t__gcÚv_Œªs_’d_fù +) (*); + +105  + s__gcÚv_Œªs_d©a + + +108 +__gcÚv_Œªs_fù + +__Œªs_fù +; + +109 +__gcÚv_Œªs_cڋxt_fù + +__Œªs_cڋxt_fù +; + +110 +__gcÚv_Œªs_’d_fù + +__Œªs_’d_fù +; + +111 * +__d©a +; + +112  +__gcÚv_Œªs_d©a + * +__Ãxt +; + +117  + s__gcÚv_¡• + + +119  +__gcÚv_lßded_objeù + * +__shlib_hªdË +; + +120 +__cÚ¡ + * +__modÇme +; + +122  +__couÁ” +; + +124 * +__äom_Çme +; + +125 * +__to_Çme +; + +127 +__gcÚv_fù + +__fù +; + +128 +__gcÚv_btowc_fù + +__btowc_fù +; + +129 +__gcÚv_š™_fù + +__š™_fù +; + +130 +__gcÚv_’d_fù + +__’d_fù +; + +134  +__mš_Ãeded_äom +; + +135  +__max_Ãeded_äom +; + +136  +__mš_Ãeded_to +; + +137  +__max_Ãeded_to +; + +140  +__¡©eful +; + +142 * +__d©a +; + +147  + s__gcÚv_¡•_d©a + + +149 * +__outbuf +; + +150 * +__outbuãnd +; + +154  +__æags +; + +158  +__švoÿtiÚ_couÁ” +; + +162  +__š‹º®_u£ +; + +164 +__mb¡©e_t + * +__¡©• +; + +165 +__mb¡©e_t + +__¡©e +; + +169  +__gcÚv_Œªs_d©a + * +__Œªs +; + +174  + s__gcÚv_šfo + + +176 +size_t + +__n¡•s +; + +177  +__gcÚv_¡• + * +__¡•s +; + +178 +__ex‹nsiÚ__ +  +__gcÚv_¡•_d©a + +__d©a + +__æex¬r +; + +179 } * + t__gcÚv_t +; + + @/usr/include/wchar.h + +24 #iâdeà +_WCHAR_H + + +26 #ià! +defšed + +__Ãed_mb¡©e_t + && !defšed +__Ãed_wšt_t + + +27  + #_WCHAR_H + 1 + + ) + +28  + ~<ã©u»s.h +> + +31 #ifdeà +_WCHAR_H + + +33  + #__Ãed___FILE + + + ) + +34 #ià +defšed + +__USE_UNIX98 + || defšed +__USE_XOPEN2K + + +35  + #__Ãed_FILE + + + ) + +37  + ~<¡dio.h +> + +39  + #__Ãed___va_li¡ + + + ) + +40  + ~<¡d¬g.h +> + +42  + ~ + +45  + #__Ãed_size_t + + + ) + +46  + #__Ãed_wch¬_t + + + ) + +47  + #__Ãed_NULL + + + ) + +49 #ià +defšed + +_WCHAR_H + || defšed +__Ãed_wšt_t + || !defšed +__WINT_TYPE__ + + +50 #undeà +__Ãed_wšt_t + + +51  + #__Ãed_wšt_t + + + ) + +52  + ~<¡ddef.h +> + +56 #iâdeà +_WINT_T + + +61  + #_WINT_T + + + ) + +62  + twšt_t +; + +66 #ià +defšed + +__ýlu¥lus + && defšed +_GLIBCPP_USE_NAMESPACES + \ + +67 && +defšed + +__WINT_TYPE__ + + +68 +__BEGIN_NAMESPACE_STD + + +69  +__WINT_TYPE__ + + twšt_t +; + +70 + g__END_NAMESPACE_STD + + +75 #ià +defšed + +__ýlu¥lus + && +__GNUC_PREREQ + (4, 4) + +76  + #__CORRECT_ISO_CPP_WCHAR_H_PROTO + + + ) + +80 #ià( +defšed + +_WCHAR_H + || defšed +__Ãed_mb¡©e_t +è&& !defšed +__mb¡©e_t_defšed + + +81  + #__mb¡©e_t_defšed + 1 + + ) + +85  + m__couÁ +; + +88 #ifdeà +__WINT_TYPE__ + + +89 +__WINT_TYPE__ + + m__wch +; + +91 +wšt_t + + m__wch +; + +93  + m__wchb +[4]; + +94 } + m__v®ue +; + +95 } + t__mb¡©e_t +; + +97 #undeà +__Ãed_mb¡©e_t + + +102 #ifdeà +_WCHAR_H + + +104 +__BEGIN_NAMESPACE_C99 + + +106  +__mb¡©e_t + + tmb¡©e_t +; + +107 + g__END_NAMESPACE_C99 + + +108 #ifdeà +__USE_GNU + + +109 + $__USING_NAMESPACE_C99 +( +mb¡©e_t +) + +112 #iâdeà +WCHAR_MIN + + +114  + #WCHAR_MIN + +__WCHAR_MIN + + + ) + +115  + #WCHAR_MAX + +__WCHAR_MAX + + + ) + +118 #iâdeà +WEOF + + +119  + #WEOF + (0xffffffffu) + + ) + +124 #ià +defšed + +__USE_XOPEN + && !defšed +__USE_UNIX98 + + +125  + ~ + +129 +__BEGIN_DECLS + + +131 +__BEGIN_NAMESPACE_STD + + +134  +tm +; + +135 +__END_NAMESPACE_STD + + +139 + $__USING_NAMESPACE_STD +( +tm +) + +142 +__BEGIN_NAMESPACE_STD + + +144 +wch¬_t + * + $wcsýy + ( +wch¬_t + * +__»¡riù + +__de¡ +, + +145 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__¤c +è +__THROW +; + +147 +wch¬_t + * + $wc¢ýy + ( +wch¬_t + * +__»¡riù + +__de¡ +, + +148 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__¤c +, +size_t + +__n +) + +149 +__THROW +; + +152 +wch¬_t + * + $wcsÿt + ( +wch¬_t + * +__»¡riù + +__de¡ +, + +153 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__¤c +è +__THROW +; + +155 +wch¬_t + * + $wc¢ÿt + ( +wch¬_t + * +__»¡riù + +__de¡ +, + +156 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__¤c +, +size_t + +__n +) + +157 +__THROW +; + +160  + $wcscmp + ( +__cÚ¡ + +wch¬_t + * +__s1 +, __cÚ¡ wch¬_ˆ* +__s2 +) + +161 +__THROW + +__©Œibu‹_pu»__ +; + +163  + $wc¢cmp + ( +__cÚ¡ + +wch¬_t + * +__s1 +, __cÚ¡ wch¬_ˆ* +__s2 +, +size_t + +__n +) + +164 +__THROW + +__©Œibu‹_pu»__ +; + +165 +__END_NAMESPACE_STD + + +167 #ifdeà +__USE_XOPEN2K8 + + +169  + $wcsÿ£cmp + ( +__cÚ¡ + +wch¬_t + * +__s1 +, __cÚ¡ wch¬_ˆ* +__s2 +è +__THROW +; + +172  + $wc¢ÿ£cmp + ( +__cÚ¡ + +wch¬_t + * +__s1 +, __cÚ¡ wch¬_ˆ* +__s2 +, + +173 +size_t + +__n +è +__THROW +; + +177  + ~ + +179  + $wcsÿ£cmp_l + ( +__cÚ¡ + +wch¬_t + * +__s1 +, __cÚ¡ wch¬_ˆ* +__s2 +, + +180 +__loÿË_t + +__loc +è +__THROW +; + +182  + $wc¢ÿ£cmp_l + ( +__cÚ¡ + +wch¬_t + * +__s1 +, __cÚ¡ wch¬_ˆ* +__s2 +, + +183 +size_t + +__n +, +__loÿË_t + +__loc +è +__THROW +; + +186 +__BEGIN_NAMESPACE_STD + + +189  + $wcscÞl + ( +__cÚ¡ + +wch¬_t + * +__s1 +, __cÚ¡ wch¬_ˆ* +__s2 +è +__THROW +; + +193 +size_t + + $wcsxäm + ( +wch¬_t + * +__»¡riù + +__s1 +, + +194 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__s2 +, +size_t + +__n +è +__THROW +; + +195 +__END_NAMESPACE_STD + + +197 #ifdeà +__USE_XOPEN2K8 + + +203  + $wcscÞl_l + ( +__cÚ¡ + +wch¬_t + * +__s1 +, __cÚ¡ wch¬_ˆ* +__s2 +, + +204 +__loÿË_t + +__loc +è +__THROW +; + +209 +size_t + + $wcsxäm_l + ( +wch¬_t + * +__s1 +, +__cÚ¡ + wch¬_ˆ* +__s2 +, + +210 +size_t + +__n +, +__loÿË_t + +__loc +è +__THROW +; + +213 +wch¬_t + * + $wcsdup + ( +__cÚ¡ + +wch¬_t + * +__s +è +__THROW + +__©Œibu‹_m®loc__ +; + +216 +__BEGIN_NAMESPACE_STD + + +218 #ifdeà +__CORRECT_ISO_CPP_WCHAR_H_PROTO + + +219 "C++" +wch¬_t + * + $wcschr + ( +wch¬_t + * +__wcs +, wch¬_ˆ +__wc +) + +220 +__THROW + + `__asm + ("wcschr"è +__©Œibu‹_pu»__ +; + +221 "C++" +__cÚ¡ + +wch¬_t + * + $wcschr + ( +__cÚ¡ + +wch¬_t + * +__wcs +, wch¬_ˆ +__wc +) + +222 +__THROW + + `__asm + ("wcschr"è +__©Œibu‹_pu»__ +; + +224 +wch¬_t + * + $wcschr + ( +__cÚ¡ + +wch¬_t + * +__wcs +, wch¬_ˆ +__wc +) + +225 +__THROW + +__©Œibu‹_pu»__ +; + +228 #ifdeà +__CORRECT_ISO_CPP_WCHAR_H_PROTO + + +229 "C++" +wch¬_t + * + $wc¤chr + ( +wch¬_t + * +__wcs +, wch¬_ˆ +__wc +) + +230 +__THROW + + `__asm + ("wc¤chr"è +__©Œibu‹_pu»__ +; + +231 "C++" +__cÚ¡ + +wch¬_t + * + $wc¤chr + ( +__cÚ¡ + +wch¬_t + * +__wcs +, wch¬_ˆ +__wc +) + +232 +__THROW + + `__asm + ("wc¤chr"è +__©Œibu‹_pu»__ +; + +234 +wch¬_t + * + $wc¤chr + ( +__cÚ¡ + +wch¬_t + * +__wcs +, wch¬_ˆ +__wc +) + +235 +__THROW + +__©Œibu‹_pu»__ +; + +237 +__END_NAMESPACE_STD + + +239 #ifdeà +__USE_GNU + + +242 +wch¬_t + * + $wcschºul + ( +__cÚ¡ + +wch¬_t + * +__s +, wch¬_ˆ +__wc +) + +243 +__THROW + +__©Œibu‹_pu»__ +; + +246 +__BEGIN_NAMESPACE_STD + + +249 +size_t + + $wcsc¥n + ( +__cÚ¡ + +wch¬_t + * +__wcs +, __cÚ¡ wch¬_ˆ* +__»jeù +) + +250 +__THROW + +__©Œibu‹_pu»__ +; + +253 +size_t + + $wcs¥n + ( +__cÚ¡ + +wch¬_t + * +__wcs +, __cÚ¡ wch¬_ˆ* +__acû± +) + +254 +__THROW + +__©Œibu‹_pu»__ +; + +256 #ifdeà +__CORRECT_ISO_CPP_WCHAR_H_PROTO + + +257 "C++" +wch¬_t + * + $wc¥brk + ( +wch¬_t + * +__wcs +, +__cÚ¡ + wch¬_ˆ* +__acû± +) + +258 +__THROW + + `__asm + ("wc¥brk"è +__©Œibu‹_pu»__ +; + +259 "C++" +__cÚ¡ + +wch¬_t + * + $wc¥brk + ( +__cÚ¡ + +wch¬_t + * +__wcs +, + +260 +__cÚ¡ + +wch¬_t + * +__acû± +) + +261 +__THROW + + `__asm + ("wc¥brk"è +__©Œibu‹_pu»__ +; + +263 +wch¬_t + * + $wc¥brk + ( +__cÚ¡ + +wch¬_t + * +__wcs +, __cÚ¡ wch¬_ˆ* +__acû± +) + +264 +__THROW + +__©Œibu‹_pu»__ +; + +267 #ifdeà +__CORRECT_ISO_CPP_WCHAR_H_PROTO + + +268 "C++" +wch¬_t + * + $wcs¡r + ( +wch¬_t + * +__hay¡ack +, +__cÚ¡ + wch¬_ˆ* +__ÃedË +) + +269 +__THROW + + `__asm + ("wcs¡r"è +__©Œibu‹_pu»__ +; + +270 "C++" +__cÚ¡ + +wch¬_t + * + $wcs¡r + ( +__cÚ¡ + +wch¬_t + * +__hay¡ack +, + +271 +__cÚ¡ + +wch¬_t + * +__ÃedË +) + +272 +__THROW + + `__asm + ("wcs¡r"è +__©Œibu‹_pu»__ +; + +274 +wch¬_t + * + $wcs¡r + ( +__cÚ¡ + +wch¬_t + * +__hay¡ack +, __cÚ¡ wch¬_ˆ* +__ÃedË +) + +275 +__THROW + +__©Œibu‹_pu»__ +; + +279 +wch¬_t + * + $wc¡ok + ( +wch¬_t + * +__»¡riù + +__s +, + +280 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__d–im +, + +281 +wch¬_t + ** +__»¡riù + +__±r +è +__THROW +; + +284 +size_t + + $wc¦’ + ( +__cÚ¡ + +wch¬_t + * +__s +è +__THROW + +__©Œibu‹_pu»__ +; + +285 +__END_NAMESPACE_STD + + +287 #ifdeà +__USE_XOPEN + + +289 #ifdeà +__CORRECT_ISO_CPP_WCHAR_H_PROTO + + +290 "C++" +wch¬_t + * + $wcswcs + ( +wch¬_t + * +__hay¡ack +, +__cÚ¡ + wch¬_ˆ* +__ÃedË +) + +291 +__THROW + + `__asm + ("wcswcs"è +__©Œibu‹_pu»__ +; + +292 "C++" +__cÚ¡ + +wch¬_t + * + $wcswcs + ( +__cÚ¡ + +wch¬_t + * +__hay¡ack +, + +293 +__cÚ¡ + +wch¬_t + * +__ÃedË +) + +294 +__THROW + + `__asm + ("wcswcs"è +__©Œibu‹_pu»__ +; + +296 +wch¬_t + * + $wcswcs + ( +__cÚ¡ + +wch¬_t + * +__hay¡ack +, __cÚ¡ wch¬_ˆ* +__ÃedË +) + +297 +__THROW + +__©Œibu‹_pu»__ +; + +301 #ifdeà +__USE_XOPEN2K8 + + +303 +size_t + + $wc¢Ën + ( +__cÚ¡ + +wch¬_t + * +__s +, +size_t + +__maxËn +) + +304 +__THROW + +__©Œibu‹_pu»__ +; + +308 +__BEGIN_NAMESPACE_STD + + +310 #ifdeà +__CORRECT_ISO_CPP_WCHAR_H_PROTO + + +311 "C++" +wch¬_t + * + $wmemchr + ( +wch¬_t + * +__s +, wch¬_ˆ +__c +, +size_t + +__n +) + +312 +__THROW + + `__asm + ("wmemchr"è +__©Œibu‹_pu»__ +; + +313 "C++" +__cÚ¡ + +wch¬_t + * + $wmemchr + ( +__cÚ¡ + +wch¬_t + * +__s +, wch¬_ˆ +__c +, + +314 +size_t + +__n +) + +315 +__THROW + + `__asm + ("wmemchr"è +__©Œibu‹_pu»__ +; + +317 +wch¬_t + * + $wmemchr + ( +__cÚ¡ + +wch¬_t + * +__s +, wch¬_ˆ +__c +, +size_t + +__n +) + +318 +__THROW + +__©Œibu‹_pu»__ +; + +322  + $wmemcmp + ( +__cÚ¡ + +wch¬_t + * +__s1 +, __cÚ¡ wch¬_ˆ* +__s2 +, +size_t + +__n +) + +323 +__THROW + +__©Œibu‹_pu»__ +; + +326 +wch¬_t + * + $wmemýy + ( +wch¬_t + * +__»¡riù + +__s1 +, + +327 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__s2 +, +size_t + +__n +è +__THROW +; + +331 +wch¬_t + * + $wmemmove + ( +wch¬_t + * +__s1 +, +__cÚ¡ + wch¬_ˆ* +__s2 +, +size_t + +__n +) + +332 +__THROW +; + +335 +wch¬_t + * + $wmem£t + ( +wch¬_t + * +__s +, wch¬_ˆ +__c +, +size_t + +__n +è +__THROW +; + +336 +__END_NAMESPACE_STD + + +338 #ifdeà +__USE_GNU + + +341 +wch¬_t + * + $wmempýy + ( +wch¬_t + * +__»¡riù + +__s1 +, + +342 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__s2 +, +size_t + +__n +) + +343 +__THROW +; + +347 +__BEGIN_NAMESPACE_STD + + +350 +wšt_t + + $btowc + ( +__c +è +__THROW +; + +354  + $wùob + ( +wšt_t + +__c +è +__THROW +; + +358  + $mbsš™ + ( +__cÚ¡ + +mb¡©e_t + * +__ps +è +__THROW + +__©Œibu‹_pu»__ +; + +362 +size_t + + $mb¹owc + ( +wch¬_t + * +__»¡riù + +__pwc +, + +363 +__cÚ¡ + * +__»¡riù + +__s +, +size_t + +__n +, + +364 +mb¡©e_t + * +__p +è +__THROW +; + +367 +size_t + + $wütomb + (* +__»¡riù + +__s +, +wch¬_t + +__wc +, + +368 +mb¡©e_t + * +__»¡riù + +__ps +è +__THROW +; + +371 +size_t + + $__mb¾’ + ( +__cÚ¡ + * +__»¡riù + +__s +, +size_t + +__n +, + +372 +mb¡©e_t + * +__»¡riù + +__ps +è +__THROW +; + +373 +size_t + + $mb¾’ + ( +__cÚ¡ + * +__»¡riù + +__s +, +size_t + +__n +, + +374 +mb¡©e_t + * +__»¡riù + +__ps +è +__THROW +; + +375 +__END_NAMESPACE_STD + + +377 #ifdeà +__USE_EXTERN_INLINES + + +383 +wšt_t + + $__btowc_®Ÿs + ( +__c +è + `__asm + ("btowc"); + +384 +__ex‹º_šlše + +wšt_t + + +385 + `__NTH + ( + $btowc + ( +__c +)) + +386 {  ( + `__bužtš_cÚ¡ªt_p + ( +__c +) && __c >= '\0' && __c <= '\x7f' + +387 ? ( +wšt_t +è +__c + : + `__btowc_®Ÿs + (__c)); + } +} + +389  + $__wùob_®Ÿs + ( +wšt_t + +__c +è + `__asm + ("wctob"); + +390 +__ex‹º_šlše +  + +391 + `__NTH + ( + $wùob + ( +wšt_t + +__wc +)) + +392 {  ( + `__bužtš_cÚ¡ªt_p + ( +__wc +è&& __wø>ð +L +'\0' && __wc <= L'\x7f' + +393 ? (è +__wc + : + `__wùob_®Ÿs + (__wc)); + } +} + +395 +__ex‹º_šlše + +size_t + + +396 +__NTH + ( + $mb¾’ + ( +__cÚ¡ + * +__»¡riù + +__s +, +size_t + +__n +, + +397 +mb¡©e_t + * +__»¡riù + +__ps +)) + +398 {  ( +__ps + !ð +NULL + + +399 ? + `mb¹owc + ( +NULL +, +__s +, +__n +, +__ps +è: + `__mb¾’ + (__s, __n, NULL)); + } +} + +402 +__BEGIN_NAMESPACE_STD + + +405 +size_t + + $mb¤towcs + ( +wch¬_t + * +__»¡riù + +__d¡ +, + +406 +__cÚ¡ + ** +__»¡riù + +__¤c +, +size_t + +__Ën +, + +407 +mb¡©e_t + * +__»¡riù + +__ps +è +__THROW +; + +411 +size_t + + $wc¤tombs + (* +__»¡riù + +__d¡ +, + +412 +__cÚ¡ + +wch¬_t + ** +__»¡riù + +__¤c +, +size_t + +__Ën +, + +413 +mb¡©e_t + * +__»¡riù + +__ps +è +__THROW +; + +414 +__END_NAMESPACE_STD + + +417 #ifdef +__USE_XOPEN2K8 + + +420 +size_t + + $mb¢¹owcs + ( +wch¬_t + * +__»¡riù + +__d¡ +, + +421 +__cÚ¡ + ** +__»¡riù + +__¤c +, +size_t + +__nmc +, + +422 +size_t + +__Ën +, +mb¡©e_t + * +__»¡riù + +__ps +è +__THROW +; + +426 +size_t + + $wc¢¹ombs + (* +__»¡riù + +__d¡ +, + +427 +__cÚ¡ + +wch¬_t + ** +__»¡riù + +__¤c +, + +428 +size_t + +__nwc +, size_ˆ +__Ën +, + +429 +mb¡©e_t + * +__»¡riù + +__ps +è +__THROW +; + +434 #ifdeà +__USE_XOPEN + + +436  + $wcwidth + ( +wch¬_t + +__c +è +__THROW +; + +440  + $wcswidth + ( +__cÚ¡ + +wch¬_t + * +__s +, +size_t + +__n +è +__THROW +; + +444 +__BEGIN_NAMESPACE_STD + + +447  + $wc¡od + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +448 +wch¬_t + ** +__»¡riù + +__’d±r +è +__THROW +; + +449 +__END_NAMESPACE_STD + + +451 #ifdeà +__USE_ISOC99 + + +452 +__BEGIN_NAMESPACE_C99 + + +454  + $wc¡of + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +455 +wch¬_t + ** +__»¡riù + +__’d±r +è +__THROW +; + +456  + $wc¡Þd + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +457 +wch¬_t + ** +__»¡riù + +__’d±r +è +__THROW +; + +458 +__END_NAMESPACE_C99 + + +462 +__BEGIN_NAMESPACE_STD + + +465  + $wc¡Þ + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +466 +wch¬_t + ** +__»¡riù + +__’d±r +,  +__ba£ +è +__THROW +; + +470  + $wc¡oul + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +471 +wch¬_t + ** +__»¡riù + +__’d±r +,  +__ba£ +) + +472 +__THROW +; + +473 +__END_NAMESPACE_STD + + +475 #ià +defšed + +__USE_ISOC99 + || (defšed +__GNUC__ + && defšed +__USE_GNU +) + +476 +__BEGIN_NAMESPACE_C99 + + +479 +__ex‹nsiÚ__ + + +480  + $wc¡Þl + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +481 +wch¬_t + ** +__»¡riù + +__’d±r +,  +__ba£ +) + +482 +__THROW +; + +486 +__ex‹nsiÚ__ + + +487  + $wc¡ouÎ + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +488 +wch¬_t + ** +__»¡riù + +__’d±r +, + +489  +__ba£ +è +__THROW +; + +490 +__END_NAMESPACE_C99 + + +493 #ià +defšed + +__GNUC__ + && defšed +__USE_GNU + + +496 +__ex‹nsiÚ__ + + +497  + $wc¡oq + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +498 +wch¬_t + ** +__»¡riù + +__’d±r +,  +__ba£ +) + +499 +__THROW +; + +503 +__ex‹nsiÚ__ + + +504  + $wc¡ouq + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +505 +wch¬_t + ** +__»¡riù + +__’d±r +, + +506  +__ba£ +è +__THROW +; + +509 #ifdeà +__USE_GNU + + +523  + ~ + +527  + $wc¡Þ_l + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +528 +wch¬_t + ** +__»¡riù + +__’d±r +,  +__ba£ +, + +529 +__loÿË_t + +__loc +è +__THROW +; + +531  + $wc¡oul_l + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +532 +wch¬_t + ** +__»¡riù + +__’d±r +, + +533  +__ba£ +, +__loÿË_t + +__loc +è +__THROW +; + +535 +__ex‹nsiÚ__ + + +536  + $wc¡Þl_l + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +537 +wch¬_t + ** +__»¡riù + +__’d±r +, + +538  +__ba£ +, +__loÿË_t + +__loc +è +__THROW +; + +540 +__ex‹nsiÚ__ + + +541  + $wc¡ouÎ_l + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +542 +wch¬_t + ** +__»¡riù + +__’d±r +, + +543  +__ba£ +, +__loÿË_t + +__loc +) + +544 +__THROW +; + +546  + $wc¡od_l + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +547 +wch¬_t + ** +__»¡riù + +__’d±r +, +__loÿË_t + +__loc +) + +548 +__THROW +; + +550  + $wc¡of_l + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +551 +wch¬_t + ** +__»¡riù + +__’d±r +, +__loÿË_t + +__loc +) + +552 +__THROW +; + +554  + $wc¡Þd_l + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +555 +wch¬_t + ** +__»¡riù + +__’d±r +, + +556 +__loÿË_t + +__loc +è +__THROW +; + +560 #ifdeà +__USE_XOPEN2K8 + + +563 +wch¬_t + * + $wýýy + ( +wch¬_t + * +__»¡riù + +__de¡ +, + +564 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__¤c +è +__THROW +; + +568 +wch¬_t + * + $wýnýy + ( +wch¬_t + * +__»¡riù + +__de¡ +, + +569 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__¤c +, +size_t + +__n +) + +570 +__THROW +; + +577 +__FILE + * + $ݒ_wmem¡»am + ( +wch¬_t + ** +__buæoc +, +size_t + * +__siz–oc +è +__THROW +; + +580 #ià +defšed + +__USE_ISOC95 + || defšed +__USE_UNIX98 + + +581 +__BEGIN_NAMESPACE_STD + + +584  + $fwide + ( +__FILE + * +__å +,  +__mode +è +__THROW +; + +591  + `fw´štf + ( +__FILE + * +__»¡riù + +__¡»am +, + +592 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, ...) + +598  + `w´štf + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, ...) + +601  + $sw´štf + ( +wch¬_t + * +__»¡riù + +__s +, +size_t + +__n +, + +602 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, ...) + +603 +__THROW + ; + +609  + `vfw´štf + ( +__FILE + * +__»¡riù + +__s +, + +610 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +611 +__gnuc_va_li¡ + +__¬g +) + +617  + `vw´štf + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +618 +__gnuc_va_li¡ + +__¬g +) + +622  + $vsw´štf + ( +wch¬_t + * +__»¡riù + +__s +, +size_t + +__n +, + +623 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +624 +__gnuc_va_li¡ + +__¬g +) + +625 +__THROW + ; + +632  + `fwsÿnf + ( +__FILE + * +__»¡riù + +__¡»am +, + +633 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, ...) + +639  + `wsÿnf + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, ...) + +642  + $swsÿnf + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__s +, + +643 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, ...) + +644 +__THROW + ; + +646 #ià +defšed + +__USE_ISOC99 + && !defšed +__USE_GNU + \ + +647 && (! +defšed + +__LDBL_COMPAT + || !defšed +__REDIRECT +) \ + +648 && ( +defšed + +__STRICT_ANSI__ + || defšed +__USE_XOPEN2K +) + +649 #ifdeà +__REDIRECT + + +653  + `__REDIRECT + ( +fwsÿnf +, ( +__FILE + * +__»¡riù + +__¡»am +, + +654 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, ...), + +655 +__isoc99_fwsÿnf +) + +657  + `__REDIRECT + ( +wsÿnf +, ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, ...), + +658 +__isoc99_wsÿnf +) + +660  + `__REDIRECT_NTH + ( +swsÿnf +, ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__s +, + +661 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +662 ...), +__isoc99_swsÿnf +) + +665  + `__isoc99_fwsÿnf + ( +__FILE + * +__»¡riù + +__¡»am +, + +666 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, ...); + +667  + `__isoc99_wsÿnf + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, ...); + +668  + $__isoc99_swsÿnf + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__s +, + +669 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, ...) + +670 +__THROW +; + +671  + #fwsÿnf + +__isoc99_fwsÿnf + + + ) + +672  + #wsÿnf + +__isoc99_wsÿnf + + + ) + +673  + #swsÿnf + +__isoc99_swsÿnf + + + ) + +677 +__END_NAMESPACE_STD + + +680 #ifdeà +__USE_ISOC99 + + +681 +__BEGIN_NAMESPACE_C99 + + +686  + `vfwsÿnf + ( +__FILE + * +__»¡riù + +__s +, + +687 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +688 +__gnuc_va_li¡ + +__¬g +) + +694  + `vwsÿnf + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +695 +__gnuc_va_li¡ + +__¬g +) + +698  + $vswsÿnf + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__s +, + +699 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +700 +__gnuc_va_li¡ + +__¬g +) + +701 +__THROW + ; + +703 #ià! +defšed + +__USE_GNU + \ + +704 && (! +defšed + +__LDBL_COMPAT + || !defšed +__REDIRECT +) \ + +705 && ( +defšed + +__STRICT_ANSI__ + || defšed +__USE_XOPEN2K +) + +706 #ifdeà +__REDIRECT + + +707  + `__REDIRECT + ( +vfwsÿnf +, ( +__FILE + * +__»¡riù + +__s +, + +708 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +709 +__gnuc_va_li¡ + +__¬g +), +__isoc99_vfwsÿnf +) + +711  + `__REDIRECT + ( +vwsÿnf +, ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +712 +__gnuc_va_li¡ + +__¬g +), +__isoc99_vwsÿnf +) + +714  + `__REDIRECT_NTH + ( +vswsÿnf +, ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__s +, + +715 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +716 +__gnuc_va_li¡ + +__¬g +), +__isoc99_vswsÿnf +) + +719  + `__isoc99_vfwsÿnf + ( +__FILE + * +__»¡riù + +__s +, + +720 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +721 +__gnuc_va_li¡ + +__¬g +); + +722  + `__isoc99_vwsÿnf + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +723 +__gnuc_va_li¡ + +__¬g +); + +724  + $__isoc99_vswsÿnf + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__s +, + +725 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +726 +__gnuc_va_li¡ + +__¬g +è +__THROW +; + +727  + #vfwsÿnf + +__isoc99_vfwsÿnf + + + ) + +728  + #vwsÿnf + +__isoc99_vwsÿnf + + + ) + +729  + #vswsÿnf + +__isoc99_vswsÿnf + + + ) + +733 +__END_NAMESPACE_C99 + + +737 +__BEGIN_NAMESPACE_STD + + +742 +wšt_t + + `fg‘wc + ( +__FILE + * +__¡»am +); + +743 +wšt_t + + `g‘wc + ( +__FILE + * +__¡»am +); + +749 +wšt_t + + `g‘wch¬ + (); + +756 +wšt_t + + `åutwc + ( +wch¬_t + +__wc +, +__FILE + * +__¡»am +); + +757 +wšt_t + + `putwc + ( +wch¬_t + +__wc +, +__FILE + * +__¡»am +); + +763 +wšt_t + + `putwch¬ + ( +wch¬_t + +__wc +); + +771 +wch¬_t + * + `fg‘ws + (wch¬_ˆ* +__»¡riù + +__ws +,  +__n +, + +772 +__FILE + * +__»¡riù + +__¡»am +); + +778  + `åutws + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__ws +, + +779 +__FILE + * +__»¡riù + +__¡»am +); + +786 +wšt_t + + `ung‘wc + (wšt_ˆ +__wc +, +__FILE + * +__¡»am +); + +787 +__END_NAMESPACE_STD + + +790 #ifdeà +__USE_GNU + + +798 +wšt_t + + `g‘wc_uÆocked + ( +__FILE + * +__¡»am +); + +799 +wšt_t + + `g‘wch¬_uÆocked + (); + +807 +wšt_t + + `fg‘wc_uÆocked + ( +__FILE + * +__¡»am +); + +815 +wšt_t + + `åutwc_uÆocked + ( +wch¬_t + +__wc +, +__FILE + * +__¡»am +); + +824 +wšt_t + + `putwc_uÆocked + ( +wch¬_t + +__wc +, +__FILE + * +__¡»am +); + +825 +wšt_t + + `putwch¬_uÆocked + ( +wch¬_t + +__wc +); + +834 +wch¬_t + * + `fg‘ws_uÆocked + (wch¬_ˆ* +__»¡riù + +__ws +,  +__n +, + +835 +__FILE + * +__»¡riù + +__¡»am +); + +843  + `åutws_uÆocked + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__ws +, + +844 +__FILE + * +__»¡riù + +__¡»am +); + +848 +__BEGIN_NAMESPACE_C99 + + +852 +size_t + + $wcsáime + ( +wch¬_t + * +__»¡riù + +__s +, +size_t + +__maxsize +, + +853 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +854 +__cÚ¡ +  +tm + * +__»¡riù + +__ +è +__THROW +; + +855 +__END_NAMESPACE_C99 + + +857 #ifdeà +__USE_GNU + + +858  + ~ + +862 +size_t + + $wcsáime_l + ( +wch¬_t + * +__»¡riù + +__s +, +size_t + +__maxsize +, + +863 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +864 +__cÚ¡ +  +tm + * +__»¡riù + +__ +, + +865 +__loÿË_t + +__loc +è +__THROW +; + +874 #ià +defšed + +__USE_UNIX98 + && !defšed +__USE_GNU + + +875  + #__Ãed_iswxxx + + + ) + +876  + ~ + +880 #ià +__USE_FORTIFY_LEVEL + > 0 && +defšed + +__ex‹º_®ways_šlše + + +881  + ~ + +884 #ifdeà +__LDBL_COMPAT + + +885  + ~ + +888 +__END_DECLS + + +896 #undeà +__Ãed_mb¡©e_t + + +897 #undeà +__Ãed_wšt_t + + + @/usr/include/xlocale.h + +21 #iâdeà +_XLOCALE_H + + +22  + #_XLOCALE_H + 1 + + ) + +28  + s__loÿË_¡ruù + + +31  +__loÿË_d©a + * + m__loÿËs +[13]; + +34 cÚ¡ * + m__ùy³_b +; + +35 cÚ¡ * + m__ùy³_tÞow” +; + +36 cÚ¡ * + m__ùy³_touµ” +; + +39 cÚ¡ * + m__Çmes +[13]; + +40 } * + t__loÿË_t +; + +43  +__loÿË_t + + tloÿË_t +; + + @/usr/include/wctype.h + +24 #iâdeà +_WCTYPE_H + + +26  + ~<ã©u»s.h +> + +27  + ~ + +29 #iâdeà +__Ãed_iswxxx + + +30  + #_WCTYPE_H + 1 + + ) + +33  + #__Ãed_wšt_t + + + ) + +34  + ~ + +38 #iâdeà +WEOF + + +39  + #WEOF + (0xffffffffu) + + ) + +42 #undeà +__Ãed_iswxxx + + +47 #iâdeà +__iswxxx_defšed + + +48  + #__iswxxx_defšed + 1 + + ) + +50 +__BEGIN_NAMESPACE_C99 + + +53  + twùy³_t +; + +54 + g__END_NAMESPACE_C99 + + +56 #iâdeà +_ISwb™ + + +61  + ~<’dŸn.h +> + +62 #ià +__BYTE_ORDER + =ð +__BIG_ENDIAN + + +63  + #_ISwb™ +( +b™ +è(1 << (b™)) + + ) + +65  + #_ISwb™ +( +b™ +) \ + +66 (( +b™ +) < 8 ? () ((1UL << (bit)) << 24) \ + +67 : (( +b™ +) < 16 ? () ((1UL << (bit)) << 8) \ + +68 : (( +b™ +) < 24 ? () ((1UL << (bit)) >> 8) \ + +69 : (è((1UL << ( +b™ +)è>> 24)))) + + ) + +74 + m__ISwuµ” + = 0, + +75 + m__ISwlow” + = 1, + +76 + m__ISw®pha + = 2, + +77 + m__ISwdig™ + = 3, + +78 + m__ISwxdig™ + = 4, + +79 + m__ISw¥aû + = 5, + +80 + m__ISw´št + = 6, + +81 + m__ISwg¿ph + = 7, + +82 + m__ISwbÏnk + = 8, + +83 + m__ISwúŒl + = 9, + +84 + m__ISwpunù + = 10, + +85 + m__ISw®num + = 11, + +87 + m_ISwuµ” + = +_ISwb™ + ( +__ISwuµ” +), + +88 + m_ISwlow” + = +_ISwb™ + ( +__ISwlow” +), + +89 + m_ISw®pha + = +_ISwb™ + ( +__ISw®pha +), + +90 + m_ISwdig™ + = +_ISwb™ + ( +__ISwdig™ +), + +91 + m_ISwxdig™ + = +_ISwb™ + ( +__ISwxdig™ +), + +92 + m_ISw¥aû + = +_ISwb™ + ( +__ISw¥aû +), + +93 + m_ISw´št + = +_ISwb™ + ( +__ISw´št +), + +94 + m_ISwg¿ph + = +_ISwb™ + ( +__ISwg¿ph +), + +95 + m_ISwbÏnk + = +_ISwb™ + ( +__ISwbÏnk +), + +96 + m_ISwúŒl + = +_ISwb™ + ( +__ISwúŒl +), + +97 + m_ISwpunù + = +_ISwb™ + ( +__ISwpunù +), + +98 + m_ISw®num + = +_ISwb™ + ( +__ISw®num +) + +103 +__BEGIN_DECLS + + +105 +__BEGIN_NAMESPACE_C99 + + +112  + $isw®num + ( +wšt_t + +__wc +è +__THROW +; + +118  + $isw®pha + ( +wšt_t + +__wc +è +__THROW +; + +121  + $iswúŒl + ( +wšt_t + +__wc +è +__THROW +; + +125  + $iswdig™ + ( +wšt_t + +__wc +è +__THROW +; + +129  + $iswg¿ph + ( +wšt_t + +__wc +è +__THROW +; + +134  + $iswlow” + ( +wšt_t + +__wc +è +__THROW +; + +137  + $isw´št + ( +wšt_t + +__wc +è +__THROW +; + +142  + $iswpunù + ( +wšt_t + +__wc +è +__THROW +; + +147  + $isw¥aû + ( +wšt_t + +__wc +è +__THROW +; + +152  + $iswuµ” + ( +wšt_t + +__wc +è +__THROW +; + +157  + $iswxdig™ + ( +wšt_t + +__wc +è +__THROW +; + +162 #ifdeà +__USE_ISOC99 + + +163  + $iswbÏnk + ( +wšt_t + +__wc +è +__THROW +; + +172 +wùy³_t + + $wùy³ + ( +__cÚ¡ + * +__´Ý”ty +è +__THROW +; + +176  + $iswùy³ + ( +wšt_t + +__wc +, +wùy³_t + +__desc +è +__THROW +; + +177 +__END_NAMESPACE_C99 + + +184 +__BEGIN_NAMESPACE_C99 + + +187  +__cÚ¡ + + t__št32_t + * + twù¿ns_t +; + +188 +__END_NAMESPACE_C99 + + +189 #ifdeà +__USE_GNU + + +190 + $__USING_NAMESPACE_C99 +( +wù¿ns_t +) + +193 +__BEGIN_NAMESPACE_C99 + + +195 +wšt_t + + $towlow” + ( +wšt_t + +__wc +è +__THROW +; + +198 +wšt_t + + $towuµ” + ( +wšt_t + +__wc +è +__THROW +; + +199 +__END_NAMESPACE_C99 + + +201 +__END_DECLS + + +208 #ifdeà +_WCTYPE_H + + +214 +__BEGIN_DECLS + + +216 +__BEGIN_NAMESPACE_C99 + + +219 +wù¿ns_t + + $wù¿ns + ( +__cÚ¡ + * +__´Ý”ty +è +__THROW +; + +222 +wšt_t + + $towù¿ns + ( +wšt_t + +__wc +, +wù¿ns_t + +__desc +è +__THROW +; + +223 +__END_NAMESPACE_C99 + + +225 #ifdeà +__USE_XOPEN2K8 + + +227  + ~ + +231  + $isw®num_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +237  + $isw®pha_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +240  + $iswúŒl_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +244  + $iswdig™_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +248  + $iswg¿ph_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +253  + $iswlow”_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +256  + $isw´št_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +261  + $iswpunù_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +266  + $isw¥aû_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +271  + $iswuµ”_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +276  + $iswxdig™_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +281  + $iswbÏnk_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +285 +wùy³_t + + $wùy³_l + ( +__cÚ¡ + * +__´Ý”ty +, +__loÿË_t + +__loÿË +) + +286 +__THROW +; + +290  + $iswùy³_l + ( +wšt_t + +__wc +, +wùy³_t + +__desc +, +__loÿË_t + +__loÿË +) + +291 +__THROW +; + +299 +wšt_t + + $towlow”_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +302 +wšt_t + + $towuµ”_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +306 +wù¿ns_t + + $wù¿ns_l + ( +__cÚ¡ + * +__´Ý”ty +, +__loÿË_t + +__loÿË +) + +307 +__THROW +; + +310 +wšt_t + + $towù¿ns_l + ( +wšt_t + +__wc +, +wù¿ns_t + +__desc +, + +311 +__loÿË_t + +__loÿË +è +__THROW +; + +315 +__END_DECLS + + + @ +1 +. +1 +/usr/include +15 +349 +include/setting-storage-main.h +include/setting-storage.h +src/setting-storage-main.c +src/setting-storage.c +/usr/include/stdio.h +/usr/include/features.h +/usr/include/getopt.h +/usr/include/libio.h +/usr/include/_G_config.h +/usr/include/ctype.h +/usr/include/endian.h +/usr/include/gconv.h +/usr/include/wchar.h +/usr/include/xlocale.h +/usr/include/wctype.h diff --git a/setting-storage/include/setting-storage-default-storage.h b/setting-storage/include/setting-storage-default-storage.h new file mode 100755 index 0000000..4595ae3 --- /dev/null +++ b/setting-storage/include/setting-storage-default-storage.h @@ -0,0 +1,24 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_STORAGE_DEFAULT_STORAGE_H__ +#define __SETTING_STORAGE_DEFAULT_STORAGE_H__ + +#include + +#define DVB_H_STR "IDS_ST_BODY_DVB_H" + +#endif /* __SETTING_STORAGE_DEFAULT_STORAGE_H__ */ diff --git a/setting-storage/include/setting-storage-main.h b/setting-storage/include/setting-storage-main.h new file mode 100755 index 0000000..731ffad --- /dev/null +++ b/setting-storage/include/setting-storage-main.h @@ -0,0 +1,27 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_STORAGE_MAIN_H__ +#define __SETTING_STORAGE_MAIN_H__ + +#include + +#define WRT_PREFIX "wgt" +#define TPK_PREFIX "tpk" +#define RPM_PREFIX "rpm" +#define STR_INSTALLED_SIZE "installed_size" + +#endif /* __SETTING_STORAGE_MAIN_H__ */ diff --git a/setting-storage/include/setting-storage-miscellaneous-files.h b/setting-storage/include/setting-storage-miscellaneous-files.h new file mode 100755 index 0000000..58eb82a --- /dev/null +++ b/setting-storage/include/setting-storage-miscellaneous-files.h @@ -0,0 +1,29 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_STORAGE_MISCELLANEOUS_FILES_H__ +#define __SETTING_STORAGE_MISCELLANEOUS_FILES_H__ + +#include + +static void __setting_storage_miscellaneous_files_delete_cb(void *data, + Evas_Object *obj, + void *event_info); +static void __setting_storage_miscellaneous_files_cancel_cb(void *data, + Evas_Object *obj, + void *event_info); + +#endif /* __SETTING_STORAGE_MISCELLANEOUS_FILES_H__ */ diff --git a/setting-storage/include/setting-storage.h b/setting-storage/include/setting-storage.h new file mode 100755 index 0000000..d21c323 --- /dev/null +++ b/setting-storage/include/setting-storage.h @@ -0,0 +1,222 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_STORAGE_H__ +#define __SETTING_STORAGE_H__ + +#include +#include + +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define SUPPORT_SD_CARD_FORMAT 1 + +#define SETTING_STORAGE_PROGRESSBAR_TIMEOUT 10 +#define SETTING_STORAGE_POPUP_TIMER 2 + +#define SETTING_STORAGE_MAX_STR_LEN 30 + +#define SETTING_STORAGE_DIR_PATH_LEN_MAX 4096 +#define SETTING_STORAGE_FILE_NAME_LEN_MAX 256 +#define SETTING_STORAGE_CHILDPATH_LEN 512 + +#define SETTING_STORAGE_KILOBYTE_VALUE 1024 +#define SETTING_STORAGE_MEGABYTE_VALUE 1048576 +#define SETTING_STORAGE_GIGABYTE_VALUE 1073741824 + +#define SETTING_STORAGE_FORMAT_ASK_MSG "This action will erase the external storage in the phone. You will lose ALL data on the card! Format?" + +#define SETTING_STORAGE_SD_CARD_MOUNT_ALREADY_DESC "Already mount" + +#define SETTING_STORAGE_DEFAULT_STORAGE_STR "IDS_ST_BODY_DEFAULT_STORAGE" +#define SETTING_STORAGE_INTERNAL_STORAGE_STR "IDS_ST_BODY_DEVICE_MEMORY" + +#define SETTING_STORAGE_AUDIO_STR "IDS_COM_BODY_AUDIO" + +#define SETTING_STORAGE_PICS_STR "IDS_ST_BODY_PICTURES_VIDEOS" +#define SETTING_STORAGE_MISCES_STR "IDS_ST_BODY_MISCELLANEOUS_FILES" +#define SETTING_STORAGE_AVAIL_STR "IDS_ST_BODY_AVAILABLE" +#define SETTING_STORAGE_FORMAT_STR "IDS_ST_BODY_FORMAT_USB_STORAGE" +#define SETTING_STORAGE_FORMAT_DESC_STR "Erases all data on the internal USB storage, such as music and photos" +#define SETTING_STORAGE_MOUNT_STR "IDS_ST_BODY_MOUNT_SD_CARD" +#define SETTING_STORAGE_INSERT_STR "IDS_ST_BODY_INSERT_SD_CARD" + +#define SETTING_STORAGE_APPS_ICON_PATH SETTING_ICON_PATH"/A01-1_icon_color_applications.png" +#define SETTING_STORAGE_PICS_ICON_PATH SETTING_ICON_PATH"/A01-1_icon_color_pictures.png" +#define SETTING_STORAGE_AUDIO_ICON_PATH SETTING_ICON_PATH"/A01-1_icon_color_Audio.png" +#define SETTING_STORAGE_MISCES_ICON_PATH SETTING_ICON_PATH"/A01-1_icon_color_miscellaneous_files.png" +#define SETTING_STORAGE_AVAIL_ICON_PATH SETTING_ICON_PATH"/A01-1_icon_color_available.png" + +#define SETTING_STORAGE_ICON_LANDSCAPE_WIDTH ((int)1200 * WIDGET_SCALE_FACTOR) +#define SETTING_STORAGE_ICON_WIDTH ((int)640 * WIDGET_SCALE_FACTOR) +#define SETTING_STORAGE_ICON_HEIGHT ((int)16 * WIDGET_SCALE_FACTOR) + +#define SETTING_STORAGE_OPT_USR_PATH "/opt/usr" +#define SETTING_STORAGE_MMC_PATH "/opt/storage/sdcard" +#define SETTING_STORAGE_MMC_PARENT_PATH "/opt/storage/sdcard/.." + +#define PATH1 "/opt/usr/media/.tmp_download" +#define PATH2 "/opt/usr/media/.video-hub" +#define PATH3 "/opt/usr/media/Camera" +#define PATH4 "/opt/usr/media/Downloads" +#define PATH5 "/opt/usr/media/Images" +#define PATH6 "/opt/usr/media/Others" +#define PATH7 "/opt/usr/media/Sounds" +#define PATH8 "/opt/usr/media/Videos" +#define PATH9 "/opt/usr/media/lost+found" + +enum { + SETTING_STORAGE_SYSMAN_REQUEST_MOUNT_ALREADY = -2, + SETTING_STORAGE_SYSMAN_REQUEST_SUCCESS = 0 +}; + +typedef enum { + SETTING_STORAGE_SLEEP = -1, + SETTING_STORAGE_REUPDATE = 0, + SETTING_STORAGE_PICTURES_VIDEO = 1, + SETTING_STORAGE_AUDIO, + SETTING_STORAGE_MISCELLANEOUS, + SETTING_STORAGE_APPLICATIONS, + SETTING_STORAGE_MAX, +} update_type; + +typedef void (*setting_storage_mmc_cb) (int val, void *data); + +typedef struct _Setting_Storage_Status { + double dTotal; + double dAvail; +} Setting_Storage_Status; + +typedef struct _Node_Info Node_Info; +struct _Node_Info { + char *path; + char *name; + void *data; +}; + +typedef struct _app_info_t { + char *pkg_name; + char *pkg_type; + int total_size; +} App_Info; + +typedef struct _update_info_t { + double total_size; + update_type type; +} Update_Info; + +typedef struct _SettingStorageUG SettingStorageUG; + +/** + * Setting Storage UG context + * all UG function has void* as an agument. this is casted back to SettingStorageUG + * and the functions access app context. + */ +struct _SettingStorageUG { + ui_gadget_h ug; + + /* add more variables here (move your appdata to here) */ + Evas *evas; + Evas_Object *win_main_layout; + Evas_Object *win_get; + + Evas_Object *ly_main; + + Evas_Object *genlist; + Evas_Object *navibar; + + /* storage setting */ + Evas_Object *popup; + Elm_Genlist_Item_Class itc_2text_3_parent; + Elm_Genlist_Item_Class itc_1icon_1text_sub; + Elm_Genlist_Item_Class itc_1text_1icon_2; + Elm_Genlist_Item_Class itc_2text_2; + Elm_Genlist_Item_Class itc_group_item; + Elm_Genlist_Item_Class itc_bg_1icon; + Elm_Genlist_Item_Class itc_seperator; + Elm_Genlist_Item_Class itc_2text_1icon_3; + Elm_Genlist_Item_Class itc_1text; + Elm_Genlist_Item_Class itc_2text_1icon_4; + Elm_Genlist_Item_Class itc_1text_1icon; + + Setting_Storage_Status internal_status; + Setting_Storage_Status apps_status; + Setting_Storage_Status pics_videos_status; + Setting_Storage_Status audio_status; + Setting_Storage_Status others_status; + + Setting_GenGroupItem_Data *internal; + Setting_GenGroupItem_Data *apps; + Setting_GenGroupItem_Data *pics_videos; + Setting_GenGroupItem_Data *audio; + Setting_GenGroupItem_Data *others; + Setting_GenGroupItem_Data *avail; + + Setting_GenGroupItem_Data *sd_mount; + Setting_GenGroupItem_Data *sd_total; + Setting_GenGroupItem_Data *sd_available; +#if SUPPORT_SD_CARD_FORMAT + Setting_GenGroupItem_Data *sd_format; +#endif + struct mmc_contents *mmc_content; + + /* default storage */ +#if DISABLED_CODE + Setting_GenGroupItem_Data *data_wap; +#endif + Setting_GenGroupItem_Data *data_bt; + Setting_GenGroupItem_Data *data_cmr; + Setting_GenGroupItem_Data *data_vrec; +#if DISABLED_CODE + Setting_GenGroupItem_Data *data_rdo; + Setting_GenGroupItem_Data *data_dvb_h; +#endif + Setting_Done_List_Data miscellaneous_list; /* miscellaneous files list */ + Eina_Bool back_from_misc; /* if true, means back from miscellaneous view*/ + + Ecore_Pipe *pipe; + Eina_Bool exit_flag; + update_type type; + pthread_t tid; + + pthread_mutex_t exit_mutex; + pthread_mutex_t update_mutex; + pthread_cond_t wait_cond; + + Eina_List *files_list; + Evas_Object *popup_progressbar; + Ecore_Timer *timer; +}; + +extern setting_view setting_view_storage_main; +extern setting_view setting_view_storage_default_storage; +extern setting_view setting_view_storage_miscellaneous_files; + +#endif /* __SETTING_STORAGE_H__ */ diff --git a/setting-storage/src/setting-storage-default-storage.c b/setting-storage/src/setting-storage-default-storage.c new file mode 100755 index 0000000..5132cc1 --- /dev/null +++ b/setting-storage/src/setting-storage-default-storage.c @@ -0,0 +1,401 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 + +static int setting_storage_default_storage_create(void *cb); +static int setting_storage_default_storage_destroy(void *cb); +static int setting_storage_default_storage_update(void *cb); +static int setting_storage_default_storage_cleanup(void *cb); +static char* __setting_storage_default_storage_desc_get(setting_int_slp_list slp_key); + +setting_view setting_view_storage_default_storage = { + .create = setting_storage_default_storage_create, + .destroy = setting_storage_default_storage_destroy, + .update = setting_storage_default_storage_update, + .cleanup = setting_storage_default_storage_cleanup, +}; + +static void __setting_storage_default_storage_cancel_cb(void *data, Evas_Object *obj, void *event_info); +static void __setting_storage_default_storage_vconf_change_cb(keynode_t *key, void *data); +static void __setting_storage_default_storage_update_item_status(void *data, Eina_Bool disable_mmc_flag); +static void __setting_storage_default_storage_update_vconf(void *data); + +/* *************************************************** + * + *basic func + * + ***************************************************/ +static void __setting_storage_default_storage_exp_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == data, "data is NULL"); + setting_retm_if(NULL == event_info, "event_info is NULL"); + SettingStorageUG *ad = (SettingStorageUG *) data; + Elm_Object_Item *parentItem = event_info; /* parent item */ + + Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); /* parent data */ + Evas_Object *scroller = elm_object_item_widget_get(parentItem); + + Evas_Object *rgd = NULL; + if ( +#if DISABLED_CODE + data_parentItem == ad->data_wap || +#endif + data_parentItem == ad->data_bt + || data_parentItem == ad->data_cmr + || data_parentItem == ad->data_vrec +#if DISABLED_CODE + || data_parentItem == ad->data_rdo + || data_parentItem == ad->data_dvb_h +#endif + ) { + SETTING_TRACE("start drawing exp menu."); + + rgd = elm_radio_add(scroller); + elm_radio_value_set(rgd, -1); + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + SETTING_DEF_MEMORY_PHONE, + "IDS_COM_BODY_PHONE", + NULL); + + Setting_GenGroupItem_Data *data_memory_card = NULL; + data_memory_card = + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + SETTING_DEF_MEMORY_MMC, + "IDS_COM_BODY_MEMORY_CARD", + NULL); + setting_retm_if(!data_memory_card, "data_memory_card is NULL"); + + int mmc_mode = VCONFKEY_SYSMAN_MMC_REMOVED; + int ret = vconf_get_int(VCONFKEY_SYSMAN_MMC_STATUS, &mmc_mode); + setting_retm_if(ret != 0, "Get vconf failed"); + + /* if mmc card is not mounted, set item disable */ + if (mmc_mode == VCONFKEY_SYSMAN_MMC_REMOVED || + mmc_mode == VCONFKEY_SYSMAN_MMC_INSERTED_NOT_MOUNTED) { + setting_disable_genlist_item(data_memory_card->item); + } + + setting_update_chk_status(rgd, data_parentItem->int_slp_setting_binded); + } +} + +static int setting_storage_default_storage_create(void *cb) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER, "cb is NULL"); + SettingStorageUG *ad = (SettingStorageUG *)cb; + + Evas_Object *scroller = NULL; + Elm_Object_Item *item = NULL; + setting_push_layout_navi_bar_genlist(ad->win_main_layout, ad->win_get, + _(SETTING_STORAGE_DEFAULT_STORAGE_STR), + _("IDS_COM_BODY_BACK"), NULL, + __setting_storage_default_storage_cancel_cb, + NULL, ad, &scroller, ad->navibar); + + setting_enable_expandable_genlist(scroller, ad, + __setting_storage_default_storage_exp_cb, NULL); + + item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + +#if DISABLED_CODE + /* 1 wap downloads */ + ad->data_wap = setting_create_Gendial_exp_parent_field(scroller, &(ad->itc_2text_3_parent), + NULL, NULL, SWALLOW_Type_INVALID, + "IDS_ST_BODY_WAP_DOWNLOADS", + __setting_storage_default_storage_desc_get(INT_SLP_SETTING_DEFAULT_MEM_WAP)); + if (ad->data_wap) { + ad->data_wap->int_slp_setting_binded = INT_SLP_SETTING_DEFAULT_MEM_WAP; + } else { + SETTING_TRACE_ERROR("ad->data_wap is NULL"); + } +#endif + /* 2 bluetooth */ + ad->data_bt = setting_create_Gendial_exp_parent_field(scroller, &(ad->itc_2text_3_parent), + NULL, NULL, SWALLOW_Type_INVALID, + "IDS_COM_BODY_BLUETOOTH", + __setting_storage_default_storage_desc_get(INT_SLP_SETTING_DEFAULT_MEM_BLUETOOTH)); + if (ad->data_bt) { + ad->data_bt->int_slp_setting_binded = INT_SLP_SETTING_DEFAULT_MEM_BLUETOOTH; + } else { + SETTING_TRACE_ERROR("ad->data_bt is NULL"); + } + + /* 3 camera */ + ad->data_cmr = setting_create_Gendial_exp_parent_field(scroller, &(ad->itc_2text_3_parent), + NULL, NULL, SWALLOW_Type_INVALID, + "IDS_COM_BODY_CAMERA", + __setting_storage_default_storage_desc_get(INT_SLP_SETTING_DEFAULT_MEM_CAMERA)); + if (ad->data_cmr) { + ad->data_cmr->int_slp_setting_binded = INT_SLP_SETTING_DEFAULT_MEM_CAMERA; + } else { + SETTING_TRACE_ERROR("ad->data_cmr is NULL"); + } + + /* 4 video recorder */ + ad->data_vrec = setting_create_Gendial_exp_parent_field(scroller, &(ad->itc_2text_3_parent), + NULL, NULL, SWALLOW_Type_INVALID, + "IDS_COM_BODY_VOICE_RECORDER", + __setting_storage_default_storage_desc_get(INT_SLP_SETTING_DEFAULT_MEM_VOICE_RECORDER)); + if (ad->data_vrec) { + ad->data_vrec->int_slp_setting_binded = INT_SLP_SETTING_DEFAULT_MEM_VOICE_RECORDER; + } else { + SETTING_TRACE_ERROR("ad->data_vrec is NULL"); + } + +#if DISABLED_CODE + /* 5 FM radio */ + ad->data_rdo = setting_create_Gendial_exp_parent_field(scroller, &(ad->itc_2text_3_parent), + NULL, NULL, SWALLOW_Type_INVALID, + "IDS_COM_BODY_FM_RADIO", + __setting_storage_default_storage_desc_get(INT_SLP_SETTING_DEFAULT_MEM_FM_RADIO)); + if (ad->data_rdo) { + ad->data_rdo->int_slp_setting_binded = INT_SLP_SETTING_DEFAULT_MEM_FM_RADIO; + } else { + SETTING_TRACE_ERROR("ad->data_rdo is NULL"); + } + + + /* 6 DVB-H */ + ad->data_dvb_h = setting_create_Gendial_exp_parent_field(scroller, &(ad->itc_2text_3_parent), + NULL, NULL, SWALLOW_Type_INVALID, + DVB_H_STR, + __setting_storage_default_storage_desc_get(INT_SLP_SETTING_DEFAULT_MEM_DVB_H)); + if (ad->data_dvb_h) { + ad->data_dvb_h->int_slp_setting_binded = INT_SLP_SETTING_DEFAULT_MEM_DVB_H; + } else { + SETTING_TRACE_ERROR("ad->data_shr is NULL"); + } +#endif + item = elm_genlist_item_append(scroller, &itc_bottom_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + int ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_MMC_STATUS, + __setting_storage_default_storage_vconf_change_cb, ad); + if (ret != 0) { + SETTING_TRACE_ERROR("call vconf_notify_key_changed failed"); + } + + setting_view_storage_default_storage.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int setting_storage_default_storage_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER, "cb is NULL"); + SettingStorageUG *ad = (SettingStorageUG *) cb; + + int ret = vconf_ignore_key_changed(VCONFKEY_SYSMAN_MMC_STATUS, + __setting_storage_default_storage_vconf_change_cb); + if (ret != 0) { + SETTING_TRACE_ERROR("call vconf_ignore_key_changed failed"); + } + + elm_naviframe_item_pop(ad->navibar); + setting_view_storage_default_storage.is_create = 0; + return SETTING_RETURN_SUCCESS; +} + +static int setting_storage_default_storage_update(void *cb) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER, "cb is NULL"); + return SETTING_RETURN_SUCCESS; +} + +static char* __setting_storage_default_storage_desc_get(setting_int_slp_list slp_key) +{ + //SETTING_TRACE_BEGIN; + const char* setting_default_storage_type[SETTING_DEF_MEMORY_MAX] = { + _("IDS_COM_BODY_PHONE"), + _("IDS_COM_BODY_MEMORY_CARD") + }; + int ret = 0; + int value = 0; + int err = -1; + + int mmc_mode = VCONFKEY_SYSMAN_MMC_REMOVED; + ret = vconf_get_int(VCONFKEY_SYSMAN_MMC_STATUS, &mmc_mode); + setting_retvm_if(ret != 0, NULL, "Get vconf failed"); + + /* if mmc card is not mounted, set vconf by 0(phone) */ + if (mmc_mode == VCONFKEY_SYSMAN_MMC_REMOVED || + mmc_mode == VCONFKEY_SYSMAN_MMC_INSERTED_NOT_MOUNTED) { + ret = setting_set_int_slp_key(slp_key, 0, &err); + setting_retvm_if(ret != 0, NULL, "Set vconf failed"); + } + + ret = setting_get_int_slp_key(slp_key, &value, &err); + + switch (slp_key) { + case INT_SLP_SETTING_DEFAULT_MEM_WAP: + case INT_SLP_SETTING_DEFAULT_MEM_BLUETOOTH: + case INT_SLP_SETTING_DEFAULT_MEM_CAMERA: + case INT_SLP_SETTING_DEFAULT_MEM_VOICE_RECORDER: + case INT_SLP_SETTING_DEFAULT_MEM_FM_RADIO: + case INT_SLP_SETTING_DEFAULT_MEM_ALL_SHARE: + case INT_SLP_SETTING_DEFAULT_MEM_ADOBE_AIR: + case INT_SLP_SETTING_DEFAULT_MEM_DVB_H: + { + if (ret == SETTING_RETURN_FAIL + || value >= SETTING_DEF_MEMORY_MAX) + value = SETTING_DEF_MEMORY_PHONE; + return (char *)setting_default_storage_type[value]; + } + break; + + default: + ret = SETTING_GENERAL_ERR_NOT_FIND_VALUE_SWITCH; + break; + } + + return NULL; +} + +static int setting_storage_default_storage_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + return setting_storage_default_storage_destroy(cb); +} + +static void __setting_storage_default_storage_cancel_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "data is NULL"); + + SettingStorageUG *ad = (SettingStorageUG *) data; + setting_view_change(&setting_view_storage_default_storage, + &setting_view_storage_main, ad); +} + +static void __setting_storage_default_storage_vconf_change_cb(keynode_t *key, void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == key, "key is NULL"); + setting_retm_if(NULL == data, "data is NULL"); + SettingStorageUG *ad = (SettingStorageUG *)data; + int status = vconf_keynode_get_int(key); + char *vconf_name = vconf_keynode_get_name(key); + + if (!safeStrCmp(vconf_name, VCONFKEY_SYSMAN_MMC_STATUS)) { + SETTING_TRACE("status:%d", status); + if (VCONFKEY_SYSMAN_MMC_MOUNTED == status) { + __setting_storage_default_storage_update_item_status(ad, EINA_FALSE); + } else { + __setting_storage_default_storage_update_item_status(ad, EINA_TRUE); + } + } +} + +static void __setting_storage_default_storage_update_item_status(void *data, Eina_Bool disable_mmc_flag) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == data, "data is NULL"); + SettingStorageUG *ad = (SettingStorageUG *)data; + +#if DISABLED_CODE + setting_retm_if(NULL == ad->data_wap, "ad->data_wap is NULL"); + setting_retm_if(NULL == ad->data_wap->item, "ad->data_wap->item is NULL"); +#endif + setting_retm_if(NULL == ad->data_bt, "ad->data_bt is NULL"); + setting_retm_if(NULL == ad->data_bt->item, "ad->data_bt->item is NULL"); + setting_retm_if(NULL == ad->data_cmr, "ad->data_cmr is NULL"); + setting_retm_if(NULL == ad->data_vrec, "ad->data_vrec is NULL"); +#if DISABLED_CODE + setting_retm_if(NULL == ad->data_rdo, "ad->data_rdo is NULL"); + setting_retm_if(NULL == ad->data_dvb_h, "ad->data_dvb_h is NULL"); +#endif + + /* first item is data_wap */ + Elm_Object_Item *list_item = ad->data_bt->item; + Setting_GenGroupItem_Data *data_sub_item = NULL; + while (list_item != NULL) { + data_sub_item = (Setting_GenGroupItem_Data *)elm_object_item_data_get(list_item); + + if (data_sub_item == NULL) { + /* data_sub_item is seperator*/ + list_item = elm_genlist_item_next_get(list_item); + continue; + } + SETTING_TRACE("keystr = %s", data_sub_item->keyStr); + /* disable_mmc_flag is true, means mmc is not mounted*/ + if (disable_mmc_flag) { + if (!safeStrCmp(data_sub_item->keyStr, "IDS_COM_BODY_PHONE") && + ! elm_genlist_item_selected_get(list_item)) { + elm_genlist_item_selected_set(list_item, 1); + } else if (!safeStrCmp(data_sub_item->keyStr, "IDS_COM_BODY_MEMORY_CARD")) { + elm_genlist_item_selected_set(list_item, 0); + setting_disable_genlist_item(list_item); + } + } else { + if (!safeStrCmp(data_sub_item->keyStr, "IDS_COM_BODY_MEMORY_CARD") && + elm_object_item_disabled_get(list_item)) { + setting_enable_genlist_item(list_item); + } + } + list_item = elm_genlist_item_next_get(list_item); + } + + /* if mmc is not mounted, update vconf*/ + if (disable_mmc_flag) { +#if DISABLED_CODE + __setting_storage_default_storage_update_vconf(ad->data_wap); +#endif + __setting_storage_default_storage_update_vconf(ad->data_bt); + __setting_storage_default_storage_update_vconf(ad->data_cmr); + __setting_storage_default_storage_update_vconf(ad->data_vrec); +#if DISABLED_CODE + __setting_storage_default_storage_update_vconf(ad->data_rdo); + __setting_storage_default_storage_update_vconf(ad->data_dvb_h); +#endif + } +} + +static void __setting_storage_default_storage_update_vconf(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == data, "data is NULL"); + Setting_GenGroupItem_Data *data_item = (Setting_GenGroupItem_Data *)data; + int err = 0; + int value = 0; + int ret = 0; + + ret = setting_get_int_slp_key(data_item->int_slp_setting_binded, &value, &err); + setting_retm_if(0 != ret, "get vconf failed"); + + /* if mmc card is not mounted, set vconf to 0(phone) */ + if (value != 0) { + ret = setting_set_int_slp_key(data_item->int_slp_setting_binded, 0, &err); + setting_retm_if(ret != 0, "Set vconf failed"); + + G_FREE(data_item->sub_desc); + data_item->sub_desc = (char *)g_strdup(_("IDS_COM_BODY_PHONE")); + elm_object_item_data_set(data_item->item, data_item); + elm_genlist_item_update(data_item->item); + } +} diff --git a/setting-storage/src/setting-storage-main.c b/setting-storage/src/setting-storage-main.c new file mode 100755 index 0000000..22b89e3 --- /dev/null +++ b/setting-storage/src/setting-storage-main.c @@ -0,0 +1,1789 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include +#include +#include + +static int setting_storage_main_create(void *cb); +static int setting_storage_main_destroy(void *cb); +static int setting_storage_main_update(void *cb); +static int setting_storage_main_cleanup(void *cb); + +static void __setting_storage_main_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info); + +setting_view setting_view_storage_main = { + .create = setting_storage_main_create, + .destroy = setting_storage_main_destroy, + .update = setting_storage_main_update, + .cleanup = setting_storage_main_cleanup, +}; + +static Evas_Object *__setting_storage_main_image_add(Evas *evas, char *icon_path, int width, int height) +{ + Evas_Object *image = NULL; + image = evas_object_image_add(evas); + evas_object_size_hint_weight_set(image, 0.0, EVAS_HINT_EXPAND); + evas_object_image_load_size_set(image, width, height); + evas_object_image_file_set(image, icon_path, NULL); + evas_object_image_fill_set(image, 0, 0, width, height); + evas_object_size_hint_min_set(image, width, height); + evas_object_show(image); + + return image; +} + +static char *__gl_text_get(void *data, Evas_Object *obj, const char *part) +{ + retv_if(!data, NULL); + Setting_GenGroupItem_Data *item_data = data; + + if (!safeStrCmp(part, "elm.text.1")) { + return (char *)g_strdup(item_data->keyStr); + } + return NULL; +} + +static Evas_Object *__gl_content_get(void *data, Evas_Object *obj, const char *part) +{ + retv_if(!data, NULL); + Setting_GenGroupItem_Data *item_data = data; + SettingStorageUG *ad = (SettingStorageUG *) item_data->userdata; + + int width = SETTING_STORAGE_ICON_WIDTH; + int height = SETTING_STORAGE_ICON_HEIGHT; + + app_device_orientation_e m = elm_win_rotation_get(ad->win_get); + if(APP_DEVICE_ORIENTATION_90 == m || APP_DEVICE_ORIENTATION_270 == m) { + width = SETTING_STORAGE_ICON_LANDSCAPE_WIDTH; + } else { + width = SETTING_STORAGE_ICON_WIDTH; + } + float temp_size = 0.0; + + /* use size (applications + picture/videos + audio + miscellaneous + available) as 100% */ + double total_size = ad->apps_status.dTotal + ad->pics_videos_status.dTotal + + + ad->audio_status.dTotal + + ad->others_status.dTotal + ad->internal_status.dAvail; + + if (!safeStrCmp(part, "elm.icon")){ + Evas_Object *status_box = NULL; + status_box = elm_box_add(obj); + retvm_if(status_box == NULL, NULL, "Cannot get box"); + item_data->eo_check = status_box; + elm_box_horizontal_set(status_box, 1); + evas_object_size_hint_align_set(status_box, 0.0, EVAS_HINT_FILL); + evas_object_show(status_box); + + Evas *evas = evas_object_evas_get(obj); + + /* apps */ + unsigned int apps_size = 0; + temp_size = ((float)ad->apps_status.dTotal / total_size) * width; + if (temp_size < 1 && temp_size > 0) { + apps_size = 1; + } else { + apps_size = (unsigned int)temp_size; + } + if (apps_size > 0) { + Evas_Object *apps = __setting_storage_main_image_add(evas, SETTING_STORAGE_APPS_ICON_PATH, apps_size, height); + elm_box_pack_end(status_box, apps); + } + + /* pictures, videos */ + unsigned int pics_videos_size = 0; + temp_size = ((float)ad->pics_videos_status.dTotal / total_size) * width; + if (temp_size < 1 && temp_size > 0) { + pics_videos_size = 1; + } else { + pics_videos_size = (unsigned int)temp_size; + } + if (pics_videos_size > 0) { + Evas_Object *pics = __setting_storage_main_image_add(evas, SETTING_STORAGE_PICS_ICON_PATH, pics_videos_size, height); + elm_box_pack_end(status_box, pics); + } + + /* audio */ + unsigned int audio_size = 0; + temp_size = ((float)ad->audio_status.dTotal / total_size) * width; + if (temp_size < 1 && temp_size > 0) { + audio_size = 1; + } else { + audio_size = (unsigned int)temp_size; + } + if (audio_size > 0) { + Evas_Object *audio = __setting_storage_main_image_add(evas, SETTING_STORAGE_AUDIO_ICON_PATH, audio_size, height); + elm_box_pack_end(status_box, audio); + } + + /* Miscellaneous files */ + unsigned int others_size = 0; + temp_size = ((float)ad->others_status.dTotal / total_size) * width; + if (temp_size < 1 && temp_size > 0) { + others_size = 1; + } else { + others_size = (unsigned int)temp_size; + } + if (others_size > 0) { + Evas_Object *misc = __setting_storage_main_image_add(evas, SETTING_STORAGE_MISCES_ICON_PATH, others_size, height); + elm_box_pack_end(status_box, misc); + } + + /* available */ + unsigned int avail_size = 0; + temp_size = ((float)ad->internal_status.dAvail / total_size) * width; + if (temp_size < 1 && temp_size > 0) { + avail_size = 1; + } else { + avail_size = (unsigned int)temp_size; + + int sum = apps_size + pics_videos_size + audio_size + others_size; + if ((sum + avail_size) > width) { + avail_size = width - sum; + } + } + if (avail_size > 0) { + Evas_Object *avail = __setting_storage_main_image_add(evas, SETTING_STORAGE_AVAIL_ICON_PATH, avail_size, height); + elm_box_pack_end(status_box, avail); + } + + return status_box; + } + return NULL; +} + +static void __gl_del(void *data, Evas_Object *obj) +{ + /* SETTING_TRACE_BEGIN; */ + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *) data; + if (item_data) { + G_FREE(item_data->keyStr); + FREE(item_data); + } +} + +static int __setting_storage_main_fs_stat(double *total, double *avail, const char *path) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(NULL == total || NULL == avail, SETTING_RETURN_FAIL, "Null output parameters"); + + struct statvfs s; + + if (!statvfs(path, &s)) { + SETTING_TRACE("f_bsize = %ld f_blocks = %ld f_bavail = %ld f_frsize = %ld", + s.f_bsize, s.f_blocks, s.f_bavail, s.f_frsize); + *total = (double)s.f_frsize * s.f_blocks; + *avail = (double)s.f_bsize * s.f_bavail; + } else { + return SETTING_RETURN_FAIL; + } + + return SETTING_RETURN_SUCCESS; +} + +static int __setting_storage_status_size_transition(double size, char *size_desc) +{ + //SETTING_TRACE_BEGIN; + //SETTING_TRACE("size = %f", size); + double tmp_size = 0.0; + int ret = 0; + if (size < SETTING_STORAGE_MEGABYTE_VALUE) { // size < 1MB: show x.xKB + tmp_size = size / SETTING_STORAGE_KILOBYTE_VALUE; + ret = snprintf(size_desc, SETTING_STORAGE_MAX_STR_LEN, "%4.2lf%s", tmp_size, "KB"); + retv_if(ret < 0, SETTING_RETURN_FAIL); + } else if (size < SETTING_STORAGE_GIGABYTE_VALUE) { // size < 1GB: show x.xMB + tmp_size = size / SETTING_STORAGE_MEGABYTE_VALUE; + ret = snprintf(size_desc, SETTING_STORAGE_MAX_STR_LEN, "%4.2lf%s", tmp_size, "MB"); + retv_if(ret < 0, SETTING_RETURN_FAIL); + } else { // 1G <= size: show x.xGB + tmp_size = size / SETTING_STORAGE_GIGABYTE_VALUE; + ret = snprintf(size_desc, SETTING_STORAGE_MAX_STR_LEN, "%4.2lf%s", tmp_size, "GB"); + retv_if(ret < 0, SETTING_RETURN_FAIL); + } + + return SETTING_RETURN_SUCCESS; +} + + +static void __setting_storage_main_internal_storage_status_get(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingStorageUG *ad = (SettingStorageUG *) data; + + double dTotal = 0.0; + double dAvail = 0.0; + int ret = SETTING_RETURN_SUCCESS; + Setting_Storage_Status internal_status; + + ret = __setting_storage_main_fs_stat(&dTotal, &dAvail, SETTING_STORAGE_OPT_USR_PATH); + setting_retm_if(ret == SETTING_RETURN_FAIL, "get opt status failed"); + internal_status.dTotal = dTotal; + internal_status.dAvail = dAvail; + + ad->internal_status = internal_status; +} + +static bool __setting_storage_main_media_item_cb(media_info_h media, void *data) +{ + //SETTING_TRACE_BEGIN; + setting_retvm_if(media == NULL, true, "media is NULL"); + setting_retvm_if(data == NULL, true, "Data parameter is NULL"); + double *total_size = (double *) data; + + unsigned long long size = 0; + + char *file_path = NULL; + media_info_get_file_path(media, &file_path); + + if (!ecore_file_exists(file_path)) { + FREE(file_path); + return true; + } + FREE(file_path); + + media_info_get_size(media, &size); + //SETTING_TRACE("size : [%lld]", size); + *total_size += size; + + return true; +} + +static double __setting_storage_main_pictures_videos_status_get() +{ + SETTING_TRACE_BEGIN; + double total_size = 0.0; + + int ret = MEDIA_CONTENT_ERROR_NONE; + filter_h filter = NULL; + + /*Set Filter*/ + char *condition = "(MEDIA_TYPE=0 OR MEDIA_TYPE=1) and MEDIA_PATH LIKE \'/opt/usr/%%\'"; /*0-image, 1-video, 2-sound, 3-music, 4-other*/ + + ret = media_filter_create(&filter); + if(ret != MEDIA_CONTENT_ERROR_NONE) { + SETTING_TRACE_ERROR("Fail to create filter"); + return total_size; + } + + ret = media_filter_set_condition(filter, condition, MEDIA_CONTENT_COLLATE_DEFAULT); + if(ret != MEDIA_CONTENT_ERROR_NONE) { + media_filter_destroy(filter); + SETTING_TRACE_ERROR("Fail to set condition"); + return total_size; + } + + ret = media_info_foreach_media_from_db(filter, __setting_storage_main_media_item_cb, &total_size); + if(ret != MEDIA_CONTENT_ERROR_NONE) { + media_filter_destroy(filter); + SETTING_TRACE_ERROR("Fail to get media"); + return total_size; + } + + ret = media_filter_destroy(filter); + if (ret != MEDIA_CONTENT_ERROR_NONE) { + SETTING_TRACE_ERROR("destroy filter failed\n\n"); + return total_size; + } + + return total_size; +} + +static double __setting_storage_main_audio_status_get() +{ + SETTING_TRACE_BEGIN; + + double total_size = 0.0; + + int ret = MEDIA_CONTENT_ERROR_NONE; + filter_h filter = NULL; + + /*Set Filter*/ + char *condition = "MEDIA_TYPE=3 and MEDIA_PATH LIKE \'/opt/usr/%%\'"; /*0-image, 1-video, 2-sound, 3-music, 4-other*/ + + ret = media_filter_create(&filter); + if(ret != MEDIA_CONTENT_ERROR_NONE) { + SETTING_TRACE("Fail to create filter"); + return total_size; + } + + ret = media_filter_set_condition(filter, condition, MEDIA_CONTENT_COLLATE_DEFAULT); + if(ret != MEDIA_CONTENT_ERROR_NONE) { + media_filter_destroy(filter); + SETTING_TRACE("Fail to set condition"); + return total_size; + } + + ret = media_info_foreach_media_from_db(filter, __setting_storage_main_media_item_cb, &total_size); + if(ret != MEDIA_CONTENT_ERROR_NONE) { + media_filter_destroy(filter); + SETTING_TRACE("Fail to get media"); + return total_size; + } + + ret = media_filter_destroy(filter); + if (ret != MEDIA_CONTENT_ERROR_NONE) { + SETTING_TRACE_ERROR("destroy filter failed\n\n"); + return total_size; + } + + return total_size; +} + +static bool __setting_storage_main_other_item_cb(media_info_h media, void *data) +{ + //SETTING_TRACE_BEGIN; + setting_retvm_if(media == NULL, true, "media is NULL"); + setting_retvm_if(data == NULL, true, "Data parameter is NULL"); + double *total_size = (double *) data; + + unsigned long long size = 0; + + char *file_path = NULL; + media_info_get_file_path(media, &file_path); + + if (!ecore_file_exists(file_path)) { + FREE(file_path); + return true; + } + + if (!safeStrNCmp(file_path, PATH1, sizeof(PATH1)) || + !safeStrNCmp(file_path, PATH2, sizeof(PATH2)) || + !safeStrNCmp(file_path, PATH3, sizeof(PATH3)) || + !safeStrNCmp(file_path, PATH4, sizeof(PATH4)) || + !safeStrNCmp(file_path, PATH5, sizeof(PATH5)) || + !safeStrNCmp(file_path, PATH6, sizeof(PATH6)) || + !safeStrNCmp(file_path, PATH7, sizeof(PATH7)) || + !safeStrNCmp(file_path, PATH8, sizeof(PATH8)) || + !safeStrNCmp(file_path, PATH9, sizeof(PATH9))) + { + FREE(file_path); + return true; + } + + media_info_get_size(media, &size); + //SETTING_TRACE("size : [%lld]", size); + *total_size += size; + FREE(file_path); + return true; +} + +/** + * Miscellaneous files is all directories files under /opt/usr/media/ except below default directories: + * ++++++++++++++++++++++++++++++++++++++++++++++++ + * -sh-4.1# ls -all + * total 56 + * drwxrwxrwx 11 app app 4096 Jan 4 12:42 . + * drwxr-xr-x 20 root root 4096 Jan 7 10:09 .. + * drwxr-xr-x 2 root root 4096 Jan 4 08:46 .tmp_download + * drwxr-xr-x 2 app app 4096 Jan 4 08:47 .video-hub + * drwxrwxrwx 2 app app 4096 Oct 5 2012 Camera + * drwxrwxrwx 3 app app 4096 Jan 4 08:46 Downloads + * drwxrwxrwx 2 app app 4096 Oct 5 2012 Images + * drwxrwxrwx 2 app app 4096 Oct 5 2012 Others + * drwxrwxrwx 3 app app 4096 Oct 5 2012 Sounds + * drwxrwxrwx 2 app app 4096 Oct 5 2012 Videos + * drwxrwxrwx 2 app app 16384 Oct 5 2012 lost+found + * ++++++++++++++++++++++++++++++++++++++++++++++++ + */ +static double __setting_storage_main_miscellaneous_size_get() +{ + SETTING_TRACE_BEGIN; + double total_size = 0.0; + + int ret = MEDIA_CONTENT_ERROR_NONE; + filter_h filter = NULL; + + /*Set Filter*/ + char *condition = "(MEDIA_TYPE=4) and MEDIA_PATH LIKE \'/opt/usr/media/%%\'"; + + ret = media_filter_create(&filter); + if(ret != MEDIA_CONTENT_ERROR_NONE) { + SETTING_TRACE_ERROR("Fail to create filter"); + return total_size; + } + + ret = media_filter_set_condition(filter, condition, MEDIA_CONTENT_COLLATE_DEFAULT); + if(ret != MEDIA_CONTENT_ERROR_NONE) { + media_filter_destroy(filter); + SETTING_TRACE_ERROR("Fail to set condition"); + return total_size; + } + + ret = media_info_foreach_media_from_db(filter, __setting_storage_main_other_item_cb, &total_size); + if(ret != MEDIA_CONTENT_ERROR_NONE) { + media_filter_destroy(filter); + SETTING_TRACE_ERROR("Fail to get media"); + return total_size; + } + + ret = media_filter_destroy(filter); + if (ret != MEDIA_CONTENT_ERROR_NONE) { + SETTING_TRACE_ERROR("destroy filter failed"); + return total_size; + } + + return total_size; +} + +static void __setting_storage_main_launch_ug_destroy_cb(ui_gadget_h ug, void *priv) +{ + SETTING_TRACE_BEGIN; + /* restore the '<-' button on the navigate bar */ + retm_if(priv == NULL, "priv is NULL"); + SettingStorageUG *ad = (SettingStorageUG *) priv; + if (ug) { + ug_destroy(ug); + } + Elm_Object_Item *navi_it = elm_naviframe_top_item_get(ad->navibar); + retm_if(navi_it == NULL, "navi_it is NULL"); + Evas_Object *back_btn = elm_object_item_part_content_get(navi_it, "prev_btn"); + + if (back_btn != NULL) { + elm_object_style_set(back_btn, NAVI_BACK_BUTTON_STYLE); /* take into effect */ + } + + setting_view_update(&setting_view_storage_main, ad); +} + +static void __setting_storage_main_launch_ug_layout_cb(ui_gadget_h ug, enum ug_mode mode, void *priv) +{ + SETTING_TRACE_BEGIN; + retm_if(priv == NULL, "priv is NULL"); + SettingStorageUG *ad = (SettingStorageUG *) priv; + Evas_Object *base = NULL; + base = (Evas_Object *) ug_get_layout(ug); + retm_if(base == NULL, "base is NULL"); + + switch (mode) { + case UG_MODE_FULLVIEW: + evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + //elm_win_resize_object_add(ad->win_get, base); + evas_object_show(base); + break; + default: + /* do nothing */ + break; + } +} + +static void __setting_storage_main_launch_manage_app_ug(void *data) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingStorageUG *ad = (SettingStorageUG *) data; + + service_h svc; + if (service_create(&svc)) { + return; + } + + service_add_extra_data(svc, "viewtype", "manage-applications"); + + struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs)); + if (!cbs) { + SETTING_TRACE_ERROR("calloc failed"); + service_destroy(svc); + return; + } + cbs->layout_cb = __setting_storage_main_launch_ug_layout_cb; + cbs->result_cb = NULL; + cbs->destroy_cb = __setting_storage_main_launch_ug_destroy_cb; + cbs->priv = (void *)ad; + + ui_gadget_h ug = ug_create(ad->ug, "setting-manage-applications-efl", UG_MODE_FULLVIEW, svc, cbs); + if (NULL == ug) { /* error handling */ + SETTING_TRACE_ERROR("NULL == ug"); + } + + //bundle_free(b); + service_destroy(svc); + FREE(cbs); +} + +static void __setting_storage_main_app_launch(char *app_name) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(app_name == NULL, "app_name is NULL"); + + app_launcher(app_name); +} + +static void __setting_storage_main_Gendial_mouse_up_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + SettingStorageUG *ad = (SettingStorageUG *) data; + + SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); + + if (isEmulBin()) { + if (!safeStrCmp(SETTING_STORAGE_DEFAULT_STORAGE_STR, list_item->keyStr)) { + setting_view_change(&setting_view_storage_main, + &setting_view_storage_default_storage, ad); + } else if (!safeStrCmp(SETTING_STORAGE_MISCES_STR, list_item->keyStr)) { + setting_view_change(&setting_view_storage_main, + &setting_view_storage_miscellaneous_files, ad); + } else { + // do nothing now + } + } else { + if (!safeStrCmp("IDS_ST_BODY_APPLICATIONS", list_item->keyStr)) { + __setting_storage_main_launch_manage_app_ug(ad); + } else if (!safeStrCmp(SETTING_STORAGE_DEFAULT_STORAGE_STR, list_item->keyStr)) { + setting_view_change(&setting_view_storage_main, + &setting_view_storage_default_storage, ad); + } else if (!safeStrCmp(SETTING_STORAGE_PICS_STR, list_item->keyStr)) { + __setting_storage_main_app_launch("org.tizen.gallery"); + } else if (!safeStrCmp(SETTING_STORAGE_AUDIO_STR, list_item->keyStr)) { + __setting_storage_main_app_launch("org.tizen.music-player"); + } else if (!safeStrCmp(SETTING_STORAGE_MISCES_STR, list_item->keyStr)) { + setting_view_change(&setting_view_storage_main, + &setting_view_storage_miscellaneous_files, ad); + } else { + // do nothing now + } + } +} + +static int __setting_storage_main_check_mmc_status() +{ + int ret = 0; + struct stat parent_stat, mount_stat; + + ret = stat(SETTING_STORAGE_MMC_PATH, &mount_stat); + setting_retvm_if(ret != 0, -1, "get stat error : /opt/storage/sdcard"); + + ret = stat(SETTING_STORAGE_MMC_PARENT_PATH, &parent_stat); + setting_retvm_if(ret != 0, -1, "get stat error : /opt/storage/sdcard/.."); + + /* Does not mounted, same st_dev */ + if(mount_stat.st_dev == parent_stat.st_dev) { + return 0; + } else { /* MMC mounted, diff st_dev */ + return 1; + } +} + +static void __setting_storage_main_sd_card_info_get(char* szTotal, char* szAvail) +{ + int mmc_status = __setting_storage_main_check_mmc_status(); + setting_retm_if(mmc_status == -1, "check mmc status failed"); + + /* Does not mounted, same st_dev */ + if (mmc_status == 0) { + snprintf(szTotal, SETTING_STORAGE_MAX_STR_LEN, "%s", _("IDS_ST_HEADER_UNAVAILABLE")); + snprintf(szAvail, SETTING_STORAGE_MAX_STR_LEN, "%s", _("IDS_ST_HEADER_UNAVAILABLE")); + } + /* MMC mounted, diff st_dev */ + else { + double dTotal = 0.0; + double dAvail = 0.0; + + int ret = SETTING_RETURN_SUCCESS; + ret = __setting_storage_main_fs_stat(&dTotal, &dAvail, SETTING_STORAGE_MMC_PATH); + setting_retm_if(ret == SETTING_RETURN_FAIL, "get sd card size detail failed"); + + ret = __setting_storage_status_size_transition(dTotal, szTotal); + setting_retm_if(ret == SETTING_RETURN_FAIL, "__setting_storage_status_size_transition failed"); + + ret = __setting_storage_status_size_transition(dAvail, szAvail); + setting_retm_if(ret == SETTING_RETURN_FAIL, "__setting_storage_status_size_transition failed"); + + SETTING_TRACE("Total[%s], Avail[%s]", szTotal, szAvail); + } +} + +static int __setting_storage_main_mmc_content_init(void *data, setting_storage_mmc_cb cb) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(NULL == data, SETTING_RETURN_FAIL, "data is NULL"); + setting_retvm_if(NULL == cb, SETTING_RETURN_FAIL, "cb is NULL"); + SettingStorageUG *ad = (SettingStorageUG *)data; + if (ad->mmc_content == NULL) { + ad->mmc_content = (struct mmc_contents *)calloc(1, sizeof(struct mmc_contents)); + if (ad->mmc_content == NULL ) { + SETTING_TRACE_ERROR("calloc failed"); + return SETTING_RETURN_FAIL; + } + } + ad->mmc_content->mmc_cb = cb; + ad->mmc_content->user_data = ad; + return SETTING_RETURN_SUCCESS; +} + +#if SUPPORT_SD_CARD_FORMAT +static void __setting_storage_status_sd_card_popup_format_response_cb(void *data, + Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingStorageUG *ad = (SettingStorageUG *)data; + + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + + char sd_total[SETTING_STORAGE_MAX_STR_LEN] = { 0, }; + char sd_available[SETTING_STORAGE_MAX_STR_LEN] = { 0, }; + __setting_storage_main_sd_card_info_get(sd_total, sd_available); + + if (ad->sd_total) { + G_FREE(ad->sd_total->sub_desc); + ad->sd_total->sub_desc = (char *)g_strdup(sd_total); + elm_object_item_data_set(ad->sd_total->item, ad->sd_total); + elm_genlist_item_update(ad->sd_total->item); + } + if (ad->sd_available) { + G_FREE(ad->sd_available->sub_desc); + ad->sd_available->sub_desc = (char *)g_strdup(sd_available); + elm_object_item_data_set(ad->sd_available->item, ad->sd_available); + elm_genlist_item_update(ad->sd_available->item); + } +} +#endif + +static void __setting_storage_status_sd_card_popup_response_cb(void *data, + Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingStorageUG *ad = (SettingStorageUG *)data; + + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } +} + +static void __setting_storage_main_sd_card_mount_cb(int val, void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingStorageUG *ad = (SettingStorageUG *) data; + + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + + char *desc = NULL; + if (val == SETTING_STORAGE_SYSMAN_REQUEST_SUCCESS) { + /* do nothing */ + SETTING_TRACE("mount success"); + return; + } else if (val == SETTING_STORAGE_SYSMAN_REQUEST_MOUNT_ALREADY) { + desc = _(SETTING_STORAGE_SD_CARD_MOUNT_ALREADY_DESC); + } else { + desc = _("IDS_COM_POP_FAILED"); + } + + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, NULL, desc, + __setting_storage_status_sd_card_popup_response_cb, + SETTING_STORAGE_POPUP_TIMER, FALSE, FALSE); +} + +static void __setting_storage_main_sd_card_unmount_cb(int val, void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingStorageUG *ad = (SettingStorageUG *) data; + + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + + if (val == SETTING_STORAGE_SYSMAN_REQUEST_SUCCESS) { + /* do nothing */ + SETTING_TRACE("unmount success"); + return; + } else { + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_COM_POP_FAILED"), + __setting_storage_status_sd_card_popup_response_cb, + SETTING_STORAGE_POPUP_TIMER, FALSE, FALSE); + } +} + +static void __setting_storage_main_sd_card_mount_unmount(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingStorageUG *ad = (SettingStorageUG *)data; + + int mmc_status = __setting_storage_main_check_mmc_status(); + setting_retm_if(mmc_status == -1, "check mmc status failed"); + + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + + /* Show progressbar popup */ + ad->popup = setting_create_popup_with_progressbar(ad, ad->win_get, + "pending_list", NULL, NULL, + __setting_storage_status_sd_card_popup_response_cb, + SETTING_STORAGE_PROGRESSBAR_TIMEOUT, TRUE, TRUE); + + int ret = -1; + /* Does not mounted, same st_dev */ + if (mmc_status == 0) { + ret = __setting_storage_main_mmc_content_init(ad, __setting_storage_main_sd_card_mount_cb); + if (ret == SETTING_RETURN_FAIL) { + SETTING_TRACE_ERROR("__setting_storage_main_mmc_content_init fail"); + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, + NULL, _("IDS_COM_POP_FAILED"), + __setting_storage_status_sd_card_popup_response_cb, + SETTING_STORAGE_POPUP_TIMER, FALSE, FALSE); + return; + } + ret = sysman_request_mount_mmc(ad->mmc_content); + if (ret == -1) { + SETTING_TRACE_ERROR("fail to call sysman_request_mount_mmc"); + } + } + /* MMC mounted, diff st_dev */ + else { + ret = __setting_storage_main_mmc_content_init(ad, __setting_storage_main_sd_card_unmount_cb); + if (ret == SETTING_RETURN_FAIL) { + SETTING_TRACE_ERROR("__setting_storage_main_sd_card_unmount_cb fail"); + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, + NULL, _("IDS_COM_POP_FAILED"), + __setting_storage_status_sd_card_popup_response_cb, + SETTING_STORAGE_POPUP_TIMER, FALSE, FALSE); + return; + } + + ret = sysman_request_unmount_mmc(ad->mmc_content, + MNT_FORCE); /* 1 = MNT_FORCE */ + if (ret == -1) { + SETTING_TRACE_ERROR("fail to call sysman_request_unmount_mmc"); + } + } + + /* if fail, popup failed info */ + if (ret == -1) { + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, + NULL, _("IDS_COM_POP_FAILED"), + __setting_storage_status_sd_card_popup_response_cb, + SETTING_STORAGE_POPUP_TIMER, FALSE, FALSE); + } +} + +#if SUPPORT_SD_CARD_FORMAT +static void __setting_storage_main_sd_card_scan_cb(media_content_error_e err, void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingStorageUG *ad = (SettingStorageUG *) data; + + SETTING_TRACE("scan_cb result = %d", err); + + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + + if (err == MEDIA_CONTENT_ERROR_NONE) { + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_COM_POP_SUCCESS"), + __setting_storage_status_sd_card_popup_format_response_cb, + SETTING_STORAGE_POPUP_TIMER, FALSE, FALSE); + + } else { + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_COM_POP_FAILED"), + __setting_storage_status_sd_card_popup_response_cb, + SETTING_STORAGE_POPUP_TIMER, FALSE, FALSE); + } +} + +static void __setting_storage_main_sd_card_format_cb(int val, void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingStorageUG *ad = (SettingStorageUG *) data; + + if (val == SETTING_STORAGE_SYSMAN_REQUEST_SUCCESS) { + int ret = media_content_scan_folder(SETTING_STORAGE_MMC_PATH, __setting_storage_main_sd_card_scan_cb, ad); + + if(ret != MEDIA_CONTENT_ERROR_NONE) { + SETTING_TRACE_ERROR("Fail to media_content_scan_file : %d", ret); + return; + } + } else { + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_COM_POP_FAILED"), + __setting_storage_status_sd_card_popup_response_cb, + SETTING_STORAGE_POPUP_TIMER, FALSE, FALSE); + } +} + +static void __setting_storage_main_sd_card_format_popup_yes(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingStorageUG *ad = (SettingStorageUG *) data; + + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + + /* Show Formatting..... popup */ + ad->popup = setting_create_popup_with_progressbar(ad, ad->win_get, + "pending_list", NULL, + NULL, NULL, + 0, TRUE, TRUE); + + int ret = __setting_storage_main_mmc_content_init(ad, __setting_storage_main_sd_card_format_cb); + if (ret == SETTING_RETURN_FAIL) { + SETTING_TRACE_ERROR("__setting_storage_main_mmc_content_init fail"); + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, + NULL, _("IDS_COM_POP_FAILED"), + __setting_storage_status_sd_card_popup_response_cb, + SETTING_STORAGE_POPUP_TIMER, FALSE, FALSE); + return; + } + + ret = sysman_request_format_mmc(ad->mmc_content); + /* if fail, destory popup */ + if (ret == -1) { + SETTING_TRACE_ERROR("fail to call sysman_request_format_mmc"); + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, + NULL, _("IDS_COM_POP_FAILED"), + __setting_storage_status_sd_card_popup_response_cb, + SETTING_STORAGE_POPUP_TIMER, FALSE, FALSE); + } +} + +static void __setting_storage_main_sd_card_format_popup_no(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingStorageUG *ad = (SettingStorageUG *) data; + + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } +} + +static void __setting_storage_main_sd_card_ask_format_resp_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + int response_type = btn_type(obj); + if (POPUP_RESPONSE_OK == response_type) { + __setting_storage_main_sd_card_format_popup_yes(data); + } else if (POPUP_RESPONSE_CANCEL == response_type) { + __setting_storage_main_sd_card_format_popup_no(data); + } +} + +static void __setting_storage_main_sd_card_format_popup_create(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingStorageUG *ad = (SettingStorageUG *) data; + + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + + ad->popup = setting_create_popup_with_btn(ad, ad->win_get, NULL, + _(SETTING_STORAGE_FORMAT_ASK_MSG), + __setting_storage_main_sd_card_ask_format_resp_cb, 0, + 2, _("IDS_COM_SK_YES"),_("IDS_COM_SK_NO")); +} +#endif + +static void __setting_storage_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + setting_retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + + SettingStorageUG *ad = (SettingStorageUG *) data; + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); + + int db_status = 0; + int ret = vconf_get_int(VCONFKEY_FILEMANAGER_DB_STATUS, &db_status); + setting_retm_if(ret != 0, "fail to get vconf"); + + /* if SD card is busy, show popup */ + if (db_status != VCONFKEY_FILEMANAGER_DB_UPDATED) { + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, + NULL, _("IDS_ST_BODY_SORRY_YOUR_SD_CARD_IS_BUSY"), + __setting_storage_status_sd_card_popup_response_cb, + SETTING_STORAGE_POPUP_TIMER, FALSE, FALSE); + return; + } + + if (list_item == ad->sd_mount) { + __setting_storage_main_sd_card_mount_unmount(ad); + } +#if SUPPORT_SD_CARD_FORMAT + else if (list_item == ad->sd_format) { + __setting_storage_main_sd_card_format_popup_create(ad); + } +#endif +} + +static void __setting_storage_main_sd_card_info_append(void* data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingStorageUG *ad = (SettingStorageUG *) data; + + /* remove the sd info items */ + if (ad->sd_mount) { + elm_object_item_del(ad->sd_mount->item); + ad->sd_mount = NULL; + } + if (ad->sd_total) { + elm_object_item_del(ad->sd_total->item); + ad->sd_total = NULL; + } + if (ad->sd_available) { + elm_object_item_del(ad->sd_available->item); + ad->sd_available = NULL; + } +#if SUPPORT_SD_CARD_FORMAT + if (ad->sd_format) { + elm_object_item_del(ad->sd_format->item); + ad->sd_format = NULL; + } +#endif + int mmc_mode = VCONFKEY_SYSMAN_MMC_REMOVED; + int ret = vconf_get_int(VCONFKEY_SYSMAN_MMC_STATUS, &mmc_mode); + setting_retm_if(ret != 0, "Get vconf failed"); + + if (mmc_mode == VCONFKEY_SYSMAN_MMC_REMOVED) { + ad->sd_mount = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_2text_2), NULL, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, SETTING_STORAGE_MOUNT_STR, + _(SETTING_STORAGE_INSERT_STR), + NULL); + if (ad->sd_mount) { + setting_disable_genlist_item(ad->sd_mount->item); + } + } else if (mmc_mode == VCONFKEY_SYSMAN_MMC_INSERTED_NOT_MOUNTED) { + ad->sd_mount = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_2text_2), + __setting_storage_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, SETTING_STORAGE_MOUNT_STR, + _(SETTING_STORAGE_INSERT_STR), + NULL); + } else if (mmc_mode == VCONFKEY_SYSMAN_MMC_MOUNTED) { + char sd_total[SETTING_STORAGE_MAX_STR_LEN] = { 0, }; + char sd_available[SETTING_STORAGE_MAX_STR_LEN] = { 0, }; + __setting_storage_main_sd_card_info_get(sd_total, sd_available); + + ad->sd_total = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_2text_2), NULL, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, "IDS_ST_BODY_TOTAL_SPACE", + sd_total, + NULL); + if (ad->sd_total) { + ad->sd_total->userdata = ad; + elm_genlist_item_select_mode_set(ad->sd_total->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("ad->sd_total is NULL"); + } + + ad->sd_available = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_2text_2), NULL, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, "IDS_ST_BODY_AVAILABLE_SPACE", + sd_available, + NULL); + if (ad->sd_available) { + ad->sd_available->userdata = ad; + elm_genlist_item_select_mode_set(ad->sd_available->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("ad->sd_available is NULL"); + } + + ad->sd_mount = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_1text), + __setting_storage_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, "IDS_ST_BODY_UNMOUNT_SD_CARD", NULL, + NULL); + if (ad->sd_mount) { + ad->sd_mount->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->sd_mount is NULL"); + } + +#if SUPPORT_SD_CARD_FORMAT + ad->sd_format = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_1text), + __setting_storage_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, + "IDS_ST_BODY_FORMAT_SD_CARD", + NULL, NULL); + if (ad->sd_format) { + ad->sd_format->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->sd_format is NULL"); + } +#endif + } else { + SETTING_TRACE_ERROR("error status of sd card"); + } + + Elm_Object_Item *item = NULL; + item = elm_genlist_item_append(ad->genlist, &itc_bottom_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); +} + +static void __setting_storage_vconf_change_cb(keynode_t *key, void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == key, "key is NULL"); + setting_retm_if(NULL == data, "data is NULL"); + SettingStorageUG *ad = (SettingStorageUG *)data; + int status = vconf_keynode_get_int(key); + char *vconf_name = vconf_keynode_get_name(key); + + if (!safeStrCmp(vconf_name, VCONFKEY_SYSMAN_MMC_STATUS)) { + SETTING_TRACE("status:%d", status); + /* remove last item -> seperator */ + Elm_Object_Item *last_item = NULL; + last_item = elm_genlist_last_item_get(ad->genlist); + if (last_item) { + elm_object_item_del(last_item); + } + __setting_storage_main_sd_card_info_append(ad); + } +} + +static void __setting_storage_main_genlist_update(Setting_GenGroupItem_Data *data, Setting_Storage_Status status) +{ + //SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *) data; + + char desc[SETTING_STORAGE_MAX_STR_LEN + 1] = {0,}; + int ret = __setting_storage_status_size_transition(status.dTotal, desc); + setting_retm_if(ret == SETTING_RETURN_FAIL, "failed to transform") + + G_FREE(item_data->sub_desc); + item_data->sub_desc = (char *)g_strdup(desc); + elm_object_item_data_set(item_data->item, item_data); + elm_genlist_item_update(item_data->item); +} + +static ail_cb_ret_e __setting_storage_main_appinfo_func_cb(const ail_appinfo_h ail_info, void *data) +{ + Eina_List **apps_list = (Eina_List **) data; + + char *pkg_name = NULL; + char *pkg_type = NULL; + + ail_appinfo_get_str(ail_info, AIL_PROP_PACKAGE_STR, &pkg_name); + setting_retvm_if(pkg_name == NULL, AIL_CB_RET_CONTINUE, "get pkg_name failed"); + + ail_appinfo_get_str(ail_info, AIL_PROP_X_SLP_PACKAGETYPE_STR, &pkg_type); + setting_retvm_if(pkg_type == NULL, AIL_CB_RET_CONTINUE, "get pkg_type failed"); + + App_Info *app_info = (App_Info*)calloc(1, sizeof(App_Info)); + setting_retvm_if(app_info == NULL, AIL_CB_RET_CONTINUE, "failed to calloc"); + + app_info->pkg_name = (char *)g_strdup(pkg_name); + app_info->pkg_type = (char *)g_strdup(pkg_type); + *apps_list = eina_list_append(*apps_list, app_info); + return AIL_CB_RET_CONTINUE; +} + +static void __setting_storage_main_applications_list_get(Eina_List **apps_list) +{ + SETTING_TRACE_BEGIN; + /* get app_info from AIL */ + ail_filter_h filter_rpm = NULL; + ail_filter_h filter_wrt = NULL; + ail_filter_h filter_tpk = NULL; + + ail_filter_new(&filter_rpm); + ail_filter_new(&filter_wrt); + ail_filter_new(&filter_tpk); + + ail_filter_add_str(filter_rpm, AIL_PROP_X_SLP_PACKAGETYPE_STR, RPM_PREFIX); + ail_filter_add_str(filter_wrt, AIL_PROP_X_SLP_PACKAGETYPE_STR, WRT_PREFIX); + ail_filter_add_str(filter_tpk, AIL_PROP_X_SLP_PACKAGETYPE_STR, TPK_PREFIX); + + ail_filter_list_appinfo_foreach(filter_rpm, __setting_storage_main_appinfo_func_cb, (void*)apps_list); + ail_filter_list_appinfo_foreach(filter_wrt, __setting_storage_main_appinfo_func_cb, (void*)apps_list); + ail_filter_list_appinfo_foreach(filter_tpk, __setting_storage_main_appinfo_func_cb, (void*)apps_list); + + ail_filter_destroy(filter_rpm); + ail_filter_destroy(filter_wrt); + ail_filter_destroy(filter_tpk); +} + +static double __setting_storage_main_applications_status_get(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(data == NULL, 0.0, "Data parameter is NULL"); + SettingStorageUG *ad = (SettingStorageUG *)data; + + Eina_List *apps_list = NULL; + __setting_storage_main_applications_list_get(&apps_list); + + SETTING_TRACE("count = %d", eina_list_count(apps_list)); + + double total_size = 0.0; + + Eina_List *l = NULL; + App_Info *app_info = NULL; + EINA_LIST_FOREACH (apps_list, l, app_info) + { + int exit_flag = 0; + pthread_mutex_lock(&ad->exit_mutex); + exit_flag = ad->exit_flag; + pthread_mutex_unlock(&ad->exit_mutex); + + if (exit_flag == 1) { + SETTING_TRACE("exit_flag is 1"); + break; + } + + //SETTING_TRACE("pkg_name: %s ", app_info->pkg_name); + //SETTING_TRACE("pkg_type: %s", app_info->pkg_type); + pkgmgr_info *pkg_info = pkgmgr_info_new(app_info->pkg_type, app_info->pkg_name); + if (!pkg_info) { + //SETTING_TRACE("pkg_info is null, couldn't get the sizes"); + app_info->total_size = 0; + } else { + char *buf = NULL; + buf = pkgmgr_info_get_string(pkg_info, STR_INSTALLED_SIZE); + if (buf) { + //SETTING_TRACE("size : %s", buf); + app_info->total_size = atoi(buf); + G_FREE(buf); + } else { + app_info->total_size = 0; + } + pkgmgr_info_free(pkg_info); + } + + total_size += app_info->total_size; + } + + /* free the list */ + Eina_List *tmp = NULL; + app_info = NULL; + EINA_LIST_FOREACH(apps_list, tmp, app_info) + { + G_FREE(app_info->pkg_name); + G_FREE(app_info->pkg_type); + FREE(app_info); + } + eina_list_free(apps_list); + apps_list = NULL; + + return total_size; +} + +void __setting_storage_main_pipe_cb(void *data, void *buffer, unsigned int nbyte) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + setting_retm_if(buffer == NULL, "buffer parameter is NULL"); + SettingStorageUG *ad = (SettingStorageUG *)data; + + Update_Info *update_info = (Update_Info *) buffer; + + SETTING_TRACE("update_info : %d", update_info->type); + + switch (update_info->type) { + case SETTING_STORAGE_APPLICATIONS: + { + ad->apps_status.dTotal = update_info->total_size; + __setting_storage_main_genlist_update(ad->apps, ad->apps_status); + } + break; + case SETTING_STORAGE_PICTURES_VIDEO: + { + ad->pics_videos_status.dTotal = update_info->total_size; + __setting_storage_main_genlist_update(ad->pics_videos, ad->pics_videos_status); + } + break; + case SETTING_STORAGE_AUDIO: + { + ad->audio_status.dTotal = update_info->total_size; + __setting_storage_main_genlist_update(ad->audio, ad->audio_status); + } + break; + case SETTING_STORAGE_MISCELLANEOUS: + { + ad->others_status.dTotal = update_info->total_size; + __setting_storage_main_genlist_update(ad->others, ad->others_status); + } + break; + default: + /* do nothing*/ + SETTING_TRACE_ERROR("wrong update type"); + break; + } + + __setting_storage_main_genlist_update(ad->internal, ad->internal_status); + + SETTING_TRACE_END; +} + +static void *__setting_storage_main_thread_start_routine(void *data) +{ + SETTING_TRACE("==== sub thread id = %d =====", (int)pthread_self()); + SETTING_TRACE_BEGIN; + setting_retvm_if(data == NULL, NULL, "Data parameter is NULL"); + SettingStorageUG *ad = (SettingStorageUG *)data; + + //Ecore_Pipe *pipe = ad->pipe; + update_type type = SETTING_STORAGE_PICTURES_VIDEO; + while (1) { + pthread_mutex_lock(&ad->update_mutex); + while (ad->type == SETTING_STORAGE_SLEEP) { + /* wait to be waked up*/ + pthread_cond_wait(&ad->wait_cond, &ad->update_mutex); + } + type = ad->type; + pthread_mutex_unlock(&ad->update_mutex); + + SETTING_TRACE("thread start to work, update type = %d", type); + + int exit_flag = 0; + + pthread_mutex_lock(&ad->exit_mutex); + exit_flag = ad->exit_flag; + pthread_mutex_unlock(&ad->exit_mutex); + + if (exit_flag == 1) { + SETTING_TRACE("exit_flag is 1"); + break; + } + + if (type >= SETTING_STORAGE_MAX) { + SETTING_TRACE("work is done, thread will sleep"); + pthread_mutex_lock(&ad->update_mutex); + ad->type = SETTING_STORAGE_SLEEP; + pthread_mutex_unlock(&ad->update_mutex); + continue; + } + + switch (type) { + case SETTING_STORAGE_PICTURES_VIDEO: + { + /* get pictures and videos info */ + double pics_videos_size = __setting_storage_main_pictures_videos_status_get(); + SETTING_TRACE("pics_videos_size = %f", pics_videos_size); + + Update_Info pics_videos_info; + memset(&pics_videos_info, 0, sizeof(Update_Info)); + pics_videos_info.type = SETTING_STORAGE_PICTURES_VIDEO; + pics_videos_info.total_size = pics_videos_size; + if (ad->pipe) + ecore_pipe_write(ad->pipe, &pics_videos_info, sizeof(pics_videos_info)); + } + break; + case SETTING_STORAGE_AUDIO: + { + /* get audio info */ + double audio_size = __setting_storage_main_audio_status_get(); + SETTING_TRACE("audio_size = %f", audio_size); + + Update_Info audio_info; + memset(&audio_info, 0, sizeof(Update_Info)); + audio_info.type = SETTING_STORAGE_AUDIO; + audio_info.total_size = audio_size; + if (ad->pipe) + ecore_pipe_write(ad->pipe, &audio_info, sizeof(audio_info)); + } + break; + case SETTING_STORAGE_MISCELLANEOUS: + { + /* get miscellaneous files info */ + double misc_size = __setting_storage_main_miscellaneous_size_get(); + SETTING_TRACE("misc_size = %f", misc_size); + + Update_Info misc_info; + memset(&misc_info, 0, sizeof(Update_Info)); + misc_info.type = SETTING_STORAGE_MISCELLANEOUS; + misc_info.total_size = misc_size; + if (ad->pipe) + ecore_pipe_write(ad->pipe, &misc_info, sizeof(misc_info)); + } + break; + case SETTING_STORAGE_APPLICATIONS: + { + /* get apps info */ + double apps_size = __setting_storage_main_applications_status_get(ad); + SETTING_TRACE("apps_size = %f", apps_size); + + Update_Info apps_info; + memset(&apps_info, 0, sizeof(Update_Info)); + apps_info.type = SETTING_STORAGE_APPLICATIONS; + apps_info.total_size = apps_size; + if (ad->pipe) + ecore_pipe_write(ad->pipe, &apps_info, sizeof(apps_info)); + } + break; + default: + { + SETTING_TRACE("type = %d", type); + break; + } + } + + pthread_mutex_lock(&ad->update_mutex); + ad->type++; + SETTING_TRACE("ad->type = %d", ad->type); + pthread_mutex_unlock(&ad->update_mutex); + } + SETTING_TRACE_END; + pthread_exit((void *) 0); + ad->tid = 0; +} + +static void __setting_storage_main_init(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingStorageUG *ad = (SettingStorageUG *)data; + + pthread_mutex_init(&ad->exit_mutex, NULL); + pthread_mutex_init(&ad->update_mutex, NULL); + pthread_cond_init(&ad->wait_cond, NULL); + + pthread_mutex_lock(&ad->exit_mutex); + ad->exit_flag = EINA_FALSE; + pthread_mutex_unlock(&ad->exit_mutex); + + pthread_mutex_lock(&ad->update_mutex); + ad->type = SETTING_STORAGE_PICTURES_VIDEO; + pthread_mutex_unlock(&ad->update_mutex); + + ad->internal_status.dAvail = 0.0; + ad->internal_status.dTotal= 0.0; + + ad->apps_status.dAvail = 0.0; + ad->apps_status.dTotal= 0.0; + + ad->pics_videos_status.dAvail = 0.0; + ad->pics_videos_status.dTotal= 0.0; + + ad->audio_status.dAvail = 0.0; + ad->audio_status.dTotal= 0.0; + + ad->others_status.dAvail = 0.0; + ad->others_status.dTotal= 0.0; +} + +/* *************************************************** + * + *basic func + * + ***************************************************/ +static int setting_storage_main_create(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingStorageUG *ad = (SettingStorageUG *) cb; + + __setting_storage_main_init(ad); + + int ret = SETTING_RETURN_SUCCESS; + + retvm_if(ad->win_main_layout == NULL, SETTING_DRAW_ERR_FAIL_LOAD_EDJ, + "win_main_layout is NULL"); + + ad->ly_main = + setting_create_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _(KeyStr_Storage), + _("IDS_COM_BODY_BACK"), + NULL, + __setting_storage_main_click_softkey_back_cb, + NULL, + ad, &ad->genlist, &ad->navibar); + + ad->itc_2text_1icon_4.item_style = "dialogue/2text.1icon.4"; + ad->itc_2text_1icon_4.func.text_get = __gl_text_get; + ad->itc_2text_1icon_4.func.content_get = __gl_content_get; + ad->itc_2text_1icon_4.func.state_get = NULL; + ad->itc_2text_1icon_4.func.del = __gl_del; + + __setting_storage_main_internal_storage_status_get(ad); + + Elm_Object_Item *item = NULL; + + bool is_emulator = isEmulBin(); + + if (!is_emulator) { + item = elm_genlist_item_append(ad->genlist, &itc_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* Default storage */ + setting_create_Gendial_field_def(ad->genlist, &(ad->itc_1text), + __setting_storage_main_Gendial_mouse_up_cb, + ad, SWALLOW_Type_INVALID, NULL, NULL, + 0, SETTING_STORAGE_DEFAULT_STORAGE_STR, + NULL, NULL); + } + + setting_create_Gendial_field_titleItem(ad->genlist, &(ad->itc_group_item), + SETTING_STORAGE_INTERNAL_STORAGE_STR, + NULL); + + /* Total space */ + char total_desc[SETTING_STORAGE_MAX_STR_LEN + 1] = {0,}; + ret = __setting_storage_status_size_transition(ad->internal_status.dTotal, total_desc); + setting_retvm_if(ret == SETTING_RETURN_FAIL, SETTING_RETURN_FAIL, "failed to transform") + + /* status */ + ad->internal = (Setting_GenGroupItem_Data *) calloc(1, sizeof(Setting_GenGroupItem_Data)); + setting_retvm_if(!ad->internal, SETTING_RETURN_FAIL, "calloc failed"); + + if (ad->internal) { + ad->internal->userdata = ad; + ad->internal->keyStr = (char *)g_strdup(total_desc); + ad->internal->item = elm_genlist_item_append(ad->genlist, &(ad->itc_2text_1icon_4), ad->internal, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(ad->internal->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("ad->internal is NULL"); + return SETTING_RETURN_FAIL; + } + + /* Applications */ + ad->apps = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_2text_1icon_3), + __setting_storage_main_Gendial_mouse_up_cb, + ad, SWALLOW_Type_INVALID, SETTING_STORAGE_APPS_ICON_PATH, + NULL, 0, "IDS_ST_BODY_APPLICATIONS", + _("IDS_ST_HEADER_PLEASE_WAIT"), NULL); + if (ad->apps) { + ad->apps->userdata = ad; + if (is_emulator) { + elm_genlist_item_select_mode_set(ad->apps->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } + } else { + SETTING_TRACE_ERROR("ad->apps is NULL"); + return SETTING_RETURN_FAIL; + } + + /* Pictures, Videos */ + ad->pics_videos = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_2text_1icon_3), + __setting_storage_main_Gendial_mouse_up_cb, + ad, SWALLOW_Type_INVALID, SETTING_STORAGE_PICS_ICON_PATH, + NULL, 0, SETTING_STORAGE_PICS_STR, + _("IDS_ST_HEADER_PLEASE_WAIT"), NULL); + if (ad->pics_videos) { + ad->pics_videos->userdata = ad; + if (is_emulator) { + elm_genlist_item_select_mode_set(ad->pics_videos->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } + } else { + SETTING_TRACE_ERROR("ad->pics_videos is NULL"); + return SETTING_RETURN_FAIL; + } + + /* Audio */ + ad->audio = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_2text_1icon_3), + __setting_storage_main_Gendial_mouse_up_cb, + ad, SWALLOW_Type_INVALID, SETTING_STORAGE_AUDIO_ICON_PATH, + NULL, 0, SETTING_STORAGE_AUDIO_STR, + _("IDS_ST_HEADER_PLEASE_WAIT"), NULL); + if (ad->audio) { + ad->audio->userdata = ad; + + if (is_emulator) { + elm_genlist_item_select_mode_set(ad->audio->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } + } else { + SETTING_TRACE_ERROR("ad->audio is NULL"); + return SETTING_RETURN_FAIL; + } + + /* Miscellaneous files */ + ad->others = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_2text_1icon_3), + __setting_storage_main_Gendial_mouse_up_cb, + ad, SWALLOW_Type_INVALID, SETTING_STORAGE_MISCES_ICON_PATH, + NULL, 0, SETTING_STORAGE_MISCES_STR, + _("IDS_ST_HEADER_PLEASE_WAIT"), NULL); + if (ad->others) { + ad->others->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->others is NULL"); + return SETTING_RETURN_FAIL; + } + + /* Available */ + char avail_desc[SETTING_STORAGE_MAX_STR_LEN + 1] = {0,}; + ret = __setting_storage_status_size_transition(ad->internal_status.dAvail, avail_desc); + setting_retvm_if(ret == SETTING_RETURN_FAIL, SETTING_RETURN_FAIL, "failed to transform") + + ad->avail = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_2text_1icon_3), NULL, + ad, SWALLOW_Type_INVALID, SETTING_STORAGE_AVAIL_ICON_PATH, + NULL, 0, SETTING_STORAGE_AVAIL_STR, + avail_desc, NULL); + if (ad->avail) { + ad->avail->userdata = ad; + elm_genlist_item_select_mode_set(ad->avail->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("ad->avail is NULL"); + return SETTING_RETURN_FAIL; + } + + if (!is_emulator) { +#if DISABLED_CODE + /* Format USB storage */ + setting_create_Gendial_field_def(ad->genlist, &(ad->itc_1text), NULL, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, + SETTING_STORAGE_FORMAT_STR, + NULL, NULL); + + setting_create_Gendial_field_def(ad->genlist, &(ad->itc_bg_1icon), NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, SETTING_STORAGE_FORMAT_DESC_STR, NULL, + NULL); +#endif + + /* SD card info */ + setting_create_Gendial_field_titleItem(ad->genlist, &(ad->itc_group_item), + "IDS_ST_BODY_SD_CARD", NULL); + __setting_storage_main_sd_card_info_append(ad); + + ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_MMC_STATUS, + __setting_storage_vconf_change_cb, ad); + if (ret != 0) { + SETTING_TRACE_ERROR("call vconf_notify_key_changed failed"); + } + } else { + item = elm_genlist_item_append(ad->genlist, &itc_bottom_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } + + setting_view_storage_main.is_create = 1; + + if (ad->pipe) { + ecore_pipe_del(ad->pipe); + ad->pipe = NULL; + } + ad->pipe = ecore_pipe_add(__setting_storage_main_pipe_cb, ad); + if (ad->pipe) + { + ret = pthread_create(&ad->tid, NULL, __setting_storage_main_thread_start_routine, ad); + if (ret != 0) { + SETTING_TRACE_ERROR("fail to pthread_create"); + } + SETTING_TRACE("thread id = %d", ad->tid); + } + else + { + SETTING_TRACE_ERROR("fail to ecore_pipe_add"); + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_storage_main_destroy(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingStorageUG *ad = (SettingStorageUG *) cb; + + int ret = 0; + + pthread_mutex_lock(&ad->exit_mutex); + ad->exit_flag = 1; + pthread_mutex_unlock(&ad->exit_mutex); + + /* wake up thread */ + pthread_mutex_lock(&ad->update_mutex); + ad->type = SETTING_STORAGE_REUPDATE; + pthread_cond_signal(&ad->wait_cond); + pthread_mutex_unlock(&ad->update_mutex); + + if (ad->tid > 0) + { + void *thread_ret = NULL; + ret = pthread_join(ad->tid, &thread_ret); + if(ret != 0) { + SETTING_TRACE_ERROR("fail to join with thread"); + } + SETTING_TRACE("thread exit code %d", (int)thread_ret); + } + + pthread_mutex_destroy(&ad->exit_mutex); + pthread_mutex_destroy(&ad->update_mutex); + pthread_cond_destroy(&ad->wait_cond); + + if (ad->pipe) { + ecore_pipe_del(ad->pipe); + ad->pipe = NULL; + } + + if (!isEmulBin()) { + ret = vconf_ignore_key_changed(VCONFKEY_SYSMAN_MMC_STATUS, + __setting_storage_vconf_change_cb); + if (ret != 0) { + SETTING_TRACE_ERROR("call vconf_ignore_key_changed failed"); + } + } + + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + + if (ad->ly_main != NULL) { + evas_object_del(ad->ly_main); + setting_view_storage_main.is_create = 0; + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_storage_main_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SettingStorageUG *ad = (SettingStorageUG *) cb; + + int ret = 0; + + __setting_storage_main_internal_storage_status_get(ad); + + /* update internal total size */ + char total_desc[SETTING_STORAGE_MAX_STR_LEN + 1] = {0,}; + ret = __setting_storage_status_size_transition(ad->internal_status.dTotal, total_desc); + setting_retvm_if(ret == SETTING_RETURN_FAIL, SETTING_RETURN_FAIL, "failed to transform") + + G_FREE(ad->internal->keyStr); + ad->internal->keyStr = (char *)g_strdup(total_desc); + elm_object_item_data_set(ad->internal->item, ad->internal); + elm_genlist_item_update(ad->internal->item); + + /* update internal available size */ + char avail_desc[SETTING_STORAGE_MAX_STR_LEN + 1] = {0,}; + ret = __setting_storage_status_size_transition(ad->internal_status.dAvail, avail_desc); + setting_retvm_if(ret == SETTING_RETURN_FAIL, SETTING_RETURN_FAIL, "failed to transform") + + G_FREE(ad->avail->sub_desc); + ad->avail->sub_desc = (char *)g_strdup(avail_desc); + elm_object_item_data_set(ad->avail->item, ad->avail); + elm_genlist_item_update(ad->avail->item); + + /* update miscellaneous */ + if (ad->back_from_misc) { + double misc_size = __setting_storage_main_miscellaneous_size_get(); + + ad->others_status.dTotal = misc_size; + __setting_storage_main_genlist_update(ad->others, ad->others_status); + } + + /* wake up thread */ + pthread_mutex_lock(&ad->update_mutex); + ad->type = SETTING_STORAGE_REUPDATE; + pthread_cond_signal(&ad->wait_cond); + pthread_mutex_unlock(&ad->update_mutex); + + if (ad->ly_main != NULL) { + evas_object_show(ad->ly_main); + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_storage_main_cleanup(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingStorageUG *ad = (SettingStorageUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_hide(ad->ly_main); + } + + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void __setting_storage_main_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + /* error check */ + ret_if(data == NULL); + + SettingStorageUG *ad = (SettingStorageUG *) data; + /* Send destroy request */ + ug_destroy_me(ad->ug); +} diff --git a/setting-storage/src/setting-storage-miscellaneous-files.c b/setting-storage/src/setting-storage-miscellaneous-files.c new file mode 100755 index 0000000..26fd4b3 --- /dev/null +++ b/setting-storage/src/setting-storage-miscellaneous-files.c @@ -0,0 +1,662 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 + +static int setting_storage_miscellaneous_files_create(void *cb); +static int setting_storage_miscellaneous_files_destroy(void *cb); +static int setting_storage_miscellaneous_files_update(void *cb); +static int setting_storage_miscellaneous_files_cleanup(void *cb); + +setting_view setting_view_storage_miscellaneous_files = { + .create = setting_storage_miscellaneous_files_create, + .destroy = setting_storage_miscellaneous_files_destroy, + .update = setting_storage_miscellaneous_files_update, + .cleanup = setting_storage_miscellaneous_files_cleanup, +}; + +static bool __setting_storage_miscellaneous_files_other_item_cb(media_info_h media, void *data) +{ + //SETTING_TRACE_BEGIN; + setting_retvm_if(media == NULL, true, "media is NULL"); + setting_retvm_if(data == NULL, true, "Data parameter is NULL"); + SettingStorageUG *ad = (SettingStorageUG *)data; + + char *file_path = NULL; + media_info_get_file_path(media, &file_path); + SETTING_TRACE("file_path : [%s]", file_path); + + if (!ecore_file_exists(file_path)) { + FREE(file_path); + return true; + } + + if (!safeStrNCmp(file_path, PATH1, sizeof(PATH1)) || + !safeStrNCmp(file_path, PATH2, sizeof(PATH2)) || + !safeStrNCmp(file_path, PATH3, sizeof(PATH3)) || + !safeStrNCmp(file_path, PATH4, sizeof(PATH4)) || + !safeStrNCmp(file_path, PATH5, sizeof(PATH5)) || + !safeStrNCmp(file_path, PATH6, sizeof(PATH6)) || + !safeStrNCmp(file_path, PATH7, sizeof(PATH7)) || + !safeStrNCmp(file_path, PATH8, sizeof(PATH8)) || + !safeStrNCmp(file_path, PATH9, sizeof(PATH9))) + { + FREE(file_path); + return true; + } + + char *display_name = NULL; + media_info_get_display_name(media, &display_name); + + Node_Info *pNode = (Node_Info *)calloc(1, sizeof(Node_Info)); + pNode->path = (char *)g_strdup(file_path); + pNode->name = (char *)g_strdup(display_name); + ad->files_list = eina_list_append(ad->files_list, pNode); + + FREE(file_path); + FREE(display_name); + return true; +} + +static void __setting_storage_miscellaneous_files_list_get(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingStorageUG *ad = (SettingStorageUG *)data; + + int ret = MEDIA_CONTENT_ERROR_NONE; + filter_h filter = NULL; + + /*Set Filter*/ + char *condition = "(MEDIA_TYPE=4) and MEDIA_PATH LIKE \'/opt/usr/media/%%\'"; + + ret = media_filter_create(&filter); + if(ret != MEDIA_CONTENT_ERROR_NONE) { + SETTING_TRACE_ERROR("Fail to create filter"); + return; + } + + ret = media_filter_set_condition(filter, condition, MEDIA_CONTENT_COLLATE_DEFAULT); + if(ret != MEDIA_CONTENT_ERROR_NONE) { + media_filter_destroy(filter); + SETTING_TRACE_ERROR("Fail to set condition"); + return; + } + + ret = media_info_foreach_media_from_db(filter, __setting_storage_miscellaneous_files_other_item_cb, ad); + if(ret != MEDIA_CONTENT_ERROR_NONE) { + media_filter_destroy(filter); + SETTING_TRACE_ERROR("Fail to get media"); + return; + } + + ret = media_filter_destroy(filter); + if (ret != MEDIA_CONTENT_ERROR_NONE) { + SETTING_TRACE_ERROR("destroy filter failed"); + return; + } +} + +static bool __setting_done_list_is_some_item_selected(Setting_Done_List_Data *list_data) +{ + SETTING_TRACE_BEGIN; + bool isFound = FALSE; /* wether can found some item checked */ + int state = 0; + + Eina_List *l = NULL; + Node_Info *node = NULL; + Setting_GenGroupItem_Data *item_data = NULL; + EINA_LIST_FOREACH(list_data->list, l, node) + { + if (node) { + item_data = (Setting_GenGroupItem_Data *)node->data; + + if (item_data->chk_status) { + isFound = TRUE; + break; + } + } + } + return isFound; +} + +static void __setting_select_all_done(void *data) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "data == NULL"); + Setting_Done_List_Data *list_data = (Setting_Done_List_Data *)data; + + int sel_num = 0; + + setting_create_sel_info_popup(list_data->ly_parent, + &(list_data->selInfoPop_layout), + &(list_data->selInfoPop)); + + if (list_data->select_all_checked) { + /* set all other checks state to be 1 */ + SETTING_TRACE_DEBUG("Select All checked"); + Eina_List *l = NULL; + Node_Info *node = NULL; + Setting_GenGroupItem_Data *item_data = NULL; + EINA_LIST_FOREACH(list_data->list, l, node) + { + if (node) { + item_data = (Setting_GenGroupItem_Data *)node->data; + item_data->chk_status = 1; + elm_object_item_data_set(item_data->item, item_data); + elm_genlist_item_update(item_data->item); + } + } + sel_num = list_data->cur_item_num; + } else { + SETTING_TRACE_DEBUG("Select All unchecked"); + /* set all other checks state to be 0 */ + Eina_List *l = NULL; + Node_Info *node = NULL; + Setting_GenGroupItem_Data *item_data = NULL; + EINA_LIST_FOREACH(list_data->list, l, node) + { + if (node) { + item_data = (Setting_GenGroupItem_Data *)node->data; + item_data->chk_status = 0; + elm_object_item_data_set(item_data->item, item_data); + elm_genlist_item_update(item_data->item); + } + } + sel_num = 0; + } + + /* SETTING_TRACE("sel_num:%d", sel_num); */ + if (!sel_num) { + if (list_data->navi_it) { + Evas_Object *button = elm_object_item_part_content_get(list_data->navi_it, "toolbar_button1"); + elm_object_disabled_set(button, EINA_TRUE); + } + + evas_object_hide(list_data->selInfoPop); + return; + } + char text[MAX_DISPLAY_NAME_LEN_ON_UI +1] = {0, }; + snprintf(text, MAX_DISPLAY_NAME_LEN_ON_UI, "%s (%d)", _("IDS_ST_OPT_SELECTED"), sel_num); + + /* text set and timeout set */ + edje_object_part_text_set(_EDJ(list_data->selInfoPop_layout), "elm.text", text); + + if (list_data->navi_it) { + Evas_Object *button = elm_object_item_part_content_get(list_data->navi_it, "toolbar_button1"); + elm_object_disabled_set(button, EINA_FALSE); + } +} + +static void __setting_select_all_layout_mouse_down_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "data == NULL"); + Setting_Done_List_Data *list_data = (Setting_Done_List_Data *)data; + + list_data->select_all_checked = !list_data->select_all_checked; + elm_check_state_pointer_set(list_data->select_all_checkbox, &list_data->select_all_checked); + + __setting_select_all_done(list_data); +} + +static void __setting_select_all_check_changed_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "data == NULL"); + Setting_Done_List_Data *list_data = (Setting_Done_List_Data *)data; + + list_data->select_all_checked = elm_check_state_get(list_data->select_all_checkbox); + elm_check_state_pointer_set(list_data->select_all_checkbox, &list_data->select_all_checked); + __setting_select_all_done(data); +} + +static void __setting_done_list_item_sel(void *data) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "data == NULL"); + Setting_Done_List_Data *list_data = (Setting_Done_List_Data *)data; + + int sel_num = 0; + + setting_create_sel_info_popup(list_data->ly_parent, + &(list_data->selInfoPop_layout), + &(list_data->selInfoPop)); + + /* else for other checks, do rotinue checking */ + bool isFound = FALSE; /* wether found the item not checked */ + + Eina_List *l = NULL; + Node_Info *node = NULL; + Setting_GenGroupItem_Data *item_data = NULL; + EINA_LIST_FOREACH(list_data->list, l, node) + { + if (node) { + item_data = (Setting_GenGroupItem_Data *)node->data; + if (!item_data->chk_status) { + /* SETTING_TRACE("%s not select", _(list_data->chk_items[idx].item_name)); */ + isFound = TRUE; + /* break; */ + } else { + /* SETTING_TRACE("%s select", _(list_data->chk_items[idx].item_name)); */ + sel_num++; + } + } + } + + if (isFound) { /* reset state of chk_sel_all */ + list_data->select_all_checked = 0; + elm_check_state_pointer_set(list_data->select_all_checkbox, &list_data->select_all_checked); + } else { + list_data->select_all_checked = 1; + elm_check_state_pointer_set(list_data->select_all_checkbox, &list_data->select_all_checked); + } + + /* SETTING_TRACE("sel_num:%d", sel_num); */ + if (!sel_num) { + if (list_data->navi_it) { + Evas_Object *button = elm_object_item_part_content_get(list_data->navi_it, "toolbar_button1"); + elm_object_disabled_set(button, EINA_TRUE); + } + evas_object_hide(list_data->selInfoPop); + return; + } + + char text[MAX_DISPLAY_NAME_LEN_ON_UI +1] = {0, }; + snprintf(text, MAX_DISPLAY_NAME_LEN_ON_UI, "%s (%d)", _("IDS_ST_OPT_SELECTED"), sel_num); + + /* text set and timeout set */ + edje_object_part_text_set(_EDJ(list_data->selInfoPop_layout), "elm.text", text); + + if (list_data->navi_it) { + Evas_Object *button = elm_object_item_part_content_get(list_data->navi_it, "toolbar_button1"); + elm_object_disabled_set(button, EINA_FALSE); + } +} + +static void __setting_done_list_Gendial_mouse_up_cb(void *data, Evas_Object *obj, + void *event_info) +{ + /* error check */ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + int old_status = elm_check_state_get(list_item->eo_check); + /* new status */ + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + + /* other process.. */ + Setting_Done_List_Data *list_data = list_item->userdata; + __setting_done_list_item_sel(list_data); +} + +static void __setting_done_list_Gendial_chk_btn_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + + /* new status */ + list_item->chk_status = elm_check_state_get(list_item->eo_check); + + Setting_Done_List_Data *list_data = list_item->userdata; + __setting_done_list_item_sel(list_data); +} + +static Evas_Object *__setting_create_done_list(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(data == NULL, NULL, "Data parameter is NULL"); + SettingStorageUG *ad = (SettingStorageUG *) data; + + int count = eina_list_count(ad->files_list); + + Evas_Object *sub_layout = elm_layout_add(ad->win_main_layout); + elm_layout_file_set(sub_layout, SETTING_THEME_EDJ_NAME, "search_layout"); + evas_object_size_hint_weight_set(sub_layout, EVAS_HINT_EXPAND, 0.0); + evas_object_show(sub_layout); + + Evas_Object *select_all_layout = elm_layout_add(sub_layout); + retvm_if(select_all_layout == NULL, NULL, "select_all_layout == NULL"); + elm_layout_theme_set(select_all_layout, "genlist", "item", "select_all/default"); //select_all/default + evas_object_size_hint_weight_set(select_all_layout, EVAS_HINT_EXPAND, EVAS_HINT_FILL); + evas_object_size_hint_align_set(select_all_layout, EVAS_HINT_FILL, EVAS_HINT_FILL); + + if (count > 0) { + evas_object_event_callback_add(select_all_layout, EVAS_CALLBACK_MOUSE_DOWN, __setting_select_all_layout_mouse_down_cb, &ad->miscellaneous_list); + } + + Eina_Bool select_all_checked = ad->miscellaneous_list.select_all_checked; + Evas_Object *select_all_checkbox = elm_check_add(select_all_layout); + elm_check_state_pointer_set(select_all_checkbox, &select_all_checked); + evas_object_smart_callback_add(select_all_checkbox, "changed", __setting_select_all_check_changed_cb, &ad->miscellaneous_list); + evas_object_propagate_events_set(select_all_checkbox, EINA_FALSE); + elm_object_part_content_set(select_all_layout, "elm.icon", select_all_checkbox); + + if (count == 0) { + elm_object_disabled_set(select_all_checkbox, EINA_TRUE); + } + + ad->miscellaneous_list.select_all_checkbox = select_all_checkbox; + elm_object_part_text_set(select_all_layout, "elm.text", _(KeyStr_Select_All)); + + Evas_Object *scroller = elm_genlist_add(ad->win_main_layout); + retvm_if(scroller == NULL, NULL, "scroller == NULL"); + elm_genlist_clear(scroller); /* first to clear list */ + + elm_object_part_content_set(sub_layout, "search_list", scroller); + elm_object_part_content_set(sub_layout, "search_bar", select_all_layout); + + Eina_List *l = NULL; + Node_Info *node = NULL; + Setting_GenGroupItem_Data *item_data = NULL; + EINA_LIST_FOREACH(ad->files_list, l, node) + { + if (node) { + item_data = setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + __setting_done_list_Gendial_mouse_up_cb, + &ad->miscellaneous_list, SWALLOW_Type_1CHECK, NULL, + NULL, 0, + node->name, node->path, + __setting_done_list_Gendial_chk_btn_cb); + + if (item_data) { + item_data->userdata = &ad->miscellaneous_list; + node->data = item_data; + } else { + SETTING_TRACE_ERROR("item_data is NULL"); + } + } + } + + return sub_layout; +} + +static int setting_storage_miscellaneous_files_create(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingStorageUG *ad = (SettingStorageUG *) cb; + Evas_Object *scroller = NULL; + + Evas_Object *view_layout = elm_layout_add(ad->win_main_layout); + elm_layout_file_set(view_layout, SETTING_THEME_EDJ_NAME, "selinfo_bottom"); + evas_object_size_hint_weight_set(view_layout, EVAS_HINT_EXPAND, 0.0); + + /* Evas_Object * win_layout, Evas_Object * win_obj */ + Elm_Object_Item *navi_it = setting_push_layout_navi_bar(_(SETTING_STORAGE_MISCES_STR), + _("IDS_COM_SK_DELETE"), + _("IDS_COM_SK_CANCEL"), NULL, + __setting_storage_miscellaneous_files_delete_cb, + __setting_storage_miscellaneous_files_cancel_cb, + NULL, ad, view_layout, ad->navibar, + NULL); + + Setting_Done_List_Data *list_data = &(ad->miscellaneous_list); + + list_data->win_main = ad->win_main_layout; + list_data->UG_data = ad; + list_data->ly_parent = view_layout; + list_data->select_all_checked = EINA_FALSE; + list_data->navi_it = navi_it; + + __setting_storage_miscellaneous_files_list_get(ad); + + list_data->list = ad->files_list; + + int count = eina_list_count(ad->files_list); + + list_data->cur_item_num = count; + SETTING_TRACE("list_data->cur_item_num:%d", list_data->cur_item_num); + scroller = __setting_create_done_list(ad); + elm_object_part_content_set(view_layout, "elm.swallow.contents", scroller); + + if(count == 0 || !__setting_done_list_is_some_item_selected(&ad->miscellaneous_list)) { + /* disable "Delete" button */ + Evas_Object *delete_button = elm_object_item_part_content_get(navi_it, "toolbar_button1"); + elm_object_disabled_set(delete_button, EINA_TRUE); + } + + setting_view_storage_miscellaneous_files.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int setting_storage_miscellaneous_files_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SettingStorageUG *ad = (SettingStorageUG *)cb; + + if (ad->popup_progressbar) { + evas_object_del(ad->popup_progressbar); + ad->popup_progressbar = NULL; + } + + if (ad->timer) { + ecore_timer_del(ad->timer); + ad->timer = NULL; + } + + if (ad->files_list) { + Eina_List *l = NULL; + Node_Info *node = NULL; + EINA_LIST_FOREACH(ad->files_list, l, node) + { + G_FREE(node->path); + G_FREE(node->name); + FREE(node); + } + eina_list_free(ad->files_list); + ad->files_list = NULL; + } + + int i = 0; + for (; i < MAX_RESET_MENU_NUM; i++) { + G_FREE(ad->miscellaneous_list.chk_items[i].item_name); + } + + if (ad->miscellaneous_list.selInfoPop) { + evas_object_del(ad->miscellaneous_list.selInfoPop); + ad->miscellaneous_list.selInfoPop = NULL; + } + + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + + ad->back_from_misc = EINA_TRUE; + + elm_naviframe_item_pop(ad->navibar); + setting_view_storage_miscellaneous_files.is_create = 0; + return SETTING_RETURN_SUCCESS; +} + +static int setting_storage_miscellaneous_files_update(void *cb) +{ + SETTING_TRACE_BEGIN; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_storage_miscellaneous_files_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + setting_storage_miscellaneous_files_destroy(cb); + return SETTING_RETURN_SUCCESS; +} + +static void __setting_storage_miscellaneous_files_cancel_cb(void *data, + Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + SettingStorageUG *ad = (SettingStorageUG *) data; + + setting_view_change(&setting_view_storage_miscellaneous_files, &setting_view_storage_main, ad); +} + +static void __setting_storage_miscellaneous_files_genlist_update(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingStorageUG *ad = (SettingStorageUG *) data; + + Evas_Object *view_layout = ad->miscellaneous_list.ly_parent; + + Evas_Object *scroller = NULL; + scroller = elm_object_part_content_get(view_layout, "elm.swallow.contents"); + setting_retm_if(NULL == scroller, "scroller is NULL"); + elm_genlist_clear(scroller); + + elm_object_part_content_unset(view_layout, "elm.swallow.contents"); + evas_object_del(scroller); + scroller = NULL; + + if (ad->files_list) { + Eina_List *l = NULL; + Node_Info *node = NULL; + EINA_LIST_FOREACH(ad->files_list, l, node) + { + G_FREE(node->path); + G_FREE(node->name); + FREE(node); + } + eina_list_free(ad->files_list); + ad->files_list = NULL; + } + + __setting_storage_miscellaneous_files_list_get(ad); + + ad->miscellaneous_list.list = ad->files_list; + + int count = eina_list_count(ad->files_list); + + ad->miscellaneous_list.cur_item_num = count; + SETTING_TRACE("list_data->cur_item_num:%d", ad->miscellaneous_list.cur_item_num); + scroller = __setting_create_done_list(ad); + elm_object_part_content_set(view_layout, "elm.swallow.contents", scroller); + + if(count == 0 || !__setting_done_list_is_some_item_selected(&ad->miscellaneous_list)) { + /* disable "Delete" button */ + if (ad->miscellaneous_list.navi_it) { + Evas_Object *delete_button = elm_object_item_part_content_get(ad->miscellaneous_list.navi_it, "toolbar_button1"); + elm_object_disabled_set(delete_button, EINA_FALSE); + } + } +} + +static Eina_Bool __setting_storage_miscellaneous_files_idler_cb(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(data == NULL, EINA_FALSE, "Data parameter is NULL"); + SettingStorageUG *ad = (SettingStorageUG *) data; + if (ad->popup_progressbar) { + evas_object_del(ad->popup_progressbar); + ad->popup_progressbar = NULL; + } + return EINA_FALSE; +} + +static Eina_Bool __setting_storage_miscellaneous_files_timer_cb(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(data == NULL, ECORE_CALLBACK_CANCEL, "Data parameter is NULL"); + SettingStorageUG *ad = (SettingStorageUG *) data; + + Eina_List *l = NULL; + Node_Info *node = NULL; + Setting_GenGroupItem_Data *item_data = NULL; + EINA_LIST_FOREACH(ad->miscellaneous_list.list, l, node) + { + if (node) { + item_data = (Setting_GenGroupItem_Data *)node->data; + + if (!item_data->chk_status) { + continue; + } + + //SETTING_TRACE("path = %s", node->path); + /*unselect item*/ + elm_check_state_set(item_data->eo_check, 0); + item_data->chk_status = 0; + + int ret = ecore_file_remove(node->path); + if (!ret) { + SETTING_TRACE_ERROR("failed to ecore_file_remove"); + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, + _("IDS_COM_POP_FAILED"), + NULL, NULL, POPUP_INTERVAL, FALSE, FALSE); + return ECORE_CALLBACK_CANCEL; + } + } + } + + /* update genlist */ + __setting_storage_miscellaneous_files_genlist_update(ad); + + /* reset sel_all item */ + elm_check_state_set(ad->miscellaneous_list.select_all_checkbox, 0); + ad->miscellaneous_list.select_all_checked = EINA_FALSE; + + ecore_idler_add((Ecore_Task_Cb)__setting_storage_miscellaneous_files_idler_cb, ad); + + return ECORE_CALLBACK_CANCEL; +} + +static void __setting_storage_miscellaneous_files_delete_cb(void *data, + Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + SettingStorageUG *ad = (SettingStorageUG *) data; + + if (ad->miscellaneous_list.selInfoPop) { + evas_object_del(ad->miscellaneous_list.selInfoPop); + ad->miscellaneous_list.selInfoPop = NULL; + } + + if (!__setting_done_list_is_some_item_selected(&ad->miscellaneous_list)) { + setting_create_simple_popup(NULL, ad->win_get, NULL, "No item selected"); + } else { + if (ad->popup_progressbar) { + evas_object_del(ad->popup_progressbar); + ad->popup_progressbar = NULL; + } + ad->popup_progressbar = setting_create_popup_with_progressbar(ad, ad->win_get, + "pending_list", + NULL, NULL, NULL, 0, TRUE, TRUE); + + if (ad->timer) { + ecore_timer_del(ad->timer); + ad->timer = NULL; + } + ad->timer = ecore_timer_add(1, (Ecore_Task_Cb)__setting_storage_miscellaneous_files_timer_cb, ad); + } +} diff --git a/setting-storage/src/setting-storage.c b/setting-storage/src/setting-storage.c new file mode 100755 index 0000000..8f6cf90 --- /dev/null +++ b/setting-storage/src/setting-storage.c @@ -0,0 +1,260 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif + +static void setting_storage_ug_cb_resize(void *data, Evas *e, Evas_Object *obj, + void *event_info) +{ + SettingStorageUG *ad = (SettingStorageUG *) data; + setting_view_update(&setting_view_storage_main, ad); +} + +static void *setting_storage_ug_on_create(ui_gadget_h ug, enum ug_mode mode, + service_h service, void *priv) +{ + setting_retvm_if((!ug || !priv), NULL, "!ug || !priv"); + + int ret = media_content_connect(); + if(ret == MEDIA_CONTENT_ERROR_NONE) { + SETTING_TRACE("media_content_connect is success"); + } else { + SETTING_TRACE_ERROR("media_content_connect is failed"); + return NULL; + } + + SettingStorageUG *storageUG = priv; + storageUG->ug = ug; + storageUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug); + storageUG->win_get = (Evas_Object *) ug_get_window(); + evas_object_show(storageUG->win_main_layout); + storageUG->evas = evas_object_evas_get(storageUG->win_main_layout); + + setting_retvm_if(storageUG->win_main_layout == NULL, NULL, "cannot get main window "); + + setting_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR); + + /* register view node table */ + setting_view_node_table_intialize(); + setting_view_node_table_register(&setting_view_storage_main, NULL); + setting_view_node_table_register(&setting_view_storage_default_storage, + &setting_view_storage_main); + setting_view_node_table_register(&setting_view_storage_miscellaneous_files, + &setting_view_storage_main); + + storageUG->itc_seperator.item_style = "dialogue/separator"; + storageUG->itc_seperator.func.text_get = NULL; + storageUG->itc_seperator.func.content_get = NULL; + storageUG->itc_seperator.func.state_get = NULL; + storageUG->itc_seperator.func.del = NULL; + + setting_create_Gendial_itc("dialogue/2text.3/expandable", &(storageUG->itc_2text_3_parent)); + setting_create_Gendial_itc("dialogue/1text.1icon/expandable2", &(storageUG->itc_1icon_1text_sub)); + setting_create_Gendial_itc("dialogue/2text.3", &(storageUG->itc_2text_2)); + setting_create_Gendial_itc("dialogue/1text.1icon.2", &(storageUG->itc_1text_1icon_2)); + setting_create_Gendial_itc("dialogue/title", &(storageUG->itc_group_item)); + setting_create_Gendial_itc("multiline/1text", &(storageUG->itc_bg_1icon)); + setting_create_Gendial_itc("dialogue/2text.1icon.3", &(storageUG->itc_2text_1icon_3)); + setting_create_Gendial_itc("dialogue/1text", &(storageUG->itc_1text)); + setting_create_Gendial_itc("1text.1icon.3", &(storageUG->itc_1text_1icon)); + + /* creating a view. */ + setting_view_node_set_cur_view(&setting_view_storage_main); + setting_view_create(&setting_view_storage_main, (void *)storageUG); + evas_object_event_callback_add(storageUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_storage_ug_cb_resize, storageUG); + return storageUG->ly_main; +} + +static void setting_storage_ug_on_start(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_storage_ug_on_pause(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_storage_ug_on_resume(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if((!ug || !priv), "!ug || !priv"); + SettingStorageUG *storageUG = priv; + + setting_view_update(&setting_view_storage_main, storageUG); +} + +static void setting_storage_ug_on_destroy(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if((!ug || !priv), "!ug || !priv"); + SettingStorageUG *storageUG = priv; + + int ret = media_content_disconnect(); + if (ret == MEDIA_CONTENT_ERROR_NONE) { + SETTING_TRACE("media_content_disconnect is success"); + } else { + SETTING_TRACE_ERROR("media_content_disconnect is failed"); + } + + evas_object_event_callback_del(storageUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_storage_ug_cb_resize); /* fix flash issue for gallery */ + storageUG->ug = ug; + + /* delete the allocated objects. */ + setting_view_destroy(&setting_view_storage_miscellaneous_files, storageUG); + setting_view_destroy(&setting_view_storage_default_storage, storageUG); + setting_view_destroy(&setting_view_storage_main, storageUG); + + if (NULL != ug_get_layout(storageUG->ug)) { + evas_object_hide((Evas_Object *) ug_get_layout(storageUG->ug)); + evas_object_del((Evas_Object *) ug_get_layout(storageUG->ug)); + } + + SETTING_TRACE_END; +} + +static void setting_storage_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; +} + +static void setting_storage_ug_on_event(ui_gadget_h ug, enum ug_event event, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(priv == NULL, "priv is NULL"); + SettingStorageUG *ad = (SettingStorageUG *)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: + case UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN: + { + SETTING_TRACE("UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN"); + if (ad->internal) { + if (ad->internal->eo_check) { + evas_object_del(ad->internal->eo_check); + ad->internal->eo_check = NULL; + } + elm_object_item_data_set(ad->internal->item, ad->internal); + elm_genlist_item_update(ad->internal->item); + } + } + break; + case UG_EVENT_ROTATE_LANDSCAPE: + case UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN: + { + SETTING_TRACE("UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN"); + if (ad->internal) { + if (ad->internal->eo_check) { + evas_object_del(ad->internal->eo_check); + ad->internal->eo_check = NULL; + } + elm_object_item_data_set(ad->internal->item, ad->internal); + elm_genlist_item_update(ad->internal->item); + } + } + break; + case UG_EVENT_REGION_CHANGE: + break; + default: + break; + } +} + +static void setting_storage_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + if (!ug) + return; + + switch (event) { + case UG_KEY_EVENT_END: + ug_destroy_me(ug); + break; + default: + break; + } +} + +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + SettingStorageUG *storageUG = calloc(1, sizeof(SettingStorageUG)); + setting_retvm_if(!storageUG, -1, "Create SettingStorageUG obj failed"); + + ops->create = setting_storage_ug_on_create; + ops->start = setting_storage_ug_on_start; + ops->pause = setting_storage_ug_on_pause; + ops->resume = setting_storage_ug_on_resume; + ops->destroy = setting_storage_ug_on_destroy; + ops->message = setting_storage_ug_on_message; + ops->event = setting_storage_ug_on_event; + ops->key_event = setting_storage_ug_on_key_event; + ops->priv = storageUG; + ops->opt = UG_OPT_INDICATOR_ENABLE; + + return 0; +} + +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + struct SettingStorageUG *storageUG; + setting_retm_if(!ops, "ops == NULL"); + + storageUG = ops->priv; + if (storageUG) { + FREE(storageUG); + } +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/** +* Reset function to 'reset' the settings of the UG, it will be invoked by 'Reset' UG +*/ +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + int ret = 0; + int value = SETTING_DEF_MEMORY_PHONE; + ret += vconf_set_int(VCONFKEY_SETAPPL_DEFAULT_MEM_WAP_INT, value); + ret += vconf_set_int(VCONFKEY_SETAPPL_DEFAULT_MEM_BLUETOOTH_INT, value); + ret += vconf_set_int(VCONFKEY_SETAPPL_DEFAULT_MEM_CAMERA_INT, value); + + ret += vconf_set_int(VCONFKEY_SETAPPL_DEFAULT_MEM_VOICE_RECORDER_INT, value); + ret += vconf_set_int(VCONFKEY_SETAPPL_DEFAULT_MEM_FM_RADIO_INT, value); + ret += vconf_set_int(VCONFKEY_SETAPPL_DEFAULT_MEM_DVB_H_INT, value); + return ret; +} diff --git a/setting-time/CMakeLists.txt b/setting-time/CMakeLists.txt new file mode 100755 index 0000000..ffd08d3 --- /dev/null +++ b/setting-time/CMakeLists.txt @@ -0,0 +1,35 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_time REQUIRED evas elementary appcore-common appcore-efl ecore tapi ui-gadget-1 capi-appfw-application sysman pmapi icu-i18n icu-io icu-le icu-lx icu-uc) + +FOREACH(flag ${pkgs_time_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") +ADD_DEFINITIONS("-fpie") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") + +ADD_LIBRARY(${SETTING_TIME_UG} SHARED + ./src/setting-time.c + ./src/setting-time-main.c + ./src/setting-time-engine.c + ) + +TARGET_LINK_LIBRARIES(${SETTING_TIME_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_TIME_UG} ${pkgs_time_LDFLAGS}) + +INSTALL(TARGETS ${SETTING_TIME_UG} DESTINATION /usr/ug/lib) diff --git a/setting-time/include/setting-time-engine.h b/setting-time/include/setting-time-engine.h new file mode 100755 index 0000000..3be7840 --- /dev/null +++ b/setting-time/include/setting-time-engine.h @@ -0,0 +1,29 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_TIME_ENGINE_H__ +#define __SETTING_TIME_ENGINE_H__ + +#include +#include + +#define SETTING_TIME_ENGINE_TIME_STR_LEN 15 + +int setting_save_time(time_t _time); + +int setting_time_update_cb(void *data); + +#endif /* __SETTING_TIME_ENGINE_H__ */ diff --git a/setting-time/include/setting-time-main.h b/setting-time/include/setting-time-main.h new file mode 100755 index 0000000..5a129e5 --- /dev/null +++ b/setting-time/include/setting-time-main.h @@ -0,0 +1,64 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_TIME_MAIN_H__ +#define __SETTING_TIME_MAIN_H__ + +#include +#include + +#define MAX_ARGS 15 +#define CITY_BUF_SIZE 128 +#define GMT_BUF_SIZE 10 +#define __MAX_PATH_SIZE 1024 + + +#define SETTING_TIME_ZONEINFO_PATH "/usr/share/zoneinfo/" +#define SETTING_TIME_SHARE_LOCAL_PATH "/usr/share/locale" +#define SETTING_TZONE_SYMLINK_PATH "/opt/etc/localtime" + +void setting_time_main_launch_worldclock_sg(void *data); +void setting_time_main_close_worldclock_sg(gpointer cb_data, gint argc, + gchar **argv); + +void setting_time_main_click_softkey_left_cb(void *data, Evas_Object *obj, + void *event_info); +void setting_time_main_click_softkey_caller_exist_left_cb(void *data, + Evas_Object *obj, + void *event_info); +void setting_time_main_click_softkey_caller_exist_right_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_time_main_chk_btn_cb(void *data, Evas_Object *obj, + void *event_info); +void setting_time_main_item_mouse_up_cb(void *data, Evas *e, Evas_Object *obj, + void *event_info); +static void setting_time_main_mouse_up_Gendial_list_cb(void *data, + Evas_Object *obj, + void *event_info); +void setting_time_main_btn_update_ok_cb(void *cb); +void setting_time_main_btn_update_cancel_cb(void *cb); +void setting_time_update_time_date_format_string(SettingTimeUG *ad); +Eina_Bool setting_update_datefield(void *cb); +int setting_time_check_automatic_time_update_state(); +#if DISABLED_CODE +static void setting_time_main_controlbar_lbtn_label_set( + Evas_Object *controlbar, + char *label); +#endif +static int __setting_set_city_tzone(const char* pTZPath); + +#endif /* __SETTING_TIME_MAIN_H__ */ diff --git a/setting-time/include/setting-time.h b/setting-time/include/setting-time.h new file mode 100755 index 0000000..3e52b20 --- /dev/null +++ b/setting-time/include/setting-time.h @@ -0,0 +1,96 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_TIME_H__ +#define __SETTING_TIME_H__ + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#define ERR_BIGGER_THAN_2037 "Cannot Set the year bigger than 2037" +#define AUTO_TIME_UPDATE_ON "Automatic time update is ON!" +#define SETTING_TIME_AUTO_UPDATE_DESC "IDS_ST_BODY_USE_TIME_PROVIDED_BY_NETWORK" +#define NOT_SUPPORT_AUTO_UPDATE_DESC "The SIM Card being used doesn't support automatically updating time" //need multi-language support. + +#define SETTING_DATAUSAGE_MDM_RESTRICTS_STR "Security policy restricts use of data usage" + +typedef struct _SettingTimeUG SettingTimeUG; + +/** + * Setting Time UG context + * all UG function has void* as an agument. this is casted back to SettingTimeUG + * and the functions access app context. + */ +struct _SettingTimeUG { + + ui_gadget_h ug; /**< ug struct itself */ + + /* add more variables here (move your appdata to here) */ + int noti_fd; + + service_h bundle_data; /**< when loading this UG, bundle is stored */ + Evas *evas; + Evas_Object *win_main_layout; + Evas_Object *win_get; + Evas_Object *ly_main; + + ui_gadget_h ug_loading; + + Evas_Object *navi_bar; + Evas_Object *scrl_main; + char *caller; + + Ecore_Timer *update_timer; + Evas_Object *pop_progress; + Evas_Object *pop; + Eina_Bool is_datefield_selected; + + /* UI */ + Setting_GenGroupItem_Data *data_auto; + Setting_GenGroupItem_Data *data_tz; + Setting_GenGroupItem_Data *data_dst; + Setting_GenGroupItem_Data *data_time; + Setting_GenGroupItem_Data *data_time_fmt; + Setting_GenGroupItem_Data *data_date_fmt; + Setting_GenGroupItem_Data *data_firstday_week_fmt; + + Evas_Object *chk_dst; + Evas_Object *chk_auto; + + Elm_Genlist_Item_Class itc_2text_2; + Elm_Genlist_Item_Class itc_2text_arrow; + Elm_Genlist_Item_Class itc_1text_1icon; + Elm_Genlist_Item_Class itc_seperator; + Elm_Genlist_Item_Class itc_layout; + Elm_Genlist_Item_Class itc_2text_3_parent; + Elm_Genlist_Item_Class itc_1icon_1text_sub; + + Ecore_Idler *update_timezone_idler; + Ecore_Idler *refresh_time_idler; +}; + +extern setting_view setting_view_time_main; + +#endif /* __SETTING_TIME_H__ */ diff --git a/setting-time/src/setting-time-engine.c b/setting-time/src/setting-time-engine.c new file mode 100755 index 0000000..cf0e23d --- /dev/null +++ b/setting-time/src/setting-time-engine.c @@ -0,0 +1,46 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 + +/* To set system time takes some time. It makes some time before firing vconf event */ +int setting_time_update_cb(void *data) +{ + retv_if(data == NULL, -1); + SettingTimeUG *ad = data; + /* + char time_str[SETTING_TIME_ENGINE_TIME_STR_LEN]; + struct tm *ts; + struct tm ts_ret; + time_t ctime; + // get time from datefield UI + ctime = ad->changed_time; + //ctime = time(NULL); + ts = localtime_r(&ctime, &ts_ret); + retv_if(!ts, 1); + strftime(time_str, SETTING_TIME_ENGINE_TIME_STR_LEN, "%H:%M", &ts_ret); + SETTING_TRACE("After setting time ::: tm is_dst --> %d", ts_ret.tm_isdst); + SETTING_TRACE("After Setting time time_str:%s", time_str);*/ +#if SUPPORT_SCREEN_PROTECTED + pm_unlock_state(LCD_NORMAL, STAY_CUR_STATE); +#endif + + if (ad->pop_progress) { + evas_object_del(ad->pop_progress); + ad->pop_progress = NULL; + } + return 0; +} diff --git a/setting-time/src/setting-time-main.c b/setting-time/src/setting-time-main.c new file mode 100755 index 0000000..cb8319c --- /dev/null +++ b/setting-time/src/setting-time-main.c @@ -0,0 +1,1781 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +#define ONE_MINUTE 60 +#define PROGRESS_POPUP_SHOW 0 + +/* ICU utilities*/ +static UChar *uastrcpy(const char *chars); +static void ICU_set_timezone(const char *timezone); +static int get_timezone_isdst(int* isdst); +static void get_gmt_offset(char *str_buf, int size); + +static char* get_timezone_str(); +static char* get_city_name_result(); +static bool get_city_name(char* tzname); + +static char* s_result; +static int query_callback(void *NotUsed, int argc, char **argv, char **azColName); +static bool setting_update_timezone(SettingTimeUG *ad); + +static int setting_time_main_create(void *cb); +static int setting_time_main_destroy(void *cb); +static int setting_time_main_update(void *cb); +static int setting_time_main_cleanup(void *cb); + +setting_view setting_view_time_main = { + .create = setting_time_main_create, + .destroy = setting_time_main_destroy, + .update = setting_time_main_update, + .cleanup = setting_time_main_cleanup, +}; + +#if UN_SUPPORT_TIME_DYNAMIC_UPDATE +static void setting_time_reboot_resp_cb(void *data, Evas_Object *obj, + void *event_info); +#endif + +bool __update_timezone_idler(SettingTimeUG *ad) +{ + setting_update_timezone(ad); + ad->update_timezone_idler = NULL; + return 0; +} + +void time_changed_callback(keynode_t *key, void *data) { + + SETTING_TRACE_DEBUG("time and timezone have been changed: TIME_CHANGED_HEYNOTY_CALLBACK"); + SettingTimeUG *ad = (SettingTimeUG *)data; + + int ret = setting_time_update_cb(ad); + if (ret != 0) { + SETTING_TRACE("FAIL: setting_time_update_db(ad)\n"); + } + + SETTING_TRACE("ad->is_datefield_selected:%d", ad->is_datefield_selected) + if(EINA_TRUE == ad->is_datefield_selected) { + /* Timezone is not changed and a selected value of the datefield is already changed */ + SETTING_TRACE("Datefield is selected\n"); + return ; + } + + tzset(); + // vconfset to update timezone + char pTZPath[__MAX_PATH_SIZE]; + ssize_t nLen = readlink(SETTING_TZONE_SYMLINK_PATH, pTZPath, sizeof(pTZPath)-1); + if (nLen != -1) { + pTZPath[nLen] = '\0'; + } else { + SETTING_TRACE("parse error for SETTING_TZONE_SYMLINK_PATH"); + return; + } + + if (!__setting_set_city_tzone(&pTZPath[20])) { + SETTING_TRACE("__setting_set_city_tzone ERROR"); + return; + } + char *timezone = vconf_get_str(VCONFKEY_SETAPPL_TIMEZONE_ID); + setting_retm_if(timezone == NULL, "get vonf failed"); + ICU_set_timezone(timezone); + FREE(timezone); + + // update timezone + if (ad->update_timezone_idler) { + ecore_idler_del(ad->update_timezone_idler); + ad->update_timezone_idler = NULL; + } + ad->update_timezone_idler = + ecore_idler_add((Ecore_Task_Cb) __update_timezone_idler, ad); + // update time + if (ad->refresh_time_idler) { + ecore_idler_del(ad->refresh_time_idler); + ad->refresh_time_idler = NULL; + } + ad->refresh_time_idler = ecore_idler_add(setting_update_datefield, ad); +} + +void setting_time_update_time_date_format_string(SettingTimeUG *ad) +{ + SETTING_TRACE_BEGIN; + + struct tm *ts; + struct tm ts_ret; + time_t ctime; + + int ret, value, err; + + char time_str[MAX_ARGS]; + + ctime = time(NULL); + ts = localtime_r(&ctime, &ts_ret); + ret_if(!ts); + + /* set time in particular format */ + ret = setting_get_int_slp_key(INT_SLP_SETTING_REGIONFORMAT_TIME1224, &value, &err); + if (ret == SETTING_RETURN_FAIL) + value = VCONFKEY_TIME_FORMAT_12; + + switch (value) { + case VCONFKEY_TIME_FORMAT_12: + { + /* Get Time */ + strftime(time_str, MAX_ARGS, "%l:%M %p ", &ts_ret); + } + break; + + case VCONFKEY_TIME_FORMAT_24: + { + strftime(time_str, MAX_ARGS, "%H:%M", &ts_ret); + } + break; + default: + /* do nothing */ + break; + } + + if (ad->data_time) { + elm_object_item_data_set(ad->data_time->item, ad->data_time); + elm_genlist_item_update(ad->data_time->item); + } +} + +bool setting_update_timezone(SettingTimeUG *ad) +{ + /* SETTING_TRACE_BEGIN; */ + char time_zone_sub_str[CITY_BUF_SIZE + GMT_BUF_SIZE + 3] = { 0, }; + char *pa_timezone = NULL; + char *pa_city = NULL; + int ret = 0; + + /* get time zone */ + pa_city = vconf_get_str(VCONFKEY_SETAPPL_CITYNAME_INDEX_INT); + pa_timezone = vconf_get_str(VCONFKEY_SETAPPL_TIMEZONE_INT); + + //if ((pa_timezone != NULL) && (_(pa_city) != NULL && safeStrCmp(_(pa_city), "NULL"))) { + if ((pa_timezone != NULL) && (_(pa_city) != NULL )) { + /* SETTING_TRACE_DEBUG("*** timezone: %s *** ", timezone); */ + /* SETTING_TRACE_DEBUG("*** city: %s *** ", _(city)); */ + /* SETTING_TRACE_DEBUG("*** ret: %d, dst: %d *** ", ret, dst); */ + + ret = snprintf(time_zone_sub_str, CITY_BUF_SIZE + GMT_BUF_SIZE + 2, "%s, GMT %s", _(pa_city), pa_timezone); + //ret = snprintf(time_zone_sub_str, CITY_BUF_SIZE + GMT_BUF_SIZE + 2, "%s, GMT %s", pa_timezone, _(pa_city)); + FREE(pa_city); + retv_if(ret < 0, 0); + } else { + ret = snprintf(time_zone_sub_str, CITY_BUF_SIZE + GMT_BUF_SIZE + 2, "%s, GMT +09", _("IDS_WCL_BODY_CITYNAME_SEOUL")); + retv_if(ret < 0, 0); + } + SETTING_TRACE("ad->data_tz:%p", ad->data_tz); + + if (ad->data_tz) { + ad->data_tz->sub_desc = (char *)g_strdup(time_zone_sub_str); + elm_object_item_data_set(ad->data_tz->item, ad->data_tz); + elm_genlist_item_update(ad->data_tz->item); + } + return 0; +} + + +static void setting_time_main_int_vconf_change_cb(keynode_t *key, void *data) +{ + /* SETTING_TRACE_BEGIN; */ + ret_if(NULL == data); + SettingTimeUG *ad = data; + int status = vconf_keynode_get_int(key); + char *vconf_name = vconf_keynode_get_name(key); + /* SETTING_TRACE("vconf_name:%s", vconf_name); */ + + if (!safeStrCmp(vconf_name, VCONFKEY_REGIONFORMAT_TIME1224)) { + + if (ad->data_time) { + /* VCONFKEY_REGIONFORMAT_TIME1224 1:12H 2:24H */ + if (status <= 2 && status > 0) /* 1, 2 */ + --status; /* set to 0 or 1 */ + else + status = 0; /* set 12H */ + + /* TODO assert 1 or 0 */ + ad->data_time->chk_status = !status; + + char datefield_format[MAX_DATETIME_FORMAT_LEN + 1] = {0, }; + + const char *time_format = NULL; + if (ad->data_time->chk_status)//12 hours + { + time_format = "%I : %M %p"; + } else { //24 hours + time_format = "%H : %M"; + } + +//get date format from datefiled itself, if elm_datetime_add() supports set date-format via ICU. +#ifdef SUPPORT_DATEFIELD_DATE_FORMAT_AUTOSET + const char *old_format = elm_datetime_format_get(ad->data_time->eo_check); + snprintf(datefield_format, MAX_DATE_FORMAT_LEN + 1, //add one space " " + "%s", old_format); + safeStrNCat(datefield_format, time_format, MAX_DATETIME_FORMAT_LEN); + SETTING_TRACE("datefield_format:%s", datefield_format); +#else + int value = SETTING_DATE_FORMAT_DD_MM_YYYY; + int err = -1; + + char *date_format_str[] = { "%d %b %Y", "%b %d %Y", "%Y %b %d", "%Y %d %b" }; + int ret = setting_get_int_slp_key(INT_SLP_SETTING_DATE_FORMAT, &value, &err); + if (ret == SETTING_RETURN_FAIL) + value = SETTING_DATE_FORMAT_DD_MM_YYYY; + + snprintf(datefield_format, MAX_DATETIME_FORMAT_LEN, + "%s %s", date_format_str[value], time_format); +#endif + + elm_datetime_format_set(ad->data_time->eo_check, datefield_format); + } + } +} + +static void __update_time_via_sim_card(void *data) +{ + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingTimeUG *ad = (SettingTimeUG *) data; + int ret = 0; + int t_nitz = 0; + int t_offset = 0; + ret += vconf_get_int(VCONFKEY_TELEPHONY_NITZ_GMT, &t_nitz); + ret += vconf_get_int(VCONFKEY_TELEPHONY_NITZ_EVENT_GMT, &t_offset); + char *tzpath = vconf_get_str(VCONFKEY_TELEPHONY_NITZ_ZONE); + if (ret != 0 || isEmptyStr(tzpath)) + { + setting_create_simple_popup(ad, ad->ly_main, + NULL, _(NOT_SUPPORT_AUTO_UPDATE_DESC)); + return; + } + ret = 0;//reset.. + + // a.time zone + SETTING_TRACE("tz_path:%s", tzpath); + + char tz_path[MAX_COMMON_BUFFER_LEN / 4 + 1]; + safeCopyStr(tz_path, SETTING_TIME_ZONEINFO_PATH, MAX_COMMON_BUFFER_LEN / 4); + g_strlcat(tz_path, tzpath, sizeof(tz_path)); + SETTING_TRACE("full tz_path:%s", tz_path); + ret = sysman_set_timezone(tz_path); + if (ret < 0) { + SETTING_TRACE("tzpath is not valid."); + return; + } else + SETTING_TRACE("sysman_set_timezone - successful : %s \n", tz_path); + if (!__setting_set_city_tzone(tzpath)) { + SETTING_TRACE("__setting_set_city_tzone ERROR") + return; + } + if (get_city_name(tzpath)) { + SETTING_TRACE(">>>>>> RESULT : %s", get_city_name_result()); + } + char* city = get_city_name_result(); + SETTING_TRACE("city:%s", city); + if (city) + { + ret = vconf_set_str(VCONFKEY_SETAPPL_CITYNAME_INDEX_INT, city); + setting_retm_if(ret != 0, "set vconf[%s] failed", VCONFKEY_SETAPPL_CITYNAME_INDEX_INT); + } + setting_update_timezone(ad); + + // b.TIME AND DATE + int t_uptime = 0; + FILE *fp = fopen("/proc/uptime", "r"); + if (fp) { + if (!fscanf(fp, "%d", &t_uptime)) { + SETTING_TRACE_ERROR("fscanf error"); + } + fclose(fp); + fp = NULL; + } else { + SETTING_TRACE_ERROR("fopen error"); + } + + SETTING_TRACE("t_nitz:%d, t_offset:%d, t_uptime:%d", t_nitz, t_offset, t_uptime); + time_t t_current = t_nitz + t_uptime - t_offset; + SETTING_TRACE("t_current:%d", t_current); + ret = sysman_set_datetime(t_current); + setting_retm_if(ret == -1, "sysman_set_datetime call failed"); + if (ad->data_time) { + struct tm ts_ret; + struct tm *ts = localtime_r(&t_current, &ts_ret); + ret_if(!ts); + elm_datetime_value_set(ad->data_time->eo_check, &ts_ret); + } + + // time change - event + static int t_event_val = -1; + vconf_set_int (VCONFKEY_SYSTEM_TIME_CHANGED, t_event_val); +} + +static void __sim_time_info_chg_cb(keynode_t *key, void *data) +{ + SETTING_TRACE_BEGIN; + ret_if(NULL == data); + SettingTimeUG *ad = data; + char *vconf_name = vconf_keynode_get_name(key); + SETTING_TRACE("vconf_name:%s", vconf_name); + if (!safeStrCmp(vconf_name, VCONFKEY_TELEPHONY_NITZ_GMT) + || !safeStrCmp(vconf_name, VCONFKEY_TELEPHONY_NITZ_EVENT_GMT) + || !safeStrCmp(vconf_name, VCONFKEY_TELEPHONY_NITZ_ZONE)) { + int value = 0; + int err = 0; + setting_get_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE, &value, + &err); + if (value) + { + int ret = 0; + int t_nitz = 0; + int t_offset = 0; + ret += vconf_get_int(VCONFKEY_TELEPHONY_NITZ_GMT, &t_nitz); + ret += vconf_get_int(VCONFKEY_TELEPHONY_NITZ_EVENT_GMT, &t_offset); + char *tzpath = vconf_get_str(VCONFKEY_TELEPHONY_NITZ_ZONE); + if (ret != 0 || isEmptyStr(tzpath)) + { + return; + } + __update_time_via_sim_card(ad); + } + } +} + +/* *************************************************** + * + *basic func + * + ***************************************************/ +static void setting_time_main_datefield_change_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + ret_if(data == NULL); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + SettingTimeUG *ad = list_item->userdata; + + ad->is_datefield_selected = EINA_TRUE; + + if (ad->update_timer) { + ecore_timer_reset(ad->update_timer); + ecore_timer_freeze(ad->update_timer); + } + + // If auto update is on, don't anything while the datefield has been updated (i.e., time runs) + if (1 == setting_time_check_automatic_time_update_state()) { + SETTING_TRACE("AUTO_TIME ON: no action"); + if (ad->update_timer) { + ecore_timer_thaw(ad->update_timer); + } + SETTING_TRACE_END; + return; + } else { + // otherwise, we apply a new date which has been changed by a user + } + + struct tm _tm; + elm_datetime_value_get(obj, &_tm); + + SETTING_TRACE("year : %d, month : %d, day : %d, hour : %d, min : %d", + _tm.tm_year, _tm.tm_mon, _tm.tm_mday, _tm.tm_hour, _tm.tm_min); + if (2037 < _tm.tm_year) { + setting_create_simple_popup(ad, ad->win_get, + NULL, _(ERR_BIGGER_THAN_2037)); + if (ad->update_timer) { + ecore_timer_thaw(ad->update_timer); + } + return; + } +#if SUPPORT_SCREEN_PROTECTED /* if not lock the current state, after set the time, the screen will become dimmed */ + pm_lock_state(LCD_NORMAL, STAY_CUR_STATE, 0); +#endif + _tm.tm_sec = 0; + + int isdst; + if (get_timezone_isdst(&isdst) == SETTING_RETURN_SUCCESS) { + _tm.tm_isdst = isdst; + } else { + // error + SETTING_TRACE_ERROR("get_timezone_isdst() failed"); + if (ad->update_timer) { + ecore_timer_thaw(ad->update_timer); + } + return; + } + + /* local time -> gmtime */ + time_t the_time = mktime(&_tm); /* represent local time */ + + if ( (time(NULL)/ONE_MINUTE) == (the_time/ONE_MINUTE) ) + { + SETTING_TRACE("Time is not changed\n"); + //current time didn't change + if (ad->update_timer) { + ecore_timer_thaw(ad->update_timer); + } + return; + } + +#if PROGRESS_POPUP_SHOW + // remove popup if created + if (ad->pop_progress) { + evas_object_del(ad->pop_progress); + ad->pop_progress = NULL; + } + + // create new popup + ad->pop_progress = + setting_create_popup_with_progressbar(ad, ad->win_get, "pending_list", + NULL, NULL, NULL, 0, TRUE, TRUE); +#endif + + // invoke API to change time + int ret = sysman_set_datetime(the_time); + + if (ad->update_timer) { + ecore_timer_thaw(ad->update_timer); + } + + setting_retm_if(ret == -1, "sysman_set_datetime call failed"); + + SETTING_TRACE_END; +} + +Eina_Bool __refresh_date_timer(void *data) +{ + //SETTING_TRACE_BEGIN; + SettingTimeUG *ad = data; + if (ad->data_time) { + time_t ctime = time(NULL); + struct tm ts_ret; + struct tm *ts = localtime_r(&ctime, &ts_ret); + retv_if(!ts, 1); + + struct tm ui_time; + elm_datetime_value_get(ad->data_time->eo_check, &ui_time); + if ( (ctime/ONE_MINUTE) != (mktime(&ui_time)/ONE_MINUTE) ) + { + SETTING_TRACE("To refresh the UI element after 1 minute passed.\t in %s", __FUNCTION__); + elm_datetime_value_set(ad->data_time->eo_check, &ts_ret); + } + } + return 1; +} + +static void __setting_time_main_exp_cb(void *data, Evas_Object *obj, + void *event_info) +{ + ret_if(NULL == data || NULL == event_info); + SETTING_TRACE_BEGIN; + SettingTimeUG *ad = (SettingTimeUG *) data; + Elm_Object_Item *parentItem = event_info; /* parent item */ + Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); /* parent data */ + Evas_Object *scroller = elm_object_item_widget_get(parentItem); + + Evas_Object *rgd; + if (data_parentItem == ad->data_time_fmt) { + + rgd = elm_radio_add(scroller); + elm_radio_value_set(rgd, -1); + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + VCONFKEY_TIME_FORMAT_12, + "IDS_COM_BODY_12_HOURS", + NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + VCONFKEY_TIME_FORMAT_24, + "IDS_ST_BODY_24_HOURS", + NULL); + + setting_update_chk_status(rgd, + data_parentItem->int_slp_setting_binded); + + } else if (data_parentItem == ad->data_date_fmt) { + rgd = elm_radio_add(scroller); + elm_radio_value_set(rgd, -1); + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + SETTING_DATE_FORMAT_DD_MM_YYYY, + "IDS_ST_BODY_DDMMYYYY_DOT", + NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + SETTING_DATE_FORMAT_MM_DD_YYYY, + "IDS_ST_BODY_MM_DD_YYYY_DOT", + NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + SETTING_DATE_FORMAT_YYYY_MM_DD, + "IDS_COM_BODY_YYYYMMDD", + NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + SETTING_DATE_FORMAT_YYYY_DD_MM, + "IDS_ST_BODY_YYYY_DD_MM_DOT", + NULL); + + setting_update_chk_status(rgd, + data_parentItem->int_slp_setting_binded); + + } else if (data_parentItem == ad->data_firstday_week_fmt) { + rgd = elm_radio_add(scroller); + elm_radio_value_set(rgd, -1); + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + NULL, rgd, parentItem, + SWALLOW_Type_1RADIO, rgd, + SETTING_WEEKOFDAY_FORMAT_SUNDAY, + "IDS_ST_BODY_SUNDAY", NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + NULL, rgd, parentItem, + SWALLOW_Type_1RADIO, rgd, + SETTING_WEEKOFDAY_FORMAT_MONDAY, + "IDS_ST_BODY_MONDAY", NULL); + + setting_update_chk_status(rgd, + data_parentItem->int_slp_setting_binded); + } +} + +/** + * layyout create - remove a conformant + */ +Evas_Object *setting_create_win_layout2(Evas_Object *win_layout, + Evas_Object *win_obj) +{ + Evas_Object *layout = NULL; + //Evas_Object *conform = elm_conformant_add(win_obj); + /* Base Layout */ + layout = elm_layout_add(win_obj); + setting_retvm_if(layout == NULL, FALSE, "layout == NULL"); + + elm_layout_theme_set(layout, "layout", "application", "default"); + 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_win_resize_object_add(win_obj, layout); + //elm_win_resize_object_add(win_obj, conform); + //elm_object_content_set(conform, layout); + + Evas_Object *bg = setting_create_bg(layout, win_obj, "group_list"); + elm_object_part_content_set(layout, "elm.swallow.bg", bg); + evas_object_show(layout); + //evas_object_show(conform); + return layout; +} + + + +Evas_Object *setting_create_layout_navi_bar2(Evas_Object *win_layout, + Evas_Object *win_obj, + char *title_str, + char *lbutton_str, char *rbutton_str, char *mbutton_str, + setting_call_back_func lbutton_click_cb, setting_call_back_func rbutton_click_cb, + setting_call_back_func mbutton_click_cb, + void *cb_data, Evas_Object *eo_view, /*any container obj constructed on any evas obj */ + Evas_Object **navi_bar, + Evas_Object **titleobj) +{ + + Evas_Object *layout = setting_create_win_layout2(win_layout, win_obj); + *navi_bar = setting_create_navi_bar(layout); + + setting_create_navi_bar_buttons(title_str, + lbutton_str, rbutton_str, mbutton_str, + lbutton_click_cb, rbutton_click_cb, + mbutton_click_cb, cb_data, eo_view /*content */ , + *navi_bar, NULL); + return layout; +} + +static int setting_time_main_create(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingTimeUG *ad = (SettingTimeUG *) cb; + + char *l_btn = NULL; + char *r_btn = NULL; + char *title = _("IDS_ST_BODY_DATE_AND_TIME"); + char *caller = NULL; + ad->is_datefield_selected = EINA_FALSE; + + setting_call_back_func l_button_cb = NULL; + setting_call_back_func r_button_cb = NULL; + + service_h service = ad->bundle_data; + + service_get_extra_data(service, "caller", &caller); + service_get_extra_data(service, "lbutton", &l_btn); + if(l_btn) + l_button_cb = setting_time_main_click_softkey_caller_exist_left_cb; + service_get_extra_data(service, "title", &title); + service_get_extra_data(service, "rbutton", &r_btn); + if(r_btn) + r_button_cb = setting_time_main_click_softkey_caller_exist_right_cb; + + Evas_Object *scroller; /* scroller is a genlist */ + + ad->caller = caller; + if (ad->caller) { + /* for setup wizard */ + char *lbtn_str = (char *)g_strdup(l_btn); + bool same_flag = FALSE; + if (0 == safeStrCmp(l_btn, _("IDS_COM_BODY_BACK"))) { + l_btn = (char *)dgettext("sys_string", "IDS_COM_BODY_BACK"); + same_flag = TRUE; + } + + //Evas_Object *controllbar = NULL; + + scroller = elm_genlist_add(ad->win_main_layout); + elm_object_style_set(scroller, "dialogue"); + if(scroller == NULL) { + SETTING_TRACE_ERROR("Cannot set scroller object as contento of layout"); + // free allocated data before return. + FREE(lbtn_str); + return SETTING_DRAW_ERR_FAIL_SCROLLER; + } + + elm_genlist_clear(scroller); + ad->ly_main = + setting_create_layout_navi_bar2(ad->win_main_layout, + ad->win_get, + title, + NULL, NULL, NULL, + NULL, NULL, NULL, + ad, scroller, + &ad->navi_bar, + NULL); + /* left button */ + Evas_Object *lbtn_obj = elm_button_add(ad->win_main_layout); + if(lbtn_obj == NULL) + return SETTING_DRAW_ERR_FAIL_SCROLLER; + + Evas_Object *licon_obj = elm_icon_add(ad->win_main_layout); + if(licon_obj == NULL) + return SETTING_DRAW_ERR_FAIL_SCROLLER; + elm_icon_file_set(licon_obj, IMG_PREVIOUS, NULL); + + elm_object_style_set(lbtn_obj, "naviframe/toolbar/default"); + elm_object_text_set(lbtn_obj, l_btn); + elm_object_part_content_set(lbtn_obj, "elm.swallow.content", licon_obj); + evas_object_smart_callback_add(lbtn_obj, "clicked", l_button_cb, ad); + + /* right button */ + Evas_Object *rbtn_obj = elm_button_add(ad->win_main_layout); + if(rbtn_obj == NULL) + return SETTING_DRAW_ERR_FAIL_SCROLLER; + + Evas_Object *ricon_obj = elm_icon_add(ad->win_main_layout); + if(ricon_obj == NULL) + return SETTING_DRAW_ERR_FAIL_SCROLLER; + elm_icon_file_set(ricon_obj, IMG_NEXT, NULL); + + elm_object_style_set(rbtn_obj, "naviframe/toolbar/default"); + elm_object_text_set(rbtn_obj, r_btn); + elm_object_part_content_set(rbtn_obj, "elm.swallow.content", ricon_obj); + evas_object_smart_callback_add(rbtn_obj, "clicked", r_button_cb, ad); + + Elm_Object_Item *navi_it = elm_naviframe_top_item_get(ad->navi_bar); + if(navi_it) + { + elm_object_item_part_content_set(navi_it, "toolbar_button1", lbtn_obj); + elm_object_item_part_content_set(navi_it, "toolbar_button2", rbtn_obj); + } + } else { + l_btn = _("IDS_COM_BODY_BACK"); + title = _("IDS_ST_BODY_DATE_AND_TIME"); + ad->ly_main = + setting_create_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, title, + l_btn, NULL, + setting_time_main_click_softkey_left_cb, + NULL, ad, &scroller, + &ad->navi_bar); + } + ad->scrl_main = scroller; + + int value; + int err; + int ret = 0; + Elm_Object_Item *item; + + item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + setting_get_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE, &value, + &err); + bool auto_flag = value; + + if(auto_flag) //do special process only when auto mode + { + //to read TAPI vconfs + int ret = 0; + int t_nitz = 0; + int t_offset = 0; + ret += vconf_get_int(VCONFKEY_TELEPHONY_NITZ_GMT, &t_nitz); + ret += vconf_get_int(VCONFKEY_TELEPHONY_NITZ_EVENT_GMT, &t_offset); + char *tzpath = vconf_get_str(VCONFKEY_TELEPHONY_NITZ_ZONE); + if (ret == 0 && !isEmptyStr(tzpath)) + { + //1.to update timezone + char tz_path[MAX_COMMON_BUFFER_LEN / 4 + 1]; + safeCopyStr(tz_path, SETTING_TIME_ZONEINFO_PATH, MAX_COMMON_BUFFER_LEN / 4); + g_strlcat(tz_path, tzpath, sizeof(tz_path)); + SETTING_TRACE("full tz_path:%s", tz_path); + ret = sysman_set_timezone(tz_path); + if (ret < 0) { + SETTING_TRACE("tzpath is not valid."); + } else + SETTING_TRACE("sysman_set_timezone - successful : %s \n", tz_path); + if (!__setting_set_city_tzone(tzpath)) { + SETTING_TRACE("__setting_set_city_tzone ERROR") + } + if (get_city_name(tzpath)) { + SETTING_TRACE(">>>>>> RESULT : %s", get_city_name_result()); + } + char* city = get_city_name_result(); + SETTING_TRACE("city:%s", city); + ret = vconf_set_str(VCONFKEY_SETAPPL_CITYNAME_INDEX_INT, city); + + // 2.to set current time + int t_uptime = 0; + FILE *fp = fopen("/proc/uptime", "r"); + if (fp) { + if (!fscanf(fp, "%d", &t_uptime)) { + SETTING_TRACE_ERROR("fscanf error"); + } + fclose(fp); + fp = NULL; + } else { + SETTING_TRACE_ERROR("fopen error"); + } + + SETTING_TRACE("t_nitz:%d, t_offset:%d, t_uptime:%d", t_nitz, t_offset, t_uptime); + time_t t_current = t_nitz + t_uptime - t_offset; + SETTING_TRACE("t_current:%d", t_current); + ret = sysman_set_datetime(t_current); + } + } + + /* UI automatic */ + if (!isEmulBin()) { + ad->data_auto = + setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + setting_time_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, value, + "IDS_ST_BODY_AUTOMATIC_UPDATE", NULL, + setting_time_main_chk_btn_cb); + if (ad->data_auto) { + ad->data_auto->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_auto is NULL"); + } + + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, SETTING_TIME_AUTO_UPDATE_DESC, NULL, + NULL); + elm_genlist_item_select_mode_set(elm_genlist_item_append(scroller, &(itc_seperator), NULL, NULL,ELM_GENLIST_ITEM_NONE, NULL, NULL), + ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } + + setting_set_i18n("worldclock", SETTING_TIME_SHARE_LOCAL_PATH); + + char time_zone_sub_str[CITY_BUF_SIZE + GMT_BUF_SIZE + 3] = { 0, }; + char *pa_timezone = NULL; + char *pa_city = NULL; + + pa_city = vconf_get_str(VCONFKEY_SETAPPL_CITYNAME_INDEX_INT); // IDS_WCL_BODY_CITYNAME_SEOUL + pa_timezone = vconf_get_str(VCONFKEY_SETAPPL_TIMEZONE_INT); // "Asia/Seoul" + + if ((pa_timezone != NULL) && (_(pa_city) != NULL)) { + + // don't use hard coded value + // get value from current timezone + + char str_buf[GMT_BUF_SIZE] = {0, }; + get_gmt_offset(str_buf, GMT_BUF_SIZE); + + char* timezone_str = get_timezone_str(); + + //ret = get_city_name(timezone_str); + //if (ret) { + // SETTING_TRACE(">>>>>> RESULT : %s", get_city_name_result()); + //} + //char* cityname_id = _(get_city_name_result()); + SETTING_TRACE("timezone : %s, cityname_id :%s", timezone_str, pa_city); + if (pa_city && 0 != safeStrCmp(_(pa_city), "NULL")) + ret = snprintf(time_zone_sub_str, CITY_BUF_SIZE + GMT_BUF_SIZE + 2, "%s, GMT %s", _(pa_city), _(str_buf)); + else + ret = snprintf(time_zone_sub_str, CITY_BUF_SIZE + GMT_BUF_SIZE + 2, "%s, GMT +09", _("IDS_WCL_BODY_CITYNAME_SEOUL")); + + FREE(pa_city); + FREE(pa_timezone); + retv_if(ret < 0, 0); + } else { + // default code + ret = snprintf(time_zone_sub_str, CITY_BUF_SIZE + GMT_BUF_SIZE + 2, "%s, GMT +09", _("IDS_WCL_BODY_CITYNAME_SEOUL")); + retv_if(ret < 0, 0); + } + + /* UI create time zone */ + ad->data_tz = + setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), + setting_time_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, "IDS_ST_BODY_TIME_ZONE", + time_zone_sub_str, NULL); + if (ad->data_tz) { + ad->data_tz->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_tz is NULL"); + } + + /* create DATE_AND_TIME */ + /* DATE_AND_TIME */ + ret = + setting_get_int_slp_key(INT_SLP_SETTING_REGIONFORMAT_TIME1224, + &value, &err); + if (ret == SETTING_RETURN_FAIL) { + value = VCONFKEY_TIME_FORMAT_12; + } + bool is_12hours = (value == VCONFKEY_TIME_FORMAT_12 ? TRUE : FALSE); + char *date_format_str[] = { "%d %b %Y", "%b %d %Y", "%Y %b %d", "%Y %d %b" }; + ret = + setting_get_int_slp_key(INT_SLP_SETTING_DATE_FORMAT, &value, &err); + if (ret == SETTING_RETURN_FAIL) + value = SETTING_DATE_FORMAT_DD_MM_YYYY; + + /* UI format string */ + (void)setting_create_Gendial_field_titleItem(scroller, + &(itc_group_item), + "IDS_ST_BODY_DATE_AND_TIME", NULL); + ad->data_time = + setting_create_Gendial_field_def(scroller, &(ad->itc_layout), + setting_time_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_LAYOUT_DATEFIELD, + NULL, NULL, is_12hours, + NULL,//"IDS_ST_BODY_DATE_AND_TIME", + date_format_str[value], + setting_time_main_datefield_change_cb); + if (ad->data_time) { + ad->data_time->userdata = ad; + ad->data_time->isItemDisableFlag = auto_flag; + elm_genlist_item_select_mode_set(ad->data_time->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("ad->data_time is NULL"); + } + item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* UI create "Time format" */ + setting_enable_expandable_genlist(scroller, ad, + __setting_time_main_exp_cb, NULL); + + char* pa_time_format = get_pa_time_format_str(); + ad->data_time_fmt = setting_create_Gendial_exp_parent_field(scroller, + &(ad->itc_2text_3_parent), + setting_time_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, + "IDS_ST_BODY_TIME_FORMAT", + pa_time_format); + if (ad->data_time_fmt) { + ad->data_time_fmt->int_slp_setting_binded = + INT_SLP_SETTING_REGIONFORMAT_TIME1224; + } else { + SETTING_TRACE_ERROR("ad->data_time_fmt is NULL"); + } + G_FREE(pa_time_format); + +#if APPLIED_DATATIME_DATA_FORMAT + char* pa_date_format = get_pa_date_format_str(); + ad->data_date_fmt = setting_create_Gendial_exp_parent_field(scroller, + &(ad->itc_2text_3_parent), + setting_time_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, + "IDS_ST_BODY_DATE_FORMAT", + pa_time_format); + if (ad->data_date_fmt) { + ad->data_date_fmt->int_slp_setting_binded = + INT_SLP_SETTING_DATE_FORMAT; + } else { + SETTING_TRACE_ERROR("ad->data_date_fmt is NULL"); + } + G_FREE(pa_date_format); +#endif + +#if APPLIED_DATATIME_FIRSTDAY_WEEK + char* pa_week = get_pa_week_format_str(); + ad->data_firstday_week_fmt = + setting_create_Gendial_exp_parent_field(scroller, + &(ad->itc_2text_3_parent), + setting_time_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, + "IDS_CLD_BODY_FIRST_DAY_OF_WEEK", + pa_week); + if (ad->data_firstday_week_fmt) { + ad->data_firstday_week_fmt->int_slp_setting_binded = + INT_SLP_SETTING_WEEK_FORMAT; + } else { + SETTING_TRACE_ERROR("ad->data_firstday_week_fmt is NULL"); + } + G_FREE(pa_week); +#endif + + item = elm_genlist_item_append(scroller, &itc_bottom_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + if (auto_flag) + { + if (ad->data_tz) { + setting_disable_genlist_item(ad->data_tz->item); + } + if (ad->data_time) { + setting_disable_genlist_item(ad->data_time->item); + } + } + + setting_view_time_main.is_create = 1; + vconf_notify_key_changed(VCONFKEY_SYSTEM_TIME_CHANGED, time_changed_callback, (void *)ad); + + /* register vconf key to get event callback for converting 12/24H */ + vconf_notify_key_changed(VCONFKEY_REGIONFORMAT_TIME1224, setting_time_main_int_vconf_change_cb, ad); + /* register vconf key to get event callback for date format */ + vconf_notify_key_changed(VCONFKEY_SETAPPL_DATE_FORMAT_INT, setting_time_main_int_vconf_change_cb, ad); + + vconf_notify_key_changed(VCONFKEY_TELEPHONY_NITZ_GMT, __sim_time_info_chg_cb, ad); + vconf_notify_key_changed(VCONFKEY_TELEPHONY_NITZ_EVENT_GMT, __sim_time_info_chg_cb, ad); + vconf_notify_key_changed(VCONFKEY_TELEPHONY_NITZ_ZONE, __sim_time_info_chg_cb, ad); + + /* to avoid update time-diff, every per 3s to update. */ + ad->update_timer = ecore_timer_add(3, (Ecore_Task_Cb) __refresh_date_timer, ad); + + return SETTING_RETURN_SUCCESS; +} + +static int setting_time_main_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingTimeUG *ad = (SettingTimeUG *) cb; + + if (ad->update_timer) { + ecore_timer_del(ad->update_timer); + ad->update_timer = NULL; + } + +#if PROGRESS_POPUP_SHOW + if (ad->pop_progress) { + evas_object_del(ad->pop_progress); + ad->pop_progress = NULL; + } +#endif + + if (ad->update_timezone_idler) { + ecore_idler_del(ad->update_timezone_idler); + ad->update_timezone_idler = NULL; + } + if (ad->refresh_time_idler) { + ecore_idler_del(ad->refresh_time_idler); + ad->refresh_time_idler = NULL; + } + + vconf_ignore_key_changed(VCONFKEY_SYSTEM_TIME_CHANGED, + time_changed_callback); + + vconf_ignore_key_changed(VCONFKEY_REGIONFORMAT_TIME1224, + setting_time_main_int_vconf_change_cb); + vconf_ignore_key_changed(VCONFKEY_SETAPPL_DATE_FORMAT_INT, + setting_time_main_int_vconf_change_cb); + + vconf_ignore_key_changed(VCONFKEY_TELEPHONY_NITZ_GMT, __sim_time_info_chg_cb); + vconf_ignore_key_changed(VCONFKEY_TELEPHONY_NITZ_EVENT_GMT, __sim_time_info_chg_cb); + vconf_ignore_key_changed(VCONFKEY_TELEPHONY_NITZ_ZONE, __sim_time_info_chg_cb); + + if (ad->ly_main != NULL) { + evas_object_del(ad->ly_main); + setting_view_time_main.is_create = 0; + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_time_main_update(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingTimeUG *ad = (SettingTimeUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_show(ad->ly_main); + // update timezone + if (ad->update_timezone_idler) { + ecore_idler_del(ad->update_timezone_idler); + ad->update_timezone_idler = NULL; + } + ad->update_timezone_idler = + ecore_idler_add((Ecore_Task_Cb) __update_timezone_idler, ad); + // update time + if (ad->refresh_time_idler) { + ecore_idler_del(ad->refresh_time_idler); + ad->refresh_time_idler = NULL; + } + ad->refresh_time_idler = ecore_idler_add(setting_update_datefield, ad); + } + return SETTING_RETURN_SUCCESS; +} + +static int setting_time_main_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + return SETTING_RETURN_SUCCESS; +} + + +/* *************************************************** + ** + **general func + ** + ****************************************************/ + +int setting_time_check_automatic_time_update_state() +{ + SETTING_TRACE_BEGIN; + int bvalue = 0; + int ret = 0; + int err = 0; + + ret = + setting_get_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE, + &bvalue, &err); + + return bvalue; + +} + +static int __setting_set_city_tzone(const char* pTZPath) +{ + // let's get city & timezone string from pTZPath + // 1. city name + char szTimezone[GMT_BUF_SIZE] = {0,}; + char* pStr = strdup(pTZPath); + + // 2. timezone string +/- ex. +9, -1 + get_gmt_offset(szTimezone, GMT_BUF_SIZE); + + int ret = vconf_set_str(VCONFKEY_SETAPPL_TIMEZONE_INT, szTimezone); + if (ret == -1) { + FREE(pStr); + SETTING_TRACE("set vconf failed"); + return FALSE; + } + + // set timezone_id + /** @todo replace with vconf ID */ + ret = vconf_set_str(VCONFKEY_SETAPPL_TIMEZONE_ID, pStr); + FREE(pStr); + + return TRUE; +} + +static void +setting_time_main_launch_worldclock_result_ug_cb(ui_gadget_h ug, + service_h result, void *priv) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(priv == NULL, "Data parameter is NULL"); + + SettingTimeUG *ad = (SettingTimeUG *) priv; + + char *city = NULL; + char *tzpath = NULL; + service_get_extra_data(result, "city", &city); + service_get_extra_data(result, "tzpath", &tzpath); + + if (!tzpath) { + SETTING_TRACE("tzpath from worldclock UG is null."); + return; + } else { + SETTING_TRACE("tzpath : %s", tzpath ); + } + SETTING_TRACE("city : %s", city ); + + /* --------------------------------------------------------------------- */ + char tz_path[MAX_COMMON_BUFFER_LEN / 4 + 1]; + safeCopyStr(tz_path, SETTING_TIME_ZONEINFO_PATH, MAX_COMMON_BUFFER_LEN / 4); + g_strlcat(tz_path, tzpath, sizeof(tz_path)); + SETTING_TRACE("full tz_path:%s", tz_path); + + int ret = sysman_set_timezone(tz_path); + if (ret < 0) { + SETTING_TRACE("tzpath is not valid."); + return; + } else + SETTING_TRACE("sysman_set_timezone - successful : %s \n", tz_path); + + ret = vconf_set_str(VCONFKEY_SETAPPL_CITYNAME_INDEX_INT, city); + setting_retm_if(ret != 0, "set vconf failed"); + + // parse city and GMT offset from tzpath and system time property + // set the strings in vconf which will be used while updating display of timezone + if (!__setting_set_city_tzone(tzpath)) { + SETTING_TRACE("__setting_set_city_tzone ERROR") + return; + } + + // update the display for timezone + setting_update_timezone(ad); + static int t_event_val = -1; + vconf_set_int (VCONFKEY_SYSTEM_TIME_CHANGED, t_event_val); + SETTING_TRACE_END; +} + +void setting_time_main_launch_worldclock_destroy_ug_cb(ui_gadget_h ug, + void *priv) +{ + SETTING_TRACE_BEGIN; + /* if(ug) ug_destroy(ug); */ + /* restore the '<-' button on the navigate bar */ + ret_if(!priv); + SettingTimeUG *ad = (SettingTimeUG *) priv; + if (ug) { + ug_destroy(ug); + ad->ug_loading = NULL; + } + Elm_Object_Item *navi_it = elm_naviframe_top_item_get(ad->navi_bar); + ret_if(!navi_it); + Evas_Object *back_btn = elm_object_item_part_content_get(navi_it, "prev_btn"); + + if (back_btn != NULL) { + elm_object_style_set(back_btn, NAVI_BACK_BUTTON_STYLE); /* take into effect */ + } + +} + +void setting_time_main_launch_worldclock_layout_ug_cb(ui_gadget_h ug, + enum ug_mode mode, + void *priv) +{ + SETTING_TRACE_BEGIN; + SettingTimeUG *ad = (SettingTimeUG *) priv; + Evas_Object *base; + + if (!priv) + return; + + base = (Evas_Object *) ug_get_layout(ug); + if (!base) + return; + + switch (mode) { + case UG_MODE_FULLVIEW: + evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + //elm_win_resize_object_add(ad->win_get, base); + evas_object_show(base); + break; + default: + break; + } + SETTING_TRACE_END; +} + + +void setting_time_main_launch_worldclock_sg(void *data) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingTimeUG *ad = (SettingTimeUG *) data; + + struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs)); + setting_retm_if(!cbs, "calloc failed"); + cbs->layout_cb = setting_time_main_launch_worldclock_layout_ug_cb; + cbs->result_cb = setting_time_main_launch_worldclock_result_ug_cb; + cbs->destroy_cb = setting_time_main_launch_worldclock_destroy_ug_cb; + cbs->priv = (void *)ad; + + SETTING_TRACE("to load ug[%s]", "worldclock-efl"); + ad->ug_loading = + ug_create(ad->ug, "worldclock-efl", UG_MODE_FULLVIEW, NULL, cbs); + if (NULL == ad->ug_loading) { /* error handling */ + } + + FREE(cbs); + return; +} + + +Eina_Bool setting_update_datefield(void *cb) +{ + SETTING_TRACE_BEGIN; + retvm_if(cb == NULL, EINA_FALSE, "Data parameter is NULL"); + SettingTimeUG *ad = (SettingTimeUG *) cb; + + //__refresh_date_timer(ad); + if (ad->data_time) { + time_t ctime = time(NULL); + struct tm ts_ret; + struct tm *ts = localtime_r(&ctime, &ts_ret); + if (ts) elm_datetime_value_set(ad->data_time->eo_check, &ts_ret); + } + ad->refresh_time_idler = NULL; + return 0; +} + +/* *************************************************** + ** + **call back func + ** + ****************************************************/ + +void +setting_time_main_click_softkey_left_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + + SettingTimeUG *ad = (SettingTimeUG *) data; + + /* Send destroy request */ + ug_destroy_me(ad->ug); +} + +/* *************************************************** + ** + **call back func + ** + ****************************************************/ + +void +setting_time_main_click_softkey_caller_exist_left_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingTimeUG *ad = (SettingTimeUG *) data; + + /* Create Bundle and send message */ + service_h svc; + if (service_create(&svc)) + return; + + service_add_extra_data(svc, "result", "lbutton_click"); + ug_send_result(ad->ug, svc); + + service_destroy(svc); + + /* Send destroy request */ + ug_destroy_me(ad->ug); +} + +void +setting_time_main_click_softkey_caller_exist_right_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingTimeUG *ad = (SettingTimeUG *) data; + + /* Create Bundle and send message */ + service_h svc; + if (service_create(&svc)) + return; + + service_add_extra_data(svc, "result", "rbutton_click"); + ug_send_result(ad->ug, svc); + + service_destroy(svc); + + /* Send destroy request */ + ug_destroy_me(ad->ug); +} + +#if UN_SUPPORT_TIME_DYNAMIC_UPDATE +static void setting_time_reboot_resp_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + int response_type = btn_type(obj); + if (POPUP_RESPONSE_OK == response_type) { + setting_time_main_btn_update_ok_cb(data); + } else if (POPUP_RESPONSE_CANCEL == response_type) { + setting_time_main_btn_update_cancel_cb(data); + } + + SettingTimeUG *ad = data; + if (ad->pop) + { + evas_object_del(ad->pop); + ad->pop = NULL; + } +} +#endif + +static void __time_auto_update(void *data) +{ + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingTimeUG *ad = (SettingTimeUG *) data; + int err; + setting_set_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE, + SETTING_ON_OFF_BTN_ON, &err); + if (ad->data_tz) { + setting_disable_genlist_item(ad->data_tz->item); + } + + if (ad->data_time) { + ad->data_time->isItemDisableFlag = FALSE; + setting_disable_evas_object(ad->data_time->eo_check); + setting_disable_genlist_item(ad->data_time->item); + } + __update_time_via_sim_card(ad); +} + +static void +setting_time_main_chk_btn_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + SettingTimeUG *ad = NULL; + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + ad = list_item->userdata; + list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */ + if (ad->data_auto) + ad->chk_auto = ad->data_auto->eo_check; + if (ad->data_dst) + ad->chk_dst = ad->data_dst->eo_check; + + if (ad->data_time) { + elm_object_focus_set(ad->data_time->eo_check, EINA_FALSE); + } + + int err; + if (obj == ad->chk_auto) { + int bvalue; + setting_get_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE, + &bvalue, &err); + if (bvalue) { + (void) setting_set_bool_slp_key (BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE, SETTING_ON_OFF_BTN_OFF, &err); + elm_check_state_set(ad->chk_auto, 0); + + if (ad->data_tz) { + setting_enable_genlist_item(ad->data_tz->item); + } + + if (ad->data_time) { + ad->data_time->isItemDisableFlag = FALSE; + setting_enable_evas_object(ad->data_time->eo_check); + setting_enable_genlist_item(ad->data_time->item); + } + + } else { +#if UN_SUPPORT_TIME_DYNAMIC_UPDATE + ad->pop = + setting_create_popup_with_btn(ad, ad->win_get, NULL, + _("IDS_ST_POP_RESTART_PHONE_TO_USE_AUTOMATIC_UPDATE_Q"), + setting_time_reboot_resp_cb, + 0, 2, + dgettext("sys_string", + "IDS_COM_SK_OK"), + _("IDS_COM_SK_CANCEL")); +#else + __time_auto_update(ad); +#endif + } + } +} +static void setting_time_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + SettingTimeUG *ad = (SettingTimeUG *) data; + SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); + + if (ad->data_time && ad->data_time != list_item) { + elm_object_focus_set(ad->data_time->eo_check, EINA_FALSE); + } + + if (ad->data_tz == list_item) { + ad->is_datefield_selected = EINA_FALSE; + if (1 == setting_time_check_automatic_time_update_state()) { + setting_create_simple_popup(ad, ad->win_get, + NULL, _(AUTO_TIME_UPDATE_ON)); + } else { + setting_time_main_launch_worldclock_sg(ad); + } + + } else if (ad->data_time == list_item) { + ad->is_datefield_selected = EINA_TRUE; + if (1 == setting_time_check_automatic_time_update_state()) { + setting_create_simple_popup(ad, ad->win_get, + NULL, _(AUTO_TIME_UPDATE_ON)); + } else { + /* setting_view_change(&setting_view_time_main, &setting_view_time_time, ad); */ + } + } else if (ad->data_auto == list_item) { + ad->is_datefield_selected = EINA_FALSE; + int old_status = elm_check_state_get(list_item->eo_check); + /* new status */ + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + int err = 0; + if (!list_item->chk_status) { + (void) + setting_set_bool_slp_key + (BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE, + SETTING_ON_OFF_BTN_OFF, &err); + + if (ad->data_tz) { + setting_enable_genlist_item(ad->data_tz->item); + } + + if (ad->data_time) { + ad->data_time->isItemDisableFlag = FALSE; + setting_enable_evas_object(ad->data_time->eo_check); + setting_enable_genlist_item(ad->data_time->item); + } + + } else { + #if UN_SUPPORT_TIME_DYNAMIC_UPDATE + ad->pop = + setting_create_popup_with_btn(ad, ad->win_get, NULL, + _("IDS_ST_POP_RESTART_PHONE_TO_USE_AUTOMATIC_UPDATE_Q"), + setting_time_reboot_resp_cb, + 0, 2, + dgettext("sys_string", "IDS_COM_SK_OK"), + _("IDS_COM_SK_CANCEL")); + #else + __time_auto_update(ad); + #endif + } + + } + else if (ad->data_time_fmt == list_item + || ad->data_date_fmt == list_item + || ad->data_firstday_week_fmt == list_item) { + ad->is_datefield_selected = EINA_FALSE; + bool status = !elm_genlist_item_expanded_get(item); + elm_genlist_item_expanded_set(item, status); + } +} + + +void setting_time_main_btn_update_ok_cb(void *cb) +{ + SETTING_TRACE_BEGIN; + SettingTimeUG *ad = (SettingTimeUG *) cb; + int err; /* error check */ + setting_set_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE, + SETTING_ON_OFF_BTN_ON, &err); + elm_check_state_set(ad->data_auto->eo_check, 1); + ad->data_auto->chk_status = 1; + + sysman_request_reboot(); + + /* We'd better check return value from sysman_request_reboot() function. */ + /* It will return 0 on success or -1 if failed. */ +} + + +void setting_time_main_btn_update_cancel_cb(void *cb) +{ + SETTING_TRACE_BEGIN; + SettingTimeUG *ad = (SettingTimeUG *) cb; + + int err; /* error check */ + + retm_if(cb == NULL, "Data parameter is NULL"); + setting_set_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE, + SETTING_ON_OFF_BTN_OFF, &err); + elm_check_state_set(ad->data_auto->eo_check, 0); + ad->data_auto->chk_status = 0; + +} + + +static UChar *uastrcpy(const char *chars) +{ + int len = 0; + UChar *str = NULL; + len = safeStrLen(chars); + str = (UChar *) malloc(sizeof(UChar) *(len + 1)); + if (!str) + return NULL; + u_uastrcpy(str, chars); + return str; +} + + +static int get_timezone_isdst(int* isdst) +{ + SETTING_TRACE_BEGIN; + struct tm *ts; + time_t ctime; + + enum { BUFFERSIZE = 1024 }; + char buf[BUFFERSIZE]; + ssize_t len = readlink("/opt/etc/localtime", buf, sizeof(buf)-1); + + if (len != -1) { + buf[len] = '\0'; + } + else { + /* handle error condition */ + } + + ctime = time(NULL); + ts = localtime(&ctime); + if ( ! ts ) { + return SETTING_GENERAL_ERR_NULL_DATA_PARAMETER; + } + + SETTING_TRACE(" == tz_path = %s", buf); + SETTING_TRACE(" == isdst = %d\n", ts->tm_isdst); + *isdst = ts->tm_isdst; + + return SETTING_RETURN_SUCCESS; +} + + +static void ICU_set_timezone(const char *timezone) +{ + SETTING_TRACE("ICU_set_timezone = %s ", timezone); + UErrorCode ec = U_ZERO_ERROR; + UChar *str = uastrcpy(timezone); + + ucal_setDefaultTimeZone(str, &ec); + if (U_SUCCESS(ec)) { + SETTING_TRACE("ucal_setDefaultTimeZone() SUCCESS "); + } else { + SETTING_TRACE("ucal_setDefaultTimeZone() FAILED : %s ", + u_errorName(ec)); + } + FREE(str); +} + +#if DISABLED_CODE +static void setting_time_main_controlbar_lbtn_label_set( + Evas_Object *controlbar, + char *label) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(controlbar == NULL, "controlbar parameter is NULL"); + setting_retm_if(label == NULL, "label parameter is NULL"); + + Evas_Object *eo_lbtn = NULL; + Elm_Object_Item *first_item = NULL; + + first_item = elm_toolbar_first_item_get(controlbar); + setting_retm_if(first_item == NULL, "get first_item failed"); + + eo_lbtn = elm_object_item_part_content_get(first_item, "object"); + setting_retm_if(eo_lbtn == NULL, "get eo_lbtn failed"); + + elm_object_text_set(eo_lbtn, label); +} +#endif + +/** + * ex) timezone : Asia/Seoul --> returns "+09" + * + * char outstr2[4]; + */ +static void get_gmt_offset(char *str_buf, int size) +{ + // timezone string +/- ex. +9, -1 + time_t t = time(0); // get unix time. sec. + + struct tm* data; + data = localtime(&t); // save time as structure. + setting_retm_if(!data, "data is NULL"); + data->tm_isdst = 0; // summer time, not applied. + time_t a = mktime(data); + + data = gmtime(&a); + data->tm_isdst = 0; // summer time, not applied. + time_t b = mktime(data); + + int gmtoffset_hour = (a-b)/3600; // result : hour. + int gmtoffset_min = ((a-b)%3600)/60; // result : min. + if(gmtoffset_min != 0) { + gmtoffset_min = 30; + } + + snprintf(str_buf, size, "%+d:%02u", gmtoffset_hour, gmtoffset_min); + SETTING_TRACE("szTimezone is of a valid format: GMT: %s", str_buf); +} + + +// automatic +static char* get_timezone_str() +{ + SETTING_TRACE_BEGIN; + + enum { BUFFERSIZE = 1024 }; + char buf[BUFFERSIZE]; + ssize_t len = readlink("/opt/etc/localtime", buf, sizeof(buf)-1); + + if (len != -1) { + buf[len] = '\0'; + } + else { + /* handle error condition */ + } + return g_strdup(buf+20); //Asia/Seoul +} + +static char* get_city_name_result() +{ + return s_result; +} + + +// in_str = "Asia/Seoul" +static bool get_city_name(char* tzname) +{ + sqlite3 *pSQLite3 = NULL; + char *szErrMsg = NULL; + + int rst = sqlite3_open( "/opt/dbspace/.worldclock.db", &pSQLite3); + if ( rst ) + { + printf( "Can't open database: %s\n", sqlite3_errmsg( pSQLite3 )); + sqlite3_close( pSQLite3 ); + pSQLite3 = NULL; + return false; + } + else + { + printf("Database opened!!\n"); + char query_str[256]; + snprintf(query_str, 256, "SELECT city FROM city_table where tz_path=\"%s\"", tzname); + printf("%s \n", query_str); + rst = sqlite3_exec(pSQLite3, query_str, query_callback, 0, &szErrMsg); + } + + //객체해제 + sqlite3_free( szErrMsg ); + sqlite3_close( pSQLite3 ); + printf("Database close!!\n"); + return true; +} + +static int query_callback(void *NotUsed, int argc, char **argv, char **azColName) +{ + int i = 0; + printf("%s\n", argv[i] ? argv[i] : "NULL"); + s_result = g_strdup(argv[i] ? argv[i] : "NULL"); + return 0; +}; + + +#if 0 /* example */ +int main(int argc, char* argv[]) +{ + g_type_init (); + int ret; + // exporting - current status + if ( (argc == 2) && (0 == strcmp(argv[1], "export"))) { + setting_export(); + } + else if ( (argc == 2) && (0 == strcmp(argv[1], "timezone_init"))) { + + ////////////////////////////////////////////////////////////////////////// + char* tz_path_zone_city = get_timezone_str(); + bool ret = get_city_name(tz_path_zone_city); + if (ret) { + printf(">>>>>> RESULT : %s \n", get_city_name_result()); + } + ////////////////////////////////////////////////////////////////////////// + } + else { + // cfg create + // TRUE or FALSE + ret = setting_cfg_create(); + } + return 0; +} +#endif + + + diff --git a/setting-time/src/setting-time.c b/setting-time/src/setting-time.c new file mode 100755 index 0000000..a6c0642 --- /dev/null +++ b/setting-time/src/setting-time.c @@ -0,0 +1,296 @@ +/* + * setting + * Copyright (c) 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://floralicense.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. + */ + +/** + *@defgroup setting-datetime + *UG creation code for setting-datetime + * + * - Automatic update + * - Time zone + * - Date and time (elm_datefield) + * - Time format (12H/24H) + * - First day of week + */ +#include +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif + +/** +* @callback handler for EVAS_CALLBACK_RESIZE +* +* @param data user data (SettingTimeUG *) +*/ +static void setting_time_ug_cb_resize(void *data, Evas *e, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + SettingTimeUG *ad = (SettingTimeUG *) data; + setting_view_update(&setting_view_time_main, ad); +} + +/** +* @callback function called first while loading setting-time UG. +* +* @param ug ug object itself. +* @param mode +* @param data bundle (key, value pair) data as arguments into UG. +* @param priv SettingTimeUG context +* +* @return +*/ +static void *setting_time_ug_on_create(ui_gadget_h ug, enum ug_mode mode, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if((!priv), NULL, "!priv"); + + SettingTimeUG *timeUG = priv; + timeUG->ug = ug; + timeUG->bundle_data = service; + timeUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug); + timeUG->win_get = (Evas_Object *) ug_get_window(); + evas_object_show(timeUG->win_main_layout); + timeUG->evas = evas_object_evas_get(timeUG->win_main_layout); + + timeUG->pop_progress = NULL; + /* Initialize Caller value */ + timeUG->caller = NULL; + + setting_retvm_if(timeUG->win_main_layout == NULL, NULL, "cannot get main window "); + + /* --------------------------------------------------------- */ + char *pa_path = NULL;; + + pa_path = vconf_get_str(VCONFKEY_LANGSET); + if (!pa_path) { + SETTING_TRACE ("%s*** language setting has no proper value (nil) ***%s", SETTING_FONT_BGREEN, SETTING_FONT_BLACK); + return NULL; + } + + /* set launguage */ + setting_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR); + + /* register view node table */ + setting_view_node_table_intialize(); + setting_view_node_table_register(&setting_view_time_main, NULL); + + setting_create_Gendial_itc("dialogue/2text.3", &(timeUG->itc_2text_2)); + setting_create_Gendial_itc("dialogue/1text.1icon", + &(timeUG->itc_1text_1icon)); + + setting_create_Gendial_itc("dialogue/1icon", &(timeUG->itc_layout)); + + setting_create_Gendial_itc("dialogue/2text.3/expandable", + &(timeUG->itc_2text_3_parent)); + setting_create_Gendial_itc("dialogue/1text.1icon/expandable2", + &(timeUG->itc_1icon_1text_sub)); + + timeUG->itc_seperator.item_style = "dialogue/separator"; + timeUG->itc_seperator.func.text_get = NULL; + timeUG->itc_seperator.func.content_get = NULL; + timeUG->itc_seperator.func.state_get = NULL; + timeUG->itc_seperator.func.del = NULL; + + /* creating a view. */ + setting_view_node_set_cur_view(&setting_view_time_main); + setting_view_create(&setting_view_time_main, (void *)timeUG); + evas_object_event_callback_add(timeUG->win_main_layout, + EVAS_CALLBACK_RESIZE, + setting_time_ug_cb_resize, timeUG); + return timeUG->ly_main; +} + +static void setting_time_ug_on_start(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + /* do nothing */ +} + +static void setting_time_ug_on_pause(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + /* do nothing */ +} + +static void setting_time_ug_on_resume(ui_gadget_h ug, service_h service, + void *priv) +{ + /* do nothing */ +} + +static void setting_time_ug_on_destroy(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if((!priv), "!priv"); + SettingTimeUG *timeUG = priv; + + evas_object_event_callback_del(timeUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_time_ug_cb_resize); /* fix flash issue for gallery */ + timeUG->ug = ug; + + /* delete the allocated objects. */ + setting_view_destroy(&setting_view_time_main, timeUG); + + if (NULL != ug_get_layout(timeUG->ug)) { + evas_object_hide((Evas_Object *) ug_get_layout(timeUG->ug)); + evas_object_del((Evas_Object *) ug_get_layout(timeUG->ug)); + } + + SETTING_TRACE_END; +} + +static void setting_time_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; +} + +static void setting_time_ug_on_event(ui_gadget_h ug, enum ug_event event, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + 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; + case UG_EVENT_REGION_CHANGE: + break; + default: + break; + } +} + +/** +* @brief key event handler for UG +*/ +static void setting_time_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + SettingTimeUG *ad = (SettingTimeUG *) priv; + + switch (event) { + case UG_KEY_EVENT_END: + { + if (0 == safeStrCmp(ad->caller, "pwlock")) { + /* Create Bundle and send message */ + + service_h svc; + if (service_create(&svc)) + return; + + service_add_extra_data(svc, "result", "lbutton_click"); + ug_send_result(ad->ug, svc); + + service_destroy(svc); + } + + if (elm_naviframe_top_item_get(ad->navi_bar) == + elm_naviframe_bottom_item_get(ad->navi_bar)) { + ug_destroy_me(ug); + } else { + /* elm_naviframe_item_pop(ad->navi_bar); */ + setting_view_cb_at_endKey(ad); + } + } + break; + default: + break; + } +} + +/** +* @brief UG entry point - create the SettingTimeUG context +* @return 0 +*/ +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + SettingTimeUG *timeUG = calloc(1, sizeof(SettingTimeUG)); + setting_retvm_if(!timeUG, -1, "Create SettingTimeUG obj failed"); + + ops->create = setting_time_ug_on_create; + ops->start = setting_time_ug_on_start; + ops->pause = setting_time_ug_on_pause; + ops->resume = setting_time_ug_on_resume; + ops->destroy = setting_time_ug_on_destroy; + ops->message = setting_time_ug_on_message; + ops->event = setting_time_ug_on_event; + ops->key_event = setting_time_ug_on_key_event; + ops->priv = timeUG; + ops->opt = UG_OPT_INDICATOR_ENABLE; + + return 0; +} + +/** +* @brief UG finalizer - destroy the SettingTimeUG context +*/ +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + struct SettingTimeUG *timeUG; + setting_retm_if(!ops, "ops == NULL"); + + timeUG = ops->priv; + if (timeUG) + FREE(timeUG); +} + +/** +* Reset function to 'reset' the settings of the UG, it will be invoked by 'Reset' UG +*/ +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + int ret = 0; +#if SUPPORT_RUN_SYSTEM_COMMAND + ret += excuteCmd(SETTING_POSTINST_FILE, 1, "timeAndData"); +#else + if (!isEmulBin()) { + ret += vconf_set_bool(VCONFKEY_SETAPPL_STATE_AUTOMATIC_TIME_UPDATE_BOOL, TRUE); + } + + ret += vconf_set_int(VCONFKEY_REGIONFORMAT_TIME1224, VCONFKEY_TIME_FORMAT_12); + ret += vconf_set_int(VCONFKEY_SETAPPL_DATE_FORMAT_INT, SETTING_DATE_FORMAT_DD_MM_YYYY); + ret += vconf_set_int(VCONFKEY_SETAPPL_WEEKOFDAY_FORMAT_INT, SETTING_WEEKOFDAY_FORMAT_SUNDAY); + + ret += vconf_set_str(VCONFKEY_SETAPPL_TIMEZONE_INT, "+9"); + ret += vconf_set_str(VCONFKEY_SETAPPL_CITYNAME_INDEX_INT, "IDS_WCL_BODY_CITYNAME_SEOUL"); + + /** @todo replace with vconf ID */ + ret += vconf_set_str(VCONFKEY_SETAPPL_TIMEZONE_ID, "Asia/Seoul"); + +#endif + return ret; +} + diff --git a/setting-viewtype/CMakeLists.txt b/setting-viewtype/CMakeLists.txt new file mode 100755 index 0000000..719d3c1 --- /dev/null +++ b/setting-viewtype/CMakeLists.txt @@ -0,0 +1,34 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_viewtype REQUIRED elementary appcore-common appcore-efl ui-gadget-1 capi-appfw-application) + +FOREACH(flag ${pkgs_viewtype_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") +ADD_DEFINITIONS("-fpie") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") + +ADD_LIBRARY(${SETTING_VIEWTYPE_UG} SHARED + ./src/setting-viewtype.c + ./src/setting-task-switcher-viewtype.c + ) + +TARGET_LINK_LIBRARIES(${SETTING_VIEWTYPE_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_VIEWTYPE_UG} ${pkgs_display_LDFLAGS}) + +INSTALL(TARGETS ${SETTING_VIEWTYPE_UG} DESTINATION /usr/ug/lib) diff --git a/setting-viewtype/include/setting-task-switcher-viewtype.h b/setting-viewtype/include/setting-task-switcher-viewtype.h new file mode 100755 index 0000000..357bd9e --- /dev/null +++ b/setting-viewtype/include/setting-task-switcher-viewtype.h @@ -0,0 +1,31 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_TASKSWITCHER_VIEWTYPE_MAIN_H__ +#define __SETTING_TASKSWITCHER_VIEWTYPE_MAIN_H__ + +#include + +static void setting_task_switcher_viewtype_click_softkey_cancel_cb(void *data, + Evas_Object * + obj, void + *event_info); +static void setting_task_switcher_viewtype_click_softkey_set_cb(void *data, + Evas_Object * + obj, void + *event_info); + +#endif /* __SETTING_TASKSWITCHER_VIEWTYPE_MAIN_H__ */ diff --git a/setting-viewtype/include/setting-viewtype.h b/setting-viewtype/include/setting-viewtype.h new file mode 100755 index 0000000..da88835 --- /dev/null +++ b/setting-viewtype/include/setting-viewtype.h @@ -0,0 +1,50 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 __SETTING_VIEWTYPE_H__ +#define __SETTING_VIEWTYPE_H__ + +#include +#include + +#include +#include + +typedef struct _SettingViewTypeUG SettingViewTypeUG; + +/** + * Setting ViewType UG context + * all UG function has void* as an agument. this is casted back to SettingViewTypeUG + * and the functions access app context. + */ +struct _SettingViewTypeUG { + ui_gadget_h ug; + Evas *evas; + Evas_Object *win_main_layout; + Evas_Object *win_get; + + Evas_Object *ly_task; + + Evas_Object *chk_task; + + setting_view *view_to_load; + Elm_Genlist_Item_Class itc_1text_1icon_2; + Elm_Genlist_Item_Class itc_seperator; +}; + +extern setting_view setting_view_task_switcher_viewtype; + +#endif /* __SETTING_VIEWTYPE_H__ */ diff --git a/setting-viewtype/src/setting-task-switcher-viewtype.c b/setting-viewtype/src/setting-task-switcher-viewtype.c new file mode 100755 index 0000000..d7c3305 --- /dev/null +++ b/setting-viewtype/src/setting-task-switcher-viewtype.c @@ -0,0 +1,201 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 + +static int setting_task_switcher_viewtype_create(void *cb); +static int setting_task_switcher_viewtype_destroy(void *cb); +static int setting_task_switcher_viewtype_update(void *cb); +static int setting_task_switcher_viewtype_cleanup(void *cb); + +setting_view setting_view_task_switcher_viewtype = { + .create = setting_task_switcher_viewtype_create, + .destroy = setting_task_switcher_viewtype_destroy, + .update = setting_task_switcher_viewtype_update, + .cleanup = setting_task_switcher_viewtype_cleanup, +}; + +/* *************************************************** + * + *basic func + * + ***************************************************/ + +static int setting_task_switcher_viewtype_create(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingViewTypeUG *ad = (SettingViewTypeUG *) cb; + + Evas_Object *navi_bar = NULL; + Evas_Object *scroller; + + ad->ly_task = + setting_create_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _ + ("IDS_ST_BODY_TASK_SWITCHER"), + dgettext("sys_string", "IDS_COM_SK_CANCEL"), + dgettext("sys_string", "IDS_COM_SK_SET"), + setting_task_switcher_viewtype_click_softkey_cancel_cb, + setting_task_switcher_viewtype_click_softkey_set_cb, + ad, &scroller, &navi_bar); + + Elm_Object_Item *item = NULL;; + + item = + elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* scroller is a genlist */ + SETTING_TRACE("scroller:%p", scroller); + ad->chk_task = elm_radio_add(scroller); + elm_radio_state_value_set(ad->chk_task, -1); + + setting_create_Gendial_field_1radio(scroller, &(ad->itc_1text_1icon_2), + setting_mouse_up_Gendial_list_radio_cb, + ad->chk_task, SWALLOW_Type_1RADIO, + ad->chk_task, + VCONFKEY_TASKSWITCHER_VIEWTYPE_LIST, + "IDS_ST_BODY_LIST_VIEW", NULL); + + setting_create_Gendial_field_1radio(scroller, &(ad->itc_1text_1icon_2), + setting_mouse_up_Gendial_list_radio_cb, + ad->chk_task, SWALLOW_Type_1RADIO, + ad->chk_task, + VCONFKEY_TASKSWITCHER_VIEWTYPE_CARD, + "Card view", NULL); +#ifdef UNUSED_VCONFKEY + setting_update_chk_status(ad->chk_task, + INT_SLP_SETTING_TASKSWITCHER_VIEWTYPE); +#endif + setting_view_task_switcher_viewtype.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int setting_task_switcher_viewtype_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingViewTypeUG *ad = (SettingViewTypeUG *) cb; + + if (ad->ly_task != NULL) { + evas_object_del(ad->ly_task); + setting_view_task_switcher_viewtype.is_create = 0; + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_task_switcher_viewtype_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingViewTypeUG *ad = (SettingViewTypeUG *) cb; + + if (ad->ly_task != NULL) { + evas_object_show(ad->ly_task); +#ifdef UNUSED_VCONFKEY + setting_update_chk_status(ad->chk_task, + INT_SLP_SETTING_TASKSWITCHER_VIEWTYPE); +#endif + } + return SETTING_RETURN_SUCCESS; +} + +static int setting_task_switcher_viewtype_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingViewTypeUG *ad = (SettingViewTypeUG *) cb; + + if (ad->ly_task != NULL) { + evas_object_hide(ad->ly_task); + } + + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void +setting_task_switcher_viewtype_click_softkey_cancel_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + + SettingViewTypeUG *ad = (SettingViewTypeUG *) data; + + /* Send destroy request */ + ug_destroy_me(ad->ug); +} + +static void +setting_task_switcher_viewtype_click_softkey_set_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + int value = 0; + int err = 0; + int ret = 0; + + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + + SettingViewTypeUG *ad = (SettingViewTypeUG *) data; + + value = elm_radio_value_get(ad->chk_task); + SETTING_TRACE("value:%d", value); +#ifdef UNUSED_VCONFKEY + ret = + setting_set_int_slp_key(INT_SLP_SETTING_TASKSWITCHER_VIEWTYPE, + value, &err); +#endif + /* shared_gadget_send_command(SHARED_GADGET(ad), CLOSE_SETTING_DISPLAY_SG_CMD, NULL); */ + /* Send message to ug */ + /*bundle *b = bundle_create(); + if (!b) return; + bundle_add(b, "updateType", "ON_OFF_TEXT"); + bundle_add(b, "ON_OFF_TEXT", get_task_switcher_viewtype_str()); + ug_send_result(ad->ug, b); + bundle_free(b); */ + + /* Send destroy request */ + ug_destroy_me(ad->ug); +} diff --git a/setting-viewtype/src/setting-viewtype.c b/setting-viewtype/src/setting-viewtype.c new file mode 100755 index 0000000..fec9169 --- /dev/null +++ b/setting-viewtype/src/setting-viewtype.c @@ -0,0 +1,252 @@ +/* + * setting + * Copyright (c) 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://floralicense.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 + +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif + +setting_view *__get_viewtype_view_to_load(service_h service) +{ + SETTING_TRACE_BEGIN; + + const char *viewtype = NULL; + service_get_extra_data(service, "viewtype", &viewtype); + if(!viewtype) + return NULL; + + SETTING_TRACE("viewtype:%s", viewtype); + + if (!safeStrCmp(viewtype, "taskswitcher")) { + return &setting_view_task_switcher_viewtype; + } else { + return NULL; /* &setting_view_viewtype_main; */ + } + +} + +Evas_Object *__get_viewtype_layout_to_return(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + SettingViewTypeUG *viewtypeUG = priv; + const char *viewtype = NULL; + service_get_extra_data(service, "viewtype", &viewtype); + if(!viewtype) + return NULL; + + SETTING_TRACE("viewtype:%s", viewtype); + + if (!safeStrCmp(viewtype, "taskswitcher")) { + return viewtypeUG->ly_task; + } else { + return NULL; /* &setting_view_viewtype_main; */ + } + +} + +static void setting_viewtype_ug_cb_resize(void *data, Evas *e, + Evas_Object *obj, void *event_info) +{ + SettingViewTypeUG *ad = (SettingViewTypeUG *) data; + /* setting_view_update(&setting_view_about_main, ad); */ + setting_view_update(ad->view_to_load, ad); +} + +static void *setting_viewtype_ug_on_create(ui_gadget_h ug, + enum ug_mode mode, service_h service, + void *priv) +{ + setting_retvm_if((!priv), NULL, "!priv"); + + SettingViewTypeUG *viewtypeUG = priv; + viewtypeUG->ug = ug; + + viewtypeUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug); + viewtypeUG->win_get = (Evas_Object *) ug_get_window(); + evas_object_show(viewtypeUG->win_main_layout); + viewtypeUG->evas = evas_object_evas_get(viewtypeUG->win_main_layout); + + setting_retvm_if(viewtypeUG->win_main_layout == NULL, NULL, + "cannot get main window "); + + + setting_create_Gendial_itc("dialogue/1text.1icon.2", + &(viewtypeUG->itc_1text_1icon_2)); + + viewtypeUG->itc_seperator.item_style = "dialogue/separator"; + viewtypeUG->itc_seperator.func.text_get = NULL; + viewtypeUG->itc_seperator.func.content_get = NULL; + viewtypeUG->itc_seperator.func.state_get = NULL; + viewtypeUG->itc_seperator.func.del = NULL; + + /* creating a view. */ + /* setting_view_create(&setting_view_viewtype_main, (void *)viewtypeUG); */ + viewtypeUG->view_to_load = __get_viewtype_view_to_load(data); + setting_retvm_if(NULL == viewtypeUG->view_to_load, NULL, + "NULL == viewtypeUG->view_to_load"); + setting_view_create(viewtypeUG->view_to_load, (void *)viewtypeUG); + evas_object_event_callback_add(viewtypeUG->win_main_layout, + EVAS_CALLBACK_RESIZE, + setting_viewtype_ug_cb_resize, + viewtypeUG); + return __get_viewtype_layout_to_return(data, viewtypeUG); +} + +static void setting_viewtype_ug_on_start(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_viewtype_ug_on_pause(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_viewtype_ug_on_resume(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_viewtype_ug_on_destroy(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if((!priv), "!priv"); + SettingViewTypeUG *viewtypeUG = priv; + + evas_object_event_callback_del(viewtypeUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_viewtype_ug_cb_resize); /* fix flash issue for gallery */ + viewtypeUG->ug = ug; + + /* called when this shared gadget is terminated. similar with app_exit */ + if (&setting_view_task_switcher_viewtype == viewtypeUG->view_to_load) { + setting_view_destroy(&setting_view_task_switcher_viewtype, + viewtypeUG); + } + + if (NULL != ug_get_layout(viewtypeUG->ug)) { + evas_object_hide((Evas_Object *) ug_get_layout(viewtypeUG->ug)); + evas_object_del((Evas_Object *) ug_get_layout(viewtypeUG->ug)); + } + + SETTING_TRACE_END; +} + +static void setting_viewtype_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; +} + +static void setting_viewtype_ug_on_event(ui_gadget_h ug, + enum ug_event event, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + 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; + case UG_EVENT_REGION_CHANGE: + break; + default: + break; + } +} + +static void setting_viewtype_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + + switch (event) { + case UG_KEY_EVENT_END: + ug_destroy_me(ug); + break; + default: + break; + } +} + +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + SettingViewTypeUG *viewtypeUG = calloc(1, sizeof(SettingViewTypeUG)); + setting_retvm_if(!viewtypeUG, -1, + "Create SettingViewTypeUG obj failed"); + + ops->create = setting_viewtype_ug_on_create; + ops->start = setting_viewtype_ug_on_start; + ops->pause = setting_viewtype_ug_on_pause; + ops->resume = setting_viewtype_ug_on_resume; + ops->destroy = setting_viewtype_ug_on_destroy; + ops->message = setting_viewtype_ug_on_message; + ops->event = setting_viewtype_ug_on_event; + ops->key_event = setting_viewtype_ug_on_key_event; + ops->priv = viewtypeUG; + ops->opt = UG_OPT_INDICATOR_ENABLE; + + return 0; +} + +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + struct SettingViewTypeUG *viewtypeUG; + setting_retm_if(!ops, "ops == NULL"); + + viewtypeUG = ops->priv; + if (viewtypeUG) + FREE(viewtypeUG); +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/** +* Reset function to 'reset' the settings of the UG, it will be invoked by 'Reset' UG +*/ +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + int ret = 0; + #if SUPPORT_RUN_SYSTEM_COMMAND + ret += excuteCmd(SETTING_POSTINST_FILE, 1, "viewtype"); + #else +#ifdef UNUSED_VCONFKEY + ret += vconf_set_int(VCONFKEY_TASKSWITCHER_VIEWTYPE, VCONFKEY_TASKSWITCHER_VIEWTYPE_LIST); +#endif + #endif + + return ret; +} + + diff --git a/settings.manifest b/settings.manifest new file mode 100644 index 0000000..8190ed2 --- /dev/null +++ b/settings.manifest @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100755 index 0000000..97388b8 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,130 @@ + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_main REQUIRED + glib-2.0 gthread-2.0 elementary + appcore-common appcore-efl + tapi + utilX + dlog json-glib-1.0 + ui-gadget-1 + capi-appfw-application aul + ecore-imf ecore-x eina capi-system-sensor + ecore ecore-file ecore-input + sysman icu-i18n icu-io icu-le icu-lx icu-uc + appsvc libxml-2.0 + capi-system-system-settings + capi-network-wifi + capi-network-tethering + capi-network-bluetooth + capi-network-nfc + dbus-glib-1 ewebkit2 + ##setting-service + ) + +FOREACH(flag ${pkgs_main_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") +SET(BUILD_ARCH "${ARCH}") + +IF("${BUILD_ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("********************** add -DTARGET") +ENDIF("${BUILD_ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"") +ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"") +ADD_DEFINITIONS("-DDATADIR=\"${DATADIR}\"") +ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"") +ADD_DEFINITIONS("-DICONDIR=\"${ICONDIR}\"") +ADD_DEFINITIONS("-DEDJEDIR=\"${EDJEDIR}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") + +ADD_DEFINITIONS("-fpie") + +ADD_DEFINITIONS("-DXP_UNIX") + + +ADD_EXECUTABLE(${PROJECT_NAME} + ./setting.c + ./setting-main.c + ./setting-more-menu.c + ./setting-plugin.c + ) + +####FOR TEST>>>>######## +ADD_DEFINITIONS("-DPLUGIN") +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/plugin-resource/plugin-cfg DESTINATION /opt/data/setting FILES_MATCHING PATTERN "*.cfg") +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/plugin-resource/plugin-xml DESTINATION /opt/data/setting FILES_MATCHING PATTERN "*.xml") +####FOR TEST>>>>######## + +# conf_tool +SET(SETTING_CONFUTIL setting_conf_util) +ADD_EXECUTABLE(${SETTING_CONFUTIL} + ./conf_util/setting_confutil.c + ) +TARGET_LINK_LIBRARIES(${SETTING_CONFUTIL} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_CONFUTIL} ${pkgs_main_LDFLAGS} "-pie") +INSTALL(TARGETS ${SETTING_CONFUTIL} DESTINATION /usr/apps/${SETTING_PKG_NAME}/bin) + +####FOR TEST>>>>######## +TARGET_LINK_LIBRARIES(${PROJECT_NAME} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +#TARGET_LINK_LIBRARIES(${PROJECT_NAME} -L/usr/apps/${SETTING_PKG_NAME}/lib -lsetting-common) +# /usr/apps/${SETTING_PKG_NAME}/lib + +# dmalloc +#TARGET_LINK_LIBRARIES(${PROJECT_NAME} -ldmalloc) +TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_main_LDFLAGS} "-pie") + +INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/apps/${SETTING_PKG_NAME}/bin) + +EXEC_PROGRAM("xmllint" + ARGS "${CMAKE_SOURCE_DIR}/org.tizen.setting.xml --noout --schema ${CMAKE_SOURCE_DIR}/manifest.xsd" + OUTPUT_VARIABLE output1 + RETURN_VALUE ret + ) +MESSAGE(STATUS "ret=${ret}") + +IF (NOT ${ret} EQUAL 0) + MESSAGE(FATAL_ERROR "org.tizen.setting.xml may has XML validation error.") +ENDIF (NOT ${ret} EQUAL 0) + +# make setting-theme.edj +ADD_CUSTOM_TARGET(setting-theme.edj + COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/resource/images + ${CMAKE_SOURCE_DIR}/resource/setting-theme.edc ${CMAKE_BINARY_DIR}/setting-theme.edj + DEPENDS ${CMAKE_SOURCE_DIR}/resource/setting-theme.edc +) + +ADD_DEPENDENCIES(${PROJECT_NAME} setting-theme.edj) + +INSTALL(FILES ${CMAKE_BINARY_DIR}/setting-theme.edj DESTINATION /usr/apps/${SETTING_PKG_NAME}/res/edje/) + +# install open source license +INSTALL(FILES ${CMAKE_SOURCE_DIR}/resource/Open_Source_Announcement.html DESTINATION /usr/apps/${SETTING_PKG_NAME}/data) + + +#------------------------------------------------------------------------------------------ +INSTALL(FILES ${CMAKE_SOURCE_DIR}/resource/setting.cfg DESTINATION /opt/data/setting) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/resource/langlist.xml DESTINATION /opt/data/setting) +#------------------------------------------------------------------------------------------ + +# install desktop file & icon +SET(PREFIX ${CMAKE_INSTALL_PREFIX}) + +INSTALL(FILES ${CMAKE_SOURCE_DIR}/${SETTING_PKG_NAME}.xml DESTINATION /usr/share/packages/) + +INSTALL(FILES ${CMAKE_SOURCE_DIR}/${SETTING_PKG_NAME}.png DESTINATION /usr/share/icons/default/small) +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/resource/icons DESTINATION /usr/apps/${SETTING_PKG_NAME}/res FILES_MATCHING PATTERN "*.png") +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/resource/images DESTINATION /usr/apps/${SETTING_PKG_NAME}/res FILES_MATCHING PATTERN "*.png") + +# install media-data +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/resource/media-data-sdk/settings DESTINATION /opt/share PATTERN "*") + +# install ini file +# INSTALL(FILES ${CMAKE_SOURCE_DIR}/${PROJECT_NAME}.ini DESTINATION share/process-info) +#add sub directory +ADD_SUBDIRECTORY(po) + diff --git a/src/conf_util/setting_confutil.c b/src/conf_util/setting_confutil.c new file mode 100755 index 0000000..6f6cb30 --- /dev/null +++ b/src/conf_util/setting_confutil.c @@ -0,0 +1,129 @@ +/* + * setting_confutil + * + * + * + $ setting_confutil // create a cfg file in default + $ setting_confutil export // export current status to a xml file + $ setting_confutil timezone_init // timezone init + */ +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +static char* get_timezone(); + +static void get_gmt_offset(char *str_buf, int size) +{ + // timezone string +/- ex. +9, -1 + time_t t = time(0); // get unix time. sec. + + struct tm* data; + data = localtime(&t); // save time as structure. + setting_retm_if(!data, "data is NULL"); + data->tm_isdst = 0; // summer time, not applied. + time_t a = mktime(data); + + data = gmtime(&a); + data->tm_isdst = 0; // summer time, not applied. + time_t b = mktime(data); + + int gmtoffset_hour = (a-b)/3600; // result : hour. + int gmtoffset_min = ((a-b)%3600)/60; // result : min. + if(gmtoffset_min != 0) { + gmtoffset_min = 30; + } + + snprintf(str_buf, size, "%+d:%02u", gmtoffset_hour, gmtoffset_min); + SETTING_TRACE("szTimezone is of a valid format: GMT: %s", str_buf); +} + + +void timezone_init() +{ + char* tzpath = get_timezone(); + //printf(">>> time zone : %s \n", tzpath+20); + int ret = vconf_set_str(VCONFKEY_SETAPPL_TIMEZONE_INT, tzpath+20); + if (ret != 0) { + SETTING_TRACE("fail to set vconf"); + } + char str_buf[256] = {0, }; + get_gmt_offset(str_buf, 256); + printf(">>> time zone GMT string : %s \n", str_buf); +} + +void get_current_font() +{ + char *value = NULL; + int retcode = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_FONT_TYPE, &value); + if (retcode != 0) { + SETTING_TRACE("fail to set SYSTEM_SETTINGS_KEY_FONT_TYPE"); + } + printf(">>> get current font type : %s \n", value); +} + +int status_fp(int total, int current, void* data) +{ + SETTING_TRACE(">> total : %d ---- current : %d ", total, current); + return 0; +} + + +/** +sh-4.1# /usr/apps/org.tizen.setting/bin/setting_conf_util timezone_check +debug level init 1(1) +>>> time zone : /usr/share/zoneinfo/Asia/Seoul +*/ +int main(int argc, char* argv[]) +{ + g_type_init (); + int ret; + // exporting - current status + if ( (argc == 2) && (0 == strcmp(argv[1], "import"))) { + // void setting_import(status_handler fp, void* data) + + setting_import(status_fp, NULL); + + } else if ( (argc == 2) && (0 == strcmp(argv[1], "export"))) { + setting_export(status_fp, NULL); + } else if ( (argc == 2) && (0 == strcmp(argv[1], "timezone_init"))) { + timezone_init(); + } else if ( (argc == 2) && (0 == strcmp(argv[1], "get_current_font"))) { + get_current_font(); + } else { + // cfg create + // TRUE or FALSE + ret = setting_cfg_create(); + } + return 0; +} + +// automatic +static char* get_timezone() +{ + SETTING_TRACE_BEGIN; + + enum { BUFFERSIZE = 1024 }; + char buf[BUFFERSIZE]; + ssize_t len = readlink("/opt/etc/localtime", buf, sizeof(buf)-1); + + if (len != -1) { + buf[len] = '\0'; + } + else { + /* handle error condition */ + } + return g_strdup(buf); +} + diff --git a/src/conf_util/setting_confutil.h b/src/conf_util/setting_confutil.h new file mode 100644 index 0000000..4a3cb4e --- /dev/null +++ b/src/conf_util/setting_confutil.h @@ -0,0 +1,7 @@ +#ifndef __SETTING_CONFIG_UTIL_ +#define __SETTING_CONFIG_UTIL_ + +#include + + +#endif diff --git a/src/plugin-resource/plugin-cfg/app.cfg b/src/plugin-resource/plugin-cfg/app.cfg new file mode 100755 index 0000000..b791884 --- /dev/null +++ b/src/plugin-resource/plugin-cfg/app.cfg @@ -0,0 +1,141 @@ +[ + { + "id" : "page1", + "title" : "app", + "type" : "navigationbar", + "elements" : [ + { + "id" : "nav_ok_btn", + "title" : "OK", + "type" : "button" + }, + { + "id" : "nav_cancel_btn", + "title" : "IDS_COM_BODY_BACK", + "type" : "button" + } + ] + }, + { + "id" : "grp1", + "title" : "Group name1", + "type" : "group", + "elements" : [ + { + "id" : "checkbox1", + "title" : "Checkbox test1", + "type" : "checkbox", + "state" : 1 + }, + { + "id" : "editbox1", + "title" : "Editbox test", + "type" : "editbox", + "string" : "This is changed String 6" + }, + { + "id" : "expanditem1", + "title" : "Backlight time", + "type" : "expanditem", + "string" : "30 seconds", + "elements" : [ + { + "id" : "radio1", + "title" : "15 seconds", + "type" : "radio" + }, + { + "id" : "radio2", + "title" : "30 seconds", + "type" : "radio" + }, + { + "id" : "radio3", + "title" : "1 minute", + "type" : "radio" + }, + { + "id" : "radio4", + "title" : "2 minutes", + "type" : "radio" + } + ] + } + ] + }, + { + "id" : "grp2", + "title" : "Group name2", + "type" : "group", + "elements" : [ + { + "id" : "checkbox2", + "title" : "Checkbox test2", + "type" : "checkbox", + "state" : 0 + }, + { + "id" : "slider2", + "type" : "slider", + "title" : "slider text in group2", + "min" : 0, + "max" : 10, + "value" : 7 + }, + { + "id" : "link2", + "type" : "link", + "value" : "app2.cfg" + }, + { + "id" : "expanditem2", + "title" : "Roaming network", + "type" : "expanditem", + "string" : "Auto download", + "elements" : [ + { + "id" : "radio1", + "title" : "Auto download", + "type" : "radio" + }, + { + "id" : "radio2", + "title" : "Manual", + "type" : "radio" + }, + { + "id" : "radio3", + "title" : "Always reject", + "type" : "radio" + } + ] + } + ] + }, + { + "id" : "grp3", + "title" : "Group name3", + "type" : "group", + "elements" : [ + { + "id" : "checkbox3", + "title" : "Checkbox test3", + "type" : "checkbox", + "state" : 0 + }, + { + "id" : "slider3", + "title" : "slider text in group3", + "type" : "slider", + "min" : 0, + "max" : 10, + "value" : 7 + }, + { + "id" : "link3", + "type" : "link", + "value" : "app2.cfg" + } + ] + } +] \ No newline at end of file diff --git a/src/plugin-resource/plugin-cfg/app2.cfg b/src/plugin-resource/plugin-cfg/app2.cfg new file mode 100755 index 0000000..6fd4221 --- /dev/null +++ b/src/plugin-resource/plugin-cfg/app2.cfg @@ -0,0 +1,53 @@ +[ + { + "id" : "page1", + "title" : "app2", + "type" : "navigationbar", + "elements" : [ + { + "id" : "nav_ok_btn", + "title" : "OK", + "type" : "button" + }, + { + "id" : "nav_cancel_btn", + "title" : "IDS_COM_BODY_BACK", + "type" : "button" + } + ] + }, + { + "id" : "grp1", + "title" : "Connectivicy", + "type" : "group" + }, + { + "id" : "grp2", + "title" : "System", + "type" : "group" + }, + { + "id" : "grp3", + "title" : "Applications", + "type" : "group" + }, + { + "id" : "grp4", + "title" : "Downloaded Apps", + "type" : "group", + "elements" : [ + { + "id" : "grp4.list1", + "title" : "Plugin Model", + "type" : "link", + "value" : "app.cfg" + }, + { + "id" : "grp4.list2", + "title" : "Apps Info", + "type" : "link", + "value" : "app.cfg" + } + ] + } +] \ No newline at end of file diff --git a/src/plugin-resource/plugin-cfg/app3.cfg b/src/plugin-resource/plugin-cfg/app3.cfg new file mode 100755 index 0000000..128191c --- /dev/null +++ b/src/plugin-resource/plugin-cfg/app3.cfg @@ -0,0 +1,100 @@ +[ + { + "id" : "page1", + "title" : "app3", + "type" : "navigationbar", + "elements" : [ + { + "id" : "nav_ok_btn", + "title" : "OK", + "type" : "button" + }, + { + "id" : "nav_cancel_btn", + "title" : "IDS_COM_BODY_BACK", + "type" : "button" + } + ] + }, + { + "id" : "grp1", + "title" : "Connectivicy", + "type" : "group", + "elements" : [ + { + "id" : "grp1.list1", + "title" : "Plugin Model", + "type" : "link", + "value" : "app.cfg", + "elements" : [ + { + "id" : "grp1.list1.child1", + "title" : "Child1", + "type" : "link", + "value" : "app.cfg" + }, + { + "id" : "grp1.list1.child2", + "title" : "Child2", + "type" : "link", + "value" : "app.cfg" + } + ] + }, + { + "id" : "grp1.list2", + "title" : "Apps Info", + "type" : "link", + "value" : "app.cfg" + } + ] + }, + { + "id" : "grp2", + "title" : "System", + "type" : "group" + }, + { + "id" : "grp3", + "title" : "Applications", + "type" : "group", + "elements" : [ + { + "id" : "grp4.list1", + "title" : "Plugin Model", + "type" : "link", + "value" : "app.cfg", + "elements" : [ + { + "id" : "grp4.list1.child1", + "title" : "Child1", + "type" : "link", + "value" : "app.cfg" + }, + { + "id" : "grp4.list1.child2", + "title" : "Child2", + "type" : "link", + "value" : "app.cfg" + } + ] + }, + { + "id" : "grp4.list2", + "title" : "Apps Info", + "type" : "link", + "value" : "app.cfg" + } + ] + }, + { + "id" : "grp4", + "title" : "Downloaded Apps", + "type" : "group" + }, + { + "id" : "grp5", + "title" : "System2", + "type" : "group" + } +] \ No newline at end of file diff --git a/src/plugin-resource/plugin-cfg/app4.cfg b/src/plugin-resource/plugin-cfg/app4.cfg new file mode 100755 index 0000000..2634647 --- /dev/null +++ b/src/plugin-resource/plugin-cfg/app4.cfg @@ -0,0 +1,92 @@ +[ + { + "id" : "page1", + "title" : "app4", + "type" : "navigationbar", + "elements" : + [ + { + "id" : "nav_ok_btn", + "title" : "OK", + "type" : "button" + }, + { + "id" : "nav_cancel_btn", + "title" : "IDS_COM_BODY_BACK", + "type" : "button" + } + ] + }, + { + "id" : "con1", + "title" : "Connectivity", + "type" : "group", + "elements" : + [ + { + "id" : "checkbox1", + "title" : "Checkbox test", + "type" : "checkbox", + "state" : 1 + }, + { + "id" : "editbox1", + "title" : "Editbox test", + "type" : "editbox", + "string" : "This is changed String 6" + } + ] + }, + { + "id" : "grp2", + "title" : "Group name2", + "type" : "group", + "elements" : + [ + { + "id" : "checkbox2", + "title" : "Checkbox test2", + "type" : "checkbox", + "state" : 0 + }, + { + "id" : "slider2", + "type" : "slider", + "min" : 0, + "max" : 10, + "value" : 7 + }, + { + "id" : "link2", + "type" : "link", + "value" : "app.cfg" + } + ] + }, + { + "id" : "grp3", + "title" : "Group name3", + "type" : "group", + "elements" : + [ + { + "id" : "checkbox3", + "title" : "Checkbox test3", + "type" : "checkbox", + "state" : 0 + }, + { + "id" : "slider3", + "type" : "slider", + "min" : 0, + "max" : 10, + "value" : 7 + }, + { + "id" : "link3", + "type" : "link", + "value" : "app.cfg" + } + ] + } +] diff --git a/src/plugin-resource/plugin-xml/app.xml b/src/plugin-resource/plugin-xml/app.xml new file mode 100644 index 0000000..e6f65bb --- /dev/null +++ b/src/plugin-resource/plugin-xml/app.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + +]> + + + + + +