Tizen 2.1 base
authorJinkun Jang <jinkun.jang@samsung.com>
Tue, 12 Mar 2013 16:38:14 +0000 (01:38 +0900)
committerJinkun Jang <jinkun.jang@samsung.com>
Tue, 12 Mar 2013 16:38:14 +0000 (01:38 +0900)
100 files changed:
CMakeLists.txt [new file with mode: 0755]
LICENSE [new file with mode: 0644]
data/Inc.sat-ui.normal.edc [new file with mode: 0644]
data/Inc.sat-ui.text.edc [new file with mode: 0644]
data/image/67_SAT_button_icon_question.png [new file with mode: 0755]
data/image/org.tizen.sat-ui.png [new file with mode: 0755]
data/org.tizen.sat-ui.service [new file with mode: 0755]
data/sat-ui.edc [new file with mode: 0644]
data/sat-ui.ini [new file with mode: 0755]
data/sound/stk_tone_beep.wav [new file with mode: 0755]
data/sound/stk_tone_call_busy.wav [new file with mode: 0755]
data/sound/stk_tone_call_dropped.wav [new file with mode: 0755]
data/sound/stk_tone_call_waiting.wav [new file with mode: 0755]
data/sound/stk_tone_congestion.wav [new file with mode: 0755]
data/sound/stk_tone_dial.wav [new file with mode: 0755]
data/sound/stk_tone_error.wav [new file with mode: 0755]
data/sound/stk_tone_negative_ack.wav [new file with mode: 0755]
data/sound/stk_tone_positve_ack.wav [new file with mode: 0755]
data/sound/stk_tone_radio_ack.wav [new file with mode: 0755]
data/sound/stk_tone_ringing.wav [new file with mode: 0755]
include/common_string.h [new file with mode: 0644]
include/display-text-view.h [new file with mode: 0644]
include/get-inkey-view.h [new file with mode: 0644]
include/get-input-view.h [new file with mode: 0644]
include/sat-ui-debug.h [new file with mode: 0644]
include/sat-ui-icon.h [new file with mode: 0644]
include/sat-ui.h [new file with mode: 0755]
include/select-item-view.h [new file with mode: 0644]
include/setup-menu-view.h [new file with mode: 0644]
include/tel-request.h [new file with mode: 0644]
include/winset.h [new file with mode: 0644]
org.tizen.sat-ui.manifest [new file with mode: 0644]
packaging/org.tizen.sat-ui.spec [new file with mode: 0644]
po/CMakeLists.txt [new file with mode: 0755]
po/ar.po [new file with mode: 0755]
po/az.po [new file with mode: 0755]
po/bg.po [new file with mode: 0755]
po/ca.po [new file with mode: 0755]
po/cs.po [new file with mode: 0755]
po/da.po [new file with mode: 0755]
po/de_DE.po [new file with mode: 0644]
po/el_GR.po [new file with mode: 0644]
po/en.po [new file with mode: 0644]
po/en_PH.po [new file with mode: 0755]
po/en_US.po [new file with mode: 0755]
po/es_ES.po [new file with mode: 0644]
po/es_MX.po [new file with mode: 0755]
po/et.po [new file with mode: 0755]
po/eu.po [new file with mode: 0755]
po/fi.po [new file with mode: 0755]
po/fr_CA.po [new file with mode: 0755]
po/fr_FR.po [new file with mode: 0755]
po/ga.po [new file with mode: 0755]
po/gl.po [new file with mode: 0755]
po/hi.po [new file with mode: 0755]
po/hr.po [new file with mode: 0755]
po/hu.po [new file with mode: 0755]
po/hy.po [new file with mode: 0755]
po/is.po [new file with mode: 0755]
po/it_IT.po [new file with mode: 0755]
po/ja_JP.po [new file with mode: 0755]
po/ka.po [new file with mode: 0755]
po/kk.po [new file with mode: 0755]
po/ko_KR.po [new file with mode: 0755]
po/lt.po [new file with mode: 0755]
po/lv.po [new file with mode: 0755]
po/mk.po [new file with mode: 0755]
po/nb.po [new file with mode: 0755]
po/nl_NL.po [new file with mode: 0644]
po/pl.po [new file with mode: 0755]
po/pt_BR.po [new file with mode: 0755]
po/pt_PT.po [new file with mode: 0755]
po/ro.po [new file with mode: 0755]
po/ru_RU.po [new file with mode: 0755]
po/sk.po [new file with mode: 0755]
po/sl.po [new file with mode: 0755]
po/sr.po [new file with mode: 0755]
po/sv.po [new file with mode: 0755]
po/tr_TR.po [new file with mode: 0755]
po/uk.po [new file with mode: 0755]
po/uz.po [new file with mode: 0755]
po/zh_CN.po [new file with mode: 0755]
po/zh_HK.po [new file with mode: 0755]
po/zh_SG.po [new file with mode: 0755]
po/zh_TW.po [new file with mode: 0755]
sat-event-downloader/CMakeLists.txt [new file with mode: 0755]
sat-event-downloader/event-list.c [new file with mode: 0755]
sat-event-downloader/event-list.h [new file with mode: 0644]
sat-event-downloader/main.c [new file with mode: 0755]
sat-event-downloader/org.tizen.sat-event-downloader.service [new file with mode: 0755]
sat-event-downloader/utils.h [new file with mode: 0755]
src/display-text-view.c [new file with mode: 0755]
src/get-inkey-view.c [new file with mode: 0755]
src/get-input-view.c [new file with mode: 0755]
src/sat-ui-icon.c [new file with mode: 0755]
src/sat-ui.c [new file with mode: 0755]
src/select-item-view.c [new file with mode: 0755]
src/setup-menu-view.c [new file with mode: 0755]
src/tel-request.c [new file with mode: 0755]
src/winset.c [new file with mode: 0755]

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..8655120
--- /dev/null
@@ -0,0 +1,120 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(sat-ui C)
+
+SET(SRCS
+       src/sat-ui.c
+       src/sat-ui-icon.c
+       src/setup-menu-view.c
+       src/select-item-view.c
+       src/display-text-view.c
+       src/get-input-view.c
+       src/get-inkey-view.c
+       src/tel-request.c
+       src/winset.c
+)
+
+IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+       SET(CMAKE_BUILD_TYPE "Release")
+ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
+
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
+
+SET(PKG_NAME org.tizen.sat-ui)
+
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(BINDIR "${PREFIX}/bin")
+SET(RESDIR "${PREFIX}/res")
+SET(DATADIR "${PREFIX}/data")
+SET(LOCALEDIR "${RESDIR}/locale")
+SET(ICONDIR "${RESDIR}/icons/default/small")
+SET(EDJDIR "${RESDIR}/edje")
+SET(IMGDIR "${RESDIR}/images")
+SET(MEDIADIR "${RESDIR}/media")
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED 
+                               appcore-efl
+                               tapi
+                               elementary
+                               mm-sound
+                               aul
+                               vconf
+                               glib-2.0
+                               gio-2.0
+                               gobject-2.0
+                               libprivilege-control
+                               ecore-imf
+                               ecore-x
+                               evas
+                               ecore
+                               edje
+                               ecore-input
+                               eina
+                               sysman
+                               notification
+                               rua
+)
+
+FOREACH(flag ${pkgs_CFLAGS})
+       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+#SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -finstrument-functions")
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+SET(CMAKE_C_FLAGS_DEBUG "")
+SET(CMAKE_C_FLAGS_RELEASE "")
+
+FIND_PROGRAM(UNAME NAMES uname)
+EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
+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("-DLARGE_ICON")
+#ADD_DEFINITIONS("-DSLP_SYSLOG_OUT")
+
+#SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
+
+ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
+
+ADD_CUSTOM_TARGET(sat-ui.edj
+               COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/data/image
+               ${CMAKE_SOURCE_DIR}/data/sat-ui.edc ${CMAKE_BINARY_DIR}/sat-ui.edj
+               DEPENDS ${CMAKE_SOURCE_DIR}/data/sat-ui.edc
+)
+ADD_DEPENDENCIES(${PROJECT_NAME} sat-ui.edj)
+
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/sat-ui.edj DESTINATION ${PREFIX}/res/edje)
+
+# install desktop file & icon
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+#CONFIGURE_FILE(${PROJECT_NAME}.desktop.in ${PROJECT_NAME}.desktop)
+#INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.desktop DESTINATION share/install-info/application/)
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/data/sound/ DESTINATION ${MEDIADIR} FILES_MATCHING PATTERN "*.wav")
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/data/image/ DESTINATION ${IMGDIR} FILES_MATCHING PATTERN "*.png")
+#INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/data/theme/ DESTINATION ${IMGDIR} FILES_MATCHING PATTERN "*.png")
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/image/${PKG_NAME}.png DESTINATION /usr/share/icons/default/small)
+# In security reason, supress the dbus auto activation
+INSTALL(FILES ${CMAKE_BINARY_DIR}/data/${PKG_NAME}.service DESTINATION /usr/share/dbus-1/services)
+
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME ${PKG_NAME})
+
+# install application HOME directory
+INSTALL(DIRECTORY DESTINATION ${DATADIR})
+
+# install ini file
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/${PROJECT_NAME}.ini DESTINATION /usr/share/process-info)
+
+# i18n
+ADD_SUBDIRECTORY(po)
+
+ #Idle_screen
+ ADD_SUBDIRECTORY(sat-event-downloader)
+
+
diff --git a/LICENSE b/LICENSE
new file mode 100644 (file)
index 0000000..cc8727b
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,75 @@
+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/data/Inc.sat-ui.normal.edc b/data/Inc.sat-ui.normal.edc
new file mode 100644 (file)
index 0000000..29a3c52
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2012-2013 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.
+ */
+
+group {
+       name: "normal_layout";
+
+       parts {
+               part {
+                       name: "body";
+                       type: SWALLOW;
+                       description {
+                               rel1 { relative: 0.0 0.0; }
+                               rel2 { relative: 1.0 1.0; }
+                       }
+               }
+       }
+}
+
diff --git a/data/Inc.sat-ui.text.edc b/data/Inc.sat-ui.text.edc
new file mode 100644 (file)
index 0000000..9315946
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2012-2013 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.
+ */
+
+group {
+       name: "group.text";
+
+       parts {
+               part {
+                       name: "bg";
+                       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: "text";
+                       type: TEXT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: 0.0 0.0; }
+                               rel2 { relative: 1.0 1.0; }
+                               fixed: 1 1;
+                               align: 0.5 0.5;
+                               min: 300 30;
+                               text {
+                                       font: "SLP:style=Roman";
+                                       align: 0.5 0.5;
+                                       min: 0 0;
+                                       size : 32;
+                               }
+                       }
+               }
+       }
+}
+
diff --git a/data/image/67_SAT_button_icon_question.png b/data/image/67_SAT_button_icon_question.png
new file mode 100755 (executable)
index 0000000..783b1e3
Binary files /dev/null and b/data/image/67_SAT_button_icon_question.png differ
diff --git a/data/image/org.tizen.sat-ui.png b/data/image/org.tizen.sat-ui.png
new file mode 100755 (executable)
index 0000000..40a9623
Binary files /dev/null and b/data/image/org.tizen.sat-ui.png differ
diff --git a/data/org.tizen.sat-ui.service b/data/org.tizen.sat-ui.service
new file mode 100755 (executable)
index 0000000..1abab44
--- /dev/null
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.tizen.sat-ui
+Exec=/usr/apps/org.tizen.sat-ui/bin/sat-ui KEY_EXEC_TYPE 1
diff --git a/data/sat-ui.edc b/data/sat-ui.edc
new file mode 100644 (file)
index 0000000..f544816
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2012-2013 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.
+ */
+
+#define MAIN_W 480
+#define MAIN_H 800
+
+#define SOFTKEY_H 78
+#define INDICATOR_H 48
+#define TITLEBAR_H 100
+#define INPUT_BG_H  102
+#define SUBTITLE_H 140
+#define ICON_W 30
+#define ICON_H 30
+#define TITLE_H        48
+
+collections {
+
+#include "Inc.sat-ui.normal.edc"
+#include "Inc.sat-ui.text.edc"
+
+}
diff --git a/data/sat-ui.ini b/data/sat-ui.ini
new file mode 100755 (executable)
index 0000000..db31f99
--- /dev/null
@@ -0,0 +1,2 @@
+[ProcessSetting]
+BG_SCHEDULE=false
diff --git a/data/sound/stk_tone_beep.wav b/data/sound/stk_tone_beep.wav
new file mode 100755 (executable)
index 0000000..ec0c508
Binary files /dev/null and b/data/sound/stk_tone_beep.wav differ
diff --git a/data/sound/stk_tone_call_busy.wav b/data/sound/stk_tone_call_busy.wav
new file mode 100755 (executable)
index 0000000..fa72d26
Binary files /dev/null and b/data/sound/stk_tone_call_busy.wav differ
diff --git a/data/sound/stk_tone_call_dropped.wav b/data/sound/stk_tone_call_dropped.wav
new file mode 100755 (executable)
index 0000000..f16aa41
Binary files /dev/null and b/data/sound/stk_tone_call_dropped.wav differ
diff --git a/data/sound/stk_tone_call_waiting.wav b/data/sound/stk_tone_call_waiting.wav
new file mode 100755 (executable)
index 0000000..f6b7669
Binary files /dev/null and b/data/sound/stk_tone_call_waiting.wav differ
diff --git a/data/sound/stk_tone_congestion.wav b/data/sound/stk_tone_congestion.wav
new file mode 100755 (executable)
index 0000000..f47b50c
Binary files /dev/null and b/data/sound/stk_tone_congestion.wav differ
diff --git a/data/sound/stk_tone_dial.wav b/data/sound/stk_tone_dial.wav
new file mode 100755 (executable)
index 0000000..49ecab0
Binary files /dev/null and b/data/sound/stk_tone_dial.wav differ
diff --git a/data/sound/stk_tone_error.wav b/data/sound/stk_tone_error.wav
new file mode 100755 (executable)
index 0000000..ac48a3e
Binary files /dev/null and b/data/sound/stk_tone_error.wav differ
diff --git a/data/sound/stk_tone_negative_ack.wav b/data/sound/stk_tone_negative_ack.wav
new file mode 100755 (executable)
index 0000000..b349898
Binary files /dev/null and b/data/sound/stk_tone_negative_ack.wav differ
diff --git a/data/sound/stk_tone_positve_ack.wav b/data/sound/stk_tone_positve_ack.wav
new file mode 100755 (executable)
index 0000000..ec0c508
Binary files /dev/null and b/data/sound/stk_tone_positve_ack.wav differ
diff --git a/data/sound/stk_tone_radio_ack.wav b/data/sound/stk_tone_radio_ack.wav
new file mode 100755 (executable)
index 0000000..384e7b6
Binary files /dev/null and b/data/sound/stk_tone_radio_ack.wav differ
diff --git a/data/sound/stk_tone_ringing.wav b/data/sound/stk_tone_ringing.wav
new file mode 100755 (executable)
index 0000000..a8dc72b
Binary files /dev/null and b/data/sound/stk_tone_ringing.wav differ
diff --git a/include/common_string.h b/include/common_string.h
new file mode 100644 (file)
index 0000000..0d6a030
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2012-2013 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.
+ */
+
+#define SAT_STR_CALL_UNAVAILABLE                               _("IDS_SIM_POP_CALL_UNAVAILABLE")
+#define SAT_STR_CONFIRM_CALL                                   _("IDS_SIM_POP_CONFIRM_CALL")
+#define SAT_STR_LAUNCH_BROWSER_Q                               _("IDS_SIM_POP_LAUNCH_BROWSERQ")
+#define SAT_STR_PLAYING_TONE                                   _("IDS_SIM_POP_PLAYTONE")
+#define SAT_STR_SIM_REFRESHING                         _("IDS_SIM_POP_REFRESHING")
+#define SAT_STR_PLEASE_WAIT                                    _("IDS_SIM_POP_INTERMEDIATE")
+#define SAT_STR_TAP_TO_ENTER                                   _("IDS_SIM_BODY_TAP_TO_ENTER_ABB")
+
+#define SAT_STR_OK                                                     dgettext("sys_string", "IDS_COM_SK_OK")
+#define SAT_STR_CANCEL                         dgettext("sys_string", "IDS_IDLE_BUTTON_CANCEL")
+#define SAT_STR_YES                                                    dgettext("sys_string", "IDS_COM_SK_YES")
+#define SAT_STR_NO                                                     dgettext("sys_string", "IDS_COM_SK_NO")
+#define SAT_STR_NEW                                            dgettext("sys_string", "IDS_COM_SK_NEW")
+#define SAT_STR_SENDING                                                dgettext("sys_string", "IDS_COM_POP_SENDING")
+
+
diff --git a/include/display-text-view.h b/include/display-text-view.h
new file mode 100644 (file)
index 0000000..0cfb298
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2012-2013 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 __DISPLAY_TEXT_VIEW_H_
+#define __DISPLAY_TEXT_VIEW_H_
+
+#include <Elementary.h>
+
+enum {
+   RESP_OK_CANCEL = 0,
+   RESP_CANCEL = 1,
+   RESP_IMMEDIATELY = 2,
+   RESP_NONE = 3,
+};
+
+int draw_popup_text(Evas_Object* win, char *text, int user_resp_required, int duration, Evas_Smart_Cb ok_cb, Evas_Smart_Cb cancel_cb, Evas_Smart_Cb timeout_cb,void *data);
+int draw_popup_text_with_icon(Evas_Object* win, char *text,Evas_Object *icon,  int user_resp_required, int duration, Evas_Smart_Cb ok_cb, Evas_Smart_Cb cancel_cb, Evas_Smart_Cb timeout_cb, void *data);
+
+#endif
+
diff --git a/include/get-inkey-view.h b/include/get-inkey-view.h
new file mode 100644 (file)
index 0000000..f8aa3cf
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2012-2013 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 __GET_INKEY_VIEW_H_
+#define __GET_INKEY_VIEW_H_
+
+int draw_content_get_inkey(Evas_Object* content, void *tapi_data, void *data);
+
+#endif
+
diff --git a/include/get-input-view.h b/include/get-input-view.h
new file mode 100644 (file)
index 0000000..cb9e444
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2012-2013 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 __GET_INPUT_VIEW_H_
+#define __GET_INPUT_VIEW_H_
+#include <Elementary.h>
+
+int draw_content_get_input(Evas_Object* content, void *tapi_data, void *data);
+
+#endif
+
diff --git a/include/sat-ui-debug.h b/include/sat-ui-debug.h
new file mode 100644 (file)
index 0000000..db90c65
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2012-2013 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 __SATUI_DEBUG_H__
+#define __SATUI_DEBUG_H__
+
+/*
+ * SYSLOG_INFO(), SYSLOG_ERR(), SYSLOG_DBG() are syslog() wrappers.
+ * PRT_INFO(), PRT_ERR(), PRT_DBG() are fprintf() wrappers.
+ *
+ * If SLP_DEBUG is not defined, SYSLOG_DBG() and PRT_DBG() is ignored.
+ *
+ * IF SLP_SYSLOG_OUT or SLP_DAEMON is defined,
+ *   INFO(), ERR(), DBG() are SYSLOG_XXX()
+ * Otherwise,
+ *   They are PRT_XXX()
+ *
+ *
+ * warn_if(exrp, fmt, ...)
+ *   If expr is true, The fmt string is printed using ERR().
+ *
+ * ret_if(), retv_if(), retm_if(), retvm_if()
+ *   If expr is true, current function return.
+ *   Postfix 'v' means that it has a return value and 'm' means that it has output message.
+ *
+ */
+
+#define SAT_UI_LOG_TAG "SAT_UI"
+#include <dlog.h>
+#include <stdio.h>
+
+#if 0
+#define DBG(fmt, arg...) \
+       do { \
+               LOGD(""fmt"\n", ##arg); \
+       } while(0)
+#endif
+
+
+#define DBG(fmt, arg...) \
+       do { \
+               LOG(LOG_INFO, SAT_UI_LOG_TAG, "[SAT_UI][%s:%d] "fmt"\n",  __func__, __LINE__, ##arg); \
+       } while(0)
+/*
+#define DBG(fmt, arg...) \
+       do { \
+               FILE *fp; \
+               fp = fopen("/opt/media/sat_log.txt","a"); \
+               fprintf(fp,"[SAT-UI][%s:%d]"fmt"\n",__func__,__LINE__, ##arg); \
+               fclose(fp); \
+       } while(0)
+*/
+
+#define ERR(fmt, arg...) \
+       do { \
+               LOGE(""fmt"\n", ##arg); \
+       } while(0)
+
+#  define warn_if(expr, fmt, arg...) do { \
+               if(expr) { \
+                       DBG("(%s) -> "fmt, #expr, ##arg); \
+               } \
+       } while (0)
+#  define ret_if(expr) do { \
+               if(expr) { \
+                       DBG("(%s) -> %s() return", #expr, __FUNCTION__); \
+                       return; \
+               } \
+       } while (0)
+#  define retv_if(expr, val) do { \
+               if(expr) { \
+                       DBG("(%s) -> %s() return", #expr, __FUNCTION__); \
+                       return (val); \
+               } \
+       } while (0)
+#  define retm_if(expr, fmt, arg...) do { \
+               if(expr) { \
+                       ERR(fmt, ##arg); \
+                       DBG("(%s) -> %s() return", #expr, __FUNCTION__); \
+                       return; \
+               } \
+       } while (0)
+#  define retvm_if(expr, val, fmt, arg...) do { \
+               if(expr) { \
+                       ERR(fmt, ##arg); \
+                       DBG("(%s) -> %s() return", #expr, __FUNCTION__); \
+                       return (val); \
+               } \
+       } while (0)
+
+#endif /* __SATUI_DEBUG_H__ */
diff --git a/include/sat-ui-icon.h b/include/sat-ui-icon.h
new file mode 100644 (file)
index 0000000..dfb90fd
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2012-2013 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 __SAT_UI_ICON_H__
+#define __SAT_UI_ICON_H__
+
+#include <TelSat.h>
+#include <Evas.h>
+
+#define EIGTH_BIT 0x80
+#define SEVENTH_BIT 0x40
+#define SIXTH_BIT 0x20
+#define FIFTH_BIT 0x10
+#define FOURTH_BIT 0x08
+#define THIRD_BIT 0x04
+#define SECOND_BIT 0x02
+#define FIRST_BIT 0x01
+#define MAX_STRING_SIZE 256
+
+Evas_Object *convert_iconinfo_to_evas_object(void *data,TelSatIconInfo_t* icon_id);
+
+#endif
+
diff --git a/include/sat-ui.h b/include/sat-ui.h
new file mode 100755 (executable)
index 0000000..9233829
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+ * Copyright (c) 2012-2013 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 __SAT_UI_H_
+#define __SAT_UI_H_
+#include <stdbool.h>
+#include <Elementary.h>
+#include <Ecore_IMF.h>
+#include <glib.h>
+#include <tapi_common.h>
+#include <ITapiSat.h>
+#include <TapiUtility.h>
+
+#ifndef PREFIX
+#define PREFIX "/usr/apps/org.tizen.sat-ui"
+#endif
+
+
+#ifdef _
+#undef _
+#endif
+
+#ifdef N_
+#undef N_
+#endif
+
+#define PKGNAME                                "sat-ui"
+#define SAT_UI_PKG     "org.tizen.sat-ui"
+
+#define _(string)            gettext(string)
+#define dgettext_noop(s)      (s)
+#define N_(s)                 dgettext_noop(s)
+#define _EDJ(o)                                elm_layout_edje_get(o)
+#define PACKAGE PKGNAME
+#define LOCALEDIR PREFIX"/res/locale"
+
+#define ICON_PATH PREFIX"/res/images"
+#define EDJ_PATH PREFIX"/res/edje"
+#define EDJ_NAME EDJ_PATH"/sat-ui.edj"
+
+#define NORMAL_LAYOUT  "normal_layout"
+
+#define TONE_FILE_PATH PREFIX"/res/media"
+#define STK_BEEP_TONE   TONE_FILE_PATH"/stk_tone_beep.wav"
+#define STK_BUSY_TONE   TONE_FILE_PATH"/stk_tone_call_busy.wav"
+#define STK_DROPPED_TONE        TONE_FILE_PATH"/stk_tone_call_dropped.wav"
+#define STK_WAITING_TONE        TONE_FILE_PATH"/stk_tone_call_waiting.wav"
+#define STK_CONGESTION_TONE     TONE_FILE_PATH"/stk_tone_congestion.wav"
+#define STK_DIAL_TONE   TONE_FILE_PATH"/stk_tone_dial.wav"
+#define STK_ERROR_TONE  TONE_FILE_PATH"/stk_tone_error.wav"
+#define STK_NEG_ACK_TONE        TONE_FILE_PATH"/stk_tone_negative_ack.wav"
+#define STK_POS_ACK_TONE        TONE_FILE_PATH"/stk_tone_positve_ack.wav"
+#define STK_RADIO_ACK_TONE      TONE_FILE_PATH"/stk_tone_radio_ack.wav"
+#define STK_RINGING_TONE        TONE_FILE_PATH"/stk_tone_ringing.wav"
+
+#define HELP_ICON_FILE ICON_PATH"/67_SAT_button_icon_question.png"
+
+#define SAT_UI_MAIN_W  720
+#define SAT_UI_MAIN_H  1280
+
+#define GET_INPUT_DURATION 30.0
+#define GET_INKEY_DURATION 30.0
+#define SELECT_MENU_DURATION 30.0
+
+#define LAUNCHED_BY_MENU                       0
+#define LAUNCHED_BY_TELEPHONY  1
+
+#define MAX_TEXT_LENGTH 255
+#define MAX_LOCAL_BUF_SIZE 10
+
+typedef struct {
+       Evas *evas;
+
+       Evas_Object *win_main;
+       Elm_Object_Item *navi_it;
+       Evas_Object *nf;
+       Evas_Object *layout_main;
+       Evas_Object *content;
+       Evas_Object *r_button;
+       Evas_Object *back_btn;
+       Evas_Object *help_btn;
+       Evas_Object *waiting_bar;
+       Evas_Object *popup;
+       Evas_Object *entry;
+       Eina_Bool repeat_sound;
+       char tone_file[100];
+       Ecore_Timer *timer;
+       Ecore_IMF_Context *imf_context;
+       int exec_type;
+
+       /*Handle*/
+       int sound_handle;
+       TapiHandle *tapi_handle;
+
+       /* Event Data */
+       void *tapi_data;
+       int cmd_type;
+       int cmd_id;
+       int is_immediately_resp;
+
+       /* GET INPUT */
+       unsigned int min;
+
+       /* Genlist item class*/
+       Elm_Genlist_Item_Class *itc_text_icon;
+       Elm_Genlist_Item_Class *itc_no_edit_text;
+       Elm_Genlist_Item_Class *itc_editfield_icon;
+       Elm_Genlist_Item_Class *itc_ok_icon;
+       Elm_Genlist_Item_Class *itc_help_icon;
+       Elm_Genlist_Item_Class *itc_2icon;
+} SatUiAppData_t;
+
+typedef struct _menu_item
+{
+       int index;
+       char *text;
+       Evas_Object *icon;
+       Eina_Bool icon_is_present;
+       Eina_Bool help_is_present;
+       SatUiAppData_t *ad;
+       struct _menu_item *next;
+} menu_item;
+
+Evas_Object* load_edj(Evas_Object *parent, const char *file,   const char *group);
+char *strip_control_char(const char *src_str);
+void create_popup_progressbar(SatUiAppData_t *ad);
+
+#endif /* __SAT_UI_H_ */
diff --git a/include/select-item-view.h b/include/select-item-view.h
new file mode 100644 (file)
index 0000000..0799b17
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2012-2013 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 __SELECT_ITEM_VIEW_H_
+#define __SELECT_ITEM_VIEW_H_
+
+#include <Elementary.h>
+int draw_content_select_item(Evas_Object *content, void *tapi_data, void *data);
+
+
+#endif
+
diff --git a/include/setup-menu-view.h b/include/setup-menu-view.h
new file mode 100644 (file)
index 0000000..a7b2c22
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2012-2013 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 __SETUP_MENU_VIEW_H_
+#define __SETUP_MENU_VIEW_H_
+
+#include <Elementary.h>
+
+int draw_content_setup_menu(Evas_Object* content, void *tapi_data, void *data);
+
+
+#endif
+
diff --git a/include/tel-request.h b/include/tel-request.h
new file mode 100644 (file)
index 0000000..d34e046
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2012-2013 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 _SAT_UI_TEL_REQUEST_H_
+#define _SAT_UI_TEL_REQUEST_H_
+#include "sat-ui.h"
+
+int setup_tapi_init(void *data);
+int send_ui_user_confirm(int cmd_id, int cmd_type, int key_type, int data_len, void *data, void *app_data);
+int send_app_execution_result(TelSatAppsRetInfo_t *app_ret_info, void *data);
+int send_ui_display_status(int cmd_id, TelSatUiDisplayStatusType_t ui_display_status_info, void *data);
+int satui_send_menu_selection_env(TapiHandle *handle, TelSatMenuSelectionReqInfo_t *menu_selection_req_info);
+int send_menu_selection_info(TapiHandle *handle, char item_id, int bIsRequestingHelpText);
+
+#endif
+
diff --git a/include/winset.h b/include/winset.h
new file mode 100644 (file)
index 0000000..0bb26ab
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2012-2013 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 _SAT_UI_WINSET_H_
+#define _SAT_UI_WINSET_H_
+#include <Elementary.h>
+
+Evas_Object *create_waiting_notify(Evas_Object *parent);
+void _satui_geinlist_item_class_new(void *data);
+void _satui_geinlist_item_class_free(void *data);
+int _satui_create_notification(const char *string);
+int _satui_delete_notification(void);
+
+#endif
+
diff --git a/org.tizen.sat-ui.manifest b/org.tizen.sat-ui.manifest
new file mode 100644 (file)
index 0000000..0e88822
--- /dev/null
@@ -0,0 +1,12 @@
+<manifest>
+        <define>
+                <domain name="org.tizen.sat-ui"/>
+        </define>
+        <assign>
+                <filesystem path="/opt/share/applications/org.tizen.sat-ui.desktop" label="_"/>
+                <filesystem path="/opt/share/icons/default/small/org.tizen.sat-ui.png" label="_"/>
+        </assign>
+        <request>
+                <domain name="org.tizen.sat-ui"/>
+        </request>
+</manifest>
diff --git a/packaging/org.tizen.sat-ui.spec b/packaging/org.tizen.sat-ui.spec
new file mode 100644 (file)
index 0000000..5030463
--- /dev/null
@@ -0,0 +1,64 @@
+Name:       org.tizen.sat-ui
+Summary:    SAT-UI (Sim Application Tookit UI)
+Version:    0.5.85
+Release:    1
+Group:      application
+License:    Flora license
+Source0:    %{name}-%{version}.tar.gz
+Requires(post): /usr/bin/vconftool
+BuildRequires:  pkgconfig(appcore-efl)
+BuildRequires:  pkgconfig(x11)
+BuildRequires:  pkgconfig(tapi)
+BuildRequires:  pkgconfig(elementary)
+BuildRequires:  pkgconfig(utilX)
+BuildRequires:  pkgconfig(aul)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(libprivilege-control)
+BuildRequires:  pkgconfig(vconf)
+BuildRequires:  pkgconfig(mm-keysound)
+BuildRequires:  pkgconfig(ecore-input)
+BuildRequires:  pkgconfig(evas)
+BuildRequires:  pkgconfig(edje)
+BuildRequires:  pkgconfig(sysman)
+BuildRequires:  pkgconfig(notification)
+BuildRequires:  pkgconfig(rua)
+BuildRequires:  cmake
+BuildRequires:  edje-tools
+BuildRequires:  gettext-devel
+
+%description
+SAT-UI (Sim Application Tookit UI).
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX    "/usr/apps/%{name}"
+cmake . -DCMAKE_INSTALL_PREFIX=%{PREFIX}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/usr/share/license
+
+%post
+vconftool set -t string memory/sat/idle_text "" -i -f -g 6514
+
+%files
+%manifest %{name}.manifest
+%defattr(-,root,root,-)
+/usr/apps/%{name}/bin/sat-event-downloader
+/usr/apps/%{name}/bin/sat-ui
+/usr/apps/%{name}/res/edje/*.edj
+/usr/apps/%{name}/res/images/67_SAT_button_icon_question.png
+/usr/apps/%{name}/res/images/org.tizen.sat-ui.png
+/usr/apps/%{name}/res/locale/*/LC_MESSAGES/sat-ui.mo
+/usr/apps/%{name}/res/media/*.wav
+/usr/share/dbus-1/services/org.tizen.sat-event-downloader.service
+/usr/share/dbus-1/services/%{name}.service
+/usr/share/process-info/sat-ui.ini
+/usr/share/icons/default/small/%{name}.png
+/usr/share/license/%{name}
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..b2f2de8
--- /dev/null
@@ -0,0 +1,28 @@
+# for i18n
+
+SET(POFILES ar.po az.po bg.po ca.po cs.po da.po de_DE.po el_GR.po en.po en_PH.po
+en_US.po es_ES.po es_MX.po et.po eu.po fi.po fr_CA.po fr_FR.po ga.po gl.po
+hi.po hr.po hu.po hy.po is.po it_IT.po ja_JP.po ka.po kk.po ko_KR.po
+lt.po lv.po mk.po nb.po nl_NL.po pl.po pt_BR.po pt_PT.po ro.po ru_RU.po sk.po
+sl.po sr.po sv.po tr_TR.po uk.po uz.po zh_CN.po zh_HK.po zh_SG.po zh_TW.po )
+
+SET(MSGFMT "/usr/bin/msgfmt")
+
+FOREACH(pofile ${POFILES})
+       SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile})
+       MESSAGE("PO: ${pofile}")
+       GET_FILENAME_COMPONENT(absPofile ${pofile} ABSOLUTE)
+       GET_FILENAME_COMPONENT(lang ${absPofile} NAME_WE)
+       SET(moFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo)
+       ADD_CUSTOM_COMMAND(
+                       OUTPUT ${moFile}
+                       COMMAND ${MSGFMT} -o ${moFile} ${absPofile}
+                       DEPENDS ${absPofile}
+       )
+       INSTALL(FILES ${moFile}
+                       DESTINATION ${LOCALEDIR}/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
+       SET(moFiles ${moFiles} ${moFile})
+ENDFOREACH(pofile)
+
+MESSAGE(".mo files: ${moFiles}")
+ADD_CUSTOM_TARGET(po ALL DEPENDS ${moFiles})
diff --git a/po/ar.po b/po/ar.po
new file mode 100755 (executable)
index 0000000..2dc2b09
--- /dev/null
+++ b/po/ar.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "انقر للإدخال"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "نغمة العرض"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "مكالمة غير متوفرة"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "تأكيد الاتصال"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "يرجى الانتظار ..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "بدء المتصفح؟"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "إنعاش البطاقة"
+
diff --git a/po/az.po b/po/az.po
new file mode 100755 (executable)
index 0000000..6062949
--- /dev/null
+++ b/po/az.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Daxil etmək üçün vur"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Çalınma tonu"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Zəng mümkün deyil"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Zəngi təsdiq et"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Gözləyin"
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Brauzer işə salınsın?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "SIM təzələnir..."
+
diff --git a/po/bg.po b/po/bg.po
new file mode 100755 (executable)
index 0000000..4991a3a
--- /dev/null
+++ b/po/bg.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Чукнете за въвеждане"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Възпроизвеждане на тон"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Повикване не е достъпно"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Потвърдете повикването"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Изчакайте..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Стартиране на браузъра?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "Опресняване на SIM..."
+
diff --git a/po/ca.po b/po/ca.po
new file mode 100755 (executable)
index 0000000..6d44a83
--- /dev/null
+++ b/po/ca.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Toqui per introduir"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Reproduint to"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Trucada no disponible"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Confirmar trucada"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Esperi..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Iniciar navegador?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "Actualitzant SIM..."
+
diff --git a/po/cs.po b/po/cs.po
new file mode 100755 (executable)
index 0000000..83fc969
--- /dev/null
+++ b/po/cs.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Klepněte a zadejte"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Přehrávání tónu"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Hovor není dostupný"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Potvrdit hovor"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Čekejte prosím..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Spustit prohlížeč?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "Aktualizace karty SIM..."
+
diff --git a/po/da.po b/po/da.po
new file mode 100755 (executable)
index 0000000..1d57c99
--- /dev/null
+++ b/po/da.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Tryk for at indtaste"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Afspiller tone..."
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Opkald er ikke tilgængelig"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Bekræft opkald"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Vent..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Vil du starte browseren?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "Opdaterer SIM-kort"
+
diff --git a/po/de_DE.po b/po/de_DE.po
new file mode 100644 (file)
index 0000000..c4ca1be
--- /dev/null
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Zur Eingabe tippen"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Ton wird abgespielt"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Anruf nicht verfügbar"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Anruf bestätigen"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Bitte warten..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Browser öffnen?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "SIM-Karte wird aktualisiert..."
+
diff --git a/po/el_GR.po b/po/el_GR.po
new file mode 100644 (file)
index 0000000..56058e4
--- /dev/null
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Πατήστε για καταχώρηση"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Αναπαραγωγή ήχου"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Μη διαθέσιμη κλήση"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Επιβεβαίωση κλήσης"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Περιμένετε..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Εκκίνηση προγράμματος περιήγησης;"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "Ανανέωση SIM..."
+
diff --git a/po/en.po b/po/en.po
new file mode 100644 (file)
index 0000000..b265541
--- /dev/null
+++ b/po/en.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Tap to enter"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Playing tone"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Call not available"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Confirm call"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Please wait..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Launch Browser?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "SIM refreshing..."
+
diff --git a/po/en_PH.po b/po/en_PH.po
new file mode 100755 (executable)
index 0000000..167e99c
--- /dev/null
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Tap to enter"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Playing tone"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Call unavailable"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Confirm call"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Please wait..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Launch browser?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "SIM refreshing..."
+
diff --git a/po/en_US.po b/po/en_US.po
new file mode 100755 (executable)
index 0000000..68c9c59
--- /dev/null
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Tap to enter"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Playing tone"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Call unavailable"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Confirm call"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Please wait"
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Launch Browser?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "SIM refreshing..."
+
diff --git a/po/es_ES.po b/po/es_ES.po
new file mode 100644 (file)
index 0000000..58da037
--- /dev/null
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Toque para escribir"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Reproduciendo tono"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Llamada no disponible"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Confirmar llamada"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Por favor, espere..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "¿Iniciar navegador?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "Actualizando SIM..."
+
diff --git a/po/es_MX.po b/po/es_MX.po
new file mode 100755 (executable)
index 0000000..45624a2
--- /dev/null
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Pulse para introducir"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Reproduciendo tono..."
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Llamada no disponible"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Confirmar llamada"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Por favor, espere..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "¿Iniciar navegador?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "Actualizando SIM..."
+
diff --git a/po/et.po b/po/et.po
new file mode 100755 (executable)
index 0000000..7a5a1c6
--- /dev/null
+++ b/po/et.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Toksake sisestamiseks"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Helina esitamine"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Kõne pole saadaval"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Kinnita kõne"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Palun oodake..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Käivitada brauser?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "SIM-kaardi värskendamine..."
+
diff --git a/po/eu.po b/po/eu.po
new file mode 100755 (executable)
index 0000000..09025db
--- /dev/null
+++ b/po/eu.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Ukitu sartzeko"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Doinua erreproduzitzen..."
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Deia ez dago eskuragarri"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Baieztatu deia"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Zain..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Nabigatzailea abiarazi?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "SIM eguneratzen..."
+
diff --git a/po/fi.po b/po/fi.po
new file mode 100755 (executable)
index 0000000..613efdc
--- /dev/null
+++ b/po/fi.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Anna napauttamalla"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Toistetaan ääntä..."
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Puhelu ei saatavilla"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Vahvista puhelu"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Ole hyvä ja odota..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Käynnistetäänkö selain?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "SIM-korttia päivitetään..."
+
diff --git a/po/fr_CA.po b/po/fr_CA.po
new file mode 100755 (executable)
index 0000000..9e6a0e2
--- /dev/null
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Touchez pour saisir"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Tonalité de lecture"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Appel non disponible"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Confirmer l'appel"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Veuillez patienter..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Lancer le navigateur ?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "Actualisation carte SIM..."
+
diff --git a/po/fr_FR.po b/po/fr_FR.po
new file mode 100755 (executable)
index 0000000..aecc632
--- /dev/null
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Appuyer pour saisir"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Tonalité de lecture"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Appel impossible"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Confirmer l'appel"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Veuillez patienter..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Lancer le navigateur ?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "Actualisation carte SIM..."
+
diff --git a/po/ga.po b/po/ga.po
new file mode 100755 (executable)
index 0000000..5956429
--- /dev/null
+++ b/po/ga.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Tapáil le hiontráil"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Ton seinnte"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Níl glao ar fáil"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Deimhnigh an glao"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Fan go fóill..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Lainseáil Brabhsálaí?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "SIM á athnuachan..."
+
diff --git a/po/gl.po b/po/gl.po
new file mode 100755 (executable)
index 0000000..69f8967
--- /dev/null
+++ b/po/gl.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Tocar para escribir"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Reproducindo ton"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Chamada non dispoñible"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Confirmar chamada"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Por favor, espere..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Iniciar navegador?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "Actualizando SIM..."
+
diff --git a/po/hi.po b/po/hi.po
new file mode 100755 (executable)
index 0000000..4e7ec40
--- /dev/null
+++ b/po/hi.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "दर्ज करने टैप करें"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "प्लेइंग टोन"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "कॉल अनुपलब्‍ध"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "कॉल की पुष्टि करें"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "कृपया प्रतीक्षा करें"
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "ब्राउजर शुरु करें?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "सिम रिफ्रेश हो रही है…"
+
diff --git a/po/hr.po b/po/hr.po
new file mode 100755 (executable)
index 0000000..d1ef0a3
--- /dev/null
+++ b/po/hr.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Dodirnite za unos"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Ton reprodukcije"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Poziv nedostupan"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Potvrdi poziv"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Pričekajte..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Pokrenuti pretraživač?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "SIM aktualiziranje..."
+
diff --git a/po/hu.po b/po/hu.po
new file mode 100755 (executable)
index 0000000..ad98826
--- /dev/null
+++ b/po/hu.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Érintse meg a bevitelhez"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Hang lejátszása"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "A hívás nem lehetséges"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Hívás megerősítése"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Kérem, várjon..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Elindítja a böngészőt?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "SIM frissítése..."
+
diff --git a/po/hy.po b/po/hy.po
new file mode 100755 (executable)
index 0000000..091b805
--- /dev/null
+++ b/po/hy.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Թակել մուտքագրելու համար"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Վերարտադրման ձայն"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Կանչն անհասանելի է"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Հաստատել կանչը"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Սպասեք..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Գործարկե՞լ Դիտարկիչը:"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "SIM-ի թարմացում..."
+
diff --git a/po/is.po b/po/is.po
new file mode 100755 (executable)
index 0000000..9f1a2f2
--- /dev/null
+++ b/po/is.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Pikkaðu til að færa inn"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Tónn spilaður"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Það er ekki hægt að hringja"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Staðfesta símtal"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Augnablik..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Á að ræsa vafra?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "SIM-kortið uppfærist..."
+
diff --git a/po/it_IT.po b/po/it_IT.po
new file mode 100755 (executable)
index 0000000..3d61b15
--- /dev/null
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Toccare per inserire"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Riproduzione tono"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Chiamata non disponibile"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Conferma chiamata"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Attendere..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Avviare il browser?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "Aggiornamento SIM..."
+
diff --git a/po/ja_JP.po b/po/ja_JP.po
new file mode 100755 (executable)
index 0000000..4100516
--- /dev/null
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "タップして入力してください。"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "再生音"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "通話​使用​不可"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "通話を確定します"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "しばらく​お待ち​ください..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "ブラウザ​を​起動​しますか?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "SIM​を​更新中..."
+
diff --git a/po/ka.po b/po/ka.po
new file mode 100755 (executable)
index 0000000..da27ab1
--- /dev/null
+++ b/po/ka.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "დააკაკუნე და ჩაწერე"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "სიგნალის ხმა"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "ზარი შეუძლებელია"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "ზარის დამოწმება"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "გთხოვთ, დაელოდოთ..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "ჩავრთო ბრაუზერი?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "SIM-ის განახლება"
+
diff --git a/po/kk.po b/po/kk.po
new file mode 100755 (executable)
index 0000000..133a889
--- /dev/null
+++ b/po/kk.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Енгізу үшін түртіңіз"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Әуенді тыңдау"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Шақыруға байланыс жоқ"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Қоңырауды растау"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Күте тұрыңыз..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Шолушыны жібересіз бе?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "SIM-карта жаңартылуда..."
+
diff --git a/po/ko_KR.po b/po/ko_KR.po
new file mode 100755 (executable)
index 0000000..32e4100
--- /dev/null
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "입력하려면 누르세요"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "알림음 재생 중..."
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "통화할 수 없습니다"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "전화 걸기"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "잠시만 기다리세요"
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "인터넷을 실행할까요?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "SIM을 다시 읽는 중..."
+
diff --git a/po/lt.po b/po/lt.po
new file mode 100755 (executable)
index 0000000..793cb03
--- /dev/null
+++ b/po/lt.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Bakstelėkite ir įveskite"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Grojamas tonas"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Skambinti negalima"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Patvirtinti skambutį"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Palaukite..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Paleisti naršyklę?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "SIM atnaujinama"
+
diff --git a/po/lv.po b/po/lv.po
new file mode 100755 (executable)
index 0000000..6c01905
--- /dev/null
+++ b/po/lv.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Pieskar., lai ievadītu"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Atskaņo signālu"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Zvans nav pieejams"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Apstiprināt zvanu"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Lūdzu, uzgaidiet..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Vai startēt pārlūku?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "Atsvaidzina SIM karti..."
+
diff --git a/po/mk.po b/po/mk.po
new file mode 100755 (executable)
index 0000000..184172e
--- /dev/null
+++ b/po/mk.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Допрете за внесување"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Емитување тон"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Повикот е недостапен"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Потврди повик"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Ве молам почекајте..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Отвори пребарувач?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "Освежување на SIM..."
+
diff --git a/po/nb.po b/po/nb.po
new file mode 100755 (executable)
index 0000000..3a007ff
--- /dev/null
+++ b/po/nb.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Trykk for å skrive"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Spiller tone..."
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Samtale utilgjengelig"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Bekreft samtale"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Vent litt..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Starte nettleser?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "Oppdaterer SIM..."
+
diff --git a/po/nl_NL.po b/po/nl_NL.po
new file mode 100644 (file)
index 0000000..e8bcec2
--- /dev/null
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Tik voor invoer"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Speelt beltoon af"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Oproep niet mogelijk"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Oproep bevestigen"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Even geduld..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Browser starten?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "SIM vernieuwen..."
+
diff --git a/po/pl.po b/po/pl.po
new file mode 100755 (executable)
index 0000000..f112826
--- /dev/null
+++ b/po/pl.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Dotknij, aby wprowadzić"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Odtwarzanie dźwięku"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Połączenie niedostępne"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Potwierdź połączenie"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Proszę czekać..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Uruchomić przeglądarkę?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "Odświeżanie karty SIM..."
+
diff --git a/po/pt_BR.po b/po/pt_BR.po
new file mode 100755 (executable)
index 0000000..00c2e1d
--- /dev/null
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Toque para inserir"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Reproduzindo tom"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Chamada indisponível"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Confirmar a chamada"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Por favor aguarde..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Executar navegador?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "Atualizando SIM..."
+
diff --git a/po/pt_PT.po b/po/pt_PT.po
new file mode 100755 (executable)
index 0000000..b13a974
--- /dev/null
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Toque para introduzir"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "A reproduzir tom"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Chamada indisponível"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Confirmar a chamada"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Aguarde por favor..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Iniciar o browser?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "A actualizar SIM..."
+
diff --git a/po/ro.po b/po/ro.po
new file mode 100755 (executable)
index 0000000..ce1d778
--- /dev/null
+++ b/po/ro.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Atingeţi pt. a introduce"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Ton redare"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Apel nedisponibil"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Confirmaţi apelul"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Aşteptaţi..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Lansaţi browserul?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "Reactualizare SIM"
+
diff --git a/po/ru_RU.po b/po/ru_RU.po
new file mode 100755 (executable)
index 0000000..2d511ec
--- /dev/null
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Нажмите для ввода"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Воспроизведение мелодии"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Вызов недоступен"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Подтверждение вызова"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Подождите..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Запустить браузер?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "Обновление SIM-карты..."
+
diff --git a/po/sk.po b/po/sk.po
new file mode 100755 (executable)
index 0000000..970df2a
--- /dev/null
+++ b/po/sk.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Ťuknutím zadajte"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Prehrávanie tónu"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Hovor nie je dostupný"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Potvrdiť hovor"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Čakajte prosím..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Spustiť prehliadač?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "Aktualizácia SIM karty..."
+
diff --git a/po/sl.po b/po/sl.po
new file mode 100755 (executable)
index 0000000..17b756b
--- /dev/null
+++ b/po/sl.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Pritisnite za vnos"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Predvajam ton"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Klic ni na voljo"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Potrdi klic"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Prosimo počakajte..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Zaženem brskalnik?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "Obnavljanje SIM"
+
diff --git a/po/sr.po b/po/sr.po
new file mode 100755 (executable)
index 0000000..b5ff3a3
--- /dev/null
+++ b/po/sr.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Kucni za unos"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Ton reprodukcije"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Poziv nedostupan"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Potvrdi poziv"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Sačekaj..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Pokreni pretraživač?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "Osvežavanje SIM-a..."
+
diff --git a/po/sv.po b/po/sv.po
new file mode 100755 (executable)
index 0000000..516c54d
--- /dev/null
+++ b/po/sv.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Tryck för att ange"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Spelar upp ton"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Samtal inte tillgängligt"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Bekräfta samtal"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Var god vänta..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Starta webbläsaren?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "Uppdaterar SIM..."
+
diff --git a/po/tr_TR.po b/po/tr_TR.po
new file mode 100755 (executable)
index 0000000..5c7a208
--- /dev/null
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Tamam tuşuna dokun"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Ton çalınıyor"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Arama erişilemez"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Aramayı onayla"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Lütfen bekleyin..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Tarayıcı başlatılsın mı?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "SIM yenileniyor"
+
diff --git a/po/uk.po b/po/uk.po
new file mode 100755 (executable)
index 0000000..1ebb724
--- /dev/null
+++ b/po/uk.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Натисніть, щоб ввести"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Відтворення звука"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Виклик неможливий"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Підтвердити виклик"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Зачекайте..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Запустити браузер?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "Оновлення SIM..."
+
diff --git a/po/uz.po b/po/uz.po
new file mode 100755 (executable)
index 0000000..9efaab0
--- /dev/null
+++ b/po/uz.po
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "Kiritish uchun cherting"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "Ohang o‘ynamoqda"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "Qo‘ng‘iroqdan foydalanib bo‘lmaydi"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "Qo‘ng‘iroqni tasdiqlang"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "Iltimos, kuting..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "Brauzer ishga tushirilsinmi?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "SIM-karta yangilanmoqda..."
+
diff --git a/po/zh_CN.po b/po/zh_CN.po
new file mode 100755 (executable)
index 0000000..3605594
--- /dev/null
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "点击输入"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "播放声调"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "通话不可用"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "确认呼叫"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "请稍等……"
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "启动浏览器?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "SIM卡恢复中…"
+
diff --git a/po/zh_HK.po b/po/zh_HK.po
new file mode 100755 (executable)
index 0000000..abfa10f
--- /dev/null
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "輕觸以輸入"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "播放提示音"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "通話不可用"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "確定通話"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "請稍候..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "要啟動瀏覽器嗎?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "正在重新整理 SIM 卡..."
+
diff --git a/po/zh_SG.po b/po/zh_SG.po
new file mode 100755 (executable)
index 0000000..8690ef1
--- /dev/null
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "点击输入"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "播放声调"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "无法拨电"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "确认呼叫"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "请稍候…"
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "启动浏览器?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "SIM卡恢复中…"
+
diff --git a/po/zh_TW.po b/po/zh_TW.po
new file mode 100755 (executable)
index 0000000..afdb1a6
--- /dev/null
@@ -0,0 +1,21 @@
+msgid "IDS_SIM_BODY_TAP_TO_ENTER_ABB"
+msgstr "輕觸以輸入"
+
+msgid "IDS_SIM_POP_PLAYTONE"
+msgstr "播放提示音"
+
+msgid "IDS_SIM_POP_CALL_UNAVAILABLE"
+msgstr "無法通話"
+
+msgid "IDS_SIM_POP_CONFIRM_CALL"
+msgstr "確認通話"
+
+msgid "IDS_SIM_POP_INTERMEDIATE"
+msgstr "請稍候..."
+
+msgid "IDS_SIM_POP_LAUNCH_BROWSERQ"
+msgstr "要啟動瀏覽器嗎?"
+
+msgid "IDS_SIM_POP_REFRESHING"
+msgstr "正在重新整理 SIM 卡..."
+
diff --git a/sat-event-downloader/CMakeLists.txt b/sat-event-downloader/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..ee72b31
--- /dev/null
@@ -0,0 +1,28 @@
+
+PROJECT(sat-event-downloader C)
+SET(SRCS
+       main.c
+       event-list.c
+   )
+
+pkg_check_modules(pkgs REQUIRED
+                       tapi
+                       vconf
+                       dlog
+                       glib-2.0
+                       gio-2.0
+)
+
+FOREACH(flag ${pkgs_CFLAGS})
+       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+
+ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
+
+INSTALL(FILES ${CMAKE_BINARY_DIR}/sat-event-downloader/org.tizen.sat-event-downloader.service DESTINATION /usr/share/dbus-1/services)
+
+INSTALL(TARGETS sat-event-downloader DESTINATION bin)
+
diff --git a/sat-event-downloader/event-list.c b/sat-event-downloader/event-list.c
new file mode 100755 (executable)
index 0000000..5ba4a19
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2012-2013 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 <dlog.h>
+#include <vconf.h>
+#include <glib.h>
+#include "utils.h"
+#include "event-list.h"
+
+static GSList * event_list = NULL;
+
+static void event_list_data_free(EventData *list_data)
+{
+       ret_if(NULL == list_data->event_key);
+       g_free(list_data->event_key);
+       g_free(list_data);
+}
+
+void event_list_clear()
+{
+       EventData *list_data;
+       int ret = 0;
+       GSList *list;
+       ret_if(NULL == event_list);
+
+       dbg("current event list number = %d", g_slist_length(event_list));
+
+       list = event_list;
+       while(list) {
+               list_data = (EventData*)list->data;
+               if(list_data) {
+                       dbg("remove event key data= %s", list_data->event_key);
+                       ret = vconf_ignore_key_changed(list_data->event_key, list_data->event_cb);
+                       retm_if(ret<0, "vconf_ignore_key_changed(%s) failed", list_data->event_key);
+                       event_list = g_slist_remove(event_list, list_data);
+                       event_list_data_free(list_data);
+               }
+               list = list->next;
+       }
+}
+
+int event_list_count()
+{
+       int n;
+
+       n = g_slist_length(event_list);
+       return n;
+}
+
+int event_list_add(EventData *event_data)
+{
+       retv_if(NULL == event_data, -1);
+       retv_if(NULL == event_data->event_key, -1);
+       retv_if(NULL == event_data->event_cb, -1);
+       EventData * list_data;
+       GSList *list;
+
+       dbg("Enter");
+
+       list = event_list;
+       while(list) {
+               list_data = (EventData*)list->data;
+               if(list_data)
+               {
+                       if(g_strcmp0(list_data->event_key, event_data->event_key) == 0) {
+                               dbg("Already exists in the event list: event(%s)", list_data->event_key);
+                               return -1;
+                       }
+               }
+               list = list->next;
+       }
+
+       if(vconf_notify_key_changed(event_data->event_key, event_data->event_cb, event_data->event_key)<0){
+               dbg("[%s] vconf noti regi error\n", event_data->event_key);
+               //return -1;
+       }
+
+       event_list = g_slist_append(event_list, event_data);
+
+       dbg("total event list number = %d", g_slist_length(event_list));
+       return 0;
+}
+
+void event_list_remove(char *event_key)
+{
+       EventData * list_data;
+       ret_if(NULL == event_list);
+       GSList *list;
+
+       int ret = 0;
+
+       list = event_list;
+       while(list) {
+               list_data = (EventData*)list->data;
+               if(list_data) {
+                       if(g_strcmp0(list_data->event_key, event_key) == 0) {
+                               dbg("removed event key data= %s , %s", list_data->event_key, event_key);
+                               ret = vconf_ignore_key_changed(list_data->event_key, list_data->event_cb);
+                               retm_if(ret<0, "vconf_ignore_key_changed(%s) failed", list_data->event_key);
+                               event_list = g_slist_remove(event_list, list_data);
+                               event_list_data_free(list_data);
+                               break;
+                       }
+               }
+               list = list->next;
+       }
+       dbg("total event list number = %d", g_slist_length(event_list));
+}
+
diff --git a/sat-event-downloader/event-list.h b/sat-event-downloader/event-list.h
new file mode 100644 (file)
index 0000000..40e1984
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2012-2013 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 __EVENT_LIST_H_
+#define __EVENT_LIST_H_
+
+#include <vconf.h>
+
+typedef struct {
+       char *event_key;
+       vconf_callback_fn event_cb;
+} EventData;
+
+int event_list_add(EventData *event_data);
+void event_list_remove(char *event_key);
+void event_list_clear();
+int event_list_count();
+
+#endif /* __EVENT_LIST_H_ */
+
diff --git a/sat-event-downloader/main.c b/sat-event-downloader/main.c
new file mode 100755 (executable)
index 0000000..eaad47d
--- /dev/null
@@ -0,0 +1,639 @@
+/*
+ * Copyright (c) 2012-2013 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 <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <sys/utsname.h>
+#include <unistd.h>
+#include <linux/input.h>
+#include <vconf.h>
+#include <dlog.h>
+#include <ITapiSat.h>
+#include <TapiUtility.h>
+#include <glib.h>
+#include <gio/gio.h>
+#include <glib-object.h>
+
+#include "utils.h"
+#include "event-list.h"
+
+#define INPUT_NODE_DEV_FILE_PATH       "/dev/event"
+#define DBUS_SERVICE_SAT_EVT_DW        "org.tizen.sat-event-downloader"
+#define PATH_LENGTH_MAX                                20
+#define SAT_LANGAGUE_MAX                       15
+#define USER_EVENT_MAX                         10
+
+struct event_info{
+       guint source;
+       int   fd;
+};
+
+typedef struct {
+       gpointer dbus_connection;
+       GMainLoop *mainloop;
+       gchar *path;
+       guint signal_id;
+       struct event_info info[USER_EVENT_MAX];
+} SatEvtDownloader_t;
+
+struct language {
+       const char *code;
+       int ival;               /* for Convert from code to integer */
+};
+
+
+static struct language langs[SAT_LANGAGUE_MAX] = {
+       {"en_GB.UTF-8", SETTING_LANG_ENGLISH,},
+       {"en_US.UTF-8", SETTING_LANG_ENGLISH,},
+       {"de_DE.UTF-8", SETTING_LANG_GERMAN,},
+       {"es_ES.UTF-8", SETTING_LANG_SPAINISH,},
+       {"pt_PT.UTF-8", SETTING_LANG_PORTUGUESE,},
+       {"it_IT.UTF-8", SETTING_LANG_ITALIAN,},
+       {"fr_FR.UTF-8", SETTING_LANG_FRENCH,},
+       {"tr_TR.UTF-8", SETTING_LANG_TURKISH,},
+       {"ko_KR.UTF-8", SETTING_LANG_KOREA,},
+       {"zh_CN.UTF-8", SETTING_LANG_CHINA,},
+       {"zh_HK.UTF-8", SETTING_LANG_CANTONESE,},
+       {"zh_TW.UTF-8", SETTING_LANG_TAIWAN,},
+       {"ja_JP.UTF-8", SETTING_LANG_JAPAN,},
+       {"ru_RU.UTF-8", SETTING_LANG_RUSSIAN,},
+       {"el_GR.UTF-8", SETTING_LANG_GREEK,}
+};
+
+static         SatEvtDownloader_t *sat_info;
+
+static int _get_language_int(const char *lang_code)
+{
+       int i;
+       int ret = -1;
+       char *str1, *str2;
+
+       dbg("convert lang_code (%s) to integer.\n", lang_code);
+
+       str1 = g_strjoinv(NULL, g_strsplit_set(lang_code, "_.-", -1));
+
+       for(i = 0; i<SAT_LANGAGUE_MAX; i++) {
+               str2 = g_strjoinv(NULL, g_strsplit_set(langs[i].code, "_.-", -1));
+               if(strcasecmp(str1, str2) == 0) {
+                       ret = langs[i].ival;
+                       dbg("success to convert!! (%d), str1(%s), str2(%s)", ret, str1, str2);
+               }
+       }
+       return ret;
+}
+
+static GVariant* _sat_gen_event_download_data(const TelSatEventDownloadReqInfo_t *pEventData)
+{
+       GVariant *result = NULL;
+
+       switch(pEventData->eventDownloadType)
+       {
+               case TAPI_EVENT_SAT_DW_TYPE_USER_ACTIVITY:{
+                       gboolean user_activity = TRUE;
+                       dbg("user activity (%d) ", user_activity);
+                       result = g_variant_new("(b)", user_activity);
+               } break;
+               case TAPI_EVENT_SAT_DW_TYPE_IDLE_SCREEN_AVAILABLE:{
+                       gboolean idle_screen = pEventData->u.bIdleScreenAvailable;
+                       dbg("idle screen available (%d)", idle_screen);
+
+                       result = g_variant_new("(b)", idle_screen);
+               } break;
+               case TAPI_EVENT_SAT_DW_TYPE_LANGUAGE_SELECTION:{
+                       gint selected_language;
+                       dbg("selected language (%d)", pEventData->u.languageSelectionEventReqInfo.language);
+
+                       selected_language = pEventData->u.languageSelectionEventReqInfo.language;
+                       result = g_variant_new("(i)", selected_language);
+               } break;
+               case TAPI_EVENT_SAT_DW_TYPE_BROWSER_TERMINATION:
+               case TAPI_EVENT_SAT_DW_TYPE_DATA_AVAILABLE:
+               case TAPI_EVENT_SAT_DW_TYPE_CHANNEL_STATUS:
+               default :
+                       dbg("not support download event (%d)", pEventData->eventDownloadType);
+                       break;
+       }
+
+       return result;
+}
+
+
+static int _sat_request_download_event(const TelSatEventDownloadReqInfo_t *pEventData)
+{
+       GVariant *rst = NULL;
+       GVariant *download_data = NULL;
+       GVariant *inparam = NULL;
+       GError *error = NULL;
+       gint event_download_type, src_dev, dest_dev;
+       gint res = 0, env_resp = 0;
+
+       dbg("Func Entrance ");
+
+       if (!sat_info || !sat_info->dbus_connection || !pEventData){
+               dbg("invalid parameter");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       event_download_type = pEventData->eventDownloadType;
+       src_dev = TAPI_SAT_DEVICE_ID_ME;
+       dest_dev = TAPI_SAT_DEVICE_ID_SIM;
+       download_data = _sat_gen_event_download_data(pEventData);
+       dbg("event type(%d)", event_download_type);
+       inparam = g_variant_new("(iiiv)", event_download_type, src_dev, dest_dev, download_data);
+
+       rst = g_dbus_connection_call_sync(sat_info->dbus_connection, DBUS_TELEPHONY_SERVICE,
+                       sat_info->path, DBUS_TELEPHONY_SAT_INTERFACE, "DownloadEvent", inparam, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
+
+       g_variant_unref(inparam);
+
+       if (!rst) {
+               dbg( "error to send ui display status(%s)", error->message);
+               g_error_free(error);
+               return -1;
+       }
+
+       g_variant_get(rst, "(ii)", &res, &env_resp);
+       dbg("result (%d)", res);
+
+dbg("envelope response (%d)", env_resp);
+
+       return res;
+}
+
+static guint sat_register_gio_watch(int fd, void *callback, char *event_key)
+{
+       GIOChannel *channel = NULL;
+       guint source;
+
+       if (!callback) {
+               dbg("callback is null !!");
+               return FALSE;
+       }
+
+       channel = g_io_channel_unix_new(fd);
+       source = g_io_add_watch(channel, G_IO_IN, (GIOFunc) callback, event_key);
+
+       return source;
+}
+
+static void sat_allocate_watch_source(int index, const char * path, void *callback, char *event_key)
+{
+       int fd;
+       guint source;
+
+       ret_if(NULL == sat_info);
+
+       fd = open(path , O_RDONLY);
+
+       if (fd < 0 ) {
+               dbg("fail to open file (%s)", path);
+               return;
+       }
+       source = sat_register_gio_watch(fd, callback, event_key);
+       sat_info->info[index].source = source;
+       sat_info->info[index].fd = fd;
+       dbg("allocate index[%d], path[%s], source[%d], fd[%d]", index, path, source, fd);
+}
+
+static void sat_release_watch_source(void)
+{
+       int index;
+
+       ret_if(NULL == sat_info);
+
+       for(index=0; index<USER_EVENT_MAX; index++) {
+               dbg("remove source[%d] = %d, fd[%d] ", index,
+                       sat_info->info[index].source, sat_info->info[index].fd);
+               g_source_remove(sat_info->info[index].source);
+               sat_info->info[index].source = 0;
+               if(sat_info->info[index].fd != -1) {
+                       close(sat_info->info[index].fd);
+                       sat_info->info[index].fd = -1;
+               }
+       }
+}
+
+static gboolean on_recv_key_event(GIOChannel *channel, GIOCondition condition, gpointer data)
+{
+       TelSatEventDownloadReqInfo_t event_dw_request;
+       char *event_key = (char *)data;
+       struct input_event *input;
+       int ret;
+       int n, fd;
+       char buf[1024];
+
+       fd = g_io_channel_unix_get_fd(channel);
+
+       n = read(fd, buf, sizeof(struct input_event));
+       if(n<0){
+               dbg("fail to read");
+               return TRUE;
+       }
+
+       input = (struct input_event *)buf;
+       dbg("key type (0x%x), code (%hd), fd(%d)", input->type, input->code, fd);
+
+       if(input->type != EV_KEY && input->type != EV_ABS) {
+               dbg("unwanted event !!!");
+               return FALSE;
+       }
+
+       event_dw_request.eventDownloadType = TAPI_EVENT_SAT_DW_TYPE_USER_ACTIVITY;
+       ret = _sat_request_download_event(&event_dw_request);
+       retvm_if(ret<0, TRUE, "_sat_request_downlod_event failed");
+
+       /* If we got here, that means evelope command
+        * for user activity has been sent to CP,
+        * so remove all watch sources for event nodes and
+        * remove user activity event from the event list.
+        */
+       sat_release_watch_source();
+       event_list_remove(event_key);
+
+       if(event_list_count() == 0)
+               g_main_loop_quit(sat_info->mainloop);
+
+       g_io_channel_unref(channel);
+       channel = NULL;
+
+       return FALSE;
+}
+
+static void user_activity(char * event_key)
+{
+       int index;
+
+       dbg("Enter: event_key (%s)", event_key);
+
+       for(index=0;index<USER_EVENT_MAX;index++) {
+               char path[PATH_LENGTH_MAX] = {0};
+               (void) sprintf(path, "%s%d", INPUT_NODE_DEV_FILE_PATH, index);
+               sat_allocate_watch_source(index, (const char *)path, on_recv_key_event, event_key);
+       }
+}
+
+static void idle_screen_available(char *event_key)
+{
+       TelSatEventDownloadReqInfo_t event_dw_request;
+       int screen_top;
+       int ret;
+
+       if(vconf_get_int(event_key, &screen_top)<0)
+               ret_if("vconf_get_int(VCONFKEY_IDLE_SCREEN_TOP) failed");
+
+       dbg("idle screen top status (%d)", screen_top);
+
+       if(screen_top == 1)
+       {
+               event_dw_request.eventDownloadType = TAPI_EVENT_SAT_DW_TYPE_IDLE_SCREEN_AVAILABLE;
+               event_dw_request.u.bIdleScreenAvailable = TRUE;
+
+               ret = _sat_request_download_event(&event_dw_request);
+               retm_if(ret<0, "_sat_request_downlod_event failed");
+
+               event_list_remove(event_key);
+       }
+}
+
+static void language_selection()
+{
+       TelSatEventDownloadReqInfo_t event_dw_request;
+       TelSatLanguageType_t sat_lang = TAPI_SAT_LP_LANG_UNSPECIFIED;
+       int language = 0;
+       char *lang_code = NULL;
+       int ret = 0;
+
+       lang_code = vconf_get_str(VCONFKEY_LANGSET);
+       language = _get_language_int((const char*)lang_code);
+       if(language == -1)
+               ret_if("vconf_get_str(VCONFKEY_LANGSET) failed");
+
+       switch(language){
+               case SETTING_LANG_ENGLISH:
+                       sat_lang = TAPI_SAT_LP_ENGLISH;
+                       break;
+               case SETTING_LANG_GERMAN:
+                       sat_lang = TAPI_SAT_LP_GERMAN;
+                       break;
+               case SETTING_LANG_DUTCH:
+                       sat_lang = TAPI_SAT_LP_DUTCH;
+                       break;
+               case SETTING_LANG_SPAINISH:
+                       sat_lang = TAPI_SAT_LP_SPANISH;
+                       break;
+               case SETTING_LANG_PORTUGUESE:
+                       sat_lang = TAPI_SAT_LP_PORTUGUESE;
+                       break;
+               case SETTING_LANG_GREEK:
+                       sat_lang = TAPI_SAT_LP_GREEK;
+                       break;
+               case SETTING_LANG_ITALIAN:
+                       sat_lang = TAPI_SAT_LP_ITALIAN;
+                       break;
+               case SETTING_LANG_FRENCH:
+                       sat_lang = TAPI_SAT_LP_FRENCH;
+                       break;
+               case SETTING_LANG_TURKISH:
+                       sat_lang = TAPI_SAT_LP_TURKISH;
+                       break;
+               default:
+                       sat_lang = TAPI_SAT_LP_LANG_UNSPECIFIED;
+                       break;
+       }
+       dbg("lang_code = %s, language[%d], [0x%x]", lang_code, language, sat_lang);
+
+       event_dw_request.eventDownloadType = TAPI_EVENT_SAT_DW_TYPE_LANGUAGE_SELECTION;
+       event_dw_request.u.languageSelectionEventReqInfo.language = sat_lang;
+       ret = _sat_request_download_event(&event_dw_request);
+       retm_if(ret<0, "_sat_request_downlod_event failed");
+}
+
+static void sat_event_download_cb(keynode_t *node, void *data)
+{
+       ret_if(NULL == data);
+       char *event_key = data;
+
+       dbg("Enter: event_key (%s)", event_key);
+
+       if(strcmp(event_key, VCONFKEY_IDLE_SCREEN_TOP) == 0)
+               idle_screen_available(event_key);
+       else if(strcmp(event_key, VCONFKEY_LANGSET) == 0)
+               language_selection();
+
+       if(event_list_count() == 0)
+               g_main_loop_quit(sat_info->mainloop);
+}
+
+static void sat_process_setup_event_list(GVariant* setup_event_list_info)
+{
+       GVariant *evt_list = NULL;
+       gint event_count = 0;
+       int is_idle_on_top = 0;
+       int ret = 0;
+
+       if(!setup_event_list_info){
+               dbg("setup_event_list_info is NULL.");
+               return;
+       }
+
+       g_variant_get(setup_event_list_info, "(i@v)", &event_count, &evt_list);
+
+       dbg("event count (%d)", event_count);
+
+       if(event_count == 0) {
+               dbg("event count is zero indicating remove entire list of events in ME.");
+               event_list_clear();
+               goto EXIT;
+       }
+
+       if (evt_list) {
+               guchar data;
+               GVariantIter *iter = NULL;
+               GVariant *inner_gv = NULL;
+
+               inner_gv = g_variant_get_variant(evt_list);
+               dbg("event list exist type_format(%s)", g_variant_get_type_string(inner_gv));
+
+               g_variant_get(inner_gv, "ai", &iter);
+               while (g_variant_iter_loop(iter, "i", &data)) {
+                       dbg("event(%d)", data);
+
+                       if (data == TAPI_EVENT_SAT_DW_TYPE_USER_ACTIVITY) {
+                               EventData *event_data = calloc(1, sizeof(EventData));
+                               char * event_key = strdup("key/dummy/user_activity");
+
+                               event_data->event_cb = sat_event_download_cb;
+                               event_data->event_key = event_key;
+
+                               ret = event_list_add(event_data);
+                               if(ret<0)
+                               {
+                                       dbg("fail to add list.");
+                                       free(event_data->event_key);
+                                       free(event_data);
+                               }
+                               user_activity(event_key);
+                       }
+                       else if (data == TAPI_EVENT_SAT_DW_TYPE_IDLE_SCREEN_AVAILABLE) {
+                               EventData *event_data = calloc(1, sizeof(EventData));
+                               char * event_key = strdup(VCONFKEY_IDLE_SCREEN_TOP);
+
+                               event_data->event_cb = sat_event_download_cb;
+                               event_data->event_key = event_key;
+
+                               ret = event_list_add(event_data);
+                               if(ret<0)
+                               {
+                                       dbg("fail to add list.");
+                                       free(event_data->event_key);
+                                       free(event_data);
+                               }
+
+                               /* Check here current status of idle screen */
+                               if(vconf_get_int(event_key, &is_idle_on_top) < 0)
+                                       dbg("vconf_get_int(%s) failed", event_key);
+
+                               dbg("idle screen top status (%d)", is_idle_on_top);
+
+                               if(is_idle_on_top == 1) {
+                                       dbg("send evelope command immediately.");
+                                       idle_screen_available(event_key);
+                               }
+                               free(event_key);
+                       }
+                       else if (data == TAPI_EVENT_SAT_DW_TYPE_LANGUAGE_SELECTION) {
+                               EventData *event_data = calloc(1, sizeof(EventData));
+                               event_data->event_cb = sat_event_download_cb;
+                               event_data->event_key = strdup(VCONFKEY_LANGSET);
+
+                               ret = event_list_add(event_data);
+                               if(ret<0)
+                               {
+                                       dbg("fail to add list.");
+                                       free(event_data->event_key);
+                                       free(event_data);
+                               }
+                       }
+               }
+               //while end
+               g_variant_iter_free(iter);
+               g_variant_unref(inner_gv);
+       }
+
+       event_count = event_list_count();
+       dbg("event_list_count: %d", event_count);
+
+EXIT:
+       if(event_count == 0)
+               g_main_loop_quit(sat_info->mainloop);
+
+       return;
+}
+
+static void on_sat_signal_handler(GDBusConnection *connection, const gchar *sender_name,
+               const gchar *object_path, const gchar *interface_name, const gchar *signal_name,
+               GVariant *parameters, gpointer user_data)
+{
+
+       if (!g_strcmp0(interface_name, DBUS_TELEPHONY_SAT_INTERFACE)) {
+               dbg("on_sat_signal_handler: signal_name = %s", signal_name);
+               //This can be implemented using hash table as well, but as the number is too small opted for if else
+               if (!g_strcmp0(signal_name, "SetupEventList")) {
+                       sat_process_setup_event_list(parameters);
+               }
+               return;
+       }
+
+       dbg("on_sat_signal_handler: Invalid Command");
+       return;
+}
+
+static void sat_register_event(const char* noti_id)
+{
+       gchar** dbus_noti = NULL;
+
+       dbus_noti = g_strsplit((const char*) noti_id, ":", 2);
+       if (!dbus_noti) {
+               dbg("invalid noti_id");
+               return;
+       }
+
+       dbg("dbus signal interface(%s) signal(%s) path(%s)", dbus_noti[0], dbus_noti[1], sat_info->path);
+
+       sat_info->signal_id = g_dbus_connection_signal_subscribe(sat_info->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, /* Sender */
+                       dbus_noti[0], /* Interface */
+                       dbus_noti[1], /* Member */
+                       sat_info->path, /* Object path */
+                       NULL, /* arg0 */
+                       G_DBUS_SIGNAL_FLAGS_NONE, on_sat_signal_handler, NULL, NULL );
+
+       dbg("subscribe from signal ID (%d)", sat_info->signal_id);
+
+       g_strfreev(dbus_noti);
+
+       return;
+}
+
+static int sat_dbus_register()
+{
+       gint id = 0;
+
+       dbg("Enter");
+
+       id = g_bus_own_name (G_BUS_TYPE_SYSTEM,
+               DBUS_SERVICE_SAT_EVT_DW,
+               G_BUS_NAME_OWNER_FLAGS_REPLACE,
+               NULL,
+               NULL, NULL,
+               NULL,
+               NULL);
+
+       dbg("register dbus name id(%d)", id);
+
+       return 0;
+}
+
+static gboolean sat_event_downloader_init(void)
+{
+       GError *error = NULL;
+       char **modem_list = NULL;
+
+       retv_if(NULL == sat_info, FALSE);
+
+       modem_list = tel_get_cp_name_list();
+       if(modem_list == NULL){
+               dbg("getting modem list failed, Exiting App");
+               return FALSE;
+       }
+
+       dbg("cp name(%s)", modem_list[0]);
+
+       sat_info->path = g_strdup_printf("%s/%s", DBUS_TELEPHONY_DEFAULT_PATH, modem_list[0]);
+       sat_info->dbus_connection = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error);
+       if (!sat_info->dbus_connection) {
+               dbg("sat_event_downloader_init: Error in creating dbus_connection %s", error->message);
+               g_error_free(error);
+               return FALSE;
+       }
+
+       //register SETUP "EVENT LIST" event
+       sat_register_event(TAPI_NOTI_SAT_SETUP_EVENT_LIST);
+
+       return TRUE;
+}
+
+static void sat_event_downloader_exit(void)
+{
+       ret_if(NULL == sat_info);
+       /* Unsubscribe All the signals from dbus..*/
+       dbg("unsubsribe from signal ID (%d) ", sat_info->signal_id);
+       g_dbus_connection_signal_unsubscribe(sat_info->dbus_connection, sat_info->signal_id);
+       g_object_unref((gpointer) sat_info->dbus_connection);
+
+       g_main_loop_quit(sat_info->mainloop);
+       sat_release_watch_source();
+       g_free(sat_info->path);
+       g_free(sat_info);
+
+       return;
+}
+
+int main(int argc, char *argv[])
+{
+       dbg(" Enter ");
+
+       g_type_init();
+
+       sat_dbus_register();
+
+
+       sat_info = g_new0(SatEvtDownloader_t, 1);
+
+       if (sat_info == NULL ) {
+               dbg("Main: Memory Allocation for sat_info failed");
+               return EXIT_FAILURE;
+       }
+
+       dbg("calling g_main_loop");
+       sat_info->mainloop = g_main_loop_new(NULL, FALSE);
+       if (!sat_info->mainloop) {
+               dbg("fail to create g_mail_loop for sat_info");
+               g_free(sat_info);
+               return EXIT_FAILURE;
+       }
+
+       if (!sat_event_downloader_init()) {
+               dbg("Init failed !!");
+               sat_event_downloader_exit();
+               return EXIT_FAILURE;
+       }
+
+       g_main_loop_run(sat_info->mainloop);
+
+       event_list_clear();
+       sat_event_downloader_exit();
+
+       dbg("Exit");
+       exit(1);
+       return EXIT_SUCCESS;
+}
+
diff --git a/sat-event-downloader/org.tizen.sat-event-downloader.service b/sat-event-downloader/org.tizen.sat-event-downloader.service
new file mode 100755 (executable)
index 0000000..70d0b79
--- /dev/null
@@ -0,0 +1,3 @@
+[D-BUS Service]\r
+Name=org.tizen.sat-event-downloader\r
+Exec=/usr/apps/org.tizen.sat-ui/bin/sat-event-downloader\r
diff --git a/sat-event-downloader/utils.h b/sat-event-downloader/utils.h
new file mode 100755 (executable)
index 0000000..b47e4d5
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2012-2013 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.
+ */\r
+\r
+#ifndef __EVENT_DOWNLOAD_UTILS_H_\r
+#define __EVENT_DOWNLOAD_UTILS_H_\r
+\r
+#include <dlog.h>
+
+#define SAT_UI_LOG_TAG "SAT_EVT_DW"\r
+
+#define dbg(fmt,args...)  { RLOG(LOG_DEBUG, SAT_UI_LOG_TAG, "<%s:%d> " fmt "\n", __func__, __LINE__, ##args); }
+\r
+#define DBG(fmt, arg...) \\r
+       do { \\r
+               LOG(LOG_INFO, SAT_UI_LOG_TAG, "[SAT_EVT_DW][%s:%d] "fmt"\n",  __func__, __LINE__, ##arg); \\r
+       } while(0)\r
+\r
+#define ERR(fmt, arg...) \
+       do { \
+               LOGE(""fmt"\n", ##arg); \
+       } while(0)
+
+#define warn_if(expr, fmt, arg...) do { \\r
+               if(expr) { \
+                       dbg("(%s) -> "fmt, #expr, ##arg); \
+               } \
+       } while (0)\r
+\r
+#define ret_if(expr) do { \\r
+               if(expr) { \
+                       dbg("(%s) -> %s() return", #expr, __FUNCTION__); \
+                       return; \
+               } \
+       } while (0)\r
+\r
+#define retv_if(expr, val) do { \\r
+               if(expr) { \
+                       dbg("(%s) -> %s() return", #expr, __FUNCTION__); \
+                       return (val); \
+               } \
+       } while (0)\r
+\r
+#define retm_if(expr, fmt, arg...) do { \\r
+               if(expr) { \
+                       ERR(fmt, ##arg); \
+                       dbg("(%s) -> %s() return", #expr, __FUNCTION__); \
+                       return; \
+               } \
+       } while (0)\r
+\r
+#define retvm_if(expr, val, fmt, arg...) do { \\r
+               if(expr) { \
+                       ERR(fmt, ##arg); \
+                       dbg("(%s) -> %s() return", #expr, __FUNCTION__); \
+                       return (val); \
+               } \
+       } while (0)\r
+\r
+#endif /* __EVENT_DOWNLOAD_UTILS_H_*/
\ No newline at end of file
diff --git a/src/display-text-view.c b/src/display-text-view.c
new file mode 100755 (executable)
index 0000000..84b1fdf
--- /dev/null
@@ -0,0 +1,213 @@
+/*
+ * Copyright (c) 2012-2013 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 <stdio.h>
+#include "stdlib.h"
+#include <string.h>
+#include <appcore-efl.h>
+#include <Elementary.h>
+#include <TelSat.h>
+#include <Ecore.h>
+#include <libintl.h>
+#include "sat-ui-debug.h"
+#include "display-text-view.h"
+#include "sat-ui.h"
+#include "tel-request.h"
+#include "common_string.h"
+
+int draw_popup_text(Evas_Object* win, char *text, int user_resp_required, int duration, Evas_Smart_Cb ok_cb, Evas_Smart_Cb cancel_cb, Evas_Smart_Cb timeout_cb, void *data)
+{
+       retv_if(NULL == win, -1);
+       retv_if(NULL == data, -1);
+
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+       Evas_Object *popup;
+       char *markup_text;
+
+       if (ad->popup) {
+               evas_object_del(ad->popup);
+               ad->popup = NULL;
+       }
+
+       popup = elm_popup_add(win);
+       ad->popup = popup;
+       retv_if(NULL == popup, -1);
+       evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+       if (NULL != text) {
+               markup_text = elm_entry_utf8_to_markup(text);
+               retv_if(NULL == markup_text, -1);
+
+               DBG("description=%s",markup_text);
+
+               elm_object_text_set(popup, markup_text);
+               free(markup_text);
+       }
+
+       DBG("duration=%d user_resp_required=%d", duration, user_resp_required);
+
+       if (duration > 0) {
+               double duration_sec = duration / 1000;
+               elm_popup_timeout_set(popup, (double)duration_sec);
+       }
+
+       switch (user_resp_required) {
+               Evas_Object *btn1;
+               Evas_Object *btn2;
+
+               case RESP_OK_CANCEL:
+                       btn1 = elm_button_add(popup);
+                       elm_object_text_set(btn1, SAT_STR_OK);
+                       elm_object_part_content_set(popup, "button1", btn1);
+                       if (ok_cb)
+                               evas_object_smart_callback_add(btn1, "clicked", ok_cb, ad);
+                       btn2 = elm_button_add(popup);
+                       elm_object_text_set(btn2, SAT_STR_CANCEL);
+                       elm_object_part_content_set(popup, "button2", btn2);
+                       if (cancel_cb)
+                               evas_object_smart_callback_add(btn2, "clicked", cancel_cb, ad);
+                       break;
+               case RESP_CANCEL:
+                       btn1 = elm_button_add(popup);
+                       elm_object_text_set(btn1, SAT_STR_CANCEL);
+                       elm_object_part_content_set(popup, "button1", btn1);
+                       if (cancel_cb)
+                               evas_object_smart_callback_add(btn1, "clicked", cancel_cb, ad);
+                       break;
+               case RESP_IMMEDIATELY:
+                       btn1 = elm_button_add(popup);
+                       elm_object_text_set(btn1, SAT_STR_OK);
+                       elm_object_part_content_set(popup, "button1", btn1);
+                       if (ok_cb)
+                               evas_object_smart_callback_add(btn1, "clicked", ok_cb, ad);
+                       break;
+               case RESP_NONE:
+               default:
+                       break;
+       }
+
+       if (timeout_cb)
+               evas_object_smart_callback_add(popup, "timeout", timeout_cb, ad);
+
+       evas_object_show(popup);
+
+       return 0;
+}
+
+
+int draw_popup_text_with_icon(Evas_Object* win, char *text,Evas_Object *icon,  int user_resp_required, int duration, Evas_Smart_Cb ok_cb, Evas_Smart_Cb cancel_cb, Evas_Smart_Cb timeout_cb, void *data)
+{
+       retv_if(NULL == win, -1);
+       retv_if(NULL == data, -1);
+
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+       Evas_Object *popup;
+       Evas_Object *box;
+       char *markup_text;
+
+       if (ad->popup)
+               evas_object_del(ad->popup);
+
+       popup = elm_popup_add(win);
+       ad->popup = popup;
+       retv_if(NULL == popup, -1);
+       evas_object_show(popup);
+       evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+/* If you would like to test the icon with a example image, uncomment below codes */
+/*
+       char buffer[100];
+       icon = elm_icon_add(popup);
+       memset(buffer, 0, 100);
+       sprintf(buffer, "%s/01_navi_icon_new.png", "/opt/ug/res/images/ug-setting-call-efl");           //Test Icon
+       DBG("elm_icon_file_set return =%d",elm_icon_file_set(icon, buffer, NULL));
+       evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(icon, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_size_hint_min_set(icon, 30, 30);
+*/
+       box = elm_box_add(popup);
+       evas_object_show(box);
+       evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       //evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       elm_object_content_set(popup, box);
+
+       if (icon) {
+               evas_object_show(icon);
+               elm_box_pack_end(box, icon);
+       }
+       if (NULL != text) {
+               markup_text = elm_entry_utf8_to_markup(text);
+               retv_if(NULL == markup_text, -1);
+
+               DBG("description=%s", markup_text);
+
+               Evas_Object *en = elm_entry_add(popup);
+               elm_entry_entry_set(en, markup_text);
+               elm_entry_single_line_set(en, EINA_TRUE);
+               elm_entry_editable_set(en, EINA_FALSE);
+               elm_entry_cursor_end_set(en);
+               elm_box_pack_end(box, en);
+               evas_object_show(en);
+               free(markup_text);
+       }
+
+       DBG("duration=%d user_resp_required=%d",duration, user_resp_required);
+
+       if (duration > 0) {
+               double duration_sec = duration / 1000;
+               elm_popup_timeout_set(popup, (double)duration_sec);
+       }
+
+       switch (user_resp_required) {
+               Evas_Object *btn1;
+               Evas_Object *btn2;
+
+               case RESP_OK_CANCEL:
+                       btn1 = elm_button_add(popup);
+                       elm_object_text_set(btn1, SAT_STR_OK);
+                       elm_object_part_content_set(popup, "button1", btn1);
+                       if (ok_cb)
+                               evas_object_smart_callback_add(btn1, "clicked", ok_cb, ad);
+                       btn2 = elm_button_add(popup);
+                       elm_object_text_set(btn2, SAT_STR_CANCEL);
+                       elm_object_part_content_set(popup, "button2", btn2);
+                       if (cancel_cb)
+                               evas_object_smart_callback_add(btn1, "clicked", cancel_cb, ad);
+                       break;
+               case RESP_CANCEL:
+                       btn1 = elm_button_add(popup);
+                       elm_object_text_set(btn1, SAT_STR_CANCEL);
+                       elm_object_part_content_set(popup, "button1", btn1);
+                       if (cancel_cb)
+                               evas_object_smart_callback_add(btn1, "clicked", cancel_cb, ad);
+                       break;
+               case RESP_NONE:
+               default:
+                       break;
+       }
+
+       if (timeout_cb)
+               evas_object_smart_callback_add(popup, "timeout", timeout_cb, ad);
+
+       evas_object_show(popup);
+
+       return 0;
+}
+
+
+// End of a file
+
+
diff --git a/src/get-inkey-view.c b/src/get-inkey-view.c
new file mode 100755 (executable)
index 0000000..8124254
--- /dev/null
@@ -0,0 +1,462 @@
+/*
+ * Copyright (c) 2012-2013 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 <stdio.h>
+#include "stdlib.h"
+#include <string.h>
+#include <appcore-efl.h>
+#include <TelSat.h>
+#include <Elementary.h>
+#include <Ecore.h>
+#include <Ecore_IMF.h>
+#include "sat-ui-debug.h"
+#include "get-inkey-view.h"
+#include "sat-ui.h"
+#include "setup-menu-view.h"
+#include "sat-ui-icon.h"
+#include "tel-request.h"
+#include "winset.h"
+#include "common_string.h"
+#include <libintl.h>
+
+
+static Elm_Entry_Filter_Accept_Set digits_filter_data;
+static Elm_Entry_Filter_Limit_Size limit_filter_data;
+static TelSatGetInkeyInd_t get_inkey_info;
+
+Evas_Object * _create_conformant( Evas_Object *parent , SatUiAppData_t *ad);
+
+/* This callback is for showing(hiding) X marked button. */
+static void _changed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       if (elm_object_focus_get(data)) {
+               if (elm_entry_is_empty(obj))
+                       elm_object_signal_emit(data, "elm,state,eraser,hide", "elm");
+               else
+                       elm_object_signal_emit(data, "elm,state,eraser,show", "elm");
+       }
+}
+
+/* Focused callback will show X marked button and hide guidetext. */
+static void _focused_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       if (!elm_entry_is_empty(obj))
+               elm_object_signal_emit(data, "elm,state,eraser,show", "elm");
+       elm_object_signal_emit(data, "elm,state,guidetext,hide", "elm");
+}
+
+/* Unfocused callback will show guidetext and hide X marked button. */
+static void _unfocused_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       if (elm_entry_is_empty(obj))
+               elm_object_signal_emit(data, "elm,state,guidetext,show", "elm");
+       elm_object_signal_emit(data, "elm,state,eraser,hide", "elm");
+}
+
+/* When X marked button clicked, make string as empty. */
+static void _eraser_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
+{
+       elm_entry_entry_set(data, "");
+}
+
+static void on_clicked_ok_btn(void *data, Evas_Object *obj, void *event_info)
+{
+       char *entry_string = NULL;
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+       Evas_Object *waiting_bar;
+
+       if (ad->timer)
+               ecore_timer_del(ad->timer);
+       ad->timer= NULL;
+
+       ret_if(NULL == ad->entry);
+
+       entry_string = (char *)elm_entry_entry_get(ad->entry);
+
+       ret_if(NULL == entry_string);
+       ret_if(0 == strlen(entry_string));
+
+       DBG(" %s", entry_string);
+
+       if (ad->entry) {
+               elm_object_focus_set(ad->entry, EINA_FALSE);
+               elm_object_focus_allow_set(ad->entry, EINA_FALSE);
+       }
+
+       send_ui_user_confirm(ad->cmd_id, TAPI_SAT_CMD_TYPE_GET_INKEY,TAPI_SAT_USER_CONFIRM_YES, sizeof(unsigned char),(unsigned char*)entry_string, ad);
+       waiting_bar = create_waiting_notify(ad->content);
+       ad->waiting_bar = waiting_bar;
+       if (ad->timer) {
+               ecore_timer_del(ad->timer);
+               ad->timer = NULL;
+       }
+}
+
+static void on_clicked_yes_btn(void *data, Evas_Object *obj, void *event_info)
+{
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+       Evas_Object *waiting_bar;
+
+       if (ad->timer)
+               ecore_timer_del(ad->timer);
+
+       ad->timer = NULL;
+       send_ui_user_confirm(ad->cmd_id, TAPI_SAT_CMD_TYPE_GET_INKEY, TAPI_SAT_USER_CONFIRM_YES, 0, NULL, ad);
+       waiting_bar = create_waiting_notify(ad->content);
+       ad->waiting_bar = waiting_bar;
+       if (ad->timer) {
+               ecore_timer_del(ad->timer);
+               ad->timer = NULL;
+       }
+}
+
+static void on_clicked_no_btn(void *data, Evas_Object *obj, void *event_info)
+{
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+       Evas_Object *waiting_bar;
+
+       if (ad->timer)
+               ecore_timer_del(ad->timer);
+       ad->timer = NULL;
+       send_ui_user_confirm(ad->cmd_id, TAPI_SAT_CMD_TYPE_GET_INKEY, TAPI_SAT_USER_CONFIRM_NO_OR_CANCEL, 0, NULL, ad);
+
+       waiting_bar = create_waiting_notify(ad->content);
+       ad->waiting_bar = waiting_bar;
+       if (ad->timer) {
+               ecore_timer_del(ad->timer);
+               ad->timer = NULL;
+       }
+}
+
+static void on_clicked_back_btn( void *data, Evas_Object* obj, void* event_info )
+{
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       if (ad->timer)
+               ecore_timer_del(ad->timer);
+       ad->timer = NULL;
+
+       if (ad->entry) {
+               elm_object_focus_set(ad->entry, EINA_FALSE);
+               elm_object_focus_allow_set(ad->entry, EINA_FALSE);
+       }
+       send_ui_user_confirm(ad->cmd_id, TAPI_SAT_CMD_TYPE_GET_INKEY, TAPI_SAT_USER_CONFIRM_NO_OR_CANCEL, 0, NULL, ad);
+}
+
+static Eina_Bool on_timer_expired(void *data)
+{
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       if (NULL == ad->timer)  {
+               DBG("Cancel timout w/o user_confirm");
+       } else {
+               send_ui_user_confirm(ad->cmd_id, TAPI_SAT_CMD_TYPE_GET_INKEY, TAPI_SAT_USER_CONFIRM_TIMEOUT, 0, NULL, ad);
+               ad->timer = NULL;
+       }
+       return ECORE_CALLBACK_CANCEL;
+}
+
+static void on_clicked_help_button(void *data, Evas_Object *obj, void *event_info)
+{
+       Evas_Object *waiting_bar;
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       if (ad->timer)
+               ecore_timer_del(ad->timer);
+       ad->timer = NULL;
+
+       if (ad->entry) {
+               elm_object_focus_set(ad->entry, EINA_FALSE);
+               elm_object_focus_allow_set(ad->entry, EINA_FALSE);
+       }
+
+       send_ui_user_confirm(ad->cmd_id, TAPI_SAT_CMD_TYPE_GET_INKEY, TAPI_SAT_USER_CONFIRM_HELP_INFO, 0, NULL, ad);
+
+       waiting_bar = create_waiting_notify(ad->content);
+       ad->waiting_bar = waiting_bar;
+       if (ad->timer) {
+               ecore_timer_del(ad->timer);
+               ad->timer = NULL;
+       }
+}
+
+void _inkey_panel_event_callback(void *data, Ecore_IMF_Context *imf_context, int value)
+{
+       int x, y, w, h;
+       if (value == ECORE_IMF_INPUT_PANEL_STATE_SHOW) {
+               // ISE state has changed to ISE_STATE_SHOW status
+               // Get ISE position of current active ISE
+               ecore_imf_context_input_panel_geometry_get(imf_context, &x, &y, &w, &h);
+               printf("keypad is shown\n");
+               printf("The coordination of inkey panel. x : %d, y : %d, w : %d, h : %d\n", x, y, w, h);
+       } else if (value == ECORE_IMF_INPUT_PANEL_STATE_HIDE) {
+               // ISE state has changed to ISE_STATE_HIDE status
+               printf("keypad is hided\n");
+       }
+}
+
+static Evas_Object *_gl_ok_button_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       retv_if(NULL == data, NULL);
+
+       if (!strcmp(part, "elm.slide.swallow.1")) {
+               SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+               ad->r_button  = elm_button_add(obj);
+               elm_object_text_set(ad->r_button, SAT_STR_OK);
+               evas_object_show(ad->r_button);
+               evas_object_smart_callback_add(ad->r_button, "clicked", on_clicked_ok_btn, ad);
+
+               return ad->r_button;
+       }
+       return NULL;
+}
+
+static Evas_Object *_gl_help_button_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       retv_if(NULL == data, NULL);
+
+       if (!strcmp(part, "elm.slide.swallow.1")) {
+               Evas_Object *help_btn = NULL;
+               Evas_Object *help_icon = NULL;
+
+               SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+               help_btn = elm_button_add(obj);
+
+               retv_if(NULL == help_btn, NULL);
+
+               ad->help_btn = help_btn;
+
+               help_icon = elm_icon_add(help_btn);
+               elm_image_file_set(help_icon, HELP_ICON_FILE, NULL);
+               evas_object_size_hint_weight_set(help_icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+               evas_object_size_hint_align_set(help_icon, EVAS_HINT_FILL, EVAS_HINT_FILL);
+               elm_object_part_content_set(help_btn, "icon", help_icon);
+               evas_object_show(help_btn);
+               evas_object_smart_callback_add(help_btn, "clicked", on_clicked_help_button, ad);
+
+               return help_btn;
+       }
+       return NULL;
+}
+
+static Evas_Object *_gl_yes_no_button_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       Evas_Object *yes_no_btn = NULL;
+
+       retv_if(NULL == data, NULL);
+
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       if (!strcmp(part, "elm.slide.swallow.1")) {
+               yes_no_btn = elm_button_add(obj);
+               evas_object_show(yes_no_btn);
+               elm_object_text_set(yes_no_btn, SAT_STR_YES);
+               evas_object_smart_callback_add(yes_no_btn, "clicked", on_clicked_yes_btn, ad);
+       } else if (!strcmp(part, "elm.slide.swallow.2")) {
+               yes_no_btn = elm_button_add(obj);
+               evas_object_show(yes_no_btn);
+               elm_object_text_set(yes_no_btn, SAT_STR_NO);
+               evas_object_smart_callback_add(yes_no_btn, "clicked", on_clicked_no_btn, ad);
+       }
+
+       return yes_no_btn;
+}
+
+static Evas_Object *_gl_text_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       retv_if(NULL == data, NULL);
+
+       if (!strcmp(part, "elm.icon")) {
+               Evas_Object *layout = NULL;
+               Evas_Object *en = NULL;
+               char *info = NULL;
+
+               TelSatGetInkeyInd_t *get_inkey_data =  (TelSatGetInkeyInd_t  *)data;
+
+               layout = elm_layout_add(obj);
+               elm_layout_theme_set(layout, "layout", "editfield", "default");
+               evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+               en = elm_entry_add(obj);
+               elm_object_part_content_set(layout, "elm.swallow.content", en);
+               elm_object_signal_emit(layout, "elm,state,eraser,hide", "elm");
+
+               if (get_inkey_data->text.stringLen >0) {
+                       DBG("string=%s",(char *)get_inkey_data->text.string);
+                       info = elm_entry_utf8_to_markup((char *)get_inkey_data->text.string);
+                       elm_entry_entry_set(en, info);
+                       free(info);
+                       elm_entry_single_line_set(en, EINA_FALSE);
+                       elm_entry_editable_set(en, EINA_FALSE);
+               }
+               evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+               return layout;
+       }
+       return NULL;
+}
+
+static Evas_Object *_gl_editfield_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       retv_if(NULL == data, NULL);
+
+       if (!strcmp(part, "elm.icon")) {
+               Evas_Object *layout = NULL;
+               Evas_Object *en = NULL;
+               Ecore_IMF_Input_Panel_Layout imf_layout;
+
+               TelSatGetInkeyInd_t *get_inkey_data = (TelSatGetInkeyInd_t  *)data;
+
+               SatUiAppData_t *ad;
+               ad = (SatUiAppData_t *)evas_object_data_get(obj, "app_data");
+
+
+               layout = elm_layout_add(obj);
+               elm_layout_theme_set(layout, "layout", "editfield", "default");
+               evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+               en = elm_entry_add(obj);
+               evas_object_smart_callback_add(en, "changed", _changed_cb, layout);
+               evas_object_smart_callback_add(en, "focused", _focused_cb, layout);
+               evas_object_smart_callback_add(en, "unfocused", _unfocused_cb, layout);
+
+               elm_object_part_content_set(layout, "elm.swallow.content", en);
+               elm_object_part_text_set(layout, "elm.guidetext", _(SAT_STR_TAP_TO_ENTER));
+               elm_object_signal_callback_add(layout, "elm,eraser,clicked", "elm", _eraser_clicked_cb, en);
+
+               retv_if(NULL == en, NULL);
+               ad->entry = en;
+               elm_entry_cursor_end_set(en);
+
+               Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(en);
+               ad->imf_context = imf_context;
+               ecore_imf_context_input_panel_event_callback_add(imf_context, ECORE_IMF_INPUT_PANEL_STATE_EVENT, _inkey_panel_event_callback, NULL);
+
+               if (get_inkey_data->bIsNumeric == EINA_TRUE) {
+                       imf_layout = ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBER;
+                       digits_filter_data.accepted = "0123456789*#+";
+                       digits_filter_data.rejected = NULL;
+                       elm_entry_markup_filter_append(en, elm_entry_filter_accept_set, &digits_filter_data);
+               } else {
+                       imf_layout = ECORE_IMF_INPUT_PANEL_LAYOUT_EMAIL;
+               }
+
+               limit_filter_data.max_char_count = 0;
+               limit_filter_data.max_byte_count = 1;
+               elm_entry_markup_filter_append(en, elm_entry_filter_limit_size, &limit_filter_data);
+               elm_entry_input_panel_enabled_set(en, EINA_TRUE);
+               elm_entry_input_panel_layout_set(ad->entry, imf_layout);
+
+               evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+               elm_object_signal_emit(layout, "clicked", "elm");
+
+               return layout;
+       }
+
+       return NULL;
+}
+
+static void __sat_ui_gl_sel_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       if (event_info)
+               elm_genlist_item_selected_set(event_info, EINA_FALSE);
+}
+
+int draw_content_get_inkey(Evas_Object* content, void *tapi_data, void *data)
+{
+       retv_if(NULL == content, -1);
+       retv_if(NULL == tapi_data, -1);
+       retv_if(NULL == data, -1);
+
+       Evas_Object *genlist = NULL;
+       Evas_Object *image = NULL;
+       Evas_Object *l_button = NULL;
+       Elm_Object_Item *item = NULL;
+
+       memcpy(&(get_inkey_info), tapi_data, sizeof(TelSatGetInkeyInd_t));
+
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       ad->entry = NULL;
+
+       l_button  = elm_button_add(ad->nf);
+       elm_object_style_set(l_button, "naviframe/end_btn/default");
+       evas_object_smart_callback_add(l_button, "clicked", on_clicked_back_btn, ad);
+       elm_object_item_part_content_set(ad->navi_it, "prev_btn", l_button);
+       ad->back_btn = l_button;
+
+       /* Icon */
+       if (get_inkey_info.iconId.bIsPresent == EINA_TRUE) {
+               image = convert_iconinfo_to_evas_object((void *)ad, &get_inkey_info.iconId.iconInfo);
+
+               if (get_inkey_info.iconId.iconQualifier == TAPI_SAT_ICON_QUALI_SELF_EXPLANATORY) {
+                       elm_object_item_text_set(ad->navi_it, " ");
+               }
+               evas_object_size_hint_align_set(image, 0,0);
+               evas_object_show(image);
+       }
+
+       ad->itc_no_edit_text->item_style = "dialogue/1icon";
+       ad->itc_no_edit_text->func.content_get = _gl_text_content_get;
+
+       ad->itc_editfield_icon->item_style = "1icon";
+       ad->itc_editfield_icon->func.content_get = _gl_editfield_content_get;
+
+       ad->itc_ok_icon->item_style = "mode/slide";
+       ad->itc_ok_icon->func.content_get = _gl_ok_button_content_get;
+
+       ad->itc_help_icon->item_style = "mode/slide";
+       ad->itc_help_icon->func.content_get = _gl_help_button_content_get;
+
+       ad->itc_2icon->item_style = "mode/slide2";
+       ad->itc_2icon->func.content_get = _gl_yes_no_button_content_get;
+
+       genlist = elm_genlist_add(content);
+       elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
+       evas_object_data_set(genlist, "app_data", (void *)ad);
+
+       item = elm_genlist_item_append(genlist, ad->itc_no_edit_text, &(get_inkey_info), NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+       elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+
+       if (get_inkey_info.keyType == TAPI_SAT_INKEY_TYPE_YES_NO_REQUESTED) {
+
+               elm_genlist_item_append(genlist, ad->itc_2icon, (void *)ad, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+       } else {
+               elm_genlist_item_append(genlist, ad->itc_editfield_icon, &(get_inkey_info), NULL, ELM_GENLIST_ITEM_NONE, __sat_ui_gl_sel_cb, NULL);
+
+               elm_genlist_item_append(genlist, ad->itc_ok_icon, (void *)ad, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+       }
+
+       if (get_inkey_info.bIsHelpInfoAvailable ==  EINA_TRUE) {
+               elm_genlist_item_append(genlist, ad->itc_help_icon, (void *)ad, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+       }
+
+       elm_object_part_content_set(content, "body", genlist);
+
+       DBG("duration=%d", get_inkey_info.duration);
+
+       if (get_inkey_info.duration > 0)
+               ad->timer = ecore_timer_add((double)get_inkey_info.duration/1000.0f, on_timer_expired, ad);
+       else
+               ad->timer = ecore_timer_add(GET_INKEY_DURATION, on_timer_expired, ad);
+
+       DBG("Leave");
+
+       return 0;
+}
+
diff --git a/src/get-input-view.c b/src/get-input-view.c
new file mode 100755 (executable)
index 0000000..ce56775
--- /dev/null
@@ -0,0 +1,438 @@
+/*
+ * Copyright (c) 2012-2013 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 <stdio.h>
+#include "stdlib.h"
+#include <string.h>
+#include <appcore-efl.h>
+#include <TelSat.h>
+#include <Elementary.h>
+#include <Ecore.h>
+#include <Ecore_IMF.h>
+#include "sat-ui-debug.h"
+#include "get-input-view.h"
+#include "sat-ui.h"
+#include "setup-menu-view.h"
+#include "sat-ui-icon.h"
+#include "tel-request.h"
+#include "winset.h"
+#include "common_string.h"
+#include <libintl.h>
+
+static Elm_Entry_Filter_Accept_Set digits_filter_data;
+static Elm_Entry_Filter_Limit_Size limit_filter_data;
+static TelSatGetInputInd_t get_input_info;
+
+/* This callback is for showing(hiding) X marked button. */
+static void _changed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       if (elm_object_focus_get(data)) {
+               if (elm_entry_is_empty(obj))
+                       elm_object_signal_emit(data, "elm,state,eraser,hide", "elm");
+               else
+                       elm_object_signal_emit(data, "elm,state,eraser,show", "elm");
+       }
+}
+
+/* Focused callback will show X marked button and hide guidetext. */
+static void _focused_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       if (!elm_entry_is_empty(obj))
+               elm_object_signal_emit(data, "elm,state,eraser,show", "elm");
+       elm_object_signal_emit(data, "elm,state,guidetext,hide", "elm");
+}
+
+/* Unfocused callback will show guidetext and hide X marked button. */
+static void _unfocused_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       if (elm_entry_is_empty(obj))
+               elm_object_signal_emit(data, "elm,state,guidetext,show", "elm");
+       elm_object_signal_emit(data, "elm,state,eraser,hide", "elm");
+}
+
+/* When X marked button clicked, make string as empty. */
+static void _eraser_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
+{
+       elm_entry_entry_set(data, "");
+}
+
+static void on_clicked_ok_btn(void *data, Evas_Object *obj, void *event_info)
+{
+       Evas_Object *waiting_bar;
+       char *entry_string = NULL;
+       unsigned int string_len = 0;
+
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+       if (ad->timer)
+       ecore_timer_del(ad->timer);
+       ad->timer = NULL;
+
+       ret_if(NULL == ad->entry);
+
+       entry_string = (char *)elm_entry_entry_get(ad->entry);
+
+       ret_if(NULL == entry_string);
+
+       string_len = strlen(entry_string);
+
+       if (string_len == 0) {
+               if (ad->min > 0) {
+                       DBG("Minimum entry length is %d",ad->min);
+                       return; // Need to wait the user input
+               } else {
+                       DBG("Entry Length is zero");
+               }
+       } else {
+               DBG("Entry string is %s", entry_string);
+       }
+
+       if (ad->entry) {
+               elm_object_focus_set(ad->entry, EINA_FALSE);
+               elm_object_focus_allow_set(ad->entry, EINA_FALSE);
+       }
+       send_ui_user_confirm(ad->cmd_id, TAPI_SAT_CMD_TYPE_GET_INPUT, TAPI_SAT_USER_CONFIRM_YES, string_len,(unsigned char*)entry_string, ad);
+
+       waiting_bar = create_waiting_notify(ad->content);
+       ad->waiting_bar = waiting_bar;
+       if (ad->timer) {
+               ecore_timer_del(ad->timer);
+               ad->timer = NULL;
+       }
+}
+
+static void on_clicked_back_btn( void *data, Evas_Object* obj, void* event_info )
+{
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       if (ad->timer)
+               ecore_timer_del(ad->timer);
+       ad->timer = NULL;
+       if (ad->entry) {
+               elm_object_focus_set(ad->entry, EINA_FALSE);
+               elm_object_focus_allow_set(ad->entry, EINA_FALSE);
+       }
+       send_ui_user_confirm(ad->cmd_id, TAPI_SAT_CMD_TYPE_GET_INPUT, TAPI_SAT_USER_CONFIRM_NO_OR_CANCEL, 0, NULL, ad);
+       DBG("Leave");
+}
+
+static Eina_Bool on_expired_input_timer(void *data)
+{
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       if (NULL == ad->timer) {
+               DBG("Cancel timout w/o user_confirm");
+       } else {
+               if (ad->entry) {
+                       elm_object_focus_set(ad->entry, EINA_FALSE);
+                       elm_object_focus_allow_set(ad->entry, EINA_FALSE);
+               }
+               send_ui_user_confirm(ad->cmd_id, TAPI_SAT_CMD_TYPE_GET_INPUT, TAPI_SAT_USER_CONFIRM_TIMEOUT, 0, NULL, ad);
+               ad->timer = NULL;
+        }
+       DBG("Leave");
+       return ECORE_CALLBACK_CANCEL;
+}
+
+static void on_clicked_help_button(void *data, Evas_Object *obj, void *event_info)
+{
+       Evas_Object *waiting_bar;
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       if (ad->timer)
+               ecore_timer_del(ad->timer);
+       ad->timer = NULL;
+
+       if (ad->entry) {
+               elm_object_focus_set(ad->entry, EINA_FALSE);
+               elm_object_focus_allow_set(ad->entry, EINA_FALSE);
+       }
+
+       send_ui_user_confirm(ad->cmd_id, TAPI_SAT_CMD_TYPE_GET_INPUT, TAPI_SAT_USER_CONFIRM_HELP_INFO, 0, NULL, ad);
+
+       waiting_bar = create_waiting_notify(ad->content);
+       ad->waiting_bar = waiting_bar;
+       if (ad->timer) {
+               ecore_timer_del(ad->timer);
+               ad->timer = NULL;
+       }
+}
+
+void _input_panel_event_callback(void *data, Ecore_IMF_Context *imf_context, int value)
+{
+       int x, y, w, h;
+       if (value == ECORE_IMF_INPUT_PANEL_STATE_SHOW) {
+               // ISE state has changed to ISE_STATE_SHOW status
+               // Get ISE position of current active ISE
+               ecore_imf_context_input_panel_geometry_get(imf_context, &x, &y, &w, &h);
+               printf("keypad is shown\n");
+               printf("The coordination of input panel. x : %d, y : %d, w : %d, h : %d\n", x, y, w, h);
+       } else if (value == ECORE_IMF_INPUT_PANEL_STATE_HIDE) {
+               // ISE state has changed to ISE_STATE_HIDE status
+               printf("keypad is hided\n");
+       }
+}
+
+Evas_Object * _create_conformant( Evas_Object *parent , SatUiAppData_t *ad)
+{
+       Evas_Object *conform ;
+
+       elm_win_conformant_set(ad->win_main, EINA_TRUE);
+       conform = elm_conformant_add(parent);
+
+       retv_if(NULL == conform, NULL);
+
+       elm_object_style_set(conform, "internal_layout");
+       evas_object_size_hint_weight_set(conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_show(conform);
+
+       return conform;
+}
+
+static Evas_Object *_gl_ok_button_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       retv_if(NULL == data, NULL);
+
+       if (!strcmp(part, "elm.slide.swallow.1")) {
+               SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+               ad->r_button  = elm_button_add(obj);
+               elm_object_text_set(ad->r_button, SAT_STR_OK);
+               evas_object_show(ad->r_button);
+               evas_object_smart_callback_add(ad->r_button, "clicked", on_clicked_ok_btn, ad);
+
+               return ad->r_button;
+       }
+       return NULL;
+}
+
+static Evas_Object *_gl_help_button_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       retv_if(NULL == data, NULL);
+
+       if (!strcmp(part, "elm.slide.swallow.1")) {
+               Evas_Object *help_btn;
+               Evas_Object *help_icon;
+
+               SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+               help_btn = elm_button_add(obj);
+
+               retv_if(NULL == help_btn, NULL);
+
+               ad->help_btn = help_btn;
+               help_icon = elm_icon_add(help_btn);
+               elm_image_file_set(help_icon, HELP_ICON_FILE, NULL);
+               evas_object_size_hint_weight_set(help_icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+               evas_object_size_hint_align_set(help_icon, EVAS_HINT_FILL, EVAS_HINT_FILL);
+               elm_object_part_content_set(help_btn, "icon", help_icon);
+               evas_object_show(help_btn);
+               evas_object_smart_callback_add(help_btn, "clicked", on_clicked_help_button, ad);
+
+               return help_btn;
+       }
+       return NULL;
+}
+
+static Evas_Object *_gl_text_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       retv_if(NULL == data, NULL);
+
+       if (!strcmp(part, "elm.icon")) {
+               Evas_Object *layout = NULL;
+               Evas_Object *en = NULL;
+               char *info = NULL;
+               char buf[TAPI_SAT_DEF_TEXT_STRING_LEN_MAX];
+
+               TelSatGetInputInd_t *get_input_data =  (TelSatGetInputInd_t  *)data;
+
+               SatUiAppData_t *ad;
+               ad = (SatUiAppData_t *)evas_object_data_get(obj, "app_data");
+
+               layout = elm_layout_add(obj);
+               elm_layout_theme_set(layout, "layout", "editfield", "default");
+               evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+               en = elm_entry_add(obj);
+               elm_object_part_content_set(layout, "elm.swallow.content", en);
+               elm_object_signal_emit(layout, "elm,state,eraser,hide", "elm");
+
+               if (get_input_data->text.stringLen > 0) {
+                       DBG("string=%s",(char *)get_input_data->text.string);
+                       info = elm_entry_utf8_to_markup((char *)get_input_data->text.string);
+                       retv_if(NULL == info, NULL);
+                       snprintf(buf, sizeof(buf), "%s", info);
+                       DBG("buf=%s",buf);
+                       if (get_input_data->respLen.max >0) {
+                               snprintf(buf,  sizeof(buf), "%s %d-%d", info, get_input_data->respLen.min, get_input_data->respLen.max);
+                       }
+                       ad->min = get_input_data->respLen.min;
+                       elm_entry_entry_set(en, buf);
+                       elm_entry_single_line_set(en, EINA_FALSE);
+                       elm_entry_editable_set(en, EINA_FALSE);
+                       free(info);
+               }
+               evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+               return layout;
+       }
+       return NULL;
+}
+
+
+static Evas_Object *_gl_editfield_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       retv_if(NULL == data, NULL);
+
+       if (!strcmp(part, "elm.icon")) {
+               Evas_Object *layout = NULL;
+               Evas_Object *en = NULL;
+               Ecore_IMF_Input_Panel_Layout imf_layout;
+
+               TelSatGetInputInd_t *get_input_data = (TelSatGetInputInd_t  *)data;
+
+               SatUiAppData_t *ad;
+               ad = (SatUiAppData_t *)evas_object_data_get(obj, "app_data");
+
+               layout = elm_layout_add(obj);
+               elm_layout_theme_set(layout, "layout", "editfield", "default");
+               evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+               en = elm_entry_add(obj);
+               retv_if(NULL == en, NULL);
+
+               ad->entry = en;
+
+               evas_object_smart_callback_add(ad->entry, "changed", _changed_cb, layout);
+               evas_object_smart_callback_add(ad->entry, "focused", _focused_cb, layout);
+               evas_object_smart_callback_add(ad->entry, "unfocused", _unfocused_cb, layout);
+
+               elm_object_part_content_set(layout, "elm.swallow.content", ad->entry);
+               elm_object_part_text_set(layout, "elm.guidetext", _(SAT_STR_TAP_TO_ENTER));
+               elm_object_signal_callback_add(layout, "elm,eraser,clicked", "elm", _eraser_clicked_cb, ad->entry);
+
+               elm_entry_cursor_end_set(ad->entry);
+
+               Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(ad->entry);
+               ad->imf_context = imf_context;
+               ecore_imf_context_input_panel_event_callback_add(imf_context, ECORE_IMF_INPUT_PANEL_STATE_EVENT, _input_panel_event_callback, NULL);
+
+               if (get_input_data->bIsNumeric == EINA_TRUE) {
+                       imf_layout = ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBER;
+                       digits_filter_data.accepted = "0123456789*#+";
+                       digits_filter_data.rejected = NULL;
+                       elm_entry_markup_filter_append(ad->entry, elm_entry_filter_accept_set, &digits_filter_data);
+               } else {
+                       imf_layout = ECORE_IMF_INPUT_PANEL_LAYOUT_EMAIL;
+               }
+
+               DBG("get_input_data->respLen.max(%d)",get_input_data->respLen.max);
+               if (get_input_data->respLen.max > 0) {
+                       limit_filter_data.max_char_count = 0;
+                       limit_filter_data.max_byte_count = get_input_data->respLen.max;
+                       elm_entry_markup_filter_append(ad->entry, elm_entry_filter_limit_size, &limit_filter_data);
+               }
+
+               elm_entry_input_panel_enabled_set(ad->entry, EINA_TRUE);
+               elm_entry_input_panel_layout_set(ad->entry, imf_layout);
+
+               if (get_input_data->defaultText.stringLen > 0)
+                       elm_entry_entry_set(ad->entry, (char *)get_input_data->defaultText.string);
+
+               if (get_input_data->bIsEchoInput == FALSE)
+                       elm_entry_password_set(ad->entry, EINA_TRUE);
+
+               evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+               elm_object_signal_emit(layout, "clicked", "elm");
+
+               return layout;
+       }
+       return NULL;
+}
+
+static void __sat_ui_gl_sel_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       if (event_info)
+               elm_genlist_item_selected_set(event_info, EINA_FALSE);
+}
+
+int draw_content_get_input(Evas_Object* content, void *tapi_data, void *data)
+{
+       retv_if(NULL == content, -1);
+       retv_if(NULL == tapi_data, -1);
+       retv_if(NULL == data, -1);
+
+       Evas_Object *genlist = NULL;
+       Evas_Object *image = NULL;
+       Evas_Object *l_button = NULL;
+       Elm_Object_Item *item = NULL;
+
+       memcpy(&(get_input_info), tapi_data, sizeof(TelSatGetInputInd_t));
+
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       ad->entry = NULL;
+       ad->r_button = NULL;
+
+       l_button  = elm_button_add(ad->nf);
+       elm_object_style_set(l_button, "naviframe/end_btn/default");
+       evas_object_smart_callback_add(l_button, "clicked", on_clicked_back_btn, ad);
+       elm_object_item_part_content_set(ad->navi_it, "prev_btn", l_button);
+       ad->back_btn = l_button;
+
+       /* Icon */
+       if (get_input_info.iconId.bIsPresent == EINA_TRUE) {
+               image = convert_iconinfo_to_evas_object((void *)ad, &get_input_info.iconId.iconInfo);
+               if (get_input_info.iconId.iconQualifier == TAPI_SAT_ICON_QUALI_SELF_EXPLANATORY) {
+                       elm_object_item_text_set(ad->navi_it, " ");
+               }
+               evas_object_size_hint_align_set(image, 0,0);
+               evas_object_show(image);
+       }
+
+       genlist = elm_genlist_add(content);
+       elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
+       evas_object_data_set(genlist, "app_data",(void *)ad);
+
+       ad->itc_no_edit_text->item_style = "dialogue/1icon";
+       ad->itc_no_edit_text->func.content_get = _gl_text_content_get;
+
+       ad->itc_editfield_icon->item_style = "1icon";
+       ad->itc_editfield_icon->func.content_get = _gl_editfield_content_get;
+
+       ad->itc_ok_icon->item_style = "mode/slide";
+       ad->itc_ok_icon->func.content_get = _gl_ok_button_content_get;
+
+       ad->itc_help_icon->item_style = "mode/slide";
+       ad->itc_help_icon->func.content_get = _gl_help_button_content_get;
+
+       item = elm_genlist_item_append(genlist, ad->itc_no_edit_text, &(get_input_info), NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+       elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+
+       elm_genlist_item_append(genlist, ad->itc_editfield_icon, &(get_input_info), NULL, ELM_GENLIST_ITEM_NONE, __sat_ui_gl_sel_cb, NULL);
+
+       elm_genlist_item_append(genlist, ad->itc_ok_icon, (void *)ad, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+
+       if (get_input_info.bIsHelpInfoAvailable == EINA_TRUE) {
+               elm_genlist_item_append(genlist, ad->itc_help_icon, (void *)ad, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+       }
+
+       elm_object_part_content_set(content, "body", genlist);
+
+       ad->timer = ecore_timer_add(GET_INPUT_DURATION, on_expired_input_timer, ad);
+
+       return 0;
+}
+
diff --git a/src/sat-ui-icon.c b/src/sat-ui-icon.c
new file mode 100755 (executable)
index 0000000..0f6b216
--- /dev/null
@@ -0,0 +1,477 @@
+/*
+ * Copyright (c) 2012-2013 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 <sat-ui-icon.h>
+#include <stdbool.h>
+#include <sat-ui.h>
+#include <Elementary.h>
+#include <stdio.h>
+#include "sat-ui-debug.h"
+
+bool decode_grey_icon ( unsigned char* src_data, unsigned short src_data_len, unsigned char* dest_data, unsigned short dest_data_len );
+
+#ifdef LARGE_ICON
+bool decode_color_icon ( unsigned char* src_data, unsigned short src_data_len, unsigned char* dest_data, unsigned short dest_data_len, unsigned char* clut_data, unsigned short clut_data_len );
+#else
+bool decode_color_icon ( unsigned char bpp, unsigned char* src_data, unsigned short src_data_len, unsigned char* dest_data, unsigned short dest_data_len );
+#endif
+void __satui_fill_data(TelSatIconInfo_t* icon_info);
+
+static void image_icon_delete_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+       if(NULL != data)
+               free(data);
+}
+
+Evas_Object *convert_iconinfo_to_evas_object(void *data,TelSatIconInfo_t* icon_info)
+{
+       FILE *ficon, *fclut;
+       char file_path[50]={0,};
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+       unsigned char* dest_data = NULL;
+       int ret = 0;
+
+       DBG(" dest icon size : w %d h %d\n",icon_info->width, icon_info->height);
+       DBG(" Image Color Scheme : %d",icon_info->ics);
+
+       dest_data = malloc(icon_info->height * icon_info->width *4*sizeof(char));
+       retv_if(NULL == dest_data, NULL);
+       unsigned short dest_data_len = icon_info->height * icon_info->width*4;
+       memset(dest_data, 255, icon_info->height * icon_info->width *4*sizeof(char));
+
+       if ((icon_info->iconDataLen - 2) > ((icon_info->width * icon_info->height) / 8)) {
+               icon_info->iconDataLen = (icon_info->width * icon_info->height) / 8 + 2;
+       }
+
+       if (icon_info->ics == TAPI_SAT_SIM_IMAGE_CODING_SCHEME_BASIC) {
+#ifdef LARGE_ICON
+               DBG("  GRAY ICON\n");
+               unsigned char *icon_data;
+               if (strlen(icon_info->iconFile) == 0) {
+                       DBG("Icon path length is zero");
+                       free(dest_data);
+                       return NULL;
+               }
+               icon_data = malloc(icon_info->iconDataLen*sizeof(unsigned char));
+               if (NULL == icon_data) {
+                       free(dest_data);
+                       return NULL;
+               }
+               snprintf(file_path, sizeof(file_path), "%s", icon_info->iconFile);
+               DBG("  Icon File Path : %s\n", icon_info->iconFile);
+               ficon = fopen(file_path, "rb");
+               if (NULL == ficon) {
+                       free(dest_data);
+                       free(icon_data);
+                       return NULL;
+               }
+               ret = fread(icon_data, 1, icon_info->iconDataLen, ficon);
+               if (ret < 0) {
+                       DBG("fread is failed %d", ret);
+               } else {
+                       decode_grey_icon(icon_data, icon_info->iconDataLen, dest_data, dest_data_len);
+               }
+               fclose(ficon);
+               free(icon_data);
+#else
+               decode_grey_icon(icon_info->iconData, icon_info->iconDataLen, dest_data, dest_data_len);
+#endif
+
+       } else if (icon_info->ics == TAPI_SAT_SIM_IMAGE_CODING_SCHEME_COLOUR) {
+#ifdef LARGE_ICON
+               unsigned char *icon_data;
+               icon_data = malloc(icon_info->iconDataLen*sizeof(unsigned char));
+               if (NULL == icon_data) {
+                       free(dest_data);
+                       return NULL;
+               }
+               snprintf(file_path, sizeof(file_path), "%s", icon_info->iconFile);
+               DBG(" Icon File Path : %s\n", file_path );
+               ficon = fopen(file_path, "rb");
+               if (NULL == ficon) {
+                       free(dest_data);
+                       free(icon_data);
+                       return NULL;
+               }
+
+               ret = fread(icon_data, 1, icon_info->iconDataLen, ficon);
+               fclose(ficon);
+               if (ret < 0) {
+                       DBG("fread is failed %d", ret);
+               } else {
+                       unsigned char *clut_data;
+                       clut_data = malloc(icon_info->clutDataLen*sizeof(unsigned char));
+                       if(NULL == clut_data){
+                               free(dest_data);
+                               free(icon_data);
+                               return NULL;
+                       }
+                       snprintf(file_path, sizeof(file_path), "%s", icon_info->clutFile);
+                       DBG("CLUT File Path : %s\n", file_path);
+                       fclut = fopen(file_path, "rb");
+                       if (NULL == fclut) {
+                               free(dest_data);
+                               free(icon_data);
+                               free(clut_data);
+                               return NULL;
+                       }
+
+                       ret = fread(clut_data, 1, icon_info->clutDataLen, fclut);
+                       if (ret < 0) {
+                               DBG("fread is failed %d", ret);
+                       } else {
+                               decode_color_icon(icon_data, icon_info->iconDataLen, dest_data, dest_data_len, clut_data, icon_info->clutDataLen);
+                       }
+                       fclose(fclut);
+                       free(clut_data);
+               }
+               free(icon_data);
+#else
+               decode_color_icon(icon_info->iconData[2], icon_info->iconData, icon_info->iconDataLen, dest_data, sizeof(dest_data));
+#endif
+       }
+
+       Evas *evas;
+       Evas_Object *eo;
+       evas = evas_object_evas_get(ad->win_main);
+       eo = evas_object_image_add(evas);
+
+       evas_object_image_size_set(eo, icon_info->width, icon_info->height);
+       evas_object_image_data_set(eo, dest_data);
+       evas_object_image_fill_set(eo, 0,0, icon_info->width, icon_info->height);
+       evas_object_image_colorspace_set(eo, EVAS_COLORSPACE_ARGB8888);
+       evas_object_image_filled_set(eo, true);
+       evas_object_size_hint_min_set(eo, icon_info->width, icon_info->height);
+       evas_object_show(eo);
+       evas_object_event_callback_add(eo, EVAS_CALLBACK_DEL, image_icon_delete_cb, dest_data);
+
+       return eo;
+}
+
+#ifdef LARGE_ICON
+typedef struct _color{
+       unsigned short red;
+       unsigned short green;
+       unsigned short blue;
+} color_t;
+
+bool parse_clut_data(color_t *CLUT, unsigned char* clut_data, unsigned short clut_data_len)
+{
+       int num_of_entry = clut_data_len/3;
+       int i=0;
+       int j=0;
+       for(i=0; i < num_of_entry; ++i){
+               CLUT[i].red = clut_data[j++];
+               CLUT[i].green = clut_data[j++];
+               CLUT[i].blue = clut_data[j++];
+       }
+       return true;
+}
+
+int pow2(unsigned short n)
+{
+       switch(n){
+               case 0: return 1; break;
+               case 1: return 2; break;
+               case 2: return 4; break;
+               case 3: return 8; break;
+               case 4: return 16; break;
+               case 5: return 32; break;
+               case 6: return 64; break;
+               case 7: return 128; break;
+               case 8: return 256; break;
+               default:
+                       ERR(" Value n is out of range\n");
+                       return -1;
+       }
+}
+
+unsigned short get_clut_ref(unsigned char point, unsigned short bpp)
+{
+       int i=0;
+
+       unsigned char mask=0x80;
+       unsigned short ref=0;
+
+       for(i=0; i < bpp; ++i){
+               if(point & mask){
+                       ref +=pow2(bpp-i);
+               }
+               mask/=2;
+       }
+       return ref;
+}
+
+
+bool decode_color_icon ( unsigned char* src_data, unsigned short src_data_len, unsigned char* dest_data, unsigned short dest_data_len, unsigned char* clut_data, unsigned short clut_data_len )
+{
+       guchar *pos;
+       int i= 0;
+       pos = (guchar *)dest_data;
+       DBG(" Start decoding");
+       DBG(" data length %d", src_data_len);
+
+       color_t *CLUT;
+       CLUT = calloc(clut_data_len/3,sizeof(color_t));
+
+       if(CLUT == NULL){
+               ERR(" Failed in memory allocation for CLUT\n");
+               return false;
+       }
+
+       parse_clut_data(CLUT, clut_data,clut_data_len);
+
+       unsigned short bpp = src_data[3];
+       if( bpp < 1 || bpp > 8 ){
+               DBG("BPP shall have a value between 1 and 8\n");
+       }else{
+               DBG(" Bits per raster image point =  %d", bpp);
+
+               src_data +=7;   // Image body byte starts from 7th byte
+               int clut_index;
+
+               for( i=0; i < src_data_len - 6 ; i++)//data_length-2
+               {
+                       clut_index = get_clut_ref(*src_data, bpp);
+
+                       *pos++ = CLUT[clut_index].red;  //RED
+                       *pos++ = CLUT[clut_index].green;//GREEN
+                       *pos++ = CLUT[clut_index].blue; //BLUE
+                       *pos++ = 0xFF;                  //ALPHA
+
+                       src_data++;
+               }
+               DBG(" Image decoding done");
+       }
+
+       if(CLUT)
+               free(CLUT);
+
+       return TRUE;
+}
+
+
+#else
+
+bool decode_color_icon( unsigned char bpp, unsigned char* src_data, unsigned short src_data_len, unsigned char* dest_data, unsigned short dest_data_len )
+{
+       unsigned short temp_idx = 0;
+       unsigned char* temp_data = NULL;
+
+       int i, j;
+
+       temp_idx += 6;
+       temp_data = &src_data[temp_idx];
+       src_data_len -= temp_idx;
+       src_data_len -= (3 * src_data[3]);
+
+       for( i = 0; i < src_data_len; i++ )
+       {
+               for( j = 0; j < 4; j++ )
+               {
+                       switch( (temp_data[i] & (3 << (2*(3-j)))) >> (2*(3-j)) )
+                       {
+                       case 0 : /* black */
+                               *dest_data++ = 0x00;
+                               *dest_data++ = 0x00;
+                               *dest_data++ = 0x00;
+
+                               break;
+                       case 1 : /* red */
+                               *dest_data++ = 0xFF;
+                               *dest_data++ = 0x00;
+                               *dest_data++ = 0x00;
+                               break;
+                       case 2 : /* green */
+                               *dest_data++ = 0x00;
+                               *dest_data++ = 0xFF;
+                               *dest_data++ = 0x00;
+                               break;
+                       case 3 : /* blue */
+                               *dest_data++ = 0x00;
+                               *dest_data++ = 0x00;
+                               *dest_data++ = 0xFF;
+                               break;
+                       default : /* white */
+                               *dest_data++ = 0xFF;
+                               *dest_data++ = 0xFF;
+                               *dest_data++ = 0xFF;
+                               break;
+                       }
+               }
+       }
+
+       return TRUE;
+}
+
+#endif
+
+
+bool decode_grey_icon ( unsigned char* src_data, unsigned short src_data_len, unsigned char* dest_data, unsigned short dest_data_len )
+{
+       DBG("__satui_grey_icon_data_fill");
+
+       guchar *pos;
+       int i= 0;
+       int j=0;
+       pos = (guchar *)dest_data;
+       DBG(" before copy of data done");
+       DBG(" data length %d", src_data_len);
+
+       src_data++;
+       src_data++;
+
+       for(i=0;i<src_data_len-2;i++)//data_length-2
+       {
+               if(*src_data & EIGTH_BIT)
+               {
+                       *pos++ = 0xFF;
+                       *pos++ = 0xFF;
+                       *pos++ = 0xFF;
+                       *pos++ = 0xFF;
+               }
+               else
+               {
+                       *pos++ = 0x00;
+                       *pos++ = 0x00;
+                       *pos++ = 0x00;
+                       *pos++ = 0xFF;
+               }
+
+               if(*src_data & SEVENTH_BIT)
+               {
+                       *pos++ = 0xFF;
+                       *pos++ = 0xFF;
+                       *pos++ = 0xFF;
+                       *pos++ = 0xFF;
+               }
+               else
+               {
+                       *pos++ = 0x00;
+                       *pos++ = 0x00;
+                       *pos++ = 0x00;
+                       *pos++ = 0xFF;
+               }
+
+               if(*src_data & SIXTH_BIT)
+               {
+                       *pos++ = 0xFF;
+                       *pos++ = 0xFF;
+                       *pos++ = 0xFF;
+                       *pos++ = 0xFF;
+               }
+               else
+               {
+                       *pos++ = 0x00;
+                       *pos++ = 0x00;
+                       *pos++ = 0x00;
+                       *pos++ = 0xFF;
+               }
+
+               if(*src_data & FIFTH_BIT)
+               {
+                       *pos++ = 0xFF;
+                       *pos++ = 0xFF;
+                       *pos++ = 0xFF;
+                       *pos++ = 0xFF;
+               }
+               else
+               {
+                       *pos++ = 0x00;
+                       *pos++ = 0x00;
+                       *pos++ = 0x00;
+                       *pos++ = 0xFF;
+               }
+
+               if(*src_data & FOURTH_BIT)
+               {
+                       *pos++ = 0xFF;
+                       *pos++ = 0xFF;
+                       *pos++ = 0xFF;
+                       *pos++ = 0xFF;
+               }
+               else
+               {
+                       *pos++ = 0x00;
+                       *pos++ = 0x00;
+                       *pos++ = 0x00;
+                       *pos++ = 0xFF;
+               }
+
+               if(*src_data & THIRD_BIT)
+               {
+                       *pos++ = 0xFF;
+                       *pos++ = 0xFF;
+                       *pos++ = 0xFF;
+                       *pos++ = 0xFF;
+               }
+               else
+               {
+                       *pos++ = 0x00;
+                       *pos++ = 0x00;
+                       *pos++ = 0x00;
+                       *pos++ = 0xFF;
+               }
+
+               if(*src_data & SECOND_BIT)
+               {
+                       *pos++ = 0xFF;
+                       *pos++ = 0xFF;
+                       *pos++ = 0xFF;
+                       *pos++ = 0xFF;
+               }
+               else
+               {
+                       *pos++ = 0x00;
+                       *pos++ = 0x00;
+                       *pos++ = 0x00;
+                       *pos++ = 0xFF;
+               }
+
+               if(*src_data & FIRST_BIT)
+               {
+                       *pos++ = 0xFF;
+                       *pos++ = 0xFF;
+                       *pos++ = 0xFF;
+                       *pos++ = 0xFF;
+               }
+               else
+               {
+                       *pos++ = 0x00;
+                       *pos++ = 0x00;
+                       *pos++ = 0x00;
+                       *pos++ = 0xFF;
+               }
+
+               src_data++;
+       }
+
+       DBG(" Dest data len : %d", dest_data_len);
+       DBG(" iteration : %d %d",i, i*8 );
+       DBG(" Number fragmental pixel : %d", dest_data_len/4-i*8);
+
+       for(j=0; j < dest_data_len/4 - i*8;++j){
+               *pos++ = 0xFF;
+               *pos++ = 0xFF;
+               *pos++ = 0xFF;
+               *pos++ = 0xFF;
+       }
+
+       DBG(" copy of data done");
+       return TRUE;
+}
+
+
diff --git a/src/sat-ui.c b/src/sat-ui.c
new file mode 100755 (executable)
index 0000000..1ea5d43
--- /dev/null
@@ -0,0 +1,1422 @@
+/*
+ * Copyright (c) 2012-2013 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 <stdio.h>
+#include <appcore-efl.h>
+#include "sat-ui-debug.h"
+#include "sat-ui.h"
+#include <time.h>
+#include <X11/Xlib.h>
+#include <Ecore_X.h>
+#include <utilX.h>
+#include <Ecore.h>
+#include <Ecore_IMF.h>
+#include <Evas.h>
+#include <aul.h>
+#include <bundle.h>
+#include <vconf.h>
+#include <aul.h>
+#include <glib-2.0/glib.h>
+#include <privilege-control.h>
+#include <mm_sound.h>
+#include <libintl.h>
+#include <sysman.h>
+#include <rua.h>
+#include "setup-menu-view.h"
+#include "select-item-view.h"
+#include "display-text-view.h"
+#include "get-input-view.h"
+#include "get-inkey-view.h"
+#include "tel-request.h"
+#include "mm_sound_private.h"
+#include "winset.h"
+#include "sat-ui-icon.h"
+#include "common_string.h"
+
+/**
+ * This function handles all telephony events
+ *
+ * @internal
+ * @return             Returns TRUE on if call agent is in wait state or FALSE
+ * @param[in]          event                   tapi event data
+ * @param[in]          userdata                        user callback data
+ */
+
+static int on_tapi_event_sat_ui_info_ind(void *tapi_data, void *data);
+static int on_tapi_event_sat_select_item_ind(void *tapi_data, void *data);
+static int on_tapi_event_sat_display_text_ind(void *tapi_data, void *data);
+static int on_tapi_event_sat_get_input_ind(void *tapi_data, void *data);
+static int on_tapi_event_sat_get_inkey_ind(void *tapi_data, void *data);
+static int on_tapi_event_sat_end_proactive_session_ind(void *tapi_data, void *data);
+static int on_tapi_event_sat_ui_send_dtmf_ind(void *tapi_data, void *data);
+static int on_tapi_event_sat_ui_send_ss_ind(void *tapi_data, void *data);
+static int on_tapi_event_sat_ui_send_ussd_ind(void *tapi_data, void *data);
+static int on_tapi_event_sat_refresh_ind(void *tapi_data, void *data);
+static int on_tapi_event_sat_launch_browser_ind(void *tapi_data, void *data);
+static int on_tapi_event_sat_play_tone_ind(void *tapi_data, void *data);
+static int on_tapi_event_sat_idle_mode_text_ind(void *tapi_data, void *data);
+
+static Eina_Bool on_idle_play_tone(void *data);
+static void on_stop_play_tone(void *data);
+Eina_Bool on_expired_play_tone_timer(void *data);
+
+static void win_del(void *data, Evas_Object *obj, void *event)
+{
+       elm_exit();
+}
+
+static Evas_Object* create_win(const char *name)
+{
+       Evas_Object *eo;
+       int w, h;
+       const char *str = "mobile";
+
+       eo = elm_win_add(NULL, name, ELM_WIN_BASIC);
+       if (eo) {
+               elm_win_profiles_set(eo, &str, 1);      /* Desktop mode */
+               elm_win_title_set(eo, name);
+               evas_object_smart_callback_add(eo, "delete,request",
+                               win_del, NULL);
+               ecore_x_window_size_get(ecore_x_window_root_first_get(),
+                               &w, &h);
+               evas_object_resize(eo, w, h);
+       }
+
+       return eo;
+}
+
+static Evas_Object* create_bg(Evas_Object *win)
+{
+       Evas_Object *bg;
+       bg = elm_bg_add(win);
+       retvm_if(NULL == bg, NULL, "elm_bg_add() return NULL");
+       evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(win, bg);
+       return bg;
+}
+
+static Evas_Object* create_conformant(Evas_Object *win)
+{
+       Evas_Object *conform;
+       conform = elm_conformant_add(win);
+       retvm_if(NULL == conform, NULL, "create_conformant() return NULL");
+       elm_win_resize_object_add(win, conform);
+
+       return conform;
+}
+
+char *strip_control_char(const char *src_str)
+{
+       retv_if(NULL == src_str, NULL);
+
+       int src_len;
+       src_len = strlen(src_str);
+       retv_if(0 == src_len, NULL);
+
+       char *buffer = (char *)malloc(src_len+1);
+       retv_if(NULL == buffer, NULL);
+
+       int j=0;
+       int i=0;
+
+       for(i=0; i<src_len;++i) {
+               if (src_str[i] == 0x09) {
+                       buffer[j++]= 0x20;      /* convert a tap to a space */
+               } else if ((src_str[i] >= 0x00 && src_str[i] <= 0x1F) || (src_str[i] == 0x7F)) {
+                       continue;               /* remove control charactors */
+               } else {
+                       buffer[j++] = src_str[i];
+               }
+       }
+       buffer[j]=0x00;
+
+       return buffer;
+}
+
+
+Evas_Object* load_edj(Evas_Object *parent, const char *file,   const char *group)
+{
+       Evas_Object *eo;
+       int r;
+
+       eo = elm_layout_add(parent);
+       if (eo) {
+               r = elm_layout_file_set(eo, file, group);
+               if (!r) {
+                       evas_object_del(eo);
+                       return NULL;
+               }
+
+               evas_object_size_hint_align_set( eo, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+               evas_object_size_hint_weight_set(eo,
+                               EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       }
+
+       return eo;
+}
+
+static int n_item=0;
+void _free_item(gpointer data, gpointer user_data)
+{
+       menu_item *item = (menu_item *)data;
+
+       if (item) {
+               free(item);
+               n_item++;
+       }
+}
+
+static void reset_naviframe(SatUiAppData_t *ad)
+{
+       Evas_Object *eo;
+       if (ad->content && ad->navi_it) {
+               elm_object_item_text_set(ad->navi_it, " ");
+               eo = elm_object_part_content_unset(ad->content, "body");
+               evas_object_del(eo);
+               if (ad->popup) {
+                       evas_object_del(ad->popup);
+                       ad->popup = NULL;
+               }
+       }
+       if (ad->back_btn)
+               evas_object_del(ad->back_btn);
+       if (ad->help_btn)
+               evas_object_del(ad->help_btn);
+       if (ad->waiting_bar)
+               evas_object_del(ad->waiting_bar);
+       ad->back_btn = NULL;
+       ad->help_btn = NULL;
+       ad->waiting_bar=NULL;
+}
+
+static Evas_Object* create_naviframe_content_area(void *data)
+{
+       retv_if(NULL == data, NULL );
+
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+       Evas_Object *win = NULL;
+       Evas_Object *lo = NULL;
+       Evas_Object *bg = NULL;
+       Evas_Object *conform = NULL;
+       Evas_Object *naviframe = NULL;
+       Evas_Object *content = NULL;
+       Elm_Object_Item *navi_it = NULL;
+       static Eina_Bool content_init = EINA_FALSE;
+
+       if (ad->popup)
+               evas_object_del(ad->popup);
+
+       if (content_init == EINA_TRUE) {
+               reset_naviframe(ad);
+               return ad->content;
+       }
+
+       if (ad->win_main == NULL) {
+               win = create_win(PACKAGE);
+               ad->win_main = win;
+               retv_if(NULL == ad->win_main, NULL);
+               elm_win_indicator_mode_set(win, ELM_WIN_INDICATOR_SHOW);
+               evas_object_show(win);
+       }
+       bg = create_bg(ad->win_main);
+       evas_object_show(bg);
+
+       conform = create_conformant(ad->win_main);
+       evas_object_show(conform);
+
+       lo = elm_layout_add(conform);
+       if (lo) {
+               ad->layout_main = lo;
+       } else {
+               ad->layout_main = NULL;
+               ERR("Failed elm_layout_add");
+               return NULL;
+       }
+       elm_layout_theme_set( lo, "layout", "application", "default" );
+       evas_object_size_hint_weight_set( lo, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_object_content_set(conform, lo);;
+       edje_object_signal_emit(_EDJ(lo), "elm,state,show,indicator", "elm");
+       evas_object_show( lo );
+
+       naviframe = elm_naviframe_add(lo);
+       if (naviframe) {
+               ad->nf= naviframe;
+       } else {
+               ad->nf= NULL;
+               ERR("elm_naviframe_add fails");
+               return NULL;
+       }
+       elm_object_part_content_set(lo, "elm.swallow.content", naviframe);
+       evas_object_show(naviframe);
+
+       content = load_edj(naviframe, EDJ_NAME, NORMAL_LAYOUT);
+
+       if (content) {
+               ad->content = content;
+       } else {
+               ad->content = NULL;
+               ERR("Failed load_edj");
+               return NULL;
+       }
+
+       evas_object_show(content);
+       navi_it = elm_naviframe_item_push(naviframe, "   ", NULL, NULL, content, NULL);
+       if (navi_it) {
+               ad->navi_it = navi_it;
+       } else {
+               ad->navi_it = NULL;
+               ERR("Failed elm_naviframe_item_push");
+               return NULL;
+       }
+       content_init = EINA_TRUE;
+
+       return content;
+ }
+
+static void user_confirm_resp_ok_cb( void *data, Evas_Object *obj, void *event_info )
+{
+       ret_if(data == NULL);
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       send_ui_user_confirm(ad->cmd_id, ad->cmd_type, TAPI_SAT_USER_CONFIRM_YES, 0, NULL, ad);
+       evas_object_del(ad->popup);
+       ad->popup = NULL;
+}
+
+static void user_confirm_resp_cancel_cb( void *data, Evas_Object *obj, void *event_info )
+{
+       ret_if(data == NULL);
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       send_ui_user_confirm(ad->cmd_id, ad->cmd_type, TAPI_SAT_USER_CONFIRM_NO_OR_CANCEL, 0, NULL, ad);
+       evas_object_del(ad->popup);
+       ad->popup = NULL;
+}
+
+static void user_confirm_resp_timeout_cb( void *data, Evas_Object *obj, void *event_info )
+{
+       ret_if(data == NULL);
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       send_ui_user_confirm(ad->cmd_id, ad->cmd_type, TAPI_SAT_USER_CONFIRM_TIMEOUT, 0, NULL, ad);
+       evas_object_del(ad->popup);
+       ad->popup = NULL;
+}
+
+static void user_confirm_resp_timeout_yes_cb( void *data, Evas_Object *obj, void *event_info )
+{
+       ret_if(data == NULL);
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       send_ui_user_confirm(ad->cmd_id, ad->cmd_type, TAPI_SAT_USER_CONFIRM_YES, 0, NULL, ad);
+       evas_object_del(ad->popup);
+       ad->popup = NULL;
+}
+
+static void user_confirm_refresh_timeout_cb( void *data, Evas_Object *obj, void *event_info )
+{
+       ret_if(data == NULL);
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       send_ui_user_confirm(ad->cmd_id, ad->cmd_type, TAPI_SAT_USER_CONFIRM_TIMEOUT, 0, NULL, ad);
+       evas_object_del(ad->popup);
+       ad->popup = NULL;
+
+       /* Refresh : Delete notification */
+       _satui_delete_notification();
+}
+
+static void user_confirm_reboot_timeout_cb( void *data, Evas_Object *obj, void *event_info )
+{
+       ret_if(data == NULL);
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       send_ui_user_confirm(ad->cmd_id, ad->cmd_type, TAPI_SAT_USER_CONFIRM_TIMEOUT, 0, NULL, ad);
+       evas_object_del(ad->popup);
+       ad->popup = NULL;
+
+       /* Reboot action */
+       sysman_call_predef_action("reboot",0);
+}
+
+static void user_confirm_immediately_cb( void *data, Evas_Object *obj, void *event_info )
+{
+       ret_if(data == NULL);
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       evas_object_del(ad->popup);
+       ad->popup = NULL;
+       ad->is_immediately_resp = EINA_FALSE;
+}
+
+static void play_tone_resp_cancel_cb( void *data, Evas_Object *obj, void *event_info )
+{
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+       TelSatAppsRetInfo_t app_ret_info;
+
+       if (ad->sound_handle >= 0) {
+               DBG("Stop playback");
+               mm_sound_stop_sound(ad->sound_handle);
+               ad->repeat_sound = EINA_FALSE;
+       }
+       app_ret_info.commandType = ad->cmd_type;
+       app_ret_info.commandId = ad->cmd_id;
+       app_ret_info.appsRet.playTone.resp = TAPI_SAT_R_PROACTIVE_SESSION_TERMINATED_BY_USER;
+       send_app_execution_result(&app_ret_info, ad);
+
+       evas_object_del(ad->popup);
+       ad->popup = NULL;
+}
+
+static void play_tone_resp_timeout_cb( void *data, Evas_Object *obj, void *event_info )
+{
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       evas_object_del(ad->popup);
+       ad->popup = NULL;
+}
+
+int on_tapi_event_sat_display_text_ind(void *tapi_data, void *data)
+{
+       retv_if(!tapi_data || !data, -1);
+
+       Evas_Object *win;
+       int ret;
+       int is_idle_on_top;
+       double duration = 0.0;
+       Eina_Bool is_user_resp_required = EINA_FALSE;
+       Eina_Bool is_immediately_resp = EINA_FALSE;
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+       TelSatAppsRetInfo_t app_ret_info;
+
+       TelSatDisplayTextInd_t *display_text_info;
+       display_text_info = (TelSatDisplayTextInd_t *)tapi_data;
+       ad->cmd_id = display_text_info->commandId;
+       ad->cmd_type = TAPI_SAT_CMD_TYPE_DISPLAY_TEXT;
+
+       if ((ad->win_main == NULL)
+               || (elm_win_xwindow_get(ad->win_main) != ecore_x_window_focus_get())) {
+               /* ETSI TS 102 223 6.4.1 The terminal shall reject normal priority text commands if the screen is currently being used for more than its normal
+               stand-by display. If the command is rejected, the terminal informs the UICC using TERMINAL RESPONSE (terminal
+               currently unable to process command - screen busy).*/
+               DBG("text priority=%d (0: Normal, 1:High)", display_text_info->bIsPriorityHigh);
+               if (display_text_info->bIsPriorityHigh == false) {
+                       ret = vconf_get_int(VCONFKEY_IDLE_SCREEN_TOP, &is_idle_on_top);
+                       retv_if(ret < 0, -1);
+                       if (is_idle_on_top == VCONFKEY_IDLE_SCREEN_TOP_FALSE) {
+                               DBG("The ME screen is busy. So the normal text is not displayed");
+                               app_ret_info.commandId = display_text_info->commandId;
+                               app_ret_info.commandType = TAPI_SAT_CMD_TYPE_DISPLAY_TEXT;
+                               app_ret_info.appsRet.displayText.resp = TAPI_SAT_R_ME_UNABLE_TO_PROCESS_COMMAND;
+                               app_ret_info.appsRet.displayText.meProblem = TAPI_SAT_ME_PROBLEM_SCREEN_BUSY;
+                               send_app_execution_result(&app_ret_info, ad);
+                               return 0;
+                       }
+               }
+
+               if (ad->win_main == NULL) {
+                       win = create_win(PACKAGE);
+                       ad->win_main = win;
+                       retv_if(NULL == ad->win_main, -1);
+                       elm_win_indicator_mode_set(win, ELM_WIN_INDICATOR_SHOW);
+                       evas_object_show(win);
+               }
+       } else {
+               DBG("SAT_UI is running so do not check priority");
+       }
+
+       is_user_resp_required = display_text_info->bIsUserRespRequired;
+       is_immediately_resp = display_text_info->b_immediately_resp;
+       DBG("Display text resp required : %d, immediately : %d", is_user_resp_required, is_immediately_resp);
+
+       if (ad->exec_type == LAUNCHED_BY_TELEPHONY)
+               sleep(1);
+
+       if (display_text_info->duration > 0)
+               duration = display_text_info->duration;
+
+       if (is_immediately_resp) {
+               ad->is_immediately_resp = is_immediately_resp;
+               ret = draw_popup_text(ad->win_main, (char *)display_text_info->text.string , RESP_IMMEDIATELY, duration, user_confirm_immediately_cb, NULL, user_confirm_immediately_cb, ad);
+               send_ui_user_confirm(ad->cmd_id, ad->cmd_type, TAPI_SAT_USER_CONFIRM_YES, 0, NULL, ad);
+       } else {
+               if (is_user_resp_required == EINA_FALSE) {
+                       ret = draw_popup_text(ad->win_main, (char *)display_text_info->text.string , RESP_NONE, duration, NULL, NULL, user_confirm_resp_timeout_yes_cb, ad);
+               } else {
+                       ret = draw_popup_text(ad->win_main, (char *)display_text_info->text.string , RESP_OK_CANCEL, duration, user_confirm_resp_ok_cb, user_confirm_resp_cancel_cb, user_confirm_resp_timeout_cb, ad);
+               }
+       }
+
+       retv_if(ret <0, -1);
+       return 0;
+}
+
+
+static int on_tapi_event_sat_ui_info_ind(void *tapi_data, void *data)
+{
+       DBG("func enter");
+
+       retv_if(!tapi_data || !data, -1);
+
+       Evas_Object *win;
+       Evas_Object *icon = NULL;
+       Evas_Smart_Cb ok_cb = NULL;
+       Evas_Smart_Cb cancel_cb = NULL;
+       char buffer[TAPI_SAT_DEF_TEXT_STRING_LEN_MAX];
+       int ret;
+       int resp_type = RESP_NONE;
+
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       TelSatSendUiInfo_t *ui_info = (TelSatSendUiInfo_t *)tapi_data;
+       retv_if(NULL == ui_info, -1);
+
+       DBG("text (%s) text_len(%d)", ui_info->text.string, ui_info->text.stringLen);
+
+       ad->cmd_id = ui_info->commandId;
+       ad->cmd_type = TAPI_SAT_CMD_TYPE_NONE;
+
+       if (ad->win_main == NULL) {
+               win = create_win(PACKAGE);
+               ad->win_main = win;
+               retv_if(NULL == ad->win_main, -1);
+               elm_win_indicator_mode_set(win, ELM_WIN_INDICATOR_SHOW);
+               evas_object_show(win);
+       }
+
+       if (ui_info->text.stringLen > 0) {
+               snprintf(buffer,  sizeof(buffer), "%s",(char *)ui_info->text.string);
+       } else {
+               snprintf(buffer,  sizeof(buffer), "%s", SAT_STR_SENDING);
+       }
+
+       if (ui_info->user_confirm == 1) {
+               DBG("User confirm required");
+               ok_cb = user_confirm_resp_ok_cb;
+               cancel_cb = user_confirm_resp_cancel_cb;
+               resp_type = RESP_OK_CANCEL;
+       }
+
+       if (ui_info->iconId.bIsPresent == EINA_TRUE) {
+               if (ui_info->iconId.iconInfo.ics == TAPI_SAT_SIM_IMAGE_CODING_SCHEME_BASIC) {
+                       icon = convert_iconinfo_to_evas_object(ad, &ui_info->iconId.iconInfo);
+                       retv_if(NULL == icon, -1);
+               }
+
+               if (ui_info->iconId.iconQualifier == TAPI_SAT_ICON_QUALI_SELF_EXPLANATORY) {
+                       ret = draw_popup_text_with_icon(ad->win_main, NULL, icon, resp_type, 0, ok_cb, cancel_cb, user_confirm_resp_timeout_cb, ad);
+               } else {
+                       ret = draw_popup_text_with_icon(ad->win_main, buffer, icon, resp_type, 0, ok_cb, cancel_cb, user_confirm_resp_timeout_cb, ad);
+               }
+       } else {
+               ret = draw_popup_text(ad->win_main, buffer, resp_type, 0, ok_cb, cancel_cb, user_confirm_resp_timeout_cb, ad);
+       }
+
+       /* User confirm : send tel_send_sat_ui_user_confirm */
+       /* No user confirm : send tel_send_sat_ui_display_status */
+       if (ui_info->user_confirm != 1) {
+               if (ret == 0) {
+                       send_ui_display_status(ad->cmd_id, TAPI_SAT_DISPLAY_SUCCESS, ad);
+               } else {
+                       send_ui_display_status(ad->cmd_id, TAPI_SAT_DISPLAY_FAIL, ad);
+               }
+       }
+
+       return 0;
+}
+
+static int on_tapi_event_sat_select_item_ind(void *tapi_data, void *data)
+{
+       retv_if(!tapi_data || !data, -1);
+
+       DBG("func enter");
+       Evas_Object *content;
+       int ret;
+
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+       TelSatSelectItemInd_t *select_item_info;
+
+       if (ad->tapi_data) {
+               free(ad->tapi_data);
+               ad->tapi_data = NULL;
+       }
+
+       select_item_info = (TelSatSelectItemInd_t *)malloc(sizeof(TelSatSelectItemInd_t));
+       retv_if(NULL == select_item_info, -1);
+
+       memcpy(select_item_info, tapi_data, sizeof(TelSatSelectItemInd_t));
+       ad->tapi_data = (void *)select_item_info;
+
+       ad->cmd_id = select_item_info->commandId;
+       ad->cmd_type = TAPI_SAT_CMD_TYPE_SELECT_ITEM;
+       DBG("cmd_id = %d", ad->cmd_id);
+       content = create_naviframe_content_area(ad);
+       retv_if(NULL == content, -1);
+       ret = draw_content_select_item(content, select_item_info, ad);
+       retv_if(ret <0, -1);
+       return 0;
+}
+
+static int on_tapi_event_sat_get_input_ind(void *tapi_data, void *data)
+{
+       retv_if(!tapi_data || !data, -1);
+
+       DBG("func enter");
+       Evas_Object *content;
+       int ret;
+
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+       TelSatGetInputInd_t *get_input_info;
+       get_input_info = (TelSatGetInputInd_t *)tapi_data;
+
+       ad->cmd_id = get_input_info->commandId;
+       ad->cmd_type = TAPI_SAT_CMD_TYPE_GET_INPUT;
+
+       content = create_naviframe_content_area(ad);
+       retv_if(NULL == content, -1);
+       ret = draw_content_get_input(content, get_input_info, ad);
+       retv_if(ret <0, -1);
+       return 0;
+}
+
+
+static int on_tapi_event_sat_get_inkey_ind(void *tapi_data, void *data)
+{
+       retv_if(!tapi_data || !data, -1);
+
+       DBG("func enter");
+       Evas_Object *content;
+       int ret;
+
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       TelSatGetInkeyInd_t *get_inkey_info;
+       get_inkey_info = (TelSatGetInkeyInd_t *)tapi_data;
+
+       ad->cmd_id = get_inkey_info->commandId;
+       ad->cmd_type = TAPI_SAT_CMD_TYPE_GET_INKEY;
+
+       content = create_naviframe_content_area(ad);
+       retv_if(NULL == content, -1);
+       ret = draw_content_get_inkey(content, get_inkey_info, ad);
+       retv_if(ret <0, -1);
+       return 0;
+}
+
+static int on_tapi_event_sat_end_proactive_session_ind(void *tapi_data, void *data)
+{
+       retv_if(!data, -1);
+
+       DBG("func enter");
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+       ad->cmd_id = -1;
+
+       if (ad->is_immediately_resp == EINA_TRUE
+               && ad->cmd_type == TAPI_SAT_CMD_TYPE_DISPLAY_TEXT) {
+               DBG("Suspended popup : Do not action");
+       } else if (ad->exec_type == LAUNCHED_BY_TELEPHONY) {
+               DBG("Exit Program");
+               ad->cmd_type = TAPI_SAT_CMD_TYPE_END_PROACTIVE_SESSION;
+               elm_exit();
+       } else {
+               Evas_Object *content;
+               int ret;
+
+               ad->cmd_type = TAPI_SAT_CMD_TYPE_END_PROACTIVE_SESSION;
+               if (ad->tapi_data) {
+                       free(ad->tapi_data);
+                       ad->tapi_data = NULL;
+               }
+
+               TelSatSetupMenuInfo_t *setup_menu_info;
+               setup_menu_info = (TelSatSetupMenuInfo_t *)malloc(sizeof(TelSatSetupMenuInfo_t));
+               retv_if(NULL == setup_menu_info, -1);
+               ad->tapi_data = (void *)setup_menu_info;
+
+               ret = tel_get_sat_main_menu_info(ad->tapi_handle, setup_menu_info);
+               DBG("title=%s, isUpdated : %d", setup_menu_info->satMainTitle, setup_menu_info->bIsUpdatedSatMainMenu);
+               DBG("num of menu=%d", setup_menu_info->satMainMenuNum);
+               if (ret < 0) {
+                       DBG("tel_get_sat_main_menu_info error(%d). SAT_UI will be terminated", ret);
+                       elm_exit();
+#if 0 /* Remain code for test */
+               else if (setup_menu_info->bIsUpdatedSatMainMenu) {
+                       DBG("Setup menu is updated. SAT_UI will be terminated");
+                       elm_exit();
+#endif
+               } else {
+                       content = create_naviframe_content_area(ad);
+                       draw_content_setup_menu(content, setup_menu_info, ad);
+               }
+       }
+       return 0;
+}
+
+static int on_tapi_event_sat_ui_send_dtmf_ind(void *tapi_data, void *data)
+{
+       retv_if(!data, -1);
+
+       DBG("func enter");
+       Evas_Object *icon = NULL;
+       char buffer[TAPI_SAT_DEF_TEXT_STRING_LEN_MAX];
+       Evas_Object *win;
+       int ret;
+
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       TelSatAppsRetInfo_t app_ret_info;
+       TelSatSendUiInfo_t *ui_send_dtmf_info = NULL;
+
+       ui_send_dtmf_info = (TelSatSendUiInfo_t *)tapi_data;
+       retv_if(NULL == ui_send_dtmf_info, -1);
+
+       ad->cmd_id = ui_send_dtmf_info->commandId;
+       ad->cmd_type = TAPI_SAT_CMD_TYPE_SEND_DTMF;
+
+       DBG("cmd_id = %d", ad->cmd_id);
+
+       int call_state;
+       if (vconf_get_int(VCONFKEY_CALL_STATE, &call_state) < 0) {
+               ERR("vconf_get_int VCONFKEY_CALL_STATE failed");
+               return -1;
+       }
+
+       if ((call_state != VCONFKEY_CALL_VOICE_ACTIVE)
+               && (call_state != VCONFKEY_CALL_VOICE_CONNECTING)) {
+               DBG("DTMF can be sent within a call only");
+               app_ret_info.commandId = ui_send_dtmf_info->commandId;
+               app_ret_info.commandType = TAPI_SAT_CMD_TYPE_SEND_DTMF;
+               app_ret_info.appsRet.sendDtmf.resp = TAPI_SAT_R_ME_UNABLE_TO_PROCESS_COMMAND;
+               tel_send_sat_app_exec_result(ad->tapi_handle, &app_ret_info);
+               return 0;
+       }
+
+       if (ad->win_main == NULL) {
+               win = create_win(PACKAGE);
+               ad->win_main = win;
+               retv_if(NULL == ad->win_main, -1);
+               elm_win_indicator_mode_set(win, ELM_WIN_INDICATOR_SHOW);
+               evas_object_show(win);
+       }
+
+       if (ui_send_dtmf_info->text.stringLen > 0) {
+               snprintf(buffer,  sizeof(buffer), "%s",(char *)ui_send_dtmf_info->text.string);
+               DBG("string = %s", buffer);
+       } else {
+               snprintf(buffer,  sizeof(buffer), "%s", SAT_STR_SENDING);
+       }
+
+       if (ui_send_dtmf_info->iconId.bIsPresent == EINA_TRUE) {
+               if (ui_send_dtmf_info->iconId.iconInfo.ics == TAPI_SAT_SIM_IMAGE_CODING_SCHEME_BASIC) {
+                       icon = convert_iconinfo_to_evas_object(ad, &ui_send_dtmf_info->iconId.iconInfo);
+                       retv_if(NULL == icon, -1);
+               }
+
+               if (ui_send_dtmf_info->iconId.iconQualifier == TAPI_SAT_ICON_QUALI_SELF_EXPLANATORY) {
+                       ret = draw_popup_text_with_icon(ad->win_main, NULL, icon, RESP_NONE, 0, NULL, NULL, user_confirm_resp_timeout_cb, ad);
+               } else {
+                       ret = draw_popup_text_with_icon(ad->win_main, buffer, icon, RESP_NONE, 0, NULL, NULL, user_confirm_resp_timeout_cb, ad);
+               }
+       } else {
+               ret = draw_popup_text(ad->win_main, buffer, RESP_NONE, 0, NULL, NULL, user_confirm_resp_timeout_cb, ad);
+       }
+
+       if (ret == 0) {
+               send_ui_display_status(ad->cmd_id, TAPI_SAT_DISPLAY_SUCCESS, ad);
+       } else {
+               send_ui_display_status(ad->cmd_id, TAPI_SAT_DISPLAY_FAIL, ad);
+       }
+
+       return 0;
+}
+
+static int on_tapi_event_sat_ui_send_ss_ind(void *tapi_data, void *data)
+{
+       retv_if(!data, -1);
+
+       DBG("func enter");
+       Evas_Object *win;
+       Evas_Object *icon = NULL;
+       char buffer[TAPI_SAT_DEF_TEXT_STRING_LEN_MAX];
+       int ret;
+
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       TelSatSendUiInfo_t *ui_send_ss_info = (TelSatSendUiInfo_t *)tapi_data;
+       retv_if(NULL == ui_send_ss_info, -1);
+
+       ad->cmd_id = ui_send_ss_info->commandId;
+       ad->cmd_type = TAPI_SAT_CMD_TYPE_SEND_SS;
+
+       if (ad->win_main == NULL) {
+               win = create_win(PACKAGE);
+               ad->win_main = win;
+               retv_if(NULL == ad->win_main, -1);
+               elm_win_indicator_mode_set(win, ELM_WIN_INDICATOR_SHOW);
+               evas_object_show(win);
+       }
+
+       if (ui_send_ss_info->text.stringLen > 0) {
+               snprintf(buffer,  sizeof(buffer), "%s",(char *)ui_send_ss_info->text.string);
+               DBG("string = %s", buffer);
+       } else {
+               snprintf(buffer,  sizeof(buffer), "%s", SAT_STR_SENDING);
+       }
+
+       if (ui_send_ss_info->iconId.bIsPresent == EINA_TRUE) {
+               if (ui_send_ss_info->iconId.iconInfo.ics == TAPI_SAT_SIM_IMAGE_CODING_SCHEME_BASIC) {
+                       icon = convert_iconinfo_to_evas_object(ad, &ui_send_ss_info->iconId.iconInfo);
+                       retv_if(NULL == icon, -1);
+               }
+
+               if (ui_send_ss_info->iconId.iconQualifier == TAPI_SAT_ICON_QUALI_SELF_EXPLANATORY) {
+                       ret = draw_popup_text_with_icon(ad->win_main, NULL, icon, RESP_NONE, 0, NULL, NULL, user_confirm_resp_timeout_cb, ad);
+               } else {
+                       ret = draw_popup_text_with_icon(ad->win_main, buffer, icon, RESP_NONE, 0, NULL, NULL, user_confirm_resp_timeout_cb, ad);
+               }
+       } else {
+               ret = draw_popup_text(ad->win_main, buffer, RESP_NONE, 0, NULL, NULL, user_confirm_resp_timeout_cb, ad);
+       }
+
+       if (ret == 0) {
+               send_ui_display_status(ad->cmd_id, TAPI_SAT_DISPLAY_SUCCESS, ad);
+       } else {
+               send_ui_display_status(ad->cmd_id, TAPI_SAT_DISPLAY_FAIL, ad);
+       }
+
+       return 0;
+}
+
+static int on_tapi_event_sat_ui_send_ussd_ind(void *tapi_data, void *data)
+{
+       retv_if(!data, -1);
+
+       DBG("func enter");
+       Evas_Object *win;
+       Evas_Object *icon = NULL;
+       char buffer[TAPI_SAT_DEF_TEXT_STRING_LEN_MAX];
+       int ret;
+
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       TelSatSendUiInfo_t *ui_send_ussd_info = (TelSatSendUiInfo_t *)tapi_data;
+       retv_if(NULL == ui_send_ussd_info, -1);
+
+       ad->cmd_id = ui_send_ussd_info->commandId;
+       ad->cmd_type = TAPI_SAT_CMD_TYPE_SEND_USSD;
+
+       if (ad->win_main == NULL) {
+               win = create_win(PACKAGE);
+               ad->win_main = win;
+               retv_if(NULL == ad->win_main, -1);
+               elm_win_indicator_mode_set(win, ELM_WIN_INDICATOR_SHOW);
+               evas_object_show(win);
+       }
+
+       if (ui_send_ussd_info->text.stringLen >0) {
+               snprintf(buffer,  sizeof(buffer), "%s", (char *)ui_send_ussd_info->text.string);
+               DBG("string = %s", buffer);
+       } else {
+               snprintf(buffer,  sizeof(buffer), "%s", SAT_STR_SENDING);
+       }
+
+       if (ui_send_ussd_info->iconId.bIsPresent == EINA_TRUE) {
+               if (ui_send_ussd_info->iconId.iconInfo.ics == TAPI_SAT_SIM_IMAGE_CODING_SCHEME_BASIC) {
+                       icon = convert_iconinfo_to_evas_object(ad, &ui_send_ussd_info->iconId.iconInfo);
+                       retv_if(NULL == icon, -1);
+               }
+
+               if (ui_send_ussd_info->iconId.iconQualifier == TAPI_SAT_ICON_QUALI_SELF_EXPLANATORY) {
+                       ret = draw_popup_text_with_icon(ad->win_main, NULL, icon, RESP_NONE, 0, NULL, NULL, user_confirm_resp_timeout_cb, ad);
+               } else {
+                       ret = draw_popup_text_with_icon(ad->win_main, buffer, icon, RESP_NONE, 0, NULL, NULL, user_confirm_resp_timeout_cb, ad);
+               }
+       } else {
+               ret = draw_popup_text(ad->win_main, buffer, RESP_NONE, 0, NULL, NULL, user_confirm_resp_timeout_cb, ad);
+       }
+
+
+       if (ret == 0) {
+               send_ui_display_status(ad->cmd_id, TAPI_SAT_DISPLAY_SUCCESS, ad);
+       } else {
+               send_ui_display_status(ad->cmd_id, TAPI_SAT_DISPLAY_FAIL, ad);
+       }
+
+       return 0;
+}
+
+static int on_tapi_event_sat_refresh_ind(void *tapi_data, void *data)
+{
+       retv_if(!data, -1);
+
+       DBG("func enter");
+       Evas_Object *win;
+       char buffer[TAPI_SAT_DEF_TEXT_STRING_LEN_MAX];
+       int ret;
+       int duration = 0;
+
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       TelSatRefreshIndUiInfo_t *refresh_info = (TelSatRefreshIndUiInfo_t *)tapi_data;
+       retv_if(NULL == refresh_info, -1);
+
+       ad->cmd_id = refresh_info->commandId;
+       ad->cmd_type = TAPI_SAT_CMD_TYPE_REFRESH;
+       duration = refresh_info->duration;
+
+       if (ad->win_main == NULL) {
+               win = create_win(PACKAGE);
+               ad->win_main = win;
+               retv_if(NULL == ad->win_main, -1);
+               elm_win_indicator_mode_set(win, ELM_WIN_INDICATOR_SHOW);
+               evas_object_show(win);
+       }
+
+       snprintf(buffer,  sizeof(buffer), "%s", SAT_STR_SIM_REFRESHING);
+
+       DBG("reset type : %d, reset duration : %d", refresh_info->refreshType, duration);
+       if (refresh_info->refreshType >= TAPI_SAT_REFRESH_SIM_RESET) {
+               ret = draw_popup_text(ad->win_main, buffer, RESP_NONE, duration, NULL, NULL, user_confirm_reboot_timeout_cb, ad);
+       } else {
+               ret = draw_popup_text(ad->win_main, buffer, RESP_NONE, duration, NULL, NULL, user_confirm_refresh_timeout_cb, ad);
+       }
+
+       if (ret == 0) {
+               send_ui_display_status(ad->cmd_id, TAPI_SAT_DISPLAY_SUCCESS, ad);
+       } else {
+               send_ui_display_status(ad->cmd_id, TAPI_SAT_DISPLAY_FAIL, ad);
+       }
+
+       return 0;
+}
+
+static int on_tapi_event_sat_launch_browser_ind(void *tapi_data, void *data)
+{
+       retv_if(!data, -1);
+
+       DBG("func enter");
+       Evas_Object *win;
+       Evas_Object *icon = NULL;
+       char buffer[TAPI_SAT_DEF_TEXT_STRING_LEN_MAX];
+       int ret;
+
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       TelSatSendUiInfo_t *launch_browser_info = (TelSatSendUiInfo_t *)tapi_data;
+       retv_if(NULL == launch_browser_info, -1);
+
+       ad->cmd_id = launch_browser_info->commandId;
+       ad->cmd_type = TAPI_SAT_CMD_TYPE_LAUNCH_BROWSER;
+
+       if (ad->win_main == NULL) {
+               win = create_win(PACKAGE);
+               ad->win_main = win;
+               retv_if(NULL == ad->win_main, -1);
+               elm_win_indicator_mode_set(win, ELM_WIN_INDICATOR_SHOW);
+               evas_object_show(win);
+       }
+
+       if (launch_browser_info->text.stringLen > 0) {
+               snprintf(buffer, sizeof(buffer), "%s",(char *)launch_browser_info->text.string);
+       } else {
+               snprintf(buffer,  sizeof(buffer), "%s", SAT_STR_LAUNCH_BROWSER_Q);
+       }
+
+       if (launch_browser_info->iconId.bIsPresent == EINA_TRUE) {
+               if (launch_browser_info->iconId.iconInfo.ics == TAPI_SAT_SIM_IMAGE_CODING_SCHEME_BASIC) {
+                       icon = convert_iconinfo_to_evas_object(ad, &launch_browser_info->iconId.iconInfo);
+                       retv_if(NULL == icon, -1);
+               }
+
+               if (launch_browser_info->iconId.iconQualifier == TAPI_SAT_ICON_QUALI_SELF_EXPLANATORY) {
+                       ret = draw_popup_text_with_icon(ad->win_main, NULL, icon, RESP_OK_CANCEL, 0, user_confirm_resp_ok_cb, user_confirm_resp_cancel_cb, user_confirm_resp_timeout_cb, ad);
+               } else {
+                       ret = draw_popup_text_with_icon(ad->win_main, buffer, icon, RESP_OK_CANCEL, 0, user_confirm_resp_ok_cb, user_confirm_resp_cancel_cb, user_confirm_resp_timeout_cb, ad);
+               }
+       } else {
+               ret = draw_popup_text(ad->win_main,buffer, RESP_OK_CANCEL,0, user_confirm_resp_ok_cb, user_confirm_resp_cancel_cb, user_confirm_resp_timeout_cb, ad);
+       }
+
+
+       if (ret == 0) {
+               send_ui_display_status(ad->cmd_id, TAPI_SAT_DISPLAY_SUCCESS, ad);
+       } else {
+               send_ui_display_status(ad->cmd_id, TAPI_SAT_DISPLAY_FAIL, ad);
+       }
+
+       return 0;
+}
+
+static int on_tapi_event_sat_play_tone_ind(void *tapi_data, void *data)
+{
+       retv_if(!data, -1);
+
+       DBG("func enter");
+       Evas_Object *win;
+       Evas_Object *icon = NULL;
+       char buffer[TAPI_SAT_DEF_TEXT_STRING_LEN_MAX];
+       int ret = 0;
+       int duration = 0;
+       char *tone_file = NULL;
+       int handle = 0;;
+
+       retv_if(NULL == tapi_data, -1);
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+       TelSatPlayToneInd_t *play_tone_info;
+       play_tone_info = (TelSatPlayToneInd_t *)tapi_data;
+
+       ad->cmd_id = play_tone_info->commandId;
+       ad->cmd_type = TAPI_SAT_CMD_TYPE_PLAY_TONE;
+       DBG("cmd_id = %d", ad->cmd_id);
+
+       if (ad->win_main == NULL) {
+               win = create_win(PACKAGE);
+               ad->win_main = win;
+               retv_if(NULL == ad->win_main, -1);
+               elm_win_indicator_mode_set(win, ELM_WIN_INDICATOR_SHOW);
+               evas_object_show(win);
+       }
+
+       duration = play_tone_info->duration;
+       if (play_tone_info->text.stringLen > 0) {
+               snprintf(buffer,  sizeof(buffer), "%s", (char *)play_tone_info->text.string);
+       } else {
+               snprintf(buffer,  sizeof(buffer), "%s", SAT_STR_PLAYING_TONE);
+       }
+       DBG("text=%s, duration = %d, tone_type = %d", buffer, duration, play_tone_info->tone.type);
+
+       if (play_tone_info->iconId.bIsPresent == EINA_TRUE) {
+               if (play_tone_info->iconId.iconInfo.ics == TAPI_SAT_SIM_IMAGE_CODING_SCHEME_BASIC) {
+                       icon = convert_iconinfo_to_evas_object(ad, &play_tone_info->iconId.iconInfo);
+                       retv_if(NULL == icon, -1);
+               }
+
+               if (play_tone_info->iconId.iconQualifier == TAPI_SAT_ICON_QUALI_SELF_EXPLANATORY) {
+                       ret = draw_popup_text_with_icon(ad->win_main, NULL, icon, RESP_CANCEL, duration, NULL, play_tone_resp_cancel_cb, play_tone_resp_timeout_cb, ad);
+               } else {
+                       ret = draw_popup_text_with_icon(ad->win_main, buffer, icon, RESP_CANCEL, duration, NULL, play_tone_resp_cancel_cb, play_tone_resp_timeout_cb, ad);
+               }
+       } else {
+               ret = draw_popup_text(ad->win_main, buffer, RESP_CANCEL, duration, NULL, play_tone_resp_cancel_cb, play_tone_resp_timeout_cb, ad);
+       }
+
+       if (ret != 0) {
+               DBG("draw_popup_text is error");
+               send_ui_display_status(ad->cmd_id, TAPI_SAT_DISPLAY_FAIL, ad);
+               return 0;
+       }
+
+       switch(play_tone_info->tone.type) {
+               /* standard supervisory tones */
+               case TAPI_SAT_DIAL_TONE:
+                       tone_file = STK_DIAL_TONE;
+                       break;
+               case TAPI_SAT_CALLED_SUBSCRIBER_BUSY:
+                       tone_file = STK_BUSY_TONE;
+                       break;
+               case TAPI_SAT_CONGESTION:
+                       tone_file = STK_CONGESTION_TONE;
+                       break;
+               case TAPI_SAT_RADIO_PATH_ACK:
+                       tone_file = STK_RADIO_ACK_TONE;
+                       break;
+               case TAPI_SAT_RADIO_PATH_NOT_AVAILABLE_CALL_DROPPED:
+                       tone_file = STK_DROPPED_TONE;
+                       break;
+               case TAPI_SAT_ERR_SPECIAL_INFO:
+                       tone_file = STK_ERROR_TONE;
+                       break;
+               case TAPI_SAT_CALL_WAITING_TONE:
+                       tone_file = STK_WAITING_TONE;
+                       break;
+               case TAPI_SAT_RINGING_TONE:
+                       tone_file = STK_RINGING_TONE;
+                       break;
+
+               /* ME proprietary tones */
+               case TAPI_SAT_GENERAL_BEEP:
+                       tone_file = STK_BEEP_TONE;
+                       break;
+               case TAPI_SAT_POSITIVE_ACK_TONE:
+                       tone_file = STK_POS_ACK_TONE;
+                       break;
+               case TAPI_SAT_NEGATIVE_ACK_OR_ERROR_TONE:
+                       tone_file = STK_NEG_ACK_TONE;
+                       break;
+               default:
+                       tone_file = STK_DIAL_TONE;
+                       break;
+       }
+
+       snprintf(ad->tone_file, sizeof(ad->tone_file), "%s", tone_file);
+       ad->repeat_sound = EINA_TRUE;
+
+       ad->sound_handle = -1;
+       ret = mm_sound_play_sound(tone_file, VOLUME_TYPE_CALL, on_stop_play_tone, ad, &handle);
+       DBG("tone=%s, mm_sound_play_sound =%d, handle=%d", ad->tone_file, ret, handle);
+
+       if (ret == MM_ERROR_NONE) {
+               ad->sound_handle = handle;
+               if(duration > 0) {
+                       double duration_sec = duration / 1000;
+                       ecore_timer_add(duration_sec, on_expired_play_tone_timer, ad);
+               }
+       } else {
+               DBG("mm_sound_play_sound is error");
+               TelSatAppsRetInfo_t app_ret_info;
+
+               if(ad->sound_handle >= 0){
+                       mm_sound_stop_sound(ad->sound_handle);
+                       ad->repeat_sound = EINA_FALSE;
+                       ad->sound_handle = -1;
+               }
+
+               app_ret_info.commandType = ad->cmd_type;
+               app_ret_info.commandId = ad->cmd_id;
+               app_ret_info.appsRet.playTone.resp = TAPI_SAT_R_ME_UNABLE_TO_PROCESS_COMMAND;
+               send_app_execution_result(&app_ret_info, ad);
+       }
+
+       return 0;
+}
+
+int on_tapi_event_sat_idle_mode_text_ind(void *tapi_data, void *data)
+{
+       retv_if(!tapi_data || !data, -1);
+
+       int ret = -1;
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+       TelSatAppsRetInfo_t app_ret_info;
+
+       TelSatSetupIdleModeTextInd_t *idle_mode_info;
+       idle_mode_info = (TelSatSetupIdleModeTextInd_t *)tapi_data;
+       ad->cmd_id = idle_mode_info->commandId;
+       ad->cmd_type = TAPI_SAT_CMD_TYPE_SETUP_IDLE_MODE_TEXT;
+
+       DBG("text length : %d, string : %s", idle_mode_info->text.stringLen, idle_mode_info->text.string);
+       if (idle_mode_info->text.stringLen < 1) {
+               DBG("Text is not proper, delete notification");
+               ret = _satui_delete_notification();
+       } else {
+               _satui_delete_notification();   /* Remove exist noti*/
+               ret = _satui_create_notification((const char *)idle_mode_info->text.string);
+       }
+
+       app_ret_info.commandType = ad->cmd_type;
+       app_ret_info.commandId = ad->cmd_id;
+       if (ret < 0) {
+               DBG("Idle mode text is error");
+               app_ret_info.appsRet.setupIdleModeText.resp = TAPI_SAT_R_ME_UNABLE_TO_PROCESS_COMMAND;
+       } else {
+               app_ret_info.appsRet.setupIdleModeText.resp = TAPI_SAT_R_SUCCESS;
+       }
+       send_app_execution_result(&app_ret_info, ad);
+
+       return 0;
+}
+
+static void on_stop_play_tone(void *data)
+{
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+       if (ad->repeat_sound == EINA_TRUE)
+               ecore_idler_add(on_idle_play_tone, data);
+}
+
+static Eina_Bool on_idle_play_tone(void *data)
+{
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       int ret;
+       int handle;
+       ret = mm_sound_play_sound(ad->tone_file, VOLUME_TYPE_CALL, on_stop_play_tone, ad, &handle);
+       ad->sound_handle = handle;
+
+       return ECORE_CALLBACK_CANCEL;
+}
+
+Eina_Bool on_expired_play_tone_timer(void *data)
+{
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+       TelSatAppsRetInfo_t app_ret_info;
+
+       if (ad->sound_handle >= 0) {
+               DBG("Stop playback");
+               mm_sound_stop_sound(ad->sound_handle);
+               ad->repeat_sound = EINA_FALSE;
+               ad->sound_handle = -1;
+       }
+       app_ret_info.commandType = ad->cmd_type;
+       app_ret_info.commandId = ad->cmd_id;
+       app_ret_info.appsRet.playTone.resp = TAPI_SAT_R_SUCCESS;
+       send_app_execution_result(&app_ret_info, ad);
+
+       return ECORE_CALLBACK_CANCEL;
+}
+
+/* Encode the time information to TP-Service-Centre-Time-Stamp*/
+unsigned char encode_to_tp_scts(unsigned char octet)
+{
+       unsigned char semioctet = 0x00;
+
+       if (octet >= 0x64) {
+               return semioctet;
+       }
+
+       unsigned char rem, quo;
+       rem = octet % 10;
+       quo = octet / 10;
+
+       semioctet = rem << 4;
+       semioctet |= quo;
+
+       return semioctet;
+}
+
+int x_util_get_default_size(double* w, double* h)
+{
+        Display *d;
+        int screen_num;
+
+        d = XOpenDisplay(NULL);
+        if (d == NULL)
+                return -1;
+
+        screen_num = DefaultScreen(d);
+
+        *w = DisplayWidth(d, screen_num);
+        *h = DisplayHeight(d, screen_num);
+
+        DBG ("Root Width = %lf, Height = %lf\n", *w, *h);
+
+        XCloseDisplay(d);
+
+        return 0;
+}
+
+static int app_create(void *data)
+{
+       char buf[MAX_LOCAL_BUF_SIZE];
+       double root_w, root_h;
+       double scale_factor;
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       // get the window size
+       if (x_util_get_default_size(&root_w, &root_h) == 0)
+               scale_factor = root_w / SAT_UI_MAIN_W;
+       else
+               scale_factor = 1.0;
+
+       snprintf(buf,  sizeof(buf), "%lf", scale_factor);
+
+       setenv("ELM_SCALE", buf, 1);
+       setenv("SCALE_FACTOR", buf, 1);
+
+       elm_config_scale_set(scale_factor);
+       DBG("scale_factor = %0.5f", scale_factor);
+
+       int ret = setup_tapi_init(ad);
+       if (ret < 0) {
+               DBG("setup_tapi_init error");
+               return -1;
+       }
+       ad->win_main = NULL;
+       ad->popup = NULL;
+       ad->imf_context = NULL;
+       ad->tapi_data = NULL;
+       /* Default type is LAUNCHED_BY_TELEPHONY */
+       ad->exec_type = LAUNCHED_BY_TELEPHONY;
+
+       return 0;
+}
+
+static int app_terminate(void *data)
+{
+       SatUiAppData_t *ad = data;
+       TelSatAppsRetInfo_t app_ret_info;
+       int ret = 0;
+
+       _satui_geinlist_item_class_free(ad);
+       if (ad->win_main)
+               evas_object_del(ad->win_main);
+
+       DBG("cmd_type = %x", ad->cmd_type);
+       switch(ad->cmd_type)
+       {
+               case TAPI_SAT_CMD_TYPE_SELECT_ITEM:
+               case TAPI_SAT_CMD_TYPE_GET_INKEY:
+               case TAPI_SAT_CMD_TYPE_GET_INPUT:
+               case TAPI_SAT_CMD_TYPE_DISPLAY_TEXT:
+               case TAPI_SAT_CMD_TYPE_SETUP_CALL:
+                       ret = send_ui_user_confirm(ad->cmd_id, ad->cmd_type, TAPI_SAT_USER_CONFIRM_END, 0, NULL, ad);
+                       break;
+               case TAPI_SAT_CMD_TYPE_PLAY_TONE:
+                       app_ret_info.commandType =ad->cmd_type;
+                       app_ret_info.commandId = ad->cmd_id;
+                       app_ret_info.appsRet.playTone.resp = TAPI_SAT_R_PROACTIVE_SESSION_TERMINATED_BY_USER;
+                       ret = send_app_execution_result(&app_ret_info, ad);
+                       break;
+               case TAPI_SAT_CMD_TYPE_LAUNCH_BROWSER:
+                       app_ret_info.commandType =ad->cmd_type;
+                       app_ret_info.commandId = ad->cmd_id;
+                       app_ret_info.appsRet.launchBrowser.resp = TAPI_SAT_R_PROACTIVE_SESSION_TERMINATED_BY_USER;
+                       ret = send_app_execution_result(&app_ret_info, ad);
+                       break;
+               case TAPI_SAT_CMD_TYPE_END_PROACTIVE_SESSION:
+               case TAPI_SAT_CMD_TYPE_NONE:
+               default:
+                       break;
+      }
+
+       if (ad->tapi_data) {
+               free(ad->tapi_data);
+               ad->tapi_data = NULL;
+       }
+
+       tel_deinit(ad->tapi_handle);
+
+       /* Remove recent history when SAT-UI is terminated*/
+       rua_init();
+       rua_delete_history_with_pkgname(SAT_UI_PKG);
+       rua_fini();
+       return ret;
+}
+
+static int app_pause(void *data)
+{
+       return 0;
+}
+
+static int app_resume(void *data)
+{
+       return 0;
+}
+
+static int app_reset(bundle *b, void *data)
+{
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       _satui_geinlist_item_class_new(ad);
+
+       if (b) {
+               int exec_type;
+               char *str_exec = NULL;
+
+               str_exec = (char *)bundle_get_val(b, "KEY_EXEC_TYPE");
+               exec_type = atoi(str_exec);
+
+               DBG("key exec(%d)", exec_type);
+
+               if (exec_type == 0) {
+                       ad->exec_type = exec_type; /* LAUNCHED_BY_MENU */
+                       DBG("processing user input event");
+
+                       Evas_Object *content;
+                       int ret;
+
+                       if (ad->tapi_data) {
+                               free(ad->tapi_data);
+                               ad->tapi_data = NULL;
+                       }
+
+                       TelSatSetupMenuInfo_t *setup_menu_info;
+                       setup_menu_info = (TelSatSetupMenuInfo_t *)malloc(sizeof(TelSatSetupMenuInfo_t));
+                       retv_if(NULL == setup_menu_info, -1);
+                       ret = tel_get_sat_main_menu_info(ad->tapi_handle, setup_menu_info);
+                       ad->tapi_data = (void *)setup_menu_info;
+
+                       DBG("title=%s",setup_menu_info->satMainTitle);
+                       DBG("num of menu=%d",setup_menu_info->satMainMenuNum);
+                       retv_if(ret < 0, -1);
+                       content = create_naviframe_content_area(ad);
+                       ad->cmd_type = TAPI_SAT_CMD_TYPE_NONE;
+                       ad->cmd_id = -1;
+                       draw_content_setup_menu(content, setup_menu_info, ad);
+
+               } else {
+                       int cmd_type;
+                       char *str_cmd = NULL;
+                       void *p_data = NULL, *cmd_data = NULL;
+                       gsize cmd_data_len = 0;
+
+                       DBG("processing telephony event");
+
+                       str_cmd = (char *)bundle_get_val(b, "cmd_type");
+                       DBG("cmd_type str(%s)", str_cmd);
+                       cmd_type = atoi(str_cmd);
+
+                       p_data = (void *)bundle_get_val(b, "data");
+                       if (p_data) {
+                               cmd_data = g_base64_decode(p_data, &cmd_data_len);
+                       }
+
+                       DBG("cmd type(%d) data(%s)", cmd_type, cmd_data);
+                       if (cmd_type == TAPI_SAT_CMD_TYPE_NONE) {
+                               on_tapi_event_sat_ui_info_ind(cmd_data, ad);
+                       } else if (cmd_type == TAPI_SAT_CMD_TYPE_SELECT_ITEM) {
+                               on_tapi_event_sat_select_item_ind(cmd_data, ad);
+                       } else if (cmd_type == TAPI_SAT_CMD_TYPE_DISPLAY_TEXT) {
+                               on_tapi_event_sat_display_text_ind(cmd_data, ad);
+                       } else if (cmd_type == TAPI_SAT_CMD_TYPE_GET_INKEY) {
+                               on_tapi_event_sat_get_inkey_ind(cmd_data, ad);
+                       } else if (cmd_type == TAPI_SAT_CMD_TYPE_GET_INPUT) {
+                               on_tapi_event_sat_get_input_ind(cmd_data, ad);
+                       } else if (cmd_type == TAPI_SAT_CMD_TYPE_END_PROACTIVE_SESSION) {
+                               on_tapi_event_sat_end_proactive_session_ind(cmd_data, ad);
+                       } else if (cmd_type == TAPI_SAT_CMD_TYPE_SEND_DTMF) {
+                               on_tapi_event_sat_ui_send_dtmf_ind(cmd_data, ad);
+                       } else if (cmd_type == TAPI_SAT_CMD_TYPE_SEND_SS) {
+                               on_tapi_event_sat_ui_send_ss_ind(cmd_data, ad);
+                       } else if (cmd_type == TAPI_SAT_CMD_TYPE_SEND_USSD) {
+                                on_tapi_event_sat_ui_send_ussd_ind(cmd_data, ad);
+                       } else if (cmd_type == TAPI_SAT_CMD_TYPE_REFRESH) {
+                               on_tapi_event_sat_refresh_ind(cmd_data, ad);
+                       } else if (cmd_type == TAPI_SAT_CMD_TYPE_LAUNCH_BROWSER) {
+                               on_tapi_event_sat_launch_browser_ind(cmd_data, ad);
+                       } else if (cmd_type == TAPI_SAT_CMD_TYPE_PLAY_TONE) {
+                               on_tapi_event_sat_play_tone_ind(cmd_data, ad);
+                       } else if (cmd_type == TAPI_SAT_CMD_TYPE_SETUP_IDLE_MODE_TEXT) {
+                               on_tapi_event_sat_idle_mode_text_ind(cmd_data, ad);
+                       }
+
+                       if (cmd_data)
+                               g_free(cmd_data);
+               }
+       }
+
+       return 0;
+}
+
+int main(int argc, char *argv[])
+{
+       SatUiAppData_t ad;
+       memset(&ad, 0x0, sizeof(SatUiAppData_t));
+       struct appcore_ops ops = {
+               .create = app_create,
+               .terminate = app_terminate,
+               .pause = app_pause,
+               .resume = app_resume,
+               .reset = app_reset,
+       };
+
+       memset(&ad, 0x0, sizeof(SatUiAppData_t));
+
+       ops.data = &ad;
+
+       appcore_set_i18n(PACKAGE, LOCALEDIR);
+
+       return appcore_efl_main(PACKAGE, &argc, &argv, &ops);
+}
diff --git a/src/select-item-view.c b/src/select-item-view.c
new file mode 100755 (executable)
index 0000000..a1a6c57
--- /dev/null
@@ -0,0 +1,243 @@
+/*
+ * Copyright (c) 2012-2013 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 <stdio.h>
+#include "stdlib.h"
+#include <string.h>
+#include <appcore-efl.h>
+#include <TelSat.h>
+#include <Elementary.h>
+#include "sat-ui-debug.h"
+#include "select-item-view.h"
+#include "sat-ui.h"
+#include "sat-ui-icon.h"
+#include "winset.h"
+#include "tel-request.h"
+#include <libintl.h>
+#include "common_string.h"
+
+
+static void __sat_ui_select_item_destory_object(void *data,Evas *evas, Evas_Object *obj, void *event_info)
+{
+       evas_object_data_del(obj, "app_data");
+       evas_object_data_del(obj, "tapi_data");
+}
+
+static void _gl_sel(void *data, Evas_Object *obj, void *event_info)
+{
+       int index;
+       Evas_Object *waiting_bar;
+
+
+       unsigned char selected_item_id;
+
+       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+       SatUiAppData_t *ad;
+       TelSatSelectItemInd_t *select_item_info;
+
+       ad = (SatUiAppData_t *)evas_object_data_get(obj, "app_data");
+       select_item_info = (TelSatSelectItemInd_t *)evas_object_data_get(obj, "tapi_data");
+
+       if (item) {
+               index = (int)elm_object_item_data_get(item);
+               selected_item_id = select_item_info->menuItem[index].itemId;
+
+               send_ui_user_confirm(select_item_info->commandId,
+                                                       TAPI_SAT_CMD_TYPE_SELECT_ITEM,
+                                                       TAPI_SAT_USER_CONFIRM_YES,
+                                                       sizeof(unsigned char),
+                                                       &selected_item_id, ad);
+       }
+               waiting_bar =  create_waiting_notify(ad->content);
+               ad->waiting_bar = waiting_bar;
+               if (ad->timer) {
+                       ecore_timer_del(ad->timer);
+                       ad->timer = NULL;
+               }
+}
+
+
+static char *_gl_text_get(void *data, Evas_Object *obj, const char *part)
+{
+       int index = (int) data;
+       SatUiAppData_t *ad;
+       TelSatSelectItemInd_t *select_item_info;
+       char *stripped_str;
+
+       ad = (SatUiAppData_t *)evas_object_data_get(obj, "app_data");
+       retv_if(NULL == ad, NULL);
+       select_item_info = (TelSatSelectItemInd_t *)evas_object_data_get(obj, "tapi_data");
+       if (select_item_info->iconIdList.bIsPresent == true &&
+               select_item_info->iconIdList.iconListQualifier == TAPI_SAT_ICON_QUALI_SELF_EXPLANATORY)
+               return NULL;
+       else {
+               stripped_str = strip_control_char((char *)select_item_info->menuItem[index].text);
+               return stripped_str;
+       }
+}
+
+static void on_clicked_help_button(void *data, Evas_Object *obj, void *event_info)
+{
+       int index = (int) data;
+       TelSatSelectItemInd_t *select_item_info;
+       SatUiAppData_t *ad;
+
+       ad = (SatUiAppData_t *)evas_object_data_get(obj, "app_data");
+       ret_if(NULL == ad);
+       select_item_info = (TelSatSelectItemInd_t *)evas_object_data_get(obj, "tapi_data");
+       ret_if(NULL == select_item_info);
+       send_ui_user_confirm(select_item_info->commandId,
+                                       TAPI_SAT_CMD_TYPE_SELECT_ITEM,
+                                       TAPI_SAT_USER_CONFIRM_HELP_INFO,
+                                       sizeof(unsigned char),
+                                       &(select_item_info->menuItem[index].itemId), ad);
+}
+
+static Evas_Object *_gl_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       Evas_Object *btn;
+       SatUiAppData_t *ad;
+       TelSatSelectItemInd_t *select_item_info;
+
+       ad = (SatUiAppData_t *)evas_object_data_get(obj, "app_data");
+       select_item_info = (TelSatSelectItemInd_t *)evas_object_data_get(obj, "tapi_data");
+       retv_if(NULL == ad, NULL);
+
+       if ((!strcmp(part, "elm.icon"))
+               || (!strcmp(part, "elm.icon.2"))) {
+               if (select_item_info->bIsHelpInfoAvailable == true) {
+                       btn = elm_button_add(ad->content);
+                       elm_object_style_set(btn, "info");
+                       evas_object_smart_callback_add(btn, "clicked", on_clicked_help_button, data);
+                       evas_object_event_callback_add(btn, EVAS_CALLBACK_DEL, __sat_ui_select_item_destory_object, NULL);
+                       evas_object_data_set(btn, "app_data",(void *)ad);
+                       evas_object_data_set(btn, "tapi_data",(void *)select_item_info);
+                       evas_object_propagate_events_set(btn, EINA_FALSE);
+                       return btn;
+               }
+       } else if (!strcmp(part, "elm.icon.1")) {
+               if (select_item_info->iconIdList.bIsPresent == true) {
+                       return NULL;
+               }
+       }
+       return NULL;
+}
+
+static void on_clicked_back_btn( void *data, Evas_Object* obj, void* event_info )
+{
+   SatUiAppData_t *ad = (SatUiAppData_t *)data;
+    send_ui_user_confirm(ad->cmd_id, TAPI_SAT_CMD_TYPE_SELECT_ITEM, TAPI_SAT_USER_CONFIRM_NO_OR_CANCEL, 0, NULL, ad);
+    if (ad->timer) {
+               ecore_timer_del(ad->timer);
+               ad->timer = NULL;
+    }
+}
+
+
+static Eina_Bool on_timer_expired(void *data)
+{
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+       if (ad->timer == NULL) {
+               DBG("Cancel timout w/o user_confirm");
+       }else{
+               send_ui_user_confirm(ad->cmd_id, TAPI_SAT_CMD_TYPE_SELECT_ITEM, TAPI_SAT_USER_CONFIRM_TIMEOUT, 0, NULL, ad);
+               ad->timer = NULL;
+       }
+
+       return ECORE_CALLBACK_CANCEL;
+}
+
+int draw_content_select_item(Evas_Object *content, void *tapi_data, void *data)
+{
+       retv_if(NULL == content, -1);
+       retv_if(NULL == tapi_data, -1);
+       retv_if(NULL == data, -1);
+
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+       TelSatSelectItemInd_t *select_item_info = (TelSatSelectItemInd_t *)tapi_data;
+       Evas_Object *l_button;
+       Evas_Object *box;
+       Evas_Object *image;
+       Evas_Object *genlist;
+
+       int index;
+       l_button  = elm_button_add(ad->nf);
+       elm_object_style_set(l_button, "naviframe/end_btn/default");
+       evas_object_smart_callback_add(l_button, "clicked", on_clicked_back_btn, ad);
+       elm_object_item_part_content_set(ad->navi_it, "prev_btn", l_button);
+       ad->back_btn = l_button;
+
+       if (select_item_info->text.stringLen > 0) {
+               elm_object_item_text_set(ad->navi_it, (char *)select_item_info->text.string);
+       }
+
+       box = elm_box_add(ad->nf);
+       elm_box_horizontal_set(box, EINA_FALSE);
+       evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_show(box);
+
+       if (select_item_info->iconId.bIsPresent == true) {
+               DBG(" Select item text: %s", (char *)select_item_info->text.string);
+
+               image = convert_iconinfo_to_evas_object((void *)ad, &select_item_info->iconId.iconInfo);
+
+               if (select_item_info->iconId.iconQualifier == TAPI_SAT_ICON_QUALI_SELF_EXPLANATORY) {
+                       elm_object_item_text_set(ad->navi_it, " ");
+
+               }
+               evas_object_size_hint_align_set(image, 0,0);
+               evas_object_show(image);
+               elm_box_pack_end(box, image);
+       }
+
+       /* Select Item List */
+       ad->itc_text_icon->func.text_get = _gl_text_get;
+       ad->itc_text_icon->func.content_get = _gl_content_get;
+
+       if (select_item_info->iconIdList.bIsPresent == true) {
+               ad->itc_text_icon->item_style= "1text.2icon";
+       } else {
+               ad->itc_text_icon->item_style = "1text.1icon";
+       }
+
+       genlist = elm_genlist_add(content);
+       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);
+       evas_object_show(genlist);
+       evas_object_data_set(genlist, "app_data",(void *)ad);
+       evas_object_data_set(genlist, "tapi_data",(void *)select_item_info);
+       evas_object_event_callback_add(genlist, EVAS_CALLBACK_DEL, __sat_ui_select_item_destory_object, NULL);
+
+       for (index = 0; index < select_item_info->menuItemCount; index++) {
+               elm_genlist_item_append(
+                               genlist,
+                               ad->itc_text_icon,
+                               (void *) index,
+                               NULL,
+                               ELM_GENLIST_ITEM_NONE,
+                               _gl_sel,
+                               NULL
+               );
+       }
+
+       elm_box_pack_end(box, genlist);
+       elm_object_part_content_set(content, "body", box);
+       ad->timer = ecore_timer_add(SELECT_MENU_DURATION, on_timer_expired, ad);
+
+       return 0;
+}
+
+
diff --git a/src/setup-menu-view.c b/src/setup-menu-view.c
new file mode 100755 (executable)
index 0000000..d2aa9b0
--- /dev/null
@@ -0,0 +1,200 @@
+/*
+ * Copyright (c) 2012-2013 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 <stdio.h>
+#include "stdlib.h"
+#include <string.h>
+#include <TelSat.h>
+#include <Elementary.h>
+#include <Evas.h>
+#include <sat-ui-debug.h>
+#include "setup-menu-view.h"
+#include "sat-ui-icon.h"
+#include "sat-ui.h"
+#include "winset.h"
+#include "tel-request.h"
+#include "common_string.h"
+#include <libintl.h>
+
+static void on_clicked_back_btn( void *data, Evas_Object* obj, void* event_info )
+{
+       elm_exit();
+}
+
+static char *_gl_text_get(void *data, Evas_Object *obj, const char *part)
+{
+       int index = (int) data;
+       TelSatSetupMenuInfo_t *setup_menu_info;
+       char *stripped_str;
+
+       setup_menu_info = (TelSatSetupMenuInfo_t *)evas_object_data_get(obj, "tapi_data");
+       if (setup_menu_info->iconIdList.bIsPresent == true &&
+               setup_menu_info->iconIdList.iconListQualifier == TAPI_SAT_ICON_QUALI_SELF_EXPLANATORY)
+               return NULL;
+       else {
+               stripped_str = strip_control_char(setup_menu_info->satMainMenuItem[index].itemString);
+               return stripped_str;
+       }
+}
+
+static void on_clicked_help_button(void *data, Evas_Object *obj, void *event_info)
+{
+       int index = (int) data;
+       SatUiAppData_t *ad;
+       ad = (SatUiAppData_t *)evas_object_data_get(obj, "app_data");
+       TelSatSetupMenuInfo_t *setup_menu_info;
+
+       setup_menu_info = (TelSatSetupMenuInfo_t *)evas_object_data_get(obj, "tapi_data");
+       send_menu_selection_info(ad->tapi_handle, setup_menu_info->satMainMenuItem[index].itemId, true);
+}
+
+static void __sat_ui_setup_menu_destory_object(void *data,Evas *evas, Evas_Object *obj, void *event_info)
+{
+       evas_object_data_del(obj, "app_data");
+       evas_object_data_del(obj, "tapi_data");
+}
+
+static Evas_Object *_gl_content_get(void *data, Evas_Object *obj, const char *part)
+{
+       Evas_Object *btn = NULL;
+       SatUiAppData_t *ad = NULL;
+       TelSatSetupMenuInfo_t *setup_menu_info = NULL;
+
+       ad = (SatUiAppData_t *)evas_object_data_get(obj, "app_data");
+       setup_menu_info = (TelSatSetupMenuInfo_t *)evas_object_data_get(obj, "tapi_data");
+       retv_if(NULL == ad, NULL);
+
+       if ((!strcmp(part, "elm.icon"))
+               || (!strcmp(part, "elm.icon.2"))) {
+               if (setup_menu_info->bIsSatMainMenuHelpInfo == true) {
+                       btn = elm_button_add(ad->content);
+                       elm_object_style_set(btn, "info");
+                       evas_object_smart_callback_add(btn, "clicked", on_clicked_help_button, data);
+                       evas_object_event_callback_add(btn, EVAS_CALLBACK_DEL, __sat_ui_setup_menu_destory_object, NULL);
+                       evas_object_data_set(btn, "app_data",(void *)ad);
+                       evas_object_data_set(btn, "tapi_data",(void *)setup_menu_info);
+                       evas_object_propagate_events_set(btn, EINA_FALSE);
+                       return btn;
+               }
+       } else if (!strcmp(part, "elm.icon.1")) {
+               if (setup_menu_info->iconIdList.bIsPresent == true) {
+                       return NULL;
+               }
+       }
+       return NULL;
+}
+
+static void _gl_sel(void *data, Evas_Object *obj, void *event_info)
+{
+       int index;
+       Evas_Object *waiting_bar;
+       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+       TelSatSetupMenuInfo_t *setup_menu_info;
+       SatUiAppData_t *ad;
+       setup_menu_info = (TelSatSetupMenuInfo_t *)evas_object_data_get(obj, "tapi_data");
+       ad = (SatUiAppData_t *)evas_object_data_get(obj, "app_data");
+       if (item) {
+                       index = (int)elm_object_item_data_get(item);
+                       send_menu_selection_info(ad->tapi_handle, setup_menu_info->satMainMenuItem[index].itemId, false);
+       }
+       waiting_bar = create_waiting_notify(ad->content);
+       ad->waiting_bar = waiting_bar;
+       if (ad->timer) {
+               ecore_timer_del(ad->timer);
+               ad->timer = NULL;
+       }
+}
+
+int draw_content_setup_menu(Evas_Object* content, void *tapi_data, void *data)
+{
+       retv_if(NULL == content, -1);
+       retv_if(NULL == tapi_data, -1);
+       retv_if(NULL == data, -1);
+
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+       TelSatSetupMenuInfo_t *setup_menu_info = (TelSatSetupMenuInfo_t *)tapi_data;
+
+       int index;
+       Evas_Object *box;
+       Evas_Object *genlist;
+       Evas_Object *image;
+       Evas_Object *l_button;
+
+       l_button  = elm_button_add(ad->nf);
+       elm_object_style_set(l_button, "naviframe/end_btn/default");
+       evas_object_smart_callback_add(l_button, "clicked", on_clicked_back_btn, NULL);
+       elm_object_item_part_content_set(ad->navi_it, "prev_btn", l_button);
+       ad->back_btn = l_button;
+
+       /* Title */
+       if (strlen(setup_menu_info->satMainTitle) > 0)
+               elm_object_item_text_set(ad->navi_it, (char *)setup_menu_info->satMainTitle);
+
+       box = elm_box_add(ad->nf);
+
+       elm_box_horizontal_set(box, EINA_FALSE);
+       evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_show(box);
+
+       /* Icon */
+       if (setup_menu_info->iconId.bIsPresent == true) {
+               image = convert_iconinfo_to_evas_object((void *)ad, &setup_menu_info->iconId.iconInfo);
+
+               if (setup_menu_info->iconIdList.iconListQualifier == TAPI_SAT_ICON_QUALI_SELF_EXPLANATORY) {
+                       elm_object_item_text_set(ad->navi_it, "  ");
+               }
+               evas_object_size_hint_align_set(image, 0,0);
+               evas_object_show(image);
+               elm_box_pack_end(box, image);
+       }
+
+       /* Main Menu List */
+       ad->itc_text_icon->func.text_get = _gl_text_get;
+       ad->itc_text_icon->func.content_get = _gl_content_get;
+
+       if (setup_menu_info->iconIdList.bIsPresent == true) {
+               ad->itc_text_icon->item_style = "1text.2icon";
+       } else {
+               ad->itc_text_icon->item_style = "1text.1icon";
+       }
+
+       genlist = elm_genlist_add(ad->nf);
+       retv_if(NULL == genlist, -1);
+       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);
+       evas_object_show(genlist);
+       evas_object_data_set(genlist, "tapi_data",(void *)setup_menu_info);
+       evas_object_data_set(genlist, "app_data",(void *)ad);
+       evas_object_event_callback_add(genlist, EVAS_CALLBACK_DEL, __sat_ui_setup_menu_destory_object,NULL);
+
+       for (index = 0; index < setup_menu_info->satMainMenuNum; index++) {
+               elm_genlist_item_append(
+                               genlist,
+                               ad->itc_text_icon,
+                               (void *) index,
+                               NULL,
+                               ELM_GENLIST_ITEM_NONE,
+                               _gl_sel,
+                               NULL
+               );
+       }
+
+       elm_box_pack_end(box, genlist);
+       elm_object_part_content_set(content, "body", box);
+
+       return 0;
+}
+
diff --git a/src/tel-request.c b/src/tel-request.c
new file mode 100755 (executable)
index 0000000..58f7e28
--- /dev/null
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2012-2013 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 "tel-request.h"
+#include "sat-ui-debug.h"
+#include "sat-ui.h"
+#include <stdbool.h>
+
+int setup_tapi_init(void *data)
+{
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       if (ad->tapi_handle) {
+               DBG("tapi_handle is already exist");
+       } else {
+               ad->tapi_handle = tel_init(NULL);
+
+               if(ad->tapi_handle == NULL) {
+                       DBG("tapi_init() error!! tapi_handle is NULL");
+                       return -1;
+               }
+       }
+
+       return 0;
+}
+
+int send_app_execution_result(TelSatAppsRetInfo_t *app_ret_info, void *data)
+{
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+       TapiResult_t ret;
+
+       ret = tel_send_sat_app_exec_result(ad->tapi_handle, app_ret_info);
+       if(ret == TAPI_API_SUCCESS)
+               return 0;
+       else
+               return -1;
+}
+
+int send_ui_display_status(int cmd_id, TelSatUiDisplayStatusType_t ui_display_status_info, void *data)
+{
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+       TapiResult_t tapi_ret;
+
+       tapi_ret = tel_send_sat_ui_display_status(ad->tapi_handle, cmd_id, ui_display_status_info);
+       retvm_if(tapi_ret != TAPI_API_SUCCESS, -1, "TAPI_ERROR\n");
+
+       return 0;
+}
+
+static void on_resp_select_menu(TapiHandle *handle, int result, void *data, void *user_data)
+{
+       DBG("");
+       DBG("select menu item result(%d)", result);
+}
+
+int satui_send_menu_selection_env(TapiHandle *handle, TelSatMenuSelectionReqInfo_t *menu_selection_req_info)
+{
+       TapiResult_t tapi_ret;
+
+       //tapi_ret = tel_select_sat_menu(menu_selection_req_info, &request_id);
+       tapi_ret = tel_select_sat_menu(handle, menu_selection_req_info, on_resp_select_menu, NULL);
+       retvm_if(tapi_ret != TAPI_API_SUCCESS, false, "TAPI_ERROR\n");
+       return 1;
+}
+
+int send_menu_selection_info(TapiHandle *handle, char item_id, int bIsRequestingHelpText)
+{
+       TapiResult_t tapi_ret;
+
+       TelSatMenuSelectionReqInfo_t menu_selection_info;
+
+       menu_selection_info.itemIdentifier = item_id;
+       menu_selection_info.bIsHelpRequested = bIsRequestingHelpText;
+       tapi_ret = tel_select_sat_menu(handle, &menu_selection_info, on_resp_select_menu, NULL);
+
+       return tapi_ret;
+}
+
+
+int send_ui_user_confirm(int cmd_id, int cmd_type, int key_type, int data_len, void *data, void *app_data)
+{
+
+       TapiResult_t tapi_ret;
+       SatUiAppData_t *ad = (SatUiAppData_t *)app_data;
+
+       TelSatUiUserConfirmInfo_t user_confirm_info;
+       memset(&user_confirm_info, 0, sizeof(TelSatUiUserConfirmInfo_t));
+       user_confirm_info.commandId = cmd_id;
+       user_confirm_info.commandType = cmd_type;
+       user_confirm_info.keyType = key_type;
+       user_confirm_info.pAdditionalData = (unsigned char *)data;
+       user_confirm_info.dataLen = data_len;
+       DBG("cmd_id(%d), cmd_type(%d), key_type(%d), data_len(%d)", cmd_id, cmd_type, key_type, data_len);
+
+       tapi_ret = tel_send_sat_ui_user_confirm(ad->tapi_handle, &user_confirm_info);
+
+       DBG("tel_send_sat_ui_user_confirm return =%d", tapi_ret);
+
+       if(tapi_ret == TAPI_API_SUCCESS)
+               return 0;
+       else
+               return -1;
+}
+
+
diff --git a/src/winset.c b/src/winset.c
new file mode 100755 (executable)
index 0000000..a51b444
--- /dev/null
@@ -0,0 +1,130 @@
+/*
+ * Copyright (c) 2012-2013 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 "sat-ui-debug.h"
+#include "sat-ui.h"
+#include "winset.h"
+#include <Elementary.h>
+#include <Evas.h>
+#include "common_string.h"
+#include <notification.h>
+
+Evas_Object *create_waiting_notify(Evas_Object *parent)
+{
+       Evas_Object *selectioninfo;
+       Evas_Object *selectioninfo_layout;
+       Evas_Object *layout;
+       selectioninfo = elm_notify_add(parent);
+       elm_notify_align_set(selectioninfo, ELM_NOTIFY_ALIGN_FILL, 1.0);
+       // selectioninfo layout add
+       selectioninfo_layout = elm_layout_add(parent);
+       elm_layout_theme_set(selectioninfo_layout, "standard", "selectioninfo", "default");
+       elm_object_content_set(selectioninfo, selectioninfo_layout);
+       layout=elm_layout_edje_get(selectioninfo_layout);
+       edje_object_part_text_set(layout, "elm.text", SAT_STR_PLEASE_WAIT);
+       evas_object_show(selectioninfo);
+       evas_object_data_set(parent, "selectioninfo",selectioninfo);
+
+       return selectioninfo;
+}
+
+void _satui_geinlist_item_class_new(void *data)
+{
+       ret_if(data == NULL);
+
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       ad->itc_text_icon = elm_genlist_item_class_new();
+       ad->itc_no_edit_text = elm_genlist_item_class_new();
+       ad->itc_editfield_icon = elm_genlist_item_class_new();
+       ad->itc_ok_icon = elm_genlist_item_class_new();
+       ad->itc_help_icon = elm_genlist_item_class_new();
+       ad->itc_2icon = elm_genlist_item_class_new();
+}
+
+void _satui_geinlist_item_class_free(void *data)
+{
+       ret_if(data == NULL);
+
+       SatUiAppData_t *ad = (SatUiAppData_t *)data;
+
+       if (ad->itc_text_icon)
+               elm_genlist_item_class_free(ad->itc_text_icon);
+       if (ad->itc_no_edit_text)
+               elm_genlist_item_class_free(ad->itc_no_edit_text);
+       if (ad->itc_editfield_icon)
+               elm_genlist_item_class_free(ad->itc_editfield_icon);
+       if (ad->itc_ok_icon)
+               elm_genlist_item_class_free(ad->itc_ok_icon);
+       if (ad->itc_help_icon)
+               elm_genlist_item_class_free(ad->itc_help_icon);
+       if (ad->itc_2icon)
+               elm_genlist_item_class_free(ad->itc_2icon);
+}
+
+int _satui_create_notification(const char *string)
+{
+       int ret = -1;
+       notification_h noti = NULL;
+       notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+       noti = notification_new(NOTIFICATION_TYPE_ONGOING, NOTIFICATION_GROUP_ID_NONE, NOTIFICATION_PRIV_ID_NONE);
+       if (noti == NULL) {
+               DBG("notification_new error");
+       } else {
+               noti_err = notification_set_title(noti, string, NULL);
+               if (noti_err != NOTIFICATION_ERROR_NONE) {
+                       DBG("Fail to notification_set_title : %d", noti_err);
+               } else {
+                       noti_err = notification_insert(noti, NULL);
+                       if (noti_err != NOTIFICATION_ERROR_NONE) {
+                               DBG("Fail to notification_insert : %d", noti_err);
+                       } else {
+                               ret = 0;
+                       }
+
+                       noti_err = notification_set_property(noti, NOTIFICATION_PROP_DISABLE_APP_LAUNCH);
+                       if(noti_err != NOTIFICATION_ERROR_NONE) {
+                               DBG("Fail to notification_set_property : %d", noti_err);
+                               ret = -1;
+                       }
+               }
+
+               noti_err = notification_free(noti);
+               if (noti_err != NOTIFICATION_ERROR_NONE) {
+                       DBG("Fail to notification_free : %d", noti_err);
+                       ret = -1;
+               }
+       }
+
+       return ret;
+}
+
+int _satui_delete_notification(void)
+{
+       int ret = -1;
+       notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+       noti_err = notification_delete_all_by_type(NULL, NOTIFICATION_TYPE_ONGOING);
+       if (noti_err != NOTIFICATION_ERROR_NONE) {
+               DBG("Fail to nofication_delete_all_by_type : %d", noti_err);
+       } else {
+               ret = 0;
+       }
+
+       return ret;
+}
+