Code Sync up from tizen_2.4 06/36906/2
authorDongchul Lim <dc7.lim@samsung.com>
Tue, 17 Mar 2015 04:40:24 +0000 (13:40 +0900)
committerDongchul Lim <dc7.lim@samsung.com>
Tue, 17 Mar 2015 08:41:18 +0000 (17:41 +0900)
Change-Id: Iee844a4f9c9cfb400a5b99542178f574d9e30320

90 files changed:
.gitignore [deleted file]
AUTHORS
CMakeLists.txt
LICENSE
doc/README.txt [deleted file]
doc/libtapi_doc.h [new file with mode: 0644]
include/ITapiCall.h [new file with mode: 0644]
include/ITapiModem.h [new file with mode: 0644]
include/ITapiNetText.h [new file with mode: 0644]
include/ITapiNetwork.h [new file with mode: 0644]
include/ITapiPhonebook.h [new file with mode: 0644]
include/ITapiSap.h [new file with mode: 0644]
include/ITapiSat.h [new file with mode: 0644]
include/ITapiSim.h [new file with mode: 0644]
include/ITapiSs.h [new file with mode: 0644]
include/TapiUtility.h [new file with mode: 0644]
include/TelCall.h [new file with mode: 0644]
include/TelMisc.h [new file with mode: 0644]
include/TelNetwork.h [new file with mode: 0644]
include/TelPower.h [new file with mode: 0644]
include/TelSat.h [new file with mode: 0644]
include/TelSatEnvelope.h [new file with mode: 0644]
include/TelSatObj.h [new file with mode: 0644]
include/TelSatProactvCmd.h [new file with mode: 0644]
include/TelSim.h [new file with mode: 0644]
include/TelSms.h [new file with mode: 0644]
include/TelSs.h [new file with mode: 0644]
include/private/tapi_log.h [deleted file]
include/private/tapi_private.h [deleted file]
include/tapi.h [deleted file]
include/tapi_call.h [deleted file]
include/tapi_common.h [new file with mode: 0644]
include/tapi_event.h [new file with mode: 0644]
include/tapi_events.h [deleted file]
include/tapi_gps.h [deleted file]
include/tapi_modem.h [deleted file]
include/tapi_network.h [deleted file]
include/tapi_phonebook.h [deleted file]
include/tapi_sap.h [deleted file]
include/tapi_sat.h [deleted file]
include/tapi_sim.h [deleted file]
include/tapi_sms.h [deleted file]
include/tapi_ss.h [deleted file]
include/tapi_type.h [new file with mode: 0644]
libtapi.manifest [new file with mode: 0644]
packaging/libtapi.manifest [deleted file]
packaging/libtapi.spec [new file with mode: 0644]
packaging/libtapi3.spec [deleted file]
src/common.h [new file with mode: 0644]
src/tapi_call.c
src/tapi_common.c
src/tapi_event.c [deleted file]
src/tapi_gps.c [deleted file]
src/tapi_log.h [new file with mode: 0644]
src/tapi_modem.c
src/tapi_network.c
src/tapi_phonebook.c
src/tapi_sap.c
src/tapi_sat.c
src/tapi_sim.c
src/tapi_sms.c
src/tapi_ss.c
tapi-3.0.pc.in [deleted file]
tapi.pc.in [new file with mode: 0644]
test_src/CMakeLists.txt
test_src/call.c [changed mode: 0755->0644]
test_src/call.h
test_src/gps.c [deleted file]
test_src/gps.h [deleted file]
test_src/main.c
test_src/menu.c
test_src/menu.h
test_src/modem.c [changed mode: 0755->0644]
test_src/modem.h
test_src/network.c
test_src/network.h
test_src/phonebook.c
test_src/phonebook.h
test_src/sat.c
test_src/sat.h
test_src/sim.c [changed mode: 0755->0644]
test_src/sim.h
test_src/sms.c [changed mode: 0755->0644]
test_src/sms.h
test_src/sms_util.c
test_src/sms_util.h
test_src/sms_util_cdma.c [new file with mode: 0644]
test_src/sms_util_cdma.h [new file with mode: 0644]
test_src/ss.c
test_src/ss.h

diff --git a/.gitignore b/.gitignore
deleted file mode 100644 (file)
index 63619be..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-#Copyright (c) 2013 GitHub, Inc.
-#
-#Permission is hereby granted,  free of charge,  to any person obtaining a
-#copy of this software and associated documentation files (the "Software"),
-#to deal in the Software without restriction, including without limitation
-#the rights to  use, copy, modify, merge, publish, distribute, sublicense,
-#and/or sell copies of the Software, and to permit persons to whom the
-#Software is furnished to do so, subject to the following conditions:
-#
-#The above copyright notice and this permission notice shall be included in
-#all copies or substantial portions of the Software.
-#
-#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-#FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-#DEALINGS IN THE SOFTWARE.
-#
-# https://github.com/github/gitignore
-
-# Object files
-*.o
-
-# Libraries
-*.lib
-*.a
-
-# Shared objects (inc. Windows DLLs)
-*.dll
-*.so
-*.so.*
-*.dylib
-
-# Executables
-*.exe
-*.out
-*.app
-
-# CMake
-CMakeCache.txt
-CMakeFiles
-Makefile
-cmake_install.cmake
-install_manifest.txt
-
-# Emacs
-*~
-\#*\#
-/.emacs.desktop
-/.emacs.desktop.lock
-.elc
-auto-save-list
-tramp
-.\#*
-
-# Org-mode
-.org-id-locations
-*_archive
-
-# Linux
-.*
-!.gitignore
-*~
-
-# Vim
-*.s[a-w][a-z]
-*.un~
-Session.vim
-.netrwhist
-*~
-
-# Eclipse
-*.pydevproject
-.project
-.metadata
-bin/**
-tmp/**
-tmp/**/*
-*.tmp
-*.bak
-*.swp
-*~.nib
-local.properties
-.classpath
-.settings/
-.loadpath
-
-# External tool builders
-.externalToolBuilders/
-
-# Locally stored "Eclipse launch configurations"
-*.launch
-
-# CDT-specific
-.cproject
-
-# PDT-specific
-.buildpath
diff --git a/AUTHORS b/AUTHORS
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..b9eed621a6a7e9e5f8655964ed3d2804e52343d0 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -0,0 +1,5 @@
+Jongman Park <jman.park@samsung.com>
+Danny Jeongseok Seo <s.seo@samsung.com>
+Kyeongchul Kim <kyeongchul.kim@samsung.com>
+Youngman Park <youngman.park@samsung.com>
+Inho Oh <inho48.oh@samsung.com>
index 4e3703e0450cea39a96dc0717c1608d3358814ea..7dfc9a3afd431feb5b474dd0e3211bc9b12653a2 100644 (file)
@@ -1,63 +1,62 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(tapi-3.0 C)
+PROJECT(SLP-tapi C)
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-SET(EXEC_PREFIX ${CMAKE_INSTALL_BINDIR})
-SET(LIBDIR ${CMAKE_INSTALL_LIBDIR})
-SET(INCLUDEDIR ${INCLUDE_INSTALL_DIR})
-SET(TAPI_VERSION ${TAPI_VERSION})
+SET(EXEC_PREFIX "\${prefix}")
+SET(LIBDIR "\${prefix}/lib")
+SET(INCLUDEDIR "\${prefix}/include")
 
 # Set required packages
 INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED glib-2.0 gio-unix-2.0 dlog security-server tel-headers)
+pkg_check_modules(pkgs REQUIRED glib-2.0 gio-2.0 gthread-2.0 dlog security-server)
 
 FOREACH(flag ${pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wextra -Wall -Wno-unused-parameter -Wno-missing-field-initializers")
+SET(EXTRA_CFLAGS "${EXTRA_CFLAGS}  -Wl,-zdefs -fvisibility=hidden ")
 
-#Garbage collection - Unused code
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdata-sections -ffunction-sections -Wl,--gc-sections")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Werror -Wextra -Wno-missing-field-initializers -Wmissing-declarations -Wredundant-decls -O2 -Wall -Wno-array-bounds -Wno-empty-body -Wno-ignored-qualifiers -Wno-unused-parameter -Wwrite-strings -Wswitch-default -Wno-unused-but-set-variable ")
 
-INCLUDE_DIRECTORIES(
-       ${CMAKE_BINARY_DIR}
-       ${CMAKE_SOURCE_DIR}/include
-       ${CMAKE_SOURCE_DIR}/include/private
-)
+#SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed")
+
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/src)
 
 ADD_DEFINITIONS("-DFEATURE_DLOG_DEBUG")
 ADD_DEFINITIONS("-DTAPI_LOG_TAG=\"LIBTAPI\"")
-ADD_DEFINITIONS("-DEXPORT_API=__attribute__((visibility(\"default\")))")
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+ADD_DEFINITIONS(" -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\" ")
 
 MESSAGE(${CMAKE_C_FLAGS})
 MESSAGE(${CMAKE_EXE_LINKER_FLAGS})
 
 ### Build ###
 SET(SRCS
-       src/tapi_common.c
-       src/tapi_event.c
-       src/tapi_modem.c
-       src/tapi_call.c
-       src/tapi_network.c
-       src/tapi_sim.c
-       src/tapi_phonebook.c
-       src/tapi_sap.c
-       src/tapi_ss.c
-       src/tapi_sms.c
-       src/tapi_sat.c
-       src/tapi_gps.c
+               src/tapi_common.c
+               src/tapi_network.c
+               src/tapi_sim.c
+               src/tapi_phonebook.c
+               src/tapi_sap.c
+               src/tapi_call.c
+               src/tapi_ss.c
+               src/tapi_sms.c
+               src/tapi_sat.c
+               src/tapi_modem.c
 )
 
-ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
-SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION 0.0.0 SOVERSION 0 OUTPUT_NAME ${PROJECT_NAME})
+ADD_LIBRARY(SLP-tapi SHARED ${SRCS})
+TARGET_LINK_LIBRARIES(SLP-tapi ${pkgs_LDFLAGS})
+SET_TARGET_PROPERTIES(SLP-tapi PROPERTIES VERSION 0.0.0 SOVERSION 0 OUTPUT_NAME SLP-tapi)
 
 # pkgconfig file
-CONFIGURE_FILE(tapi-3.0.pc.in tapi-3.0.pc @ONLY)
-
-INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ DESTINATION include/tapi-3.0)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/tapi-3.0.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR} COMPONENT Runtime)
-
-ADD_SUBDIRECTORY(test_src)
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+CONFIGURE_FILE(tapi.pc.in tapi.pc @ONLY)
+
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ DESTINATION include/telephony-client)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/tapi.pc DESTINATION lib/pkgconfig)
+INSTALL(TARGETS SLP-tapi DESTINATION lib COMPONENT Runtime)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME libslp-tapi)
+IF (TIZEN_ENGINEER_MODE)
+       ADD_SUBDIRECTORY(test_src)
+ENDIF (TIZEN_ENGINEER_MODE)
diff --git a/LICENSE b/LICENSE
index d9a10c0d8e868ebf8da0b3dc95bb0be634c34bfe..9c13a9b68d4e48276d504b9caed8dff81b5547e6 100644 (file)
--- a/LICENSE
+++ b/LICENSE
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
+Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+\r
+                                 Apache License\r
+                           Version 2.0, January 2004\r
+                        http://www.apache.org/licenses/\r
+\r
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\r
+\r
+   1. Definitions.\r
+\r
+      "License" shall mean the terms and conditions for use, reproduction,\r
+      and distribution as defined by Sections 1 through 9 of this document.\r
+\r
+      "Licensor" shall mean the copyright owner or entity authorized by\r
+      the copyright owner that is granting the License.\r
+\r
+      "Legal Entity" shall mean the union of the acting entity and all\r
+      other entities that control, are controlled by, or are under common\r
+      control with that entity. For the purposes of this definition,\r
+      "control" means (i) the power, direct or indirect, to cause the\r
+      direction or management of such entity, whether by contract or\r
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the\r
+      outstanding shares, or (iii) beneficial ownership of such entity.\r
+\r
+      "You" (or "Your") shall mean an individual or Legal Entity\r
+      exercising permissions granted by this License.\r
+\r
+      "Source" form shall mean the preferred form for making modifications,\r
+      including but not limited to software source code, documentation\r
+      source, and configuration files.\r
+\r
+      "Object" form shall mean any form resulting from mechanical\r
+      transformation or translation of a Source form, including but\r
+      not limited to compiled object code, generated documentation,\r
+      and conversions to other media types.\r
+\r
+      "Work" shall mean the work of authorship, whether in Source or\r
+      Object form, made available under the License, as indicated by a\r
+      copyright notice that is included in or attached to the work\r
+      (an example is provided in the Appendix below).\r
+\r
+      "Derivative Works" shall mean any work, whether in Source or Object\r
+      form, that is based on (or derived from) the Work and for which the\r
+      editorial revisions, annotations, elaborations, or other modifications\r
+      represent, as a whole, an original work of authorship. For the purposes\r
+      of this License, Derivative Works shall not include works that remain\r
+      separable from, or merely link (or bind by name) to the interfaces of,\r
+      the Work and Derivative Works thereof.\r
+\r
+      "Contribution" shall mean any work of authorship, including\r
+      the original version of the Work and any modifications or additions\r
+      to that Work or Derivative Works thereof, that is intentionally\r
+      submitted to Licensor for inclusion in the Work by the copyright owner\r
+      or by an individual or Legal Entity authorized to submit on behalf of\r
+      the copyright owner. For the purposes of this definition, "submitted"\r
+      means any form of electronic, verbal, or written communication sent\r
+      to the Licensor or its representatives, including but not limited to\r
+      communication on electronic mailing lists, source code control systems,\r
+      and issue tracking systems that are managed by, or on behalf of, the\r
+      Licensor for the purpose of discussing and improving the Work, but\r
+      excluding communication that is conspicuously marked or otherwise\r
+      designated in writing by the copyright owner as "Not a Contribution."\r
+\r
+      "Contributor" shall mean Licensor and any individual or Legal Entity\r
+      on behalf of whom a Contribution has been received by Licensor and\r
+      subsequently incorporated within the Work.\r
+\r
+   2. Grant of Copyright License. Subject to the terms and conditions of\r
+      this License, each Contributor hereby grants to You a perpetual,\r
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r
+      copyright license to reproduce, prepare Derivative Works of,\r
+      publicly display, publicly perform, sublicense, and distribute the\r
+      Work and such Derivative Works in Source or Object form.\r
+\r
+   3. Grant of Patent License. Subject to the terms and conditions of\r
+      this License, each Contributor hereby grants to You a perpetual,\r
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r
+      (except as stated in this section) patent license to make, have made,\r
+      use, offer to sell, sell, import, and otherwise transfer the Work,\r
+      where such license applies only to those patent claims licensable\r
+      by such Contributor that are necessarily infringed by their\r
+      Contribution(s) alone or by combination of their Contribution(s)\r
+      with the Work to which such Contribution(s) was submitted. If You\r
+      institute patent litigation against any entity (including a\r
+      cross-claim or counterclaim in a lawsuit) alleging that the Work\r
+      or a Contribution incorporated within the Work constitutes direct\r
+      or contributory patent infringement, then any patent licenses\r
+      granted to You under this License for that Work shall terminate\r
+      as of the date such litigation is filed.\r
+\r
+   4. Redistribution. You may reproduce and distribute copies of the\r
+      Work or Derivative Works thereof in any medium, with or without\r
+      modifications, and in Source or Object form, provided that You\r
+      meet the following conditions:\r
+\r
+      (a) You must give any other recipients of the Work or\r
+          Derivative Works a copy of this License; and\r
+\r
+      (b) You must cause any modified files to carry prominent notices\r
+          stating that You changed the files; and\r
+\r
+      (c) You must retain, in the Source form of any Derivative Works\r
+          that You distribute, all copyright, patent, trademark, and\r
+          attribution notices from the Source form of the Work,\r
+          excluding those notices that do not pertain to any part of\r
+          the Derivative Works; and\r
+\r
+      (d) If the Work includes a "NOTICE" text file as part of its\r
+          distribution, then any Derivative Works that You distribute must\r
+          include a readable copy of the attribution notices contained\r
+          within such NOTICE file, excluding those notices that do not\r
+          pertain to any part of the Derivative Works, in at least one\r
+          of the following places: within a NOTICE text file distributed\r
+          as part of the Derivative Works; within the Source form or\r
+          documentation, if provided along with the Derivative Works; or,\r
+          within a display generated by the Derivative Works, if and\r
+          wherever such third-party notices normally appear. The contents\r
+          of the NOTICE file are for informational purposes only and\r
+          do not modify the License. You may add Your own attribution\r
+          notices within Derivative Works that You distribute, alongside\r
+          or as an addendum to the NOTICE text from the Work, provided\r
+          that such additional attribution notices cannot be construed\r
+          as modifying the License.\r
+\r
+      You may add Your own copyright statement to Your modifications and\r
+      may provide additional or different license terms and conditions\r
+      for use, reproduction, or distribution of Your modifications, or\r
+      for any such Derivative Works as a whole, provided Your use,\r
+      reproduction, and distribution of the Work otherwise complies with\r
+      the conditions stated in this License.\r
+\r
+   5. Submission of Contributions. Unless You explicitly state otherwise,\r
+      any Contribution intentionally submitted for inclusion in the Work\r
+      by You to the Licensor shall be under the terms and conditions of\r
+      this License, without any additional terms or conditions.\r
+      Notwithstanding the above, nothing herein shall supersede or modify\r
+      the terms of any separate license agreement you may have executed\r
+      with Licensor regarding such Contributions.\r
+\r
+   6. Trademarks. This License does not grant permission to use the trade\r
+      names, trademarks, service marks, or product names of the Licensor,\r
+      except as required for reasonable and customary use in describing the\r
+      origin of the Work and reproducing the content of the NOTICE file.\r
+\r
+   7. Disclaimer of Warranty. Unless required by applicable law or\r
+      agreed to in writing, Licensor provides the Work (and each\r
+      Contributor provides its Contributions) on an "AS IS" BASIS,\r
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\r
+      implied, including, without limitation, any warranties or conditions\r
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\r
+      PARTICULAR PURPOSE. You are solely responsible for determining the\r
+      appropriateness of using or redistributing the Work and assume any\r
+      risks associated with Your exercise of permissions under this License.\r
+\r
+   8. Limitation of Liability. In no event and under no legal theory,\r
+      whether in tort (including negligence), contract, or otherwise,\r
+      unless required by applicable law (such as deliberate and grossly\r
+      negligent acts) or agreed to in writing, shall any Contributor be\r
+      liable to You for damages, including any direct, indirect, special,\r
+      incidental, or consequential damages of any character arising as a\r
+      result of this License or out of the use or inability to use the\r
+      Work (including but not limited to damages for loss of goodwill,\r
+      work stoppage, computer failure or malfunction, or any and all\r
+      other commercial damages or losses), even if such Contributor\r
+      has been advised of the possibility of such damages.\r
+\r
+   9. Accepting Warranty or Additional Liability. While redistributing\r
+      the Work or Derivative Works thereof, You may choose to offer,\r
+      and charge a fee for, acceptance of support, warranty, indemnity,\r
+      or other liability obligations and/or rights consistent with this\r
+      License. However, in accepting such obligations, You may act only\r
+      on Your own behalf and on Your sole responsibility, not on behalf\r
+      of any other Contributor, and only if You agree to indemnify,\r
+      defend, and hold each Contributor harmless for any liability\r
+      incurred by, or claims asserted against, such Contributor by reason\r
+      of your accepting any such warranty or additional liability.\r
+\r
+   END OF TERMS AND CONDITIONS\r
+\r
+   APPENDIX: How to apply the Apache License to your work.\r
+\r
+      To apply the Apache License to your work, attach the following\r
+      boilerplate notice, with the fields enclosed by brackets "[]"\r
+      replaced with your own identifying information. (Don't include\r
+      the brackets!)  The text should be enclosed in the appropriate\r
+      comment syntax for the file format. We also recommend that a\r
+      file or class name and description of purpose be included on the\r
+      same "printed page" as the copyright notice for easier\r
+      identification within third-party archives.\r
+\r
+   Copyright [yyyy] [name of copyright owner]\r
+\r
+   Licensed under the Apache License, Version 2.0 (the "License");\r
+   you may not use this file except in compliance with the License.\r
+   You may obtain a copy of the License at\r
+\r
+       http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+   Unless required by applicable law or agreed to in writing, software\r
+   distributed under the License is distributed on an "AS IS" BASIS,\r
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+   See the License for the specific language governing permissions and\r
+   limitations under the License.\r
+\r
diff --git a/doc/README.txt b/doc/README.txt
deleted file mode 100644 (file)
index ccbc22e..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-LIBTAPI documentation:
-======================
-
-AD stands for Application Developper.
-
-*-------------*
-|A- TelHandle|
-*-------------*
-
-1- AD must create TelHandle to be able to use libtapi:
-
-       TelHandle *handle;
-
-       handle = tapi_init(NULL);
-
-[refer to tapi.h for more info on tapi_init]
-
-
-2- AD can also precise the CP he wants to work with:
-
-       char **cp_list;
-       TelReturn ret;
-
-       ret = tapi_get_cp_list(&cp_list);
-
-       if (ret != TEL_RETURN_SUCCESS)
-               return;
-
-       /* Use first CP from the list */
-       if (cp_list[0])
-               handle = tapi_init(cp_list[0]);
-
-       g_strfreev(cp_list);
-
-[refer to tapi.h for more info on tapi_get_cp_list]
-
-3- AD must destroy TelHandle when closing application.
-
-       tapi_deinit(handle);
-
-
-*---------------------*
-|B- Event registration|
-*---------------------*
-
-1- AD can register callback by evt_id:
-
-void on_modem_power(TelHandle *handle, const char *evt_id,
-                                       void *data, void *user_data)
-{
-       gboolean *enable = data;
-
-       printf("modem power state %d", *enable);
-}
-
-int main(void)
-{
-       TelReturn ret;
-       TelHandle *handle;
-
-       handle = tapi_init(NULL);
-
-       ret = tapi_register_event_id(handle, TEL_NOTI_MODEM_POWER,
-                                       on_modem_power, NULL);
-
-       /* Fail to register on event_id */
-       if (ret != TEL_RETURN_SUCCESS) {
-               tapi_deinit(handle);
-               return -1;
-       }
-
-       ...
-}
-
-[refer to tapi.h for TapiEvtCb prototype and for more info on
-tapi_register_event_id()]
-
-[refer to tapi_events.h to see possible event per modules and data structure
-associated to event]
-
-/* TapiEvtCb data: 'gooblean *' */
-#define TAPI_PROP_MODEM_POWER                          ...
-/* TapiEvtCb data: 'gooblean *' */
-#define TAPI_PROP_MODEM_FLIGHT_MODE_STATUS             ...
-/* TapiEvtCb data: 'char *' */
-#define TAPI_PROP_MODEM_IMEI                           ...
-/* TapiEvtCb data: 'TelModemVersion *' */
-#define TAPI_PROP_MODEM_VERSION                                ...
-
-2- AD can unregister callback by evt_id:
-
-       ret = tapi_deregister_event_id(handle, TEL_NOTI_MODEM_POWER);
-       /* Fail to unregister event_id */
-       if (ret != TEL_RETURN_SUCCESS)
-               return -1;
-
-
-*--------------*
-|C- Module APIs|
-*--------------*
-
-libtapi is exposing APIs for following modules:
-       - modem
-       - sim
-       - network
-       - call
-       - sms
-       - phonebook
-       - SS (Supplementary Services)
-       - sat
-       - sap
-       - gps
-
-Each module are exposing synchronous and Asynchronous APIs.
-
-1- Synchronous APIs can only return TelReturn values, they are system results.
-output argument for synchronous APIs has to be freed when it is specified in
-header of API protoype.
-
-[refer to tel_return.h for more details]
-
-2- Asynchronous APIs have necessarily one input 'TapiResponseCb *cb', if not
-it is a synchronous APIs.
-
-Asynchronous APIs call can fail. In this case it will immediately return a
-system error 'TelReturn' listed in tel_return.h, callback will never be called.
-
-If API call doesn't fail, result will be sent through the response callback
-within the result parameter.
-
-typedef void (*TapiResponseCb)(TelHandle *handle, int result, void *data,
-                                       void *user_data);
-
---> int result: it is specific for each module:
-       * modem: TelReturn              [refer to tel_return.h]
-       * sim: TelSimResult             [refer to tel_sim.h]
-       * network: TelNetworkResult     [refer to tel_network.h]
-       * call: TelCallResult           [refer to tel_call.h]
-       * ...
-
---> void *data: it is specific for each callback, it is specified in header of
-API prototype:
-       * tapi_modem.h
-       * tapi_sim.h
-       * tapi_network.h
-       * tapi_call.h
-       * ...
-
-See tapi_modem.h:
-/* TapiResponseCb data: NULL pointer */
-TelReturn tapi_modem_set_power_status(TelHandle *handle, TelModemPowerStatus status,
-                               TapiResponseCb callback, void *user_data);
-/* TapiResponseCb data: NULL pointer */
-TelReturn tapi_modem_set_flight_mode(TelHandle *handle, gboolean enable,
-                               TapiResponseCb callback, void *user_data);
diff --git a/doc/libtapi_doc.h b/doc/libtapi_doc.h
new file mode 100644 (file)
index 0000000..425c67c
--- /dev/null
@@ -0,0 +1,292 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TIZEN_TELEPHONY_SERVICE_DOC_H__
+#define __TIZEN_TELEPHONY_SERVICE_DOC_H__
+
+/**
+ * @internal
+ * @ingroup CAPI_TELEPHONY_FRAMEWORK
+ * @defgroup CAPI_TELEPHONY_SERVICE Telephony Service
+ * @brief The Telephony Service module provides call, modem, network, phonebook, SAT, SIM, SMS, and SS services.
+ *
+ * @section CAPI_TELEPHONY_SERVICE_HEADER Required Header
+ *   \#include <tapi_common.h>
+ *
+ * @section CAPI_TELEPHONY_SERVICE_OVERVIEW Overview
+ * The Telephony Service module provides call, modem, network, phonebook, SAT, SIM, SMS, and SS services.
+ * @section CAPI_TELEPHONY_SERVICE_FEATURE Related Features
+ * This API is related with the following feature:\n
+ * - http://tizen.org/feature/network.telephony
+ *
+ * It is recommended to design feature related codes in your application for reliability.\n
+ *
+ * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n
+ *
+ * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
+ *
+ * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
+ */
+
+/**
+ * @internal
+ * @ingroup CAPI_TELEPHONY_SERVICE
+ * @defgroup CAPI_TELEPHONY_SERVICE_CALL Call
+ * @brief
+ * @section CAPI_TELEPHONY_SERVICE_CALL_HEADER Required Header
+ *   \#include <ITapiCall.h>
+ *
+ * @section CAPI_TELEPHONY_SERVICE_CALL_OVERVIEW Overview
+ * Call APIs allow an application to accomplish the following services:
+ * - Make a mobile originated Emergency call, Voice call, or Video call.
+ * - Accept or Reject incoming calls.
+ * - Release Calls.
+ * - Call dependent supplementary services such as call hold, retrieve, DTMF.
+ * - Multi-party call management, setup conference call, split conference call.
+ * - Call information such as get call information, get line identification number.
+ * - To verify whether a call (voice / video) is possible at any given time.
+ *
+ * @section CAPI_TELEPHONY_SERVICE_CALL_FEATURE Related Features
+ * This API is related with the following feature:\n
+ * - http://tizen.org/feature/network.telephony
+ *
+ * It is recommended to design feature related codes in your application for reliability.\n
+ *
+ * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n
+ *
+ * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
+ *
+ * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
+ */
+
+/**
+ * @internal
+ * @ingroup CAPI_TELEPHONY_SERVICE
+ * @defgroup CAPI_TELEPHONY_SERVICE_MODEM Modem
+ * @brief
+ *
+ * @section CAPI_TELEPHONY_SERVICE_MODEM_HEADER Required Header
+ *   \#include <ITapiModem.h>
+ *
+ * @section CAPI_TELEPHONY_SERVICE_MODEM_OVERVIEW Overview
+ * Modem APIs allow an application to accomplish the following services:
+ * - Process power command
+ * - Reset the phone power (on / off)
+ * - Process airplane mode
+ *
+ * @section CAPI_TELEPHONY_SERVICE_MODEM_FEATURE Related Features
+ * This API is related with the following feature:\n
+ * - http://tizen.org/feature/network.telephony
+ *
+ * It is recommended to design feature related codes in your application for reliability.\n
+ *
+ * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n
+ *
+ * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
+ *
+ * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
+ */
+
+/**
+ * @internal
+ * @ingroup CAPI_TELEPHONY_SERVICE
+ * @defgroup CAPI_TELEPHONY_SERVICE_NETWORK Network
+ * @brief
+ * @section CAPI_TELEPHONY_SERVICE_NETWORK_HEADER Required Header
+ *   \#include <ITapiNetwork.h>
+ *
+ * @section CAPI_TELEPHONY_SERVICE_NETWORK_OVERVIEW Overview
+ * Network APIs allow an application to accomplish the following services:
+ * - Search and Select Network
+ * - Get Network information
+ * - Get and Set Preferred PLMN
+ *
+ * @section CAPI_TELEPHONY_SERVICE_NETWORK_FEATURE Related Features
+ * This API is related with the following feature:\n
+ * - http://tizen.org/feature/network.telephony
+ *
+ * It is recommended to design feature related codes in your application for reliability.\n
+ *
+ * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n
+ *
+ * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
+ *
+ * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
+ */
+
+/**
+ * @internal
+ * @ingroup CAPI_TELEPHONY_SERVICE
+ * @defgroup CAPI_TELEPHONY_SERVICE_PHONEBOOK Phonebook
+ * @brief
+ *
+ * @section CAPI_TELEPHONY_SERVICE_PHONEBOOK_HEADER Required Header
+ *   \#include <ITapiPhonebook.h>
+ *
+ * @section CAPI_TELEPHONY_SERVICE_PHONEBOOK Overview
+ * Telephony provides APIs for various phonebook related features such as getting SIM initialization status,
+ * supported phonebook types, total records and used records in phonebook, phonebook entry information,
+ * and reading, updating, deleting of SIM phonebook records.
+ *
+ * @section CAPI_TELEPHONY_SERVICE_PHONEBOOK_FEATURE Related Features
+ * This API is related with the following feature:\n
+ * - http://tizen.org/feature/network.telephony
+ *
+ * It is recommended to design feature related codes in your application for reliability.\n
+ *
+ * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n
+ *
+ * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
+ *
+ * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
+ */
+
+/**
+ * @internal
+ * @ingroup CAPI_TELEPHONY_SERVICE
+ * @defgroup CAPI_TELEPHONY_SERVICE_SAT SAT
+ * @brief
+ *
+ * @section CAPI_TELEPHONY_SERVICE_SAT_HEADER Required Header
+ *   \#include <ITapiSat.h>
+ *
+ * @section CAPI_TELEPHONY_SERVICE_SAT_OVERVIEW Overview
+ * SAT APIs allow an application to accomplish the following services:
+ * - Get main menu information from the SIM application
+ * - Send envelope commands to the SIM application
+ * - Send the execution results of which the SIM application requests from other applications
+ * - Send UI / User confirmation to the SIM application
+ * Note: Telephony SAT functionality allows message relaying from a USIM application to SAT related applications.
+ *
+ * @section CAPI_TELEPHONY_SERVICE_SAT_FEATURE Related Features
+ * This API is related with the following feature:\n
+ * - http://tizen.org/feature/network.telephony
+ *
+ * It is recommended to design feature related codes in your application for reliability.\n
+ *
+ * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n
+ *
+ * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
+ *
+ * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
+ */
+
+/**
+ * @internal
+ * @ingroup CAPI_TELEPHONY_SERVICE
+ * @defgroup CAPI_TELEPHONY_SERVICE_SIM SIM
+ * @brief
+ *
+ * @section CAPI_TELEPHONY_SERVICE_SIM_HEADER Required Header
+ *   \#include <ITapiSim.h>
+ *
+ * @section CAPI_TELEPHONY_SERVICE_SIM_OVERVIEW Overview
+ * SIM APIs allow an application to accomplish the following services:
+ * - Get Card Init status and Identification
+ * - Get the Card Type i.e. whether the SIM Card is a GSM SIM or a 3G SIM
+ * - Set and Get the language preference information stored in the SIM
+ * - Get the ECC (Emergency Call Codes) data
+ * - Get the IMSI (International Mobile Subscriber Identity) information
+ * - Set and Get the mailbox information stored in the SIM
+ * - Set and Get the message indication status stored in the SIM
+ * - Enable, Disable, Change, and Verify the SIM Lock status
+ *
+ * @section CAPI_TELEPHONY_SERVICE_SIM_FEATURE Related Features
+ * This API is related with the following feature:\n
+ * - http://tizen.org/feature/network.telephony
+ *
+ * It is recommended to design feature related codes in your application for reliability.\n
+ *
+ * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n
+ *
+ * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
+ *
+ * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
+ */
+
+/**
+ * @internal
+ * @ingroup CAPI_TELEPHONY_SERVICE
+ * @defgroup CAPI_TELEPHONY_SERVICE_SMS SMS
+ * @brief
+ * @section CAPI_TELEPHONY_SERVICE_SMS_HEADER Required Header
+ *   \#include <ITapiNetText.h>
+ *
+ * @section CAPI_TELEPHONY_SERVICE_SMS_OVERVIEW Overview
+ * SMS APIs allow an application to accomplish the following services:
+ * - Send, save, receive, read, and delete network texts
+ * - Receive Cell-Broadcast Message
+ * - Set and Get Cell broadcast configuration
+ * - Set message status, memory status
+ * - Set and Get SMS parameters
+ *
+ * @section CAPI_TELEPHONY_SERVICE_SMS_FEATURE Related Features
+ * This API is related with the following feature:\n
+ * - http://tizen.org/feature/network.telephony
+ *
+ * It is recommended to design feature related codes in your application for reliability.\n
+ *
+ * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n
+ *
+ * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
+ *
+ * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
+ */
+
+/**
+ * @internal
+ * @ingroup CAPI_TELEPHONY_SERVICE
+ * @defgroup CAPI_TELEPHONY_SERVICE_SS Supplementary Service
+ * @brief
+ *
+ * @section CAPI_TELEPHONY_SERVICE_SS_HEADER Required Header
+ *   \#include <ITapiSs.h>
+ *
+ * @section CAPI_TELEPHONY_SERVICE_SS_OVERVIEW Overview
+ * Supplementary Service APIs allow an application to accomplish the following services:
+ * - Activate, Deactivate, and Change the password for call barring
+ * - Register, Deregister, Activate, and Deactivate call forwarding and call waiting
+ * - Set and Get the CLI(Calling Line Identification) status
+ * - Send USSD request
+ *
+ * Telephony provides APIs to activate/deactivate call barring, get the barring status, and change the barring password.\n
+ * This service makes it possible for a mobile subscriber to activate barring for certain categories of outgoing or incoming calls.
+ * It also allows the deactivation of call barring based on categories that are set.\n
+ * The mobile subscriber may also determine the type of barring preferred for incoming/outgoing calls, by subscribing to a set of one or more unique barring programs.\n
+ * Telephony provides APIs to activate/deactivate the call forwarding option at the Network and to get the call forward status.\n
+ * Call forwarding allows a user to forward incoming calls to another party.
+ * This service permits a called mobile subscriber to have the network send all incoming calls, or just those associated with a specific Basic service group meeting various call FORWARD conditions, to another directory number.\n
+ * The ability of the served mobile subscriber to originate calls is unaffected. If the service is activated, a call is forwarded only if the enabled forward condition is satisfied.\n
+ * An application has to call this API in order to explicitly register/deregister/activate/deactivate the call forwarding option. A request will be sent irrespective of whether another SS call forward is already in progress.\n
+ *
+ * @section CAPI_TELEPHONY_SERVICE_SS_FEATURE Related Features
+ * This API is related with the following feature:\n
+ * - http://tizen.org/feature/network.telephony
+ *
+ * It is recommended to design feature related codes in your application for reliability.\n
+ *
+ * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n
+ *
+ * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
+ *
+ * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
+ */
+
+#endif /* __TIZEN_TELEPHONY_SERVICE_DOC_H__ */
diff --git a/include/ITapiCall.h b/include/ITapiCall.h
new file mode 100644 (file)
index 0000000..490ccf3
--- /dev/null
@@ -0,0 +1,912 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file ITapiCall.h
+ */
+
+/**
+ * @internal
+ * @addtogroup CAPI_TELEPHONY_SERVICE_CALL
+ * @{
+ */
+
+#ifndef _ITAPI_CALL_H_
+#define _ITAPI_CALL_H_
+
+#include <tapi_common.h>
+#include <TelCall.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @brief Originates MO call setup.
+ *
+ * @details This is an asynchronous function. The function completes immediately and call setup proceeds in the background.\n
+ *          This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.\n
+ *          However it just means that the API request has been transfered to the CP successfully.\n
+ *          The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> Embedded call application.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks MO call setup continues in the background. There are multiple states involved in the call setup procedure.\n
+ *          Depending on whether request completion is successful or not, various event notifications are sent to the client along with data\n
+ *          associated with the event(Successful data or error information) based on the indication or response received at the Telephony Server.\n
+ *          Setting up an emergency call when #TelCallType_t is a voice_call, voice call is setup unless the @a dial_number parameter is\n
+ *          an emergency number known to telephony FW(like 112 for all 2G and above, other numbers may be operator specific or device configuration specific,\n
+ *          so Telephony FW will read relevant SIM files and refer to internal configuration records).\n
+ *          If an emergency number is passed and #TelCallType_t is a voice_call, Telephony FW shall setup an emergency phone call.\n
+ *          When #TelCallType_t is an emergency call, emergency call is always set up.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] pParams #TelCallDial_t contains the CallType(whether it is a voice call or data call) and number
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         @c 0 indicates that the operation is completed successfully,\n
+ *         else it will return failure and an error code (Refer Doxygen doc or #TapiResult_t).
+ *
+ * @pre Initialize the Dbus connection with #tel_init.\n
+ *      Register the telephony event to be listened with #tel_register_noti_event.\n
+ *      An event loop runs to listen to events.
+ *
+ * @see #tel_answer_call #tel_end_call
+ */
+int tel_dial_call(TapiHandle *handle, const TelCallDial_t *pParams, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Supports answering the incoming call by accepting or rejecting the call.
+ *
+ * @details This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.\n
+ *          However it just means that the API request has been transfered to the CP successfully.\n
+ *          The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> Embedded call application.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] CallHandle The unique handle for referring the call \n
+ *                       This call handle is available to the application through an incoming call
+ *                       (TAPI_NOTI_VOICE_CALL_STATUS_INCOMING) event.
+ *
+ * @param[in] AnsType The answer type - accept / reject / replace / hold and accept is allowed
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         @c 0 indicates that the operation is completed successfully,
+ *         else it will return failure and an error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @pre Initialize the Dbus connection with #tel_init.\n
+ *      Register the telephony event to be listened with #tel_register_noti_event.\n
+ *      An event loop runs to listen to events.\n
+ *      Call associated with the call handle should be in the #TAPI_CALL_STATE_INCOM state otherwise the API fails and there can be a
+ *      a maximum of 1 existing call.
+ *
+ * @see tel_dial_call()
+ * @see tel_end_call()
+ */
+int tel_answer_call(TapiHandle *handle, unsigned int CallHandle, TelCallAnswerType_t AnsType, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Releases the call identified by the call handle irrespective of whether the call is in the hold or active state.
+ *
+ * @details It is used when releasing a specific active call from a multiparty call.
+ *          This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> Embedded call application.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks In case of the MPTY Call handle, the call end event is returned for each call in MPTY.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] CallHandle A unique handle that refers to the call
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] EndType The end call type (end specific call/end all calls/end all held calls/end all active calls)
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         @c 0 indicates that the operation is completed successfully,
+ *         else it will return failure and an error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @pre Initialize the Dbus connection with #tel_init.\n
+ *      Register the telephony event to be listened with #tel_register_noti_event.\n
+ *      An event loop runs to listen to events.\n
+ *      The call handle should be valid and there should be an existing call in the active/hold state.
+ *
+ * @see tel_dial_call()
+ * @see tel_answer_call()
+ */
+int tel_end_call(TapiHandle *handle, unsigned int CallHandle, TelCallEndType_t EndType, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Puts the given call on hold.
+ *
+ * @details The call identified by the call handle should be in the active state.
+ *          This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> Embedded call application.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] CallHandle A unique handle for referring the call
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         @c 0 indicates that the operation is completed successfully,
+ *         else it will return failure and an error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @pre Initialize the Dbus connection with #tel_init.\n
+ *      Register the telephony event to be listened with #tel_register_noti_event.\n
+ *      An event loop runs to listen to events.\n
+ *      The call identified by the call handle should be in the active state.
+ *
+ * @see tel_retrieve_call()
+ */
+int tel_hold_call(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Retrieves the call being held.
+ *
+ * @details The call identified by the call handle must be in the held state.
+ *          This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> Embedded call application.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks The call duration for the call will be calculated from the moment the call has been connected until the call is released.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] CallHandle A unique handle for referring the call
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         @c 0 indicates that the operation is completed successfully,
+ *         else it will return failure and an error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @pre Initialize the Dbus connection with #tel_init.\n
+ *      Register the telephony event to be listened with #tel_register_noti_event.\n
+ *      An event loop runs to listen to events.\n
+ *      Call should be in the held state in order to retrieve it into the active state unless no active call is present.
+ */
+int tel_active_call(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Swaps calls. This is only for calls dialed or answered with Telephony.
+ *
+ * @details Swap is only available for voice calls.
+ *          This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is delivered in the corresponding event asynchronously.
+ *
+ * <b> Notes: </b>
+ * During a call, a user can place all active calls and accept other held calls with this function.
+ * If the terminal is not within a call, it will fail.
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> Embedded call application.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] CallHandle1 This is an active call
+ *
+ * @param[in] CallHandle2 This is a held call
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         @c 0 indicates that the operation has completed successfully,
+ *         else it will return failure and an error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @pre Initialize the Dbus connection with #tel_init.\n
+ *      Register the telephony event to be listened with #tel_register_noti_event.\n
+ *      An event loop runs to listen to events.
+ */
+int tel_swap_call(TapiHandle *handle, unsigned int CallHandle1, unsigned int CallHandle2, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Starts continuous DTMF by sending a single digit during the call.
+ *
+ * @details DTMF is an abbreviation for Dual-tone-multi-frequency. It is used for telecommunication signaling\n
+ *          over telephone lines in the voice-frequency band between UE and other communication devices.\n
+ *          For example UE sends a DTMF tone to the server to choose from options which the server provides.\n
+ *          If the UE is not within a call, this function will fail with an error code.
+ *
+ *          This function makes a Dbus method call to the Telephony Sever and gets an immediate feedback.\n
+ *          However it just means that the API request has been transfered to the CP successfully.\n
+ *          The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> Embedded call application.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks There will be a single asynchronous notification for all the DTMF digits sent.
+ *          If the users of this API need an asynchronous\n
+ *          response for each DTMF digit then the user has to call this API multiple times passing each single DTMF digit in @a pDtmfString.
+ *
+ * @remarks To be invoked in the following cases:
+ *
+ *          i. Key Press during On-going call
+ *          ii. DTMF digits passed with PAUSE (,) or WAIT (;)
+ *
+ *          In either of the above cases, the application can ONLY send a single DTMF Digit to Telephony.\n
+ *          In case of PAUSE and WAIT, the application needs to invoke tel_stop_call_cont_dtmf() sequentially (for every digit) without waiting for response from tel_start_call_cont_dtmf().
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] dtmf_digit The DTMF digit to be sent from MS
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (TapiHandle *handle, int) \n
+ *         @c 0 indicates that the operation has completed successfully, \n
+ *         else it will return failure and an error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @pre Initialize the Dbus connection with #tel_init.\n
+ *      An active call should be present.
+ */
+int tel_start_call_cont_dtmf(TapiHandle *handle, unsigned char dtmf_digit, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Stops continuous DTMF during the call.
+ *
+ * @details DTMF is an abbreviation for Dual-tone-multi-frequency. It is used for telecommunication signaling\n
+ *          over telephone lines in the voice-frequency band between UE and other communication devices.\n
+ *          For example UE sends a DTMF tone to the server to choose from options which the server provides.\n
+ *          If the UE is not within a call, this function will fail with an error code.
+ *
+ *          This function makes a Dbus method call to the Telephony Sever and gets an immediate feedback.\n
+ *          However it just means that the API request has been transfered to the CP successfully.\n
+ *          The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> Embedded call application.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks There will be a single asynchronous notification for all the DTMF digits sent.
+ *          If the users of this API need an asynchronous
+ *          response for each DTMF digit then the user has to call this API multiple times passing each single DTMF digit in @a pDtmfString.
+ *
+ * @remarks To be invoked in the following cases:
+ *
+ *          i. Key Release (post key press) during On-going call
+ *          ii. DTMF digits passed with PAUSE (,) or WAIT (;)
+ *
+ *          Every tel_start_call_cont_dtmf() call needs to be followed by tel_stop_call_cont_dtmf() sequentially.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)\n
+ *         @c 0 indicates that the operation has completed successfully,\n
+ *         else it will return failure and an error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @pre Initialize the Dbus connection with #tel_init.\n
+ *      An active call should be present.\n
+ *      Start a continuous DTMF request should be sent already.
+ */
+int tel_stop_call_cont_dtmf(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Sends one or more DTMF digits during the call. (3GPP2 specific)
+ *
+ * @details DTMF is an abbreviation for Dual-tone-multi-frequency. It is used for telecommunication signaling\n
+ *          over telephone lines in the voice-frequency band between UE and other communication devices.\n
+ *          For example UE sends a DTMF tone to the server to choose from options which the server provides.\n
+ *          If the UE is not within a call, this function will fail with an error code.
+ *
+ *          This function makes a Dbus method call to the Telephony Sever and gets an immediate feedback.\n
+ *          However it just means that the API request has been transfered to the CP successfully.\n
+ *          The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> Embedded call application.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks There will be a single asynchronous notification for all the DTMF digits sent.
+ *          If the users of this API need an asynchronous\n
+ *          response for each DTMF digit then the user has to call this API multiple times passing each single DTMF digit in @a pDtmfString.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] info A Burst DTMF info structure containing DTMF string, pulse width, and inter digit interval MS
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)\n
+ *         @c 0 indicates that the operation has completed successfully,\n
+ *         else it will return failure and an error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @pre Initialize the Dbus connection with #tel_init.\n
+ *      An active call should be present.
+ */
+int tel_send_call_burst_dtmf(TapiHandle *handle, const TelCallBurstDtmf_t *info, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Joins the given two calls (one call in the active conversation state and the other call in the held state) into conference.
+ *
+ * @details This function makes a Dbus method call to the Telephony Server and gets an immediate feedback.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> Embedded call application.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks The call handle of an active call or held call will be made as MPTY-id, and the other call handle will join in a conference.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] CallHandle1 A unique handle which is either an active call or a held call
+ *
+ * @param[in] CallHandle2 A unique call handle
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         @c 0 indicates that the operation is completed successfully,
+ *         else it will return failure and an error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @pre Initialize the Dbus connection with #tel_init.\n
+ *      Register the telephony event to be listened with #tel_register_noti_event.\n
+ *      An event loop runs to listen to events.\n
+ *      For a Multiparty call or for joining two calls into conference, there should be one call in the active state and another call
+ *      in the held state.
+ *
+ * @see tel_split_call()
+ */
+int tel_join_call(TapiHandle *handle, unsigned int CallHandle1, unsigned int CallHandle2, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Triggers splitting a private call from a multiparty call.
+ *
+ * @details This API allows creating a private communication with one of the remote parties in a
+ *          multiparty session. TAPI client application has to pass the call handle which needs
+ *          to be split from the multiparty call.
+ *
+ *          This function makes a Dbus method call to the Telephony Server and gets an immediate feedback.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> Embedded call application.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] CallHandle The handle of the call to be made private \n
+ *                       The call handle referring to the call that is to be split from the conference
+ *                       (call to be made private)
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         @c 0 indicates that the operation is completed successfully,
+ *         else it will return failure and an error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @pre Initialize the Dbus connection with #tel_init.\n
+ *      Register the telephony event to be listened with #tel_register_noti_event.\n
+ *      An event loop runs to listen to events.\n
+ *      The call should be in a multiparty conference call.
+ *
+ * @post The split call will be the active call and the conference call will be the held call.
+ *
+ * @see tel_join_call()
+ */
+int tel_split_call(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Triggers making an explicit call transfer by connecting the two parties where one party is being
+ *        active (active state) and another party is being held (held state).
+ *
+ * @details This function makes a Dbus method call to the Telephony Server and gets an immediate feedback.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * <b> Notes: </b>
+ * The ECT supplementary service enables the served mobile subscriber (subscriber A) who has two calls,
+ * each of which can be an incoming or outgoing call, to connect the other parties in the two calls
+ * and release the served mobile subscriber's own connection.
+ * Prior to transfer, the connection shall have been established on the call
+ * between subscriber A and subscriber B. On the call between subscriber A and subscriber C,
+ * either the connection shall have been established prior to transfer, or, as a network option,
+ * or the transfer can occur while subscriber C is being informed of the call
+ * (i.e. the connection has not yet been established.).
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> Embedded call application.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] CallHandle The call handle of an active call
+ *
+ * @param[in] callback To register the callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         @c 0 indicates that the operation is completed successfully,
+ *         else it will return failure and an error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @pre Initialize the Dbus connection with #tel_init.\n
+ *      Register the telephony event to be listend with #tel_register_noti_event.\n
+ *      An event loop runs to listen to events.\n
+ *      In order to call transfer, served mobile subscriber should have 2 calls, one in the active state and another one
+ *      in the held state.
+ *
+ * @post When the request has been completed successfully, a call end indication will be sent to both the calls (active and held).
+ */
+int tel_transfer_call(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets the status of the current call identified by the call handle whenever the application wants the call status, call handle must be valid.
+ *
+ * @details This function makes a Dbus method call to the Telephony Server and gets an immediate feedback.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * <b> Sync (or) Async: </b> This is a Synchronous API.
+ *
+ * <b> Prospective Clients: </b> Embedded call application.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] call_id A unique handle for referring the call
+ *
+ * @param[out] out The call status information like destination number, call direction (MO or MT), call type (voice or data), whether
+ *                 the call is in the conference state or not \n
+ *                 The present call state is returned through this parameter
+ *
+ * @return The return type (int)
+ *         @c 0 indicates that the operation is completed successfully,
+ *         else it will return failure and an error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @pre Initialize the Dbus connection with #tel_init.
+ */
+int tel_get_call_status(TapiHandle *handle, int call_id, TelCallStatus_t *out );
+
+/**
+ * @brief Gets the status all of the current call
+ *
+ * <b> Sync (or) Async: </b> This is a Synchronous API.
+ *
+ * <b> Prospective Clients: </b> Embedded call application.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @see tel_get_call_status()
+ */
+int tel_get_call_status_all(TapiHandle *handle, TelCallStatusCallback cb, void *user_data);
+
+/**
+ * @brief Redirects the incoming call to another subscriber.
+ *
+ * @details If informed about an incoming call this call may be redirected to another destination by
+ *          entering the destination number. The destination number to which the current
+ *          incoming call needs to be redirected is specified via the info argument.
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> Embedded call application.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] CallHandle An incoming call handle
+ *
+ * @param[out] deflect_info The destination number
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         @c 0 indicates that the operation is completed successfully,
+ *         else it will return failure and an error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @pre Initialize the Dbus connection with #tel_init.\n
+ *      Register the telephony event to be listened with #tel_register_noti_event.\n
+ *      An event loop runs to listen to events.
+ */
+int tel_deflect_call(TapiHandle *handle, unsigned int CallHandle, const TelCallDeflectDstInfo_t *deflect_info, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets the call volume.
+ *
+ * @details This function makes a Dbus method call to the Telephony Server and returns an immediate value.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * <b> Sync (or) Async: </b> This is a Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> Embedded call application.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] device The sound device
+ *
+ * @param[in] type The sound type
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         @c 0 indicates that the operation is completed successfully,
+ *         else it will return failure and an error code (Refer Doxygen doc or #TapiResult_t)
+ */
+int tel_get_call_volume_info(TapiHandle *handle, TelSoundDevice_t device, TelSoundType_t type, tapi_response_cb callback, void *user_data );
+
+/**
+ * @brief Sets the call volume.
+ *
+ * @details This function makes a Dbus method call to the Telephony Server and returns an immediate value.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * <b> Sync (or) Async: </b> This is a Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> Embedded call application.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] info The call volume information
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         @c 0 indicates that the operation has completed successfully,
+ *         else it will return failure and an error code (Refer Doxygen doc or #TapiResult_t)
+ */
+int tel_set_call_volume_info(TapiHandle *handle, TelCallVolumeInfo_t *info, tapi_response_cb callback, void *user_data );
+
+/**
+ * @brief Sets the call sound path.
+ *
+ * @details This function makes a Dbus method call to the Telephony Server and returns an immediate value.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * <b> Sync (or) Async: </b> This is a Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> Embedded call application.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] path The call sound path information
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         @c 0 indicates that the operation is completed successfully,
+ *         else it will return failure and an error code (Refer Doxygen doc or #TapiResult_t)
+ */
+int tel_set_call_sound_path(TapiHandle *handle, TelCallSoundPathInfo_t *path, tapi_response_cb callback, void *user_data );
+
+/**
+ * @brief Sets the call mute state.
+ *
+ * @details This function makes a Dbus method call to the Telephony Server and returns an immediate value.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * <b> Sync (or) Async: </b> This is a Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> Embedded call application.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] mute The sound mute status
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         @c 0 indicating that the operation has completed successfully,
+ *         else it will return failure and an error code (Refer Doxygen doc or #TapiResult_t)
+ */
+int tel_set_call_mute_status(TapiHandle *handle, TelSoundMuteStatus_t mute, TelSoundMutePath_t path, tapi_response_cb callback, void *user_data );
+
+/**
+ * @brief Gets the call mute state.
+ *
+ * @details This function makes a Dbus method call to the Telephony Server and returns an immediate value.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is delivered in the corresponding event asynchronously.
+ *
+ * <b> Sync (or) Async: </b> This is a Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> Embedded call application.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         @c 0 indicates that the operation is completed successfully,
+ *         else it will return failure and an error code (Refer Doxygen doc or #TapiResult_t)
+ */
+int tel_get_call_mute_status(TapiHandle *handle, tapi_response_cb callback, void *user_data );
+
+/**
+ * @brief Gets the voice privacy option mode in the phone. (3GPP2 specific)
+ *
+ * @details This function makes a Dbus method call to the Telephony Sever and gets an immediate feedback.\n
+ *          However it just means that the API request has been transfered to the CP successfully.\n
+ *          The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> Embedded call application.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)\n
+ *         @c 0 indicates that the operation has completed successfully,\n
+ *         else it will return failure and an error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @pre Initialize the Dbus connection with #tel_init.\n
+ *      Register the telephony event to be listened with #tel_register_noti_event.\n
+ *      An event loop runs to listen to events.
+ */
+int tel_get_call_privacy_mode(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Sets the voice privacy option mode in the phone. It is available only where a call exists. (3GPP2 specific)
+ *
+ * @details This function makes a Dbus method call to the Telephony Sever and gets an immediate feedback.\n
+ *          However it just means that the API request has been transfered to the CP successfully.\n
+ *          The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> Embedded call application.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] PrivacyMode The voice privacy option mode(TapiHandle *handle, ENHANCED or STANDARD)
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)\n
+ *         @c 0 indicates that the operation has completed successfully,\n
+ *         else it will return failure and an error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @pre Initialize the Dbus connection with #tel_init.\n
+ *      Register the telephony event to be listened with #tel_register_noti_event.\n
+ *      An event loop runs to listen to events.
+ */
+int tel_set_call_privacy_mode(TapiHandle *handle, TelCallPrivacyMode_t PrivacyMode, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief This function is called to set 'preferred' Voice Subscription.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param [in] preferred_subscription
+ * - 'preferred' Voice Subscription.
+ * - Refer #TelCallPreferredVoiceSubs_t for Subscription details
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ */
+int tel_set_call_preferred_voice_subscription(TapiHandle *handle, TelCallPreferredVoiceSubs_t preferred_subscription,
+       tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief This function is called to get the 'preferred' Voice Subscription.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param [out] preferred_subscription
+ * - 'preferred' Voice Subscription.
+ * - Refer #TelCallPreferredVoiceSubs_t for Subscription details
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ */
+int tel_get_call_preferred_voice_subscription(TapiHandle *handle, TelCallPreferredVoiceSubs_t *preferred_subscription);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ITAPI_CALL_H_ */
+
+/**
+ * @}
+ */
diff --git a/include/ITapiModem.h b/include/ITapiModem.h
new file mode 100644 (file)
index 0000000..742f493
--- /dev/null
@@ -0,0 +1,256 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file ITapiModem.h
+ */
+
+/**
+ * @internal
+ * @addtogroup CAPI_TELEPHONY_SERVICE_MODEM
+ * @{
+ */
+
+#ifndef _ITAPI_MODEM_H_
+#define _ITAPI_MODEM_H_
+
+#include <tapi_common.h>
+#include <TelPower.h>
+#include <TelMisc.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Turns the modem on/off.
+ * @details <b> Sync (or) Async: </b> This is a Synchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> External Apps. \n
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[in] cmd The index value, which is the power command #tapi_power_phone_cmd_t
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int) \n
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
+ *         else it provides an error code (Refer #TapiResult_t).
+ */
+int tel_process_power_command(TapiHandle *handle, tapi_power_phone_cmd_t cmd, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Switches the flight mode on/off.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] mode The mode value, which is the flight flag #tapi_power_flight_mode_type_t
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+
+ * @return The return type (int) \n
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully, \n
+ *         else it provides an error code (Refer #TapiResult_t).
+ */
+int tel_set_flight_mode(TapiHandle *handle, tapi_power_flight_mode_type_t mode, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets the flight mode
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ */
+int tel_get_flight_mode(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets ME version information.
+ *
+ * @details <b> Sync (or) Async: </b> This is a Synchronous API.\n
+ *
+ *          <b> Prospective Clients: </b> External Apps.\n
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int) \n
+ *         Integer '0' ( same with #TAPI_API_SUCCESS ): indicates that the operation is completed successfully \n
+ *         Negative integer : It provides an error code (Refer #TapiResult_t).
+ */
+int tel_get_misc_me_version(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets the Misc ME version.
+ *
+ * @details <b> Sync (or) Async: </b> This is a Synchronous API.\n
+ *
+ *          <b> Prospective Clients: </b> External Apps.\n
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @return The return type ( TelMiscVersionInformation * ) \n
+ *         The Misc Version Information.
+ */
+TelMiscVersionInformation *tel_get_misc_me_version_sync(TapiHandle *handle);
+
+/**
+ * @brief Gets the ME ESN/MEID for each phone type.
+ *
+ * @details <b> Sync (or) Async: </b> This is a Synchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> External Apps. \n
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int) \n
+ *         Integer '0' ( same with #TAPI_API_SUCCESS ): indicates that the operation is completed successfully \n
+ *         Negative integer : It provides an error code (Refer #TapiResult_t).
+ */
+int tel_get_misc_me_sn(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets the Misc ME Serial Number.
+ *
+ * @details <b> Sync (or) Async: </b> This is a Synchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> Embedded call application. \n
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @remarks This function makes a Dbus method call to the Telephony Server and returns an immediate value.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is delivered in the corresponding event asynchronously.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @return The return Type (char*) \n
+ *         The Serial Number string.
+ */
+TelMiscSNInformation *tel_get_misc_me_sn_sync(TapiHandle *handle);
+
+/**
+ * @brief Gets the Misc ME IMEI.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.\n
+ *
+ *          <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int) \n
+ *         Integer '0' ( same with #TAPI_API_SUCCESS ): indicates that the operation is completed successfully \n
+ *         Negative integer : It provides an error code (Refer #TapiResult_t).
+ */
+int tel_get_misc_me_imei(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets the Misc ME IMEI.
+ *
+ * @details <b> Sync (or) Async: </b> This is a Synchronous API.\n
+ *
+ *          <b> Prospective Clients: </b> Embedded call application.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @remarks This function makes a Dbus method call to the Telephony Server and returns an immediate value.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is delivered in the corresponding event asynchronously.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @return The return type (char*) \n
+ *         The IMEI string.
+ */
+char *tel_get_misc_me_imei_sync(TapiHandle *handle);
+
+/**
+ * @brief Checks the modem power status.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> Embedded call application.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @remarks This function makes a Dbus method call to the Telephony Server and returns an immediate value.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is delivered in the corresponding event asynchronously.
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[out] result The result of checking the modem power status
+ *
+ * @return The return type (int) \n
+ *         @c 0 indicates that the operation is completed successfully, \n
+ *         else it will return failure and an error code (Refer Doxygen doc or #TapiResult_t).
+ */
+int tel_check_modem_power_status(TapiHandle *handle, int *result);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ITAPI_MODEM_H_ */
+
+/**
+ * @}
+ */
diff --git a/include/ITapiNetText.h b/include/ITapiNetText.h
new file mode 100644 (file)
index 0000000..65db6e7
--- /dev/null
@@ -0,0 +1,462 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file ITapiNetText.h
+ */
+
+/**
+ * @internal
+ * @addtogroup CAPI_TELEPHONY_SERVICE_SMS
+ * @{
+ */
+
+#ifndef _ITAPI_NETTEXT_H_
+#define _ITAPI_NETTEXT_H_
+
+#include <tapi_common.h>
+#include <TelSms.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @brief Sends an SMS message to the network.
+ *
+ * @details Allows transmitting SMS PDU as defined by 3GPP TS 23.040 (SMS-SUBMIT, SMS-COMMAND) to lower layers.\n
+ * It allows keeping the dedicated link at lower layers by passing information as messages to send through parameters.\n
+ * This will enable to avoid releasing a dedicated connection used for transmission.
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[in] pDataPackage The SMS-SUBMIT TPDU
+ * @param[in] bMoreMsgToSend If @c true there is more than one message to be sent or a multiple segmented concatenated
+ *                           message has to be sent, otherwise @c false \n
+ *                           This flag informs OEM that more messages have to be sent
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
+ *         else it will return failure and an error code (Refer #TapiResult_t)
+ */
+int tel_send_sms(TapiHandle *handle, const TelSmsDatapackageInfo_t *pDataPackage, int bMoreMsgToSend, tapi_response_cb callback, void* user_data);
+
+/**
+ * @brief Reads a message from the SIM card storage.
+ *
+ * @details The SIM index (index used when storing the SMS) is the number to be passed in order
+ *          to read a particular SMS message. Total number of messages can be retrieved by tel_get_sms_count function.
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[in] read_index  The index number of the message to be read
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
+ *         else it will return failure and an error code (Refer #TapiResult_t)
+ */
+int tel_read_sms_in_sim(TapiHandle *handle, int read_index, tapi_response_cb callback, void* user_data);
+
+/**
+ * @brief Writes a message to the SIM storage area.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[in] pWriteData The SMS message structure
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
+ *         else it will return failure and an error code (Refer #TapiResult_t)
+ */
+int tel_write_sms_in_sim(TapiHandle *handle, const TelSmsData_t *pWriteData, tapi_response_cb callback, void* user_data);
+
+/**
+ * @brief Deletes the message specified by an index (SIM index used when storing the SMS)
+ *        number from the SIM storage area.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[in] del_index The message index to delete
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
+ *         else it will return failure and an error code (Refer #TapiResult_t)
+ */
+int tel_delete_sms_in_sim(TapiHandle *handle, int del_index, tapi_response_cb callback, void* user_data);
+
+/**
+ * @brief Retrieves message count information like total record count,
+ *        used record count, and indices list for SIM storage.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b>  External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @remarks This is an asynchronous function and the response will be sent back in the callback function.
+ *          Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
+ *         else it will return failure and an error code (Refer #TapiResult_t)
+ */
+int tel_get_sms_count(TapiHandle *handle, tapi_response_cb callback, void* user_data);
+
+/**
+ * @brief Sets SMS CB Message Identifiers in the appropriate EF-CBMI/EF-CBMIR file in the (U)SIM.
+ *
+ * @details This function also indicates an underlying provider to enable or disable the CB Channel on which CB messages are received.
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
+ *          @a pCBConfig contains parameters to set the SMS CB configuration.
+ *          (i)  Cell broadcast service state. (Enabled/disabled.)
+ *          (ii) Cell broadcast message identifier, which denotes whether all cell broadcast message identifiers are selected or only some of them.
+ *          (iii) The list count of message identifiers to be set.
+ *          (iv) The actual list of message identifiers to be set. Each identifier occupies 2 bytes. And the list ranges from 0x00 to 0xff.
+ *          These message identifiers denote the source and type of the CB message. Based on the message identifiers set in the SIM,
+ *          the ME receives CB messages with selected message identifiers.
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[in] pCBConfig The parameters of the SMS CB configuration
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
+ *         else it will return failure and an error code (Refer #TapiResult_t)
+ */
+int tel_set_sms_cb_config(TapiHandle *handle, const TelSmsCbConfig_t *pCBConfig, tapi_response_cb callback, void* user_data);
+
+/**
+ * @brief Retrieves the SMS CB configuration parameters from the EFcbmi file in the SIM.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b>  External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
+ *         else it will return failure and an error code (Refer #TapiResult_t)
+ */
+int tel_get_sms_cb_config(TapiHandle *handle, tapi_response_cb callback, void* user_data);
+
+/**
+ * @brief Gets the SMS parameters for a particular SMS (sent/received)
+ * based on the SIM index where it is stored.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[in] get_index The SIM index where the SMS is stored
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
+ *         else it will return failure and an error code (Refer #TapiResult_t)
+ */
+int tel_get_sms_parameters(TapiHandle *handle, int get_index, tapi_response_cb callback, void* user_data);
+
+/**
+ * @brief Sets the short message service header parameters which are used in the origination of MO messages.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Important Notes: </b> This API updates/sets SMS Parameters in the EFsmsp file in the SIM storage.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
+ *          @a pSmsSetParameters contains SMS header parameters information like: service center address,
+ *          destination address, validity period, protocol identifier, and data coding scheme.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] pSmsSetParameters The SMS header parameters information
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
+ *         else it will return failure and an error code (Refer #TapiResult_t)
+ */
+int tel_set_sms_parameters(TapiHandle *handle, const TelSmsParams_t *pSmsSetParameters, tapi_response_cb callback, void* user_data);
+
+/**
+ * @brief Sends a delivery report for the received incoming SMS to the network.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks Access to this API is limited to in-house applications.
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[in] pDataPackage The SMS Data package
+ * @param[in] RPCause The reason for SMS-DELIVER failure
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         #TAPI_API_SUCCESS indicates that the operation has completed successfully,
+ *         else it will return failure and an error code (Refer #TapiResult_t)
+ *
+ * @pre The SMS-DELIVER-REPORT message structure should be in the TPDU format as specified by 3GPP TS 23.040 SMS TPDU.
+ */
+int tel_send_sms_deliver_report(TapiHandle *handle, const TelSmsDatapackageInfo_t *pDataPackage, TelSmsResponse_t RPCause, tapi_response_cb callback, void* user_data);
+
+/**
+ * @brief Sets SMS Service Centre Address information in order to send the SMS.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Important Notes: </b> This API updates/sets the service center address in the EFsmsp file in the SIM storage.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[in] pSCA The service centre address information
+ * @param[in] sca_index The record index of the Service center address information in the EF
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
+ *         else it will return failure and an error code (Refer #TapiResult_t)
+ */
+int tel_set_sms_sca(TapiHandle *handle, const TelSmsAddressInfo_t *pSCA, int sca_index, tapi_response_cb callback, void* user_data);
+
+/**
+ * @brief Gets current SMS Service Centre Address information.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[in] sca_index The record index of the Service center address information in the SIM EF
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
+ *         else it will return failure and an error code (Refer #TapiResult_t)
+ */
+int tel_get_sms_sca(TapiHandle *handle, int sca_index, tapi_response_cb callback, void* user_data);
+
+/**
+ * @brief Informs a modem about the memory status of the PDA (whether FULL or AVAILABLE) so that the modem can inform the network.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks Access to this API is limited to in-house applications.
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[in] memoryStatus The Memory Status
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
+ *         else it will return failure and an error code (Refer #TapiResult_t)
+ */
+int tel_set_sms_memory_status(TapiHandle *handle, int memoryStatus, tapi_response_cb callback, void* user_data);
+
+/**
+ * @brief Sets the message status in the SIM EF.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks Access to this API is limited to in-house applications and Message Framework API(MAPI) is recommended instead.
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[in] set_index The index of the message whose status has to be set
+ * @param[in] msgStatus The status of the message to be set
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
+ *         else it will return failure and an error code (Refer #TapiResult_t)
+ */
+int tel_set_sms_message_status(TapiHandle *handle, int set_index, TelSmsMsgStatus_t msgStatus, tapi_response_cb callback, void* user_data);
+
+/**
+ * @brief Gets the count of the SMS parameter records stored in the SIM EF.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @remarks Access to this API is limited to in-house applications.
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
+ *         else it will return failure and an error code (Refer #TapiResult_t)
+ */
+int tel_get_sms_parameter_count(TapiHandle *handle, tapi_response_cb callback, void* user_data);
+
+/**
+ * @brief Checks the SMS ready status (whether ready or not).
+ *
+ * @details <b> Sync (or) Async: </b> This is a Synchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[out] pReadyStatus The Ready Status
+ *
+ * @return The return type (int)
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully,
+ *         else it will return failure and an error code (Refer #TapiResult_t)
+ */
+int tel_check_sms_device_status(TapiHandle *handle, int *pReadyStatus);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ITAPI_NETTEXT_H_ */
+
+/**
+ * @}
+ */
diff --git a/include/ITapiNetwork.h b/include/ITapiNetwork.h
new file mode 100644 (file)
index 0000000..9b695bc
--- /dev/null
@@ -0,0 +1,526 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file ITapiNetwork.h
+ */
+
+/**
+ * @internal
+ * @addtogroup CAPI_TELEPHONY_SERVICE_NETWORK
+ * @{
+ */
+
+#ifndef _ITAPI_NETWORK_H_
+#define _ITAPI_NETWORK_H_
+
+#include <tapi_common.h>
+#include <TelNetwork.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @brief Requests the lower layers to select the network automatically.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> External Apps.\n
+ *
+ *          This function makes a Dbus method call to the Telephony Server and returns an immediate value.
+ *          However it just means that the API request has been transferred to the CP successfully.
+ *          The actual operation result is delivered in the corresponding event asynchronously.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)\n
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully\n
+ *         Refer #TapiResult_t for failure and an error code.
+ *
+ * @pre Initialize the Dbus connection with #tel_init.
+ */
+int tel_select_network_automatic(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Requests the lower layers to select the network (PLMN) which has been selected by the user from the Network List displayed to the user.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> External Apps.\n
+ *
+ *          This function makes a Dbus method call to the Telephony Server and returns an immediate value.
+ *          However it just means that the API request has been transferred to the CP successfully.
+ *          The actual operation result is delivered in the corresponding event asynchronously.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] plmn The user selected PLMN
+ *
+ * @param[in] act The user selected Access Technology
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)\n
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully\n
+ *         Refer #TapiResult_t for failure and an error code.
+ *
+ * @pre Initialize the Dbus connection with #tel_init.
+ */
+int tel_select_network_manual(TapiHandle *handle, const char *plmn, int act, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Sends a request to do manual search for the available networks and provides the Network List to the User/Application.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> External Apps.\n
+ *
+ *          This function makes a Dbus method call to the Telephony Server and returns an immediate value.
+ *          However it just means that the API request has been transferred to the CP successfully.
+ *          The actual operation result is delivered in the corresponding event asynchronously.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)\n
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully\n
+ *         Refer #TapiResult_t for failure and an error code.
+ *
+ * @pre Initialize the Dbus connection with #tel_init.
+ *
+ * @post In the available network list, the user can select one of the networks successfully.
+ */
+int tel_search_network(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets the present network selection mode i.e. automatic or manual.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> External Apps.\n
+ *
+ *          This function makes a Dbus method call to the Telephony Server and returns an immediate value.
+ *          However it just means that the API request has been transferred to the CP successfully.
+ *          The actual operation result is delivered in the corresponding event asynchronously.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] callback To register a callback function for the result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)\n
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully\n
+ *         Refer #TapiResult_t for failure and an error code.
+ *
+ * @pre Initialize the Dbus connection with #tel_init.
+ */
+int tel_get_network_selection_mode(struct tapi_handle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Sets the network preferred PLMN.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> External Apps. \n
+ *
+ *          This function makes a Dbus method call to the Telephony Server and returns an immediate value.
+ *          However it just means that the API request has been transferred to the CP successfully.
+ *          The actual operation result is delivered in the corresponding event asynchronously.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] operation The operation to be done on the preferred PLMN
+ *
+ * @param[in] info The PLMN Info
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)\n
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully\n
+ *         Refer #TapiResult_t for failure and an error code.
+ *
+ * @pre Initialize the Dbus connection with #tel_init.
+ */
+int tel_set_network_preferred_plmn(TapiHandle *handle, TelNetworkPreferredPlmnOp_t operation,
+               TelNetworkPreferredPlmnInfo_t *info, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets the preferred PLMN list.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> External Apps. \n
+ *
+ *          This function makes a Dbus method call to the Telephony Server and returns an immediate value.
+ *          However it just means that the API request has been transferred to the CP successfully.
+ *          The actual operation result is delivered in the corresponding event asynchronously.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)\n
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully\n
+ *         Refer #TapiResult_t for failure and an error code.
+ *
+ * @pre Initialize the Dbus connection with #tel_init.
+ */
+int tel_get_network_preferred_plmn(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Cancels the triggered manual network search.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)\n
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully\n
+ *         Refer #TapiResult_t for failure and an error code.
+ */
+int tel_cancel_network_manual_search(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets network serving information.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)\n
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully\n
+ *         Refer #TapiResult_t for failure and an error code.
+ */
+int tel_get_network_serving(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Sets the network mode.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] mode The network mode (GSM only or WCDMA only or Automatic)
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)\n
+ *         #TAPI_API_SUCCESS - indicates that the operation is completed successfully\n
+ *         Refer #TapiResult_t for failure and an error code.
+ */
+int tel_set_network_mode(TapiHandle *handle, int mode, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets the network mode.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)\n
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully\n
+ *         Refer #TapiResult_t for failure and an error code.
+ */
+int tel_get_network_mode(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets neighboring cell info.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.\n
+ *
+ *          <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)\n
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully\n
+ *         Refer #TapiResult_t for failure and an error code.
+ */
+int tel_get_network_neighboring_cell_info(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Enters or exits the emergency callback mode.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] mode The emergency callback mode (Enter or Exit)
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)\n
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully\n
+ *         Refer #TapiResult_t for failure and an error code.
+ */
+int tel_set_network_emergency_callback_mode(TapiHandle *handle, TelNetworkEmergencyCallbackMode_t mode,
+               tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Sets the network roaming preference.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param [in] roam_pref The network roaming preference (AUTOMATIC, HOME_ONLY, ROAM_ONLY)
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)\n
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully\n
+ *         Refer #TapiResult_t for failure and an error code.
+ */
+int tel_set_network_roaming_preference(TapiHandle *handle, TelNetworkPrefNetType_t roam_pref, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets the network roaming preference.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)\n
+ *         #TAPI_API_SUCCESS indicates that the operation is completed successfully\n
+ *         Refer #TapiResult_t for failure and an error code.
+ */
+int tel_get_network_roaming_preference(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Sets the Subscription (related to #TapiHandle) as 'default' Data Subscription.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @post None.
+ *
+ * @return The return type (int)\n
+ *         #TAPI_API_SUCCESS indicates that the operation has completed successfully\n
+ *         Refer #TapiResult_t for failure and an error code.
+ *
+ * @par Prospective Clients: External Apps.
+ */
+int tel_set_network_default_data_subscription(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets the Subscription which is configured as 'default' Data Subscription.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[out] The default subscription
+ *             - 'default' Data Subscription.
+ *             - Refer #TelNetworkDefaultDataSubs_t for Subscription details.
+ *
+ * @post None.
+ *
+ * @return The return type (int)\n
+ *         #TAPI_API_SUCCESS indicates that the operation has completed successfully\n
+ *         Refer #TapiResult_t for failure and an error code.
+ *
+ * @par Prospective Clients: External Apps.
+ */
+int tel_get_network_default_data_subscription(TapiHandle *handle, TelNetworkDefaultDataSubs_t *default_subscription);
+
+/**
+ * @brief This function is called to set the Subscription (related to #TapiHandle) as 'default' Subscription for CS (Voice).
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ */
+int tel_set_network_default_subscription(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief This function is called to get the Subscription which is configured as 'default' Subscription for CS (Voice).
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param [out] default_subscription
+ * - 'default' Subscription for CS (Voice).
+ * - Refer #TelNetworkDefaultSubs_t for Subscription details
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ */
+int tel_get_network_default_subscription(TapiHandle *handle, TelNetworkDefaultSubs_t *default_subscription);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ITAPI_NETWORK_H_ */
+
+/**
+ * @}
+ */
diff --git a/include/ITapiPhonebook.h b/include/ITapiPhonebook.h
new file mode 100644 (file)
index 0000000..70e6ef9
--- /dev/null
@@ -0,0 +1,294 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file ITapiPhonebook.h
+ */
+
+/**
+ * @internal
+ * @addtogroup CAPI_TELEPHONY_SERVICE_PHONEBOOK
+ * @{
+ */
+
+#ifndef _ITAPI_PHONEBOOK_H_
+#define _ITAPI_PHONEBOOK_H_
+
+#include <tapi_common.h>
+#include <TelSim.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @brief Gets the current inserted SIM phonebook init status, available phonebook list, and first valid index in case of FDN, ADN, and 3G phonebook.
+ *
+ * @details Access to this API is limited to in-house applications and phonebook-engine APIs are recommended instead. \n
+ *
+ *          <b> Sync (or) Async: </b> This is a synchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> External Apps. \n
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @remarks You must use phonebook-engine APIs to handle a phonebook (including SIM phonebook).
+ *          If a user uses SIM phonebook related APIs directly, it can break device phonebook consistency because of all the phonebook information managed in the phonebook-engine.
+ *          The @a pb_list and @a first_index value are available when the @a init_completed status is '1' only.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[out] init_completed The phonebook init status to use - '0' is not init, '1' is init complete
+ *
+ * @param[out] pb_list The available SIM phonebook list; this value is valid in the phonebook init complete case
+ *
+ * @return The return type (int)\n
+ *         Integer '0' ( same with #TAPI_API_SUCCESS ) - indicates that the operation is completed successfully\n
+ *         Negative integer - It provides an error code (Refer #TapiResult_t).
+ */
+int tel_get_sim_pb_init_info(TapiHandle *handle, int *init_completed, TelSimPbList_t *pb_list);
+
+/**
+ * @brief Gets the number of used records and total records of a specific SIM phonebook type.
+ *
+ * @details Access to this API is limited to in-house applications and phonebook-engine APIs are recommended instead. \n
+ *          This function makes a Dbus method call to the Telephony Server and returns an immediate value.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is delivered in the corresponding event asynchronously.
+ *
+ *          <b> Sync (or) Async: </b> This is an Asynchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @remarks You must use phonebook-engine APIs to handle a phonebook(including SIM phonebook).
+ *          If the user uses SIM phonebook related APIs directly, it can break device phonebook consistency because of all the phonebook information managed in the phonebook-engine.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] pb_type The different storage types to be selected in the SIM; #TelSimPbType_t
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)\n
+ *         Integer '0' ( same with #TAPI_API_SUCCESS ) - indicates that the operation is completed successfully\n
+ *         Negative integer - It provides an error code (Refer #TapiResult_t).
+ *
+ * @pre Initialize the Dbus connection with #tel_init.
+ */
+int tel_get_sim_pb_count(TapiHandle *handle, TelSimPbType_t pb_type, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets the max text length and max number length supported by the SIM phone book elementary file.
+ *
+ * @details Access to this API is limited to in-house applications and phonebook-engine APIs are recommended instead. \n
+ *          This function makes a Dbus method call to the Telephony Server and returns an immediate value.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ *         <b> Sync (or) Async: </b> This is an Asynchronous API. \n
+ *
+ *         <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @remarks The max number length includes the storage space provided by the corresponding EXT file for a given Dialling Number file.\n
+ *          You must use phonebook-engine APIs to handle a phonebook(including SIM phonebook).
+ *          If a user uses SIM phonebook related APIs directly, it can break device phonebook consistency because of all the phonebook information managed in the phonebook-engine.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] pb_type The different storage types to be selected in the SIM; #TelSimPbType_t
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)\n
+ *         Integer '0' ( same with #TAPI_API_SUCCESS ) - indicates that the operation is completed successfully \n
+ *         Negative integer : It provides an error code (Refer #TapiResult_t).
+ *
+ * @pre Initialize the Dbus connection with #tel_init.
+ */
+int tel_get_sim_pb_meta_info(TapiHandle *handle, TelSimPbType_t pb_type, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets SIM 3G phonebook supported EFs like ANR, SNE, GRP, EMAIL and the corresponding EFs max text length, number length, and size.
+ *
+ * @details Access to this API is limited to in-house applications and phonebook-engine APIs are recommended instead. \n
+ *          This function makes a Dbus method call to the Telephony Server and returns an immediate value.
+ *          However, it just means that the API request has been transferred to the CP successfully.
+ *          The actual operation result is delivered in the corresponding event asynchronously.
+ *
+ *          <b> Sync (or) Async: </b> This is an Asynchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @remarks You must use phonebook-engine APIs to handle a phonebook (including SIM phonebook).
+ *          If a user uses SIM phonebook related APIs directly, it can break device phonebook consistency because of all the phonebook information managed in the phonebook-engine.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)\n
+ *         Integer '0' ( same with #TAPI_API_SUCCESS ) - indicates that the operation is completed successfully\n
+ *         Negative integer : It provides an error code (Refer #TapiResult_t).
+ *
+ * @pre Initialize Dbus connection with #tel_init\n
+ */
+int tel_get_sim_pb_usim_meta_info(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Reads SIM phone book entry information from the given storage type and index.
+ *
+ * @details Access to this API is limited to in-house applications and phonebook-engine APIs are recommended instead. \n
+ *          This function makes a Dbus method call to the Telephony Server and returns an immediate value.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ *          <b> Sync (or) Async: </b> This is an Asynchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @remarks The index ranges from 1 to a maximum of 254 for a Linear fixed file and 255 for a cyclic file.\n
+ *          You must use phonebook-engine APIs to handle a phonebook (including SIM phonebook).
+ *          If a user uses SIM phonebook related APIs directly, it can break device phonebook consistency because of all the phonebook information managed in the phonebook-engine.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] pb_type The different storage types to be selected in the SIM; #TelSimPbType_t
+ *
+ * @param[in] pb_index The index for accessing the SIM data
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)\n
+ *         Integer '0' ( same with #TAPI_API_SUCCESS ) - indicates that the operation is completed successfully\n
+ *         Negative integer : It provides an error code (Refer #TapiResult_t)
+ *
+ * @pre Initialize the Dbus connection with #tel_init.
+ */
+int tel_read_sim_pb_record(TapiHandle *handle, TelSimPbType_t pb_type, unsigned short pb_index, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Adds or edits SIM phone book record entry information.
+ *
+ * @details Access to this API is limited to in-house applications and phonebook-engine APIs are recommended instead. \n
+ *          This function makes a Dbus method call to the Telephony Server and returns an immediate value.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is delivered in the corresponding event asynchronously. \n
+ *
+ *         <b> Sync (or) Async: </b> This is an Asynchronous API. \n
+ *
+ *         <b> Prospective Clients: </b> External Apps. \n
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks You must use phonebook-engine APIs to handle a phonebook (including SIM phonebook).
+ *          If a user uses SIM phonebook related APIs directly, it can break device phonebook consistency because of all the phonebook information managed in the phonebook-engine.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] req_data The phonebook data to be updated or added; #TelSimPbRecord_t
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)\n
+ *         Integer '0' ( same with #TAPI_API_SUCCESS ) - indicates that the operation is completed successfully\n
+ *         Negative integer : It provides an error code (Refer #TapiResult_t).
+ *
+ * @pre Initialize the Dbus connection with #tel_init.
+ */
+int tel_update_sim_pb_record(TapiHandle *handle, const TelSimPbRecord_t *req_data, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Deletes a SIM phonebook record.
+ *
+ * @details Access to this API is limited to in-house applications and phonebook-engine APIs are recommended instead. \n
+ *          This function makes a Dbus method call to the Telephony Server and returns an immediate value.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is delivered in the corresponding event asynchronously.
+ *
+ *          <b> Sync (or) Async: </b> This is an Asynchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks The index ranges from 1 to a maximum of 254 for a Linear fixed file and 255 for a cyclic file.\n
+ *          You must use phonebook-engine APIs to handle a phonebook(including SIM phonebook).
+ *          If the user uses SIM phonebook related APIs directly, it can break device phonebook consistency because of all the phonebook information managed in the phonebook-engine.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] pb_type The different storage types to be selected in the SIM; #TelSimPbType_t
+ *
+ * @param[in] pb_index The index of the record to be deleted
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)\n
+ *         Integer '0' ( same with #TAPI_API_SUCCESS ) - indicates that the operation is completed successfully\n
+ *         Negative integer : (It provides an error code (Refer #TapiResult_t).
+ *
+ * @pre Initialize the Dbus connection with #tel_init.
+ */
+int tel_delete_sim_pb_record(TapiHandle *handle, TelSimPbType_t pb_type, unsigned short pb_index, tapi_response_cb callback, void *user_data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ITAPI_PHONEBOOK_H_ */
+
+/**
+* @}
+*/
diff --git a/include/ITapiSap.h b/include/ITapiSap.h
new file mode 100644 (file)
index 0000000..a047bb7
--- /dev/null
@@ -0,0 +1,222 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file ITapiSap.h
+ */
+
+/**
+ * @internal
+ * @addtogroup CAPI_TELEPHONY_SERVICE_SAP
+ * @{
+ */
+
+#ifndef _ITAPI_SAP_H_
+#define _ITAPI_SAP_H_
+
+#include <tapi_common.h>
+#include <TelSim.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @brief Requests to connect SAP.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.\n
+ *
+ *          <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[in] max_msg_size The maximum message size
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int) \n
+ *         Integer '0' ( same with #TAPI_API_SUCCESS ): indicates that the operation has completed successfully \n
+ *         Negative integer : It provides an error code (Refer #TapiResult_t).
+ */
+int tel_req_sap_connect(TapiHandle *handle, int max_msg_size, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Requests to disconnect SAP.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.\n
+ *
+ *          <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int) \n
+ *         Integer '0' ( same with #TAPI_API_SUCCESS ): indicates that the operation has completed successfully \n
+ *         Negative integer : It provides an error code (Refer #TapiResult_t).
+ */
+int tel_req_sap_disconnect(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Requests for the SAP connection status.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.\n
+ *
+ *          <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int) \n 
+ *         Integer '0' ( same with #TAPI_API_SUCCESS ): indicates that the operation has completed successfully \n 
+ *         Negative integer : It provides an error code (Refer #TapiResult_t).
+ */
+int tel_req_sap_connection_status(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Requests to get atr.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.\n
+ *
+ *          <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int) \n 
+ *         Integer '0' ( same with #TAPI_API_SUCCESS ): indicates that the operation has completed successfully \n 
+ *         Negative integer : It provides an error code (Refer #TapiResult_t).
+ */
+int tel_req_sap_transfer_atr(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Requests to transfer APDU.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.\n
+ *
+ *          <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[in] apdu_data The APDU data
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int) \n 
+ *         Integer '0' ( same with #TAPI_API_SUCCESS ): indicates that the operation has completed successfully \n 
+ *         Negative integer : It provides an error code (Refer #TapiResult_t).
+ */
+int tel_req_sap_transfer_apdu(TapiHandle *handle, TelSapApduData_t *apdu_data, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Requests to transport protocol.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.\n
+ *
+ *          <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[in] protocol The SAP transport protocol type
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)\n 
+ *         Integer '0' ( same with #TAPI_API_SUCCESS ): indicates that the operation has completed successfully\n
+ *         Negative integer : It provides an error code (Refer #TapiResult_t).
+ */
+int tel_req_sap_transport_protocol(TapiHandle *handle, TelSimSapProtocol_t protocol, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Requests to control power mode.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.\n
+ *
+ *          <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[in] power_mode The data to control the power mode of client
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int) \n 
+ *         Integer '0' ( same with TAPI_API_SUCCESS ): indicates that the operation has completed successfully \n 
+ *         Negative integer : It provides an error code (Refer #TapiResult_t).
+ */
+int tel_req_sap_power_operation(TapiHandle *handle, TelSimSapPowerMode_t power_mode, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Requests to get the card reader status.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.\n
+ *
+ *          <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[in] callback To register a callback function for result
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int) \n 
+ *         Integer '0' ( same with #TAPI_API_SUCCESS ): indicates that the operation has completed successfully \n
+ *         Negative integer : It provides an error code (Refer #TapiResult_t).
+ */
+int tel_req_sap_cardreader_status(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ITAPI_SAP_H_ */
+
+/**
+ * @}
+ */
diff --git a/include/ITapiSat.h b/include/ITapiSat.h
new file mode 100644 (file)
index 0000000..b6dc22a
--- /dev/null
@@ -0,0 +1,264 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file ITapiSat.h
+ */
+
+/**
+ * @internal
+ * @addtogroup CAPI_TELEPHONY_SERVICE_SAT
+ * @{
+ */
+
+#ifndef _ITAPI_SAT_H_
+#define _ITAPI_SAT_H_
+
+#include <tapi_common.h>
+#include <TelSat.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @brief Sends the user choice of the main menu options to the USIM.
+ *
+ * @details <b> Notes: </b>
+ *          A set of possible menu options are supplied by the USIM
+ *          using the proactive command SET UP MENU. The telephony server receives the command
+ *          and publishes this information. The SAT UI application should list the menu when it is initially launched.
+ *          If the user subsequently chooses an option, then the SAT UI application replies to
+ *          the command with the user's choice using this API. \n
+ *
+ *          This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is delivered with the async response as below. \n
+ *
+ *          <b> Sync (or) Async: </b> This is an Asynchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> SAT-UI.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks You must not use this function. This function is dedicated to the SAT UI embedded application only.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] pMenuSelect #TelSatMenuSelectionReqInfo_t contains information like which SAT menu item has been selected or whether help is required
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)\n
+ *         #TAPI_API_SUCCESS - indicates that the operation has completed successfully,\n
+ *         else it will return failure and an error code (Refer #TapiResult_t).
+ *
+ * @pre This function is supposed to be called after getting the #TAPI_EVENT_SAT_SETUP_MENU_IND event from the telephony server.
+ *
+ * @see tel_get_sat_main_menu_info()
+ */
+int tel_select_sat_menu(TapiHandle *handle, const TelSatMenuSelectionReqInfo_t* pMenuSelect, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Downloads SAT events to the USIM.
+ *
+ * @details <b> Notes: </b>
+ *          A set of events for the terminal to monitor can be supplied by the USIM using the proactive command SET UP EVENT
+ *          LIST. If the USIM has sent this command, and an event which is part of the list subsequently occurs, the terminal
+ *          informs the USIM using this function, relevant for that event.
+ *          If the USIM commands to monitor a browser termination event, the SAT-UI application has to call this function. \n
+ *
+ *          This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is delivered with the async response as below. \n
+ *
+ *          <b> Sync (or) Async: </b> This is an Asynchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> SAT-UI \n
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks You must not use this function. This function is dedicated to the SAT UI embedded application only.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] pEventData #TelSatEventDownloadReqInfo_t contains the necessary parameters like event types and information associated with it
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int) \n
+ *         #TAPI_API_SUCCESS - indicates that the operation is completed successfully, \n
+ *         else it will return failure and an error code (Refer #TapiResult_t).
+ *
+ * @pre A SET UP EVENT LIST proactive command supplies a set of events to monitor.
+ */
+int tel_download_sat_event(TapiHandle *handle, const TelSatEventDownloadReqInfo_t*  pEventData, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Sends the UI display status of the alpha identifier of a specific proactive command to the Telephony Server.
+ *
+ * @details When SAT-UI receives a proactive command, SAT-UI should draw a UI for the relevant command.
+ *          As it completes, SAT-UI informs the USIM by calling this function. Afterwards, the USIM is getting ready to send another command. \n
+ *
+ *          This function makes a Dbus method call to the Telephony Server and gets an immediate feedback. \n
+ *
+ *          <b> Sync (or) Async: </b> This is a Synchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> SAT-UI \n
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks You must not use this function. This function is dedicated to the SAT UI embedded application only.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] commandId The proactive command ID from the application
+ *
+ * @param[in] status #TelSatUiDisplayStatusType_t contains the display status(SUCCESS/FAIL)
+ *
+ * @return The return type (int)\n
+ *         #TAPI_API_SUCCESS - indicates that the operation has completed successfully,\n
+ *         else it will return failure and an error code (Refer #TapiResult_t).
+ *
+ * @pre The display request for the alpha identifier of a Proactive Command should be sent by the Telephony Server.
+ *
+ * @post If the display status is SUCCESS, the Telephony Server sends a request to the application for Proactive Command Execution.
+ *       If the display status is FAIL, the Telephony Server sends a Terminal Response for the Proactive Command.
+ */
+int tel_send_sat_ui_display_status(TapiHandle *handle, int commandId, TelSatUiDisplayStatusType_t status);
+
+/**
+ * @brief Sends UI User confirmation data for a specific Proactive Command to the Telephony Server.
+ *
+ * @details In case the proactive commands need user response, SAT-UI can send it using this function.
+ *          The response can be 'OK', 'Cancel', 'Move Back', and 'End Session'. Upon this response, the USIM can send
+ *          a proactive command subsequently to indicate the next UI action. \n
+ *
+ *          This function makes a Dbus method call to the Telephony Server and gets an immediate feedback. \n
+ *
+ *          <b> Sync (or) Async: </b> This is a synchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> SAT-UI. \n
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks You must not use this function. This function is dedicated to the SAT UI embedded application only.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] pUserConfirmData #TelSatUiUserConfirmInfo_t contains specific user confirmation data
+ *
+ * @return The return type (int)\n
+ *         #TAPI_API_SUCCESS - indicates that the operation has completed successfully,\n
+ *         else it will return failure and an error code (Refer #TapiResult_t).
+ *
+ * @pre The User Confirmation request for a specific Proactive Command should be sent to the application by the Telephony Server.
+ *
+ * @post If the User Confirmation is positive, the Telephony Server sends a request to the application for Proactive Command Execution.
+ *       If the User Confirmation is negative, the Telephony Server sends a Terminal Response for the Proactive Command.
+ */
+int tel_send_sat_ui_user_confirm(TapiHandle *handle, TelSatUiUserConfirmInfo_t *pUserConfirmData);
+
+/**
+ * @brief Provides SAT(Sim Application toolkit) Main Menu information for SAT-UI.
+ *
+ * @details Once the USIM supplies the SET UP MENU proactive command, the telephony server not only publishes the
+ *          #TAPI_EVENT_SAT_SETUP_MENU_IND event but also caches the menu information.
+ *          The SAT-UI application can get the menu list using this function. \n
+ *
+ *          This function makes a Dbus method call to the Telephony Server and gets an immediate feedback. \n
+ *
+ *         <b> Sync (or) Async: </b> This is a Synchronous API. \n
+ *
+ *         <b> Prospective Clients: </b> SAT-UI.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @remarks You must not use this function. This function is dedicated to the SAT UI embedded application only.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[out] pMainMenu #TelSatSetupMenuInfo_t contains all menu related information which is required such as a menu title, an icon, an item count, and so on
+ *
+ * @return The return type (int)\n
+ *         #TAPI_API_SUCCESS - indicates that the operation has completed successfully,\n
+ *         else it will return failure and an error code (Refer #TapiResult_t).
+ *
+ * @pre When SAT SIM is inserted we can get meaningful data. Without SAT SIM, null is returned.
+ *
+ * @see tel_select_sat_menu()
+ */
+int tel_get_sat_main_menu_info(TapiHandle *handle, TelSatSetupMenuInfo_t *pMainMenu);
+
+/**
+ * @brief Provides the Operation result(s) for Proactive Command execution by the Application(s) to the Telephony Server.
+ *
+ * @details The USIM commands the terminal to do some predefined action, such as sending a short message,
+ *          making a voice call, launching an Internet browser, and so on. Those actions are defined by 3GPP TS31.111.
+ *          Once an application executes the requested action by USIM, it reports the operation result to the USIM using this function. \n
+ *
+ *          This function makes a Dbus method call to the Telephony Server and gets an immediate feedback. \n
+ *
+ *          <b> Sync (or) Async: </b> This is a Synchronous API. \n
+ *
+ *          <b> Prospective Clients: </b> Embeded applications which are predefined by 3GPP TS31.111.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks You must not use this function. This function is dedicated to the SAT UI embedded application only.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[out] pAppRetInfo #TelSatAppsRetInfo_t contains an execution result of a specific proactive command by the application
+ *
+ * @return The return type (int)\n
+ *         #TAPI_API_SUCCESS - indicates that the operation has completed successfully,\n
+ *         else it will return failure and an error code (Refer #TapiResult_t).
+ *
+ * @pre The Proactive Command execution request should be sent by the Telephony Server to SAT related applications.
+ */
+int tel_send_sat_app_exec_result(TapiHandle *handle, TelSatAppsRetInfo_t *pAppRetInfo);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ITAPI_SAT_H_ */
+
+/**
+ * @}
+ */
diff --git a/include/ITapiSim.h b/include/ITapiSim.h
new file mode 100644 (file)
index 0000000..f0a8a18
--- /dev/null
@@ -0,0 +1,940 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ITAPI_SIM_H_
+#define _ITAPI_SIM_H_
+
+/**
+ * @file ITapiSim.h
+ */
+
+/**
+ * @internal
+ * @addtogroup CAPI_TELEPHONY_SERVICE_SIM
+ * @{
+ */
+
+#include <tapi_common.h>
+#include <TelSim.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @brief Gets SIM card initialization status and SIM card identification.
+ * @details Most of the modules which require SIM data should definitely check SIM status before using it.\n
+ *
+ * <b> Sync (or) Async: </b> This is a Synchronous API.\n
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @remarks Card identification value is available in case of #TAPI_SIM_STATUS_SIM_INIT_COMPLETED only.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[out] sim_status The SIM initialization status from the Telephony server boot up time \n
+ *                        First, you can find SIM existence if the returned value is not in #TAPI_SIM_STATUS_CARD_NOT_PRESENT and #TAPI_SIM_STATUS_CARD_REMOVED.
+ *
+ * @param[out] card_changed The SIM card identification value when @a sim_status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED \n
+ *                          The @a card_changed value is present when the current inserted SIM card differs from the previous SIM.
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
+ */
+int tel_get_sim_init_info(TapiHandle *handle, TelSimCardStatus_t *sim_status, int *card_changed);
+
+/**
+ * @brief Gets the card type (SIM/USIM).
+ * @details <b> Sync (or) Async: </b> This is a Synchronous API.\n
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[out] card_type The SIM card type information such as GSM SIM card, USIM, and other unknown types
+ *                       TAPI_SIM_CARD_TYPE_UNKNOWN
+ *                       TAPI_SIM_CARD_TYPE_GSM
+ *                       TAPI_SIM_CARD_TYPE_USIM
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation is completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code while actual operations (Refer #TelSimAccessResult_t)
+ */
+int tel_get_sim_type(TapiHandle *handle, TelSimCardType_t *card_type);
+
+/**
+ * @brief Gets IMSI information.
+ * @details <b> Sync (or) Async: </b> This is a Synchronous API.\n
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @remarks IMSI value is the value that security requires.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[out] imsi The IMSI information \n
+ *                  Refer #TelSimImsiInfo_t.
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
+ *
+ * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ */
+int tel_get_sim_imsi(TapiHandle *handle, TelSimImsiInfo_t *imsi);
+
+/**
+ * @brief Gets ECC(SIM) or UECC(USIM) data.
+ * @details <b> Sync (or) Async: </b> This is a Synchronous API.\n
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[out] ecc The SIM emergency call code information like ECC length, service type, and the number of ECC records
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
+ *
+ * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ */
+int tel_get_sim_ecc(TapiHandle *handle, TelSimEccList_t *ecc);
+
+/**
+ * @brief Gets the unique identification number of the (U)ICC.
+ * @details ICC means Integrated Circuit Card.\n
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @remarks ICC number value is the value that security needs.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation is completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
+ *
+ * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ */
+int tel_get_sim_iccid(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets language preference(indication) information.
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.\n
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
+ *
+ * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ */
+int tel_get_sim_language(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Updates language preference information to the SIM card.
+ *
+ * @details This function makes a Dbus method call to the Telephony Server and returns an immediate value.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is being delivered in the corresponding event asynchronously.\n
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks This function updates SIM Language information directly and can have an effect on the device language setting. Use carefully.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] language The language preference information
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
+ */
+int tel_set_sim_language(TapiHandle *handle, TelSimLanguagePreferenceCode_t language, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets SIM call forwarding indication related data(EF-CFIS and CPHS case).
+ * @details This data is required for Call forwarding related functionality in the handset.\n
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
+ *
+ * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ */
+int tel_get_sim_callforwarding_info(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Sets SIM call forwarding indication related data(EF-CFIS and CPHS case).
+ * @details This data is required for Call forwarding related functionality in the handset.\n
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] req_cf The data requesting for call forwarding
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
+ *
+ * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ */
+int tel_set_sim_callforwarding_info(TapiHandle *handle, TelSimCallForwardingReq_t *req_cf, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets SIM message waiting indication related data(EF-MWIS and CPHS case).
+ * @details This data is required for Message waiting related functionality in the handset.\n
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
+ *
+ * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ */
+int tel_get_sim_messagewaiting_info(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Sets SIM message waiting indication related data(EF-MWIS and CPHS case).
+ * @details This data is required for Message waiting related functionality in the handset.\n
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] req_mw The data requesting for message waiting
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
+ *
+ * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ */
+int tel_set_sim_messagewaiting_info(TapiHandle *handle, TelSimMessageWaitingReq_t *req_mw, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets SIM mailbox related data(EF-MBDN, MBDI, and CPHS case).
+ * @details This data is required for Mailbox related functionality in the handset.\n
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
+ *
+ * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ */
+int tel_get_sim_mailbox_info(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Sets SIM mailbox related data(EF-MBDN, MBDI and CPHS case).
+ * @details This data is required for Mailbox related functionality in the handset.\n
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] req_mb The data requesting for mailbox info
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
+ *
+ * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ */
+int tel_set_sim_mailbox_info(TapiHandle *handle, TelSimMailBoxNumber_t *req_mb, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets SIM CPHS specific data.
+ * @details This data is required for CPHS related functionality in the handset.\n
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
+ *         Negative integer : it provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : it provides an error code during actual operations (Refer #TelSimAccessResult_t)
+ *
+ * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ */
+int tel_get_sim_cphs_info(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets the SIM Service Table.
+ * @details This data is required to know which SIM services are enabled or disabled.\n
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
+ *
+ * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ */
+int tel_get_sim_service_table(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets SIM MSISDN data.
+ * @details Regarding 3GPP specification, the current value is optional.\n
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
+ *
+ * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ */
+int tel_get_sim_msisdn(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets SIM OPLMNWACT(Operator controlled PLMN Selector with Access Technology) data.
+ * @details Regarding 3GPP specification, the current value is optional.\n
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code while actual operations (Refer #TelSimAccessResult_t)
+ *
+ * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ */
+int tel_get_sim_oplmnwact(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets SIM SPN data.
+ * @details Regarding 3GPP specification, the current value is optional.\n
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
+ *
+ * @pre The user can get valid return value or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ */
+int tel_get_sim_spn(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets SIM CPHS NETNAME data.
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.\n
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
+ *
+ * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ */
+int tel_get_sim_cphs_netname(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Executes an authentication procedure by using SIM.
+ *
+ * @details This function makes a Dbus method call to the Telephony Server and returns an immediate value.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is delivered in the corresponding event asynchronously.\n
+ *          This function supports IMS, 3G, and GSM authentication.\n
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.\n
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] authentication_data The authentication code to be validated by the ISIM, 3G, and GSM application in the SIM card \n
+ *                                Refer #TelSimAuthenticationData_t.
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
+ */
+int tel_req_sim_authentication(TapiHandle *handle, TelSimAuthenticationData_t *authentication_data, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Performs PIN1/PIN2/SIM LOCK verification.
+ * @details This function performs PIN verification based on the PIN type passed along with @a pin_data:\n
+ *          PIN1 code: The SIM card has its own password to check access permissions.\n
+ *          SIM Lock code: Between Device and SIM card using a SIM password is only available on certain handsets to authorize.\n
+ *
+ *          This function makes a Dbus method call to the Telephony Server and returns an immediate value.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is delivered in the corresponding event asynchronously.
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks If the PIN status (PIN/PUK/SIM LOCK) is blocked, an unsolicited event #TAPI_EVENT_SIM_STATUS_IND will be published to Applications on Device boot time.
+ *          If the PIN status is PUK, you should use #tel_verify_sim_puks instead of this API.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] pin_data The PIN code, entered by the user \n
+ *                     You should make all the parameters.
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation is completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
+ *
+ * @pre This API is used when #TelSimCardStatus_t is #TAPI_SIM_STATUS_SIM_PIN_REQUIRED or #TAPI_SIM_STATUS_SIM_LOCK_REQUIRED on boot time.
+ */
+int tel_verifiy_sim_pins(TapiHandle *handle, const TelSimSecPw_t *pin_data, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Performs PIN1/PIN2 unblocking operation based on PUK information passed along with
+ *        unblock information entered by the user.
+ *
+ * @details If you get the SIM card status (#TAPI_SIM_STATUS_SIM_PUK_REQUIRED) using #tel_get_sim_init_info on boot time
+ *          or (#TAPI_SIM_PIN_STATUS_BLOCKED) using #tel_get_sim_facility after normal initialization for a specific operation,
+ *          you may unblock PIN1/PIN2.
+ *
+ *          This function makes a Dbus method call to the Telephony Server and returns an immediate value.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is delivered in the corresponding event asynchronously.
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks If the PIN status (PIN1/PIN2) is blocked, an unsolicited event #TAPI_EVENT_SIM_STATUS_IND
+ *          will be published to Applications on boot time.
+ *          If you exceed the specified number of attempts to unblock PIN, the SIM card will be blocked permanently.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] puk_data The unblocking PIN password #TelSimSecPw_t
+ *
+ * @param[in] new_pin_data The PIN password to use after the unblocking operation #TelSimSecPw_t
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
+ *
+ * @pre PIN1 or PIN2 status should be #TAPI_SIM_PIN_STATUS_BLOCKED and Card status should be #TAPI_SIM_STATUS_SIM_PUK_REQUIRED on boot time.
+ *
+ * @post After success on unblocking for PIN1 or PIN2, each pin check facility is enabled even if the previous facility is disabled.
+ */
+int tel_verify_sim_puks(TapiHandle *handle, const TelSimSecPw_t *puk_data, const TelSimSecPw_t *new_pin_data, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Changes the PIN1/PIN2 code based on the PIN type passed along with old PIN data and new PIN data.
+ *
+ * @details This function makes a Dbus method call to the Telephony Server and returns an immediate value.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is delivered in the corresponding event asynchronously.
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks The user should set the same PIN type for both @a old_pin and @a new_pin.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] old_pin The old PIN code entered by the user \n
+ *                    Refer #TelSimSecPw_t.
+ *
+ * @param[in] new_pin The new PIN code entered by the user \n 
+ *                    Refer #TelSimSecPw_t.
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation is completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
+ *
+ * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ */
+int tel_change_sim_pins(TapiHandle *handle, const TelSimSecPw_t *old_pin, const TelSimSecPw_t *new_pin, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Disables the SIM facility.
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] pw A structure which contains the facility type and password
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
+ */
+int tel_disable_sim_facility(TapiHandle *handle, TelSimFacilityPw_t *pw, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Enables the SIM facility.
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] pw A structure which contains the facility type and password
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
+ */
+int tel_enable_sim_facility(TapiHandle *handle, TelSimFacilityPw_t *pw, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets the SIM facility.
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] type The type of security lock
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
+ */
+int tel_get_sim_facility(TapiHandle *handle, TelSimLockType_t type, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets SIM LOCK TYPE info.
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] type The type of security lock
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
+ */
+int tel_get_sim_lock_info(TapiHandle *handle, TelSimLockType_t type, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  Sets the SIM power state.
+ *
+ * @details <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param [in] handle The handle from tel_init()
+ *
+ * @param[in] state The state of SIM to be set \n
+ *                  It is either ON or OFF.
+ *
+ * @param [in] callback To register a callback function for result
+ *
+ * @param [in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_SIM_POWER_SET_SUCCESS ) - indicates that the operation has completed successfully
+ *         Positive integer : It provides an error code while actual operations (Refer #TelSimPowerSetResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ */
+int tel_set_sim_power_state(TapiHandle *handle, TelSimPowerState_t state, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Provides a common interface for accessing SIM data.
+ *
+ * @details This function is based on the USIM generic command in ETSI TS 102 221
+ *          and 3GPP TS 31.102 Characteristics of the Universal Subscriber Identity Module (USIM) application.
+ *
+ *          This API provides only an interface to send APDU. The user should know well how to use APDU.
+ *
+ *          This function makes a Dbus method call to the Telephony Server and returns an immediate value.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] apdu_data The APDU data
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS )  - indicates that the operation has completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
+ *
+ * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ */
+int tel_req_sim_apdu(TapiHandle *handle, TelSimApdu_t* apdu_data, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Provides a common interface to get the SIM ATR(Answer To Reset) value.
+ *
+ * @details This function makes a Dbus method call to the Telephony Server and returns an immediate value.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is delivered in the corresponding event asynchronously.
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int)
+ *         Integer '0' ( same with #TAPI_API_SUCCESS & #TAPI_SIM_ACCESS_SUCCESS ) - indicates that the operation has completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *         Positive integer : It provides an error code during actual operations (Refer #TelSimAccessResult_t)
+ *
+ * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ */
+int tel_req_sim_atr(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @breif Gets the list of application on UICC.
+ * @details It is possible to have multiple applications on single UICC.
+ *
+ * <b> Sync (or) Async: </b> This is Synchronous API.
+ *
+ * @since_tizen 2.4
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ * @param[out] app_list The masking value for below values
+ *                      #TAPI_SIM_APP_TYPE_SIM 0x01 GSM Application
+ *                      #TAPI_SIM_APP_TYPE_USIM 0x02 USIM Application
+ *                      #TAPI_SIM_APP_TYPE_CSIM 0x04 CSIM Application
+ *                      #TAPI_SIM_APP_TYPE_ISIM 0x08 ISIM Application
+ *
+ * @return The return type (int)
+ *         Integer '0' (same with #TAPI_API_SUCCESS) - indicates that the operation has completed successfully
+ *         Negative integer : It provides an error code before actual operations (Refer #TapiResult_t)
+ *
+ * @pre The user can get valid return values or make operations after SIM init completes(card status is #TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ */
+int tel_get_sim_application_list(TapiHandle *handle, unsigned char *app_list);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ITAPI_SIM_H_ */
+
+/**
+ * @}
+ */
diff --git a/include/ITapiSs.h b/include/ITapiSs.h
new file mode 100644 (file)
index 0000000..41aee06
--- /dev/null
@@ -0,0 +1,521 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file ITapiSs.h
+ */
+
+/**
+ * @internal
+ * @addtogroup CAPI_TELEPHONY_SERVICE_SS
+ * @{
+ */
+
+#ifndef _ITAPI_SS_H_
+#define _ITAPI_SS_H_
+
+#include <tapi_common.h>
+#include <TelSs.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @brief Sends a request to activate/deactivate call barring.
+ *
+ * @details This service allows a mobile subscriber to activate barring of certain categories
+ *          of outgoing or incoming calls according to a barring program which is selected from a set
+ *          of one or more barring programs chosen at provision time and is valid for all outgoing or incoming calls, or just those associated
+ *          with a specific basic service group. Also this API allows deactivating call barring based on categories set.
+ *          If the user calls this function with a wrong password 3 times subsequently, the barring service can be blocked.
+ *          If this function is called normally, the asynchronous response comes in a few seconds from the network. The response indicates
+ *          whether the service request has been granted or not.
+ *
+ *          This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is delivered with the async response as below.
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] info The information about call barring
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int) \n
+ *         #TAPI_API_SUCCESS - indicates that the operation is completed successfully. \n
+ *         Refer #TapiResult_t for failure and error code.
+ *
+ * @pre Initialize the Dbus connection with #tel_init.
+ *
+ * @see tel_get_ss_barring_status()
+ * @see tel_change_ss_barring_password()
+ */
+int tel_set_ss_barring(TapiHandle *handle, TelSsBarringInfo_t *info, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets a call barring status.
+ *
+ * @details The mobile subscriber may determine which outgoing or incoming call should be barred
+ *          by subscribing a set of one or more unique barring programs.
+ *          If this function is called normally, the asynchronous response comes in a few seconds from the network.
+ *          The response indicates the service status.
+ *
+ *          This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is delivered with the async response as below.
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] ss_class The type of call i.e. Voice call, Video Call, and so on
+ *
+ * @param[in] type The barring type i.e. Outgoing international, outgoing all, Incoming all, and so on
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (#TapiResult_t) \n
+ *         #TAPI_API_SUCCESS - indicates that the operation is completed successfully. \n
+ *         Refer #TapiResult_t for failure and error code.
+ *
+ * @pre Initialize the Dbus connection with #tel_init.
+ *
+ * @see tel_set_ss_barring()
+ * @asee tel_change_ss_barring_password()
+ */
+int tel_get_ss_barring_status(TapiHandle *handle, TelSsClass_t ss_class, TelSsBarringType_t type, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Allows changing of the barring password in the network.
+ *
+ * @details The user can request the network to change his own barring password. If the old password is not same as
+ *          what the network knows, the request will be rejected by the network. New password should be entered separately twice
+ *          to confirm the correctness of the user input. Otherwise, the request must be rejected by the Telephony Server.
+ *          If the user calls this function with a wrong old password 3 times subsequently, the barring service can be blocked.
+ *          If this function is called normally, the asynchronous response comes in a few seconds from the network.
+ *          The response indicates whether the service request has been granted or not.
+ *
+ *          This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is delivered with the async response as below.
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @remarks Based on 3GPP TS 22.030 section 6.5.4 Registration of New Password. Only one Change Barring Password request is allowed
+ *          at a time and TS might return #TAPI_API_REQUEST_MAX_IN_PROGRESS if another request is received.
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] old_password The old password set for Barring in the Network \n
+ *                         This is a Null terminated string.
+ *
+ * @param[in] new_password The new password set for Barring in the Network \n
+ *                         This is a Null terminated string
+ *
+ * @param[in] new_password_again A new password again \n
+ *                               This is a Null terminated string
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int) \n
+ *         #TAPI_API_SUCCESS - indicates that the operation is completed successfully. \n
+ *         Refer #TapiResult_t for failure and error code.
+ *
+ * @pre Initialize the Dbus connection with #tel_init.
+ *      An event loop runs to listen to events.
+ */
+int tel_change_ss_barring_password(TapiHandle *handle,
+               const char *old_password,
+               const char *new_password,
+               const char *new_password_again,
+               tapi_response_cb callback, void *user_data);
+
+/**
+ *
+ * @brief Allows to set the (register/erase/activate/deactivate) call forwarding option at the network.
+ *
+ * @details This enables to forward the calls to another party. This service permits a called mobile subscriber
+ *          to have the network send all incoming calls, or just those associated with a specific Basic service group,
+ *          addressed to the called mobile subscriber's directory number and which meets
+ *          various call FORWARD conditions, to another directory number.
+ *          The ability of the served mobile subscriber to originate calls is unaffected.
+ *          If the service is activated, a call is forwarded only if this call forward condition occurs.
+ *          An application has to call this API in order to explicitly register/erase/activate/deactivate
+ *          call forwarding. Request will be passed irrespective of whether 
+ *          another SS call forward is already ongoing or not.
+ *
+ *          If this function is called normally, the asynchronous response comes in a few seconds from the network. The response indicates
+ *          whether the service request has been granted or not.
+ *
+ *          This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is delivered with the async response as below.
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] info The Call forward information such as a forward mode, a forward type, and so on
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int) \n
+ *         #TAPI_API_SUCCESS - indicates that the operation is completed successfully. \n
+ *         Refer #TapiResult_t for failure and error code.
+ *
+ * @pre Initialize the Dbus connection with #tel_init.
+ *
+ * @see tel_get_ss_forward_status()
+ */
+int tel_set_ss_forward(TapiHandle *handle, const TelSsForwardInfo_t *info, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Provides an option to get the call forwarding status of different calls from the Network.
+ *
+ * @details The data request procedure enables the mobile subscriber to obtain information about the data stored in the PLMN.
+ *          After having requested this procedure the network shall return the following information:\n
+ *          - In response to a general data request the served mobile subscriber should be given a list of all Basic service groups
+ *               to which call forwarding unconditional is registered, including information on whether or not it is active and operative,
+ *               and the associated forwarded-to numbers\n
+ *          - In response to a specific request concerning one particular Basic service group,
+ *               the served mobile subscriber should be informed whether or not call forwarding unconditional is registered,
+ *               including information on whether or not it is active and operative for that Basic service group.\n
+ *               If CFU is registered, the associated forwarded-to number shall be given.
+ *
+ *            If this function is called normally, the asynchronous response comes in a few seconds from the network.
+ *            The response indicates the service status.
+ *
+ *            This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.
+ *            However it just means that the API request has been transfered to the CP successfully.
+ *            The actual operation result is delivered with the async response as below.
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] ss_class The Forward call type i.e. voice call, Video Call, Data Calls, and so on
+ *
+ * @param[in] condition The forward condition i.e. unconditional, when no reply, when busy, when not reachable, and so on
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int) \n
+ *         #TAPI_API_SUCCESS - indicates that the operation is completed successfully. \n
+ *         Refer #TapiResult_t for failure and error code.
+ *
+ * @pre Initialize the Dbus connection with #tel_init.
+ *
+ * @see tel_set_ss_forward()
+ */
+int tel_get_ss_forward_status(TapiHandle *handle, TelSsClass_t ss_class, TelSsForwardWhen_t condition, tapi_response_cb callback, void *user_data);
+
+/**
+ *
+ * @brief Activates/deactivates the call waiting service.
+ *
+ * @details The call waiting service permits a mobile to be notified of an incoming
+ *          call (as per basic call procedures) while the traffic channel (BM or LM) is not available for the incoming call and the mobile subscriber
+ *          is engaged in an active or held call. Subsequently, the subscriber can accept, reject, or ignore the incoming call.
+ *          If this function is called normally, the asynchronous response comes in a few seconds from the network. The response indicates
+ *          whether the service request has been granted or not.
+ *
+ *          This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is delivered with the async response as below.
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] info The status of call-waiting service i.e. On (TRUE) or off (FALSE)
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int) \n
+ *         #TAPI_API_SUCCESS - indicates that the operation is completed successfully. \n
+ *         Refer #TapiResult_t for failure and error code
+ *
+ * @pre Initialize the Dbus connection with #tel_init.
+ *
+ * @see tel_get_ss_waiting_status()
+ */
+int tel_set_ss_waiting(TapiHandle *handle, const TelSsWaitingInfo_t *info, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets the status of the call waiting service.
+ *
+ * @details The call waiting service permits a mobile to be notified of an incoming call
+ *          (as per basic call procedures) while the traffic channel (BM or LM) is not available for the incoming call and the mobile subscriber
+ *          is engaged in an active or held call. Subsequently, the subscriber can accept, reject, or ignore the incoming call.
+ *          If this function is called normally, the asynchronous response comes in a few seconds from the network.
+ *          The response indicates the service status.
+ *
+ *          This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is delivered with the async response as below.
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] ss_class The call types
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int) \n
+ *         #TAPI_API_SUCCESS - indicates that the operation is completed successfully. \n
+ *         Refer #TapiResult_t for failure and error code
+ *
+ * @pre Initialize the Dbus connection with #tel_init.
+ *
+ * @see tel_set_ss_waiting()
+ */
+int tel_get_ss_waiting_status(TapiHandle *handle, const TelSsClass_t ss_class, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Activates/deactivates the status of the calling line identity service.
+ *
+ * @details The group of Line Identification Supplementary Services is divided into the following six Supplementary Services:\n
+ *          CLIP - Calling line identification presentation\n
+ *                 This Supplementary Service provides the ability to indicate the line identity of the calling party to the called party.
+ *                 The network shall deliver the calling line identity to the called party at call set-up time,
+ *                 regardless of the terminal capability to handle the information.\n
+ *          CLIR - Calling line identification restriction\n
+ *                    The CLIR Supplementary Service is a Supplementary Service offered to the calling party
+ *                    to prevent presentation of the calling party's line identity, to the called party.\n
+ *          COLP - Connected line identification presentation\n
+ *                 This Supplementary Service is not a dialing check but an indication to the calling subscriber
+ *                 of the connected line identity in a full ISDN/PLMN environment,
+ *                 the connected line identity shall include all the information necessary to unambiguously identify the connected party.
+ *                 The network shall deliver the connected line identity to the calling party
+ *                 regardless of the terminal capability to handle the information.\n
+ *          COLR - Connected line identification restriction\n
+ *                 The COLR Supplementary Service is a Supplementary Service offered
+ *                 to the connected party to prevent presentation of the connected line identity, to the calling party.
+ *                 In the case where the calling party has an override category.\n
+ *          CDIP - Called line identification presentation\n
+ *          CNAP - Calling name presentation\n
+ *                This function queries the service status with #TelSsCliType_t.
+ *
+ *          If this function is called normally, the asynchronous response comes in a few seconds from the network.
+ *          The response indicates the service status.
+ *
+ *          This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is delivered with the async response as below:
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] type The Cli service type
+ *
+ * @param[in] status The Cli Status
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int) \n
+ *         #TAPI_API_SUCCESS - indicates that the operation is completed successfully. \n
+ *         Refer #TapiResult_t for failure and error code
+ *
+ * @pre Initialize the Dbus connection with #tel_init.
+ */
+int tel_set_ss_cli_status(TapiHandle *handle, TelSsCliType_t type, TelSsCliStatus_t status, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Gets the status of the calling line identity service.
+ *
+ * @details The group of Line Identification Supplementary Services is divided into the following six Supplementary Services:\n
+ *          CLIP - Calling line identification presentation\n
+ *                 This Supplementary Service provides the ability to indicate the line identity of the calling party to the called party.
+ *                 The network shall deliver the calling line identity to the called party at call set-up time,
+ *                 regardless of the terminal capability to handle the information.\n
+ *          CLIR - Calling line identification restriction\n
+ *                    The CLIR Supplementary Service is a Supplementary Service offered to the calling party
+ *                    to prevent presentation of the calling party's line identity, to the called party.\n
+ *          COLP - Connected line identification presentation\n
+ *                 This Supplementary Service is not a dialing check but an indication to the calling subscriber
+ *                 of the connected line identity in a full ISDN/PLMN environment,
+ *                 the connected line identity shall include all the information necessary to unambiguously identify the connected party.
+ *                 The network shall deliver the connected line identity to the calling party
+ *                 regardless of the terminal capability to handle the information.\n
+ *          COLR - Connected line identification restriction\n
+ *                 The COLR Supplementary Service is a Supplementary Service offered
+ *                 to the connected party to prevent presentation of the connected line identity, to the calling party.
+ *                 In the case where the calling party has an override category.\n
+ *          CDIP - Called line identification presentation\n
+ *          CNAP - Calling name presentation\n
+ *                 This function queries the service status with #TelSsCliType_t.
+ *
+ *          If this function is called normally, the asynchronous response comes in a few seconds from the network.
+ *          The response indicates the service status.
+ *
+ *          This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is delivered with the async response as below:
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] type The Cli service type
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int) \n
+ *         #TAPI_API_SUCCESS - indicates that the operation is completed successfully. \n
+ *         Refer #TapiResult_t for failure and error code
+ *
+ * @pre Initialize the Dbus connection with #tel_init.
+ */
+int tel_get_ss_cli_status(TapiHandle *handle, TelSsCliType_t type, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief Sends a USSD string or User response to the Network.
+ *
+ * @details The unstructured supplementary service data (USSD) mechanism allows the Mobile Station (MS) user and
+ *          a PLMN operator defined application to communicate in a way which is transparent
+ *          to the MS and the intermediate network entities.
+ *          The mechanism allows development of PLMN specific supplementary services.
+ *          A USSD string is like *109, *109*72348937857623#.
+ *          There are two modes of USSD: The MMI-mode and the application mode.
+ *          The MMI-mode USSD is for the transparent transport of MMI strings entered by the user to the network using this function
+ *          and for the transparent transport of text strings from the network that are displayed
+ *          by the mobile for user information.
+ *          The application mode USSD is for the transparent transport of data between the network and the UE.
+ *          The application mode USSD is intended to be used by applications in the network and their peer applications in the UE.
+ *
+ *          If this function is called normally, the asynchronous response comes in a few seconds from the telephony server.
+ *          The response indicates whether the sending request is successfully delivered or not.
+ *
+ *          This API makes a Dbus method call to the Telephony Server and gets an immediate feedback.
+ *          However it just means that the API request has been transfered to the CP successfully.
+ *          The actual operation result is delivered with the async response as below:
+ *
+ * <b> Sync (or) Async: </b> This is an Asynchronous API.
+ *
+ * <b> Prospective Clients: </b> External Apps.
+ *
+ * @since_tizen 2.3
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/telephony.admin
+ *
+ * @param[in] handle The handle from tel_init()
+ *
+ * @param[in] info The data coding scheme used (GSM 7bit or 8bit default alphabet etc, defined as 3GPP TS 23.038), USSD String data length, ANSI string passed by the client
+ *
+ * @param[in] callback To register a callback function for result
+ *
+ * @param[in] user_data The user data for user specification
+ *
+ * @return The return type (int) \n
+ *         #TAPI_API_SUCCESS - indicates that the operation is completed successfully. \n
+ *         Refer #TapiResult_t for failure and error code
+ *
+ * @pre Initialize the Dbus connection with #tel_init.\n
+ *      Register the telephony event to be listend with #tel_register_noti_event.\n
+ *      An event loop runs to listen to events.
+ *      No SS and USSD transaction should be ongoing. If there is an ongoing transaction, a new USSD request will be returned to the application with an error (USSD_BUSY).
+ *
+ */
+int tel_send_ss_ussd_request(TapiHandle *handle, const TelSsUssdMsgInfo_t *info, tapi_response_cb callback, void *user_data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ITAPI_SS_H_ */
+
+/**
+ * @}
+ */
diff --git a/include/TapiUtility.h b/include/TapiUtility.h
new file mode 100644 (file)
index 0000000..292af02
--- /dev/null
@@ -0,0 +1,283 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file TapiUtility.h
+ */
+
+/**
+ * @internal
+ * @addtogroup CAPI_TELEPHONY_SERVICE
+ * @{
+ */
+
+#ifndef _TEL_UTILITY_H_
+#define _TEL_UTILITY_H_
+
+__BEGIN_DECLS
+
+/**
+ * @brief Definition for Invalid Request ID value.
+ */
+#define INVALID_REQUEST_ID     -1
+#define DBUS_DEFAULT_PATH      "/org/tizen/telephony"
+
+/**
+ * @brief Definition for negative error value
+ * @remarks If result is negative value in callback function, it comply below error.
+ */
+#define TAPI_ERROR_OPERATION_FAILED -1
+#define TAPI_ERROR_ACCESS_DENIED -2
+#define TAPI_ERROR_OPERATION_NOT_SUPPORTED -3
+
+/**
+ * @brief Enumeration for TAPI return codes.
+ */
+typedef enum {
+       TAPI_API_SUCCESS = 0, /**< No Error occurred */
+       TAPI_API_INVALID_INPUT = -1, /**< Input values are not correct in the TAPI Library */
+       TAPI_API_INVALID_PTR = -2, /**< Invalid pointer */
+       TAPI_API_NOT_SUPPORTED = -3, /**< The feature corresponding to the requested API is not supported. This may be due to market/network/vendor reasons such as the feature is not available in the network */
+       TAPI_API_DEPRICATED = -4, /**< This API is deprecated and will be so in the future also */
+       TAPI_API_SYSTEM_OUT_OF_MEM = -5, /**< Out of memory */
+       TAPI_API_SYSTEM_RPC_LINK_DOWN = -6, /**< RPC link down */
+       TAPI_API_SERVICE_NOT_READY = -7, /**< Phone is powered on, but is still to receive the power up completed notification */
+       TAPI_API_SERVER_FAILURE = -8, /**< Error occurred in the Telephony server */
+       TAPI_API_OEM_PLUGIN_FAILURE = -9, /**< Plug-in layer failure */
+       TAPI_API_TRANSPORT_LAYER_FAILURE = -10, /**< Transport layer Failure */
+       TAPI_API_INVALID_DATA_LEN = -11, /**< Invalid data length */
+       TAPI_API_REQUEST_MAX_IN_PROGRESS = -12, /**< Maximum number of API Requests for the same service are already in progress */
+       TAPI_API_OFFLINE_MODE_ERROR = -13, /**< OEM Telephony Provider is in the Offline mode */
+       TAPI_EVENT_CLASS_UNKNOWN = -14, /**< Event class specified is not present in the Event Class list */
+       TAPI_EVENT_UNKNOWN = -15, /**< Event specified is not present in the TAPI Unsolicited Event list */
+       TAPI_REGISTRATION_OP_FAILED = -16, /**< Callback Registration/De-registration failed */
+       TAPI_API_OPERATION_FAILED = -17, /**< API operation failed */
+       TAPI_API_INVALID_OPERATION = -18, /**< API Invalid Operation */
+       TAPI_API_ACCESS_DENIED = -19, /**< Access Denied */
+
+       TAPI_API_SYSTEM_RPC_LINK_NOT_EST = -100, /**< RPC link down */
+       TAPI_API_API_NOT_SUPPORTED = -101, /**< API not supported */
+       TAPI_API_SERVER_LAYER_FAILURE = -102, /**< Server layer failure */
+
+       /*      CALL */
+       TAPI_API_INVALID_CALL_ID = -200, /**< Invalid call ID */
+       TAPI_API_CALL_CTXT_OVERFLOW = -201, /**< Call context overflow */
+       TAPI_API_COULD_NOT_GET_CALL_CTXT = -202, /**< Could not get the call context */
+       TAPI_API_CTXT_SEARCH_RET_NON_CALL_CTXT = -203, /**< Context search returned the non-call context */
+       TAPI_API_COULD_NOT_DESTROY_CTXT = -204, /**< Could not destroy the context */
+       TAPI_API_INVALID_LINE_ID = -205, /**< Invalid line ID */
+       TAPI_API_INVALID_CALL_HANDLE = -206, /**< Invalid call handle */
+       TAPI_API_INVALID_CALL_STATE = -207, /**< Invalid call state - Newly added. Need to raise a CR for this */
+       TAPI_API_CALL_PRE_COND_FAILED = -208, /**< Pre condition like MO call cannot be established now */
+       TAPI_API_CALL_SAME_REQ_PENDING = -209, /**< Cannot accept the same request multiple times */
+
+       /*      POWER   */
+       TAPI_API_MODEM_POWERED_OFF = -300, /**< Modem is powered off */
+       TAPI_API_MODEM_ALREADY_ON = -301, /**< Modem is already on */
+       TAPI_API_MODEM_ALREADY_OFF = -302, /**< Modem is already off */
+
+       /* NETTEXT */
+       TAPI_API_NETTEXT_DEVICE_NOT_READY = -400, /**< Nettext device is not ready */
+       TAPI_API_NETTEXT_SCADDR_NOT_SET = -401, /**< Nettext SCA address is not set */
+       TAPI_API_NETTEXT_INVALID_DATA_LEN = -402, /**< Nettext Invalid data length */
+       TAPI_NETTEXT_SCADDRESS_NOT_SET = -403, /**< Nettext SCA address is not set */
+
+       /* SIM  */
+       TAPI_API_SIM_CARD_ERROR = -500, /**< SIM general error */
+       TAPI_API_SIM_NOT_FOUND = -501, /**< SIM is not present / removed */
+       TAPI_API_SIM_NOT_INITIALIZED = -502, /**< SIM has not initialized yet (waiting for PIN verification) */
+       TAPI_API_SIM_LOCKED = -503, /**< PIN/PUK/NCK/NSCK/SPCK/CCK required state */
+       TAPI_API_SIM_PERM_BLOCKED = -504, /**< SIM Permanently blocked state (no more allowing PUK input) */
+       TAPI_API_SIM_SERVICE_IS_DISABLED = -505, /**< Service is disabled in EF-SST due to a given operation */
+
+       /* SAT  */
+       TAPI_API_SAT_INVALID_COMMAND_ID = -600, /**< Command Number Invalid     */
+       TAPI_API_SAT_COMMAND_TYPE_MISMATCH = -601, /**< Command Type Mismatch */
+       TAPI_API_SAT_EVENT_NOT_REQUIRED_BY_USIM = -602, /**< Event Not Requested by the USIM */
+
+       /* Network */
+       TAPI_API_NETWORK_INVALID_CTXT = -700, /**< Network invalid contex t*/
+       TAPI_API_NETWORK_PLMN_NOT_ALLOWED = -701,         /** 3GPP Attache reject cause 11 */
+       TAPI_API_NETWORK_ROAMING_NOT_ALLOWED = -702, /** 3GPP Attache reject cause 13 */
+
+       /*Misc */
+       TAPI_API_MISC_RETURN_NULL = -800, /**< MISC return NULL */
+       TAPI_API_MISC_VALIDITY_ERROR = -801, /**< MISC validity error */
+       TAPI_API_MISC_INPUTPARM_ERROR = -802, /**< MISC input parameter error */
+       TAPI_API_MISC_OUTPARAM_NULL = -803, /**< MISC output parameter NULL */
+} TapiResult_t;
+
+/**
+ * @brief Checks the 'scalar_exp' for TRUE, if failed then it returns 'err_value' from the function.
+ */
+#define TAPI_RET_ERR_NUM_IF_FAIL(scalar_exp, err_num) {\
+       if (!(scalar_exp)) \
+       { \
+               err("TAPI_RET_ERR_NUM_IF_FAIL Failed. returning [%d]", err_num);\
+               return err_num; \
+       } \
+}
+
+/**
+ * @brief Returns from the current function if the expression is not true.
+ * @details If the expression evaluates to FALSE, a critical message is logged and the function returns.
+ *          This can only be used in functions which do not return a value.
+ *
+ * @param[in] scalar_exp The expression to check
+ */
+#define TAPI_RETURN_IF_FAIL(scalar_exp) {\
+       if (!scalar_exp) \
+       { \
+               err("TAPI_RETURN_IF_FAIL: Failed: Returning from here."); \
+               return; \
+       } \
+}
+
+/**
+ * @brief Returns from the current function, returning the value @a ret, if the expression is not true.
+ * @details If the expression evaluates to FALSE, a critical message is logged and @a ret is returned.
+ */
+#define TAPI_RETURN_VAL_IF_FAIL(scalar_exp, ret) { \
+       if (!scalar_exp) \
+       { \
+               err("TAPI_RETURN_VAL_IF_FAIL: Failed: Returning [%d]", ret); \
+               return ret; \
+       } \
+}
+
+/**
+ * @brief Returns from the current function, returning the value @a ret, if the expression is not true.
+ * @details If the expression evaluates to FALSE, a critical message is logged and @a ret is returned.
+ */
+#define TAPI_RETURN_VAL_IF_SUCCESS(scalar_exp, ret) { \
+       if (scalar_exp) \
+       { \
+               err("TAPI_RETURN_VAL_IF_SUCCESS: Failed Returning [%d]", ret); \
+               return ret; \
+       } \
+}
+
+/**
+ * @brief Logs an error on stderr and abort, if assertion failed.
+ * @details Use this only if the telephpny sevrer needs to be exited, if asertion fails.
+ */
+#define TAPI_ASSERT(scalar_exp)        assert(scalar_exp);
+
+/**
+ * @brief Returns from the current function, returning the value @a ret, if @a exp1 and @a exp2 are of the same value.
+ * @details If the equal expression evaluates to TRUE, a critical message is logged and @a ret is returned.
+ */
+#define TAPI_RETURN_VAL_IF_EQUAL(exp1, exp2, ret) {    \
+       if (exp1 == exp2) \
+       { \
+               err("TAPI_RETURN_VAL_IF_EQUAL: FAILED, Returning [%d]", ret); \
+               return ret; \
+       } \
+}
+
+/**
+ * @brief Allocates a region of the memory, which is large enough to hold n elements of size bytes each.
+ * @details The allocated region is initialized to zero.
+ */
+#define TAPI_CALLOC(ptr, no_elements, type)    \
+       ptr = (type *) calloc (no_elements , sizeof (type)); \
+       if (ptr == NULL) { \
+               perror("NULL is returned"); \
+               err("calloc error -NULL, errno is [%d]", errno); \
+               TAPI_ASSERT(ptr); \
+       }
+
+/**
+ * @brief Deletes a pointer with double free check.
+ * @details If the same pointer is passed to free twice, known as a double free.
+ *          To avoid this, set pointers to NULL after passing them to free: free(NULL) is safe (it does nothing).
+ */
+#define TAPI_FREE(ptr) \
+       if (ptr != NULL) { \
+               free(ptr); \
+               ptr = NULL; \
+       } \
+       else { \
+               err("Double Free or NULL"); \
+       }
+
+/**
+ * @brief Checks for available destination buffer size before copying source buffer data to the destination buffer.
+ * @details It asserts if the destination buffer size is less than the source buffer size.
+ */
+#define TAPI_MEMCPY(dest, src, dest_len, src_len) \
+       if (dest_len >= src_len) { \
+               memcpy(dest, src, src_len); \
+       } \
+       else { \
+               err("TAPI_MEMCPY FAILURE - dest_len(%d) < src_len(%d)", dest_len, src_len); \
+               assert(0); \
+       }
+
+/**
+ * @brief Encodes a sequence of binary data into its Base-64 stringified representation.
+ *
+ * @param[in] data The binary data to encode
+ * @param[in] len The length of data
+ * @param[out] encoded_data The encoded data
+ * @return A newly allocated, zero-terminated Base-64 encoded string representing data
+ */
+#define TAPI_BASE64_ENCODE(data, len, encoded_data) \
+       encoded_data = g_base64_encode((const guchar *)data, (gsize) len);
+
+/**
+ * @brief Decodes a sequence of Base-64 encoded text into binary data.
+ *
+ * @param[in] text The zero-terminated string with base64 text to decode
+ * @param[out] decoded_data The decoded data
+ * @param[in] ptr_out_len The length of the decoded data
+ * @return A newly allocated buffer containing the binary data representing text
+ */
+#define TAPI_BASE64_DECODE(text, decoded_data, ptr_out_len)    \
+       decoded_data = g_base64_decode((const gchar *)text, (gsize *)ptr_out_len);
+
+/**
+ * @brief Calculates the length of SCA in BCD type.
+ */
+#define TAPI_GET_LENGTH_FROM_BCD(nLength, rtn) { \
+       if (nLength <= 0) { \
+               rtn = 0; \
+       } \
+       else if ((nLength) % 2) { \
+               rtn = ((nLength) / 2) + 1; \
+       } \
+       else { \
+               rtn = (nLength) / 2; \
+       } \
+}
+
+
+#define TAPI_VALIDATE_EVENTTYPE(val_min ,val_max, type, ret) { \
+       if (type < val_min || type > val_max ) { \
+               return ret; \
+       } \
+}
+
+__END_DECLS
+
+#endif //_TEL_UTILITY_H_
+/**
+ * @}
+ */
diff --git a/include/TelCall.h b/include/TelCall.h
new file mode 100644 (file)
index 0000000..7d38d18
--- /dev/null
@@ -0,0 +1,1218 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file TelCall.h
+ */
+
+/**
+ * @internal
+ * @addtogroup CAPI_TELEPHONY_SERVICE_CALL
+ * @{
+ *
+ */
+
+#ifndef _TEL_CALL_H_
+#define _TEL_CALL_H_
+
+#include <TelSs.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Definition for the maximum length of the string for the calling party name.
+ * @since_tizen 2.3
+ */
+#define TAPI_CALLING_NAME_SIZE_MAX      80
+
+/**
+ * @brief Definition for the maximum length of the user to user signalling data string.
+ * @since_tizen 2.3
+ */
+#define TAPI_CALL_UUS_DATA_LEN_MAX      131
+
+/**
+ * @brief Definition for the maximum length of the string for display record in CDMA.
+ * @since_tizen 2.3
+ */
+#define TAPI_CALL_DISPLAY_RECORD_MAX    32
+
+/**
+ * @brief Definition for the maximum number of calls possible at a time.
+ * @since_tizen 2.3
+ */
+#define MAX_TAPI_CALL_COUNT                            6
+
+/**
+ * @brief Definition for the maximum number of calls possible in a conference call at a time.
+ * @since_tizen 2.3
+ */
+#define MAX_TAPI_CONF_CALL_COUNT               5
+
+/**
+ * @brief Definition for the invalid call handle.
+ * @details TS_UINT is used for the call handle.
+ * @since_tizen 2.3
+ */
+#define INVALID_CALL_HANDLE                            0
+
+/* Call */
+
+/**
+ * @brief Definition for the maximum dialling digit length.
+ * @since_tizen 2.3
+ */
+#define        TAPI_CALL_DIALDIGIT_LEN_MAX             82
+
+/**
+ * @brief Definition for the maximum call subaddress length.
+ * @since_tizen 2.3
+ */
+#define        TAPI_CALL_SUBADDRESS_LEN_MAX    40
+
+/**
+ * @brief Definition for the dialling number length.
+ * @since_tizen 2.3
+ */
+#define        TAPI_CALL_NUMBER_LEN_MAX                7
+
+/**
+ * @brief Definition for the maximum call context size.
+ * @since_tizen 2.3
+ */
+#define        TAPI_CONTEXT_CALL_SIZE_MAX              6
+
+/**
+ * @brief Definition for the maximum dialling number length.
+ * @since_tizen 2.3
+ */
+#define        TAPI_CALL_DIAL_NUMBER_LEN_MAX   82
+
+/**
+ * @brief Definition for the maximum Burst DTMF string length.
+ * @since_tizen 2.3
+ */
+#define        TAPI_CALL_BURST_DTMF_STRING_MAX 32
+
+/**
+ * @brief Enumeration for the call cause values.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CAUSE_SUCCESS,                                 /**< Success */
+       TAPI_CAUSE_ACCESSDISCARD,                       /**< Access discarded */
+       TAPI_CAUSE_BARR_BYOPERATOR,                 /**< Barred by operator */
+       TAPI_CAUSE_BEARERMODE_NOTIMPL,          /**< Bearer mode not implemented */
+       TAPI_CAUSE_BEARERMODE_RESTRICTED,       /**< Bearer mode restricted */
+       TAPI_CAUSE_BEARERMODE_UNAUTH,           /**< Bearer mode unauthorized */
+       TAPI_CAUSE_BEARERMODE_UNAVAIL,          /**< Bearer mode not available */
+       TAPI_CAUSE_BUSY,                                        /**< (Network/Server) busy */
+       TAPI_CAUSE_CALLMETER_EXPIRED,           /**< Call meter expired */
+       TAPI_CAUSE_CALLNO_ERROR,                        /**< Call number error */
+       TAPI_CAUSE_CKTUNAVAIL,                          /**< Circuit channel unavailable */                     //10
+       TAPI_CAUSE_CONGESTION,                          /**< Congestion occurred */
+       TAPI_CAUSE_NO_CIRCUIT_AVAIL,            /**< Circuit not available */
+       TAPI_CAUSE_DESTIN_INCOMPAT,                 /**< Destination incompatibility */
+       TAPI_CAUSE_DTMF_NOSPEECH,                       /**< No speech in DTMF */
+       TAPI_CAUSE_DTMF_REJECTED,                       /**< DTMF rejected */
+       TAPI_CAUSE_FACILITY_NOTIMPL,            /**< Facility not implemented */
+       TAPI_CAUSE_FACILITY_NOTSUBSCRIBED,      /**< Facility not subscribed */
+       TAPI_CAUSE_INCOMINGCUGCALLS_BARRED, /**< Incoming CUG Calls barred */
+       TAPI_CAUSE_INVALNUM,                            /**< Invalid number */
+       TAPI_CAUSE_MPTY_ERROR,                          /**< Multiparty error */                                                //20
+       TAPI_CAUSE_NOANSWER,                            /**< No answer */
+       TAPI_CAUSE_NONCUGMEMBER,                        /**< Non CUG member */
+       TAPI_CAUSE_NUMBERCHANGED,                       /**< Number changed */
+       TAPI_CAUSE_NUMBER_ERROR,                        /**< Number error */
+       TAPI_CAUSE_NWFAILURE,                           /**< Network failure */
+       TAPI_CAUSE_OPERATIONUNAVAIL,            /**< Operation not available */
+       TAPI_CAUSE_OUTOFORDER,                          /**< Out of order */
+       TAPI_CAUSE_PROTOCOL_ERROR,                      /**< Protocol error */
+       TAPI_CAUSE_QOSUNAVAIL,                          /**< QOS unavailable */
+       TAPI_CAUSE_REJECT,                                      /**< Rejected */                                                                //30
+       TAPI_CAUSE_REJ_FAIL,                            /**< Rejection failed */
+       TAPI_CAUSE_REJ_SRVC_NOT_AVL,            /**< Rejection service not available */
+       TAPI_CAUSE_REJ_SAT_CALL_CTRL,           /**< Rejection SAT Call Control */
+       TAPI_CAUSE_REMOTE_CKTUNAVAIL,           /**< Remote Circuit channel unavailable */
+       TAPI_CAUSE_RESOURCEUNAVAIL,                 /**< Resource not available */
+       TAPI_CAUSE_SERVICEID_ERROR,                 /**< Service ID error */
+       TAPI_CAUSE_SERVICE_NOTIMPL,                 /**< Service not implemented */
+       TAPI_CAUSE_SERVICE_UNAVAIL,                 /**< Service not available */
+       TAPI_CAUSE_MODIFY_SAME_BEARER,          /**< Modify same bearer */
+       TAPI_CAUSE_MODIFY_NOT_PERMITTED,        /**< Modification not permitted */
+       TAPI_CAUSE_HOLD_FAIL,                           /**< Call hold failure */                                                       //40
+       TAPI_CAUSE_TEMPFAILURE,                     /**< Temporary failure */
+       TAPI_CAUSE_WRONGNUM,                            /**< Wrong number */
+       TAPI_CAUSE_NORMAL_UNSPECIFIED,          /**< Normal but unspecified */
+       TAPI_CAUSE_SSERRINVALIDTIVALUE,     /**< SS invalid transaction ID value */
+       TAPI_CAUSE_SSERRINVALIDTI,                      /**< SS Invalid transaction ID */
+       TAPI_CAUSE_SSINCOMPATIBLESTATE,     /**< SS incompatible state */
+       TAPI_CAUSE_SSERRSYNTAXERROR,            /**< SS syntax error */
+       TAPI_CAUSE_SSPROTOCOLERROR,                 /**< Protocol error */
+       TAPI_CAUSE_SSNEGATIVEPASSWORDCHECK, /**< Negative password check */
+       TAPI_CAUSE_SSSENTASPHASE1,                      /**< SS sent as phase1 message */                               //50
+       TAPI_CAUSE_SSERROR,                                 /**< Supplementary service error */
+       TAPI_CAUSE_SS_USSD_BUSY,                        /**< Second USSD request will be rejected when a USSD transaction is already in progess */
+       TAPI_CAUSE_IDLE,                                        /**< Idle */
+       TAPI_CAUSE_NETWORK_SPECIFIC,            /**< Network specific error */
+       TAPI_CAUSE_FADE,                                        /**< Voice call is dropped e.g. because of a loss of signal */
+       TAPI_CAUSE_UNKNOWN,                                 /**< Unknown and no details available */
+       TAPI_CAUSE_INCOM_CALL,                          /**< Terminated by an incoming call */
+       TAPI_CAUSE_ALERT_STOP,                          /**< Terminated by an alert stop */
+       TAPI_CAUSE_INTERCEPT,                           /**< Voice call is dropped by interception */
+       TAPI_CAUSE_REORDER,                                 /**< Voice call is dropped by reordering */ //60
+       TAPI_CAUSE_CLIENT_END,                          /**< Client ended the call */
+       TAPI_CAUSE_ACCESS_CLASS_BLOCKED,        /**< Access class blocked */
+       TAPI_CAUSE_MEMCAPEXCEEDED,                      /**< Memory capacity exceeded */
+       TAPI_CAUSE_TYPENOTSUPPORTED,            /**< Type not supported */
+       TAPI_CAUSE_REPLACENOTSUPPORTED,     /**< Replace not supported */
+       TAPI_CAUSE_PROTOCOLID_ERROR,            /**< Protocol ID error */
+       TAPI_CAUSE_CLASSNOTSUPPORTED,           /**< Class not supported */
+       TAPI_CAUSE_DATACODING_ERROR,            /**< Data coding error */
+       TAPI_CAUSE_INVAL_MSG,                           /**< Invalid message */
+       TAPI_CAUSE_CALL_BARRED,                     /**< Call barred */                                                 //70
+       TAPI_CAUSE_SIM_CALL_CONTROL_CHANGED_TO_SS,              /**< Sim call control changed to SS */
+       TAPI_CAUSE_SIM_CALL_CONTROL_CHANGED_TO_CALL,    /**< SIM Call control changed to call */
+       TAPI_CAUSE_SIM_ERROR,                                       /**< SIM error */
+       TAPI_CAUSE_SIM_CALL_CONTROL_MODIFIED,                   /**< SIM call control modified */
+       TAPI_CAUSE_RANDOM_ACCESS_FAILURE,                   /**< Random access error */
+       TAPI_CAUSE_LOWER_LAYER_FAILURE,                 /**< Lower layer error */
+       TAPI_CAUSE_ACCESS_REJECTED,                             /**< Access rejected */
+       TAPI_CAUSE_RESET_NOT_ALLOWED,                       /**< Reset not allowed */
+       TAPI_CAUSE_EMERGENCY_CALL_NOT_ALLOWED,                  /**< Emergency call not allowed */
+       TAPI_CAUSE_ACCESS_NOT_ALLOWED,                      /**< Access not allowed */                                          //80
+       TAPI_CAUSE_RADIO_LINK_FAILURE,                      /**< Radio link failure */
+       TAPI_CAUSE_INVALID_IDENTITY,                        /**< Invalid identity */
+       TAPI_CAUSE_UNKNOWN_IDENTITY,                        /**< Unknown identity */
+       TAPI_CAUSE_UNACCEPTABLE_IDENTITY,                   /**< Unacceptable identity */
+       TAPI_CAUSE_NO_SERVICE_HERE,                             /**< No service here */
+       TAPI_CAUSE_SERVICE_NOT_ALLOWED,                 /**< Service not allowed */
+       TAPI_CAUSE_SERVICE_NOT_AVAIL,                       /**< Service not available */
+       TAPI_CAUSE_SERVICE_NOT_WORKING,                 /**< Service not working */
+       TAPI_CAUSE_CANNOT_IDENTIFY_CALL,                    /**< Cannot identify the call */
+       TAPI_CAUSE_DEACTIVATION,                                    /**< Deactivation */                                                        //90
+       TAPI_CAUSE_FATAL_ERROR,                                 /**< Fatal error */
+       TAPI_CAUSE_SEND_DTMF_SUCCESS,                       /**< Sending DTMF succeeded */
+       TAPI_CAUSE_SEND_DTMF_FAIL,                                  /**< Sending DTMF failed */
+       TAPI_CAUSE_FIXED_DIALING_NUMBER_ONLY,           /**< Fixed Dialing Number Only */
+       TAPI_CAUSE_TIMER_EXPIRED,                                   /**< Call Timer Expired */
+} TelCallCause_t;
+
+/**
+ * @brief Enumeration when a call is ended, this end cause is given with the CALL END notification to the application.
+ * @details This end cause can be originated from different elements in the communication path or different modules in the same element.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_END_NO_CAUSE = 0x00,                          /**< No Cause */
+
+       TAPI_CC_CAUSE_UNASSIGNED_NUMBER,                        /**< Unassigned Number */
+       TAPI_CC_CAUSE_NO_ROUTE_TO_DEST,                     /**< No Route to Destination */
+       TAPI_CC_CAUSE_CHANNEL_UNACCEPTABLE,                 /**< Channel Unacceptable */
+       TAPI_CC_CAUSE_OPERATOR_DETERMINED_BARRING,      /**< Operator Determined Barring */
+       TAPI_CC_CAUSE_NORMAL_CALL_CLEARING,                 /**< Normal Call Clearing */
+
+       TAPI_CC_CAUSE_USER_BUSY,                                        /**< User Busy */
+       TAPI_CC_CAUSE_NO_USER_RESPONDING,                       /**< No user responding */
+       TAPI_CC_CAUSE_USER_ALERTING_NO_ANSWER,          /**< User Alerting no Answer */
+       TAPI_CC_CAUSE_CALL_REJECTED,                            /**< Call Rejected */
+       TAPI_CC_CAUSE_NUMBER_CHANGED,                           /**< Number Changed */
+
+       TAPI_CC_CAUSE_NON_SELECTED_USER_CLEARING,       /**< Non Selected User Clearing */
+       TAPI_CC_CAUSE_DESTINATION_OUT_OF_ORDER,     /**< Destination out of Order */
+       TAPI_CC_CAUSE_INVALID_NUMBER_FORMAT,            /**< Invalid Number Format */
+       TAPI_CC_CAUSE_FACILITY_REJECTED,                        /**< Facility Rejected */
+       TAPI_CC_CAUSE_RESPONSE_TO_STATUS_ENQUIRY,       /**< Response to Status Enquiry */
+
+       TAPI_CC_CAUSE_NORMAL_UNSPECIFIED,                               /**< Normal Unspecified */
+       TAPI_CC_CAUSE_NO_CIRCUIT_CHANNEL_AVAILABLE,         /**< No Circuit Channel Available */
+       TAPI_CC_CAUSE_NETWORK_OUT_OF_ORDER,                         /**< Network out of Order */
+       TAPI_CC_CAUSE_TEMPORARY_FAILURE,                                /**< Temporary Failure */
+       TAPI_CC_CAUSE_SWITCHING_EQUIPMENT_CONGESTION,   /**< Switching Equipment Congestion */
+
+       TAPI_CC_CAUSE_ACCESS_INFORMATION_DISCARDED,                         /**< Access Information Discarded */
+       TAPI_CC_CAUSE_REQUESTED_CIRCUIT_CHANNEL_NOT_AVAILABLE,  /**< Requested Circuit channel not available */
+       TAPI_CC_CAUSE_RESOURCES_UNAVAILABLE_UNSPECIFIED,                /**< Resources unavailable and unspecified */
+       TAPI_CC_CAUSE_QUALITY_OF_SERVICE_UNAVAILABLE,                   /**< Quality of service unavailable */
+       TAPI_CC_CAUSE_REQUESTED_FACILITY_NOT_SUBSCRIBED,                /**< Requested facility not subscribed */
+
+       TAPI_CC_CAUSE_INCOMING_CALL_BARRED_WITHIN_CUG,                  /**< Incoming call barred within CUG */
+       TAPI_CC_CAUSE_BEARER_CAPABILITY_NOT_AUTHORISED,             /**< Bearer capability not Authorised */
+       TAPI_CC_CAUSE_BEARER_CAPABILITY_NOT_PRESENTLY_AVAILABLE,/**< Bearer capability not presently Available */
+       TAPI_CC_CAUSE_SERVICE_OR_OPTION_NOT_AVAILABLE,                  /**< Service or Option not available */
+       TAPI_CC_CAUSE_BEARER_SERVICE_NOT_IMPLEMENTED,                   /**< Service not implemented */
+
+       TAPI_CC_CAUSE_ACM_GEQ_ACMMAX,                                                   /**< ACM GEQ ACMAX */
+       TAPI_CC_CAUSE_REQUESTED_FACILITY_NOT_IMPLEMENTED,               /**< Requested facility not implemented */
+       TAPI_CC_CAUSE_ONLY_RESTRICTED_DIGITAL_INFO_BC_AVAILABLE,/**< Restricted digital info BC not available */
+       TAPI_CC_CAUSE_SERVICE_OR_OPTION_NOT_IMPLEMENTED,                /**< Service or Option not Implemented */
+       TAPI_CC_CAUSE_INVALID_TRANSACTION_ID_VALUE,                         /**< Transaction ID value */
+
+       TAPI_CC_CAUSE_USER_NOT_MEMBER_OF_CUG,                               /**< Not a member of CUG */
+       TAPI_CC_CAUSE_INCOMPATIBLE_DESTINATION,                         /**< Incompatible Destination */
+       TAPI_CC_CAUSE_INVALID_TRANSIT_NETWORK_SELECTION,            /**< Transit Network selection */
+       TAPI_CC_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE,               /**< Semantically Incorrect message */
+       TAPI_CC_CAUSE_INVALID_MANDATORY_INFORMATION,                /**< Invalid Mandatory Message */
+
+       TAPI_CC_CAUSE_MESSAGE_TYPE_NON_EXISTENT,                                        /**< Message Type Non Existent */
+       TAPI_CC_CAUSE_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROT_STATE,      /**< Message type not compatible with Prot state */
+       TAPI_CC_CAUSE_IE_NON_EXISTENT_OR_NOT_IMPLEMENTED,                       /**< IE non exitent or not implemented */
+       TAPI_CC_CAUSE_CONDITIONAL_IE_ERROR,                                                 /**< Conditional IE error */
+       TAPI_CC_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE,       /**< Not Compatible with protocol state */
+
+       TAPI_CC_CAUSE_RECOVERY_ON_TIMER_EXPIRY,     /**< Recovery on timer expiry */
+       TAPI_CC_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,       /**< Protocol error unspecified */
+       TAPI_CC_CAUSE_INTERWORKING_UNSPECIFIED, /**< Interworking unspecified */
+       TAPI_CC_CAUSE_REORDER,  /**< Reorder */
+
+       TAPI_CC_CAUSE_END = 128,        /**< End unspecified */
+
+       /* Reject causes*/
+       TAPI_REJECT_CAUSE_IMSI_UNKNOWN_IN_HLR,  /**< IMSI unknown in HLR */
+       TAPI_REJECT_CAUSE_ILLEGAL_MS,                   /**< Illegal MS */
+       TAPI_REJECT_CAUSE_IMSI_UNKNOWN_IN_VLR,  /**< IMSI unknown in VLR */
+       TAPI_REJECT_CAUSE_IMEI_NOT_ACCEPTED,    /**< IMEI not accepted */
+       TAPI_REJECT_CAUSE_ILLEGAL_ME,                   /**< Illegal ME */
+
+       TAPI_REJECT_CAUSE_GPRS_SERVICES_NOT_ALLOWED,                                            /**< GPRS service not allowed */
+       TAPI_REJECT_CAUSE_GPRS_SERVICES_AND_NON_GPRS_SERVICES_NOT_ALLOWED,      /**< GPRS services and Non-GPRS services not allowed */
+       TAPI_REJECT_CAUSE_MS_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK,     /**< MS device cannot be derived by the network */
+       TAPI_REJECT_CAUSE_IMPLICITLY_DETACHED,                                                          /**< Implicitly detached */
+       TAPI_REJECT_CAUSE_PLMN_NOT_ALLOWED,                                                                 /**< PLMN not allowed */
+
+       TAPI_REJECT_CAUSE_LA_NOT_ALLOWED,                                                       /**< LA not allowed */
+       TAPI_REJECT_CAUSE_NATIONAL_ROAMING_NOT_ALLOWED,                     /**< National roaming not allowed */
+       TAPI_REJECT_CAUSE_GPRS_SERVICES_NOT_ALLOWED_IN_THIS_PLMN,       /**< GPRS services not allowed in this PLMN */
+       TAPI_REJECT_CAUSE_NO_SUITABLE_CELLS_IN_LA,                                      /**< No suitable cells in the LA */
+       TAPI_REJECT_CAUSE_MSC_TEMPORARILY_NOT_REACHABLE,                        /**< MSC temporarily not reachable */
+
+       TAPI_REJECT_CAUSE_NETWORK_FAILURE,              /**< Network unavailable */
+       TAPI_REJECT_CAUSE_MAC_FAILURE,                  /**< MAC failure */
+       TAPI_REJECT_CAUSE_SYNCH_FAILURE,                /**< SYNCH failure */
+       TAPI_REJECT_CAUSE_CONGESTTION,                  /**< Congestion */
+       TAPI_REJECT_CAUSE_GSM_AUTH_UNACCEPTED,  /**< GSM Auth unaccepted */
+
+       TAPI_REJECT_CAUSE_SERVICE_OPTION_NOT_SUPPORTED, /**< Service option not supported */
+       TAPI_REJECT_CAUSE_REQ_SERV_OPT_NOT_SUBSCRIBED,  /**< REQ_SERV option not suscribed */
+       TAPI_REJECT_CAUSE_SERVICE_OPT__OUT_OF_ORDER,    /**< Service OPT out of order */
+       TAPI_REJECT_CAUSE_CALL_CANNOT_BE_IDENTIFIED,    /**< Call cannot be identified */
+       TAPI_REJECT_CAUSE_NO_PDP_CONTEXT_ACTIVATED,         /**< No PDP context Activated */
+
+       TAPI_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_A_NEW_CELL_MIN_VALUE,   /**< Retry upon entry into a new call min value */
+       TAPI_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_A_NEW_CELL_MAX_VALUE,   /**< Retry upon entry into a new call max value */
+       TAPI_REJECT_CAUSE_SEMANTICALLY_INCORRECT_MSG,                                   /**< Semantically incorret message */
+       TAPI_REJECT_CAUSE_INVALID_MANDATORY_INFO,                                               /**< Invalid mandatory information */
+       TAPI_REJECT_CAUSE_MESSAGE_TYPE_NON_EXISTANT,                                    /**< Message type non-existant */
+
+       TAPI_REJECT_CAUSE_MESSAGE_TYPE_NOT_COMP_PRT_ST,             /**< Message type not COMP PRT ST */
+       TAPI_REJECT_CAUSE_IE_NON_EXISTANT,                                              /**< IE non existent */
+       TAPI_REJECT_CAUSE_MSG_NOT_COMPATIBLE_PROTOCOL_STATE,    /**< MSG not compatible protocol state */
+
+       /* Connection Management establishment rejection cause */
+       TAPI_REJECT_CAUSE_REJ_UNSPECIFIED,      /**< REJ unspecified */
+
+       /* AS reject causes */
+       TAPI_REJECT_CAUSE_AS_REJ_RR_REL_IND,                                            /**< RR release indication */
+       TAPI_REJECT_CAUSE_AS_REJ_RR_RANDOM_ACCESS_FAILURE,                      /**< Random Access Failure */
+       TAPI_REJECT_CAUSE_AS_REJ_RRC_REL_IND,                                           /**< RRC release indication */
+       TAPI_REJECT_CAUSE_AS_REJ_RRC_CLOSE_SESSION_IND,                     /**< RRC close session indication */
+       TAPI_REJECT_CAUSE_AS_REJ_RRC_OPEN_SESSION_FAILURE,                      /**< RRC open session failure */
+       TAPI_REJECT_CAUSE_AS_REJ_LOW_LEVEL_FAIL,                                        /**< Low level failure */
+       TAPI_REJECT_CAUSE_AS_REJ_LOW_LEVEL_FAIL_REDIAL_NOT_ALLOWED, /**< Low level failure redial not alowed */
+       TAPI_REJECT_CAUSE_AS_REJ_LOW_LEVEL_IMMED_RETRY,                     /**< Low level immediate retry */
+
+       /* MM reject causes */
+       TAPI_REJECT_CAUSE_MM_REJ_INVALID_SIM,                   /**< Invalid SIM */
+       TAPI_REJECT_CAUSE_MM_REJ_NO_SERVICE,                    /**< No service */
+       TAPI_REJECT_CAUSE_MM_REJ_TIMER_T3230_EXP,               /**< Timer T3230 expiry */
+       TAPI_REJECT_CAUSE_MM_REJ_NO_CELL_AVAILABLE,         /**< No call available  */
+       TAPI_REJECT_CAUSE_MM_REJ_WRONG_STATE,                   /**< Wrong state */
+       TAPI_REJECT_CAUSE_MM_REJ_ACCESS_CLASS_BLOCKED,  /**< Access class blocked */
+
+       /* Definitions for release ind causes between MM and CNM */
+       TAPI_REJECT_CAUSE_ABORT_MSG_RECEIVED,   /**< Abort Message received */
+       TAPI_REJECT_CAUSE_OTHER_CAUSE,                  /**< Other cause */
+
+       /* CNM reject causes */
+       TAPI_REJECT_CAUSE_CNM_REJ_TIMER_T303_EXP,       /**< Timer T303 expiry */
+       TAPI_REJECT_CAUSE_CNM_REJ_NO_RESOURCES,     /**< Rejected due to unavailibilty of resources */
+       TAPI_REJECT_CAUSE_CNM_MM_REL_PENDING,           /**< MM release pending */
+       TAPI_REJECT_CAUSE_CNM_INVALID_USER_DATA,        /**< Invalid user data */
+       TAPI_CALL_END_CAUSE_MAX = 255,                          /**< Maximum End Cause limit for GSM/WCDMA */
+
+       /* CDMA CALL END CAUSE */
+       TAPI_CDMA_END_CAUSE_REL_BY_USER = 0x1001,               /**< Call Released by User */
+       TAPI_CDMA_END_CAUSE_REL_BY_NET,                             /**< Call Released by Network */
+       TAPI_CDMA_END_CAUSE_REL_NET_BUSY,                               /**< Call Released because the network is busy */
+       TAPI_CDMA_END_CAUSE_NO_SVC,                                         /**< Call Released because of No Service area */
+       TAPI_CDMA_END_CAUSE_FADING,                                         /**< Call Released because of Fading */
+       TAPI_CDMA_END_CAUSE_RELEASE_BY_REORDER,             /**< Call Released because of reorder */
+       TAPI_CDMA_END_CAUSE_RELEASE_BY_INTERCEPT,               /**< Call Released because of intercept */
+       TAPI_CDMA_END_CAUSE_SILENT_ZONE_RETRY,                  /**< Call Released because of silent zone retry */
+       TAPI_CDMA_END_CAUSE_OTA_CALL_FAIL,                              /**< Call Released because of OTA call failure */
+       TAPI_CDMA_END_CAUSE_PHONE_OFFLINE,                              /**< Call Released because phone is offline */
+       TAPI_CDMA_END_CAUSE_PHONE_IS_CDMA_LOCKED,               /**< Call Released because CDMA is locked */
+       TAPI_CDMA_END_CAUSE_FLASH_IS_IN_PROGRESS_ERR,   /**< Call Released because of the flash-is-in-progress error */
+       TAPI_CDMA_END_CAUSE_E911_MODE_ERR,                              /**< Call Released because of the e911 mode */
+       TAPI_CDMA_END_CAUSE_OTHERS,                                         /**< Call Released by Others */
+       TAPI_CDMA_END_CAUSE_MAX                                             /**< Maximum End Cause limit for CDMA */
+} TelTapiEndCause_t;
+
+/**
+ * @brief Enumeration for the call conference states.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_CONFERENCE_IDLE,      /**< Idle */
+       TAPI_CALL_CONFERENCE_ACTIVE /**< Active */
+} TelConferenceCallState_t;
+
+/**
+ * @brief Enumeration for application usable states. Applications can have their own states as well.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_STATE_IDLE,           /**< Call is in the idle state - i.e. no call */
+       TAPI_CALL_STATE_ACTIVE,         /**< Call is in the connected and conversation state */
+       TAPI_CALL_STATE_HELD,           /**< Call is in the held state */
+       TAPI_CALL_STATE_DIALING,        /**< Call is in the dialing state */
+       TAPI_CALL_STATE_ALERT,          /**< Call is in the alerting state */
+       TAPI_CALL_STATE_INCOMING,       /**< Call is in the incoming state */
+       TAPI_CALL_STATE_WAITING,        /**< Call is in the answered state, and waiting for connected indication event */
+       TAPI_CALL_STATE_MAX             /**< Call state unknown */
+} TelCallStates_t;
+
+/**
+ * @brief IN GSM ONLY: call identification number.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_ACTIVE_LINE1, /**< Line 1 */
+       TAPI_CALL_ACTIVE_LINE2  /**< Line 2 */
+} TelCallActiveLine_t;
+
+typedef enum {
+       TAPI_CALL_UUS_NONE, /**< No User to User information  */
+       TAPI_CALL_UUS_1,        /**< User to User information 1 */
+} TelCallUusType_t;
+
+/**
+ * @brief Enumeration for SS info messages of an incoming call indication.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_MT_CLI_PRESENT = 0x31, /**< Number details are present in the "char number" of the call info struct. If the number is not present then the "no cli cause" member in  mt_ss_info is set accordingly */
+       TAPI_CALL_MT_CNA_PRESENT = 0x32, /**< Calling Name Info present, #TelCallingNameInfo_t of the call info struct contains this info */
+       TAPI_CALL_MT_SS_UNDEFINED = 0x00, /**< Undefined SS indication. Ignore mt_ss_info */
+
+} TelCallMtSSInfo_t;
+
+/**
+ * @brief Enumeration for the answer type used as a parameter in the answer call API.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_ANSWER_ACCEPT = 0,            /**< Used to answer an incoming call when there are no current active calls */
+       TAPI_CALL_ANSWER_REJECT,                        /**< Used to reject the incoming call */
+       TAPI_CALL_ANSWER_REPLACE,                       /**< Release current active call and accept the waiting call */
+       TAPI_CALL_ANSWER_HOLD_AND_ACCEPT,       /**< Hold the current active call, and accept the waiting call */
+} TelCallAnswerType_t;
+
+/**
+ * @brief Enumeration for the end type used as a parameter in the end call API.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_END = 0,        /**< End Specific Call */
+       TAPI_CALL_END_ALL,        /**< End All Calls */
+       TAPI_CALL_END_ACTIVE_ALL, /**< End All Active Calls */
+       TAPI_CALL_END_HOLD_ALL,   /**< End All Held Calls */
+} TelCallEndType_t;
+
+
+
+
+/**
+ * @brief Enumeration for call type to be used by applications while using the setup call API. Like the requested call is a voice call or video call.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_TYPE_VOICE,   /**< Voice call type */// in ipcv4, 0x0100
+       TAPI_CALL_TYPE_DATA,    /**< Data call type - (for modem, fax, packet, and other such calls) */// in ipcv4, 0x0200
+       TAPI_CALL_TYPE_E911         /**< Emergency call type */// in ipcv4, 0x0700
+} TelCallType_t;
+
+/**
+ * @brief Enumeration for the various alerting patterns available.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_ALERTING_PATTERN_1 = 0x00, /**< Pattern 1 */
+       TAPI_CALL_ALERTING_PATTERN_2 = 0x01, /**< Pattern 2 */
+       TAPI_CALL_ALERTING_PATTERN_3 = 0x02, /**< Pattern 3 */
+       TAPI_CALL_ALERTING_PATTERN_4 = 0x03, /**< Pattern 4 */
+       TAPI_CALL_ALERTING_PATTERN_5 = 0x04, /**< Pattern 5 */
+       TAPI_CALL_ALERTING_PATTERN_6 = 0x05, /**< Pattern 6 */
+       TAPI_CALL_ALERTING_PATTERN_7 = 0x06, /**< Pattern 7 */
+       TAPI_CALL_ALERTING_PATTERN_8 = 0x07, /**< Pattern 8 */
+       TAPI_CALL_NO_ALERTING_PATTERN = 0x08 /**< No Alerting Pattern */
+} TelCallAlertingPattern_t;
+
+/**
+ * @brief Enumeration for state of the current call.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_CONNECT_IDLE,     /**< Call is in the Idle state */
+       TAPI_CALL_CONNECT_ACTIVE,       /**< Call is in the Active state */
+       TAPI_CALL_CONNECT_HELD          /**< Call is in the Held state */
+} TelCallActiveState_t;
+
+/**
+ * @brief Enumeration for closed user group options.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_CUG_NO_INFO = 0x00,           /**< No information */
+       TAPI_CALL_CUG_SUPRESS_OA,                       /**< Suppress OA */
+       TAPI_CALL_CUG_SUPRESS_PRF_CUG,          /**< Suppress preferential CUG */
+       TAPI_CALL_CUG_SUPRESS_OA_AND_CUG        /**< Suppress OA and preferential CUG */
+} TelCallCugOptions_t;
+
+/**
+ * @brief Enumeration for tapi call UUS protocol types.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_UUS_PROTO_SPECIFIC = 0,                       /**< The user information is structured according to user needs */
+       TAPI_CALL_UUS_PROTO_OSI_HIGHER_LAYER = 1,       /**< OSI high layer protocols */
+       TAPI_CALL_UUS_PROTO_IA5_CHARS = 4,                      /**< User information consists of IA5 characters */
+       TAPI_CALL_UUS_PROTO_V120 = 7,                           /**< Rate adaptation */
+       TAPI_CALL_UUS_PROTO_Q931 = 8                            /**< User-network call control messages */
+} TelCallUusProtocolType_t;
+
+/**
+ * @brief Enumeration for the call name mode.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_NAME_AVAIL = 0,               /**< This identifier refers to presenting the calling party's name identity to the called party */
+       TAPI_CALL_NAME_RESTRICTED = 1,      /**< This identifier refers to restricting the name identity of the calling party from being presented to the called party */
+       TAPI_CALL_NAME_UNAVAIL = 2,                     /**< This identifier refers to the unavailability of the calling party's name identity from being offered to the called party */
+       TAPI_CALL_NAME_AVAIL_RESTRICTED = 3     /**< This identifier refers to offering the calling party's name identity to the called party with which the presentation restriction is overridden */
+} TelCallNameMode_t;
+
+/**
+ * @brief Enumeration for the "No Cli cause" value.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_NO_CLI_CAUSE_NONE = -1,                            /**< None */
+       TAPI_CALL_NO_CLI_CAUSE_UNAVAILABLE = 0x00,                       /**< Unavailable */
+       TAPI_CALL_NO_CLI_CAUSE_REJECTBY_USER = 0x01,                 /**< Rejected by User */
+       TAPI_CALL_NO_CLI_CAUSE_INTERACTION_OTHERSERVICES = 0x02, /**< Other services */
+       TAPI_CALL_NO_CLI_CAUSE_COINLINE_PAYPHONE = 0x03,             /**< Coin line phone */
+} TelCallNoCliCause_t;
+
+/**
+ * @brief Enumeration for the "Cli mode" value.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_PRES_AVAIL,           /**< Presentation Allowed */
+       TAPI_CALL_PRES_RESTRICTED,      /**< Presentation Restricted */
+       TAPI_CALL_NUM_UNAVAIL,          /**< Number Not Available */
+}TelCallCliMode_t;
+
+/**
+ * @brief Enumeration for the the fwded ind type used for MO and Mt from SS Noti Info.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_OUTGOING_FWDED = 0x00,        /**< Outgoing call forwarded */
+       TAPI_CALL_INCOMMING_FWDED = 0x01,       /**< Incoming call forwarded */
+} TelCallForwardType_t;
+
+/**
+ * @brief Enumeration for the voice privacy option mode. (CDMA only)
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_PRIVACY_MODE_STANDARD = 0x00, /**< Standard mode */
+       TAPI_CALL_PRIVACY_MODE_ENHANCED             /**< Enhanced mode */
+} TelCallPrivacyMode_t;
+
+/**
+ * @brief Enumeration for the OTASP Status. (CDMA only)
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_OTASP_OK_SPL_UNLOCKED = 0x01, /**< OTASP : SPL unlocked ok */
+       TAPI_CALL_OTASP_OK_AKEY_EXCESS,             /**< OTASP : A-Key excess ok */
+       TAPI_CALL_OTASP_OK_SSD_UPDATE,              /**< OTASP : SSD update ok */
+       TAPI_CALL_OTASP_OK_NAM_DWNLD,               /**< OTASP : NAM download ok */
+       TAPI_CALL_OTASP_OK_MDN_DWNLD,               /**< OTASP : MDN download ok */
+       TAPI_CALL_OTASP_OK_IMSI_DWNLD,              /**< OTASP : IMSI download ok */
+       TAPI_CALL_OTASP_OK_PRL_DWNLD,               /**< OTASP : PRL download ok */
+       TAPI_CALL_OTASP_OK_COMMIT,                      /**< OTASP : commit ok */
+       TAPI_CALL_OTASP_OK_PROGRAMMING,             /**< OTASP : programming ok */
+       TAPI_CALL_OTASP_SUCCESS,                        /**< OTASP : success */
+       TAPI_CALL_OTASP_UNSUCCESS,                      /**< OTASP : unsuccess */
+       TAPI_CALL_OTASP_OK_OTAPA_VERIFY,            /**< OTASP : verify ok */
+       TAPI_CALL_OTASP_PROGRESS,                       /**< OTASP : progress */
+       TAPI_CALL_OTASP_FAILURES_EXCESS_SPC,    /**< OTASP : SPC excess failure */
+       TAPI_CALL_OTASP_LOCK_CODE_PW_SET,           /**< OTASP : lock code password set */
+} TelCallOtaspStatus_t;
+
+/**
+ * @brief Enumeration for the OTAPA Status. (CDMA only)
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_OTAPA_STOP = 0x00,    /**< OTAPA : stop */
+       TAPI_CALL_OTAPA_START,              /**< OTAPA : start */
+} TelCallOtapaStatus_t;
+
+/**
+ * @brief Enumeration for the Alert Signal Type. (CDMA only)
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_SIGNAL_TYPE_TONE = 0x00,
+       TAPI_CALL_SIGNAL_TYPE_ISDN_ALERTING,
+       TAPI_CALL_SIGNAL_TYPE_IS54B_ALERTING,
+       TAPI_CALL_SIGNAL_TYPE_RESERVED
+} TelCallAlertSignalType_t;
+
+/**
+ * @brief Enumeration for the Alert Pitch Type. (CDMA only)
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_ALERT_PITCH_MED = 0x00,
+       TAPI_CALL_ALERT_PITCH_HIGH,
+       TAPI_CALL_ALERT_PITCH_LOW,
+       TAPI_CALL_ALERT_PITCH_RESERVED
+} TelCallAlertPitchType_t;
+
+/**
+ * @brief Enumeration for the signals specific to the alert signal type TAPI_CALL_SIGNAL_TYPE_TONE. (CDMA only)
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_SIGNAL_TONE_DIAL = 0x00,
+       TAPI_CALL_SIGNAL_TONE_RINGBACK_TONE_ON,
+       TAPI_CALL_SIGNAL_TONE_INTERCEPT_TONE_ON,
+       TAPI_CALL_SIGNAL_TONE_ABBREV_TONE,
+       TAPI_CALL_SIGNAL_TONE_NETWORK_CONGESTION_TONE_ON,
+       TAPI_CALL_SIGNAL_TONE_ABBREV_NETWORK_CONGESTION,
+       TAPI_CALL_SIGNAL_TONE_BUSY_TONE_ON,
+       TAPI_CALL_SIGNAL_TONE_CFRM_TONE_ON,
+       TAPI_CALL_SIGNAL_TONE_ANSWER_TONE_ON,
+       TAPI_CALL_SIGNAL_TONE_CALL_WAITING_TONE_ON,
+       TAPI_CALL_SINGNAL_TONE_PIPE_TONE_ON,
+       TAPI_CALL_SIGNAL_TONE_OFF
+} TelCallToneSignal_t;
+
+/**
+ * @brief Enumeration for the signals specific to the alert signal type TAPI_CALL_SIGNAL_TYPE_ISDN_ALERTING. (CDMA only)
+ */
+typedef enum {
+       TAPI_CALL_SIGNAL_ISDN_ALERT_NORMAL = 0x00,
+       TAPI_CALL_SIGNAL_ISDN_ALERT_INTER_GROUP,
+       TAPI_CALL_SIGNAL_ISDN_ALERT_SPECIAL_PRIORITY,
+       TAPI_CALL_SIGNAL_ISDN_ALERT_ISDN_RESERVED1,
+       TAPI_CALL_SIGNAL_ISDN_ALERT_PING_RING,
+       TAPI_CALL_SIGNAL_ISDN_ALERT_ISDN_RESERVED2,
+       TAPI_CALL_SIGNAL_ISDN_ALERT_ISDN_RESERVED3,
+       TAPI_CALL_SIGNAL_ISDN_ALERT_ISDN_RESERVED4,
+       TAPI_CALL_SIGNAL_ISDN_ALERT_OFF
+} TelCallIsdnAlertSignal_t;
+
+/**
+ * @brief Enumeration for the signals specific to the alert signal type TAPI_CALL_SIGNAL_TYPE_IS54B_ALERTING. (CDMA only)
+ */
+typedef enum {
+       TAPI_CALL_SIGNAL_IS54B_ALERT_NOTONE = 0x00,
+       TAPI_CALL_SIGNAL_IS54B_ALERT_LONG,
+       TAPI_CALL_SIGNAL_IS54B_ALERT_SHORT_SHORT,
+       TAPI_CALL_SIGNAL_IS54B_ALERT_SHORT_SHORT_LONG,
+       TAPI_CALL_SIGNAL_IS54B_ALERT_SHORT_SHORT_2,
+       TAPI_CALL_SIGNAL_IS54B_ALERT_SHORT_LONG_SHORT,
+       TAPI_CALL_SIGNAL_IS54B_ALERT_SHORT_SHORT_SHORT_SHORT,
+       TAPI_CALL_SIGNAL_IS54B_ALERT_PBX_LONG,
+       TAPI_CALL_SIGNAL_IS54B_ALERT_PBX_SHORT_SHORT,
+       TAPI_CALL_SIGNAL_IS54B_ALERT_PBX_SHORT_SHORT_LONG,
+       TAPI_CALL_SIGNAL_IS54B_ALERT_PBX_SHORT_LONG_SHORT,
+       TAPI_CALL_SIGNAL_IS54B_ALERT_PBX_SHORT_SHORT_SHORT_SHORT,
+       TAPI_CALL_SIGNAL_IS54B_ALERT_PIP_PIP_PIP_PIP
+} TelCallIs54bAlertSignal_t;
+
+/**
+ * @brief Enumeration for the call time request mask type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_TIME_TYPE_TOTAL_CALL_CNT = 0x01,      /**< Total Call Count Mask */
+       TAPI_CALL_TIME_TYPE_TOTAL_CALL_TIME = 0x02, /**< Total Call Time Mask */
+       TAPI_CALL_TIME_TYPE_LAST_CALL_TIME = 0x04,      /**< Last Call Time Mask */
+} TelCallTimeMaskType_t;
+
+/**
+ * @brief Enumeration for the DTMF tone length.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_TONE_DURATION_SHORT = 0x01, /**< Tone Duration Short */
+       TAPI_CALL_TONE_DURATION_LONG          /**< Tone Duration Long */
+} TelCallToneDuration_t;
+
+/**
+ * @brief Enumeration for the emergency category type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_ECC_DEFAULT = 0x00,        /**< Default case */
+       TAPI_CALL_ECC_POLICE = 0x01,         /**< Police emergency */
+       TAPI_CALL_ECC_AMBULANCE = 0x02,      /**< Ambulance emergency */
+       TAPI_CALL_ECC_FIREBRIGADE = 0x04,    /**< Firebrigade emergency */
+       TAPI_CALL_ECC_MARINEGUARD = 0x08,    /**< Marineguard emergency */
+       TAPI_CALL_ECC_MOUNTAINRESCUE = 0x10, /**< Mountain rescue emergency */
+       TAPI_CALL_ECC_MANUAL_ECALL = 0x20,   /**< Manual emergency call */
+       TAPI_CALL_ECC_AUTO_ECALL = 0x40,     /**< Automatic emergency call */
+       TAPI_CALL_ECC_NONE = 0xff,           /**< Unspecified emergency */
+} TelCallEmergencyCategory_t;
+
+typedef enum {
+       TAPI_CALL_IDENTITY_DEFAULT, /**< Calling line identity will be sent. Based on the network setting, the line identity will be presented to the called party */
+       TAPI_CALL_IDENTITY_SHOW,        /**< Display the calling line identity */
+       TAPI_CALL_IDENTITY_HIDE     /**< Hide the display of the calling line identity */
+} TelCallIdentityMode_t;
+
+/**
+ * @brief Enumeration for the context type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CONTEXT_TYPE_NONE = 0x00,       /**< Unspecified context */
+       TAPI_CONTEXT_TYPE_VOICE_CALL = 0x01, /**< Voice call context */
+       TAPI_CONTEXT_TYPE_DATA_CALL = 0x2,   /**< Data call context */
+       TAPI_CONTEXT_TYPE_VIDEO_CALL = 0x3,  /**< Video call context */
+       TAPI_CONTEXT_TYPE_NETTEXT,           /**< Network text context */
+       TAPI_CONTEXT_TYPE_E911,              /**< Emergency context */
+} TapiContextType;
+
+/**
+ * @brief Enumeration for the timer state and/or call timer ID.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_TSTATE_IDLE = 0x00,           /**< No timer running */
+       TAPI_CALL_TSTATE_SETUP_PENDING,     /**< Setup Timer */
+       TAPI_CALL_TSTATE_CONNECT_PENDING,       /**< Connect Timer */
+       TAPI_CALL_TSTATE_END_PENDING,           /**< Release Timer */
+       TAPI_CALL_TSTATE_HOLD_PENDING,          /**< Hold Timer */
+       TAPI_CALL_TSTATE_RETRIEVE_PENDING,      /**< Retrieve Timer */
+       TAPI_CALL_TSTATE_JOIN_PENDING,          /**< Join Timer */
+       TAPI_CALL_TSTATE_SPLIT_PENDING,     /**< Split Timer */
+       TAPI_CALL_TSTATE_ECT_PENDING,           /**< ECT Timer */
+       TAPI_CALL_TSTATE_DTMF_PENDING,          /**< DTMF Timer */
+} TelTapiCallTimerState;
+
+/**
+ * @brief Enumeration for the offlength to send DTMF.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_DTMF_OFFLENGTH_60MS,
+       TAPI_CALL_DTMF_OFFLENGTH_100MS,
+       TAPI_CALL_DTMF_OFFLENGTH_150MS,
+       TAPI_CALL_DTMF_OFFLENGTH_200MS,
+} TelCallDtmfInterDigitInterval_t;
+
+/**
+ * @brief Enumeration for the onlength to send DTMF.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_DTMF_ONLENGTH_95MS,
+       TAPI_CALL_DTMF_ONLENGTH_150MS,
+       TAPI_CALL_DTMF_ONLENGTH_200MS,
+       TAPI_CALL_DTMF_ONLENGTH_250MS,
+       TAPI_CALL_DTMF_ONLENGTH_300MS,
+       TAPI_CALL_DTMF_ONLENGTH_350MS,
+       TAPI_CALL_DTMF_ONLENGTH_SMS
+}TelCallDtmfPulseWidth_t;
+
+/**
+ * @brief Enumeration for the Call Record Info Type
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_REC_INFO_TYPE_NAME,
+       TAPI_CALL_REC_INFO_TYPE_NUMBER,
+}TelCallRecordInfoType_t;
+
+/**
+ * @brief TelCallPreferredVoiceSubs_t
+ * This enumeration defines possible 'preferred' Voice Subscriptions
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALL_PREFERRED_VOICE_SUBS_UNKNOWN = -1,  /**<  Unknown status **/
+       TAPI_CALL_PREFERRED_VOICE_SUBS_CURRENT_NETWORK = 0, /**< Current network **/
+       TAPI_CALL_PREFERRED_VOICE_SUBS_ASK_ALWAYS, /**< ASK Always **/
+       TAPI_CALL_PREFERRED_VOICE_SUBS_SIM1, /**< SIM 1 **/
+       TAPI_CALL_PREFERRED_VOICE_SUBS_SIM2 /**<  SIM 2 **/
+} TelCallPreferredVoiceSubs_t;
+
+
+typedef struct {
+       int bRequestedBySAT;                    /**< This flag is to indicate whether the request has been initiated by SAT. Possible values are @c 0 and @c 1. This flag should be updated only when initiating a setup request */
+       TelCallIdentityMode_t IdentityMode; /**< Sets the Calling Line Identity mode. If the default value #TAPI_IDENTITY_DEFAULT is set, OEM will set the default value */
+       TelCallEmergencyCategory_t ecc;
+} tel_set_call_satflag_identiymode;
+
+/**
+ * @brief The structure type to redirect destination information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char number[TAPI_CALL_DIAL_NUMBER_LEN_MAX + 1]; /**< Redirect destination number */
+} TelCallDeflectDstInfo_t;
+
+/**
+ * @brief The structure type for calling name information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelCallNameMode_t NameMode;                                         /**< Display mode of @a szNameData */
+       char szNameData[TAPI_CALLING_NAME_SIZE_MAX];    /**< Calling party name string */
+} TelCallingNameInfo_t;
+
+/**
+ * @brief The structure type for information about an outgoing call.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelCallType_t CallType;                                         /**< Sets type of call (voice, data, video, emergency) */
+       TelCallEmergencyCategory_t Ecc;
+       char szNumber[TAPI_CALL_DIALDIGIT_LEN_MAX + 1]; /**< A string containing the destination phone number. This follows the dial number format */
+} TelCallDial_t;
+
+/**
+ * @brief The structure type for information about call status.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int CallHandle;
+       int bMoCall;                                                                    /**< Status will be yes for MO Calls. If MT call, then FALSE */
+       char pNumber[TAPI_CALL_DIALDIGIT_LEN_MAX + 1];  /**< Mobile Number */
+       TelCallType_t CallType;                                             /**< Type of call (voice, data, emergency) */
+       TelCallStates_t CallState;                                              /**< Current Call state */
+       int bConferenceState;                                                   /**< Whether Call is in Conference */
+} TelCallStatus_t;
+
+/**
+ * @brief Called to get the call status.
+ * @since_tizen 2.3
+ */
+typedef void (*TelCallStatusCallback)( TelCallStatus_t *out, void *user_data );
+
+
+/**
+ * @brief The structure type for information about call redirection details.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       char szRedirectedNumber[TAPI_CALL_DIALDIGIT_LEN_MAX + 1];               /**< Redirected party number */
+       char szRedirectSubAddress[TAPI_CALL_SUBADDRESS_LEN_MAX + 1];    /**< Redirect party sub-address */
+} TelCallRedirectionInfo_t;
+
+/**
+ * @brief The structure type for incoming call information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned int CallHandle;                                /**< At the Foundation API Level, call handle indicates the handle of the call for the application. At the Framework API Level, call handle indicates the call identifier used for a call by the OEM Adaptation Layer Plug-in */
+       TelCallType_t CallType;                             /**< Call type */
+       TelSsLineIdentificationType_t CliPresentationIndicator; /**< Calling Party presentation indicator */
+       char szCallingPartyNumber[TAPI_CALL_DIALDIGIT_LEN_MAX + 1]; /**< Caller number, null terminated ASCII */
+       TelCallingNameInfo_t CallingNameInfo;   /**< Call name info. If there is no information from the network, this information will be @c NULL */
+       TelCallRedirectionInfo_t RedirectInfo;  /**< The data for the Call Redirect information. If there is no information from the network, this information will be @c NULL */
+       TelCallCliMode_t CliMode;                       /**< CLI mode */
+       TelCallNoCliCause_t CliCause;               /**< No CLI cause */
+       int fwded;                                                              /**< True or false. If the incoming call is a forwarded call, then @c true else @c false */
+       TelCallActiveLine_t ActiveLine;             /**< Current Active Line */
+} TelCallIncomingCallInfo_t;
+
+/**
+ * @brief The structure type for SS Info message.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelCallMtSSInfo_t type;             /**< Type of SS Info present */
+       TelCallCliMode_t CliMode;                   /**< CLI mode */
+       TelCallNoCliCause_t no_cli_cause;       /**< TBD */
+} TelCallMtSsInfo_t; // not used
+
+typedef struct {
+       int isMobileOriginated;                                      /**< Is this call Mobile Originated? */
+       TelCallNameMode_t nameMode;                                  /**< Calling Party Name availability mode */
+       char callNumber[TAPI_CALL_DIALDIGIT_LEN_MAX + 1]; /**< A character array of the destination address. This follows the dial @a callNumber format */
+       unsigned int startTime;                                     /**< Time when a call is started */
+       unsigned int endTime;                                           /**< Time when a call is ended */
+       TelCallType_t callType;                                     /**< Type of a call */
+       TelCallStates_t callState;                                      /**< State of a call */
+       TelCallActiveState_t activeState;                       /**< Status of a call */
+       TelConferenceCallState_t conferenceState;       /**< State of a conference call */
+       TelCallingNameInfo_t callingNameInfo;           /**< Calling name information of a call */
+       TelCallActiveLine_t current_line;                       /**< Line information of a call */
+       TelCallCause_t cause;                                           /**< End type of a call when a call is ended */
+       TelTapiEndCause_t endCause;                                 /**< End Cause */
+} TelTapiCallInfo_t;
+
+/**
+ * @brief The structure type for the connected number information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelCallCliMode_t CliMode;                   /**< CLI mode */
+       TelCallNoCliCause_t no_cli_cause;   /**< Cause when no CLI number */
+       unsigned char dcs;                                      /**< DCS */
+       unsigned char number_type;                      /**< Number type */
+       TelCallNameMode_t name_mode;            /**< Display mode of the name */
+       char number[TAPI_CALL_DIALDIGIT_LEN_MAX + 1];           /**< Caller number, null terminated ASCII */
+       char sub_address[TAPI_CALL_SUBADDRESS_LEN_MAX + 1]; /**< Called sub-address, null terminated ASCII */
+} TelCallConnectedNumberInfo_t;
+
+/**
+ * @brief The structure type for information about call time and call count.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned short req_type_mask;   /**< Call time request type */
+       unsigned long TotalCallCnt;         /**< Total Call Count */
+       unsigned long OutgoingCallCnt;  /**< Outgoing Call Count */
+       unsigned long IncomingCallCnt;  /**< Incoming Call Count */
+       unsigned long TotalCallTime;    /**< Overall Call Time(Outgoing + Incoming, in seconds) */
+       unsigned long OutgoingCallTime; /**< Overall Outgoing Call Time(in seconds) */
+       unsigned long IncomingCallTime; /**< Overall Incoming Call Time(in seconds) */
+       unsigned long LastCallTime;         /**< Last Call Time(in seconds) */
+} TelCallTimeInfo_t;
+
+/**
+ * @brief The structure type for information about display record in CDMA.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char Record[TAPI_CALL_DISPLAY_RECORD_MAX + 1]; /**< Display record */
+} TelCallDisplayRecordInfo_t;
+
+/**
+ * @brief The structure type for information about burst DTMF in CDMA.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       char dtmf_string[TAPI_CALL_BURST_DTMF_STRING_MAX + 1]; /** Burst DTMF string NULL terminated */
+       TelCallDtmfPulseWidth_t pulse_width;
+       TelCallDtmfInterDigitInterval_t inter_digit_interval;
+} TelCallBurstDtmf_t;
+
+/**
+ * @brief Structure type for the information about records in CDMA.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned int id;        /**< Call id */
+       TelCallRecordInfoType_t type;
+       union {
+               char name[TAPI_CALLING_NAME_SIZE_MAX + 1]; /**< name record */
+               char number[TAPI_CALL_DIAL_NUMBER_LEN_MAX + 1]; /**< number record */
+       } data;
+} TelCallRecordInfo_t;
+
+/**
+ * @brief Enumeration for call sound volume level.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SOUND_MUTE              =0x00,             /**< Sound is mute */
+       TAPI_SOUND_VOLUME_LEVEL_1=0x01,         /**< Volume level is 1 */
+       TAPI_SOUND_VOLUME_LEVEL_2=0x02,         /**< Volume level is 2 */
+       TAPI_SOUND_VOLUME_LEVEL_3=0x03,         /**< Volume level is 3 */
+       TAPI_SOUND_VOLUME_LEVEL_4=0x04,         /**< Volume level is 4 */
+       TAPI_SOUND_VOLUME_LEVEL_5=0x05,         /**< Volume level is 5 */
+       TAPI_SOUND_VOLUME_LEVEL_6=0x06,         /**< Volume level is 6 */
+       TAPI_SOUND_VOLUME_LEVEL_7=0x07,         /**< Volume level is 7 */
+       TAPI_SOUND_VOLUME_LEVEL_8=0x08,         /**< Volume level is 8 */
+       TAPI_SOUND_VOLUME_LEVEL_9=0x09          /**< Volume level is 9 */
+} TelSoundVolume_t;
+
+/**
+ * @brief Enumeration for call sound device type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SOUND_DEVICE_RECEIVER = 0x00,      /**< Device type Receiver */
+       TAPI_SOUND_DEVICE_SPEAKER_PHONE = 0x10, /**< Device type Speaker */
+       TAPI_SOUND_DEVICE_HFK = 0x20,           /**< Device type Handsfree */
+       TAPI_SOUND_DEVICE_HEADSET = 0x30,       /**< Device type HeadSet */
+       TAPI_SOUND_DEVICE_BLUETOOTH = 0x40,     /**< Device type Bluetooth */
+       TAPI_SOUND_DEVICE_EC = 0xA0,            /**< Device type external*/
+} TelSoundDevice_t;
+
+/**
+ * @brief Enumeration for call sound type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SOUND_TYPE_VOICE = 0x01,    /**< Call Sound type voice */
+       TAPI_SOUND_TYPE_KEYTONE = 0x02,  /**< Call Sound type keytone */
+       TAPI_SOUND_TYPE_BELL = 0x03,     /**< Call Sound type bell */
+       TAPI_SOUND_TYPE_MESSAGE = 0x04,  /**< Call Sound type message */
+       TAPI_SOUND_TYPE_ALARM = 0x05,    /**< Call Sound type alarm */
+       TAPI_SOUND_TYPE_PDA_MISC = 0x06, /**< Call Sound type PDA miscellaneous */
+} TelSoundType_t;
+
+
+typedef struct {
+       TelSoundDevice_t device; /**< Call Sound device info structure */
+       TelSoundType_t type;     /**< Call Sound type info structure */
+       TelSoundVolume_t volume; /**< Call Sound volume info structure */
+} TelCallVolumeInfo_t;
+
+typedef enum {
+       TAPI_SOUND_PATH_HANDSET                 =0x01,          /**< Audio path is handset */
+       TAPI_SOUND_PATH_HEADSET         =0x02,          /**< Audio path is handset */
+       TAPI_SOUND_PATH_HANDSFREE               =0x03,  /**< Audio path is Handsfree */
+       TAPI_SOUND_PATH_BLUETOOTH               =0x04,  /**< Audio path is bluetooth */
+       TAPI_SOUND_PATH_STEREO_BLUETOOTH   =0x05,       /**< Audio path is stereo bluetooth */
+       TAPI_SOUND_PATH_SPK_PHONE               =0x06,  /**< Audio path is speaker phone */
+       TAPI_SOUND_PATH_HEADSET_3_5PI       =0x07,      /**< Audio path is headset_3_5PI */
+       TAPI_SOUND_PATH_BT_NSEC_OFF         =0x08,      /**< Audio path Bluetooth NSEC is off */
+       TAPI_SOUND_PATH_MIC1                =0x09,      /**< Audio path Mic one */
+       TAPI_SOUND_PATH_MIC2                =0x0A,      /**< Audio path Bluetooth Mic two */
+       TAPI_SOUND_PATH_HEADSET_HAC         =0x0B,      /**< Audio path is headset HAC */
+} TelSoundPath_t;
+
+typedef struct {
+       TelSoundPath_t path;    /**< TBD */
+       enum ExtraVolumeStatus {
+               TAPI_SOUND_EX_VOLUME_OFF,       /**< TBD */
+               TAPI_SOUND_EX_VOLUME_ON,        /**< TBD */
+       } ex_volume;    /**< TBD */
+} TelCallSoundPathInfo_t;
+
+typedef enum {
+       TAPI_SOUND_MUTE_PATH_TX = 0x00, /**< Sound mute path transmit */
+       TAPI_SOUND_MUTE_PATH_RX = 0x02, /**< Sound mute path receiver */
+       TAPI_SOUND_MUTE_PATH_ALL= 0x04, /**< Sound mute path all */
+} TelSoundMutePath_t;
+
+typedef enum {
+       TAPI_SOUND_MUTE_STATUS_OFF = 0x00, /**< Sound mute status off */
+       TAPI_SOUND_MUTE_STATUS_ON  = 0x01, /**< Sound mute status on */
+} TelSoundMuteStatus_t;
+
+typedef enum {
+       TAPI_SOUND_NOISE_REDUCTION_OFF, /**< Sound noise reduction off */
+       TAPI_SOUND_NOISE_REDUCTION_ON,  /**< Sound noise reduction on */
+} TelSoundNoiseReduction_t;
+
+typedef struct {
+       unsigned int id;        /**< TBD */
+} TelCallAnswerCnf_t;
+
+typedef struct {
+       TelCallEndType_t type;  /**< TBD */
+       unsigned int id;        /**< TBD */
+} TelCallEndCnf_t;
+
+typedef struct {
+       unsigned int id;        /**< TBD */
+} TelCallHoldCnf_t;
+
+typedef struct {
+       unsigned int id;        /**< TBD */
+} TelCallActiveCnf_t;
+
+typedef struct {
+       unsigned int id;        /**< TBD */
+} TelCallSwapCnf_t;
+
+typedef struct {
+       unsigned int id;        /**< TBD */
+} TelCallJoinCnf_t;
+
+typedef struct {
+       unsigned int id;        /**< TBD */
+} TelCallSplitCnf_t;
+
+typedef struct {
+       unsigned int id;        /**< TBD */
+} TelCallTransferCnf_t;
+
+typedef struct {
+       unsigned int record_num;        /**< TBD */
+       TelCallVolumeInfo_t record[ 20 ];       /**< TBD */
+} TelCallGetVolumeInfoResp_t;
+
+typedef struct {
+       TelSoundMutePath_t path;        /**< TBD */
+       TelSoundMuteStatus_t status;    /**< TBD */
+} TelCallGetMuteStatusResp_t;
+
+typedef struct {
+       TelCallPrivacyMode_t mode;
+} TelCallGetPrivacyModeResp_t;
+
+typedef struct {
+       unsigned int id;        /**< TBD */
+       TelTapiEndCause_t cause; /**< End cause for the call indicates whether the call is released normally or due to some other cause */
+} TelCallStatusIdleNoti_t;
+
+typedef struct {
+       unsigned int id;        /**< TBD */
+} TelCallStatusActiveNoti_t;
+
+typedef struct {
+       unsigned int id;        /**< TBD */
+} TelCallStatusHeldNoti_t;
+
+typedef struct {
+       unsigned int id;        /**< TBD */
+} TelCallStatusDialingNoti_t;
+
+typedef struct {
+       unsigned int id;        /**< TBD */
+} TelCallStatusAlertNoti_t;
+
+typedef struct {
+       unsigned int id;        /**< TBD */
+} TelCallStatusIncomingNoti_t;
+
+typedef struct {
+       unsigned int id;        /**< TBD */
+} TelCallStatusWaitingNoti_t;
+
+typedef struct {
+       unsigned int id;        /**< TBD */
+} TelCallInfoWaitingNoti_t;
+
+typedef struct {
+       unsigned int id;        /**< TBD */
+} TelCallInfoForwardedNoti_t;
+
+typedef struct {
+       unsigned int id;
+} TelCallInfoForwardedCallNoti_t;
+
+typedef struct {
+       unsigned int id;        /**< TBD */
+} TelCallInfoBarredIncomingNoti_t;
+
+typedef struct {
+       unsigned int id;        /**< TBD */
+} TelCallInfoBarredOutgoingNoti_t;
+
+typedef struct {
+       unsigned int id;        /**< TBD */
+} TelCallInfoForwardConditionalNoti_t;
+
+typedef struct {
+       unsigned int id;        /**< TBD */
+} TelCallInfoForwardUnconditionalNoti_t;
+
+typedef struct {
+       unsigned int id;        /**< TBD */
+} TelCallInfoActiveNoti_t;
+
+typedef struct {
+       unsigned int id;        /**< TBD */
+} TelCallInfoHeldNoti_t;
+
+typedef struct {
+       unsigned int id;        /**< TBD */
+} TelCallInfoJoinedNoti_t;
+
+typedef struct {
+       TelCallOtaspStatus_t otasp_status;
+} TelCallOtaspStatusNoti_t;
+
+typedef struct {
+       TelCallOtapaStatus_t otapa_status;
+} TelCallOtapaStatusNoti_t;
+
+
+typedef struct {
+       TelCallPrivacyMode_t privacy_mode; /**< Voice Privacy Mode */
+} TelCallVoicePrivacyNoti_t;
+
+
+typedef struct {
+       TelCallRecordInfo_t info;
+} TelCallRecordInfoNoti_t;
+
+typedef struct {
+       TelCallAlertSignalType_t signal_type;
+       TelCallAlertPitchType_t pitch_type;
+       union {
+               TelCallToneSignal_t sig_tone_type;
+               TelCallIsdnAlertSignal_t sig_isdn_alert_type;
+               TelCallIs54bAlertSignal_t sig_is54b_alert_type;
+       } signal;
+} TelCallSignalInfoNoti_t;
+
+typedef struct {
+       TelSoundPath_t path;    /**< TBD */
+} TelCallSoundPathNoti_t;
+
+typedef enum {
+       TAPI_CALL_SOUND_RINGBACK_TONE_END,      /**< TBD */
+       TAPI_CALL_SOUND_RINGBACK_TONE_START,    /**< TBD */
+} TelCallSoundRingbackToneNoti_t;
+
+typedef enum {
+       TAPI_CALL_SOUND_WBAMR_STATUS_OFF,       /**< TBD */
+       TAPI_CALL_SOUND_WBAMR_STATUS_ON,        /**< TBD */
+       TAPI_CALL_SOUND_WBAMR_STATUS_OFF_16K,   /**< TBD */
+       TAPI_CALL_SOUND_WBAMR_STATUS_ON_8K,     /**< TBD */
+} TelCallSoundWbamrNoti_t;
+
+typedef struct {
+       TelSoundNoiseReduction_t status;        /**< TBD */
+} TelCallSoundNoiseReductionNoti_t;
+
+typedef struct {
+       TelCallPreferredVoiceSubs_t preferred_subs;
+} TelCallPreferredVoiceSubsNoti_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  // _TEL_CALL_H_
+
+/**
+ * @}
+ */
diff --git a/include/TelMisc.h b/include/TelMisc.h
new file mode 100644 (file)
index 0000000..d1af6fc
--- /dev/null
@@ -0,0 +1,356 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file TelMisc.h
+ */
+
+/**
+ * @internal
+ * @addtogroup CAPI_TELEPHONY_SERVICE_MODEM
+ * @{
+ */
+
+#ifndef _TEL_MISC_H_
+#define _TEL_MISC_H_
+
+#include <sys/time.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define MAX_VERSION_LEN        32    /**< Maximum version length *///sw version, hw version, rf cal date, me sn
+#define FUS_DUMMY_DATA_SIZE 2     /**< Data Size*/
+
+#define        MMICHECK_CALL_RELEASE_NOTI      "User.LauncherUi.RequestTermination"
+#define        MMICHECK_END_ALL_NOTI           "User.LauncherUi.RequestTermination"
+#define        MMICHECK_DIALER_KEY_NOTI        "User.LauncherUi.DialerKeyInsert"
+#define        MMICHECK_ACTIVITY_VIEW_NOTI     "User.MMICheck.ActivityView.ChangeStatus"
+
+#define TAPI_MISC_ME_SN_LEN_MAX                                32
+#define TAPI_MISC_PRODUCT_CODE_LEN_MAX         32
+#define TAPI_MISC_MODEL_ID_LEN_MAX                     17
+#define TAPI_MISC_PRL_ERI_VER_LEN_MAX          17
+
+#define TAPI_MISC_MCC_LEN_MAX                          3
+#define TAPI_MISC_MNC_LEN_MAX                          2
+#define TAPI_MISC_MIN_LEN_MAX                          10
+#define TAPI_MISC_MDN_LEN_MAX                          15
+#define TAPI_MISC_NAME_LEN_MAX                         17
+
+/**
+ * @brief Enumeration for the MMI check key values.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       MMI_CHECK_DIAL_STAR             =       0x2A,   /**< 20 00 2A AF 4B 7E */
+       MMI_CHECK_DIAL_SHARP    =       0x23,   /**< 20 00 23 6E D6 7E */
+       MMI_CHECK_DIAL_0                =       0x30,   /**< 20 00 30 74 F4 7E */
+       MMI_CHECK_DIAL_1,                                       /**< 20 00 31 FD E5 7E */
+       MMI_CHECK_DIAL_2,                                       /**< 20 00 32 66 D7 7E */
+       MMI_CHECK_DIAL_3,                                       /**< 20 00 33 EF C6 7E */
+       MMI_CHECK_DIAL_4,                                       /**< 20 00 34 50 B2 7E */
+       MMI_CHECK_DIAL_5,                                       /**< 20 00 35 D9 A3 7E */
+       MMI_CHECK_DIAL_6,                                       /**< 20 00 36 42 91 7E */
+       MMI_CHECK_DIAL_7,                                       /**< 20 00 37 CB 80 7E */
+       MMI_CHECK_DIAL_8,                                       /**< 20 00 38 3C 78 7E */
+       MMI_CHECK_DIAL_9,                                       /**< 20 00 39 B5 69 7E */
+
+       MMI_CHECK_END_ALL               =       0x41,   /**< TBD */
+
+       MMI_CHECK_CALL                  =       0x50,   /**< 20 00 50 72 97 7E */
+       MMI_CHECK_END                   =       0x51,   /**< 20 00 51 FB 86 7E */
+       MMI_CHECK_CANCEL                =       0x52,   /**< 20 00 52 60 B4 7E */
+       MMI_CHECK_RIGHT                 =       0x53,   /**< 20 00 5C 1E 5D 7E */
+       MMI_CHECK_SIDE_UP               =       0x54,   /**< 20 00 54 56 D1 7E */
+       MMI_CHECK_SIDE_DOWN             =       0x55,   /**< 20 00 55 DF C0 7E */
+
+       MMI_CHECK_LEFT                  =       0x5B,   /**< 20 00 5B A1 29 7E */
+       MMI_CHECK_ARROW_UP              =       0x63,   /**< 20 00 63 6A 94 7E */
+       MMI_CHECK_ARROW_DOWN    =       0x64,   /**< 20 00 64 D5 E0 7E */
+       MMI_CHECK_ARROW_LEFT    =       0x65,   /**< 20 00 65 5C F1 7E */
+       MMI_CHECK_ARROW_RIGHT   =       0x66,   /**< 20 00 66 C7 C3 7E */
+
+       MMI_CHECK_WAP                   =       0x8C,   /**< 20 00 53 E9 A5 7E */
+       MMI_CHECK_CAMERA                =       0x8D,   /**< 20 01 8D C2 83 7E */
+       MMI_CHECK_MP3                   =       0xDD,   /**< 20 00 DD 9F C8 7E */
+       MMI_CHECK_POWER                 =       0x95,   /**< 20 00 95 D3 06 7E */
+       MMI_CHECK_LONG_PRESS    =       0xFF    /**< TBD */
+} TelMiscMMICHECK_t;
+
+/**
+ * @brief Enumeration for the application key types.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       KEY_EXT_DIAL_0 = 0,     /**< TBD */
+       KEY_EXT_DIAL_1,     /**< TBD */
+       KEY_EXT_DIAL_2,     /**< TBD */
+       KEY_EXT_DIAL_3,     /**< TBD */
+       KEY_EXT_DIAL_4,     /**< TBD */
+       KEY_EXT_DIAL_5,     /**< TBD */
+       KEY_EXT_DIAL_6,     /**< TBD */
+       KEY_EXT_DIAL_7,     /**< TBD */
+       KEY_EXT_DIAL_8,     /**< TBD */
+       KEY_EXT_DIAL_9,     /**< TBD */
+       KEY_EXT_DIAL_STAR,      /**< 10 : * */
+       KEY_EXT_DIAL_SHARP,     /**< 11 : # */
+
+       KEY_EXT_DIAL_BACK,      /**< 12 : <- (backkey) */
+       KEY_EXT_DIAL_HIDE,      /**< 13 :�� (hidekey) */
+       KEY_EXT_DIAL_P,         /**< 14 : p */
+       KEY_EXT_DIAL_PLUS,      /**< 15 : + */
+       KEY_EXT_DIAL_MUTE,      /**< 16 : mute */
+
+       KEY_EXT_DIAL_CALL                       =       100,            /**< 100 : BTN1 (call) */
+       KEY_EXT_DIAL_MESSAGE,                                           /**< 101 : BTN2 (message) */
+       KEY_EXT_DIAL_VIDEO_CALL,                                        /**< 102 : BTN3 (video call) */
+       KEY_EXT_DIAL_SAVE,                                                      /**< 103 : BTN4 (save) */
+       KEY_EXT_DIAL_CALL_END,                                          /**< noti publish */
+       KEY_EXT_TERMINATE_ALL,  /**< TBD */
+
+       KEY_EXT_PAGEDOWN                        =       114,            /**< Volume down */
+       KEY_EXT_PAGEUP                          =       115,            /**< Volume up */
+       KEY_EXT_POWER                           =       116,            /**< Power short */
+       KEY_EXT_PEOPLE_VIEW                     =       132,            /**< People view */
+       KEY_EXT_TIMELINE                        =       169,            /**< Lifedrive */
+       KEY_EXT_PREPARE_CAMERA          =       171,            /**< Prepare Camera */
+       KEY_EXT_ACTIVITY_VIEW           =       174,            /**< Activity view */
+       KEY_EXT_CAMERA                          =       212,            /**< Camera */
+       KEY_EXT_SEARCH                          =       217,            /**< Phone Search */
+       KEY_EXT_POWER_LONG                      =       356,            /**< Power off */
+
+       KEY_EXT_INVALID_KEY                     =       500     /**< TBD */
+} TelMiscApplicationKey_t;
+
+/**
+ * @brief Enumeration for the touch event types.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_DIAG_TOUCH_CLICK_DOWN = 0x000F, /**< 0x0F00: Click Down */
+       TAPI_DIAG_TOUCH_MOVE = 0x0010,       /**< 0x1000: Move */
+       TAPI_DIAG_TOUCH_CLICK_UP = 0x0011,   /**< 0x1100: Click Up */
+       TAPI_DIAG_TOUCH_HOLD = 0x0012        /**< 0x1200: Hold */
+} TelMiscDiagTouchEventType_t;
+
+/**
+ * @brief Enumeration for the validity of alarm booting.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_MISC_ALARMBOOT_INACTIVATE, /**< 0x00: Inactivate */
+       TAPI_MISC_ALARMBOOT_ACTIVATE    /**< 0x00: Activate */
+} TelMiscAlarmMode_t;
+
+typedef enum {
+       TAPI_MISC_ME_IMEI = 0x00, /**< 0x00: IMEI, GSM/UMTS device */
+       TAPI_MISC_ME_ESN = 0x01,  /**< 0x01: ESN(Electronic Serial Number), it has essentially run out. CDMA device */
+       TAPI_MISC_ME_MEID = 0x02, /**< 0x02: MEID, this value can have hexa decimal digits. CDMA device */
+       TAPI_MISC_ME_MAX = 0xff   /**< 0xff: Reserved */
+} TelMiscSNIndexType_t;
+
+/**
+ * @brief Enumeration for the NAM Information MASK field.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_MISC_NAM_INFO_MASK_TOTAL                   = 0x0001,       /**< TBD */
+       TAPI_MISC_NAM_INFO_MASK_CURRENT_INDEX   = 0x0002,       /**< TBD */
+       TAPI_MISC_NAM_INFO_MASK_REQUEST_INDEX   = 0x0004,       /**< TBD */
+       TAPI_MISC_NAM_INFO_MASK_AUTONAM         = 0x0008,       /**< TBD */
+       TAPI_MISC_NAM_INFO_MASK_MCC                     = 0x0010,       /**< TBD */
+       TAPI_MISC_NAM_INFO_MASK_MNC                     = 0x0020,       /**< TBD */
+       TAPI_MISC_NAM_INFO_MASK_MIN                     = 0x0040,       /**< TBD */
+       TAPI_MISC_NAM_INFO_MASK_MDN                     = 0x0080,       /**< TBD */
+       TAPI_MISC_NAM_INFO_MASK_NAM_NAME                = 0x0100,       /**< TBD */
+       TAPI_MISC_NAM_INFO_MASK_NAM_CHANGE              = 0x0200,       /**< TBD */
+       TAPI_MISC_NAM_INFO_MASK_NAM_NUM         = 0x0400,       /**< TBD */
+       TAPI_MISC_NAM_INFO_MASK_ALL                     = 0x8000        /**< TBD */
+} TelMiscNamInfoMaskType_t;
+
+/**
+ * @brief Enumeration for the NAMIndex field.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_MISC_NAM_1 = 0x00, /**< TBD */
+       TAPI_MISC_NAM_2,            /**< TBD */
+       TAPI_MISC_NAM_3,            /**< TBD */
+       TAPI_MISC_NAM_4,            /**< TBD */
+       TAPI_MISC_NAM_5         /**< TBD */
+} TelMiscNamIndex_t;
+
+
+/**
+ * @brief Enumeration for the day of the week.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_MISC_NITZ_DOW_SUN = 0x00, /**< Sunday */
+       TAPI_MISC_NITZ_DOW_MON = 0x01, /**< Monday */
+       TAPI_MISC_NITZ_DOW_TUE = 0x02, /**< Tuesday */
+       TAPI_MISC_NITZ_DOW_WED = 0x03, /**< Wednesday */
+       TAPI_MISC_NITZ_DOW_THU = 0x04, /**< Thursday */
+       TAPI_MISC_NITZ_DOW_FRI = 0X05, /**< Friday */
+       TAPI_MISC_NITZ_DOW_SAT = 0x06  /**< Saturday */
+} tapi_misc_nitz_dayofweek_t;
+
+/**
+ * @brief Enumeration for daylight adjustment.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_MISC_NITZ_NOADJUST = 0x00, /**< No daylight adjustment */
+       TAPI_MISC_NITZ_ONE_HR = 0x01,   /**< One hour */
+       TAPI_MISC_NITZ_TW0_HR = 0x02    /**< Two hours */
+} tapi_misc_nitz_daylight_t;
+
+/**
+ * @brief Enumeration for the types of data.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_MISC_NITZ_INVALID                  = 0x00, /**< Invalid */
+       TAPI_MISC_NITZ_TIMEINFO_NW_CDMA = 0x01, /**< Time info network */
+       TAPI_MISC_NITZ_TIMEINFO_NW_GSM  = 0x02, /**< Time info network */
+       TAPI_MISC_NITZ_RTC_INFO_LINE    = 0x03, /**< RTC Info line */
+       TAPI_MISC_NITZ_RTC_BKUP_PHONE   = 0x04, /**< RTC Backup phone */
+       TAPI_MISC_NITZ_NO_TIME_INFO     = 0x05      /**< No time info */
+} tapi_misc_nitz_timeinfo_t;
+
+/**
+ * @brief The structure type for Mobile Equipment Version Information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char ver_mask; /**< Version mask  - 0x01:SW_ver, 0x02:HW_ver, 0x04:RF_CAL_date, 0x08:Product_code, 0x10:Model_ID, 0x20:PRL, 0x04:ERI, 0xff:all */
+       unsigned char szSwVersion[MAX_VERSION_LEN]; /**< Software version, null termination */
+       unsigned char szHwVersion[MAX_VERSION_LEN]; /**< Hardware version, null termination */
+       unsigned char szRfCalDate[MAX_VERSION_LEN]; /**< Calculation Date, null termination */
+       unsigned char szProductCode[TAPI_MISC_PRODUCT_CODE_LEN_MAX]; /**< Product code, null termination */
+       unsigned char szModelId[TAPI_MISC_MODEL_ID_LEN_MAX]; /**< Model ID (only for CDMA), null termination */
+       unsigned char prl_nam_num; /**< Number of PRL NAM fields */
+       unsigned char szPrlVersion[TAPI_MISC_PRL_ERI_VER_LEN_MAX * 3];/**< PRL version (only for CDMA), null termination */
+       unsigned char eri_nam_num; /**< Number of PRL NAM fields */
+       unsigned char szEriVersion[TAPI_MISC_PRL_ERI_VER_LEN_MAX * 3];/**< ERI version (only for CDMA), null termination */
+} TelMiscVersionInformation;
+
+/**
+ * @brief The structure type for Mobile Equipment Serial Number Information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char szEsn[TAPI_MISC_ME_SN_LEN_MAX]; /**< Number */
+       unsigned char szMeid[TAPI_MISC_ME_SN_LEN_MAX]; /**< Number */
+       unsigned char szImei[TAPI_MISC_ME_SN_LEN_MAX]; /**< Number */
+       unsigned char szImeiSv[TAPI_MISC_ME_SN_LEN_MAX]; /**< Number */
+} TelMiscSNInformation;
+
+/**
+ * @brief The structure type for the event delivery - event type.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       struct timeval time; /**< Time information */
+       unsigned short type; /**< Type of event */
+       unsigned short code; /**< Code */
+       long value; /**< Value */
+} input_event_t;
+
+/**
+ * @brief The structure type for Diagnostic Key Code Information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char keycode; /**< Key Code */
+       unsigned char keyhold; /**< Key Hold */
+} TelMiscDiagKeyCodeInfomation;
+
+/**
+ * @brief The structure type for alarm info.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char year; /**< Year */
+       unsigned char month; /**< Month */
+       unsigned char day; /**< Day */
+       unsigned char hour; /**< Hour */
+       unsigned char minute; /**< Minute */
+       unsigned char second; /**< Second */
+       unsigned char time_zone; /**< Time zone */
+       tapi_misc_nitz_dayofweek_t day_of_week; /**< Day of the week */
+} TelMiscAlarmInfo_t;
+
+/**
+ * @brief The structure type for the alarm response.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelMiscAlarmMode_t validity; /**< Validity */
+       TelMiscAlarmInfo_t alarm_info; /**< Alarm info */
+} TelMiscAlarmStatus_t;
+
+/**
+ * @brief The structure type for nam info.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned short nam_info_mask;   /**< TBD */
+       unsigned char nam_total;        /**< TBD */ // this field is not used in case of nam set req.
+       unsigned char nam_current_index;        /**< TBD */
+       unsigned char nam_req_index;    /**< TBD */
+       unsigned char nam_auto; /**< TBD */
+       unsigned char nam_mcc[TAPI_MISC_MCC_LEN_MAX+1]; /**< TBD */
+       unsigned char nam_mnc[TAPI_MISC_MCC_LEN_MAX+1]; /**< TBD */
+       unsigned char nam_min[TAPI_MISC_MIN_LEN_MAX+1]; /**< TBD */
+       unsigned char nam_mdn[TAPI_MISC_MDN_LEN_MAX+1]; /**< TBD */
+       unsigned char nam_name[TAPI_MISC_NAME_LEN_MAX+1];       /**< TBD */
+} TelMiscNamInfo_t;
+
+/**
+ * @brief The structure type for time info.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       tapi_misc_nitz_timeinfo_t time_zone_valid; /**< Time zone */
+       int bDaylight_valid; /**< Day light */
+       unsigned char year; /**< Year */
+       unsigned char month; /**< Month */
+       unsigned char day; /**< Day */
+       unsigned char hour; /**< Hour */
+       unsigned char minute; /**< Minute */
+       unsigned char second; /**< Second */
+       unsigned char time_zone; /**< Time zone */
+       tapi_misc_nitz_daylight_t daylight_adjust; /**< Day light adjust */
+       tapi_misc_nitz_dayofweek_t day_of_week; /**< Day of the week */
+       unsigned long plmn; /**< Day of the week */
+} tapi_misc_time_zone_info_type;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _TEL_MISC_H_
+
+/**
+ * @}
+ */
diff --git a/include/TelNetwork.h b/include/TelNetwork.h
new file mode 100644 (file)
index 0000000..90a3076
--- /dev/null
@@ -0,0 +1,684 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file TelNetwork.h
+ */
+
+/**
+ * @internal
+ * @addtogroup CAPI_TELEPHONY_SERVICE_NETWORK
+ * @{
+ */
+
+#ifndef _TEL_NETWORK_H_
+#define _TEL_NETWORK_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @brief Definition for the maximum network order.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETWORK_ORDER_MAX                                 5
+
+/**
+ * @brief Definition for the maximum network list.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETWORK_LIST_MAX                                  15
+
+/**
+ * @brief Definition for the maximum length of the network PLMN.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETWORK_PLMN_LEN_MAX                              6
+
+/**
+ * @brief Definition for the maximum length of the network name.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETWORK_NAME_LEN_MAX                              40
+
+/**
+ * @brief Definition for the maximum length of the network service provider's name.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETWORK_SPN_LEN_MAX                               20
+/**
+ * @brief Definition for the maximum records of the preferred PLMN list.
+ * @since_tizen 2.3
+ */
+#define TAPI_PREFERRED_PLMN_RECORDS_MAX                        150
+
+/**
+ * @brief Definition for the maximum network display info elements.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETWORK_DISPLAY_INFO_ELEMENTS             4
+
+/**
+ * @brief Definition for the maximum length of the network home zone tag.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETWORK_HOMEZONE_TAG_MAX_LEN              13
+
+/**
+ * @brief Definition for the maximux network CS display index.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETWORK_CS_DISP_INDEX                             0
+
+/**
+ * @brief Definition for the maximum network PS display index.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETWORK_PS_DISP_INDEX                             1
+
+/**
+ * @brief Definition for the maximum network SVC display index.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETWORK_SVC_DISP_INDEX                            2
+
+/**
+ * @brief Definition for the maximum network roaming display index.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETWORK_ROAM_DISP_INDEX                   3
+
+/**
+ * @brief Definition for the maximum number of subscriber services.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETWORK_SUBS_SVC_NUM_MAX                  6
+
+/**
+ * @brief Definition for the maximum length of the subscriber number.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETWORK_SUBS_NUM_LEN_MAX                  40
+
+/**
+ * @brief Definition for the maximum length of the subscriber name.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETWORK_SUBS_ALPHA_LEN_MAX                        16
+
+/**
+ * @brief Definition for the maximum GERAN neighboring cell list.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETWORK_GERAN_NEIGHBORING_CELL_LIST_MAX 6
+
+/**
+ * @brief Definition for the maximum UMTS neighboring cell list.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETWORK_UMTS_NEIGHBORING_CELL_LIST_MAX 24
+
+/* This value defines the network mode */
+/**
+ * @brief Definition for the "set network mode to automatic" value.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETWORK_MODE_AUTO         0x00
+
+/**
+ * @brief Definition for "set network mode to GSM" value.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETWORK_MODE_GSM          0x01
+
+/**
+ * @brief Definition for the "set network mode to WCDMA" value.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETWORK_MODE_WCDMA                0x02
+
+/**
+ * @brief Definition for the "set network mode to 1XRTT" value.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETWORK_MODE_1XRTT                0x04
+
+/**
+ * @brief Definition for the "set network mode to LTE" value.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETWORK_MODE_LTE          0x08
+
+/**
+ * @brief Definition for the "set network mode to EVDO" value.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETWORK_MODE_EVDO         0x10
+
+/**
+ * @brief Definition for the "set network mode to CDMA" value.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETWORK_MODE_CDMA         0x14
+
+/**
+ * @brief Enumeration for the network selection modes.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_NETWORK_SELECTIONMODE_AUTOMATIC,   /**< Network selection is in the Automatic selection mode */
+       TAPI_NETWORK_SELECTIONMODE_MANUAL       /**< Network selection is in the Manual selection mode (Not applicable to CDMA) */
+} TelNetworkSelectionMode_t;
+
+/**
+ * @brief Enumeration for the network emergency callback mode states (3GPP2 specific enum).
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_NETWORK_EMERGENCY_CALLBACK_MODE_ENTER,     /**< Enter emergency callback mode */
+       TAPI_NETWORK_EMERGENCY_CALLBACK_MODE_EXIT       /**< Exit emergency callback mode */
+} TelNetworkEmergencyCallbackMode_t;
+
+/**
+ * @brief Enumeration for the status of the network service.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_NETWORK_SERVICE_LEVEL_NO,                  /**< No service available in the network ME is camped */
+       TAPI_NETWORK_SERVICE_LEVEL_EMERGENCY,   /**< Only emergency service available in the network ME is camped */
+       TAPI_NETWORK_SERVICE_LEVEL_FULL,                /**< FULL service available in the network ME is camped */
+       TAPI_NETWORK_SERVICE_LEVEL_SEARCH               /**< Searching for service */
+} TelNetworkServiceLevel_t;
+
+/**
+ * @brief Enumeration for the service types of TAPI.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_NETWORK_SERVICE_TYPE_UNKNOWN = 0x0,        /**< Service type is Unknown */
+       TAPI_NETWORK_SERVICE_TYPE_NO_SERVICE,           /**< No Service available */
+       TAPI_NETWORK_SERVICE_TYPE_EMERGENCY,            /**< Service type is Emergency */
+       TAPI_NETWORK_SERVICE_TYPE_SEARCH,                       /**< Service type is Searching */
+       TAPI_NETWORK_SERVICE_TYPE_2G,                           /**< Service type is 2G. In case of CDMA, service type is set to 2G when System Type is IS95A/IS95B/CDMA_1X */
+       TAPI_NETWORK_SERVICE_TYPE_2_5G,                         /**< Service type is 2.5G */
+       TAPI_NETWORK_SERVICE_TYPE_2_5G_EDGE,            /**< Service type is 2.5G (EDGE) */
+       TAPI_NETWORK_SERVICE_TYPE_3G,                           /**< Service type is 3G. In case of CDMA, service type is set to 3G when System Type is EVDO_REV_0/REV_A/REV_B/EHRPD */
+       TAPI_NETWORK_SERVICE_TYPE_HSDPA,                        /**< Service type is HSDPA */
+       TAPI_NETWORK_SERVICE_TYPE_LTE                           /**< Service type is LTE */
+} TelNetworkServiceType_t;
+
+/**
+ * @brief Enumeration for the system types of TAPI.
+ * @since_tizen 2.3
+ */
+typedef enum
+{
+       TAPI_NETWORK_SYSTEM_NO_SRV,                             /**< No Service available */
+       TAPI_NETWORK_SYSTEM_GSM,                                /**< Available service is GSM */
+       TAPI_NETWORK_SYSTEM_GPRS,                               /**< Available service is GPRS */
+       TAPI_NETWORK_SYSTEM_EGPRS,                              /**< Available service is EGPRS */
+       TAPI_NETWORK_SYSTEM_PCS1900,                    /**< Available service is PCS1900 band */
+       TAPI_NETWORK_SYSTEM_UMTS,                               /**< Available service is UMTS */
+       TAPI_NETWORK_SYSTEM_GSM_AND_UMTS,               /**< Both GSM and UMTS systems available */
+       TAPI_NETWORK_SYSTEM_HSDPA,                              /**< Available service is HSDPA */
+       TAPI_NETWORK_SYSTEM_IS95A,                              /**< Available service is IS95A */
+       TAPI_NETWORK_SYSTEM_IS95B,                              /**< Available service is IS95B */
+       TAPI_NETWORK_SYSTEM_CDMA_1X,                    /**< Available service is CDMA 1X */
+       TAPI_NETWORK_SYSTEM_EVDO_REV_0, /**< Available service is EV-DO rev0 */
+       TAPI_NETWORK_SYSTEM_1X_EVDO_REV_0_HYBRID, /**< Available service is 1X and EV-DO rev0 */
+       TAPI_NETWORK_SYSTEM_EVDO_REV_A, /**< Available service is EV-DO revA */
+       TAPI_NETWORK_SYSTEM_1X_EVDO_REV_A_HYBRID, /**< Available service is 1X and EV-DO revA */
+       TAPI_NETWORK_SYSTEM_EVDO_REV_B, /**< Available service is EV-DO revB */
+       TAPI_NETWORK_SYSTEM_1X_EVDO_REV_B_HYBRID, /**< Available service is 1X and EV-DO revB */
+       TAPI_NETWORK_SYSTEM_EVDV,               /**< Available service is EV-DV */
+       TAPI_NETWORK_SYSTEM_EHRPD,              /**< Available service is EHRPD */
+       TAPI_NETWORK_SYSTEM_LTE                 /**< Available service is LTE */
+} TelNetworkSystemType_t;
+
+/**
+ * @brief Enumeration for the different network bands.
+ * @since_tizen 2.3
+ */
+typedef enum
+{
+       TAPI_NETWORK_BAND_TYPE_ANY = 0x00,              /**< All bands can be tried */
+       TAPI_NETWORK_BAND_TYPE_GSM850,                  /**< This member sets the band to GSM 850 */
+       TAPI_NETWORK_BAND_TYPE_GSM_900_1800,    /**< This member sets the band to GSM 900_1800 */
+       TAPI_NETWORK_BAND_TYPE_GSM1900,                 /**< GSM 1900 */
+       TAPI_NETWORK_BAND_TYPE_GSM,                             /**< This member sets all GSM bands */
+       TAPI_NETWORK_BAND_TYPE_WCDMA,                   /**< This member sets all WCDMA bands */
+       TAPI_NETWORK_BAND_TYPE_WCDMA850,                /**< This member sets the band to WCDMA 850 */
+       TAPI_NETWORK_BAND_TYPE_WCDMA1900,               /**< This member sets the band to WCDMA 1900 */
+       TAPI_NETWORK_BAND_TYPE_WCDMA2100,               /**< This member sets the band to WCDMA 2100 */
+       TAPI_NETWORK_BAND_TYPE_GSM900,                  /**< GSM 900 */
+       TAPI_NETWORK_BAND_TYPE_GSM1800,                 /**< This member sets the band to GSM 1800 */
+       TAPI_NETWORK_BAND_TYPE_GSM_850_1900,    /**< This member sets the band to GSM 850_1900 */
+       TAPI_NETWORK_BAND_TYPE_LTE_BAND_4,              /**< This member sets the band to LTE BAND 4 */
+       TAPI_NETWORK_BAND_TYPE_LTE_BAND_17              /**< This member sets the band to LTE BAND 17 */
+} TelNetworkBand_t;
+
+/**
+ * @brief Enumeration for the different network operation causes.
+ * @since_tizen 2.3
+ */
+typedef enum
+{
+       TAPI_NETWORK_NO_ERR = 0x00,                                     /**< There is no error for any network operation */
+       TAPI_NETWORK_OPERATION_ABORTED,                         /**< This error is sent when an operation is aborted */
+       TAPI_NETWORK_OPERATION_FAILED,                          /**< There is an error for a network operation */
+       TAPI_NETWORK_PHONE_IN_USE_ERR,                          /**< This error will be returned when a network operation is tried while the phone is in use(eg: Voice / Data call in progress due to which network operation failed) */
+       TAPI_NETWORK_OFFLINE_ERR,                                       /**< This error is sent when a network option is tried when the phone is in the offline mode */
+       TAPI_NETWORK_CONFIG_SETTINGS_FAILURE_ERR,       /**< This error is sent when a modem is unable to process the config settings information */
+       TAPI_NETWORK_INTERNAL_FAILURE_ERR,                      /**< This error is used to indicate an internal failure */
+       TAPI_NETWORK_MEMORY_FULL_ERR                            /**< This error is caused when the memory is full */
+} TelNetworkOperationCause_t;
+
+/**
+ * @brief Enumeration for the operation that can be done on a preferred PLMN.
+ * @since_tizen 2.3
+ */
+typedef enum
+{
+       TAPI_NETWORK_PREF_PLMN_ADD=0x01,                        /**< Addition to the Network Preferred PLMN list */
+       TAPI_NETWORK_PREF_PLMN_EDIT,                            /**< Edit the network Preferred PLMN list */
+       TAPI_NETWORK_PREF_PLMN_DELETE                           /**< Delete the entry to the network Preferred PLMN list */
+} TelNetworkPreferredPlmnOp_t;
+
+/**
+ * @brief Enumeration for the network PLMN type.
+ * @since_tizen 2.3
+ */
+typedef enum
+{
+       TAPI_UNKNOWN_PLMN=0,                            /**< Network PLMN type - Unknown */
+       TAPI_HOME_PLMN ,                                        /**< Network PLMN type - Home PLMN */
+       TAPI_AVAILABLE_PLMN,                            /**< Network PLMN type - Available */
+       TAPI_FORBIDDEN_PLMN,                            /**< Network PLMN type - Forbidden */
+}TelNetworkPlmnType_t;
+
+/**
+ * @brief Enumeration for the network home zone command.
+ * @since_tizen 2.3
+ */
+typedef enum
+{
+       TAPI_NETWORK_ZONEINFO_NONE,                             /**< Network Zone info none */
+       TAPI_NETWORK_ZONEINFO_IND,                              /**< Network Zone info indication */
+       TAPI_NETWORK_ZONEINFO_CLEAR                             /**< Network Zone info clear */
+}TelNetworkHomeZoneCommand_t;
+
+/**
+ * @brief Enumeration for the network home zone type.
+ * @since_tizen 2.3
+ */
+typedef enum
+{
+       TAPI_NETWORK_ZONE_NONE,                                 /**< Network Zone Type none */
+       TAPI_NETWORK_ZONETYPE_HOMEZONE,             /**< Network Zone Type Home zone */
+       TAPI_NETWORK_ZONETYPE_CITYZONE,                 /**< Network Zone Type City zone */
+}TelNetworkHomeZone_t;
+
+/**
+ * @brief Enumeration for the network name display condition type.
+ * @since_tizen 2.3
+ */
+typedef enum
+{
+       TAPI_NETWORK_DISP_INVALID= 0x00,                /**< Invalid Display Condition */
+       TAPI_NETWORK_DISP_SPN = 0x01,                   /**< Display Condition is SPN */
+       TAPI_NETWORK_DISP_PLMN = 0x02,              /**< Display Condition is PLMN */
+       TAPI_NETWORK_DISP_SPN_PLMN = 0x03,          /**< Display Condition is SPN or PLMN */
+}TelNetworkNameDispCondition_t;
+
+/**
+ * @brief Enumeration for the CDMA Preferred Network Type(CDMA only).
+ * @since_tizen 2.3
+ */
+typedef enum
+{
+    TAPI_NETWORK_PREF_NET_TYPE_HOME_ONLY = 0,
+    TAPI_NETWORK_PREF_NET_TYPE_AFFILIATED = 1,
+    TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC = 2,
+    TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC_A = 3,
+    TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC_B = 4,
+    TAPI_NETWORK_PREF_NET_TYPE_ROAM_DOMESTIC = 5,
+    TAPI_NETWORK_PREF_NET_TYPE_ROAM_INTERNATIONAL = 6,
+    TAPI_NETWORK_PREF_NET_TYPE_ROAM_DUAL = 7,
+    TAPI_NETWORK_PREF_NET_TYPE_BLANK = 8,
+} TelNetworkPrefNetType_t;
+
+/**
+ * @brief Enumeration for the CDMA PRL Preferred Only field stored in the PRL(CDMA only).
+ * @since_tizen 2.3
+ */
+typedef enum
+{
+    TAPI_NETWORK_PRL_PREF_ONLY_OFF,                    /**< Preferred Only is FALSE */
+    TAPI_NETWORK_PRL_PREF_ONLY_ON,                     /**< Preferred Only is TRUE */
+    TAPI_NETWORK_PRL_PREF_ONLY_NONE                    /**< There isn't any Preferred Only Option */
+} TelNetworkPrlPrefOnly_t;
+
+/**
+ * @brief Enumeration for the packet service protocol type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_NETWORK_PS_TYPE_UNKNOWN,
+       TAPI_NETWORK_PS_TYPE_HSDPA,
+       TAPI_NETWORK_PS_TYPE_HSUPA,
+       TAPI_NETWORK_PS_TYPE_HSPA,
+       TAPI_NETWORK_PS_TYPE_HSPAP
+} TelNetworkPsType_t;
+
+/**
+ * @brief Enumeration for the network name option.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_NETWORK_NAME_OPTION_NONE,
+       TAPI_NETWORK_NAME_OPTION_SPN,
+       TAPI_NETWORK_NAME_OPTION_OPERATOR,
+       TAPI_NETWORK_NAME_OPTION_ANY
+} TelNetworkNameOption_t;
+
+/**
+ * @brief Enumeration for the possible 'default' Data Subscriptions.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_NETWORK_DEFAULT_DATA_SUBS_UNKNOWN = -1,  /**< Unknown status */
+       TAPI_NETWORK_DEFAULT_DATA_SUBS_SIM1 = 0,      /**< SIM 1 */
+       TAPI_NETWORK_DEFAULT_DATA_SUBS_SIM2           /**< SIM 2 */
+} TelNetworkDefaultDataSubs_t;
+
+/**
+ * @brief TelNetworkDefaultSubs_t
+ * This enumeration defines possible 'default' Subscription for CS (Voice)
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_NETWORK_DEFAULT_SUBS_UNKNOWN = -1,  /**<  Unknown status **/
+       TAPI_NETWORK_DEFAULT_SUBS_SIM1 = 0, /**< SIM 1 network **/
+       TAPI_NETWORK_DEFAULT_SUBS_SIM2 /**<  SIM 2 network **/
+} TelNetworkDefaultSubs_t;
+
+/**
+ * @brief The structure type for the preferred PLMN information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char Index; /**< Network Preferred PLMN list index */
+       char Plmn[TAPI_NETWORK_PLMN_LEN_MAX + 1]; /**< Network Preferred PLMN */
+       char network_name[TAPI_NETWORK_NAME_LEN_MAX + 1]; /**< Network Name */
+       char service_provider_name[TAPI_NETWORK_NAME_LEN_MAX + 1]; /**< Service provider name */
+       TelNetworkSystemType_t SystemType; /**< Network system type */
+} TelNetworkPreferredPlmnInfo_t;
+
+/**
+ * @brief The structure type for the preferred PLMN list.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned int NumOfPrefPlmns; /**< Number of preferred PLMNs in the list */
+       TelNetworkPreferredPlmnInfo_t PrefPlmnRecord[TAPI_PREFERRED_PLMN_RECORDS_MAX]; /**< Preferred PLMNs list */
+} TelNetworkPreferredPlmnList_t;
+
+/**
+ * @brief The structure type for the location area code and cell ID.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned short LocationAreaCode; /**< Network Location area code */
+       unsigned long CellId;            /**< Network Cell ID */
+} TelNetworkLocationCellInfo_t;
+
+/**
+ * @brief The structure type for the network status.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char svctype; /**< Network SVC type */
+       unsigned char roaming; /**< Network roaming */
+} TelNetworkStatus_t;
+
+/**
+ * @brief The structure type for the network CS, PS status.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char cstype; /**< Network CS type */
+       unsigned char pstype; /**< Network PS type */
+} TelNetworkCsPsStatus_t;
+
+/**
+ * @brief The structure type for the network identity.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       char network_name[TAPI_NETWORK_NAME_LEN_MAX + 1]; /**< Network Name */
+       char service_provider_name[TAPI_NETWORK_NAME_LEN_MAX + 1]; /**< Service provider name */
+       char plmn[TAPI_NETWORK_PLMN_LEN_MAX+1]; /**< Network PLMN */
+       unsigned int plmn_id; /**< PLMN ID */
+       TelNetworkPlmnType_t type_of_plmn; /**< PLMN type */
+       TelNetworkSystemType_t access_technology; /**< Access technology */
+} TelNetworkIdentity_t;
+
+/**
+ * @brief The structure type for the network PLMN list.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       char networks_count; /**< Network PLMN count */
+       TelNetworkIdentity_t network_list[TAPI_NETWORK_LIST_MAX]; /**< Network list */
+} TelNetworkPlmnList_t;
+
+/**
+ * @brief The structure type for network display info.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int DisplayInfo[TAPI_NETWORK_DISPLAY_INFO_ELEMENTS]; /**< Network display info */
+} TelNetworkDisplayInfo_t;
+
+typedef struct {
+       TelNetworkNameDispCondition_t DispCondition; /**< Display condition of SPN & PLMN */
+       unsigned char Spn[TAPI_NETWORK_SPN_LEN_MAX + 1]; /**< SPN value */
+       unsigned char Plmn[TAPI_NETWORK_NAME_LEN_MAX + 1]; /**< PLMN value, in 2G case if DispPlmn is @c true and the PLMN value is @c NULL then the network module has to display a registered PLMN */
+} TelNetworkSpnPlmnDisplayInfo_t;
+
+/**
+ * @brief The structure type for the network's SPN, MCC, and MNC info.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int mcc; /**< Network MCC */
+       int mnc; /**< Network MNC */
+       char bDispCondition; /**< Display condition */
+       char short_network_name[TAPI_NETWORK_NAME_LEN_MAX + 1]; /**< Network short name */
+       char spn_name[TAPI_NETWORK_NAME_LEN_MAX + 1]; /**< Network SPN name */
+} TelNetworkSpnMccMncInfo_t;
+
+/**
+ * @brief The structure type for information related to a CDMA system.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int  carrier; /**< CDMA Carrier */
+       unsigned int system_id; /**< System ID */
+       unsigned int network_id; /**< Network ID */
+       unsigned int base_station_id; /**< Base station ID */
+       int base_station_latitude; /**< Latitude of the current base station */
+       int base_station_longitude; /**< Longitude of the current base station */
+       unsigned int registration_zone; /**< Registration Zone */
+       unsigned int pilot_offset; /**< Pilot Offset */
+} TelNetworkCdmaSysInfo_t;
+
+typedef struct {
+       TelNetworkSystemType_t act; /**< Access technology */
+       char plmn[TAPI_NETWORK_PLMN_LEN_MAX+1]; /**< Network PLMN */
+       union {
+               int lac; /**< Location Area Code - 3GPP Only */
+               TelNetworkCdmaSysInfo_t cdma_info; /**< CDMA Only */
+       }info;
+} TelNetworkServing_t;
+
+typedef struct {
+       int cell_id;    /**< Cell ID (@c -1 indicates that cell ID information is not present) */
+       int lac;                /**< Location area code (this field is ignored when @a cell_id is not present) */
+       int bcch;               /**< Broadcast Control Channel Frequency number */
+       int bsic;               /**< Base Station Identification Code */
+       int rxlev;              /**< Received Signal Strength level. Valid values are (0-63, 99)
+                                        * Reference: 33GPP TS 45.008 [20] subclause 8.1.4
+                                          - Rxlev 0 is a signal strength less than -110 dBm
+                                      - Rxlev 1 is -110 dBm to -109 dBm
+                                      - Rxlev 2 is -109 dBm to -108 dBm
+                                      - ...
+                                      - Rxlev 62 is -49 dBm to -48 dBm
+                                      - Rxlev 63 is greater than -48 dBm
+                                      - Rxlev 99 is not known or detectable
+                                    */
+} TelNetworkGeranCellInfo_t;
+
+typedef struct {
+       int cell_id;    /**< UCID (@c -1 indicates that cell ID information is not present) */
+                                       /* UCID : RNCID + Cell ID(16 bit) */
+       int lac;                /**< Location area code (this field is ignored when @a cell_id is not present) */
+       int arfcn;      /**< UTRA Absolute RF Channel Number */
+       int psc;                /**< Primary scrambling Code */
+       int rscp;               /**< Received Signal Code Power. Valid values are (0-96, 255)
+                                        * Reference : 3GPP TS 25.133 [95] subclause 9.1.1.3 and 3GPP TS 25.123 [96] subclause 9.1.1.1.3)
+                                          - Rscp 0 is a signal strength less than -120 dBm
+                                      - Rscp 1 is -120 dBm to -119 dBm
+                                      - Rscp 2 is -119 dBm to -118 dBm
+                                      - ...
+                                      - Rscp 95 is -26 dBm to -25 dBm
+                                      - Rscp 96 is greater than -25 dBm
+                                      - Rscp 255 is not known or detectable
+                                */
+} TelNetworkUmtsCellInfo_t;
+
+typedef struct {
+       int cell_id;    /**< Cell ID (@c -1 indicates that cell ID information is not present) */
+       int lac;                /**< Location area code (this field is ignored when @a cell_id is not present) */
+       int earfcn;     /**< E-UTRA Absolute RF Channel Number */
+       int tac;                /**< Tracking area code */
+       int rssi;               /**< RSSI in dBm(signed) */
+} TelNetworkLteCellInfo_t;
+
+typedef struct {
+       unsigned int system_id; /**< System ID */
+       unsigned int network_id;        /**< Network ID */
+       unsigned int base_station_id; /**< Base station ID */
+       unsigned int reference_pn;       /**< Reference PN */
+       int base_station_latitude; /**< Latitude of the current base station */
+       int base_station_longitude; /**< Longitude of the current base station */
+} TelNetworkCdmaCellInfo_t;
+
+typedef struct {
+       TelNetworkSystemType_t act;     /**< Access technology */
+       int mcc;        /**< Mobile Country Code */
+       int mnc;        /**< Mobile Network Code */
+       union {
+               TelNetworkGeranCellInfo_t geran;        /**< GERAN cell info */
+               TelNetworkUmtsCellInfo_t umts;  /**< UMTS cell info */
+               TelNetworkLteCellInfo_t lte;    /**< LTE cell info */
+               TelNetworkCdmaCellInfo_t cdma;  /**< CDMA cell info */
+       } cell;         /**< TBD */
+} TelNetworkServingCellInfo_t;
+
+typedef struct {
+       TelNetworkServingCellInfo_t serving;    /**< Serving cell info */
+       int geran_list_count;/**< GERAN cell info list count */
+       TelNetworkGeranCellInfo_t geran_list[TAPI_NETWORK_GERAN_NEIGHBORING_CELL_LIST_MAX];/**< GERAN cell info list */
+       int umts_list_count;/**< UMTS cell info list count */
+       TelNetworkUmtsCellInfo_t umts_list[TAPI_NETWORK_UMTS_NEIGHBORING_CELL_LIST_MAX];/**< UMTS cell info list */
+} TelNetworkNeighboringCellInfo_t;
+
+/**
+ * NEW NEW NEW
+ */
+typedef struct {
+       TelNetworkServiceLevel_t cs; /**< Circuit Switched status */
+       TelNetworkServiceLevel_t ps; /**< Packet Swithced status */
+       TelNetworkServiceType_t type; /**< Registration service type */
+       int is_roaming; /**< Roaming status 1: TRUE; FALSE otherwise */
+} TelNetworkRegistrationStatus_t;
+
+struct tel_noti_network_signal_strength {
+       int dbm; /**< Signal Strenght in dBm */
+};
+
+struct tel_noti_network_cell_info {
+       int lac; /**< Location Area Code */
+       int cell_id; /**< Cell ID */
+};
+
+struct tel_noti_network_change {
+       TelNetworkSystemType_t act; /**< Access technology */
+       char plmn[TAPI_NETWORK_PLMN_LEN_MAX+1]; /**< Network PLMN */
+};
+
+struct tel_noti_network_time_info {
+       int year;               /**< TBD */
+       int month;              /**< TBD */
+       int day;                /**< TBD */
+       int hour;               /**< TBD */
+       int minute;             /**< TBD */
+       int second;             /**< TBD */
+       int wday;               /**< TBD */
+       int gmtoff;             /**< TBD */
+       int dstoff;             /**< TBD */
+       int isdst;              /**< TBD */
+       char plmn[TAPI_NETWORK_PLMN_LEN_MAX+1]; /**< Network PLMN */
+};
+
+struct  tel_noti_network_identity {
+       char plmn[TAPI_NETWORK_PLMN_LEN_MAX+1]; /**< Network PLMN */
+       char short_name[17]; /**< Short network name */
+       char full_name[33]; /**< Full network name */
+};
+
+struct tel_noti_network_emergency_callback_mode {
+       TelNetworkEmergencyCallbackMode_t mode; /**< Emergency Callback Mode status */
+};
+
+struct tel_noti_network_neighboring_cell_info {
+       TelNetworkNeighboringCellInfo_t info; /**< Neighboring Cell Information */
+};
+
+struct tel_noti_network_default_data_subs {
+       TelNetworkDefaultDataSubs_t default_subs; /**< 'default' Data Subscription */
+};
+
+struct tel_noti_network_default_subs {
+       TelNetworkDefaultSubs_t default_subs; /**< 'default' Subscription */
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _TEL_NETWORK_H_
+
+/**
+* @}
+*/
diff --git a/include/TelPower.h b/include/TelPower.h
new file mode 100644 (file)
index 0000000..c00b6a2
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file TelPower.h
+ */
+
+/**
+ * @internal
+ * @addtogroup CAPI_TELEPHONY_SERVICE_MODEM
+ * @{
+ */
+
+#ifndef _TEL_POWER_H_
+#define _TEL_POWER_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Enumeration for the phone power reset commands.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_PHONE_POWER_ON = 0,
+       TAPI_PHONE_POWER_OFF,
+       TAPI_PHONE_POWER_RESET,
+       TAPI_PHONE_POWER_LOW,
+       TAPI_PHONE_POWER_MAX = TAPI_PHONE_POWER_LOW
+} tapi_power_phone_cmd_t;
+
+/**
+ * @brief Enumeration for the phone power status values.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_PHONE_POWER_STATUS_UNKNOWN = -1,
+       TAPI_PHONE_POWER_STATUS_ON,
+       TAPI_PHONE_POWER_STATUS_OFF,
+       TAPI_PHONE_POWER_STATUS_RESET,
+       TAPI_PHONE_POWER_STATUS_LOW,
+       TAPI_PHONE_POWER_STATUS_ERROR
+} tapi_power_phone_power_status_t;
+
+/**
+ * @details Enumeration for flight modes.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_POWER_FLIGHT_MODE_ENTER = 0x01, /**< ONLINE OFF */
+       TAPI_POWER_FLIGHT_MODE_LEAVE, /**< ONLINE ON */
+       TAPI_POWER_FLIGHT_MODE_MAX              /**< TBD */
+} tapi_power_flight_mode_type_t;
+
+typedef enum {
+       TAPI_POWER_FLIGHT_MODE_RESP_ON = 0x01, /**< Flight Mode On Success */
+       TAPI_POWER_FLIGHT_MODE_RESP_OFF, /**< Flight Mode Off Success */
+       TAPI_POWER_FLIGHT_MODE_RESP_FAIL, /**< Flight Mode Request Fail */
+       TAPI_POWER_FLIGHT_MODE_RESP_MAX         /**< TBD */
+} tapi_power_flight_mode_resp_type_t;
+
+/**
+ * @brief Enumeration for the phone battery status levels.
+ *
+ * @details
+ * 0x01 : Power Off Level                     => PhoneLevel = power off
+ * 0x02 : Critical-Low Battery Level          => PhoneLevel = 0
+ * 0x03 : Low Battery Level                   => PhoneLevel = 1
+ * 0x04 : Normal Level                        => PhoneLevel = 2,3,4
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_POWER_BATT_STAT_POWER_OFF_LEVEL = 0x01, /**< Power Off Level */
+       TAPI_POWER_BATT_STAT_CRIT_LOW_LEVEL = 0x02, /**< Critical-Low Battery Level */
+       TAPI_POWER_BATT_STAT_LOW_LEVEL = 0x03, /**< Low Battery Level */
+       TAPI_POWER_BATT_STAT_NORMAL_LEVEL = 0x04 /**< Normal Level */
+} tapi_power_battery_status_level_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TEL_POWER_H_ */
+
+/**
+ * @}
+ */
diff --git a/include/TelSat.h b/include/TelSat.h
new file mode 100644 (file)
index 0000000..e88dcb5
--- /dev/null
@@ -0,0 +1,793 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file TelSat.h
+ */
+
+/**
+ * @internal
+ * @addtogroup CAPI_TELEPHONY_SERVICE_SAT
+ * @{
+ */
+
+#ifndef _TEL_SAT_H_
+#define _TEL_SAT_H_
+
+#include <TelCall.h>
+#include <TelSs.h>
+#include <TelSatObj.h>
+#include <TelSatProactvCmd.h>
+#include <TelSatEnvelope.h>
+#include <TelSim.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @brief Definition for the maximum length of a menu title.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_DEF_TITLE_LEN_MAX                     255
+
+/**
+ * @brief Definition for the maximum length of a menu item.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_DEF_ITEM_STR_LEN_MAX          50
+
+/**
+ * @brief Definition for the maximum length of a text string.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_DEF_TEXT_STRING_LEN_MAX       500
+
+/**
+ * @brief Definition for the bit mask of a contact.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_DEF_BIT_MASK_CONTACT          0x01
+
+/**
+ * @brief Definition for the bit mask of a message.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_DEF_BIT_MASK_MSG                      0x02
+
+/**
+ * @brief Definition for the bit mask of others.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_DEF_BIT_MASK_OTHER                    0x04
+
+/**
+ * @brief Definition for the refresh file list.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_REFRESH_FILE_LIST                     20
+#define TAPI_SAT_DEF_SS_LEN_MAX             250
+#define TAPI_SAT_DEF_USSD_LEN_MAX           250
+
+//     Telephony UI USER CONFIRM TYPE
+/**
+ * @brief Enumeration for the UI user confirm type.
+ * @since_tizen 2.3
+ */
+typedef enum
+{
+       TAPI_SAT_USER_CONFIRM_YES,                      /**< Informs that the user confirms yes */
+       TAPI_SAT_USER_CONFIRM_NO_OR_CANCEL,     /**< Informs that the user confirms no/cancel */
+       TAPI_SAT_USER_CONFIRM_HELP_INFO,        /**< Informs that the user wants help information */
+       TAPI_SAT_USER_CONFIRM_END,                      /**< Informs that the user confirms end */
+       TAPI_SAT_USER_CONFIRM_TIMEOUT,          /**< Informs that the user did not respond */
+}TelSatUiUserConfirmType_t;
+
+//     Telephony UI INKEY TYPE
+/**
+ * @brief Enumeration for the UI inkey type.
+ * @since_tizen 2.3
+ */
+typedef enum
+{
+       TAPI_SAT_INKEY_CONFIRM_NO                               = 0x00,         /**< No */
+       TAPI_SAT_INKEY_CONFIRM_YES                              = 0x01,         /**< Yes */
+}TelSatUiInkeyYesNoCaseType_t;
+
+//     Telephony UI DISPLAY STATUS
+/**
+ * @brief Enumeration for the UI display status.
+ * @since_tizen 2.3
+ */
+typedef enum
+{
+       TAPI_SAT_DISPLAY_SUCCESS                                = 0x00,         /**< Informs about UI display success */
+       TAPI_SAT_DISPLAY_FAIL                                   = 0x01,         /**< Informs about UI display failure */
+}TelSatUiDisplayStatusType_t;
+
+//     TELEPHONY REFRESH APPLICATION TYPE
+/**
+ * @brief Enumeration for the refresh application type.
+ * @since_tizen 2.3
+ */
+ typedef enum
+{
+       TAPI_SAT_REFRESH_CONTACT = 0x00,                                /**< Refresh application type - Phonebook */
+       TAPI_SAT_REFRESH_MSG,                                                   /**< Refresh application type - SMS */
+       TAPI_SAT_REFRESH_OTHER,                                                 /**< Refresh application type - Other */
+       TAPI_SAT_REFRESH_MAX,                                                   /**< Maximum Enumeration Value */
+}TelSatRefreshAppType_t;
+
+//     Telephony COMMAND PERFORMED RESULT
+/**
+ * @brief Enumeration for the result of proactive command execution.
+ * @since_tizen 2.3
+ */
+typedef enum
+{
+       TAPI_SAT_CMD_PERFORM_SUCCESS = 0x00,            /**< Command performed successfully */
+       TAPI_SAT_CMD_PERFORM_FAIL,                                      /**< Command execution failed */
+       TAPI_SAT_CMD_PERFORM_MAX,                                       /**< Maximum Enumeration Value */
+}TelSatCommandPerformResultType_t;
+
+//     Telephony CALL CONTROL TYPE
+/**
+ * @brief Enumeration for the call control type.
+ * @since_tizen 2.3
+ */
+typedef enum
+{
+       TAPI_SAT_CALL_CNF_NONE  = 0x00,         /**< Call control confirm type - None */
+       TAPI_SAT_CALL_CNF_CALL,                     /**< Call control confirm type - Call */
+       TAPI_SAT_CALL_CNF_SS,                           /**< Call control confirm type - SS */
+       TAPI_SAT_CALL_CNF_USSD,                         /**< Call control confirm type - USSD */
+       TAPI_SAT_CALL_CNF_MAX,                          /**< Maximum Enumeration Value */
+}TelSatCallCtrlType_t;
+
+//     SAT UI USER CONFIRMATION INFO
+/**
+ * @brief The structure type defining user confirmation data.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       int                                             commandId;                              /**< Proactive Command Number sent by USIM */
+       TelSatCommandType_t             commandType;                    /**< Proactive Command Type */
+       TelSatUiUserConfirmType_t       keyType;                        /**< User Response Type */
+       unsigned char*                          pAdditionalData;        /**< Additional Data */
+       int                                                     dataLen;                        /**< Additional Data Length */
+}TelSatUiUserConfirmInfo_t;
+
+//     Telephony TEXT INFO
+/**
+ * @brief The structure type defining character data for the SAT engine data structure.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       unsigned short  stringLen;                                                                              /**< Character data length */
+       unsigned char           string[TAPI_SAT_DEF_TEXT_STRING_LEN_MAX+1];     /**< Character data */
+}TelSatTextInfo_t;
+
+//     Telephony MAIN MENU TITLE INFO
+/**
+ * @brief The structure type defining the main menu title to check the SAT menu.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       int                             bIsMainMenuPresent;             /**< Flag to check SAT main menu existence */
+       TelSatTextInfo_t        mainMenuTitle;          /**< Main menu title data */
+}TelSatMainMenuTitleInfo_t;
+
+//     Telephony DISPLAY TEXT DATA
+/**
+ * @brief The structure type defining the display text proactive command for SAT UI.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       int                                                     commandId;                                      /**< Proactive Command Number sent by USIM */
+       TelSatTextInfo_t                                text;                                   /**< Character data to display on screen */
+       unsigned int                                    duration;                               /**< The duration of the display */
+       int                                                     bIsPriorityHigh;                        /**< Flag that indicates whether text is to be displayed if some other app is using the screen */
+       int                                                     bIsUserRespRequired;            /**< Flag that indicates whether user response is required */
+       int                                                     b_immediately_resp;                 /**< TBD */
+       TelSatIconIdentifierInfo_t      iconId;                                         /**< Icon Identifier */
+}TelSatDisplayTextInd_t;
+
+//     Telephony INKEY DATA
+/**
+ * @brief The structure type defining get inkey proactive command data for SAT UI.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       int                                                     commandId;                              /**< Proactive Command Number sent by USIM */
+       TelSatInkeyType_t                               keyType;                        /**< Input Type: Character Set or Yes/No */
+       TelSatUseInputAlphabetType_t    inputCharMode;          /**< Input character mode(SMS default, UCS2) */
+       int                                                     bIsNumeric;                             /**< Is input character numeric(0-9, *, # and +) */
+       int                                                     bIsHelpInfoAvailable;   /**< Help info request flag */
+       TelSatTextInfo_t                                text;                           /**< Character data to display on the screen */
+       unsigned int                                    duration;                       /**< Duration of the display */
+       TelSatIconIdentifierInfo_t              iconId;                         /**< Icon Identifier */
+}TelSatGetInkeyInd_t;
+
+//     Telephony GET INPUT DATA
+/**
+ * @brief The structure type defining get input proactive command data for SAT UI.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       int                                                     commandId;                              /**< Proactive Command Number sent by USIM */
+       TelSatUseInputAlphabetType_t    inputCharMode;          /**< Input character mode(SMS default, UCS2) */
+       int                                                     bIsNumeric;                             /**< Is input character numeric(0-9, *, # and +) */
+       int                                                     bIsHelpInfoAvailable;   /**< Help info request flag */
+       int                                                     bIsEchoInput;                   /**< Flag that indicates whether to show input data on the screen */
+       TelSatTextInfo_t                                text;                           /**< Character data to display on the screen*/
+       TelSatRespLenInfo_t                             respLen;                        /**< Input data min, max length */
+       TelSatTextInfo_t                                defaultText;            /**< Default input character data */
+       TelSatIconIdentifierInfo_t              iconId;                         /**< Icon Identifier */
+}TelSatGetInputInd_t;
+
+//     Telephony PLAY TONE DATA
+/**
+ * @brief The structure type defining play tone proactive command data for an application.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       int                                             commandId;          /**< Proactive Command Number sent by USIM */
+       TelSatTextInfo_t                        text;           /**< Character data to display on the screen */
+       TelSatToneInfo_t                        tone;           /**< Tone info */
+       unsigned int                            duration;       /**< Duration for playing the tone */
+       TelSatIconIdentifierInfo_t      iconId;         /**< Icon Identifier */
+}TelSatPlayToneInd_t;
+
+//     Telephony UI info
+/**
+ * @brief The structure type defining data for SAT UI.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       int                                             commandId;              /**< Proactive Command Number sent by USIM */
+       int                                             user_confirm;   /**< TBD */
+       TelSatTextInfo_t                        text;           /**< Character data to display on the screen */
+       TelSatIconIdentifierInfo_t      iconId;         /**< Icon Identifier */
+}TelSatSendUiInfo_t;
+
+//     Telephony MENU ITEM DATA FOR SETUP MENU
+/**
+ * @brief The structure type defining menu item info for the setup menu.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       char itemString[TAPI_SAT_DEF_ITEM_STR_LEN_MAX + 6];     /**< Menu item character data */
+       char itemId;                                                                            /**< Identifies the item on the menu that the user selected */
+}TelSatMenuInfo_t;
+
+//     Telephony SETUP MENU INFO
+/**
+ * @brief The structure type defining SAT main menu info.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       int commandId;  /**< Proactive Command Number sent by USIM */
+       int     bIsMainMenuPresent;             /**< TBD */
+       char satMainTitle[TAPI_SAT_DEF_TITLE_LEN_MAX + 1];      /**< Menu title text */
+       TelSatMenuInfo_t satMainMenuItem[TAPI_SAT_MENU_ITEM_COUNT_MAX]; /**< Menu items */
+       unsigned short satMainMenuNum;  /**< Number of menu items */
+       int     bIsSatMainMenuHelpInfo; /**< Flag for a help information request */
+       int     bIsUpdatedSatMainMenu;          /**< TBD */
+       TelSatIconIdentifierInfo_t iconId;      /**< Icon Identifier */
+       TelSatIconIdentifierListInfo_t iconIdList;      /**< List of Icon Identifiers */
+}TelSatSetupMenuInfo_t;
+
+//     Telephony SELECT ITEM DATA
+/**
+ * @brief The structure type defining select item proactive command data for SAT UI.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       int                                                     commandId;                                                                          /**< Proactive Command Number sent by USIM */
+       int                                                     bIsHelpInfoAvailable;                                               /**< Flag for a help information request */
+       TelSatTextInfo_t                                text;                                                                       /**< Menu title text */
+       char                                                    defaultItemIndex;                                                       /**< Selected default item - default value is @c 0 */
+       char                                                    menuItemCount;                                                          /**< Number of menu items */
+       TelSatMenuItemInfo_t                    menuItem[TAPI_SAT_MENU_ITEM_COUNT_MAX];         /**< Menu items */
+       TelSatIconIdentifierInfo_t              iconId;                                                                         /**< Icon Identifier */
+       TelSatIconIdentifierListInfo_t  iconIdList;                                                                     /**< List of Icon Identifiers */
+
+}TelSatSelectItemInd_t;
+
+//     Telephony IDLE MODE TEXT DATA
+/**
+ * @brief The structure type defining the setup idle mode text proactive command for the idle application.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       int                                             commandId;                      /**< Proactive Command Number sent by USIM */
+       TelSatTextInfo_t                        text;                   /**< Character data to display on the screen */
+       TelSatIconIdentifierInfo_t      iconId;             /**< TBD */
+} TelSatSetupIdleModeTextInd_t;
+
+//     Telephony REFRESH DATA
+/**
+ * @brief The structure type defining refresh proactive command data for SAT UI.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       int                                                     commandId;                      /**< Proactive Command Number sent by USIM */
+       unsigned int                            duration;                       /**< Duration of the display */
+       TelSatCmdQualiRefresh_t         refreshType;            /**< Refresh mode */
+}TelSatRefreshIndUiInfo_t;
+
+//     Telephony REFRESH DATA
+/**
+ * @brief The structure type defining refresh proactive command data for applications that are concerned with files residing on USIM.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       int                                             commandId;                                                                  /**< Proactive Command Number sent by USIM */
+       TelSatRefreshAppType_t          appType;                                                                /**< Concerned application type */
+       TelSatCmdQualiRefresh_t         refreshMode;                                                    /**< Refresh mode */
+       unsigned char                                   fileCount;                                                      /**< Refresh file count */
+       TelSimFileID_t                          fileId[TAPI_SAT_REFRESH_FILE_LIST];             /**< Refresh file identifier */
+}TelSatRefreshInd_t;
+
+//     Telephony END PROACTIVE COMMAND INFO
+/**
+ * @brief The structure type defining data objects to indicate to SAT UI, the end of execution of a specific proactive command by another application.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       int                                                                     commandId;                      /**< Proactive Command Number sent by USIM */
+       char                                                                    commandType;    /**< Command Type */
+       TelSatCommandPerformResultType_t                result;                 /**< Result of command execution by the application */
+}TelSatProactiveCmdEndIndInfo_t;
+
+//     Telephony SEND SMS DATA
+/**
+ * @brief The structure type defining send SMS proactive command data for the SMS application.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       int                                     commandId;                              /**< Proactive Command Number sent by USIM */
+       int                                     bIsPackingRequired;             /**< Flag to check if packing is required for SMS TPDU */
+       TelSatAddressInfo_t     address;                                /**< Destination address */
+       TelSatSmsTpduInfo_t     smsTpdu;                                /**< SMS TPDU data */
+} TelSatSendSmsIndSmsData_t;
+
+//     Telephony SEND SS DATA
+/**
+ * @brief The structure type defining send SS proactive command data for the SS application.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       int                                     commandId;              /**< Proactive Command Number sent by USIM */
+       TelSimTypeOfNum_t ton;              /**< Type of number */
+       TelSimNumberingPlanIdentity_t npi;  /**< Number plan identity */
+       unsigned short          ssStringLen;    /**< TBD */
+       unsigned char           ssString[TAPI_SAT_DEF_SS_LEN_MAX+1]; /**< TBD */
+}TelSatSendSsIndSsData_t;
+
+//     Telephony USSD DATA
+/**
+ * @brief The structure type defining send USSD proactive command data for the USSD application.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       int                     commandId;                          /**< Proactive Command Number sent by USIM */
+       unsigned char           rawDcs;                     /**< Data coding scheme */
+       unsigned short          ussdStringLen;          /**< TBD */
+       unsigned char           ussdString[TAPI_SAT_DEF_USSD_LEN_MAX+1];                /**< TBD */
+}TelSatSendUssdIndUssdData_t;
+
+//     Telephony SEND DTMF DATA
+/**
+ * @brief The structure type defining send DTMF proactive command data for the DTMF application.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       int                                     commandId;                      /**< Proactive Command Number sent by USIM */
+       int                                     bIsHiddenMode;          /**< Hidden mode flag */
+       TelSatTextInfo_t                dtmfString;             /**< DTMF string data */
+}TelSatSendDtmfIndDtmfData_t;
+
+//     Telephony SETUP CALL  DATA
+/**
+ * @brief The structure type defining setup call proactive command data for the call application.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       int                                                     commandId;                  /**< Proactive Command Number sent by USIM */
+       TelSatCmdQualiSetupCall_t               calltype;               /**< Call type */
+       TelSatTextInfo_t                                dispText;               /**< Display data for calling */
+       TelSatTextInfo_t                                callNumber;             /**< Call number */
+       unsigned int                                    duration;               /**< Maximum repeat duration */
+       TelSatIconIdentifierInfo_t              iconId;                 /**< Icon identifier for the call application */
+}TelSatSetupCallIndCallData_t;
+
+//     Telephony LAUNCH BROWSER DATA
+/**
+ * @brief The structure type defining launch browser proactive command data for the browser application.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       int                                                     commandId;              /**< Proactive Command Number sent by USIM */
+       TelSatUrlInfo_t                                 url;            /**< URL to connect */
+       TelSatCmdQualiLaunchBrowser_t   launchType;     /**< Launch type */
+       TelSatBrowserIdentityType_t     IdentityType;   /**< Browser Identity - default, HTML, and so on */
+}TelSatLaunchBrowserIndBrowserData_t;
+
+//     Telephony PROVIDE LOCAL INFO DATA
+/**
+ * @brief The structure type defining provide local info proactive command data for the application.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       int commandId;                                                                          /**< Proactive Command Number sent by USIM */
+       TelSatCmdQualiProvideLocalInfo_t localInfoType;         /**< Provide Local Information Type */
+}TelSatProvideLocalInfoInd_t;
+
+//     Telephony LANGUAGE NOTIFICATION DATA
+/**
+ * @brief The structure type defining language notification proactive command data for the application.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       int                                                     commandId;                                              /**< Proactive Command Number sent by USIM */
+       int                                                     bSpecificLanguageNotification;  /**< Flag for checking a specific language notification. If FALSE, non-specific language notification */
+       TelSatLanguageInfo_t                    language;                                       /**< Language info from the USIM application */
+}TelSatLanguageNotiInfoInd_t;
+
+//     Telephony PLAY TONE RETURN INFO
+/**
+ * @brief The structure type defining result data for the Play Tone proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatResultType_t      resp;                   /**< Result response value */
+}TelSatSetupMenuRetInfo_t;
+
+//     Telephony REFRESH RETURN INFO
+/**
+ * @brief The structure type defining result data for the refresh proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatRefreshAppType_t  appType;                        /**< Application type */
+       TelSatResultType_t              resp;                           /**< Result response value */
+}TelSatRefreshRetInfo_t;
+
+//     Telephony CALL RETURN INFO
+/**
+ * @brief The structure type defining result data for the setup call proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatResultType_t                              resp;                                               /**< Result response value */
+       int                                                     bIsTapiCauseExist;                                  /**< Flag for checking tapi error cause */
+       TelCallCause_t                                  tapiCause;                                              /**< Tapi call error cause */
+       TelSsCause_t                                            ssCause;                                        /**< Tapi SS error cause */
+       TelSatMeProblemType_t                           meProblem;                                      /**< ME problem error cause */
+       int                                                             bIsOtherInfoExist;                              /**< Call control result existence flag */
+       TelSatCallCtrlProblemType_t             permanentCallCtrlProblem;               /**< Call control problem type */
+       TelSatCallCtrlRequestedActionInfo_t     callCtrlRequestedAction;        /**< Call control request data */
+       TelSatResultInfo_t                      result2;                                                    /**< Call control envelope result value */
+       TelSatTextTypeInfo_t                    text;                                                   /**< Call control envelope display data */
+}TelSatCallRetInfo_t;
+
+//     Telephony SS RETURN INFO
+/**
+ * @brief The structure type defining result data for the send SS proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatResultType_t                              resp;                                                       /**< Result response value */
+       TelSsCause_t                                            ssCause;                                                /**< Error - SS cause */
+       TelSatTextInfo_t                                        ssString;                                               /**< SS result string */
+       TelSatMeProblemType_t                   meProblem;                                                  /**< Error - ME problem */
+       int                                                             bIsOtherInfoExist;                                  /**< Call control result exist flag */
+       TelSatCallCtrlProblemType_t                     additionalCallCtrlProblemInfo;  /**< Call control problem */
+       TelSatCallCtrlRequestedActionInfo_t     callCtrlRequestedAction;                /**< Call control request data */
+       TelSatResultInfo_t                                      result2;                                                /**< Call control envelope result value */
+}TelSatSsRetInfo_t;
+
+//     Telephony USSD RETURN INFO
+/**
+ * @brief The structure type defining result data for the send USSD proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatResultType_t                                      resp;                                                   /**< Result response value */
+       TelSsCause_t                                            ssCause;                                                /**< Error - SS cause */
+       TelSatTextInfo_t                                        ussdString;                                             /**< USSD result string */
+       TelSatDataCodingSchemeInfo_t            dcsUssdString;                                  /**< DCS of USSD result string */
+       TelSatMeProblemType_t                           meProblem;                                              /**< Error - ME problem */
+       int                                                             bIsOtherInfoExist;                                  /**< Call control result exist flag */
+       TelSatCallCtrlProblemType_t                     additionalCallCtrlProblemInfo;  /**< Call control problem */
+       int                                                             bCallCtrlHasModification;                   /**< Call control request modification flag */
+       TelSatCallCtrlRequestedActionInfo_t     callCtrlRequestedAction;                /**< Call control request data */
+       TelSatResultInfo_t                                      result2;                                                /**< Call control envelope result value */
+       TelSatTextTypeInfo_t                            text2;                                                  /**< CC envelope display data */
+}TelSatUssdRetInfo_t;
+
+//     Telephony SMS RETURN INFO
+/**
+ * @brief The structure type defining result data for the send SMS proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatResultType_t      resp;                   /**< Result response value */
+}TelSatSmsRetInfo_t;
+
+//     Telephony DTMF RETUEN INFO
+/**
+ * @brief The structure type defining result data for the send DTMF proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatResultType_t      resp;                   /**< Result response value */
+}TelSatDtmfRetInfo_t;
+
+//     Telephony BROWSER RETURN INFO
+/**
+ * @brief The structure type defining result data for the launch browser proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatResultType_t                                      resp;                   /**< Result response value */
+       TelSatLaunchBrowserProblemType_t    browserProblem;     /**< Specific browser problem */
+}TelSatBrowserRetInfo_t;
+
+//     Telephony SETUP IDLE MODE TEXT RETURN INFO
+/**
+ * @brief The structure type defining result data for the setup idle mode text proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatResultType_t      resp;                   /**< Result response value */
+}TelSatIdleTextRetInfo_t;
+
+//     Telephony PLAY TONE RETURN INFO
+/**
+ * @brief The structure type defining result data for the Play Tone proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatResultType_t      resp;                   /**< Result response value */
+}TelSatPlayToneRetInfo_t;
+
+//     Telephony  PROVIDE LOCAL INFO RETURN INFO
+/**
+ * @brief The structure type defining result data for the setup idle mode text proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatResultType_t                                      resp;                   /**< Result response value */
+       int                                                             bOtherInfo;                 /**< Flag to check whether other information is required */
+       TelSatCmdQualiProvideLocalInfo_t        infoType;               /**< Local info type - e.g. time zone, language info, and so on */
+       union
+       {
+               TelSatDataTimeZoneInfo_t                timeZoneInfo;   /**< Current time zone info     */
+               TelSatLanguageInfo_t                    languageInfo;   /**< Current ME language setting info */
+       }u;                                                                                                     /**< Union */
+}TelSatProvideLocalRetInfo_t;
+
+//     Telephony LANGUAGE NOTI RETURN INFO
+/**
+ * @brief The structure type defining result data for the setup idle mode text proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct
+       {
+               TelSatResultType_t               resp;                          /**< Result response value */
+       }TelSatLanguageNotiRetInfo_t;
+
+//     Telephony DISPLAY TEXT RETURN INFO
+/**
+ * @brief The structure type defining result data for the setup idle mode text proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct
+       {
+               TelSatResultType_t               resp;                          /**< Result response value */
+               TelSatMeProblemType_t    meProblem;                     /**< ME Problem Type */
+       }TelSatDiplayTextRetInfo_t;
+
+//     Telephony APPLICATIONS RETURN DATA
+/**
+ * @brief The structure type defining common result data for the applications proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatCommandType_t     commandType;                                            /**< Proactive Command type */
+       int commandId;                                                                                  /**< Proactive Command Number sent by USIM */
+       union
+               {
+                       TelSatSetupMenuRetInfo_t        setupMenu;                          /**< Result response value to setup menu */
+                       TelSatRefreshRetInfo_t          refresh;                                /**< Result response value to refresh */
+                       TelSatCallRetInfo_t                     setupCall;                              /**< Result response value to setup call */
+                       TelSatSsRetInfo_t                       sendSs;                                 /**< Result response value to send SS */
+                       TelSatUssdRetInfo_t                     sendUssd;                               /**< Result response value to send USSD */
+                       TelSatSmsRetInfo_t                      sendSms;                                /**< Result response value to send SMS */
+                       TelSatDtmfRetInfo_t                     sendDtmf;                               /**< Result response value to send DTMF */
+                       TelSatBrowserRetInfo_t          launchBrowser;                  /**< Result response value to launch the browser */
+                       TelSatIdleTextRetInfo_t         setupIdleModeText;              /**< Result response value to setup idle mode text */
+                       TelSatLanguageNotiRetInfo_t     languageNoti;                   /**< Result response value for language notification */
+                       TelSatProvideLocalRetInfo_t provideLocalInfo;           /**< Result response value to provide local info */
+                       TelSatDiplayTextRetInfo_t   displayText;                        /**< Result response value to display text */
+                       TelSatPlayToneRetInfo_t     playTone;                           /**< Result response value to play a tone */
+               }appsRet;                                                                                               /**< Common union result value */
+}TelSatAppsRetInfo_t;
+
+//     Telephony CALL CONTROL CONFIRM  DATA FOR CALL
+/**
+ * @brief The structure type defining call control confirm data for the call.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatTextInfo_t                                address;                                        /**< Call destination address */
+       TelSatTextInfo_t                                subAddress;                                     /**< Call SUB address */
+       TelSatBcRepeatIndicatorType_t   bcRepeatIndicator;                      /**< BC repeat indicator */
+       TelSatTextInfo_t                                ccp1;                                           /**< Configuration Capability Parameter 1 */
+       TelSatTextInfo_t                                ccp2;                                           /**< Configuration Capability Parameter 2 */
+} TelSatCallCtrlIndCallData_t;
+
+//     Telephony CALL CONTROL CONFIRM  DATA FOR SS
+/**
+ * @brief The structure type defining call control confirm data for SS.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatTextInfo_t                                ssString;                                       /**< SS destination address */
+       TelSatTextInfo_t                                subAddress;                                     /**< Call SUB address */
+       TelSatBcRepeatIndicatorType_t   bcRepeatIndicator;                      /**< BC repeat indicator */
+       TelSatTextInfo_t                                ccp1;                                           /**< Configuration Capability Parameter 1 */
+       TelSatTextInfo_t                                ccp2;                                           /**< Configuration Capability Parameter 2 */
+} TelSatCallCtrlIndSsData_t;
+
+//     Telephony CALL CONTROL CONFIRM  DATA FOR USSD
+/**
+ * @brief The structure type defining call control confirm data for USSD.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatTextInfo_t                ussdString;                     /**< USSD destination address */
+} TelSatCallCtrlIndUssdData_t;
+
+//     Telephony READ FILE REQUEST DATA
+/**
+ * @brief The structure type defining common call control confirm data.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatCallType_t                        callCtrlCnfType;                                /**< Call control confirm type - call, SS, or USSD */
+       TelSatCallCtrlResultType_t      callCtrlResult;                                 /**< Call control result */
+       TelSatTextInfo_t                        dispData;                                               /**< Call control display data */
+       int                                             bIsUserInfoDisplayEnabled;                  /**< Flag for checking existence of call control display */
+
+       union
+               {
+                       TelSatCallCtrlIndCallData_t             callCtrlCnfCallData;    /**< Call control call address */
+                       TelSatCallCtrlIndSsData_t               callCtrlCnfSsData;              /**< Call control SS string */
+                       TelSatCallCtrlIndUssdData_t             callCtrlCnfUssdData;    /**< Call control USSD string */
+               }u;                                                                                                                     /**< Union */
+} TelSatCallCtrlIndData_t;
+
+//     Telephony MO SMS CONTROL CONFIRMATION DATA
+/**
+ * @brief The structure type defining MO SMS control confirm data.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatCallCtrlResultType_t              moSmsCtrlResult;                        /**< Envelope result */
+       int                                                             bIsUserInfoDisplayEnabled;      /**< Display present flag */
+       TelSatTextTypeInfo_t                    dispData;                                       /**< Display data for sending SMS */
+       TelSatTextTypeInfo_t                    rpDestAddr;                                 /**< The RP_Destination_Address of the Service Center */
+       TelSatTextTypeInfo_t                    tpDestAddr;                                     /**< The TP_Destination_Address */
+} TelSatMoSmCtrlIndData_t;
+
+//     Telephony EVENT LIST INFO
+/**
+ * @brief The structure type defining Event List Info.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       int bIsEventDownloadActive;                     /**< Is Event Download Active */
+       int bIsMtCallEvent;                                     /**< Is Mt Call Event */
+       int bIsCallConnected;                           /**< Is Call Connected */
+       int bIsCallDisconnected;                        /**< Is Call Disconnected */
+       int bIsLocationStatus;                          /**< Is Location Status */
+       int bIsUserActivity;                            /**< Is User Activity */
+       int bIsIdleScreenAvailable;                     /**< Is Idle Screen Available */
+       int bIsCardReaderStatus;                        /**< Is Card Reader Status */
+       int bIsLanguageSelection;                       /**< Is Language Selection */
+       int bIsBrowserTermination;                      /**< Is Browser Termination */
+       int bIsDataAvailable;                           /**< Is Data Available */
+       int bIsChannelStatus;                           /**< Is Channel Status */
+}      TelSatEventListData_t;
+
+/**
+ * @brief The structure type containing the data structures to be used to send any envelope/event download data.
+ *
+ * @details This structure type is used by the Application to send envelope/event download data.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatEventDownloadType_t                                       eventDownloadType;                              /**< Event Download Type        */
+
+       union
+       {
+               int                                                                     bIdleScreenAvailable;                       /**< Flag to specify whether Idle Screen is Available */
+               TelSatLanguageSelectionEventReqInfo_t   languageSelectionEventReqInfo;  /**< Selected Language Information */
+               TelSatBrowserTerminationEventReqInfo_t  browserTerminationEventReqInfo; /**< Browser Termination Event Information */
+               TelSatDataAvailableEventReqInfo_t               dataAvailableEventReqInfo;              /**< dataAvailableEventReqInfo */
+               TelSatChannelStatusEventReqInfo_t               channelStatusEventReqInfo;              /**< channelStatusEventReqInfo */
+       } u;                                                                                                                                            /**< Union */
+} TelSatEventDownloadReqInfo_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TEL_SAT_H_ */
+
+/**
+* @}
+*/
diff --git a/include/TelSatEnvelope.h b/include/TelSatEnvelope.h
new file mode 100644 (file)
index 0000000..24dc535
--- /dev/null
@@ -0,0 +1,235 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file TelSatEnvelope.h
+ */
+
+/**
+ * @internal
+ * @addtogroup CAPI_TELEPHONY_SERVICE_SAT
+ * @{
+ */
+
+#ifndef _TEL_SAT_ENVELOPE_H_
+#define _TEL_SAT_ENVELOPE_H_
+
+#include <TelSatObj.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @brief Enumeration for the SAT call type.
+ * @since_tizen 2.3
+ */
+typedef enum
+{
+       TAPI_SAT_CALL_TYPE_MO_VOICE = 0X00,     /**< Call type - MO voice */
+       TAPI_SAT_CALL_TYPE_MO_SMS,                      /**< Call type - MO SMS */
+       TAPI_SAT_CALL_TYPE_SS,                          /**< Call type - SS */
+       TAPI_SAT_CALL_TYPE_USSD,                        /**< Call type - USSD */
+       TAPI_SAT_PDP_CNTXT_ACT,                         /**< Call type - PDP context action */
+       TAPI_SAT_CALL_TYPE_MAX                          /**< Call type - max */
+}TelSatCallType_t;
+
+/**
+ * @brief Enumeration for the result of call control by SIM.
+ * @since_tizen 2.3
+ */
+typedef enum
+{
+       TAPI_SAT_CALL_CTRL_R_ALLOWED_NO_MOD                     = 0,            /**< Call control result type -  ALLOWED WITH NO MOD */
+       TAPI_SAT_CALL_CTRL_R_NOT_ALLOWED                        = 1,            /**< Call control result type -  NOT ALLOWED */
+       TAPI_SAT_CALL_CTRL_R_ALLOWED_WITH_MOD           = 2,            /**< Call control result type -  ALLOWED WITH MOD */
+       TAPI_SAT_CALL_CTRL_R_RESERVED                           = 0xFF          /**< Call control result type -  RESERVED */
+
+} TelSatCallCtrlResultType_t;
+
+/**
+ * @brief Enumeration for the general result of sending an envelope command to the USIM.
+ * @since_tizen 2.3
+ */
+typedef enum
+{
+       TAPI_SAT_ENVELOPE_SUCCESS,      /**< Envelope result - success */
+       TAPI_SAT_ENVELOPE_SIM_BUSY,     /**< Envelope result - USIM busy */
+       TAPI_SAT_ENVELOPE_FAILED        /**< Envelope result - failed */
+
+}TelSatEnvelopeResp_t;
+
+//     8.      MENU SELECTION
+/**
+ * @brief The structure type containing data objects for the MENU SELECTION envelope.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       unsigned char           itemIdentifier;         /**< Menu selection item identifier     */
+       int                             bIsHelpRequested;       /**< Flag to check whether help information is required */
+} TelSatMenuSelectionReqInfo_t;
+
+//     9.1 CALL CONTROL BY SIM
+/**
+ * @brief Structure type containing data objects for Call Control result data sent by the USIM.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatAddressInfo_t                             address;                        /**< Call number */
+       TelSatSubAddressInfo_t                  subAddress;                     /**< Call number sub address */
+       TelSatBcRepeatIndicatorType_t   bcRepeatIndicator;      /**< BC repeat indicator */
+       TelSatCapaConfigParamInfo_t             ccp1;                           /**< Capability configuration parameter 1 */
+       TelSatCapaConfigParamInfo_t             ccp2;                           /**< Capability configuration parameter 2 */
+}TelSatVoiceCallCtrlIndInfo_t;
+
+/**
+ * @brief The structure type containing SAT SS control result data sent by the USIM.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatSsStringInfo_t                    ssString;                       /**< SS number */
+       TelSatSubAddressInfo_t                  subAddress;                     /**< SS sub address */
+       TelSatBcRepeatIndicatorType_t   bcRepeatIndicator;      /**< BC repeat indicator */
+       TelSatCapaConfigParamInfo_t             ccp1;                           /**< Capability configuration parameter 1 */
+       TelSatCapaConfigParamInfo_t             ccp2;                           /**< Capability configuration parameter 2 */
+}TelSatSsCtrlIndInfo_t;
+
+/**
+ * @brief The structure type containing SAT MO SMS control configuration data.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatAddressInfo_t             rpDestAddress;  /**< SMS control RP destination address */
+       TelSatAddressInfo_t             tpDestAddress;  /**< SMS control TP destination address */
+} TelSatMoSmsCtrlIndInfo_t;
+
+/**
+ * @brief The structure type containing SAT call control configuration data.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatCallType_t                                        callType;               /**< Call type */
+       TelSatCallCtrlResultType_t                      callCtrlResult; /**< Call control result */
+       TelSatAlphaIdentifierInfo_t                     alphaIdentifier;/**< Alpha identifier */
+       unsigned char                                           callId;                 /**< Call ID */
+       TelSatCallType_t                                        oldCallType;    /**< Old call type */
+       union
+       {
+               TelSatVoiceCallCtrlIndInfo_t    voiceCallData;  /**< Voice call control data */
+               TelSatSsCtrlIndInfo_t                   ssData;                 /**< SS control data */
+               TelSatMoSmsCtrlIndInfo_t                smsData;
+       }u;                                                                                                     /**< Union */
+} TelSatCallCtrlIndInfo_t;
+
+//     9.2 MO SHORT MESSAGE CONTROL BY SIM RESULT
+/**
+ * @brief The structure type containing SAT MO SS control request data.
+ * @since_tizen 2.3
+ */
+ typedef struct
+{
+       TelSatCallCtrlResultType_t              callCtrlResult;         /**< Call control result */
+       TelSatAlphaIdentifierInfo_t             alphaIdentifier;        /**< Alpha identifier */
+       TelSatMoSmsCtrlIndInfo_t                smsData;                        /**< SMS control data */
+}TelSatMoSMCtrlResult_t;
+
+//     11.5 EVENT DOWNLOAD - USER ACTIVITY EVENT
+/**
+ * @brief The structure type containing SAT user activity event request data.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatEventListInfo_t                           eventList;                      /**< Event List */
+       TelSatDeviceIdentitiesInfo_t            deviceIdentities;       /**< Device identities info     */
+
+} TelSatUserActivityEventReqInfo_t;
+
+//     11.6 EVENT DOWNLOAD - IDLE SCREEN AVAILABLE EVENT
+/**
+ * @brief The structure type containing the data objects for the IDLE SCREEN AVAILABLE event download.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatEventDownloadType_t       eventData;      /**< Event type */
+} TelSatIdleScreenAvailableEventReqInfo_t;
+
+//     11.8 EVENT DOWNLOAD - LANGUAGE SELECTION EVENT
+/**
+ * @brief The structure type containing the data objects for the LANGUAGE SELECTION event download.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatLanguageType_t     language;              /**< Selected language info     */
+} TelSatLanguageSelectionEventReqInfo_t;
+
+//     11.9 EVENT DOWNLOAD - BROWSER TERMINATION EVENT
+/**
+ * @brief The structure type containing the data objects for the BROWSER TERMINATION event download.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatBrowserTerminationCauseType_t             browserTerminationCause;        /**< Browser Termination Cause */
+} TelSatBrowserTerminationEventReqInfo_t;
+
+//     11.10 EVENT DOWNLOAD - DATA AVAILABLE EVENT
+/**
+ * @brief The structure type containing SAT data available event request data.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatEventListInfo_t                   eventList;                      /**< Event List */
+       TelSatDeviceIdentitiesInfo_t    deviceIdentities;       /**< Device identities info     */
+       TelSatChannelStatusInfo_t               channelStatus;          /**< Channel status     */
+       TelSatChannelDataLengthInfo_t   channelDataLen;         /**< Channel data length */
+
+} TelSatDataAvailableEventReqInfo_t;
+
+//     11.11 EVENT DOWNLOAD - CHANNEL STATUS EVENT
+/**
+ * @brief The structure type containing SAT channel status even request data.
+ * @since_tizen 2.3
+ */
+typedef struct
+{
+       TelSatEventListInfo_t                   eventList;                      /**< Event list */
+       TelSatDeviceIdentitiesInfo_t    deviceIdentities;       /**< Device identities info     */
+       TelSatChannelStatusInfo_t               channelStatus;          /**< Channel Status     */
+} TelSatChannelStatusEventReqInfo_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TEL_SAT_ENVELOPE_H_ */
+
+/**
+ * @}
+ */
diff --git a/include/TelSatObj.h b/include/TelSatObj.h
new file mode 100644 (file)
index 0000000..9de199a
--- /dev/null
@@ -0,0 +1,1678 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file TelSatObj.h
+ */
+
+/**
+ * @internal
+ * @addtogroup CAPI_TELEPHONY_SERVICE_SAT
+ * @{
+ */
+
+#ifndef _TEL_SAT_OBJ_H_
+#define _TEL_SAT_OBJ_H_
+
+#include <TelSim.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#define EXTENDED_ASCII 1
+
+/**
+ * @brief Definition for the maximum length of the dialing number.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_DIALLING_NUMBER_LEN_MAX                               200
+
+/**
+ * @brief Definition for the maximum length of the alpha identifier.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_ALPHA_ID_LEN_MAX                                              255
+
+/**
+ * @brief Definition for the maximum length of the text string.
+ * @details When the string data is in the 7bit packed format, this length is not enough to support the maximum size so the value should be increased to a value > 275.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_TEXT_STRING_LEN_MAX                                   500
+
+/**
+ * @brief Definition for the maximum length of a sub address.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_SUB_ADDR_LEN_MAX                                              30
+
+/**
+ * @brief Definition for the maximum length of CCP data.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_CCP_DATA_LEN_MAX                                              30
+
+/**
+ * @brief Definition for the maximum length of the item text.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_ITEM_TEXT_LEN_MAX                                             255
+
+/**
+ * @brief Definition for the maximum length of SMS TPDU data.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_SMS_TPDU_SMS_DATA_LEN_MAX                             175
+
+/**
+ * @brief Definition for the maximum length of the SS string.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_SS_STRING_LEN_MAX                                             160
+
+/**
+ * @brief Definition for the maximum length of the USSD string.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_USSD_STRING_LEN_MAX                                   255
+
+/**
+ * @brief Definition for the maximum count of the file ID list.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_FILE_ID_LIST_MAX_COUNT                                        255
+
+/**
+ * @brief Definition for the maximum count of the items next action indication list.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_ITEMS_NEXT_ACTION_INDI_LIST_MAX_COUNT 50
+
+/**
+ * @brief Definition for the maximum count of the sat event list.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_EVENT_LIST_MAX_COUNT                                  17
+
+/**
+ * @brief Definition for the maximum length of image instant raw data.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_IMG_INSTANT_RAW_DATA_LEN_MAX                  256
+
+/**
+ * @brief Definition for the maximum length of clut data.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_CLUT_DATA_LEN_MAX                                             256
+
+/**
+ * @brief Definition for the maximum length of the image data file name (icon, clut).
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_IMG_DATA_FILE_PATH_LEN_MAX                            50
+
+/**
+ * @brief Definition for the maximum count of the icon list.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_ICON_LIST_MAX_COUNT                                   50
+
+/**
+ * @brief Definition for the maximum length of the DTMF string.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_DTMF_STRING_LEN_MAX                                   30
+
+/**
+ * @brief Definition for the maximum length of date time and time zone.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_DATE_TIME_AND_TIME_ZONE_LEN                   7
+
+/**
+ * @brief Definition for the maximum length of the URL.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_URL_LEN_MAX                                                   129
+
+/**
+ * @brief Definition for the maximum count of the bearer list.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_BEARER_LIST_MAX_COUNT                                 50
+
+/**
+ * @brief Definition for the maximum length of the provisioning file path.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_PROVISIONING_FILE_PATH_LEN_MAX                        50
+
+/**
+ * @brief Definition for the maximum length of the bearer parameters.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_BEARER_PARAMS_LEN_MAX                                 10
+
+/**
+ * @brief Definition for the maximum length of the channel data string.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_CHANNEL_DATA_STRING_LEN_MAX                   255
+
+/**
+ * @brief Definition for the maximum length of the channel status.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_CHANNEL_STATUS_LEN                                            2
+
+/**
+ * @brief Definition for the maximum length of the channel ID.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_CHANNEL_ID_LEN                                                        3
+
+/**
+ * @brief Definition for the maximum length of other addresses.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_OTHER_ADDR_LEN_MAX                                            30
+
+/**
+ * @brief Definition for the maximum length of the port number.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_PORT_NUMBER_LEN                                               2
+
+/**
+ * @brief Definition for the maximum length of the net account name.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_NET_ACC_NAM_LEN_MAX                                   30
+
+/**
+ * @brief Definition for the maximum length of the aid.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_AID_LEN_MAX                                                   128
+
+/**
+ * @brief Definition for the maximum length of the remote entity address.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_REMOTE_ENTITY_ADDR_LEN_MAX                            50
+
+/**
+ * @brief Definition for the maximum count of the item text attributes list.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_ITEM_TEXT_ATTRIBUTES_LIST_MAX_COUNT   50
+
+/**
+ * @brief Definition for the maximum length of MCC.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_MCC_CODE_LEN                                                  3
+
+/**
+ * @brief Definition for the maximum length of MNC.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_MNC_CODE_LEN                                                  3
+
+/**
+ * @brief Definition for the maximum length of LAC.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_LAC_CODE_LEN                                                  2
+
+/**
+ * @brief Definition for the maximum length of the cell ID.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_CELL_ID_LEN                                                   2
+
+/**
+ * @brief Enumeration for alphabet format.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_ALPHABET_FORMAT_SMS_DEFAULT = 0x00, /**< ALPHABET FORMAT SMS DEFAULT */
+       TAPI_SAT_ALPHABET_FORMAT_8BIT_DATA = 0x01, /**< ALPHABET FORMAT 8BIT DATA */
+       TAPI_SAT_ALPHABET_FORMAT_UCS2 = 0x02, /**< ALPHABET FORMAT UCS2 */
+       TAPI_SAT_ALPHABET_FORMAT_RESERVED = 0x03 /**< ALPHABET FORMAT RESERVED */
+} TelSatAlphabetFormatType_t;
+
+/**
+ * @brief Enumeration for the message class.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_MSG_CLASS_NONE = 0x00, /**< none */
+       TAPI_SAT_MSG_CLASS_0 = 0x01, /**< class 0 */
+       TAPI_SAT_MSG_CLASS_1, /**< class 1 Default meaning:ME-specific */
+       TAPI_SAT_MSG_CLASS_2, /**< class 2 SIM specific message */
+       TAPI_SAT_MSG_CLASS_3, /**< class 3 Default meaning: TE specific */
+       TAPI_SAT_MSG_CLASS_RESERVED = 0xFF /**< class reserved */
+} TelSatMsgClassType_t;
+
+/**
+ * @brief Enumeration for the type of command and the next action indicator.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_CMD_TYPE_NONE = 0x00, /**< command type - None */
+
+       TAPI_SAT_CMD_TYPE_REFRESH = 0x01, /**< command type - refresh */
+       TAPI_SAT_CMD_TYPE_MORE_TIME = 0x02, /**< command type - more time */
+       TAPI_SAT_CMD_TYPE_SETUP_EVENT_LIST = 0x05, /**< command type - setup event list */
+       TAPI_SAT_CMD_TYPE_SETUP_CALL = 0x10, /**< command type - setup call */
+       TAPI_SAT_CMD_TYPE_SEND_SS = 0x11, /**< command type - send SS */
+       TAPI_SAT_CMD_TYPE_SEND_USSD = 0x12, /**< command type - send USSD */
+       TAPI_SAT_CMD_TYPE_SEND_SMS = 0x13, /**< command type - send SMS */
+       TAPI_SAT_CMD_TYPE_SEND_DTMF = 0x14, /**< command type - send DTMF */
+       TAPI_SAT_CMD_TYPE_LAUNCH_BROWSER = 0x15, /**< command type - launch browser */
+       TAPI_SAT_CMD_TYPE_PLAY_TONE = 0x20, /**< command type - play tone */
+       TAPI_SAT_CMD_TYPE_DISPLAY_TEXT = 0x21, /**< command type - display text */
+       TAPI_SAT_CMD_TYPE_GET_INKEY = 0x22, /**< command type - get inkey */
+       TAPI_SAT_CMD_TYPE_GET_INPUT = 0x23, /**< command type - get input */
+       TAPI_SAT_CMD_TYPE_SELECT_ITEM = 0x24, /**< command type - select item */
+       TAPI_SAT_CMD_TYPE_SETUP_MENU = 0x25, /**< command type - setup menu */
+       TAPI_SAT_CMD_TYPE_PROVIDE_LOCAL_INFO = 0x26, /**< command type - provide local info */
+       TAPI_SAT_CMD_TYPE_SETUP_IDLE_MODE_TEXT = 0x28, /**<     command type - setup idle mode text */
+       TAPI_SAT_CMD_TYPE_LANGUAGE_NOTIFICATION = 0x35, /**< command type - language notification */
+       TAPI_SAT_CMD_TYPE_OPEN_CHANNEL = 0x40, /**< command type - open channel - class e */
+       TAPI_SAT_CMD_TYPE_CLOSE_CHANNEL = 0x41, /**< command type - close channel - class e */
+       TAPI_SAT_CMD_TYPE_RECEIVE_DATA = 0x42, /**< command type - receive data -class e */
+       TAPI_SAT_CMD_TYPE_SEND_DATA = 0x43, /**< command type - send data */
+       TAPI_SAT_CMD_TYPE_GET_CHANNEL_STATUS = 0x44, /**< command type - get channel status - class e */
+       TAPI_SAT_CMD_TYPE_END_OF_APP_EXEC = 0xFD, /**< inform to End the execution of a Proactive Command */
+       TAPI_SAT_CMD_TYPE_END_PROACTIVE_SESSION = 0xFE, /**< inform end proactive session */
+       TAPI_SAT_CMD_TYPE_RESERVED = 0xFF /**< command type - reserved */
+} TelSatCommandType_t;
+
+/**
+ * @brief Enumeration for the command qualifier values of the refresh command.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_REFRESH_SIM_INIT_AND_FULL_FCN = 0x00, /**< command qualifier for REFRESH SIM INIT AND FULL FILE CHANGE_NOTIFICATION */
+       TAPI_SAT_REFRESH_FCN = 0x01, /**< command qualifier for REFRESH FILE CHANGE NOTIFICATION */
+       TAPI_SAT_REFRESH_SIM_INIT_AND_FCN = 0x02, /**< command qualifier for REFRESH SIM INIT AND FILE CHANGE NOTIFICATION */
+       TAPI_SAT_REFRESH_SIM_INIT = 0x03, /**< command qualifier for REFRESH SIM INIT */
+       TAPI_SAT_REFRESH_SIM_RESET = 0x04, /**< command qualifier for REFRESH SIM RESET */
+       TAPI_SAT_REFRESH_3G_APPLICATION_RESET = 0x05, /**< command qualifier for REFRESH 3G APPLICATION RESET */
+       TAPI_SAT_REFRESH_3G_SESSION_RESET = 0x06, /**< command qualifier for REFRESH 3G SESSION RESET */
+       TAPI_SAT_REFRESH_RESERVED = 0xFF /**< command qualifier for REFRESH RESERVED */
+} TelSatCmdQualiRefresh_t;
+
+/**
+ * @brief Enumeration for the command qualifier values of the setup call command.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_SETUP_CALL_IF_ANOTHER_CALL_NOT_BUSY = 0x00, /**< command qualifier for SETUP CALL IF ANOTHER CALL IS NOT BUSY */
+       TAPI_SAT_SETUP_CALL_IF_ANOTHER_CALL_NOT_BUSY_WITH_REDIAL = 0x01, /**< command qualifier for SETUP CALL IF ANOTHER CALL IS NOT BUSY WITH REDIAL */
+       TAPI_SAT_SETUP_CALL_PUT_ALL_OTHER_CALLS_ON_HOLD = 0x02, /**< command qualifier for SETUP CALL PUTTING ALL OTHER CALLS ON HOLD */
+       TAPI_SAT_SETUP_CALL_PUT_ALL_OTHER_CALLS_ON_HOLD_WITH_REDIAL = 0x03, /**< command qualifier for SETUP CALL PUTTING ALL OTHER CALLS ON HOLD WITH REDIAL */
+       TAPI_SAT_SETUP_CALL_DISCONN_ALL_OTHER_CALLS = 0x04, /**< command qualifier for SETUP CALL DISCONNECTING ALL OTHER CALLS */
+       TAPI_SAT_SETUP_CALL_DISCONN_ALL_OTHER_CALLS_WITH_REDIAL = 0x05, /**< command qualifier for SETUP CALL DISCONNECTING ALL OTHER CALLS WITH REDIAL */
+       TAPI_SAT_SETUP_CALL_RESERVED = 0xFF /**< command qualifier for SETUP CALL RESERVED */
+} TelSatCmdQualiSetupCall_t;
+
+/**
+ * @brief Enumeration for the message priority.
+ *
+ * @details This is associated with the command qualifier of display text.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_MSG_PRIORITY_NORMAL = 0, /**< MSG PRIORITY NORMAL */
+       TAPI_SAT_MSG_PRIORITY_HIGH = 1 /**< MSG PRIORITY HIGH */
+} TelSatDisplayTextPriorityType_t;
+
+/**
+ * @brief Enumeration for the message clear type.
+ *
+ * @details This is associated with the command qualifier of display text.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_AUTO_CLEAR_MSG_AFTER_A_DELAY = 0, /**< message clear type - AUTO CLEAR MSG AFTER A DELAY */
+       TAPI_SAT_WAIT_FOR_USER_TO_CLEAR_MSG = 1 /**< message clear type - WAIT FOR USER TO CLEAR MSG */
+} TelSatDisplayTextMsgClearType_t;
+
+/**
+ * @brief Enumeration for the inkey type.
+ *
+ * @details This is associated with the command qualifier of get inkey.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_INKEY_TYPE_CHARACTER_SET_ENABLED = 0, /**< command qualifier for INKEY TYPE CHARACTER SET ENABLED */
+       TAPI_SAT_INKEY_TYPE_YES_NO_REQUESTED = 1 /**< command qualifier for INKEY TYPE YES NO REQUESTED */
+} TelSatInkeyType_t;
+
+/**
+ * @brief Enumeration for the user input type.
+ *
+ * @details This is associated with the command qualifier of get input.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_USER_INPUT_ALPHABET_TYPE_SMS_DEFAULT = 1, /**< command qualifier for ALPHABET TYPE SMS DEFAULT */
+       TAPI_SAT_USER_INPUT_ALPHABET_TYPE_UCS2 = 2 /**< command qualifier for ALPHABET TYPE UCS2 */
+} TelSatUseInputAlphabetType_t;
+
+/**
+ * @brief Enumeration for the vibrate alert type.
+ *
+ * @details This is associated with the command qualifier of the play tone command.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_VIBRATE_ALERT_OPTIONAL = 0, /**< VIBRATE ALERT UPTO THE TERMINAL */
+       TAPI_SAT_VIBRATE_ALERT_REQUIRED = 1 /**< VIBRATE, IF AVAILABLE, WITH TONE */
+} TelSatDisplayVibrateAlertType_t;
+
+/**
+ * @brief Enumeration for the presentation type.
+ *
+ * @details This is associated with the command qualifier of the select item command.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_PRESENTATION_TYPE_NOT_SPECIFIED = 0x00, /**< command qualifier for PRESENTATION TYPE NOT SPECIFIED */
+       TAPI_SAT_PRESENTATION_TYPE_DATA_VALUE = 0x01, /**< command qualifier for PRESENTATION TYPE DATA VALUE */
+       TAPI_SAT_PRESENTATION_TYPE_NAVIGATION_OPTION = 0x02 /**< command qualifier for PRESENTATION TYPE NAVIGATION OPTION */
+} TelSatPresentationType_t;
+
+/**
+ * @brief Enumeration for the selection preference.
+ *
+ * @details This is associated with the command qualifier of the select item command.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_SELECTION_PREFERENCE_NONE_REQUESTED = 0, /**< command qualifier for SELECTION PREFERENCE NONE REQUESTED */
+       TAPI_SAT_SELECTION_PREFERENCE_USING_SOFT_KEY = 1 /**< command qualifier for SELECTION PREFERENCE USING SOFT KEY */
+} TelSatSelectionPreferenceType_t;
+
+/**
+ * @brief Enumeration for the local info type.
+ *
+ * @details This enum defines the command qualifier values of the local info command.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_PROVIDE_DATE_TIME_AND_TIME_ZONE = 0x03, /**< command qualifier for PROVIDE DATE TIME AND TIME ZONE */
+       TAPI_SAT_PROVIDE_LANGUAGE_SETTING = 0x04, /**< command qualifier for PROVIDE LANGUAGE SETTING */
+       TAPI_SAT_PROVIDE_IMEISV = 0x08, TAPI_SAT_PROVIDE_RESERVED = 0xFF /**< reserved */
+} TelSatCmdQualiProvideLocalInfo_t;
+
+/**
+ * @brief Enumeration for the browser launching mode.
+ *
+ * @details This enum defines the command qualifier values of the launch browser command.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_LAUNCH_BROWSER = 0, /**< command qualifier for LAUNCH BROWSER */
+       TAPI_SAT_NOT_USED = 1, /**< command qualifier for NOT USED */
+       TAPI_SAT_USE_EXISTING_BROWSER = 2, /**< command qualifier for USE EXISTING BROWSER. If secure session, do not use it */
+       TAPI_SAT_CLOSE_AND_LAUNCH_NEW_BROWSER = 3, /**< command qualifier for CLOSE AND LAUNCH NEW BROWSER */
+       TAPI_SAT_NOT_USED2 = 4, /**< command qualifier for NOT USED2 */
+       TAPI_SAT_LB_RESERVED = 0xFF /**< reserved */
+} TelSatCmdQualiLaunchBrowser_t;
+
+/**
+ * @brief Enumeration for the device ID type.
+ *
+ * @details This enum lists the device identity tag value IDs.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_DEVICE_ID_KEYPAD = 0x01, /**< DEVICE ID KEYPAD */
+       TAPI_SAT_DEVICE_ID_DISPLAY = 0x02, /**< DEVICE ID DISPLAY */
+       TAPI_SAT_DEVICE_ID_EARPIECE = 0x03, /**< DEVICE ID EARPIECE */
+
+       TAPI_SAT_DEVICE_ID_SIM = 0x81, /**< DEVICE ID SIM */
+       TAPI_SAT_DEVICE_ID_ME = 0x82, /**< DEVICE ID ME */
+       TAPI_SAT_DEVICE_ID_NETWORK = 0x83, /**< DEVICE ID NETWORK */
+
+       TAPI_SAT_DEVICE_ID_RESERVED = 0XFF /**< reserved */
+} TelSatDeviceIdentitiesTagType_t;
+
+/**
+ * @brief Enumeration for the time unit type.
+ *
+ * @details This enum lists the time units for the duration data object.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_TIME_UNIT_MINUTES = 0x0, /**< time unit - minutes */
+       TAPI_SAT_TIME_UNIT_SECONDS = 0x01, /**< time unit - second */
+       TAPI_SAT_TIME_UNIT_TENTHS_OF_SECONDS = 0x02, /**< time unit - tenths of seconds */
+       TAPI_SAT_TIME_UNIT_RESERVED = 0xFF /**< reserved */
+} TelSatTimeUnitType_t;
+
+/**
+ * @brief Enumeration for the command execution result type.
+ *
+ * @details This enum lists the values for the RESULT data object - General Response.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_R_SUCCESS = 0x0, /**< command performed successfully */
+       TAPI_SAT_R_SUCCESS_WITH_PARTIAL_COMPREHENSION = 0x01, /**< command performed with partial comprehension */
+       TAPI_SAT_R_SUCCESS_WITH_MISSING_INFO = 0x02, /**< command performed, with missing information */
+
+       TAPI_SAT_R_REFRESH_PERFORMED_WITH_ADDITIONAL_EFS_READ = 0x03, /**< REFRESH PERFORMED WITH ADDITIONAL EFS READ */
+       TAPI_SAT_R_SUCCESS_BUT_REQUESTED_ICON_NOT_DISPLAYED = 0x04, /**< command performed but REQUESTED ICON NOT DISPLAYED */
+       TAPI_SAT_R_SUCCESS_BUT_MODIFIED_BY_CALL_CONTROL_BY_SIM = 0x05, /**< command performed but MODIFIED BY CALL CONTROL BY SIM */
+       TAPI_SAT_R_SUCCESS_LIMITED_SERVICE = 0x06, /**< command performed with LIMITED SERVICE */
+       TAPI_SAT_R_SUCCESS_WITH_MODIFICATION = 0x07, /**< command performed with MODIFICATION */
+       TAPI_SAT_R_REFRESH_PRFRMD_BUT_INDICATED_USIM_NOT_ACTIVE = 0x08, /**< REFRESH PERFORMED BUT INDICATED USIM NOT ACTIVE */
+
+       TAPI_SAT_R_PROACTIVE_SESSION_TERMINATED_BY_USER = 0x10, /**< proactive SIM application session terminated by the user */
+       TAPI_SAT_R_BACKWARD_MOVE_BY_USER = 0x11, /**< backward move in the proactive SIM application session request by the user */
+       TAPI_SAT_R_NO_RESPONSE_FROM_USER = 0x12, /**< no response from the user */
+
+       TAPI_SAT_R_HELP_INFO_REQUIRED_BY_USER = 0x13, /**< HELP INFO REQUIRED BY USER */
+       TAPI_SAT_R_USSD_OR_SS_TRANSACTION_TERMINATED_BY_USER = 0x14, /**< USSD OR SS TRANSACTION TERMINATED BY USER     */
+
+       TAPI_SAT_R_ME_UNABLE_TO_PROCESS_COMMAND = 0x20, /**< ME currently unable to process the command */
+       TAPI_SAT_R_NETWORK_UNABLE_TO_PROCESS_COMMAND = 0x21, /**< Network currently unable to process the command */
+       TAPI_SAT_R_USER_DID_NOT_ACCEPT_CALL_SETUP_REQ = 0x22, /**< User did not accept the call setup request */
+       TAPI_SAT_R_USER_CLEAR_DOWN_CALL_BEFORE_CONN = 0x23, /**< User cleared down the call before connection or released the network */
+
+       TAPI_SAT_R_INTERACTION_WITH_CC_BY_SIM_IN_TMP_PRBLM = 0x25, /**< INTERACTION WITH CALL CONTROL BY SIM IN TEMPORARY PROBLEM */
+       TAPI_SAT_R_LAUNCH_BROWSER_GENERIC_ERROR_CODE = 0x26, /**< LAUNCH BROWSER GENERIC ERROR CODE */
+
+       TAPI_SAT_R_BEYOND_ME_CAPABILITIES = 0x30, /**< command beyond ME's capabilities */
+       TAPI_SAT_R_COMMAND_TYPE_NOT_UNDERSTOOD_BY_ME = 0x31, /**< command type not understood by ME */
+       TAPI_SAT_R_COMMAND_DATA_NOT_UNDERSTOOD_BY_ME = 0x32, /**< command data not understood by ME */
+       TAPI_SAT_R_COMMAND_NUMBER_NOT_KNOWN_BY_ME = 0x33, /**< command number not known by ME */
+       TAPI_SAT_R_SS_RETURN_ERROR = 0x34, /**< SS return error */
+       TAPI_SAT_R_SMS_RP_ERROR = 0x35, /**< SMS rp-error */
+       TAPI_SAT_R_ERROR_REQUIRED_VALUES_ARE_MISSING = 0x36, /**< Error, required values are missing */
+
+       TAPI_SAT_R_USSD_RETURN_ERROR = 0x37, /**< USSD_RETURN_ERROR */
+       TAPI_SAT_R_INTRCTN_WITH_CC_OR_SMS_CTRL_PRMNT_PRBLM = 0x39, /**< INTERACTION WITH CALL CONTROL OR SMS CONTROL PERMANENT PROBLEM */
+       TAPI_SAT_R_BEARER_INDEPENDENT_PROTOCOL_ERROR = 0x3A, /**< BEARER INDEPENDENT PROTOCOL ERROR */
+       TAPI_SAT_R_FRAMES_ERROR = 0x3C /**< FRAMES ERROR */
+} TelSatResultType_t;
+
+/**
+ * @brief Enumeration for the ME problem type.
+ *
+ * @details This enum lists the values for the additional response of the RESULT object and specifies a particular ME PROBLEM.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_ME_PROBLEM_NO_SPECIFIC_CAUSE = 0x0, /**< ME problem with NO SPECIFIC CAUSE */
+       TAPI_SAT_ME_PROBLEM_SCREEN_BUSY = 0x01, /**< ME problem with SCREEN BUSY */
+       TAPI_SAT_ME_PROBLEM_ME_BUSY_ON_CALL = 0x02, /**< ME problem with ME BUSY ON CALL */
+       TAPI_SAT_ME_PROBLEM_ME_BUSY_ON_SS = 0x03, /**< ME problem with ME_BUSY ON SS */
+       TAPI_SAT_ME_PROBLEM_NO_SERVICE = 0x04, /**< ME problem with NO SERVICE */
+       TAPI_SAT_ME_PROBLEM_ACCESS_CONTROL_CLASS_BAR = 0x05, /**< ME problem with ACCESS CONTROL CLASS BAR */
+       TAPI_SAT_ME_PROBLEM_RADIO_RES_NOT_GRANTED = 0x06, /**< ME problem with RADIO RES NOT GRANTED */
+       TAPI_SAT_ME_PROBLEM_NOT_IN_SPEECH_CALL = 0x07, /**< ME problem with NOT IN SPEECH CALL */
+       TAPI_SAT_ME_PROBLEM_ME_BUSY_ON_USSD = 0x08, /**< ME problem with ME BUSY ON USSD */
+       TAPI_SAT_ME_PROBLEM_ME_BUSY_ON_SEND_DTMF_CMD = 0x09, /**< ME problem with ME BUSY ON SEND DTMF CMD */
+       TAPI_SAT_ME_PROBLEM_NO_USIM_ACTIVE = 0x0A, /**< ME problem with NO USIM ACTIVE */
+       TAPI_SAT_ME_PROBLEM_INVALID = 0xFF /**< ME problem with INVALID */
+} TelSatMeProblemType_t;
+
+/**
+ * @brief Enumeration for the network problem type.
+ *
+ * @details This enum lists the values for the additional response of the RESULT object and specifies a particular network PROBLEM.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_NETWORK_PROBLEM_NO_SPECIFIC_CAUSE = 0x0, /**< Network problem with no specific cause */
+       TAPI_SAT_NETWORK_PROBLEM_USER_BUSY = 0x91 /**< Network problem with USER BUSY */
+} TelSatNetworkProblemType_t;
+
+/**
+ * @brief Enumeration for the SS problem type.
+ *
+ * @details This enum lists the values for the additional response of the RESULT object related to SEND SS.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_SS_PROBLEM_NO_SPECIFIC_CAUSE = 0, /**< SS problem with no specific cause */
+       TAPI_SAT_SS_PROBLEM_FACILITY_NOT_SUPPORTED = 0x15 /**< SS problem with FACILITY NOT SUPPORTED */
+} TelSatSsProblemType_t;
+
+/**
+ * @brief Enumeration for the SMS problem type.
+ *
+ * @details This enum lists the values for the additional response of the RESULT object related to SEND SMS.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_SMS_PROBLEM_NO_SPECIFIC_CAUSE = 0 /**< SMS problem with no specific cause */
+} TelSatSmsProblemType_t;
+
+/**
+ * @brief Enumeration for the USSD problem type.
+ *
+ * @details This enum lists the values for the additional response of the RESULT object related to SEND USSD STRING.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_USSD_PROBLEM_NO_SPECIFIC_CAUSE = 0, /**< USSD problem with no specific cause */
+       TAPI_SAT_USSD_PROBLEM_UNKNOWN_ALPHABET = 0x47 /**< USSD problem with UNKNOWN ALPHABET */
+} TelSatUssdProblemType_t;
+
+/**
+ * @brief Enumeration for the CC problem type.
+ *
+ * @details This enum lists the values for the additional response of the RESULT object related to CALL CONTROL or MO SMS CONTROL.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_CC_PROBLEM_NO_SPECIFIC_CAUSE = 0, /**< Call Control problem with no specific cause */
+       TAPI_SAT_CC_PROBLEM_ACTION_NOT_ALLOWED = 1, /**< Call Control problem with action not allowed */
+       TAPI_SAT_CC_PROBLEM_REQUEST_TYPE_HAS_CHANGED = 2 /**< Call Control problem in which request type has changed */
+} TelSatCallCtrlProblemType_t;
+
+/**
+ * @brief Enumeration for the browser problem type.
+ *
+ * @details This enum lists the values for the additional response of the RESULT object related to LAUNCH BROWSER PROBLEM.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_BROWSER_PROBLEM_NO_SPECIFIC_CAUSE = 0, /**< Browser problem with no specific cause */
+       TAPI_SAT_BROWSER_PROBLEM_BEARER_UNAVAILABLE = 1, /**< Browser problem with bearer unavailable */
+       TAPI_SAT_BROWSER_PROBLEM_BROWSER_UNAVAILABLE = 2, /**< Browser problem with browser unavailable */
+       TAPI_SAT_BROWSER_PRBLM_ME_UNABLE_TO_READ_PROV_DATA = 3 /**< Browser problem with ME unable to read provisioning data */
+} TelSatLaunchBrowserProblemType_t;
+
+/**
+ * @brief Enumeration for the #TelSatBipProblemType_t enum.
+ *
+ * @details This enum lists the values for the additional response of the RESULT object.
+ * Permanent Problems  ::: 12.12.11 ADDITIONAL INFORMATION :  BEARER INDEPENDENT PROTOCOL.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_BIP_PROBLEM_NO_SPECIFIC_CAUSE = 0x00, /**< BIP problem with no specific cause */
+       TAPI_SAT_BIP_PROBLEM_NO_CHANNEL_AVAILABLE = 0x01, /**< BIP problem with no channel available */
+       TAPI_SAT_BIP_PROBLEM_CHANNEL_CLOSED = 0x02, /**< BIP problem with channel closed */
+       TAPI_SAT_BIP_PROBLEM_CHANNEL_ID_NOT_VALID = 0x03, /**< BIP problem with channel ID not valid */
+       TAPI_SAT_BIP_PROBLEM_BUF_SIZE_NOT_AVAILABLE = 0x04, /**< BIP problem with buffer size not available */
+       TAPI_SAT_BIP_PROBLEM_SECURITY_ERROR = 0x05, /**< BIP problem with security error */
+       TAPI_SAT_BIP_PRBLM_SIM_ME_IF_TRNSPRT_LEVEL_NOT_AVL = 0x06, /**< BIP problem with SIM ME interface transport level not available */
+       TAPI_SAT_BIP_REMOTE_DEV_NOT_REACHABLE = 0x07, /**< BIP problem with remote device not reachable */
+       TAPI_SAT_BIP_SERVICE_ERROR = 0x08, /**< BIP service error */
+       TAPI_SAT_BIP_SERVICE_IDENTIFIER_UNKNOWN = 0x09 /**< BIP service identifier unknown */
+} TelSatBipProblemType_t;
+
+/**
+ * @brief Enumeration for the SMS TPDU type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_SMS_TPDU_TYPE_DELIVER_TPDU = 0, /**< SMS TPDU type - DELIVER TPDU */
+       TAPI_SAT_SMS_TPDU_TYPE_DELIVER_RPT = 1, /**< SMS TPDU type - DELIVER RPT */
+       TAPI_SAT_SMS_TPDU_TYPE_SUBMIT_TPDU = 2, /**< SMS TPDU type - SUBMIT TPDU */
+       TAPI_SAT_SMS_TPDU_TYPE_SUBMIT_RPT = 3, /**< SMS TPDU type - SUBMIT RPT */
+       TAPI_SAT_SMS_TPDU_TYPE_STATUS_RPT = 4, /**< SMS TPDU type - STATUS RPT */
+       TAPI_SAT_SMS_TPDU_TYPE_TPDU_CMD = 5 /**< SMS TPDU type - TPDU CMD */
+} TelSatSmsTpduType_t;
+
+/**
+ * @brief Enumeration for the tone type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       // standard supervisory tones
+       TAPI_SAT_DIAL_TONE = 0x01, /**< TONE TYPE DIAL TONE */
+       TAPI_SAT_CALLED_SUBSCRIBER_BUSY = 0x02, /**< TONE TYPE CALLED SUBSCRIBER BUSY */
+       TAPI_SAT_CONGESTION = 0x03, /**< TONE TYPE CONGESTION */
+       TAPI_SAT_RADIO_PATH_ACK = 0x04, /**< TONE TYPE RADIO PATH ACK */
+       TAPI_SAT_RADIO_PATH_NOT_AVAILABLE_CALL_DROPPED = 0x05, /**< TONE TYPE RADIO PATH NOT AVAILABLE CALL DROPPED */
+       TAPI_SAT_ERR_SPECIAL_INFO = 0x06, /**< TONE TYPE ERR SPECIAL INFO */
+       TAPI_SAT_CALL_WAITING_TONE = 0x07, /**< TONE TYPE CALL WAITING TONE      */
+       TAPI_SAT_RINGING_TONE = 0x08, /**< TONE TYPE RINGING TONE */
+
+       // ME proprietary tones
+       TAPI_SAT_GENERAL_BEEP = 0x10, /**< TONE TYPE GENERAL BEEP */
+       TAPI_SAT_POSITIVE_ACK_TONE = 0x11, /**< TONE TYPE POSITIVE ACK TONE */
+       TAPI_SAT_NEGATIVE_ACK_OR_ERROR_TONE = 0x12, /**< TONE TYPE NEGATIVE ACK OR ERROR TONE */
+       TAPI_SAT_RINGING_TONE_SLCTD_BY_USR_FOR_INCOM_SPEECH_CALL = 0x13, /**< TONE TYPE RINGING TONE SELECTED BY USER FOR INCOMING SPEECH CALL */
+       TAPI_SAT_ALERT_TONE_SELECTED_BY_USER_FOR_INCOMING_SMS = 0x14, /**< TONE TYPE ALERT TONE SELECTED BY USER FOR INCOMING SMS */
+       TAPI_SAT_CRITICAL_ALERT = 0x15, /**< TONE TYPE CRITICAL ALERT */
+
+       //Themed tones
+       TAPI_SAT_HAPPY_TONE = 0x30, /**< TONE TYPE HAPPY TONE */
+       TAPI_SAT_SAD_TONE = 0x31, /**< TONE TYPE SAD TONE */
+       TAPI_SAT_URGENT_ACTION_TONE = 0x32, /**< TONE TYPE URGENT ACTION TONE */
+       TAPI_SAT_QUESTION_TONE = 0x33, /**< TONE TYPE QUESTION TONE */
+       TAPI_SAT_MESSAGE_RECEIVED_TONE = 0x34, /**< TONE TYPE MESSAGE RECEIVED TONE */
+
+       //Melody tones
+       TAPI_SAT_MELODY_1 = 0x40, /**< TONE TYPE MELODY 1 */
+       TAPI_SAT_MELODY_2 = 0x41, /**< TONE TYPE MELODY 2 */
+       TAPI_SAT_MELODY_3 = 0x42, /**< TONE TYPE MELODY 3 */
+       TAPI_SAT_MELODY_4 = 0x43, /**< TONE TYPE MELODY 4 */
+       TAPI_SAT_MELODY_5 = 0x44, /**< TONE TYPE MELODY 5 */
+       TAPI_SAT_MELODY_6 = 0x45, /**< TONE TYPE MELODY 6 */
+       TAPI_SAT_MELODY_7 = 0x46, /**< TONE TYPE MELODY 7 */
+       TAPI_SAT_MELODY_8 = 0x47, /**< TONE TYPE MELODY 8 */
+
+       TAPI_SAT_TONE_TYPE_RESERVED = 0xFF /**< TONE TYPE RESERVED */
+} TelSatToneType_t;
+
+/**
+ * @brief Enumeration for the event types required by ME to monitor and report to the SIM.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_EVENT_SAT_DW_TYPE_MT_CALL = 0,     /**< TBD */
+       TAPI_EVENT_SAT_DW_TYPE_CALL_CONNECTED = 1,      /**< TBD */
+       TAPI_EVENT_SAT_DW_TYPE_CALL_DISCONNECTED = 2,   /**< TBD */
+       TAPI_EVENT_SAT_DW_TYPE_LOCATION_STATUS = 3,     /**< TBD */
+       TAPI_EVENT_SAT_DW_TYPE_USER_ACTIVITY = 4, /**< data download type - USER_ACTIVITY */
+       TAPI_EVENT_SAT_DW_TYPE_IDLE_SCREEN_AVAILABLE = 5, /**< data download type - IDLE SCREEN AVAILABLE */
+       TAPI_EVENT_SAT_DW_TYPE_CARD_READER_STATUS = 6,  /**< TBD */
+       TAPI_EVENT_SAT_DW_TYPE_LANGUAGE_SELECTION = 7, /**<     data download type - LANGUAGE SELECTION */
+       TAPI_EVENT_SAT_DW_TYPE_BROWSER_TERMINATION = 8, /**< data download type - BROWSER TERMINATION */
+       TAPI_EVENT_SAT_DW_TYPE_DATA_AVAILABLE = 9, /**< data download type - DATA AVAILABLE */
+       TAPI_EVENT_SAT_DW_TYPE_CHANNEL_STATUS = 0x0A, /**< data download type - CHANNEL STATUS */
+       TAPI_EVENT_SAT_DW_TYPE_ACCESS_TECHNOLOGY_CHANGED = 0x0B,        /**< TBD */
+       TAPI_EVENT_SAT_DW_TYPE_DISPLAY_PARAMETERS_CHANGED = 0x0C,       /**< TBD */
+       TAPI_EVENT_SAT_DW_TYPE_LOCAL_CONNECTION = 0x0D, /**< TBD */
+       TAPI_EVENT_SAT_DW_TYPE_NW_SEARCH_MODE_CHANGED = 0X0E,   /**< TBD */
+       TAPI_EVENT_SAT_DW_TYPE_BROWSING_STATUS = 0X0F,  /**< TBD */
+       TAPI_EVENT_SAT_DW_TYPE_FRAMES_INFORMATION_CHANGED = 0X10,       /**< TBD */
+       TAPI_EVENT_SAT_DW_TYPE_RESERVED_FOR_3GPP = 0X11,        /**< TBD */
+       TAPI_EVENT_SAT_DW_TYPE_UNKNOWN = 0xFF /**< data download type - unknown */
+} TelSatEventDownloadType_t;
+
+/**
+ * @brief Enumeration for the SIM image coding scheme type.
+ *
+ * @details This enum lists image coding scheme types required by ME to show.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_SIM_IMAGE_CODING_SCHEME_BASIC = 0x11, /**<     IMAGE CODING SCHEME BASIC */
+       TAPI_SAT_SIM_IMAGE_CODING_SCHEME_COLOUR = 0x21, /**< IMAGE CODING SCHEME COLOUR */
+       TAPI_SAT_SIM_IMAGE_CODING_SCHEME_RESERVED = 0xFF /**< RESERVED */
+} TelSatImageCodingSchemeType_t;
+
+/**
+ * @brief Enumeration for the icon qualifier.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_ICON_QUALI_SELF_EXPLANATORY = 0, /**< ICON QUALI SELF EXPLANATORY */
+       TAPI_SAT_ICON_QUALI_NOT_SELF_EXPLANATORY = 1, /**< ICON QUALI NOT SELF EXPLANATORY */
+       TAPI_SAT_ICON_QUALI_RESERVED = 0xFF /**< RESERVED */
+} TelSatIconQualifierType_t;
+
+/**
+ * @brief Enumeration for the SIM ATK BC repeat indicator type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_BC_REPEAT_INDI_ALTERNATE_MODE = 0x01, /**< BC REPEAT ALTERNATE MODE */
+       TAPI_SAT_BC_REPEAT_INDI_SEQUENTIAL_MODE = 0x03, /**< BC REPEAT SEQUENTIAL MODE */
+       TAPI_SAT_BC_REPEAT_INDI_RESERVED = 0xFF /**< RESERVED */
+} TelSatBcRepeatIndicatorType_t;
+
+/**
+ * @brief Enumeration for the call control string type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_CC_VOICE = 0x00, /**< Call Control String Type - voice */
+       TAPI_SAT_CC_SS = 0x01, /**< Call Control String Type - SS */
+       TAPI_SAT_CC_USSD = 0x02, /**< Call Control String Type - USSD */
+       TAPI_SAT_CC_NONE = 0xFF /**< Call Control String Type - none */
+} TelSatCallCtrlStringType_t;
+
+/**
+ * @brief Enumeration for the supported language values.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_LP_GERMAN = 0x00, /**< GERMAN */
+       TAPI_SAT_LP_ENGLISH = 0x01, /**< ENGLISH */
+       TAPI_SAT_LP_ITALIAN = 0x02, /**< ITALIAN */
+       TAPI_SAT_LP_FRENCH = 0x03, /**< FRENCH */
+       TAPI_SAT_LP_SPANISH = 0x04, /**< SPANISH */
+       TAPI_SAT_LP_DUTCH = 0x05, /**< DUTCH */
+       TAPI_SAT_LP_SWEDISH = 0x06, /**< SWEDISH */
+       TAPI_SAT_LP_DANISH = 0x07, /**< DANISH */
+       TAPI_SAT_LP_PORTUGUESE = 0x08, /**< PORTUGUESE */
+       TAPI_SAT_LP_FINNISH = 0x09, /**< FINNISH */
+       TAPI_SAT_LP_NORWEGIAN = 0x0A, /**< NORWEGIAN */
+       TAPI_SAT_LP_GREEK = 0x0B, /**< GREEK */
+       TAPI_SAT_LP_TURKISH = 0x0C, /**< TURKISH */
+       TAPI_SAT_LP_HUNGARIAN = 0x0D, /**< HUNGARIAN */
+       TAPI_SAT_LP_POLISH = 0x0E, /**< POLISH */
+       TAPI_SAT_LP_LANG_UNSPECIFIED = 0x0F /**< LANGUAGE UNSPECIFIED */
+} TelSatLanguageType_t;
+
+/**
+ * @brief Enumeration for the SAT browser identity type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_BROWSER_ID_DEFAULT = 0x0, /**< DEFAULT BROWSER */
+       TAPI_SAT_BROWSER_ID_WML, /**< BROWSER WML */
+       TAPI_SAT_BROWSER_ID_HTML, /**< BROWSER HTML */
+       TAPI_SAT_BROWSER_ID_XHTML, /**< BROWSER XHTML */
+       TAPI_SAT_BROWSER_ID_CHTML, /**< BROWSER CHTML */
+       TAPI_SAT_BROWSER_ID_RESERVED = 0xFF /**< RESERVED */
+} TelSatBrowserIdentityType_t;
+
+/**
+ * @brief Enumeration for the SAT bearer type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_BEARER_TYPE_SMS = 0x0, /**< BEARER SMS */
+       TAPI_SAT_BEARER_TYPE_CSD = 0x1, /**< BEARER CSD */
+       TAPI_SAT_BEARER_TYPE_USSD = 0x2, /**< BEARER USSD */
+       TAPI_SAT_BEARER_TYPE_GPRS = 0x3, /**< BEARER GPRS */
+       TAPI_SAT_BEARER_TYPE_RESERVED = 0xFF /**< BEARER RESERVED */
+} TelSatBearerType_t;
+
+/**
+ * @brief Enumeration for the SAT browser termination cause type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_BROWSER_TERMINATED_BY_USER = 0, /**< BROWSER TERMINATED BY USER */
+       TAPI_SAT_BROWSER_TERMINATED_BY_ERROR = 1, /**< BROWSER TERMINATED BY ERROR */
+} TelSatBrowserTerminationCauseType_t;
+
+/**
+ * @brief Enumeration for the SAT bearer destination type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_BEARER_CSD = 0x1, /**< BEARER DESC CSD */
+       TAPI_SAT_BEARER_GPRS = 0x2, /**< BEARER DESC GPRS */
+       TAPI_SAT_BEARER_DEFAULT_BEARER_FROM_TRANSPORT_LAYER = 0x3, /**< BEARER DESC DEFAULT BEARER FROM TRANSPORT LAYER */
+       TAPI_SAT_BEARER_LOCAL_LINK_TECHNOLOGY_INDEPENDENT = 0x4, /**< BEARER DESC LOCAL LINK TECHNOLOGY INDEPENDENT */
+       TAPI_SAT_BEARER_BLUETOOTH = 0x5, /**< BEARER DESC BLUETOOTH */
+       TAPI_SAT_BEARER_IrDA = 0x6, /**< BEARER DESC IrDA */
+       TAPI_SAT_BEARER_RS232 = 0x7, /**< BEARER DESC RS232 */
+       TAPI_SAT_BEARER_USB = 0x10, /**< BEARER DESC USB */
+       TAPI_SAT_BEARER_RESERVED = 0xFF /**< RESERVED */
+} TelSatBearerDescType_t;
+
+/**
+ * @brief Enumeration for the SAT bearer CSD data rate.
+ *
+ * @details Refer TS 27.007.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_BIP_DR_AUTOBAUDING = 0, /**< CSD data rate - AUTOBAUDING */
+       TAPI_SAT_BIP_DR_300BPS_V21 = 1, /**< CSD data rate - 300BPS V21 */
+       TAPI_SAT_BIP_DR_1200BPS_V22 = 2, /**< CSD data rate - 1200BPS V22 */
+       TAPI_SAT_BIP_DR_1200_75BPS_V23 = 3, /**< CSD data rate - 1200 75BPS V23 */
+       TAPI_SAT_BIP_DR_2400BPS_V22 = 4, /**< CSD data rate - 2400BPS V22 */
+       TAPI_SAT_BIP_DR_2400BPS_V26 = 5, /**< CSD data rate - 2400BPS V26 */
+       TAPI_SAT_BIP_DR_4800BPS_V32 = 6, /**< CSD data rate - 4800BPS V32 */
+       TAPI_SAT_BIP_DR_9600BPS_V32 = 7, /**< CSD data rate - 9600BPS V32 */
+       TAPI_SAT_BIP_DR_9600BPS_V34 = 12, /**< CSD data rate - 9600BPS V34 */
+       TAPI_SAT_BIP_DR_14400BPS_V34 = 14, /**< CSD data rate - 14400BPS V34 */
+       TAPI_SAT_BIP_DR_19200BPS_V34 = 15, /**< CSD data rate - 19200BPS V34 */
+       TAPI_SAT_BIP_DR_28800BPS_V34 = 16, /**< CSD data rate - 28800BPS V34 */
+       TAPI_SAT_BIP_DR_33600BPS_V34 = 17, /**< CSD data rate - 33600BPS V34 */
+       TAPI_SAT_BIP_DR_1200BPS_V120 = 34, /**< CSD data rate - 1200BPS V120 */
+       TAPI_SAT_BIP_DR_2400BPS_V120 = 36, /**< CSD data rate - 2400BPS V120 */
+       TAPI_SAT_BIP_DR_4800BPS_V120 = 38, /**< CSD data rate - 4800BPS V120 */
+       TAPI_SAT_BIP_DR_9600BPS_V120 = 39, /**< CSD data rate - 9600BPS V120 */
+       TAPI_SAT_BIP_DR_14400BPS_V120 = 43, /**< CSD data rate - 14400BPS V120 */
+       TAPI_SAT_BIP_DR_19200BPS_V120 = 47, /**< CSD data rate - 19200BPS V120 */
+       TAPI_SAT_BIP_DR_28800BPS_V120 = 48, /**< CSD data rate - 28800BPS V120 */
+       TAPI_SAT_BIP_DR_38400BPS_V120 = 49, /**< CSD data rate - 38400BPS V120 */
+       TAPI_SAT_BIP_DR_48000BPS_V120 = 50, /**< CSD data rate - 48000BPS V120 */
+       TAPI_SAT_BIP_DR_56000BPS_V120 = 51, /**< CSD data rate - 56000BPS V120 */
+       TAPI_SAT_BIP_DR_300BPS_V110 = 65, /**< CSD data rate - 300BPS V110 */
+       TAPI_SAT_BIP_DR_1200BPS_V110 = 66, /**< CSD data rate - 1200BPS V110 */
+       TAPI_SAT_BIP_DR_2400BPS_V110_OR_X31_FALG_STUFFING = 68, /**< CSD data rate - 2400BPS V110 OR X31 FALG STUFFING */
+       TAPI_SAT_BIP_DR_4800BPS_V110_OR_X31_FALG_STUFFING = 70, /**< CSD data rate - 4800BPS V110 OR X31 FALG STUFFING */
+       TAPI_SAT_BIP_DR_9600BPS_V110_OR_X31_FALG_STUFFING = 71, /**< CSD data rate - 9600BPS V110 OR X31 FALG STUFFING */
+       TAPI_SAT_BIP_DR_14400BPS_V110_OR_X31_FALG_STUFFING = 75, /**< CSD data rate - 14400BPS V110 OR X31 FALG STUFFING */
+       TAPI_SAT_BIP_DR_19200BPS_V110_OR_X31_FALG_STUFFING = 79, /**< CSD data rate - 19200BPS V110 OR X31 FALG STUFFING */
+       TAPI_SAT_BIP_DR_28800BPS_V110_OR_X31_FALG_STUFFING = 80, /**< CSD data rate - 28800BPS V110 OR X31 FALG STUFFING */
+       TAPI_SAT_BIP_DR_38400BPS_V110_OR_X31_FALG_STUFFING = 81, /**< CSD data rate - 38400BPS V110 OR X31 FALG STUFFING */
+       TAPI_SAT_BIP_DR_48000BPS_V110_OR_X31_FALG_STUFFING = 82, /**< CSD data rate - 48000BPS V110 OR X31 FALG STUFFING */
+       TAPI_SAT_BIP_DR_56000BPS_V110_OR_X31_FALG_STUFFING = 83, /**< CSD data rate - 56000BPS V110 OR X31 FALG STUFFING */
+       TAPI_SAT_BIP_DR_64000BPS = 84, /**<     CSD data rate - 64000BPS */
+       TAPI_SAT_BIP_DR_56000BPS_BIT_TRANSPERENT = 115, /**< CSD data rate - 56000BPS BIT TRANSPERENT */
+       TAPI_SAT_BIP_DR_64000BPS_BIT_TRANSPERENT = 116, /**< CSD data rate - 64000BPS BIT TRANSPERENT */
+       TAPI_SAT_BIP_DR_32000BPS_PIAFS32K = 120, /**< CSD data rate - 32000BPS PIAFS32K */
+       TAPI_SAT_BIP_DR_64000BPS_PIAFS64K = 121, /**< CSD data rate - 64000BPS PIAFS64K */
+       TAPI_SAT_BIP_DR_28800BPS_MULTIMEDIA = 130, /**< CSD data rate - 28800BPS MULTIMEDIA */
+       TAPI_SAT_BIP_DR_32000BPS_MULTIMEDIA = 131, /**< CSD data rate - 32000BPS MULTIMEDIA */
+       TAPI_SAT_BIP_DR_33600BPS_MULTIMEDIA = 132, /**< CSD data rate - 33600BPS MULTIMEDIA */
+       TAPI_SAT_BIP_DR_56000BPS_MULTIMEDIA = 133, /**< CSD data rate - 56000BPS MULTIMEDIA */
+       TAPI_SAT_BIP_DR_64000BPS_MULTIMEDIA = 134 /**< CSD data rate - 64000BPS MULTIMEDIA */
+} TelSatBearerParamCsdDataRateType_t;
+
+/**
+ * @brief Enumeration for the CSD bearer service type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_BIP_CSD_BS_DATA_CIRCUIT_ASYNC_UDI = 0, /**< CSD Bearer service - DATA CIRCUIT ASYNCHRONOUS UDI */
+       TAPI_SAT_BIP_CSD_BS_DATA_CIRCUIT_SYNC = 1, /**< CSD Bearer service - DATA CIRCUIT SYNCHRONOUS UDI */
+       TAPI_SAT_BIP_CSD_BS_PAD_ACCESS_ASYNC_UDI = 2, /**< CSD Bearer service - PAD ACCESS ASYNCHRONOUS UDI     */
+       TAPI_SAT_BIP_CSD_BS_PACKET_ACCESS_SYNC = 3, /**< CSD Bearer service - PACKET ACCESS SYNCHRONOUS UDI */
+       TAPI_SAT_BIP_CSD_BS_DATA_CIRCUIT_ASYNC_RDI = 4, /**< CSD Bearer service - DATA CIRCUIT ASYNCHRONOUS RDI */
+       TAPI_SAT_BIP_CSD_BS_DATA_CIRCUIT_SYNC_RDI = 5, /**<     CSD Bearer service - DATA CIRCUIT SYNCHRONOUS RDI */
+       TAPI_SAT_BIP_CSD_BS_PAD_ACCESS_ASYNC_RDI = 6, /**< CSD Bearer service - PAD ACCESS ASYNCHRONOUS RDI */
+       TAPI_SAT_BIP_CSD_BS_PACKET_ACCESS_SYNC_RDI = 7 /**<     CSD Bearer service - PACKET ACCESS SYNCHRONOUS RDI */
+} TelSatBearerParamCsdBearerServiceType_t;
+
+/**
+ * @brief Enumeration for the SAT bearer CSD connection element.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_BIP_CSD_CONN_ELEM_TRANSPARENT = 0, /**< CSD connection element - TRANSPARENT */
+       TAPI_SAT_BIP_CSD_CONN_ELEM_NON_TRANSPARENT = 1, /**< CSD connection element - NON TRANSPARENT */
+       TAPI_SAT_BIP_CSD_CONN_ELEM_BOTH_TRANSPARENT_PREF = 2, /**< CSD connection element - BOTH TRANSPARENT PREFFERED */
+       TAPI_SAT_BIP_CSD_CONN_ELEM_BOTH_NON_TRANSPARENT_PREF = 3 /**< CSD connection element - NON TRANSPARENT PREFFERED */
+} TelSatBearerParamCsdConnectionElementType_t;
+
+/**
+ * @brief Enumeration for the SAT bearer GPRS precedence class.
+ *
+ * @details Refer TS 23.107.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_BIP_GPRS_PRECED_CLASS_HIGH_PRIORITY = 0x01, /**< GPRS precedence class - HIGH PRIORITY */
+       TAPI_SAT_BIP_GPRS_PRECED_CLASS_NORM_PRIORITY = 0x02, /**< GPRS precedence class - NORM PRIORITY */
+       TAPI_SAT_BIP_GPRS_PRECED_CLASS_LOW_PRIORITY = 0x03 /**< GPRS precedence class - LOW PRIORITY */
+} TelSatBearerParamGprsPrecedenceClassType_t;
+
+/**
+ * @brief Enumeration for the SAT bearer GPRS delay class.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_BIP_GPRS_DELAY_CLASS_1 = 0x01, /**< GPRS delay class - 1 */
+       TAPI_SAT_BIP_GPRS_DELAY_CLASS_2 = 0x02, /**< GPRS delay class - 2 */
+       TAPI_SAT_BIP_GPRS_DELAY_CLASS_3 = 0x03, /**< GPRS delay class - 3 */
+       TAPI_SAT_BIP_GPRS_DELAY_CLASS_4 = 0x04 /**< GPRS delay class - 4 */
+} TelSatBearerParamGprsDelayClassType_t;
+
+/**
+ * @brief Enumeration for the SAT bearer GPRS Reliability class.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_BIP_GPRS_RELIABILITY_CLASS_1 = 0x01, /**< GPRS Reliability class - 1 */
+       TAPI_SAT_BIP_GPRS_RELIABILITY_CLASS_2 = 0x02, /**< GPRS Reliability class - 2 */
+       TAPI_SAT_BIP_GPRS_RELIABILITY_CLASS_3 = 0x03, /**< GPRS Reliability class - 3 */
+       TAPI_SAT_BIP_GPRS_RELIABILITY_CLASS_4 = 0x04, /**< GPRS Reliability class - 4 */
+       TAPI_SAT_BIP_GPRS_RELIABILITY_CLASS_5 = 0x05 /**< GPRS Reliability class - 5 */
+} TelSatBearerParamGprsReliabilityClassType_t;
+
+/**
+ * @brief Enumeration for the SAT bearer GPRS peak throughput class.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_8KBPS = 0x01, /**< GPRS peak throughput class - UPTO 8KBPS */
+       TAPI_SAT_BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_16KBPS = 0x02, /**< GPRS peak throughput class - UPTO 16KBPS */
+       TAPI_SAT_BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_32KBPS = 0x03, /**< GPRS peak throughput class - UPTO 32KBPS */
+       TAPI_SAT_BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_64KBPS = 0x04, /**< GPRS peak throughput class - UPTO 64KBPS */
+       TAPI_SAT_BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_128KBPS = 0x05, /**< GPRS peak throughput class - UPTO 128KBPS */
+       TAPI_SAT_BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_256KBPS = 0x06, /**< GPRS peak throughput class - UPTO 256KBPS */
+       TAPI_SAT_BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_512KBPS = 0x07, /**< GPRS peak throughput class - UPTO 512KBPS */
+       TAPI_SAT_BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_1024KBPS = 0x08, /**< GPRS peak throughput class - UPTO 1024KBPS */
+       TAPI_SAT_BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_2048KBPS = 0x09 /**< GPRS peak throughput class - UPTO 2048KBPS */
+} TelSatBearerParamGprsPeakThroughputClassType_t;
+
+/**
+ * @brief Enumeration for the SAT bearer GPRS mean throughput class.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_DOT_22_BPS = 0x01, /**< GPRS mean throughput class - DOT 22 BPS */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_DOT_44_BPS = 0x02, /**< GPRS mean throughput class - DOT 44 BPS */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_1_DOT_11_BPS = 0x03, /**< GPRS mean throughput class - 1 DOT 11 BPS */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_2_DOT_2_BPS = 0x04, /**< GPRS mean throughput class - 2 DOT 2 BPS */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_2_DOT_4_BPS = 0x05, /**< GPRS mean throughput class - 2 DOT 4 BPS */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_11_DOT_1_BPS = 0x06, /**< GPRS mean throughput class - 11 DOT 1 BPS */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_22BPS = 0x07, /**< GPRS mean throughput class - 22BPS */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_44BPS = 0x08, /**< GPRS mean throughput class - 44BPS */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_111BPS = 0x09, /**<     GPRS mean throughput class - 111BPS */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_DOT_22_KBPS = 0x0A, /**< GPRS mean throughput class - DOT 22 KBPS */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_DOT_44_KBPS = 0x0B, /**< GPRS mean throughput class -DOT 44 KBPS */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_1_DOT_11_KBPS = 0x0C, /**< GPRS mean throughput class -1 DOT 11 KBPS */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_2_DOT_2_KBPS = 0x0D, /**< GPRS mean throughput class -2 DOT 2 KBPS */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_4_DOT_4_KBPS = 0x0E, /**< GPRS mean throughput class - 4 DOT 4 KBPS */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_11_DOT_1_KBPS = 0x0F, /**< GPRS mean throughput class -11 DOT 1 KBPS */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_22KBPS = 0x10, /**<     GPRS mean throughput class - 22KBPS */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_44KBPS = 0x11, /**<     GPRS mean throughput class - 44KBPS     */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_111KBPS = 0x12, /**<    GPRS mean throughput class -111KBPS */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_BEST_EFFORT = 0x13 /**< GPRS mean throughput class - BEST EFFORT */
+} TelSatBearerParamGprsMeanThroughputClassType_t;
+
+/**
+ * @brief Enumeration for the SAT bearer GPRS PDP type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_BIP_GPRS_PDP_TYPE_IP = 0x02, /**< bearer parameter GPRS PDP type - IP */
+       TAPI_SAT_BIP_GPRS_PDP_TYPE_RESERVED = 0xff /**< reserved */
+} TelSatBearerParamGprsPdpType_t;
+
+/**
+ * @brief Enumeration for the SAT bearer local links service identity.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_BIP_LL_SERVICE_IDENT_VALUE_ASSIGNED_BY_USIM = 0x00, /**< local links service identity - value assigned by USIM */
+       TAPI_SAT_BIP_LL_SERVICE_IDENT_VALUE_ASSIGNED_BY_REMOTED_DEVICE = 0xFF /**< local links service identity - value assigned by remote service */
+} TelSatBearerParamLocalLinksServiceIdentityType_t;
+
+/**
+ * @brief Enumeration for the SAT channel status type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_CS_LINK_ESTABLISHED_OR_PDP_CTX_NOT_ACTIVATED, /**<     channel status type - CS LINK ESTABLISHED OR PDP CTX NOT ACTIVATED */
+       TAPI_SAT_CS_LINK_ESTABLISHED_OR_PDP_CTX_ACTIVATED, /**< channel status type - CS LINK ESTABLISHED OR PDP CTX ACTIVATED */
+       TAPI_SAT_UICC_SERVER_MODE_TCP_IN_CLOSED_STATE, /**<     channel status type - UICC SERVER MODE TCP IN CLOSED STATE */
+       TAPI_SAT_UICC_SERVER_MODE_TCP_IN_LISTEN_STATE, /**<     channel status type - UICC SERVER MODE TCP IN LISTEN STATE */
+       TAPI_SAT_UICC_SERVER_MODE_TCP_IN_ESTABLISHED_STATE, /**< channel status type - UICC SERVER MODE TCP IN ESTABLISHED STATE */
+       TAPI_SAT_UICC_SERVER_MODE_RESERVED /**< reserved */
+} TelSatChannelStatusType_t;
+
+/**
+ * @brief Enumeration for the SAT channel status info type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_CHANNEL_STATUS_NO_FURTHER_INFO_AVAILABLE = 0, /**< CHANNEL STATUS NO FURTHER INFO AVAILABLE */
+       TAPI_SAT_CHANNEL_STATUS_NOT_USED = 1, /**< CHANNEL STATUS NOT USED */
+       TAPI_SAT_CHANNEL_STATUS_LINK_DROPPED = 5 /**< CHANNEL STATUS LINK DROPPED */
+} TelSatChannelStatusInfoType_t;
+
+/**
+ * @brief Enumeration for the SAT address type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_ADDR_TYPE_IPv4 = 0x21, /**< address type - IPv4 */
+       TAPI_SAT_ADDR_TYPE_IPv6 = 0x57, /**< address type - IPv6 */
+       TAPI_SAT_ADDR_RESERVED = 0xFF /**< reserved     */
+} TelSatAddressType_t;
+
+/**
+ * @brief Enumeration for the SAT transport protocol type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_TP_TYPE_UDP_UICC_CLIENT = 0x01, /**< transport protocol type - UDP UICC CLIENT */
+       TAPI_SAT_TP_TYPE_TCP_UICC_CLIENT = 0x02, /**< transport protocol type - TCP UICC CLIENT */
+       TAPI_SAT_TP_TYPE_TCP_UICC_SERVER = 0x03 /**< transport protocol type - TCP UICC SERVER */
+} TelSatTransportProtocolType_t;
+
+/**
+ * @brief Enumeration for the SAT remote entity address coding type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SAT_REMOTE_ENTITY_ADDR_CODING_TYPE_IEEE802_48BIT = 0, /**< remote entity address coding type - IEEE802 48BIT */
+       TAPI_SAT_REMOTE_ENTITY_ADDR_CODING_TYPE_IRDA_32BIT = 1, /**< remote entity address coding type - IRDA 32BIT     */
+       TAPI_SAT_REMOTE_ENTITY_ADDR_CODING_TYPE_RESERVED = 0xFF /**< reserved */
+} TelSatRemoteEntityAddrCodingType_t;
+
+/**
+ * @brief The structure type defining the address data object.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSimTypeOfNum_t ton; /**<     Type of number */
+       TelSimNumberingPlanIdentity_t npi; /**< Number plan identity */
+       unsigned char diallingNumberLen; /**< Dialing the number length */
+       char diallingNumber[TAPI_SAT_DIALLING_NUMBER_LEN_MAX]; /**<     Dialing the number */
+} TelSatAddressInfo_t;
+
+/**
+ * @brief The structure type defining the data coding scheme object.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int bIsCompressedFormat; /**< Flag to verify the compressed format */
+       TelSatAlphabetFormatType_t alphabetFormat; /**< Alphabet format type */
+       TelSatMsgClassType_t msgClass; /**<     Type of message class */
+       unsigned char rawDcs; /**< Raw DCS info */
+} TelSatDataCodingSchemeInfo_t;
+
+/**
+ * @brief The structure type defining the Alpha ID data object.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int bIsPresent; /**< Flag for checking the existence of the alpha identifier */
+       TelSatDataCodingSchemeInfo_t dcs; /**< DCS info */
+       unsigned char stringLen; /**< Alpha identifier length */
+       char string[TAPI_SAT_ALPHA_ID_LEN_MAX]; /**< Alpha identifier info */
+} TelSatAlphaIdentifierInfo_t;
+
+/**
+ * @brief The structure type defining the Sub Address data object.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char subAddressLen; /**< Sub address length */
+       char subAddress[TAPI_SAT_SUB_ADDR_LEN_MAX]; /**< Sub address */
+} TelSatSubAddressInfo_t;
+
+/**
+ * @brief The structure type defining the Capability Configuration Parameters data object.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char dataLen; /**<     Capability configuration parameter length */
+       char data[TAPI_SAT_CCP_DATA_LEN_MAX]; /**< Capability configuration parameter */
+} TelSatCapaConfigParamInfo_t;
+
+/**
+ * @brief The structure type defining command qualifier values for the send SMS command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int bIsPackingByMeRequired; /**< Flag to verify packing requirement, if FALSE packing by ME is not required */
+} TelSatCmdQualiSendSms_t;
+
+/**
+ * @brief The structure type defining command qualifier values for the display text command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatDisplayTextPriorityType_t msgPriority; /**< Message priority */
+       TelSatDisplayTextMsgClearType_t msgClear; /**< Message clear type */
+} TelSatCmdQualiDisplayText_t;
+
+/**
+ * @brief The structure type defining command qualifier values for the get inkey command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatInkeyType_t inkeyType; /**< Inkey type */
+       int bIsUsingAlphabetSet; /**< Flag for checking whether alphabet set is being used. If FALSE, digits(0-9,*,and+) only */
+       TelSatUseInputAlphabetType_t alphabetType; /**< Alphabet type */
+       int bIsImmediateResponseRequired;/**< Flag for checking whether immediate response is required */
+       int bIsHelpInfoAvailable; /**< Flag for checking whether help info is available. If FALSE, no help information is available */
+} TelSatCmdQualiGetInkey_t;
+
+/**
+ * @brief The structure type defining command qualifier values for the get input command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int bIsUsingAlphabetSet; /**< Flag for checking whether alphabet set is being used. If FALSE, digits(0-9,*,and+) only */
+       TelSatUseInputAlphabetType_t alphabetType; /**< Alphabet type. Only using alphabet set case */
+       int bIsMeEchoUserInput; /**< Flag for checking whether ME should echo user input. If FALSE, user input shall not be displayed */
+       int bIsUserInputUnpackedFormat; /**< Flag for checking whether user input is in unpacked format. If FALSE, user input is in the SMS packed format */
+       int bIsHelpInfoAvailable; /**< Flag to verify if help info is available. If FALSE, no help information is available     */
+} TelSatCmdQualiGetInput_t;
+
+/**
+ * @brief The structure type defining command qualifier values for the play tone command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatDisplayVibrateAlertType_t vibrateAlert; /**< Type of vibrate alert */
+} TelSatCmdQualiPlayTone_t;
+
+/**
+ * @brief The structure type defining command qualifier values for the select item command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatPresentationType_t presentationType; /**< Type of presentation. Only presentation type specified */
+       TelSatSelectionPreferenceType_t selectionPreference; /**< Type of selection preference */
+       int bIsHelpInfoAvailable; /**< Flag for checking whether help info is available. If FALSE, no help information is available     */
+} TelSatCmdQualiSelectItem_t;
+
+/**
+ * @brief The structure type defining command qualifier values for the setup menu command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatSelectionPreferenceType_t selectionPreference; /**< Type of selection preference */
+       int bIsHelpInfoAvailable; /**< Flag to verify whether help info is available. If FALSE, no help information is available */
+} TelSatCmdQualiSetupMenu_t;
+
+/**
+ * @brief The structure type defining command qualifier values for the language notification command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int bSpecificLanguageNotification; /**< Flag for a specific language notification. If FALSE, it is a non-specific language notification */
+} TelSatCmdQualiLanguageNotification_t;
+
+/**
+ * @brief The structure type defining the SAT command qualifier open channel.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int bIsEstablishImmediateLink; /**< Flag to verify whether immediate link is establishing. If FALSE, link establishment on demand */
+       int bIsAutomaticReconnection; /**< Flag to verify whether automatic reconnection is establishing. If FALSE, no automatic reconnection */
+       int bIsModeBackground; /**<     Flag to verify whether background mode is activated */
+} TelSatCmdQualiOpenChannel_t;
+
+/**
+ * @brief The structure type containing SAT command qualifier send data.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int bIsSendDataImmediately; /**< Flag to verify whether to send data immediately. If FALSE, store data in the Tx buffer */
+} TelSatCmdQualiSendData_t;
+
+/**
+ * @brief The structure type containing the command number, type, and the qualifier objects of a SATK command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char commandNumber; /**< Specific command number */
+       TelSatCommandType_t commandType; /**< Proactive command type */
+
+       union {
+               TelSatCmdQualiRefresh_t cmdQualiRefresh; /**< Refresh command qualifier info */
+               TelSatCmdQualiSetupCall_t cmdQualiSetupCall; /**< Setup call command qualifier info     */
+               TelSatCmdQualiSendSms_t cmdQualiSendSms; /**< Send SMS command qualifier info */
+               TelSatCmdQualiDisplayText_t cmdQualiDisplayText; /**< Display text command qualifier info */
+               TelSatCmdQualiGetInkey_t cmdQualiGetInkey; /**< Get inkey command qualifier info */
+               TelSatCmdQualiGetInput_t cmdQualiGetInput; /**< Get input command qualifier info */
+               TelSatCmdQualiPlayTone_t cmdQualiPlayTone; /**< Play tone command qualifier info */
+               TelSatCmdQualiSelectItem_t cmdQualiSelectItem; /**< Select item command qualifier info */
+               TelSatCmdQualiSetupMenu_t cmdQualiSetupMenu; /**< Setup menu command qualifier info     */
+               TelSatCmdQualiProvideLocalInfo_t cmdQualiProvideLocalInfo;/**< Provide local info command qualifier info */
+               TelSatCmdQualiLanguageNotification_t cmdQualiLanguageNotification;/**< Language notification command qualifier info     */
+               TelSatCmdQualiLaunchBrowser_t cmdQualiLaunchBrowser; /**< Launch browser command qualifier info */
+               TelSatCmdQualiOpenChannel_t cmdQualiOpenChannel; /**< Open channel command qualifier info */
+               TelSatCmdQualiSendData_t cmdQualiSendData; /**< Send data command qualifier info */
+       } u; /**<       Union   */
+} TelSatCommandDetailInfo_t;
+
+/**
+ * @brief The structure type defining device identity values.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatDeviceIdentitiesTagType_t source; /**< Device identity tag for source     */
+       TelSatDeviceIdentitiesTagType_t destination; /**< Device identity tag for destination */
+} TelSatDeviceIdentitiesInfo_t;
+
+/**
+ * @brief The structure type defining the duration data object.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatTimeUnitType_t timeUnit; /**<     Time units for the duration data */
+       unsigned char timeInterval; /**< Time interval */
+} TelSatDurationInfo_t;
+
+/**
+ * @brief The structure type defining the menu item data object.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char itemId; /**< Item identifier */
+       unsigned char textLen; /**< Text length */
+       unsigned char text[TAPI_SAT_ITEM_TEXT_LEN_MAX + 1]; /**< Text information */
+} TelSatMenuItemInfo_t;
+
+/**
+ * @brief The structure type defining the item identifier object.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char selectedItemIdentifier; /**< Selected item identifier     */
+} TelSatItemIdentifierInfo_t;
+
+/**
+ * @brief The structure type defining expected user response length.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char min; /**< User response length's minimum value */
+       unsigned char max; /**< User response length's maximum value */
+} TelSatRespLenInfo_t;
+
+/**
+ * @brief The structure type defining the result data object.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatResultType_t generalResult; /**< General result */
+       TelSatMeProblemType_t meProblem; /**< Additional information on the general result */
+} TelSatResultInfo_t;
+
+/**
+ * @brief The structure type defining the RESULT data object.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatSmsTpduType_t tpduType; /**< SMS TPDU TYPE */
+       unsigned char dataLen; /**<     SMS TPDU DATA LENGTH */
+       unsigned char data[TAPI_SAT_SMS_TPDU_SMS_DATA_LEN_MAX]; /**< SMS TPDU DATA */
+} TelSatSmsTpduInfo_t;
+
+/**
+ * @brief The structure type defining the SS STRING data object.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSimTypeOfNum_t ton; /**<     Type of number */
+       TelSimNumberingPlanIdentity_t npi; /**< Number plan identity */
+       unsigned char stringLen; /**< SS string length */
+       char string[TAPI_SAT_SS_STRING_LEN_MAX]; /**< SS string */
+} TelSatSsStringInfo_t;
+
+/**
+ * @brief The structure type defining the TEXT STRING data object.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int bIsDigitOnly; /**< Flag for checking whether only digits are used */
+       TelSatDataCodingSchemeInfo_t dcs; /**< Data coding scheme */
+       unsigned short stringLen; /**< Text length */
+       char string[TAPI_SAT_TEXT_STRING_LEN_MAX + 1]; /**<     Text string */
+} TelSatTextTypeInfo_t;
+
+/**
+ * @brief The structure type defining the menu item text object.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int bIsDigitOnly; /**< Flag for checking whether only digits are used */
+       TelSatDataCodingSchemeInfo_t dcs; /**< Data coding scheme */
+       unsigned char stringLen; /**< Menu item string length */
+       char* pString; /**<     Menu item string */
+} TelSatMenuItemTextInfo_t;
+
+/**
+ * @brief The structure type defining the tone object.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatToneType_t type; /**<     Tone type */
+} TelSatToneInfo_t;
+
+/**
+ * @brief The structure type defining the USSD string data object.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatDataCodingSchemeInfo_t dcs; /**< Data coding scheme */
+       unsigned char ussdStringLen; /**< USSD string length */
+       char ussdString[TAPI_SAT_USSD_STRING_LEN_MAX]; /**<     USSD string     */
+} TelSatUssdStringInfo_t;
+
+/**
+ * @brief The structure type defining the file list data object.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char fileCount; /**< File count */
+//     TelSimFileName_t fileId[TAPI_SAT_FILE_ID_LIST_MAX_COUNT]; /**< File identifier */
+} TelSatFileListInfo_t;
+
+/**
+ * @brief The structure type defining the default text data object.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int bIsPresent; /**< Flag for checking whether default text exists */
+       int bIsDigitOnly; /**< Flag for checking whether only digits are used */
+       TelSatDataCodingSchemeInfo_t dcs; /**< Data coding scheme */
+       unsigned char stringLen; /**< Default text string length */
+       char string[TAPI_SAT_TEXT_STRING_LEN_MAX]; /**< Default text */
+} TelSatDefaultTextInfo_t;
+
+/**
+ * @brief The structure type defining the Next Action Indicator List data object.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char listCount; /**< Next action identifier count */
+       unsigned char list[TAPI_SAT_ITEMS_NEXT_ACTION_INDI_LIST_MAX_COUNT]; /**< Next action identifier list */
+} TelSatItemsNextActionIndiListInfo_t;
+
+/**
+ * @brief The structure type defining the event list data object.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char eventListCount; /**< Event list count     */
+       TelSatEventDownloadType_t list[TAPI_SAT_EVENT_LIST_MAX_COUNT]; /**<     Event list */
+} TelSatEventListInfo_t;
+
+/**
+ * @brief The structure type defining the icon info object.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char width; /**< Icon width */
+       unsigned char height; /**< Icon height */
+       TelSatImageCodingSchemeType_t ics; /**< Image coding scheme */
+       unsigned short iconDataLen; /**< Icon data length */
+       unsigned short clutDataLen; /**< Clut data length */
+       char iconFile[TAPI_SAT_IMG_DATA_FILE_PATH_LEN_MAX];     /**< TBD */
+       char clutFile[TAPI_SAT_IMG_DATA_FILE_PATH_LEN_MAX];     /**< TBD */
+} TelSatIconInfo_t;
+
+/**
+ * @brief The structure type defining the icon data object.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int bIsPresent; /**< Flag for checking whether the icon identifier exists */
+       TelSatIconQualifierType_t iconQualifier; /**< Icon qualifier type */
+       unsigned char iconIdentifier; /**< Icon identifier */
+       TelSatIconInfo_t iconInfo; /**< Icon info */
+} TelSatIconIdentifierInfo_t;
+
+/**
+ * @brief The structure type defining the icon identifier data object.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int bIsPresent; /**< Flag for checking whether the icon identifier exists */
+       TelSatIconQualifierType_t iconListQualifier; /**< Icon list qualifier */
+       unsigned char iconCount; /**< Icon count */
+       unsigned char iconIdentifierList[TAPI_SAT_ICON_LIST_MAX_COUNT]; /**< Icon identifier list */
+       TelSatIconInfo_t iconInfo[TAPI_SAT_ICON_LIST_MAX_COUNT]; /**< Icon list info */
+} TelSatIconIdentifierListInfo_t;
+
+/**
+ * @brief The structure type defining SAT BC repeat indicator info.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatBcRepeatIndicatorType_t indType; /**<     BC repeat indicator type */
+} TelSatBcRepeatIndicatorInfo_t;
+
+/**
+ * @brief The structure type defining call control strings.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatCallCtrlStringType_t callCtrlStringType; /**<     Call control type */
+       union {
+               TelSatAddressInfo_t voiceString; /**< Voice call string */
+               TelSatSsStringInfo_t ssString; /**<     SS string */
+               TelSatUssdStringInfo_t ussdString; /**< USSD string     */
+       } u; /**< Union */
+} TelSatCallCtrlAddressStringInfo_t;
+
+/**
+ * @brief The structure type defining action requested call control data.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatCallCtrlAddressStringInfo_t callCtrlAddString; /**< Call control address string */
+       TelSatCapaConfigParamInfo_t ccp1; /**< Capability configuration parameter 1 */
+       TelSatSubAddressInfo_t subAddress; /**< Subaddress */
+       TelSatAlphaIdentifierInfo_t alphaId; /**< Alpha identifier */
+       TelSatBcRepeatIndicatorInfo_t bcRepeatIndicator; /**< BC repeat indicator */
+       TelSatCapaConfigParamInfo_t ccp2; /**< Capability configuration parameter 2 */
+} TelSatCallCtrlRequestedActionInfo_t;
+
+/**
+ * @brief The structure type defining the DTMF string data object.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char stringLen; /**< DTMF string length */
+       char dtmfTone[TAPI_SAT_DTMF_STRING_LEN_MAX]; /**< DTMF tone data */
+} TelSatDtmfStringInfo_t;
+
+/**
+ * @brief The structure type defining the language data object.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatLanguageType_t language; /**< Language type */
+} TelSatLanguageInfo_t;
+
+/**
+ * @brief The structure type defining the date time and time zone data object.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char year; /**< Year */
+       unsigned char month; /**< Month */
+       unsigned char day; /**< Day     */
+       unsigned char hour; /**< Hour */
+       unsigned char minute; /**< Minute */
+       unsigned char second; /**< Second */
+       unsigned char timeZone; /**< TimeZone */
+} TelSatDataTimeZoneInfo_t;
+
+/**
+ * @brief The structure type defining SAT browser identities.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatBrowserIdentityType_t browserIdentity; /**< Browser identity */
+} TelSatBrowserIdentitiesInfo_t;
+
+/**
+ * @brief The structure type defining the SAT browser URL data object.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       char string[TAPI_SAT_URL_LEN_MAX + 1]; /**< URL string */
+} TelSatUrlInfo_t;
+
+/**
+ * @brief The structure type defining the SAT bearer type.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char listLen; /**<     Bearer list length      */
+       TelSatBearerType_t bearerList[TAPI_SAT_BEARER_LIST_MAX_COUNT]; /**<     Bearer list     */
+} TelSatBearerInfo_t;
+
+/**
+ * @brief The structure type defining the SAT provisioning reference.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       char provisioningFilePath[TAPI_SAT_PROVISIONING_FILE_PATH_LEN_MAX]; /**< Provisioning file path */
+} TelSatProvisioningRefInfo_t;
+
+/**
+ * @brief The structure type defining the SAT browser termination cause.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatBrowserTerminationCauseType_t cause; /**< Browser termination cause */
+} TelSatBrowserTerminationCauseInfo_t;
+
+/**
+ * @brief The structure type defining SAT CSD bearer parameters.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatBearerParamCsdDataRateType_t dataRate; /**< Bearer CSD data rate */
+       TelSatBearerParamCsdBearerServiceType_t bearerService; /**< Bearer CSD service type     */
+       TelSatBearerParamCsdConnectionElementType_t connectionElement; /**<     Bearer connection element type */
+} TelSatBearerParametersCsdInfo_t;
+
+/**
+ * @brief The structure type defining SAT GPRS bearer parameters.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatBearerParamGprsPrecedenceClassType_t precedenceClass; /**< Bearer GPRS precedence class */
+       TelSatBearerParamGprsDelayClassType_t delayClass; /**< Bearer GPRS delay */
+       TelSatBearerParamGprsReliabilityClassType_t reliabilityClass; /**< Bearer GPRS reliability */
+       TelSatBearerParamGprsPeakThroughputClassType_t peakThroughputClass;/**< Bearer peak throughput */
+       TelSatBearerParamGprsMeanThroughputClassType_t meanThroughputClass;/**< Bearer GPRS mean throughput     */
+       TelSatBearerParamGprsPdpType_t pdpType; /**<    bearer gprs pdp type    */
+} TelSatBearerParametersGprsInfo_t;
+
+/**
+ * @brief The structure type defining SAT local links bearer parameters.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatBearerParamLocalLinksServiceIdentityType_t serviceIdentifier; /**< Bearer local link service identifier */
+       char serviceRecord[TAPI_SAT_BEARER_PARAMS_LEN_MAX]; /**< Bearer local link service record */
+} TelSatBearerParametersLocalLinksInfo_t;
+
+/**
+ * @brief The structure type defining the SAT bearer description.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatBearerDescType_t bearerType; /**< Bearer type     */
+       union {
+               TelSatBearerParametersCsdInfo_t bearerParamsCsd; /**< CSD */
+               TelSatBearerParametersGprsInfo_t bearerParamsGprs; /**< GPRS */
+               TelSatBearerParametersLocalLinksInfo_t bearerParamsLocalLinks; /**<     Local link */
+       } bearer_params; /**< Union */
+} TelSatBearerDescriptionInfo_t;
+
+/**
+ * @brief The structure type defining SAT channel data.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char channelDataStringLen; /**< Channel data length */
+       char channelDataString[TAPI_SAT_CHANNEL_DATA_STRING_LEN_MAX]; /**< Channel data */
+} TelSatChannelDataInfo_t;
+
+/**
+ * @brief The structure type defining the SAT channel data length.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char channelDataLen; /**< Channel data length */
+} TelSatChannelDataLengthInfo_t;
+
+/**
+ * @brief The structure type defining the SAT buffer size.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char bufferSize[2]; /**< Channel data buffer size */
+} TelSatBufferSizeInfo_t;
+
+/**
+ * @brief The structure type defining the SAT channel status.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char channelId; /**< Channel ID */
+       TelSatChannelStatusType_t status; /**< Channel status */
+       TelSatChannelStatusInfoType_t channelInfo; /**< Channel status info */
+} TelSatChannelStatusInfo_t;
+
+/**
+ * @brief The structure type defining another SAT address.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatAddressType_t addressType; /**< Channel address type */
+       unsigned char addressLen; /**< Channel address length */
+       char address[TAPI_SAT_OTHER_ADDR_LEN_MAX]; /**< Channel address */
+} TelSatOtherAddressInfo_t;
+
+/**
+ * @brief The structure type defining the SIM ME interface transport level.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatTransportProtocolType_t transportProtocolType; /**< Transport protocol type */
+       unsigned short portNumber; /**< Port number     */
+} TelSatSimMeInterfaceTransportLevelInfo_t;
+
+/**
+ * @brief The structure type defining the SAT network access name.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char length; /**< Network access name length */
+       unsigned char netAccName[TAPI_SAT_NET_ACC_NAM_LEN_MAX]; /**< Network access name */
+} TelSatnetworkAccessNameInfo_t;
+
+/**
+ * @brief The structure type defining the SAT aid.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       char aid[TAPI_SAT_AID_LEN_MAX]; /**< Application ID     */
+} TelSatAidInfo_t;
+
+/**
+ * @brief The structure type defining the SAT remote entity address.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatRemoteEntityAddrCodingType_t codingType; /**<     Remote entity address coding type */
+       unsigned short length; /**<     Remote entity address length */
+       unsigned char remoteEntityAddress[TAPI_SAT_REMOTE_ENTITY_ADDR_LEN_MAX]; /**< Remote entity address data */
+} TelSatRemoteEntityAddressInfo_t;
+
+/**
+ * @brief The structure type defining the SAT text attribute.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char textFormatting[4]; /**< Text attribute - e.g. bold, center align, and so on */
+} TelSatTextAttributeInfo_t;
+
+/**
+ * @brief The structure type defining the SAT text attribute list.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned int listCount; /**< Text attribute list count */
+       TelSatTextAttributeInfo_t list[TAPI_SAT_ITEM_TEXT_ATTRIBUTES_LIST_MAX_COUNT]; /**< Text attribute list info     */
+} TelSatTextAttributeListInfo_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TEL_SAT_OBJ_H_ */
+
+/**
+ * @}
+ */
diff --git a/include/TelSatProactvCmd.h b/include/TelSatProactvCmd.h
new file mode 100644 (file)
index 0000000..722fcb0
--- /dev/null
@@ -0,0 +1,764 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file TelSatProactvCmd.h
+ */
+
+/**
+ * @internal
+ * @addtogroup CAPI_TELEPHONY_SERVICE_SAT
+ * @{
+ */
+
+#ifndef _TEL_SAT_PROACTV_CMD_H_
+#define _TEL_SAT_PROACTV_CMD_H_
+
+#include <TelSatObj.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @brief Definition for the max count of SAT menu items.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_MENU_ITEM_COUNT_MAX                   40
+/**
+ * @brief Definition for the max count of SAT provisioning reference.
+ * @since_tizen 2.3
+ */
+#define TAPI_SAT_PROVISIONING_REF_MAX_COUNT            10
+
+/**
+ * @brief The structure type containing the data objects for DISPLAY TEXT proactive command indication.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**< Command detail info. It includes command number, type, and qualifier */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     Device identities info. It includes source and destination devices */
+} TelSatMoreTimeIndInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for DISPLAY TEXT proactive command indication.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**< Command detail info. It includes command number, type, and qualifier */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     Device identities info. It includes source and destination devices */
+       TelSatTextTypeInfo_t text; /**< Display text info */
+       TelSatIconIdentifierInfo_t iconId; /**< Icon identifier info */
+       int bImmediateRespRequested; /**< Flag for checking whether immediate response is required */
+       TelSatDurationInfo_t duration; /**<     Duration for which text should be displayed     */
+       TelSatTextAttributeInfo_t textAttribute; /**< Text attribute info - e.g. bold, center align, and so on */
+} TelSatDisplayTextIndInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for GET INKEY proactive command indication.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**< Command detail info. It includes command number, type, and qualifier */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     Device identities info. It includes source and destination devices      */
+       TelSatTextTypeInfo_t text; /**< Display text info */
+       TelSatIconIdentifierInfo_t iconId; /**< Icon identifier info */
+       TelSatDurationInfo_t duration; /**<     Duration for which text should be displayed     */
+       TelSatTextAttributeInfo_t textAttribute; /**< Text attribute info - e.g. bold, center align     */
+} TelSatGetInkeyIndInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for GET INPUT proactive command indication.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**< Command detail info. It includes command number, type, and qualifier */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     Device identities info. It includes source and destination devices */
+       TelSatTextTypeInfo_t text; /**< Display text info */
+       TelSatRespLenInfo_t respLen; /**< Input response length */
+       TelSatTextTypeInfo_t defaultText; /**< Default text info */
+       TelSatIconIdentifierInfo_t iconId; /**< Icon identifier info */
+       TelSatTextAttributeInfo_t textAttribute; /**< Text attribute info - e.g. bold, center align     */
+} TelSatGetInputIndInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for PLAY TONE proactive command indication.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**< Command detail info. It includes command number, type, and qualifier */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     Device identities info. It includes source and destination devices */
+       TelSatAlphaIdentifierInfo_t alphaId; /**< Alpha identifier(string) info */
+       TelSatToneInfo_t tone; /**<     Tone info */
+       TelSatDurationInfo_t duration; /**<     Duration for which tone should be played */
+       TelSatIconIdentifierInfo_t iconId; /**< Icon identifier info */
+       TelSatTextAttributeInfo_t textAttribute; /**< Text attribute info - e.g. bold, center align     */
+} TelSatPlayToneIndInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for SETUP MENU proactive command indication.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**< Command detail info. It includes command number, type, and qualifier */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     Device identities info. It includes source and destination devices      */
+       TelSatAlphaIdentifierInfo_t alphaId; /**< Alpha identifier(string) info */
+       unsigned char menuItemCount; /**< Count of menu items */
+       TelSatMenuItemInfo_t menuItem[TAPI_SAT_MENU_ITEM_COUNT_MAX]; /**< Menu item data */
+       TelSatItemsNextActionIndiListInfo_t itemNextActionIndList; /**< Next action indication list     */
+       TelSatIconIdentifierInfo_t iconId; /**< Icon identifier info */
+       TelSatIconIdentifierListInfo_t iconIdList; /**< Icon identifier list info */
+       TelSatTextAttributeInfo_t textAttribute; /**< Text attribute info - e.g. bold, center align     */
+       TelSatTextAttributeListInfo_t itemTextAttributeList; /**< Item text attribute list */
+} TelSatSetupMenuIndInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for SELECT ITEM proactive command indication data.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**< Command detail info. It includes command number, type, and qualifier */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     Device identities info. It includes source and destination devices */
+       TelSatAlphaIdentifierInfo_t alphaId; /**< Alpha identifier(string) info */
+       TelSatItemsNextActionIndiListInfo_t itemNextActionIndList; /**< Next action indication list     */
+       unsigned char defaultItemIdentifier; /**< Default item identifier(default selected item ID)     */
+       TelSatIconIdentifierInfo_t iconId; /**< Icon identifier info */
+       TelSatIconIdentifierListInfo_t iconIdList; /**< Icon identifier list info */
+       TelSatTextAttributeInfo_t textAttribute; /**< Text attribute info - e.g. bold, center align     */
+       TelSatTextAttributeListInfo_t itemTextAttributeList; /**< Item text attribute list */
+       unsigned char menuItemCount; /**< Count of menu items */
+       TelSatMenuItemInfo_t menuItem[TAPI_SAT_MENU_ITEM_COUNT_MAX]; /**< Menu item data */
+} TelSatSelectItemIndInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for SEND SHORT MESSAGE proactive command indication.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**< Command detail info. It includes command number, type, and qualifier      */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     Device identities info. It includes source and destination devices      */
+       TelSatAlphaIdentifierInfo_t alphaId; /**< Alpha identifier(string) info */
+       TelSatAddressInfo_t address; /**< Address for sending SMS */
+       TelSatSmsTpduInfo_t smsTpdu; /**< SMS TPDU info */
+       TelSatIconIdentifierInfo_t iconId; /**< Icon identifier info */
+       TelSatTextAttributeInfo_t textAttribute; /**< Text attribute info - e.g. bold, center align     */
+} TelSatSendSmsIndInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for SEND SS proactive command indication.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**< Command detail info. It includes command number, type, and qualifier      */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     Device identities info. It includes source and destination devices      */
+       TelSatAlphaIdentifierInfo_t alphaId; /**< Alpha identifier(string) info */
+       TelSatSsStringInfo_t ssString; /**< SS string */
+       TelSatIconIdentifierInfo_t iconId; /**< Icon identifier info */
+       TelSatTextAttributeInfo_t textAttribute; /**< Text attribute info - e.g. bold, center align     */
+} TelSatSendSsIndInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for SEND USSD proactive command indication.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**< Command detail info. It includes command number, type, and qualifier */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     Device identities info. It includes source and destination devices      */
+       TelSatAlphaIdentifierInfo_t alphaId; /**< Alpha identifier(string) info */
+       TelSatUssdStringInfo_t ussdString; /**< USSD string info */
+       TelSatIconIdentifierInfo_t iconId; /**< Icon identifier info */
+       TelSatTextAttributeInfo_t textAttribute; /**< Text attribute info - e.g. bold, center align     */
+} TelSatSendUssdIndInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for SETUP CALL proactive command indication.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**< Command detail info. It includes command number, type, and qualifier      */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     Device identities info. It includes source and destination devices      */
+       TelSatAddressInfo_t address; /**< Setup call address info */
+       TelSatCapaConfigParamInfo_t ccp; /**< Capability configuration parameter */
+       TelSatSubAddressInfo_t subAddress; /**< Setup call sub address */
+       TelSatDurationInfo_t duration; /**<     Command execution time duration */
+       TelSatAlphaIdentifierInfo_t userConfirmPhaseAlphaId;/**< User Confirmation Phase Alpha ID */
+       TelSatAlphaIdentifierInfo_t callSetupPhaseAlphaId; /**< Call Setup Phase Alpha ID */
+       TelSatIconIdentifierInfo_t userConfirmPhaseIconId; /**< User Confirmation Phase Icon ID */
+       TelSatIconIdentifierInfo_t callSetupPhaseIconId; /**< Call Setup Phase Icon ID */
+       TelSatTextAttributeInfo_t userConfirmPhaseTextAttribute; /**< User Confirmation Phase Text Attribute */
+       TelSatTextAttributeInfo_t callSetupPhaseTextAttribute; /**<     Call Setup Phase Text Attribute */
+} TelSatSetupCallIndInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for REFRESH proactive command indication.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**< Command detail info. It includes command number, type, and qualifier */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     Device identities info. It includes source and destination devices */
+       TelSatFileListInfo_t fileList; /**<     File list for refresh */
+       TelSatAidInfo_t aid; /**< Application ID */
+} TelSatRefreshIndInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for PROVIDE LOCAL INFO proactive command indication.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**< Command detail info. It includes command number, type, and qualifier */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     Device identities info. It includes source and destination devices      */
+
+} TelSatProvideLocalInfoIndInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for SETUP EVENT LIST proactive command indication data.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**< Command detail info. It includes command number, type, and qualifier      */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     Device identities info. It includes source and destination devices      */
+       TelSatEventListInfo_t eventList; /**< Event list structure type containing events which are required by the USIM application */
+
+} TelSatSetupEventListIndInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for SETUP IDLE MODE TEXT proactive command indication.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**< Command detail info. It includes command number, type, and qualifier      */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     Device identities info. It includes source and destination devices      */
+       TelSatTextTypeInfo_t text; /**< Text to be shown on an idle screen      */
+       TelSatIconIdentifierInfo_t iconId; /**< Icon identifier info */
+       TelSatTextAttributeInfo_t textAttribute; /**< Text attribute info - e.g. bold, center align     */
+} TelSatSetupIdleModeTextIndInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for SEND DTMF COMMAND proactive command indication.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**< Command detail info. It includes command number, type, and qualifier      */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     Device identities info. It includes source and destination devices      */
+       TelSatAlphaIdentifierInfo_t alphaId; /**< Alpha identifier(string) info */
+       TelSatDtmfStringInfo_t dtmfString; /**< DTMF string     */
+       TelSatIconIdentifierInfo_t iconId; /**< Icon identifier info */
+       TelSatTextAttributeInfo_t textAttribute; /**< Text attribute info - e.g. bold, center align     */
+} TelSatSendDtmfIndInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for LANGUAGE NOTIFICATION proactive command indication.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**< Command detail info. It includes command number, type, and qualifier      */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     Device identities info. It includes source and destination devices      */
+       TelSatLanguageInfo_t language; /**<     Language info from the USIM application */
+} TelSatLanguageNotificationIndInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for LAUNCH BROWSER proactive command indication.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**< Command detail info. it includes command number, type, and qualifier      */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     Device identities info. It includes source and destination devices      */
+       TelSatBrowserIdentitiesInfo_t browserId; /**< Browser identity  */
+       TelSatUrlInfo_t url; /**< URL */
+       TelSatBearerInfo_t bearer; /**< Bearer which is used by the browser     */
+       unsigned char provisioningRefCount; /**< Provisioning reference count */
+       TelSatProvisioningRefInfo_t provisioningRef[TAPI_SAT_PROVISIONING_REF_MAX_COUNT]; /**< Provisioning reference data */
+       TelSatTextTypeInfo_t text; /**< Display text info */
+       TelSatAlphaIdentifierInfo_t alphaId; /**< Alpha identifier(string) info */
+       TelSatIconIdentifierInfo_t iconId; /**< Icon identifier info */
+       TelSatTextAttributeInfo_t textAttribute; /**< Text attribute info - e.g. bold, center align     */
+} TelSatLaunchBrowserIndInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for OPEN CHANNEL CSB proactive command indication data.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatAddressInfo_t address; /**< Channel address */
+       TelSatSubAddressInfo_t subAddress; /**< Channel sub address     */
+       TelSatDurationInfo_t duration1; /**< Connection require time */
+       TelSatDurationInfo_t duration2; /**< Connection require time 2 */
+       TelSatBearerParametersCsdInfo_t bearerParamsCsd; /**< CSD info */
+       TelSatBufferSizeInfo_t bufferSize; /**< Buffer size     */
+       TelSatOtherAddressInfo_t otherAddress; /**<     Other address */
+       TelSatTextTypeInfo_t userLogin; /**< User login */
+       TelSatTextTypeInfo_t userPassword; /**< User password */
+       TelSatSimMeInterfaceTransportLevelInfo_t simMeInterfaceTransportLevel; /**<     SIM ME interface transport level */
+       TelSatOtherAddressInfo_t dataDestinationAddress; /**< Data destination address  */
+} TelSatOpenChannelCsbInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for OPEN CHANNEL (packet) proactive command indication data.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatBearerParametersGprsInfo_t bearerParamsGprs; /**< GPRS info */
+       TelSatBufferSizeInfo_t bufferSize; /**< Buffer size     */
+       TelSatnetworkAccessNameInfo_t networkAccessName; /**< Network access name */
+       TelSatOtherAddressInfo_t otherAddress; /**<     Other address */
+       TelSatTextTypeInfo_t userLogin; /**< User login */
+       TelSatTextTypeInfo_t userPassword; /**< User password */
+       TelSatSimMeInterfaceTransportLevelInfo_t simMeInterfaceTransportLevel; /**<     SIM ME interface transport level */
+       TelSatOtherAddressInfo_t dataDestinationAddress; /**< Data destination address  */
+       TelSatTextAttributeInfo_t textAttribute; /**< Text attribute info - e.g. bold, center align     */
+} TelSatOpenChannelpdbInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for OPEN CHANNEL LOCAL LINK proactive command indication data.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatDurationInfo_t duration1; /**< Command execution time duration1 */
+       TelSatDurationInfo_t duration2; /**< Command execution time duration2 */
+       TelSatBearerParametersLocalLinksInfo_t bearerParamsLocalLinks; /**<     Local link info */
+       TelSatBufferSizeInfo_t bufferSize; /**< Buffer size     */
+       TelSatTextTypeInfo_t userPassword; /**< User password */
+       TelSatSimMeInterfaceTransportLevelInfo_t simMeInterfaceTransportLevel; /**<     SIM ME interface transport level */
+       TelSatOtherAddressInfo_t dataDestinationAddress; /**< Data destination address */
+       TelSatRemoteEntityAddressInfo_t remoteEntityAddress; /**< Remote entity address */
+       TelSatTextAttributeInfo_t textAttribute; /**< Text attribute info - e.g. bold, center align     */
+} TelSatOpenChannelLocalBearerInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for OPEN CHANNEL (DEFAULT BEARER) proactive command indication data.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatBufferSizeInfo_t bufferSize; /**< Buffer size     */
+       TelSatOtherAddressInfo_t otherAddress; /**<     Other address */
+       TelSatTextTypeInfo_t userLogin; /**< User login */
+       TelSatTextTypeInfo_t userPassword; /**< User password */
+       TelSatSimMeInterfaceTransportLevelInfo_t simMeInterfaceTransportLevel;/**< SIM ME interface transport level     */
+       TelSatOtherAddressInfo_t dataDestinationAddress; /**< Data destination address */
+} TelSatOpenChannelDefaultBearerInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for OPEN CHANNEL (UICC Server Mode) proactive command indication data.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatBufferSizeInfo_t bufferSize; /**< Buffer size     */
+       TelSatSimMeInterfaceTransportLevelInfo_t simMeInterfaceTransportLevel; /**<     SIM ME interface transport level */
+} TelSatOpenChannelUiccServerModeInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for OPEN CHANNEL proactive command indication data.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**< Command detail info. It includes command number, type, and qualifier */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     Device identities info. It includes source and destination devices */
+       int bIsUiccServerMode; /**<     Flag that indicates whether UICC server mode is active */
+       TelSatBearerDescType_t bearerType; /**< Bearer destination type */
+       TelSatAlphaIdentifierInfo_t alphaId; /**< Alpha identifier(string) info */
+       TelSatIconIdentifierInfo_t iconId; /**< Icon identifier info */
+       union {
+               TelSatOpenChannelCsbInfo_t csBearer; /**< CS info */
+               TelSatOpenChannelpdbInfo_t pdBearer; /**< PBD info */
+               TelSatOpenChannelLocalBearerInfo_t locBearer; /**< Local link info */
+               TelSatOpenChannelDefaultBearerInfo_t defaultBearer; /**< Default bearer */
+               TelSatOpenChannelUiccServerModeInfo_t uiccServerMode; /**< UICC server mode     */
+       } details; /**< Open Channel Details */
+} TelSatOpenChannelIndInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for CLOSE CHANNEL proactive command indication data.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**< Command detail info. It includes command number, type, and qualifier */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     Device identities info. It includes source and destination devices */
+       TelSatAlphaIdentifierInfo_t alphaId; /**< Alpha identifier(string) info */
+       TelSatIconIdentifierInfo_t iconId; /**< Icon identifier info */
+       TelSatTextAttributeInfo_t textAttribute; /**< Text attribute info - e.g. bold, center align     */
+} TelSatCloseChannelIndInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for RECEIVE DATA proactive command indication data.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**< Command detail info. It includes command number, type, and qualifier */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     Device identities info. It includes source and destination devices */
+       TelSatAlphaIdentifierInfo_t alphaId; /**< Alpha identifier(string) info */
+       TelSatIconIdentifierInfo_t iconId; /**< Icon identifier info */
+       TelSatChannelDataLengthInfo_t channelDataLen; /**< Channel data length */
+} TelSatReceiveDataIndInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for SEND DATA proactive command indication data.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**< Command detail info. It includes command number, type, and qualifier */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     Device identities info. It includes source and destination devices */
+       TelSatAlphaIdentifierInfo_t alphaId; /**< Alpha identifier(string) info */
+       TelSatIconIdentifierInfo_t iconId; /**< Icon identifier info */
+       TelSatChannelDataInfo_t channel_data; /**< Channel data for sending     */
+} TelSatSendDataIndInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for GET CHANNEL STATUS proactive command indication data.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**< Command detail info. It includes command number, type, and qualifier */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     Device identities info. It includes source and destination devices */
+} TelSatGetChannelStatusIndInfo_t;
+
+/**
+ * @brief The structure type containing the data object for END PROACTIVE SESSION command indication.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatCommandType_t commandType; /**<   proactive command type  */
+} TelSatEndProactiveSessionIndInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for PROACTIVE command indication union data.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       union {
+               TelSatMoreTimeIndInfo_t moreTime;       /**< TBD */
+               TelSatDisplayTextIndInfo_t displayText; /**< Parsed proactive command info from TLV to Telephony data type - display text */
+               TelSatGetInkeyIndInfo_t getInkey; /**< Parsed proactive command info from TLV to Telephony data type - getInkey */
+               TelSatGetInputIndInfo_t getInput; /**< Parsed proactive command info from TLV to Telephony data type - getInput */
+               TelSatPlayToneIndInfo_t playTone; /**< Parsed proactive command info from TLV to Telephony data type - play tone */
+               TelSatSetupMenuIndInfo_t setupMenu; /**< Parsed proactive command info from TLV to Telephony data type - setup menu     */
+               TelSatSelectItemIndInfo_t selectItem; /**< Parsed proactive command info from TLV to Telephony data type - select item */
+               TelSatSendSmsIndInfo_t sendSms; /**< Parsed proactive command info from TLV to Telephony data type - send SMS */
+               TelSatSendSsIndInfo_t sendSs; /**< Parsed proactive command info from TLV to Telephony data type - send SS */
+               TelSatSendUssdIndInfo_t sendUssd; /**< Parsed proactive command info from TLV to Telephony data type - send USSD */
+               TelSatSetupCallIndInfo_t setupCall; /**< Parsed proactive command info from TLV to Telephony data type - setup call     */
+               TelSatRefreshIndInfo_t refresh; /**< Parsed proactive command info from TLV to Telephony data type - refresh */
+               TelSatProvideLocalInfoIndInfo_t provideLocInfo; /**< Parsed proactive command info from TLV to Telephony data type - provide local info */
+               TelSatLaunchBrowserIndInfo_t launchBrowser; /**< Parsed proactive command info from TLV to Telephony data type - launch browser */
+               TelSatSetupIdleModeTextIndInfo_t idleText; /**< Parsed proactive command info from TLV to Telephony data type - setup idle mode text */
+               TelSatSendDtmfIndInfo_t sendDtmf; /**< Parsed proactive command info from TLV to Telephony data type - send DTMF */
+               TelSatLanguageNotificationIndInfo_t languageNotification;/**< Parsed proactive command info from TLV to Telephony data type - language notification     */
+               TelSatSetupEventListIndInfo_t setupEventList; /**< Parsed proactive command info from TLV to Telephony data type - setup event list     */
+               TelSatOpenChannelIndInfo_t openChannel; /**< Parsed proactive command info from TLV to Telephony data type - open channel */
+               TelSatCloseChannelIndInfo_t closeChannel; /**< Parsed proactive command info from TLV to Telephony data type - close channel */
+               TelSatReceiveDataIndInfo_t receiveData; /**< Parsed proactive command info from TLV to Telephony data type - receive data */
+               TelSatSendDataIndInfo_t sendData; /**< Parsed proactive command info from TLV to Telephony data type - send data */
+               TelSatGetChannelStatusIndInfo_t getChannelStatus; /**< Parsed proactive command info from TLV to Telephony data type - get channel status */
+       } cmdInfo; /**< Union   */
+} TelSatProactiveCmdData_t;
+
+/**
+ * @brief The structure type containing the data objects for the Terminal Response of the DISPLAY TEXT proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< Result that indicates whether the current proactive command request is executed successfully */
+} TelSatDisplayTextRespInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for the Terminal Response of the GET INKEY proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< Result that indicates whether the current proactive command request is executed successfully */
+       TelSatTextTypeInfo_t text; /**< Inserted key info */
+       TelSatDurationInfo_t duration;  /**< TBD */
+} TelSatGetInkeyRespInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for the Terminal Response of the PLAY TONE proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< Result that indicates whether the current proactive command request is executed successfully */
+} TelSatPlayToneRespInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for the Terminal Response of the MORE TIME proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< Result that whether the current proactive command request is executed successfully */
+} TelSatMoreTimeRespInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for the Terminal Response of the SETUP MENU proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< Result that indicates whether the current proactive command request is executed successfully */
+} TelSatSetupMenuRespInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for the Terminal Response of the GET INPUT proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< Result that indicates whether the current proactive command request is executed successfully */
+       TelSatTextTypeInfo_t text; /**< Inserted string info */
+} TelSatGetInputRespInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for the Terminal Response of the SELECT ITEM proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< Result that indicates whether the current proactive command request is executed successfully */
+       int bOtherInfo; /**< Flag to check whether other information is required */
+       unsigned char itemIdentifier; /**< Item identifier */
+} TelSatSelectItemRespInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for the Terminal Response of the PROVIDE LOCAL INFORMATION proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< Result that indicates whether the current proactive command request is executed successfully */
+       int bOtherInfo; /**< Flag to check whether other information is required */
+       TelSatCmdQualiProvideLocalInfo_t infoType; /**< Local info type - e.g. time zone or language info, and so on */
+       union {
+               TelSatDataTimeZoneInfo_t timeZoneInfo; /**<     Current time zone info */
+               TelSatLanguageInfo_t languageInfo; /**< Current ME language setting info */
+       } u; /**<       Union   */
+} TelSatProvideLocalInfoRespInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for the Terminal Response of the SETUP EVENT LIST proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< Result that indicates whether the current proactive command request is executed successfully */
+} TelSatSetupEventListRespInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for the Terminal Response of the SEND SMS proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< Result that indicates whether the current proactive command request is executed successfully */
+       TelSatCallCtrlProblemType_t additionalCallCtrlProblemInfo; /**< Call control problem */
+} TelSatSendSmsRespInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for the Terminal Response of the SET UP CALL proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< Result that indicates whether the current proactive command request is executed successfully */
+       int bOtherInfo; /**< Flag to check whether other information is required */
+       TelSatNetworkProblemType_t networkProblem; /**< Network problem during setup call */
+       TelSatCallCtrlProblemType_t permanentCallCtrlProblem; /**<      Permanent call control problem  */
+       TelSatCallCtrlRequestedActionInfo_t callCtrlRequestedAction; /**< Call control requested action info */
+       TelSatResultInfo_t result2; /**< Additional response on general result */
+       TelSatTextTypeInfo_t text; /**< Text string info */
+       int bIsTapiCause; /**< Flag to check whether tapi causes problems */
+       unsigned long tapiCause; /**< Tapi call level cause */
+       unsigned long tapiSsCause; /**< Tapi SS level cause */
+} TelSatSetupCallRespInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for the Terminal Response of the SEND SS proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< Result that indicates whether the current proactive command request is executed successfully */
+       int bOtherInfo; /**< Flag to check whether other information is required */
+       TelSatSsProblemType_t additionalSsProblemInfo; /**<     Additional SS problem */
+       TelSatCallCtrlProblemType_t additionalCallCtrlProblemInfo; /**< Additional call control problem */
+       TelSatCallCtrlRequestedActionInfo_t callCtrlRequestedAction; /**< Call control requested action info */
+       TelSatResultInfo_t result2; /**< Additional response on general result */
+       TelSatTextTypeInfo_t text; /**< Text string info */
+} TelSatSendSsRespInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for the Terminal Response of the SEND USSD proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< Result that indicates whether the current proactive command request is executed successfully */
+       int bOtherInfo; /**< Flag to check whether other information is required */
+       TelSatUssdProblemType_t additionalUssdProblemInfo; /**< Additional USSD problem */
+       TelSatCallCtrlProblemType_t additionalCallCtrlProblemInfo; /**< Additional call control problem */
+       int bCallCtrlHasModification; /**< Flag to check whether modification happens during call control */
+       TelSatTextTypeInfo_t text; /**< Text string info */
+       TelSatCallCtrlRequestedActionInfo_t callCtrlRequestedAction; /**< Call control requested action info */
+       TelSatResultInfo_t result2; /**< Additional response on general result */
+       TelSatTextTypeInfo_t text2; /**< Text string info */
+} TelSatSendUssdRespInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for the Terminal Response of the REFRESH proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< Result that indicates whether the current proactive command request is executed successfully */
+} TelSatRefreshRespInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for the Terminal Response of the GET CHANNEL STATUS proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< Result that indicates whether the current proactive command request is executed successfully */
+       int bOtherInfo; /**< Flag to check whether other information is required */
+       TelSatBipProblemType_t additionalProblemInfo; /**< BIP specific problem info */
+       TelSatChannelStatusInfo_t channelStatus; /**< Channel Status */
+} TelSatGetChannelStatusRespInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for the Terminal Response of the CLOSE CHANNEL proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< Result that indicates whether the current proactive command request is executed successfully */
+       TelSatBipProblemType_t additionalProblemInfo; /**< BIP specific problem info */
+} TelSatCloseChannelRespInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for the Terminal Response of the OPEN CHANNEL proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< Result that indicates whether the current proactive command request is executed successfully */
+       int bOtherInfo; /**< Flag to check whether other information is required */
+       TelSatBearerDescriptionInfo_t bearerDescription; /**< Bearer description */
+       TelSatBipProblemType_t additionalProblemInfo; /**< BIP specific problem info */
+       TelSatChannelStatusInfo_t channelStatus; /**< Channel status */
+       TelSatBufferSizeInfo_t bufferSize; /**< Buffer size */
+} TelSatOpenChannelRespInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for the Terminal Response of the LANGAUGE NOTIFICATION proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< Result that indicates whether the current proactive command request is executed successfully */
+} TelSatLanguageNotificationRespInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for the Terminal Response of the LAUNCH BROWSER proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< Result that indicates whether the current proactive command request is executed successfully */
+       TelSatLaunchBrowserProblemType_t additionalProblemInfo; /**< Browser specific problem info */
+} TelSatLaunchBrowserRespInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for the Terminal Response of the RECEIVE DATA proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< Result that indicates whether the current proactive command request is executed successfully */
+       TelSatBipProblemType_t additionalProblemInfo; /**< BIP specific problem info */
+       int bOtherInfo; /**< Flag to check whether other information is required */
+       TelSatChannelDataInfo_t channel_data; /**< Channel data */
+       unsigned char channelDataLen; /**< Channel data length */
+} TelSatReceiveDataRespInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for the Terminal Response of the SEND DATA proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< Result that indicates whether the current proactive command request is executed successfully */
+       TelSatBipProblemType_t additionalProblemInfo; /**< BIP specific problem info */
+       unsigned char channelDataLen; /**< Channel data length */
+} TelSatSendDataRespInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for the Terminal Response of the SETUP IDLE MODE TEXT proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< Result that indicates whether the current proactive command request is executed successfully */
+} TelSatSetupIdlemodeTextRespInfo_t;
+
+/**
+ * @brief The structure type containing the data objects for the Terminal Response of the SEND DTMF proactive command.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< Result that indicates whether the current proactive command request is executed successfully */
+} TelSatSendDtmfRespInfo_t;
+
+/**
+ * @brief The structure type containing the data structures to be used to send the proactive command response.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char commandNumber; /**< Proactive command number */
+       TelSatCommandType_t commandType; /**< Proactive command type */
+       union {
+               TelSatMoreTimeRespInfo_t moreTime;      /**< TBD */
+               TelSatDisplayTextRespInfo_t displayText; /**< Terminal response info from the displayText proactive command     */
+               TelSatGetInkeyRespInfo_t getInkey; /**< Terminal response info from the getInkey proactive command */
+               TelSatGetInputRespInfo_t getInput; /**< Terminal response info from the getInput proactive command */
+               TelSatPlayToneRespInfo_t playTone; /**< Terminal response info from the playTone proactive command */
+               TelSatSetupMenuRespInfo_t setupMenu; /**< Terminal response info from the setupMenu proactive command */
+               TelSatSelectItemRespInfo_t selectItem; /**<     Terminal response info from the selectItem proactive command */
+               TelSatSendSmsRespInfo_t sendSms; /**< Terminal response info from the sendSms proactive command */
+               TelSatSendSsRespInfo_t sendSs; /**< Terminal response info from the sendSs proactive command */
+               TelSatSendUssdRespInfo_t sendUssd; /**< Terminal response info from the sendUssd proactive command */
+               TelSatSetupCallRespInfo_t setupCall; /**< Terminal response info from the setupCall proactive command */
+               TelSatRefreshRespInfo_t refresh; /**< Terminal response info from the refresh proactive command */
+               TelSatProvideLocalInfoRespInfo_t provideLocInfo; /**< Terminal response info from the provide Local Info proactive command */
+               TelSatLaunchBrowserRespInfo_t launchBrowser; /**< Terminal response info from the launch Browser proactive command */
+               TelSatSetupIdlemodeTextRespInfo_t idleText; /**< Terminal response info from the setup idle mode text proactive command */
+               TelSatSendDtmfRespInfo_t sendDtmf; /**< Terminal response info from the send DTMF proactive command     */
+               TelSatLanguageNotificationRespInfo_t languageNotification; /**< Terminal response info from the language Notification proactive command */
+               TelSatSetupEventListRespInfo_t setupEventList; /**<     Terminal response info from the setup Event List proactive command */
+               TelSatOpenChannelRespInfo_t openChannel; /**< Terminal response info from the openChannel proactive command     */
+       } terminalRespInfo; /**< Union */
+} TelSatRespInfo_t;
+
+/*
+ * SAT Icon Data
+ */
+
+typedef struct {
+       unsigned char iconId;   /**< TBD */
+       unsigned char imgType;  /**< TBD */
+       unsigned char imgLen;   /**< TBD */
+       unsigned char imgData[256];     /**< TBD */
+} TelSatIconDataResp_t;
+
+typedef struct {
+       unsigned char iconId;   /**< TBD */
+       unsigned char imgType;  /**< TBD */
+       unsigned char fileId[2];        /**< TBD */
+       unsigned char reqDataLen[2];    /**< TBD */
+       unsigned char offset[2];        /**< TBD */
+} TelsatIconDataGet_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TEL_SAT_PROACTV_CMD_H_ */
+
+/**
+ * @}
+ */
diff --git a/include/TelSim.h b/include/TelSim.h
new file mode 100644 (file)
index 0000000..22510f0
--- /dev/null
@@ -0,0 +1,1664 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file TelSim.h
+ */
+
+/**
+ * @internal
+ * @addtogroup CAPI_TELEPHONY_SERVICE_SIM
+ * @{
+ */
+
+#ifndef _TELSIM_H_
+#define _TELSIM_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @brief Definition for the maximum length of ICCID.
+ * @since_tizen 2.3
+ */
+#define TAPI_SIM_ICCID_LEN_MAX 20
+
+/**
+ * @brief Definition for the maximum length of the alpha ID.
+ * @since_tizen 2.3
+ */
+#define TAPI_SIM_XDN_ALPHA_ID_MAX_LEN 30
+
+/**
+ * @brief Definition for the maximum length of the dialing number.
+ * @since_tizen 2.3
+ */
+#define TAPI_SIM_XDN_DIALING_NUMBER_LEN        20
+
+/**
+ * @brief Definition for the maximum length of the MSISDN number.
+ * @since_tizen 2.3
+ */
+#define TAPI_SIM_MSISDN_DIALING_NUMBER_LEN     26
+
+/**
+ * @brief Definition for the maximum length of the CSP profile entry count.
+ * @since_tizen 2.3
+ */
+#define TAPI_SIM_CPHS_CUSTOMER_SERVICE_PROFILE_ENTRY_COUNT_MAX 11
+
+/**
+ * @brief Definition for the maximum length of the authentication code.
+ * @since_tizen 2.3
+ */
+#define TAPI_SIM_AUTH_MAX_REQ_DATA_LEN 256
+
+/**
+ * @brief Definition for the maximum length of authentication response data.
+ * @since_tizen 2.3
+ */
+#define TAPI_SIM_AUTH_MAX_RESP_DATA_LEN 128
+
+/**
+ * @brief Definition for the maximum length of SAP APDU.
+ * @details 2048 is for QMI definition. (1024 : general length, 1024 : extra length for additional response).
+ * @since_tizen 2.3
+ */
+#define TAPI_SIM_APDU_MAX_LEN 2048
+
+/**
+ * @brief Definition for the maximum length of the SIM 3G Phone book EF.
+ * @since_tizen 2.3
+ */
+#define TAPI_SIM_PB_3G_FILE_MAX_COUNT 13
+
+/**
+ * @brief Definition for the maximum length of the SIM Phone book Record name.
+ * @since_tizen 2.3
+ */
+#define TAPI_SIM_PB_RECORD_NAME_MAX_LEN 255
+
+/**
+ * @brief Definition for the maximum length of the SIM Phone book Record number.
+ * @since_tizen 2.3
+ */
+#define TAPI_SIM_PB_RECORD_NUMBER_MAX_LEN 255
+
+/**
+ * @brief Definition for the maximum length of the SIM Phone book Record email.
+ * @since_tizen 2.3
+ */
+#define TAPI_SIM_PB_RECORD_EMAIL_MAX_LEN 255
+
+/**
+ * @brief Definition for the maximum length of the SAP answer to reset data.
+ * @since_tizen 2.3
+ */
+#define TAPI_SIM_SAP_ATR_DATA  256
+
+#define TAPI_SIM_NET_FULL_NAME_MAX_LEN 40
+
+#define TAPI_SIM_NET_SHORT_NAME_MAX_LEN 10
+
+#define        TAPI_SIM_MSP_CNT_MAX 2
+
+#define TAPI_SIM_OPERATION_TIMEOUT 1234
+
+#define TAPI_SIM_SST_SERVICE_CNT_MAX 56
+
+#define TAPI_SIM_UST_SERVICE_CNT_MAX 64
+
+#define TAPI_SIM_IST_SERVICE_CNT_MAX 11
+
+#define TAPI_SIM_CDMA_ST_SERVICE_CNT_MAX 47
+
+#define TAPI_SIM_CSIM_ST_SERVICE_CNT_MAX 41
+
+/**
+ * @brief Definition for the type of application on UICC
+ * @since_tizen 2.4
+ */
+#define TAPI_SIM_APP_TYPE_SIM 0x01
+#define TAPI_SIM_APP_TYPE_USIM 0x02
+#define TAPI_SIM_APP_TYPE_CSIM 0x04
+#define TAPI_SIM_APP_TYPE_ISIM 0x08
+
+#define TAPI_SIM_GROUP_IDENTIFIER_LEN_MAX 10
+
+#define TAPI_SIM_OPLMNWACT_LEN_MAX 100
+
+/**
+ * @brief Enumeration for the card type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_CARD_TYPE_UNKNOWN, /**< Unknown card */
+       TAPI_SIM_CARD_TYPE_GSM, /**< SIM(GSM) card */
+       TAPI_SIM_CARD_TYPE_USIM, /**< USIM card */
+       TAPI_SIM_CARD_TYPE_RUIM, /**< CDMA card */
+       TAPI_SIM_CARD_TYPE_NVSIM, /**< CDMA NV SIM */
+       TAPI_SIM_CARD_TYPE_IMS, /**< will be deprecated */
+} TelSimCardType_t;
+
+/**
+ * @brief Enumeration for the file ID.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_EF_DIR = 0x2F00, /**< Root Directory for the USIM */
+       TAPI_SIM_EF_ICCID = 0x2FE2, /**< The ICC Identification file */
+       TAPI_SIM_EF_IMSI = 0x6F07, /**< The IMSI file */
+       TAPI_SIM_EF_SST = 0x6F38, /**< The SIM Service Table file */
+       TAPI_SIM_EF_EST = 0x6F56, /**< The Enabled Service Table file */
+       TAPI_SIM_EF_OPLMN_ACT = 0x6F61, /**< The OPLMN List file */
+       TAPI_SIM_EF_GID1 = 0x6F3E, /**< The Group Identifier Level 1 */
+       TAPI_SIM_EF_GID2 = 0x6F3F, /**< The Group Identifier Level 2 */
+
+       TAPI_SIM_EF_ELP = 0x2F05, /**< The Extended Language Preference file */
+       TAPI_SIM_EF_LP = 0x6F05, /**< SIM: Language preference */
+       TAPI_SIM_EF_ECC = 0x6FB7, /**< The Emergency Call Codes */
+       TAPI_SIM_EF_SPN = 0x6F46, /**< The Service Provider Name */
+       TAPI_SIM_EF_SPDI = 0x6FCD, /**< The Service provider display information */
+       TAPI_SIM_EF_PNN = 0x6FC5, /**< The PLMN Network Name File */
+       TAPI_SIM_EF_OPL = 0x6FC6, /**< The Operator PLMN List File */
+       TAPI_SIM_EF_MSISDN = 0x6F40, /**< MSISDN */
+
+       TAPI_SIM_EF_SMS = 0x6F3C, /**< Short Messages file */
+       TAPI_SIM_EF_SMSP = 0x6F42, /**< SMS Parameter */
+       TAPI_SIM_EF_SMSS = 0x6F43, /**< SMS Status */
+       TAPI_SIM_EF_CBMI = 0x6F45, /**< Cell Broadcast Message Identifier */
+       TAPI_SIM_EF_MBDN = 0x6FC7, /**< SIM Mail Box Dialing Number file */
+
+       TAPI_SIM_EF_USIM_MBI = 0x6FC9, /**< Mailbox Identifier - linear fixed */
+       TAPI_SIM_EF_USIM_MWIS = 0x6FCA, /**< Message Waiting Indication Status - linear fixed */
+       TAPI_SIM_EF_USIM_CFIS = 0x6FCB, /**< Call forward indication status - linear fixed */
+
+       /* CPHS FILE ID */
+       TAPI_SIM_EF_CPHS_VOICE_MSG_WAITING = 0x6F11, /**< CPHS voice MSG waiting indication */
+       TAPI_SIM_EF_CPHS_SERVICE_STRING_TABLE = 0x6F12, /**< CPHS service string table */
+       TAPI_SIM_EF_CPHS_CALL_FORWARD_FLAGS = 0x6F13, /**< CPHS call forward flags */
+       TAPI_SIM_EF_CPHS_OPERATOR_NAME_STRING = 0x6F14, /**< CPHS operator name string */
+       TAPI_SIM_EF_CPHS_CUSTOMER_SERVICE_PROFILE = 0x6F15, /**< CPHS customer service profile */
+       TAPI_SIM_EF_CPHS_CPHS_INFO = 0x6F16, /**< CPHS information */
+       TAPI_SIM_EF_CPHS_MAILBOX_NUMBERS = 0x6F17, /**< CPHS mail box numbers */
+       TAPI_SIM_EF_CPHS_OPERATOR_NAME_SHORT_FORM_STRING = 0x6F18, /**< CPHS operator name short form string */
+       TAPI_SIM_EF_CPHS_INFORMATION_NUMBERS = 0x6F19, /**< CPHS information numbers */
+       /*  CPHS ALS FILE ID */
+       TAPI_SIM_EF_CPHS_DYNAMICFLAGS = 0x6F9F, /**< CPHS Dynamics flags */
+       TAPI_SIM_EF_CPHS_DYNAMIC2FLAG = 0x6F92, /**< CPHS Dynamics2 flags */
+       TAPI_SIM_EF_CPHS_CUSTOMER_SERVICE_PROFILE_LINE2 = 0x6F98, /**< CPHS CSP2 */
+
+       /* Invalid File ID, All the file IDs are less than this Value */
+       TAPI_SIM_EF_INVALID = 0xFFFF, /**< Invalid file */
+       TAPI_SIM_EF_OTHERS, /**< Element to indicate an unknown file */
+}TelSimFileID_t;
+
+/**
+ * @brief Enumeration for the PIN status.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_FACILITY_DISABLED = 0x00,      /**< TBD */
+       TAPI_SIM_FACILITY_ENABLED = 0x01,       /**< TBD */
+       TAPI_SIM_FACILITY_UNKNOWN = 0xFF        /**< TBD */
+} TelSimFacilityStatus_t;
+
+/**
+ * @brief Enumeration for the PIN operation result from the lower layers.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_PIN_OPERATION_SUCCESS, /**< Operation involving PIN (verification/change/enable/disable, and so on) is successful */
+       TAPI_SIM_BUSY, /**< SIM is busy */
+       TAPI_SIM_CARD_ERROR, /**< SIM card error - General errors */
+       TAPI_SIM_INCOMPATIBLE_PIN_OPERATION, /**< SIM Incompatible PIN operation when an invalid SIM command is given or incorrect parameters are supplied to the SIM */
+       TAPI_SIM_PIN_INCORRECT_PASSWORD, /**< SIM PIN incorrect password */
+       TAPI_SIM_PUK_INCORRECT_PASSWORD, /**< SIM PUK incorrect password */
+       TAPI_SIM_PUK_REQUIRED, /**< PUK Required */
+       TAPI_SIM_PIN_REQUIRED, /**< PIN Required */
+       TAPI_SIM_NCK_REQUIRED, /**< Network Control Key Required */
+       TAPI_SIM_NSCK_REQUIRED, /**< Network Subset Control Key Required */
+       TAPI_SIM_SPCK_REQUIRED, /**< Service Provider Control Key Required */
+       TAPI_SIM_CCK_REQUIRED, /**< Corporate Control Key Required */
+       TAPI_SIM_LOCK_REQUIRED, /**< PH-SIM (phone-SIM) locked state */
+       TAPI_SIM_PERM_BLOCKED /**< Permanently Blocked */
+} TelSimPinOperationResult_t;
+
+/**
+ * @brief Enumeration for the SIM access result from the lower layers.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_ACCESS_SUCCESS, /**< Access to file is successful */
+       TAPI_SIM_ACCESS_CARD_ERROR, /**< SIM card error */
+       TAPI_SIM_ACCESS_FILE_NOT_FOUND, /**< File not found */
+       TAPI_SIM_ACCESS_ACCESS_CONDITION_NOT_SATISFIED, /**< Access condition is not fulfilled */
+       TAPI_SIM_ACCESS_FAILED, /**< Access failed */
+} TelSimAccessResult_t;
+
+/**
+ * @brief Enumeration for the SIM power set result from the lower layers.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_POWER_SET_SUCCESS, /**< Power Set is successful */
+       TAPI_SIM_POWER_SET_FAILURE /**< Power Set failure */
+} TelSimPowerSetResult_t;
+
+/**
+ * @brief Enumeration for the PIN type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_PTYPE_PIN1 = 0x00, /**< PIN 1 code */
+       TAPI_SIM_PTYPE_PIN2 = 0x01, /**< PIN 2 code */
+       TAPI_SIM_PTYPE_PUK1 = 0x02, /**< PUK 1 code */
+       TAPI_SIM_PTYPE_PUK2 = 0x03, /**< PUK 2 code */
+       TAPI_SIM_PTYPE_UPIN = 0x04, /**< Universal PIN - Unused now */
+       TAPI_SIM_PTYPE_ADM = 0x05, /**< Administrator - Unused now */
+       TAPI_SIM_PTYPE_SIM = 0x06 /**< SIM Lock code */
+} TelSimPinType_t;
+
+/**
+ * @brief Enumeration for the number type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_TON_UNKNOWN = 0, /**< Unknown */
+       TAPI_SIM_TON_INTERNATIONAL = 1, /**< International number */
+       TAPI_SIM_TON_NATIONAL = 2, /**< National number */
+       TAPI_SIM_TON_NETWORK_SPECIFIC = 3, /**< Network specific number */
+       TAPI_SIM_TON_DEDICATED_ACCESS = 4, /**< Subscriber number */
+       TAPI_SIM_TON_ALPHA_NUMERIC = 5, /**< Alphanumeric, GSM 7-bit default alphabet */
+       TAPI_SIM_TON_ABBREVIATED_NUMBER = 6, /**< Abbreviated number */
+       TAPI_SIM_TON_RESERVED_FOR_EXT = 7 /**< Reserved for extension */
+} TelSimTypeOfNum_t;
+
+/**
+ * @brief Enumeration for the text encryption type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_TEXT_ENC_ASCII, /**< ASCII Encoding */
+       TAPI_SIM_TEXT_ENC_GSM7BIT, /**< GSM 7 Bit Encoding */
+       TAPI_SIM_TEXT_ENC_UCS2, /**< UCS2 Encoding */
+       TAPI_SIM_TEXT_ENC_HEX, /**< HEX Encoding */
+} TelSimTextEncrypt_t;
+
+/**
+ * @brief Enumeration for the numbering plan identifier.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_NPI_UNKNOWN = 0, /**< Unknown */
+       TAPI_SIM_NPI_ISDN_TEL = 1, /**< ISDN/Telephone numbering plan */
+       TAPI_SIM_NPI_DATA_NUMBERING_PLAN = 3, /**< Data numbering plan */
+       TAPI_SIM_NPI_TELEX = 4, /**< Telex numbering plan */
+       TAPI_SIM_NPI_SVC_CNTR_SPECIFIC_PLAN = 5, /**< Service Center Specific plan */
+       TAPI_SIM_NPI_SVC_CNTR_SPECIFIC_PLAN2 = 6, /**< Service Center Specific plan */
+       TAPI_SIM_NPI_NATIONAL = 8, /**< National numbering plan */
+       TAPI_SIM_NPI_PRIVATE = 9, /**< Private numbering plan */
+       TAPI_SIM_NPI_ERMES_NUMBERING_PLAN = 10, /**< ERMES numbering plan */
+       TAPI_SIM_NPI_RESERVED_FOR_EXT = 0xF /**< Reserved for extension */
+} TelSimNumberingPlanIdentity_t;
+
+/**
+ * @brief Enumeration for the emergency service type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_ECC_ESC_POLICE = 0x01, /**< Police */
+       TAPI_SIM_ECC_ESC_AMBULANCE = 0x02, /**< Ambulance */
+       TAPI_SIM_ECC_ESC_FIREBRIGADE = 0x04, /**< Fire brigade */
+       TAPI_SIM_ECC_ESC_MARAINEGUARD = 0x08, /**< Marine guard */
+       TAPI_SIM_ECC_ESC_MOUTAINRESCUE = 0x10, /**< Mountain rescue */
+       TAPI_SIM_ECC_ESC_SPARE = 0x00 /**< Spare */
+} TelSimEccEmergencyServiceInfo_t;
+
+/**
+ * @brief Enumeration for the language preference code.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_LP_GERMAN = 0x00, /**< German */
+       TAPI_SIM_LP_ENGLISH = 0x01, /**< English */
+       TAPI_SIM_LP_ITALIAN = 0x02, /**< Italian */
+       TAPI_SIM_LP_FRENCH = 0x03, /**< French */
+       TAPI_SIM_LP_SPANISH = 0x04, /**< Spanish */
+       TAPI_SIM_LP_DUTCH = 0x05, /**< Dutch */
+       TAPI_SIM_LP_SWEDISH = 0x06, /**< Swedish */
+       TAPI_SIM_LP_DANISH = 0x07, /**< Danish */
+       TAPI_SIM_LP_PORTUGUESE = 0x08, /**< Portuguese */
+       TAPI_SIM_LP_FINNISH = 0x09, /**< Finnish */
+       TAPI_SIM_LP_NORWEGIAN = 0x0A, /**< Norwegian */
+       TAPI_SIM_LP_GREEK = 0x0B, /**< Greek */
+       TAPI_SIM_LP_TURKISH = 0x0C, /**< Turkish */
+       TAPI_SIM_LP_HUNGARIAN = 0x0D, /**< Hungarian */
+       TAPI_SIM_LP_POLISH = 0x0E, /**< Polish */
+       TAPI_SIM_LP_KOREAN = 0x0F, /**< Korean */
+       TAPI_SIM_LP_CHINESE = 0x10, /**< Chinese */
+       TAPI_SIM_LP_RUSSIAN = 0x11, /**< Russian */
+       TAPI_SIM_LP_JAPANESE = 0x12, /**< Japanese */
+       TAPI_SIM_LP_LANG_UNSPECIFIED = 0xFF /**< Unspecified */
+} TelSimLanguagePreferenceCode_t;
+
+/**
+ * @brief Enumeration for the SIM card status.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_STATUS_CARD_ERROR = 0x00, /**< Bad card / On the fly SIM gone bad */
+       TAPI_SIM_STATUS_CARD_NOT_PRESENT = 0x01, /**< Card not present */
+       TAPI_SIM_STATUS_SIM_INITIALIZING = 0x02, /**< SIM is in the Initializing state */
+       TAPI_SIM_STATUS_SIM_INIT_COMPLETED = 0x03, /**< SIM Initialization ok */
+       TAPI_SIM_STATUS_SIM_PIN_REQUIRED = 0x04, /**< PIN  required state */
+       TAPI_SIM_STATUS_SIM_PUK_REQUIRED = 0x05, /**< PUK required state */
+       TAPI_SIM_STATUS_CARD_BLOCKED = 0x06, /**< PIN/PUK blocked(permanently blocked- All the attempts for PIN/PUK failed) */
+       TAPI_SIM_STATUS_SIM_NCK_REQUIRED = 0x07, /**< Network Control Key required state */
+       TAPI_SIM_STATUS_SIM_NSCK_REQUIRED = 0x08, /**< Network Subset Control Key required state */
+       TAPI_SIM_STATUS_SIM_SPCK_REQUIRED = 0x09, /**< Service Provider Control Key required state */
+       TAPI_SIM_STATUS_SIM_CCK_REQUIRED = 0x0a, /**< Corporate Control Key required state */
+       TAPI_SIM_STATUS_CARD_REMOVED = 0x0b, /**< Card removed */
+       TAPI_SIM_STATUS_SIM_LOCK_REQUIRED = 0x0c, /**< PH-SIM (phone-SIM) locked state */
+       TAPI_SIM_STATUS_CARD_CRASHED = 0x0d, /**< Runtime SIM card error */
+       TAPI_SIM_STATUS_CARD_POWEROFF = 0x0e, /**< SIM card Powered OFF */
+       TAPI_SIM_STATUS_UNKNOWN = 0xff /**< Unknown status. It can be the initial status */
+} TelSimCardStatus_t;
+
+/**
+ * @brief The structure type for the SIM card status.
+ * @details This structure has information on the card_status and whether it is changed.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSimCardStatus_t card_status; /**< TBD */
+       unsigned char b_is_changed;     /**< TBD */
+} TelSimInitInfo_t;
+
+/**
+ * @brief Enumeration for the current CPHS phase of the SIM card.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_CPHS_PHASE1 = 0x01, /**< Phase 1 */
+       TAPI_SIM_CPHS_PHASE2 = 0x02, /**< Phase 2 */
+       TAPI_SIM_CPHS_PHASE_RFU = 0xff /**< RFU */
+} TelSimCphsPhaseType_t;
+
+/**
+ * @brief The structure type for the CPHS index level indication.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_CPHS_INDEX_LEVEL_ONE = 0x01, /**< SIM CPHS index level one */
+       TAPI_SIM_CPHS_INDEX_LEVEL_TWO = 0x02, /**< SIM CPHS index level two */
+       TAPI_SIM_CPHS_INDEX_LEVEL_THREE = 0x03, /**< SIM CPHS index level three */
+       TAPI_SIM_CPHS_INDEX_LEVEL_RFU = 0xff /**< SIM CPHS index level RFU */
+} TelSimCphsIndexLevelIndicator_t;
+
+/**
+ * @brief The structure type for CPHS group service type information.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CALL_OFFERING = 0x01, /**< Group CSP offering */
+       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CALL_RESTRICTION = 0x02, /**< Group CSP restriction */
+       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_OTHER_SUPP_SERVICES = 0x03, /**< Group CSP supplementary services */
+       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CALL_COMPLETION = 0x04, /**< Group CSP completion */
+       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_TELESERVICES = 0x05, /**< Group CSP teleservices */
+       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CPHS_TELESERVICES = 0x06, /**< Group CSP CPHS teleservices */
+       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CPHS_FEATURES = 0x07, /**< Group CSP CPHS features */
+       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_NUMBER_IDENTIFIERS = 0x08, /**< Group CSP number identifiers */
+       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_PHASE_SERVICES = 0x09, /**< Group CSP phase services */
+       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_VALUE_ADDED_SERVICES = 0xC0, /**< Group CSP value added services */
+       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_INFORMATION_NUMBERS = 0xD5 /**< Group CSP information numbers */
+} TelSimCphsCustomerServiceGroup_t;
+
+/**
+ * @brief Enumeration for the mailbox type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_MAILBOX_VOICE = 0x01, /**< Voicemail */
+       TAPI_SIM_MAILBOX_FAX = 0x02, /**< Fax */
+       TAPI_SIM_MAILBOX_EMAIL = 0x03, /**< Email */
+       TAPI_SIM_MAILBOX_OTHER = 0x04, /**< Other */
+       TAPI_SIM_MAILBOX_VIDEO = 0x05, /**< Videomail */
+       TAPI_SIM_MAILBOX_DATA = 0x06, /**< Data */
+} TelSimMailboxType_t;
+
+/**
+ * @brief Enumeration for the dynamics flag selected line information.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_DYNAMIC_FLAGS_LINE1 = 0x01, /**< line 1 */
+       TAPI_SIM_DYNAMIC_FLAGS_LINE2 = 0x00, /**< line 2 */
+       TAPI_SIM_DYNAMIC_FLAGS_RFU = 0xff /**< RFU */
+} TelSimDynamicFlagsSelectedLineId_t;
+
+/**
+ * @brief Enumeration for the dynamics2 flag selected line information.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_PIN2_ACCESSIBLE_FLAGS_LOCKED = 0x01, /**< Dynamic flags locked */
+       TAPI_SIM_PIN2_ACCESSIBLE_FLAGS_UNLOCKED = 0x00, /**< Dynamic flags unlocked */
+       TAPI_SIM_PIN2_ACCESSIBLE_FLAGS_RFU = 0xff /**< RFU */
+} TelSimDynamic2FlagAlsStatus_t;
+
+
+/**
+ * @brief Enumeration for the SIM Authentication type.
+ * @details This is used in the SIM-based Authentication Procedure.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_AUTH_TYPE_IMS = 0x00, /**< IMS Authentication */
+       TAPI_SIM_AUTH_TYPE_GSM, /**< GSM Authentication */
+       TAPI_SIM_AUTH_TYPE_3G, /**< 3G Authentication */
+       TAPI_SIM_AUTH_RUIM_CAVE, /**< CDMA CAVE Authentication */
+       TAPI_SIM_AUTH_RUIM_CHAP, /**< CDMA CHAP Authentication */
+       TAPI_SIM_AUTH_RUIM_MNHA, /**< CDMA MNHA Authentication */
+       TAPI_SIM_AUTH_RUIM_MIPRRQ, /**< CDMA MIPRRQ Authentication */
+       TAPI_SIM_AUTH_RUIM_MNAAA, /**< CDMA MNAAA Authentication */
+       TAPI_SIM_AUTH_RUIM_HRPD,        /**< CDMA HRPD Authentication */
+       TAPI_SIM_AUTH_TYPE_MAX /**< TBD */
+} TelSimAuthenticationType_t;
+
+/**
+ * @brief Enumeration for the SIM Authentication result.
+ * @details This is used for the Authentication Procedure.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_AUTH_NO_ERROR = 0x00, /**< ISIM no error */
+       TAPI_SIM_AUTH_CANNOT_PERFORM, /**< Status - can't perform authentication */
+       TAPI_SIM_AUTH_SKIP_RESPONSE, /**< Status - skip authentication response */
+       TAPI_SIM_AUTH_MAK_CODE_FAILURE, /**< Status - MAK(Multiple Activation Key) code failure */
+       TAPI_SIM_AUTH_SQN_FAILURE, /**< Status - SQN(SeQuenceNumber) failure */
+       TAPI_SIM_AUTH_SYNCH_FAILURE, /**< Status - synch failure */
+       TAPI_SIM_AUTH_UNSUPPORTED_CONTEXT, /**< Status - unsupported context */
+       TAPI_SIM_AUTH_MAX /**< TBD */
+} TelSimAuthenticationResult_t;
+
+/**
+ * @brief Enumeration for the security lock type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_LOCK_PS = 0x01, /**< PH-SIM (phone-SIM) locked. Lock Phone to SIM/UICC card
+        *      (MT asks for the password when a SIM/UICC card other than current SIM/UICC card is inserted;
+        *      MT may remember a certain amount of previously used cards thus not
+        *      requiring the password when they are inserted
+        */
+       TAPI_SIM_LOCK_PF, /**< PH-FSIM (phone-first-SIM) Lock Phone to the very
+        * First inserted SIM/UICC card(MT asks for the password when a SIM/UICC card other than the first SIM/UICC
+        * card is inserted
+        */
+       TAPI_SIM_LOCK_SC, /**< SIM Lock (PIN, PIN2, PUK, PUK2) Lock SIM/UICC card ( SIM asks for the password in ME power-up and
+        * when this command is issued
+        */
+       TAPI_SIM_LOCK_FD, /**< FDN - SIM card or active application in the UICC (GSM or USIM)
+        * fixed dialing memory feature */
+       TAPI_SIM_LOCK_PN, /**< Network Personalization */
+       TAPI_SIM_LOCK_PU, /**< Network subset Personalization */
+       TAPI_SIM_LOCK_PP, /**< Service Provider Personalization */
+       TAPI_SIM_LOCK_PC, /**< Corporate Personalization */
+} TelSimLockType_t;
+
+/**
+ * @brief Enumeration for the security lock key information.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_LOCK_KEY_NOT_NEED = 0x00, /**< Key not needed */
+       TAPI_SIM_LOCK_KEY_PIN = 0x01, /**< PIN required */
+       TAPI_SIM_LOCK_KEY_PUK = 0x02, /**< PUK required */
+       TAPI_SIM_LOCK_KEY_PIN2 = 0x03, /**< PIN2 required */
+       TAPI_SIM_LOCK_KEY_PUK2 = 0x04, /**< PUK2 required */
+       TAPI_SIM_LOCK_PERM_BLOCKED = 0x05, /**< Permanent block SIM */
+} TelSimLockStatus_t;
+
+/**
+ * @brief Enumeration for the SAP message IDs between the SAP client and SAP server.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_SAP_POWER_SIM_ON_REQ, /**< SAP Client request about power SIM on in the Server */
+       TAPI_SIM_SAP_POWER_SIM_OFF_REQ, /**< SAP Client request about power SIM off in the Server */
+       TAPI_SIM_SAP_RESET_SIM_REQ, /**< SAP Client request about SIM reset in the Server */
+} TelSimSapPowerMode_t;
+
+/**
+ * @brief Enumeration for the SAP connection status information.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_SAP_CONNECTION_STATUS_OK = 0x00, /**< Connected successfully */
+       TAPI_SIM_SAP_CONNECTION_STATUS_UNABLE_TO_ESTABLISH, /**< Unable to establish connection */
+       TAPI_SIM_SAP_CONNECTION_STATUS_NOT_SUPPORT_MAX_SIZE, /**< When server does not support the message length of the message that the client wants to send */
+       TAPI_SIM_SAP_CONNECTION_STATUS_TOO_SMALL_MAX_SIZE /**< When client wants to connect with a very small message length that is not supported by the Server */
+} TelSimSapConnectionStatus_t;
+
+/**
+ * @brief Enumeration for the SAP disconnect type information.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_SAP_DISCONNECT_TYPE_GRACEFUL = 0x00, /**< Disconnection procedure ends after finishing the current work */
+       TAPI_SIM_SAP_DISCONNECT_TYPE_IMMEDIATE /**<  Disconnection procedure ends immediately */
+} TelSimSapDissconnectType_t;
+
+/**
+ * @brief Enumeration for the SAP current connection status information.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_SAP_STATUS_UNKNOWN = 0x00, /**< SAP server connection status - unknown */
+       TAPI_SIM_SAP_STATUS_NO_SIM, /**< SAP server connection status - no SIM */
+       TAPI_SIM_SAP_STATUS_NOT_READY, /**< SAP server connection status - not ready */
+       TAPI_SIM_SAP_STATUS_READY, /**< SAP server connection status - ready */
+       TAPI_SIM_SAP_STATUS_CONNECTED /**< SAP server connection status - connected */
+} TelSimSapStatusInfo_t;
+
+/**
+ * @brief Enumeration for the SIM card status if the server's status about connection with subscription module has changed.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_SAP_CARD_STATUS_UNKNOWN = 0x00, /**< SAP server status(card reader status) - unknown */
+       TAPI_SIM_SAP_CARD_STATUS_RESET, /**< SAP server status(card reader status) - reset */
+       TAPI_SIM_SAP_CARD_STATUS_NOT_ACCESSIBLE, /**< SAP server status(card reader status) - not accessible */
+       TAPI_SIM_SAP_CARD_STATUS_REMOVED, /**< SAP server status(card reader status) - removed */
+       TAPI_SIM_SAP_CARD_STATUS_INSERTED, /**< SAP server status(card reader status) - inserted */
+       TAPI_SIM_SAP_CARD_STATUS_RECOVERED /**< SAP server status(card reader status) - recovered */
+} TelSimSapCardStatus_t;
+
+/**
+ * @brief Enumeration for the SAP result information.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_SAP_RESULT_CODE_OK = 0x00, /**< SAP operation result - ok */
+       TAPI_SIM_SAP_RESULT_CODE_NO_REASON, /**< SAP operation result - no reason */
+       TAPI_SIM_SAP_RESULT_CODE_CARD_NOT_ACCESSIBLE, /**< SAP operation result - not accessible */
+       TAPI_SIM_SAP_RESULT_CODE_CARD_ALREADY_POWER_OFF, /**< SAP operation result - card already powered off */
+       TAPI_SIM_SAP_RESULT_CODE_CARD_REMOVED, /**< SAP operation result - card removed */
+       TAPI_SIM_SAP_RESULT_CODE_CARD_ALREADY_POWER_ON, /**< SAP operation result - card already powered on */
+       TAPI_SIM_SAP_RESULT_CODE_DATA_NOT_AVAILABLE, /**< SAP operation result - data not available */
+       TAPI_SIM_SAP_RESULT_CODE_NOT_SUPPORT /**< SAP operation result - not supported */
+} TelSimSapResultCode_t;
+
+/**
+ * @brief Enumeration for the SAP transport protocol type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_SAP_PROTOCOL_T0, /**< T = 0, character */
+       TAPI_SIM_SAP_PROTOCOL_T1 /**< T = 1, block */
+} TelSimSapProtocol_t;
+
+/**
+ * @brief Enumeration for the phonebook access result.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_PB_SUCCESS, /**< SIM phonebook operation successful */
+       TAPI_SIM_PB_FAIL, /**< SIM phonebook operation failure */
+       TAPI_SIM_PB_INVALID_INDEX, /**< The index passed is not a valid index */
+       TAPI_SIM_PB_INVALID_NUMBER_LENGTH, /**< The number length exceeds the max length allowed (or 0) */
+       TAPI_SIM_PB_INVALID_NAME_LENGTH, /**< The name length exceeds the max length allowed (or 0) */
+       TAPI_SIM_PB_ACCESS_CONDITION_NOT_SATISFIED, /**< Access condition for PB file is not satisfied */
+} TelSimPbAccessResult_t;
+
+/**
+ * @brief Enumeration for the storage types to be selected in the SIM or USIM.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_PB_FDN, /**< Fixed Dialing Number */
+       TAPI_SIM_PB_ADN, /**< SIM - ADN */
+       TAPI_SIM_PB_SDN, /**< Service Dialing Number */
+       TAPI_SIM_PB_3GSIM, /**< USIM - 3G phone book */
+       TAPI_SIM_PB_AAS, /**< Additional number Alpha String */
+       TAPI_SIM_PB_GAS, /**< Grouping identifier Alpha String */
+       TAPI_SIM_PB_UNKNOWNN = 0xFF, /**< Unknown file type */
+} TelSimPbType_t;
+
+/**
+ * @brief Enumeration for the storage field types in the 3G Phone book.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       /* for 3G phone storage field type */
+       TAPI_PB_3G_NAME = 0x01, /**< Name */
+       TAPI_PB_3G_NUMBER, /**< Number */
+       TAPI_PB_3G_ANR1, /**< First Another number */
+       TAPI_PB_3G_ANR2, /**< Second Another number */
+       TAPI_PB_3G_ANR3, /**< Third Another number */
+       TAPI_PB_3G_EMAIL1, /**< First Email */
+       TAPI_PB_3G_EMAIL2, /**< Second Email */
+       TAPI_PB_3G_EMAIL3, /**< Third Email */
+       TAPI_PB_3G_EMAIL4, /**< Fourth Email */
+       TAPI_PB_3G_SNE, /**< Second name entry of the main name */
+       TAPI_PB_3G_GRP, /**< Group */
+       TAPI_PB_3G_PBC, /**< 1 byte control info and 1 byte hidden info */
+} TelSimPb3GFileType_t;
+
+/**
+ * @brief Enumeration for the list of SST services in the SIM Service Table (GSM).
+ * @since_tizen 2.3
+ */
+typedef enum {
+       // service 1 ~ 8
+       TAPI_SIM_SST_CHV1_DISABLE_FUNC = 0,     /**< CHV1 disable function */
+       TAPI_SIM_SST_ADN,                                       /**< Abbreviated Dialing number */
+       TAPI_SIM_SST_FDN,                                       /**< Fixed Dialing number */
+       TAPI_SIM_SST_SMS,                                       /**< Short message storage */
+       TAPI_SIM_SST_AOC,                                       /**< Advice of charge */
+       TAPI_SIM_SST_CCP,                                       /**< Capability configuration parameters */
+       TAPI_SIM_SST_PLMN_SELECTOR,                     /**< PLMN selector */
+       TAPI_SIM_SST_RFU1,                                      /**< RFU */
+
+       // service 9 ~ 16
+       TAPI_SIM_SST_MSISDN = 8,                        /**< MSISDN */
+       TAPI_SIM_SST_EXT1,                                      /**< Extension 1 */
+       TAPI_SIM_SST_EXT2,                                      /**< Extension 2 */
+       TAPI_SIM_SST_SMS_PARAMS,                                /**< SMS parameters */
+       TAPI_SIM_SST_LND,                                       /**< Last number dialed */
+       TAPI_SIM_SST_CELL_BROADCAST_MSG_ID,     /**< Cell broadcast message identifier */
+       TAPI_SIM_SST_GID_LV1,                           /**< Group identifier level 1 */
+       TAPI_SIM_SST_GID_LV2,                           /**< Group identifier level 2 */
+
+       // service 17 ~ 24
+       TAPI_SIM_SST_SPN = 16,                          /**< Service provider name */
+       TAPI_SIM_SST_SDN,                                       /**< Service Dialing number */
+       TAPI_SIM_SST_EXT3,                                      /**< Extension3 */
+       TAPI_SIM_SST_RFU2,                                      /**< RFU */
+       TAPI_SIM_SST_VGCS_GID_LIST,                     /**< VGCS group identifier (EF-VGCS, EF-VGCSS) */
+       TAPI_SIM_SST_VBS_GID_LIST,                      /**< VBS group identifier (EF-VBS, EF-VBSS) */
+       TAPI_SIM_SST_ENHANCED_MULTI_LV_PRECEDENCE_PREEMPTION_SRVC,      /**< Enhanced multi-level precedence and pre-emption service */
+       TAPI_SIM_SST_AUTO_ANSWER_FOR_EMLPP,     /**< Automatic answer for EMLPP */
+
+       // service 25 ~ 32,
+       TAPI_SIM_SST_DATA_DOWNLOAD_VIA_SMS_CB = 24,     /**< Data download via SMS-CB */
+       TAPI_SIM_SST_DATA_DOWNLOAD_VIA_SMS_PP,          /**< Data download via SMS-PP */
+       TAPI_SIM_SST_MENU_SELECTION,                                    /**< Menu selection */
+       TAPI_SIM_SST_CALL_CTRL,                                         /**< Call control */
+       TAPI_SIM_SST_PROACTIVE_SIM,                                     /**< Proactive SIM command */
+       TAPI_SIM_SST_CELL_BROADCAST_MSG_ID_RANGES,      /**< Cell broadcast message identifier ranges */
+       TAPI_SIM_SST_BDN,                                                       /**< Barred Dialing numbers */
+       TAPI_SIM_SST_EXT4,                                                      /**< Extension 4 */
+
+       // service 33 ~ 40
+       TAPI_SIM_SST_DEPERSONALIZATION_CTRL_KEYS = 32,  /**< De-personalization control keys */
+       TAPI_SIM_SST_COOPERATIVE_NETWORK_LIST,                  /**< Co-operative network list */
+       TAPI_SIM_SST_SMS_STATUS_REPORTS,                                        /**< Short message status reports */
+       TAPI_SIM_SST_NIA,                                       /**< Network's indication of alerting in the MS (NIA) */
+       TAPI_SIM_SST_MO_SMS_CTRL_BY_SIM,                /**< Mobile-originated short message control by SIM */
+       TAPI_SIM_SST_GPRS,                                      /**< GPRS */
+       TAPI_SIM_SST_IMG,                                       /**< Image */
+       TAPI_SIM_SST_SOLSA,                                     /**< Support of local service area */
+
+       // service 41 ~ 48
+       TAPI_SIM_SST_USSD_STR_DATA_OBJECT_SUPPORTED_IN_CALL_CTRL = 40,  /**< USSD string data object supported in call control */
+       TAPI_SIM_SST_RUN_AT_CMD_CMD,                                                    /**< RUN AT COMMAND command */
+       TAPI_SIM_SST_USER_CTRLED_PLMN_SELECTOR_WACT,                    /**< User controlled PLMN selector with Access technology */
+       TAPI_SIM_SST_OPERATOR_CTRLED_PLMN_SELECTOR_WACT,                /**< Operator controlled PLMN selector with Access technology */
+       TAPI_SIM_SST_HPLMN_SELECTOR_WACT,                       /**< HPLMN selector with access technology */
+       TAPI_SIM_SST_CPBCCH_INFO,                                       /**< CPBCCH information */
+       TAPI_SIM_SST_INVESTIGATION_SCAN,                                /**< Investigation scan */
+       TAPI_SIM_SST_EXTENDED_CAPA_CONF_PARAMS,         /**< Extended capability configuration parameters */
+
+       //      service 49 ~ 56
+       TAPI_SIM_SST_MEXE = 48,                         /**< MExE */
+       TAPI_SIM_SST_RPLMN_LAST_USED_ACCESS_TECH,       /**< RPLMN last used access technology */
+       TAPI_SIM_SST_PLMN_NETWORK_NAME,         /**< PLMN Network Name */
+       TAPI_SIM_SST_OPERATOR_PLMN_LIST,                /**< Operator PLMN List */
+       TAPI_SIM_SST_MBDN,                                      /**< Mailbox Dialling Numbers */
+       TAPI_SIM_SST_MWIS,                                      /**< Message Waiting Indication Status */
+       TAPI_SIM_SST_CFIS,                                      /**< Call Forwarding Indication Status */
+       TAPI_SIM_SST_SPDI,                                      /**< Service Provider Display Information */
+} TelSimSSTService_t;
+
+/**
+ * @brief Enumeration for the list of UST services in the SIM Service Table (USIM).
+ * @since_tizen 2.3
+ */
+typedef enum {
+       // service 1 ~ 8
+       TAPI_SIM_UST_LOCAL_PB = 0,              /**< Local phone book */
+       TAPI_SIM_UST_FDN,                               /**< Fixed Dialing number */
+       TAPI_SIM_UST_EXT2,                              /**< Extension 2 */
+       TAPI_SIM_UST_SDN,                               /**< Service Dialing number */
+       TAPI_SIM_UST_EXT3,                              /**< Extension 3 */
+       TAPI_SIM_UST_BDN,                               /**< Barred Dialing numbers */
+       TAPI_SIM_UST_EXT4,                              /**< Extension 4 */
+       TAPI_SIM_UST_OUTGOING_CALL_INFO,        /**< Outgoing call information */
+
+       // service 9 ~ 16
+       TAPI_SIM_UST_INCOMING_CALL_INFO = 8,            /**< Incoming call information */
+       TAPI_SIM_UST_SMS,                                               /**< Short message storage */
+       TAPI_SIM_UST_SMS_STATUS_REPORTS,                        /**< Short message status reports */
+       TAPI_SIM_UST_SMS_PARAMS,                                        /**< SMS parameters */
+       TAPI_SIM_UST_AOC,                                               /**< Advice of charge */
+       TAPI_SIM_UST_CCP,                                               /**< Capability configuration parameters */
+       TAPI_SIM_UST_CELL_BROADCAST_MSG_ID,             /**< Cell broadcast message identifier */
+       TAPI_SIM_UST_CELL_BROADCAST_MSG_ID_RANGES,      /**< Cell broadcast message identifier ranges */
+
+       // service 17 ~ 24
+       TAPI_SIM_UST_GID_LV1 = 16,                                              /**< Group identifier level 1 */
+       TAPI_SIM_UST_GID_LV2,                                                   /**< Group identifier level 2 */
+       TAPI_SIM_UST_SPN,                                                               /**< Service provider name */
+       TAPI_SIM_UST_USER_CTRLED_PLMN_SELECTOR_WACT,            /**< User controlled PLMN selector with Access technology */
+       TAPI_SIM_UST_MSISDN,                                                                                    /**< MSISDN */
+       TAPI_SIM_UST_IMG,                                                                                       /**< Image */
+       TAPI_SIM_UST_SOLSA,                                                                                     /**< Support of local service area */
+       TAPI_SIM_UST_ENHANCED_MULTI_LV_PRECEDENCE_PREEMPTION_SRVC,      /**< Enhanced multi-level precedence and pre-emption service */
+
+       // service 25 ~ 32
+       TAPI_SIM_UST_AUTO_ANSWER_FOR_EMLPP = 24,        /**< Automatic answer for EMLPP */
+       TAPI_SIM_UST_RFU1,                                              /**< RFU */
+       TAPI_SIM_UST_GSM_ACCESS,                                        /**< GSM access */
+       TAPI_SIM_UST_DATA_DOWNLOAD_VIA_SMS_PP,  /**< Data download via SMS-PP */
+       TAPI_SIM_UST_DATA_DOWNLOAD_VIA_SMS_CB,  /**< Data download via SMS-CB */
+       TAPI_SIM_UST_CALL_CTRL,                                 /**< Call control by USIM */
+       TAPI_SIM_UST_MO_SMS_CTRL,                               /**< Mobile-originated short message control by USIM */
+       TAPI_SIM_UST_RUN_AT_CMD_CMD,                            /**< RUN AT COMMAND command */
+
+       // service 33 ~ 40
+       TAPI_SIM_UST_SHALL_BE_SET_TO_ONE = 32,  /**< Shall be set to 1 */
+       TAPI_SIM_UST_ENABLED_SRVC_TABLE,                        /**< Enabled service table */
+       TAPI_SIM_UST_ACL,                                               /**< APN control list */
+       TAPI_SIM_UST_DEPERSONALIZATION_CTRL_KEYS,       /**< De-personalization control keys */
+       TAPI_SIM_UST_COOPERATIVE_NETWORK_LIST,          /**< Co-operative network list */
+       TAPI_SIM_UST_GSM_SEC_CONTEXT,                           /**< GSM security context */
+       TAPI_SIM_UST_CPBCCH_INFO,                                       /**< CPBCCH information */
+       TAPI_SIM_UST_INVESTIGATION_SCAN,                                /**< Investigation scan */
+
+       // service 41 ~ 48
+       TAPI_SIM_UST_MEXE = 40,                                                         /**< MExE */
+       TAPI_SIM_UST_OPERATOR_CTRLED_PLMN_SELECTOR_WACT,                /**< Operator controlled PLMN selector with Access technology */
+       TAPI_SIM_UST_HPLMN_SELECTOR_WACT,       /**< HPLMN selector with access technology */
+       TAPI_SIM_UST_EXT5,                                      /**< Extension 5 */
+       TAPI_SIM_UST_PLMN_NETWORK_NAME,         /**< PLMN Network Name */
+       TAPI_SIM_UST_OPERATOR_PLMN_LIST,                /**< Operator PLMN List */
+       TAPI_SIM_UST_MBDN,                                      /**< Mailbox Dialling Numbers */
+       TAPI_SIM_UST_MWIS,                                      /**< Message Waiting Indication Status */
+
+       // service 49 ~ 56
+       TAPI_SIM_UST_CFIS = 48,                                         /**< Call Forwarding Indication Status */
+       TAPI_SIM_UST_RPLMN_LAST_USED_ACCESS_TECH,       /**< RPLMN last used access technology */
+       TAPI_SIM_UST_SPDI,                                                      /**< Service Provider Display Information */
+       TAPI_SIM_UST_MMS,                                                       /**< Multi media messaging service */
+       TAPI_SIM_UST_EXT8,                                                      /**< Extension 8 */
+       TAPI_SIM_UST_CALL_CTRL_ON_GPRS,                         /**< Call control on GPRS by USIM */
+       TAPI_SIM_UST_MMS_USER_CONNECTIVITY_PARAMS,      /**< MMS user connectivity parameters */
+       TAPI_SIM_UST_NIA,                                                       /**< Network's indication of alerting in the MS (NIA) */
+
+       // service 57 ~ 64
+       TAPI_SIM_UST_VGCS_GID_LIST = 56,                /**< VGCS group identifier List (EF-VGCS, EF-VGCSS) */
+       TAPI_SIM_UST_VBS_GID_LIST,                      /**< VBS group identifier List (EF-VBS, EF-VBSS) */
+       TAPI_SIM_UST_PSEUDONYM,
+       TAPI_SIM_UST_USER_CTRLED_PLMN_SELECTOR_IWLAN,                   /**< User controlled PLMN selector for I-WLAN access */
+       TAPI_SIM_UST_OPERATOR_CTRLED_PLMN_SELECTOR_IWLAN,               /**< Operator controlled PLMN selector for I-WLAN access */
+       TAPI_SIM_UST_USER_CTRLED_WSID_LIST,
+       TAPI_SIM_UST_OPERATOR_CTRLED_WSID_LIST,
+       TAPI_SIM_UST_VGCS_SEC,
+} TelSimUSTService_t;
+
+/**
+ * @brief Enumeration for the list of CST services in the CDMA Service Table.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       // service 1 ~ 8
+       TAPI_SIM_CDMA_ST_CHV_DISABLE = 0,       /**< CHV Disable Option */
+       TAPI_SIM_CDMA_ST_ADN,                   /**< Abbreviated Dialing number */
+       TAPI_SIM_CDMA_ST_FDN,                   /**< Fixed Dialing number */
+       TAPI_SIM_CDMA_ST_SMS,                   /**< Short message storage */
+       TAPI_SIM_CDMA_ST_HRPD,                  /**< HRPD */
+       TAPI_SIM_CDMA_ST_EPB,                   /**< Enhanced Phone Book */
+       TAPI_SIM_CDMA_ST_MMD,                   /**< Multimedia domain */
+       TAPI_SIM_CDMA_ST_EUIMID,                /**< SF_EUIMID- based EUIMID */
+
+       // service 9 ~ 16
+       TAPI_SIM_CDMA_ST_MEID = 8,              /**< MEID */
+       TAPI_SIM_CDMA_ST_EXT1,                  /**< Extension 1 */
+       TAPI_SIM_CDMA_ST_EXT2,                  /**< Extension 2 */
+       TAPI_SIM_CDMA_ST_SMSP,                  /**< SMS parameters */
+       TAPI_SIM_CDMA_ST_LND,                   /**< Last number dialled */
+       TAPI_SIM_CDMA_ST_SCP,                   /**< Service Category Program for BC-SMS */
+       TAPI_SIM_CDMA_ST_RFU1,                  /**< RFU */
+       TAPI_SIM_CDMA_ST_RFU2,                  /**< RFU */
+
+       // service 17 ~ 24
+       TAPI_SIM_CDMA_ST_HSPN = 16,             /**< CDMA Home Service Provider Name */
+       TAPI_SIM_CDMA_ST_SDN,                   /**< Service Dialing number */
+       TAPI_SIM_CDMA_ST_EXT3,                  /**< Extension 3 */
+       TAPI_SIM_CDMA_ST_3GPDSIP,               /**< 3GPD-SIP */
+       TAPI_SIM_CDMA_ST_RFU3,                  /**< RFU */
+       TAPI_SIM_CDMA_ST_RFU4,                  /**< RFU */
+       TAPI_SIM_CDMA_ST_RFU5,                  /**< RFU */
+       TAPI_SIM_CDMA_ST_RFU6,                  /**< RFU */
+
+       // service 25 ~ 32
+       TAPI_SIM_CDMA_ST_DDSMSB = 24,           /**< Data download by SMS broadcast */
+       TAPI_SIM_CDMA_ST_DDSMSPP,               /**< Data download by SMS PP */
+       TAPI_SIM_CDMA_ST_MENU,                  /**< Menu Selection */
+       TAPI_SIM_CDMA_ST_CALLC,                 /**< Call Control */
+       TAPI_SIM_CDMA_ST_PROACTIVE,             /**< Proactive RUIM */
+       TAPI_SIM_CDMA_ST_AKA,                   /**< AKA */
+       TAPI_SIM_CDMA_ST_RFU7,                  /**< RFU */
+       TAPI_SIM_CDMA_ST_RFU8,                  /**< RFU */
+
+       // service 33 ~ 40
+       TAPI_SIM_CDMA_ST_RFU9 = 32,             /**< RFU */
+       TAPI_SIM_CDMA_ST_RFU10,                 /**< RFU */
+       TAPI_SIM_CDMA_ST_RFU11,                 /**< RFU */
+       TAPI_SIM_CDMA_ST_RFU12,                 /**< RFU */
+       TAPI_SIM_CDMA_ST_RFU13,                 /**< RFU */
+       TAPI_SIM_CDMA_ST_3GPDMIP,               /**< 3GPD- MIP */
+       TAPI_SIM_CDMA_ST_BCMCS,                 /**< BCMCS */
+       TAPI_SIM_CDMA_ST_MMS,                   /**< Multimedia messaging service */
+
+       // service 41 ~ 48
+       TAPI_SIM_CDMA_ST_EXT8 = 40,             /**< Extension 8 */
+       TAPI_SIM_CDMA_ST_MMSUCP,                /**< MMS User Connectivity Parameters */
+       TAPI_SIM_CDMA_ST_AA,                    /**< Application Authentication */
+       TAPI_SIM_CDMA_ST_GIL1,                  /**< Group Identifier Level 1 */
+       TAPI_SIM_CDMA_ST_GIL2,                  /**< Group Identifier Level 2 */
+       TAPI_SIM_CDMA_ST_DEPERSO,               /**< Depersonalisation control keys */
+       TAPI_SIM_CDMA_ST_CNL                    /**< Co-operative Network List */
+} TelSimCdmaService_t;
+
+/**
+ * @brief Enumeration for the list of CST services in the CSIM Service Table. (CSIM)
+ * @since_tizen 2.3
+ */
+typedef enum {
+       // service 1 ~ 8
+       TAPI_SIM_CSIM_ST_LOCAL_PHONEBOOK = 0,   /**< Local Phone book */
+       TAPI_SIM_CSIM_ST_FDN,                   /**< Fixed Dialing Numbers (FDN) */
+       TAPI_SIM_CSIM_ST_EXT2,                  /**< Extension 2 */
+       TAPI_SIM_CSIM_ST_SDN,                   /**< Service Dialing Numbers (SDN) */
+       TAPI_SIM_CSIM_ST_EXT3,                  /**< Extension 3 */
+       TAPI_SIM_CSIM_ST_SMS,                   /**< Short Message Storage (SMS) */
+       TAPI_SIM_CSIM_ST_SMSP,                  /**< Short Message Parameters */
+       TAPI_SIM_CSIM_ST_HRPD,                  /**< HRPD */
+
+       // service 9 ~ 16
+       TAPI_SIM_CSIM_ST_SCP = 8,               /**< Service Category Program for BC-SMS */
+       TAPI_SIM_CSIM_ST_HSPN,                  /**< CDMA Home Service Provider Name */
+       TAPI_SIM_CSIM_ST_DDSMSB,                /**< Data Download via SMS Broadcast */
+       TAPI_SIM_CSIM_ST_DDSMSPP,               /**< Data Download via SMS-PP */
+       TAPI_SIM_CSIM_ST_CALLC,                 /**< Call Control */
+       TAPI_SIM_CSIM_ST_3GPDSIP,               /**< 3GPD-SIP */
+       TAPI_SIM_CSIM_ST_3GPDMIP,               /**< 3GPD-MIP */
+       TAPI_SIM_CSIM_ST_AKA,                   /**< AKA */
+
+       // service 17 ~ 24
+       TAPI_SIM_CSIM_ST_IP_LCS = 16,           /**< IP-based Location Services (LCS) */
+       TAPI_SIM_CSIM_ST_BCMCS,                 /**< BCMCS */
+       TAPI_SIM_CSIM_ST_MMS,                   /**< Multimedia Messaging Service (MMS) */
+       TAPI_SIM_CSIM_ST_EXT8,                  /**< Extension 8 */
+       TAPI_SIM_CSIM_ST_MMSUCP,                /**< MMS User Connectivity Parameters */
+       TAPI_SIM_CSIM_ST_AA,                    /**< Application Authentication */
+       TAPI_SIM_CSIM_ST_GIL1,                  /**< Group Identifier Level 1 */
+       TAPI_SIM_CSIM_ST_GIL2,                  /**< Group Identifier Level 2 */
+
+       // service 25 ~ 32
+       TAPI_SIM_CSIM_ST_DEPERSO = 24,          /**< De-Personalization Control Keys */
+       TAPI_SIM_CSIM_ST_CNL,                   /**< Cooperative Network List */
+       TAPI_SIM_CSIM_ST_OCI,                   /**< Outgoing Call Information (OCI) */
+       TAPI_SIM_CSIM_ST_ICI,                   /**< Incoming Call Information (ICI) */
+       TAPI_SIM_CSIM_ST_EXT5,                  /**< Extension 5 */
+       TAPI_SIM_CSIM_ST_MM_STORAGE,            /**< Multimedia Storage */
+       TAPI_SIM_CSIM_ST_IMG,                   /**< Image (EFIMG) */
+       TAPI_SIM_CSIM_ST_EST,                   /**< Enabled Services Table */
+
+       // service 33 ~ 41
+       TAPI_SIM_CSIM_ST_CCP = 32,              /**< Capability Configuration Parameters (CCP) */
+       TAPI_SIM_CSIM_ST_EUIMIDl,               /**< SF_EUIMID-based EUIMID */
+       TAPI_SIM_CSIM_ST_3GPD_EXT,              /**< Messaging and 3GPD Extensions */
+       TAPI_SIM_CSIM_ST_ROOT_CERTI,            /**< Root Certificates */
+       TAPI_SIM_CSIM_ST_WAP,                   /**< WAP Browser */
+       TAPI_SIM_CSIM_ST_JAVA,                  /**< Java */
+       TAPI_SIM_CSIM_ST_RSVD_CDG1,             /**< Reserved for CDG */
+       TAPI_SIM_CSIM_ST_RSVD_CDG2,             /**< Reserved for CDG */
+       TAPI_SIM_CSIM_ST_IPV6 = 40,             /**< IPv6 */
+} TelSimCsimService_t;
+
+typedef enum {
+       TAPI_SIM_IST_PCSCF_ADDR = 0,            /**< P-CSCF address */
+       TAPI_SIM_IST_GBA,                       /**< Generic Bootstrapping Architecture */
+       TAPI_SIM_IST_HTTP_DIGEST,               /**< HTTP Digest */
+       TAPI_SIM_IST_GBA_LOCAL_KEY,             /**< GBA-based Local Key Establishment Mechanism */
+       TAPI_SIM_IST_PCSCF_LOCAL_BREAK_OUT,     /**< Support of P-CSCF discovery for IMS Local Break Out */
+       TAPI_SIM_IST_SMS,                       /**< Short Message Storage */
+       TAPI_SIM_IST_SMSR,                      /**< Short Message Status Reports */
+       TAPI_SIM_IST_SM_OVER_IP,                /**< Support for SM-over-IP including data download via SMS-PP as defined in TS 31.111 [31] */
+
+       TAPI_SIM_IST_COMMUNICATION_CONTROL = 8, /**< Communication Control for IMS by ISIM */
+       TAPI_SIM_IST_ACCESS_TO_IMS,             /**< Support of UICC access to IMS */
+       TAPI_SIM_IST_URI_SUPPORT,               /**< URI support by UICC */
+} TelSimIsimService_t;
+
+typedef enum {
+       TAPI_SIM_CDMA_SVC_TABLE = 0,
+       TAPI_SIM_CSIM_SVC_TABLE,
+       TAPI_SIM_MAX_SVC_TABLE
+} TelSimCdmaSvcTable_t;
+
+typedef enum {
+       TAPI_SIM_PCSCF_TYPE_FQDN, /**< Fully Qualified Domain Name */
+       TAPI_SIM_PCSCF_TYPE_IPV4, /**< IPv4 */
+       TAPI_SIM_PCSCF_TYPE_IPV6, /**< IPv6 */
+} TelSimPcscfType;
+
+typedef struct {
+       char service[TAPI_SIM_SST_SERVICE_CNT_MAX];     /**< TBD */     // should access with 'enum TelSimSSTService_t' as index
+} TelSimSST_t;
+
+typedef struct {
+       char service[TAPI_SIM_UST_SERVICE_CNT_MAX];     /**< TBD */     // should access with 'enum TelSimUSTService_t' as index
+} TelSimUST_t;
+
+typedef struct {
+       TelSimCdmaSvcTable_t cdma_svc_table;    /* Member of service union is accessed based on the corresponding value of TelSimCdmaSvcTable_t */
+       union {
+               char cdma_service[TAPI_SIM_CDMA_ST_SERVICE_CNT_MAX];    // should access with 'enum TelSimCdmaService_t' as index
+               char csim_service[TAPI_SIM_CSIM_ST_SERVICE_CNT_MAX];    // should access with 'enum TelSimCsimService_t' as index
+       } service;
+} TelSimCST_t;
+
+typedef struct {
+       char service[TAPI_SIM_IST_SERVICE_CNT_MAX];
+} TelSimIST_t;
+
+typedef struct {
+       TelSimCardType_t sim_type;      /**< TBD */
+       union {
+               TelSimSST_t sst;        /**< TBD */
+               TelSimUST_t ust;        /**< TBD */
+               TelSimCST_t cst;
+       } table;        /**< TBD */
+} TelSimServiceTable_t;
+
+/**
+ * @brief The structure type defining data for IMSI information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       char szMcc[3 + 1]; /**< Mobile country code */
+       char szMnc[3 + 1]; /**< Mobile network code */
+       char szMsin[10 + 1]; /**< Mobile station identification number */
+} TelSimImsiInfo_t;
+
+/**
+ * @brief The structure type defining data for ECC information of the GSM/USIM/CDMA SIM.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       char name[30+1]; /**< Applicable only for USIM(3G) SIM */
+       char number[6+1];
+       TelSimEccEmergencyServiceInfo_t category;/**< Applicable only for USIM(3G) SIM */
+}TelSimEcc_t;
+
+typedef struct {
+       int ecc_count;  /**< TBD */
+       TelSimEcc_t list[15];   /**< TBD */
+}TelSimEccList_t;
+
+typedef struct {
+       int icc_length; /**< Integrated Circuit Card number length */
+       char icc_num[TAPI_SIM_ICCID_LEN_MAX]; /**< Integrated Circuit Card number */
+} TelSimIccIdInfo_t;
+
+typedef struct {
+       int b_cphs;     /**< TBD */
+       int rec_index; /**< Index which stands for the location where the record is saved in SIM */
+       int profile_num; /**< SIM profile index */
+       TelSimMailboxType_t mb_type;    /**< TBD */
+       int alpha_id_max_len; /**< Alpha max length in SIM - READ ONLY */
+       char alpha_id[TAPI_SIM_XDN_ALPHA_ID_MAX_LEN + 1]; /**< Alpha Identifier */
+       TelSimTypeOfNum_t ton; /**< Type Of Number */
+       TelSimNumberingPlanIdentity_t npi; /**< Number Plan Identity */
+       char num[TAPI_SIM_XDN_DIALING_NUMBER_LEN + 1]; /**< Dialing Number/SSC String */
+       unsigned char cc_id; /**< Capability/Configuration Identifier */
+       unsigned char ext1_id; /**< Extension 1 Record Identifier */
+}TelSimMailBoxNumber_t;
+
+typedef struct {
+       int count;      /**< TBD */
+       TelSimMailBoxNumber_t list[TAPI_SIM_MSP_CNT_MAX*5];     /**< TBD */ //max is 10
+}TelSimMailboxList_t;
+
+typedef struct {
+       int rec_index;  /**< TBD */
+       unsigned char msp_num; /**< MSP number*/
+       unsigned char cfu_status; /**< Call forwarding unconditional indication status */
+       TelSimTypeOfNum_t ton; /**< TON */
+       TelSimNumberingPlanIdentity_t npi; /**< NPI */
+       char cfu_num[TAPI_SIM_XDN_DIALING_NUMBER_LEN + 1];/**< Dialing Number/SSC String */
+       unsigned char cc2_id; /**< Capability/Configuration 2 Record Identifier */
+       unsigned char ext7_id; /**< Extension 7 Record Identifier */
+}TelSimCfis_t;
+
+typedef struct {
+       int profile_count;      /**< TBD */
+       TelSimCfis_t cf[TAPI_SIM_MSP_CNT_MAX];  /**< TBD */
+}TelSimCfisList_t;
+
+typedef struct {
+       int b_line1; /**< CallForwardUnconditionalLine 1 */
+       int b_line2; /**< CallForwardUnconditionalLine 2 */
+       int b_fax; /**< CallForwardUnconditional FAX */
+       int b_data; /**< CallForwardUnconditional data */
+}TelSimCphsCf_t;
+
+typedef struct {
+       int b_cphs;     /**< TBD */
+       TelSimCfisList_t cf_list;       /**< TBD */
+       TelSimCphsCf_t cphs_cf; /**< TBD */
+}TelSimCallForwardingResp_t;
+
+typedef struct {
+       int b_cphs;     /**< TBD */
+       union {
+               TelSimCfis_t cf;        /**< TBD */
+               TelSimCphsCf_t cphs_cf; /**< TBD */
+       } cf_data_u;    /**< TBD */
+}TelSimCallForwardingReq_t;
+
+typedef struct {
+       int rec_index;  /**< TBD */
+       unsigned char indicator_status; /**< Indicator Type */
+       int voice_count; /**< VoiceMail Count */
+       int fax_count; /**< FAX Count */
+       int email_count; /**< Email Count */
+       int other_count; /**< Other Count */
+       int video_count; /**< VideoMail Count */
+}TelSimMwis_t;
+
+typedef struct {
+       int profile_count;      /**< TBD */
+       TelSimMwis_t mw[TAPI_SIM_MSP_CNT_MAX];  /**< TBD */
+}TelSimMwisList_t;
+
+typedef struct {
+       int b_voice1; /**< VoiceMsgLine1 message waiting flag */
+       int b_voice2; /**< VoiceMsgLine2 message waiting flag */
+       int b_fax; /**< FAX message waiting flag */
+       int b_data; /**< Data message waiting flag */
+}TelSimCphsMw_t;
+
+typedef struct {
+       int b_cphs;     /**< TBD */
+       TelSimMwisList_t mw_list;       /**< TBD */
+       TelSimCphsMw_t cphs_mw; /**< TBD */
+}TelSimMessageWaitingResp_t;
+
+typedef struct {
+       int b_cphs;     /**< TBD */
+       union {
+               TelSimMwis_t mw;        /**< TBD */
+               TelSimCphsMw_t cphs_mw; /**< TBD */
+       } mw_data_u;    /**< TBD */
+}TelSimMessageWaitingReq_t;
+
+/**
+ * @brief The structure type for MSISDN information of the GSM/CDMA SIM.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       char num[TAPI_SIM_MSISDN_DIALING_NUMBER_LEN + 1]; /**< MSISDN number. If it does not exist, a null string will be returned */
+       char name[TAPI_SIM_XDN_ALPHA_ID_MAX_LEN + 1]; /**< MSISDN name. If it does not exist, a null string will be returned. Not applicable for CDMA */
+} TelSimSubscriberInfo_t;
+
+typedef struct {
+       int count;      /**< TBD */
+       TelSimSubscriberInfo_t list[3]; /**< TBD */ //max is 3
+}TelSimMsisdnList_t;
+
+typedef struct {
+       char plmn[6+1]; /**< TBD */
+       int b_umts;     /**< TBD */
+       int b_gsm;      /**< TBD */
+}TelSimOplmnwact_t;
+
+typedef struct {
+       int count;      /**< TBD */
+       TelSimOplmnwact_t list[TAPI_SIM_OPLMNWACT_LEN_MAX];     /**< TBD */ //max is 100
+}TelSimOplmnwactList_t;
+
+typedef struct {
+       unsigned char display_condition; /**< Display condition (1 byte) */
+       unsigned char spn[TAPI_SIM_NET_FULL_NAME_MAX_LEN + 1]; /**< SPN */
+}TelSimSpn_t;
+
+typedef struct {
+       unsigned char full_name[TAPI_SIM_NET_FULL_NAME_MAX_LEN + 1];    /**< TBD */
+       unsigned char short_name[TAPI_SIM_NET_SHORT_NAME_MAX_LEN + 1];  /**< TBD */
+}TelSimCphsNetName_t;
+
+typedef struct {
+       int GroupIdentifierLen; /**< Group identifier length */
+       unsigned char szGroupIdentifier[TAPI_SIM_GROUP_IDENTIFIER_LEN_MAX]; /**< Group identifier */
+}TelSimGid_t;
+
+/**
+ * @details The structure type for authentication request data.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSimAuthenticationType_t auth_type; /**< Authentication type */
+       int rand_length; /**< The length of RAND */
+       int autn_length; /**< The length of AUTN. It is not used in case of GSM AUTH */
+       char rand_data[TAPI_SIM_AUTH_MAX_REQ_DATA_LEN]; /**< RAND data */
+       char autn_data[TAPI_SIM_AUTH_MAX_REQ_DATA_LEN]; /**< AUTN data. It is not used in case of GSM AUTH */
+} TelSimAuthenticationData_t;
+
+/**
+ * @details The structure type for authentication result data.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSimAuthenticationType_t auth_type; /**< Authentication type */
+       TelSimAuthenticationResult_t auth_result; /**< Authentication result */
+       int resp_length; /**< Response length. IMS and 3G case, it stands for RES_AUTS. GSM case, it stands for SRES */
+       char resp_data[TAPI_SIM_AUTH_MAX_RESP_DATA_LEN]; /**< Response data. IMS and 3G case, it stands for RES_AUTS. GSM case, it stands for SRES */
+       int authentication_key_length; /**< The length of the authentication key, Kc */
+       char authentication_key[TAPI_SIM_AUTH_MAX_RESP_DATA_LEN]; /**< The data of the authentication key, Kc */
+       int cipher_length; /**< The length of the cipher key */
+       char cipher_data[TAPI_SIM_AUTH_MAX_RESP_DATA_LEN]; /**< Cipher key */
+       int integrity_length; /**< The length of the integrity key */
+       char integrity_data[TAPI_SIM_AUTH_MAX_RESP_DATA_LEN]; /**< Integrity key */
+} TelSimAuthenticationResponse_t;
+
+
+/**
+ * @brief The structure type for information about PIN data.
+ * @details The SIM PIN data. For PIN handling (Change, UnBlock) & for Type of PIN information.
+ */
+typedef struct {
+       TelSimPinType_t type; /**< PIN type */
+       unsigned char* pw; /**< PIN code */
+       unsigned int pw_len; /**< PIN code length */
+} TelSimSecPw_t;
+
+/**
+ * @brief The structure type for PIN information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSimPinType_t type; /**< Specifies the PIN or PUK type */
+       int retry_count; /**< Number of attempts remaining for PIN/PUK verification */
+} TelSimSecResult_t;
+
+/**
+ * @details The structure type used to enable/disable facility.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSimLockType_t lock_type; /**< Facility type */
+       unsigned char *pw; /**< Password */
+       int pw_len; /**< Password length */
+} TelSimFacilityPw_t;
+
+typedef struct {
+       TelSimLockType_t type; /**< Specifies the PIN or PUK type */
+       int retry_count; /**< Number of attempts remaining for PIN/PUK verification */
+} TelSimFacilityResult_t;
+
+typedef struct {
+       TelSimLockType_t type;  /**< TBD */
+       TelSimFacilityStatus_t f_status;        /**< TBD */
+}TelSimFacilityInfo_t;
+
+/**
+ * @details The structure type for information about LOCK_TYPE.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSimLockType_t lock_type; /**< Lock type */
+       TelSimLockStatus_t lock_status; /**< Lock key */
+       int retry_count; /**< Retry counts */
+} TelSimLockInfo_t;
+
+/**
+ * @brief The structure type for APDU.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned short apdu_len;        /**< TBD */
+       unsigned char* apdu;    /**< TBD */
+} TelSimApdu_t;
+
+/**
+ * @brief The structure type for the response of sending APDU.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned short apdu_resp_len;   /**< TBD */
+       unsigned char apdu_resp[TAPI_SIM_APDU_MAX_LEN]; /**< TBD */
+} TelSimApduResp_t;
+
+/**
+ * @brief The structure type for the response of sending APDU.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned short atr_resp_len;    /**< TBD */
+       unsigned char atr_resp[TAPI_SIM_APDU_MAX_LEN];  /**< TBD */
+} TelSimAtrResp_t;
+
+/**
+ * @brief The structure type for available optional CPHS SIM files.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       /* Byte 2 - bit1 & 2*/
+       int bCustomerServiceProfile; /**< Customer Service Profile (CSP) */
+       /* Byte 2 - bit3 & 4*/
+       int bServiceStringTable; /**< Service String Table (SST) */
+       /* Byte 2 - bit5 & 6*/
+       int bMailBoxNumbers; /**< MailBoxNumbers */
+       /* Byte 2 - bit7 & 8*/
+       int bOperatorNameShortForm; /**< Short form of operator name */
+       /* Byte 3 - bit1 & 2*/
+       int bInformationNumbers; /**< Information numbers */
+} TelSimCphsServiceTable_t;
+
+/*
+ These requirements are additional to the GSM 900 and DCS1800 recommendations.
+ They apply to all products which are to be compliant with the CPHS specification.
+
+ In addition to those SIM storage fields previously defined in DCS1800 to support
+ existing MS features and services, the Association has defined the following fields  :-
+
+ 1)    Call Forwarding flag                                    (mandatory)
+ 2)    Voice message waiting flag                              (mandatory)
+ 3)    PLMN operator name                                              (mandatory)
+ 4)    Customer Service Profile (CSP)                  (optional)
+ 5)    CPHS Information                                                (mandatory)
+ 6)    Mailbox Numbers                                                 (optional)
+ 7)    Information Numbers                                             (optional)
+
+ */
+
+/*
+ DATA FIELD - 6F 16: CPHS INFORMATION
+ Access Conditions:
+ READ  CHV1
+ UPDATE        ADM
+ */
+/**
+ * @brief The structure type for CPHS information data.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSimCphsPhaseType_t CphsPhase; /**< CPHS phase type */
+       TelSimCphsServiceTable_t CphsServiceTable; /**< CPHS service table */
+} TelSimCphsInfo_t;
+
+/*
+ DATA FIELD -6F 19: Information Numbers
+ Access Conditions:
+ READ  CHV1
+ UPDATE        CHV1
+ */
+/**
+ * @brief The structure type for CPHS information numbers data.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int bUsed; /**< SIM CPHS index level one */
+       unsigned char AlphaIdLength; /**< Length of alpha identifier */
+
+       TelSimCphsIndexLevelIndicator_t IndexLevelIndicator; /**< SIM CPHS index level one */
+       int PremiumServiceIndicator; /**< SIM CPHS index level one */
+       int NetworkSpecificIndicator; /**< SIM CPHS index level one */
+       unsigned char Alpha_id[TAPI_SIM_XDN_ALPHA_ID_MAX_LEN + 1]; /**< Alpha Identifier */
+
+       unsigned long DiallingnumLength; /**< Length of BCD number/SSC contents */
+       TelSimTypeOfNum_t TypeOfNumber; /**< TON */
+       TelSimNumberingPlanIdentity_t NumberingPlanIdentity; /**< NPI */
+       char DiallingNum[TAPI_SIM_XDN_DIALING_NUMBER_LEN + 1]; /**< Dialing Number/SSC String */
+       unsigned char Ext1RecordId; /**< Extension 1 Record Identifier */
+} TelSimCphsInformationNum_t;
+
+/*
+ DATA FIELD- 6F 15: Customer Service Profile (Storing a list of service options which are relevant to that specific customer)
+ Access Conditions:
+ READ  CHV1
+ UPDATE        CHV1
+ */
+/**
+ * @brief The structure type for CPHS service call offering information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int bCallForwardingUnconditional; /**< CallForwarding Unconditional */
+       int bCallForwardingOnUserBusy; /**< CallForwarding On UserBusy */
+       int bCallForwardingOnNoReply; /**< CallForwarding On NoReply */
+       int bCallForwardingOnUserNotReachable; /**< CallForwarding On User Not Reachable */
+       int bCallTransfer; /**< Call Transfer */
+} TelSimCphsServiceCallOffering_t;
+
+/**
+ * @brief The structure type for CPHS service call restriction information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int bBarringOfAllOutgoingCalls; /**< Barring Of All Outgoing Calls */
+       int bBarringOfOutgoingInternationalCalls; /**< Barring Of Outgoing International Calls */
+       int bBarringOfOutgoingInternationalCallsExceptHplmn; /**< Barring Of Outgoing International Calls Except HPLMN */
+       int bBarringOfAllIncomingCallsRoamingOutsideHplmn; /**< Barring Of All Incoming Calls Roaming Outside HPLMN */
+       int bBarringOfIncomingCallsWhenRoaming; /**< Barring Of Incoming Calls When Roaming */
+} TelSimCphsServiceCallRestriction_t;
+
+/**
+ * @brief The structure type for CPHS service SS information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int bMultiPartyService; /**< MultiPartyService */
+       int bClosedUserGroup; /**< ClosedUserGroup */
+       int bAdviceOfCharge; /**< AdviceOfCharge */
+       int bPreferentialClosedUserGroup; /**< PreferentialClosedUserGroup*/
+       int bClosedUserGroupOutgoingAccess; /**< ClosedUserGroupOutgoingAccess */
+} TelSimCphsServiceOtherSupplimentaryService_t;
+
+/**
+ * @brief The structure type for CPHS service call complete information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int bCallHold; /**< Call Hold */
+       int bCallWaiting; /**< Call Waiting */
+       int bCompletionOfCallToBusySubscriber; /**< Completion Of Call To Busy Subscriber */
+       int bUserUserSignalling; /**< User User Signaling */
+} TelSimCphsServiceCallComplete_t;
+
+/**
+ * @brief The structure type for CPHS service teleservices information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int bShortMessageMobileOriginated; /**< Short Message Mobile Originated */
+       int bShortMessageMobileTerminated; /**< Short Message Mobile Terminated */
+       int bShortMessageCellBroadcast; /**< Short Message Cell Broadcast */
+       int bShortMessageReplyPath; /**< Short  Message Reply Path */
+       int bShortMessageDeliveryConf; /**< Short Message Delivery Conf */
+       int bShortMessageProtocolIdentifier; /**< Short Message Protocol Identifier */
+       int bShortMessageValidityPeriod; /**< Short Message Validity Period */
+} TelSimCphsServiceTeleservices_t;
+
+/**
+ * @brief The structure type for CPHS alternative line service information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int bAlternativeLineService; /**< Alternative Line Service */
+} TelSimCphsServiceCphsTeleservices_t;
+
+/**
+ * @brief The structure type for CPHS string service table information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int bStringServiceTable; /**< String Service Table */
+} TelSimCphsServiceCphsFeatures_t;
+
+/**
+ * @brief The structure type for CPHS service number identifier information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int bCallingLineIdentificationPresent; /**< Calling Line Identification Present */
+       int bConnectedLineIdentificationRestrict; /**< Connected Line Identification Restrict */
+       int bConnectedLineIdentificationPresent; /**< Connected Line Identification Present */
+       int bMaliciousCallIdentifier; /**< Malicious Call Identifier */
+       int bCallingLineIdentificationSend; /**< Calling Line Identification Send */
+       int bCallingLineIdentificationBlock; /**< Calling Line Identification Block */
+} TelSimCphsServiceNumberIdentifier_t;
+
+/**
+ * @brief The structure type for CPHS service phase services information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int bMenuForGprs; /**< Menu For GPRS */
+       int bMenuForHighSpeedCsd; /**< Menu For HighSpeedCsd */
+       int bMenuForVoiceGroupCall; /**< Menu For VoiceGroupCall */
+       int bMenuForVoiceBroadcastService; /**< Menu For VoiceBroadcastService */
+       int bMenuForMultipleSubscriberProfile; /**< Menu For MultipleSubscriberProfile */
+       int bMenuForMultipleBand; /**< Menu For MultipleBand */
+} TelSimCphsServicePhaseServices_t;
+
+/**
+ * @brief The structure type for CPHS value added service information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int bRestrictMenuForManualSelection; /**< RestrictMenu For ManualSelection */
+       int bRestrictMenuForVoiceMail; /**< RestrictMenu For VoiceMail */
+       int bRestrictMenuForMoSmsAndPaging; /**< RestrictMenu For MoSmsAndPaging */
+       int bRestrictMenuForMoSmsWithEmialType; /**< RestrictMenu For MoSmsWithEmailType */
+       int bRestrictMenuForFaxCalls; /**< RestrictMenu For FaxCalls */
+       int bRestrictMenuForDataCalls; /**< RestrictMenu For DataCalls */
+       int bRestrictMenuForChangeLanguage; /**< RestrictMenu For ChangeLanguage */
+} TelSimCphsServiceValueAddedServices_t;
+
+/**
+ * @brief The structure type for CPHS service information number data.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int bInformationNumbers; /**< Information Numbers */
+} TelSimCphsServiceInformationNumbers_t;
+
+/**
+ * @brief The structure type for CPHS service profile entry information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSimCphsCustomerServiceGroup_t CustomerServiceGroup; /**< Customer service group */
+       union {
+               TelSimCphsServiceCallOffering_t CallOffering; /**< Call offering */
+               TelSimCphsServiceCallRestriction_t CallRestriction; /**< Call restriction */
+               TelSimCphsServiceOtherSupplimentaryService_t OtherSuppServices; /**< Other SS services */
+               TelSimCphsServiceCallComplete_t CallComplete; /**< Call complete */
+               TelSimCphsServiceTeleservices_t Teleservices; /**< Teleservices */
+               TelSimCphsServiceCphsTeleservices_t CphsTeleservices; /**< CPHS teleservices */
+               TelSimCphsServiceCphsTeleservices_t CphsFeatures; /**< CPHS features */
+               TelSimCphsServiceNumberIdentifier_t NumberIdentifiers; /**< Number identifiers */
+               TelSimCphsServicePhaseServices_t PhaseServices; /**< Phase services */
+               TelSimCphsServiceValueAddedServices_t ValueAddedServices; /**< Value added services */
+               TelSimCphsServiceInformationNumbers_t InformationNumbers; /**< Information numbers */
+       } u;
+} TelSimCphsCustomerServiceProfileEntry_t;
+
+/**
+ * @brief The structure type for CPHS service profile information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSimCphsCustomerServiceProfileEntry_t ServiceProfileEntry[TAPI_SIM_CPHS_CUSTOMER_SERVICE_PROFILE_ENTRY_COUNT_MAX]; /**< Service profile entry */
+} TelSimCphsCustomerServiceProfileInfo_t;
+
+/**
+ * @brief The structure type for dynamic flag selected line information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSimDynamicFlagsSelectedLineId_t DynamicFlags; /**< Dynamic flags information */
+} TelSimDynamicFlagsInfo_t;
+
+/**
+ * @brief The structure type for dynamic flag selected line information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSimDynamic2FlagAlsStatus_t Dynamic2Flag; /**< Dynamic flags status */
+} TelSimDynamic2FlagsInfo_t;
+
+/**
+ * @brief The structure type for phone book availability of the current SIM.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int b_fdn; /**< Fixed Dialing Number */
+       int b_adn; /**< SIM - ADN(2G phonebook, Under DF phonebook */
+       int b_sdn; /**< Service Dialing Number */
+       int b_3g; /**< USIM - 3G phonebook */
+       int b_aas; /**< Additional number Alpha String phonebook */
+       int b_gas; /**< Grouping information Alpha String phonebook */
+} TelSimPbList_t;
+
+/**
+ * @brief The structure type for phone book status of the current SIM.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int init_completed;     /**< TBD */
+       TelSimPbList_t pb_list; /**< TBD */
+} TelSimPbStatus_t;
+
+typedef struct {
+       TelSimPbType_t phonebook_type;  /**< TBD */
+       unsigned short index;   /**< TBD */
+       unsigned short next_index;      /**< TBD */ //this field is not used in the add/update case
+
+       unsigned char name[TAPI_SIM_PB_RECORD_NAME_MAX_LEN+1];  /**< TBD */
+       TelSimTextEncrypt_t dcs;        /**< TBD */
+
+       unsigned char number[TAPI_SIM_PB_RECORD_NUMBER_MAX_LEN+1];      /**< TBD */
+       TelSimTypeOfNum_t ton;  /**< TBD */
+
+       /* following field is valid in only USIM*/
+       unsigned char sne[TAPI_SIM_PB_RECORD_NAME_MAX_LEN+1];   /**< TBD */
+       TelSimTextEncrypt_t sne_dcs;    /**< TBD */
+       unsigned char anr1[TAPI_SIM_PB_RECORD_NUMBER_MAX_LEN+1];        /**< TBD */
+       TelSimTypeOfNum_t anr1_ton;     /**< TBD */
+       unsigned char anr2[TAPI_SIM_PB_RECORD_NUMBER_MAX_LEN+1];        /**< TBD */
+       TelSimTypeOfNum_t anr2_ton;     /**< TBD */
+       unsigned char anr3[TAPI_SIM_PB_RECORD_NUMBER_MAX_LEN+1];        /**< TBD */
+       TelSimTypeOfNum_t anr3_ton;     /**< TBD */
+
+       unsigned char email1[TAPI_SIM_PB_RECORD_EMAIL_MAX_LEN+1];       /**< TBD */
+       unsigned char email2[TAPI_SIM_PB_RECORD_EMAIL_MAX_LEN+1];       /**< TBD */
+       unsigned char email3[TAPI_SIM_PB_RECORD_EMAIL_MAX_LEN+1];       /**< TBD */
+       unsigned char email4[TAPI_SIM_PB_RECORD_EMAIL_MAX_LEN+1];       /**< TBD */
+
+       unsigned short group_index;     /**< TBD */ //GRP
+       unsigned short pb_control;      /**< TBD */ //PBC
+} TelSimPbRecord_t;
+
+/**
+ * @brief The structure type for phone book storage count information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSimPbType_t StorageFileType; /**< Storage file type */
+       unsigned short TotalRecordCount; /**< Total record count */
+       unsigned short UsedRecordCount; /**< Used record count */
+} TelSimPbStorageInfo_t;
+
+/**
+ * @brief The structure type for phone book entry information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSimPbType_t StorageFileType; /**< Storage file type */
+       unsigned short PbIndexMin; /**< Phone book minimum index */
+       unsigned short PbIndexMax; /**< Phone book maximum index */
+       unsigned short PbNumLenMax; /**< Phone number's maximum length */
+       unsigned short PbTextLenMax; /**< Text's maximum length */
+       unsigned short PbUsedCount; /**< Phone book used record count */
+} TelSimPbEntryInfo_t;
+
+/**
+ * @brief The structure type for 3G phone book capability information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSimPb3GFileType_t field_type; /**< 3G phonebook file type */
+       unsigned short index_max; /**< Max index */
+       unsigned short text_max; /**< Max text length */
+       unsigned short used_count; /**< Used record count */
+} TelSimPb3GFileTypeCapabiltyInfo_t;
+
+/**
+ * @brief The structure type for SIM PHONEBOOK & ITS CAPABILITIES information.
+ * @details It refers to EF_PBR.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned short FileTypeCount; /**< Phonebook file type count */
+       TelSimPb3GFileTypeCapabiltyInfo_t FileTypeInfo[TAPI_SIM_PB_3G_FILE_MAX_COUNT]; /**< Phonebook file type information */
+} TelSimPbCapabilityInfo_t;
+
+
+
+/* SAP (SIM Access Profile) related interface structures and enum */
+/**
+ * @brief The structure type for SAP ATR response data information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int atr_len; /**< SAP ATR response data length */
+       unsigned char atr_data[TAPI_SIM_SAP_ATR_DATA]; /**< SAP ATR response data */
+} TelSapAtrInfo_t;
+
+/* SAP transfer APDU request */
+
+/**
+ * @brief The structure type for SAP APDU data information.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int apdu_len; /**< SAP APDU length */
+       unsigned char apdu_data[TAPI_SIM_APDU_MAX_LEN]; /**< SAP APDU data */
+} TelSapApduData_t;
+
+/**
+ * @brief Enumeration for TelSimPowerState_t.
+ * @details This enumeration defines the power state of the SIM.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SIM_POWER_OFF = 0x00, /**< OFF */
+       TAPI_SIM_POWER_ON = 0x01, /**< ON */
+       TAPI_SIM_POWER_UNSPECIFIED = 0xFF /**< Unspecified */
+} TelSimPowerState_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _TELSIM_H_
+/**
+ * @}
+ */
diff --git a/include/TelSms.h b/include/TelSms.h
new file mode 100644 (file)
index 0000000..819be58
--- /dev/null
@@ -0,0 +1,426 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file TelSms.h
+ */
+
+/**
+ * @internal
+ * @addtogroup CAPI_TELEPHONY_SERVICE_SMS
+ * @{
+ */
+
+#ifndef _TEL_NETTEXT_H_
+#define _TEL_NETTEXT_H_
+
+#include <TelSim.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/* NetText */
+
+/**
+ * @brief Definition for the EF-SMSP digit length.
+ * @since_tizen 2.3
+ */
+#define TAPI_SIM_SMSP_ADDRESS_LEN              20
+
+/**
+ * @brief Definition for the EF-SMSP alpha ID length.
+ * @since_tizen 2.3
+ */
+#define TAPI_SIM_SMSP_ALPHA_ID_LEN_MAX         128
+
+/**
+ * @brief Definition for the maximum message size.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETTEXT_MSG_SIZE_MAX              918
+
+/**
+ * @brief Definition for the maximum CB message size.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETTEXT_CB_SIZE_MAX                       1252
+
+/**
+ * @brief Definition for the maximum ETWS message size.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETTEXT_ETWS_SIZE_MAX                     1252
+
+/**
+ * @brief Definition for the nettext address length.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETTEXT_ADDRESS_LEN_MAX   20
+
+/**
+ * @brief Definition for the SC address length.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETTEXT_SCADDRESS_LEN_MAX 18
+
+/**
+ * @brief Definition for the CB maximum page size.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETTEXT_CB_PAGE_SIZE_MAX                           9
+
+/**
+ * @brief Definition for the maximum GSM SMS message number.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETTEXT_SMS_MSG_NUM_MAX             255    /**< Maximum SMS message number*/
+
+/**
+ * @brief Definition for the maximum GSM SMS CBMI list size.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETTEXT_SMS_CBMI_LIST_SIZE_MAX      50    /**< Maximum SMS CBMI list size*/
+
+/**
+ * @brief Definition for the maximum SMS data size that can be stored.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETTEXT_SMDATA_SIZE_MAX                           255  /**< Maximum SMS data size that can be stored*/
+
+/**
+ * @brief Definition for the maximum SMS service center address.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETTEXT_MAX_SMS_SERVICE_CENTER_ADDR   12
+
+/**
+ * @brief Definition for the maximum index value of the SMS.
+ * @since_tizen 2.3
+ */
+#define TAPI_NETTEXT_MAX_INDEX                                        255
+
+#define TAPI_NETTEXT_SMSP_PARAMS_MAX_LEN               28
+
+/**
+ * @brief Enumeration for network text status type.
+ * @since_tizen 2.3
+ */
+typedef enum
+{
+       TAPI_NETTEXT_STATUS_READ,                                       /**< MT message, stored and read */
+       TAPI_NETTEXT_STATUS_UNREAD,                                     /**< MT message, stored and unread */
+       TAPI_NETTEXT_STATUS_SENT,                                       /**< MO message, stored and sent */
+       TAPI_NETTEXT_STATUS_UNSENT,                                     /**< MO message, stored but not sent */
+       TAPI_NETTEXT_STATUS_DELIVERED,                         /**< Delivered destination */
+       TAPI_NETTEXT_STATUS_DELIVERY_UNCONFIRMED,  /**< Service centre forwarded message but is unable to confirm delivery */
+       TAPI_NETTEXT_STATUS_MESSAGE_REPLACED,          /**< Message has been replaced */
+       TAPI_NETTEXT_STATUS_RESERVED                            /**< Reserved for future use */
+} TelSmsMsgStatus_t;
+
+/**
+ * @brief Enumeration for memory status type.
+ * @since_tizen 2.3
+ */
+typedef enum
+{
+       TAPI_NETTEXT_PDA_MEMORY_STATUS_AVAILABLE                = 0x01, /**< PDA memory is available */
+       TAPI_NETTEXT_PDA_MEMORY_STATUS_FULL                     = 0x02,  /**< PDA memory is full */
+       TAPI_NETTEXT_PHONE_MEMORY_STATUS_AVAILABLE      = 0x03, /**< Phone memory is available */
+       TAPI_NETTEXT_PHONE_MEMORY_STATUS_FULL                   = 0x04, /**< Phone memory is full */
+}TelSmsMemStatusType;
+
+/**
+ * @brief Enumeration for different CB message types.
+ * @since_tizen 2.3
+ */
+typedef enum
+{
+               TAPI_NETTEXT_CB_MSG_GSM = 1,            /**< GSM Cell broadcast message */
+               TAPI_NETTEXT_CB_MSG_UMTS,                       /**< UMTSCell broadcast message */
+               TAPI_NETTEXT_CB_MSG_CDMA                        /**< CDMA broadcast message */
+} TelSmsCbMsgType_t;
+
+/**
+ * @brief Enumeration for different ETWS message types.
+ * @since_tizen 2.3
+ */
+typedef enum
+{
+          TAPI_NETTEXT_ETWS_PRIMARY = 0,             /**< Primary ETWS message */
+          TAPI_NETTEXT_ETWS_SECONDARY_GSM,            /**< GSM Secondary ETWS message  */
+          TAPI_NETTEXT_ETWS_SECONDARY_UMTS,               /**< UMTS Secondary ETWS message  */
+          TAPI_NETTEXT_ETWS_SECONDARY_CDMA /*TODO:Will be supported*/
+} TelSmsEtwsMsgType_t;
+
+/**
+ * @brief Enumeration for different response types that come in the
+ * sent status acknowledgement/notification after sending a message to the network.
+ * @since_tizen 2.3
+ */
+typedef enum
+{
+       TAPI_NETTEXT_SENDSMS_SUCCESS = 0x00,     /**< Message sent successfully */
+       TAPI_NETTEXT_ROUTING_NOT_AVAILABLE,     /**< Message routing not available */
+       TAPI_NETTEXT_INVALID_PARAMETER,             /**< Invalid parameter present in TPDU */
+       TAPI_NETTEXT_DEVICE_FAILURE,                    /**< Device failure */
+       TAPI_NETTEXT_SERVICE_RESERVED,                /**< Reserved Service */
+       TAPI_NETTEXT_INVALID_LOCATION,                /**< Invalid location */
+       TAPI_NETTEXT_NO_SIM,                                    /**< No SIM error */
+       TAPI_NETTEXT_SIM_NOT_READY,            /**< SIM not ready error */
+       TAPI_NETTEXT_NO_NETWORK_RESP,          /**< No response from network */
+       TAPI_NETTEXT_DEST_ADDRESS_FDN_RESTRICTED,/**< Destination address restricted */
+       TAPI_NETTEXT_SCADDRESS_FDN_RESTRICTED,   /**< Service center address restricted */
+       TAPI_NETTEXT_RESEND_ALREADY_DONE,        /**< Resend an already done operation */
+       TAPI_NETTEXT_SCADDRESS_NOT_AVAILABLE,    /**< SCA address not available */
+       TAPI_NETTEXT_UNASSIGNED_NUMBER = 0x8001,          /**< Unassigned number */
+       TAPI_NETTEXT_OPERATOR_DETERMINED_BARRING = 0x8008,/**< Operator determined barring */
+       TAPI_NETTEXT_CALL_BARRED = 0x800A,                /**< Call barred */
+       TAPI_NETTEXT_MESSAGE_TRANSFER_REJECTED = 0x8015,  /**< Message transfer rejected */
+       TAPI_NETTEXT_MEMORY_CAPACITY_EXCEEDED = 0x8016,   /**< Memory capacity exceeded/memory full */
+       TAPI_NETTEXT_DESTINAITION_OUTOFSERVICE = 0x801B,  /**< Destination number/address out of service */
+       TAPI_NETTEXT_UNSPECIFIED_SUBSCRIBER = 0x801C,     /**< Unspecified subscriber */
+       TAPI_NETTEXT_FACILITY_REJECTED = 0x801D,          /**< Facility rejected */
+       TAPI_NETTEXT_UNKNOWN_SUBSCRIBER = 0x801E,         /**< Unknown subscriber */
+       TAPI_NETTEXT_NETWORK_OUTOFORDER = 0x8026,         /**< Network out of order */
+       TAPI_NETTEXT_TEMPORARY_FAILURE = 0x8029,          /**< Temporary failure */
+       TAPI_NETTEXT_CONGESTION = 0x802A,                 /**< Congestion occurred */
+       TAPI_NETTEXT_RESOURCES_UNAVAILABLE = 0x802F,      /**< Resource unavailable */
+       TAPI_NETTEXT_FACILITY_NOT_SUBSCRIBED = 0x8032,    /**< Facility not subscribed by the user */
+       TAPI_NETTEXT_FACILITY_NOT_IMPLEMENTED = 0x8045,   /**< Facility not implemented */
+       TAPI_NETTEXT_INVALID_REF_VALUE = 0x8051,          /**< Invalid reference value */
+       TAPI_NETTEXT_INVALID_MSG = 0x805F,                /**< Invalid message */
+       TAPI_NETTEXT_INVALID_MANDATORY_INFO = 0x8060,     /**< Invalid Mandatory information */
+       TAPI_NETTEXT_MESSAGE_TYPE_NOT_IMPLEMENTED = 0x8061,/**< Message type not implemented */
+       TAPI_NETTEXT_MESSAGE_NOT_COMPAT_PROTOCOL = 0x8062, /**< Message not compact protocol */
+       TAPI_NETTEXT_IE_NOT_IMPLEMENTED = 0x8063,          /**< Information element not implemented */
+       TAPI_NETTEXT_PROTOCOL_ERROR = 0x806F,              /**< Protocol error */
+       TAPI_NETTEXT_INTERWORKING = 0x807F,              /**< Networking error */
+       TAPI_NETTEXT_ME_FULL = 0x8080,                     /**< SMS ME FULL */
+       TAPI_NETTEXT_SIM_FULL = 0x8081,                     /**< SMS SIM FULL */
+       TAPI_NETTEXT_TIMEOUT                                            /**< Timeout error */
+}TelSmsResponse_t;
+
+/**
+ * @brief Enumeration for different cause types that come in the
+ * sent status acknowledgement/notification after sending a message to the network.
+ * @since_tizen 2.3
+ */
+typedef enum
+{
+
+  TAPI_NETTEXT_SUCCESS,                     /**< SMS operation successful */
+  TAPI_NETTEXT_INVALID_PARAMETER_FORMAT,    /**< Invalid format for some parameters passed in Data package information(TPDU) */
+  TAPI_NETTEXT_PHONE_FAILURE,               /**< SMS operation failed due to Modem failure */
+  TAPI_NETTEXT_SIM_BUSY,                    /**< SMS SIM operation cannot be performed as the SIM is busy with some other operation */
+  TAPI_NETTEXT_SIM_FAILURE,                 /**< SMS SIM operation cannot be performed due to SIM failure */
+  TAPI_NETTEXT_UNKNOWN,                     /**< Unknown error */
+  TAPI_NETTEXT_MEMORY_FAILURE,              /**< Error while accessing memory or allocating memory for SMS operation */
+  TAPI_NETTEXT_OPERATION_NOT_SUPPORTED      /**< Operation not allowed/supported */
+}  TelSmsCause_t;
+
+/**
+ * @brief Enumeration for response values.
+ * @since_tizen 2.3
+ */
+typedef enum
+{
+       TAPI_NETTEXT_CBSETCONFIG_RSP,     /**< Cell broadcast config response */
+       TAPI_NETTEXT_SETPREFERREDBEARER_RSP,     /**< Set preferred bearer response */
+       TAPI_NETTEXT_SETPARAMETERS_RSP,     /**< Set parameter response */
+       TAPI_NETTEXT_SETMEMORYSTATUS_RSP,     /**< Set memory status response */
+       TAPI_NETTEXT_SETMESSAGESTATUS_RSP,     /**< Set message status response */
+       TAPI_NETTEXT_SETDEVICESTATUS_RSP,    /**< Set device status response */
+       TAPI_NETTEXT_SETSCADDR_RSP,     /**< Set SCA address response */
+       TAPI_NETTEXT_SET_RSP_MAX     /**< Maximum limit */
+}TelSmsSetResponse;
+
+/**
+ * @brief Enumeration for the type of Network
+ * @since_tizen 2.3
+ */
+typedef enum  {
+       TAPI_NETTEXT_NETTYPE_3GPP = 0x01,                                               /**< 3gpp type */
+       TAPI_NETTEXT_NETTYPE_3GPP2 = 0x02,                                      /**< 3gpp2 type (CDMA) */
+} TelSmsNetType_t;
+
+/**
+ * @brief Enumeration for the sms ready status type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_NETTEXT_READY_STATUS_NONE = 0x00,
+       TAPI_NETTEXT_READY_STATUS_3GPP = 0x01,
+       TAPI_NETTEXT_READY_STATUS_3GPP2 = 0x02,
+       TAPI_NETTEXT_READY_STATUS_3GPP_AND_3GPP2 = 0x03,
+}TelSmsReadyStatus_t;
+
+/**
+ * @brief The structure type for different parameters of the CB configuration.
+ * @since_tizen 2.3
+ */
+typedef struct {
+ unsigned short FromMsgId; /**< Starting point of the range of the CBS message ID */
+ unsigned short ToMsgId; /**< Ending point of the range of the CBS message ID */
+ unsigned char Selected; /**< 0x00 . Not selected. 0x01 . Selected */
+} TelSmsCbMsgInfo3gpp_t;
+
+typedef struct {
+ unsigned short CBCategory; /**< CB Service category */
+ unsigned short CBLanguage; /**< Language indicator value
+                                                               . 0x00 . LANGUAGE_UNKNOWN . Unknown or Unspecified
+                                                               . 0x01 . LANGUAGE_ENGLISH . English
+                                                               . 0x02 . LANGUAGE_FRENCH . French
+                                                               . 0x03 . LANGUAGE_SPANISH . Spanish
+                                                               . 0x04 . LANGUAGE_JAPANESE . Japanese
+                                                               . 0x05 . LANGUAGE_KOREAN . Korean
+                                                               . 0x06 . LANGUAGE_CHINESE . Chinese
+                                                               . 0x07 . LANGUAGE_HEBREW . Hebrew */
+ unsigned char Selected; /**< 0x00 . Not selected. 0x01 . Selected */
+} TelSmsCbMsgInfo3gpp2_t;
+
+typedef union {
+       TelSmsCbMsgInfo3gpp_t Net3gpp; /**< 3GPP Broadcast Configuration Information */
+       TelSmsCbMsgInfo3gpp2_t Net3gpp2; /**< 3GPP2 Broadcast Configuration Information, CDMA */
+} TelSmsCbMsgInfo_t;
+
+typedef struct {
+       int Net3gppType;  /**< Type of 3GPP, 0x01 . 3gpp. 0x02 . 3gpp2(CDMA) */
+       int CBEnabled; /**< CB service state. If @a CBEnabled is @c true then the cell broadcast service will be enabled and the underlying modem will enable the CB Channel to receive CB messages. Otherwise the CB service will be disabled and the underlying modem will deactivate the CB channel. (enabled/disabled) */
+       unsigned char MsgIdMaxCount; /**< CB Channel List Max Count For Response */
+       int MsgIdRangeCount; /**< Range of CB message ID count */
+       TelSmsCbMsgInfo_t MsgIDs[TAPI_NETTEXT_SMS_CBMI_LIST_SIZE_MAX]; /**< Range of CB message ID information */
+} TelSmsCbConfig_t;
+
+/**
+ * @brief The structure type for properties of a dialing number.
+ * @details Those properties are: type of the number, numbering plan indicator, length, and the actual number.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned int DialNumLen; /**< Length of the address. If the Service center address is not set, then this will be zero */
+       TelSimTypeOfNum_t Ton; /**< Type of number */
+       TelSimNumberingPlanIdentity_t Npi; /**< Numbering plan identification */
+       unsigned char szDiallingNum[TAPI_SIM_SMSP_ADDRESS_LEN + 1]; /**< Destination address. If the address is not set, then it is set to 0xFF */
+} TelSmsAddressInfo_t;
+
+/**
+ * @brief The structure type for different fields involved in setting the parameters of a particular SMS in EFsmsp.
+ * @since_tizen 2.3
+ */
+typedef struct {
+
+       unsigned char RecordIndex; /**< Index */
+       unsigned char RecordLen; /**< SMS Parameter Record length */
+       unsigned long AlphaIdLen; /**< Alpha ID length */
+       char szAlphaId[TAPI_SIM_SMSP_ALPHA_ID_LEN_MAX + 1]; /**< Alpha ID. It is a unique identifier for each row/record in EFsmsp */
+       unsigned char ParamIndicator; /**< SMS parameter indicator is a 1 byte value. Each bit in this value indicates the presence/absence of the SMS header parameters. If the parameter is present the corresponding bit value is set to @c 0. If the parameter is absent then it is set as @c 1. Refer 3GPP TS 31.02 :4.4.23 */
+       TelSmsAddressInfo_t TpDestAddr; /**< TP-destination address (TP-DA) */
+       TelSmsAddressInfo_t TpSvcCntrAddr; /**< TP-service center address */
+       unsigned short TpProtocolId; /**< TP-protocol ID */
+       unsigned short TpDataCodingScheme; /**< TP-data coding scheme */
+       unsigned short TpValidityPeriod; /**< TP-validity period */
+} TelSmsParams_t;
+
+/**
+ * @brief The structure type for the fields related to an SMS like format(3GPP/3GPP2), TPDU and length
+ * @details
+ * SCA will be filled by MSG_SERVICE for GSM/UMTS technology only.\n
+ * For CDMA SCA need not be filled by MSG_SERVICE.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char Sca[TAPI_SIM_SMSP_ADDRESS_LEN]; /**< Service Centre address - an optional parameter. If this parameter is not present, then this field will be Null.If present, the valid service centre address information is filled as per 3GPP TS23.040 9.1.2.5 Address fields */
+       int MsgLength; /**< Size of array szData (which is actual TPDU message) */
+       unsigned char szData[TAPI_NETTEXT_SMDATA_SIZE_MAX + 1]; /**<SMS TPDU message */
+       TelSmsNetType_t format;
+} TelSmsDatapackageInfo_t;
+
+/**
+ * @brief The structure type for data related to SimIndex, MessageStatus, and SMS Data Stored.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int SimIndex; /**< Index where SMS is stored */
+       TelSmsMsgStatus_t MsgStatus; /**< Message status */
+       TelSmsDatapackageInfo_t SmsData; /**< SMS message */
+} TelSmsData_t;
+
+/**
+ * @brief The structure type for different parameters that are related to the message count in a particular memory (Phone/SIM).
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned int TotalCount; /**< Total count of messages stored in the SIM */
+       int UsedCount; /**< Stored message count in the SIM */
+       int IndexList[TAPI_NETTEXT_SMS_MSG_NUM_MAX]; /**< Message index list stored in the SIM. And the maximum size of this array can be of @a TotalCount. This array contains the list of index values in which the messages are stored, i.e. index_list[totalcount] = [2,3] denotes that indexes 2 and 3 are stored(valid) and others are not(empty) */
+} TelSmsStoredMsgCountInfo_t;
+
+/**
+ * @brief The structure type for a cell broadcast message.
+ * @since_tizen 2.3
+ */
+typedef struct {
+
+       TelSmsCbMsgType_t CbMsgType; /**< Cell Broadcast message type */
+       unsigned short Length; /**< Size of array @a szMsgData (which is the actual TPDU message) */
+       char szMsgData[TAPI_NETTEXT_CB_SIZE_MAX + 1]; /**< Cell broadcast message data[Refer 3GPP TS 23.041 9.4.1] */
+} TelSmsCbMsg_t;
+
+/**
+ * @brief The structure type for a ETWS message.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSmsEtwsMsgType_t EtwsMsgType; /**< Cell Broadcast message type */
+       unsigned short Length; /**< Size of array @a szMsgData (which is the actual TPDU message) */
+       char szMsgData[TAPI_NETTEXT_ETWS_SIZE_MAX + 1]; /**< Cell broadcast message data[Refer 3GPP TS 23.041 9.4.1] */
+} TelSmsEtwsMsg_t;
+
+struct tel_noti_sms_incomming_msg {
+        char Sca[TAPI_SIM_SMSP_ADDRESS_LEN];   /**< TBD */
+        int MsgLength; /**< TBD */
+        char szData[TAPI_NETTEXT_SMDATA_SIZE_MAX + 1]; /**< TBD */
+       TelSmsNetType_t format;
+};
+
+struct tel_noti_sms_incomming_cb_msg {
+       TelSmsCbMsgType_t CbMsgType; /**< Cell Broadcast message type */
+        short Length; /**< Size of array @a szMsgData (which is the actual TPDU message) */
+        char szMsgData[TAPI_NETTEXT_CB_SIZE_MAX + 1]; /**< Cell broadcast message data[Refer 3GPP TS 23.041 9.4.1] */
+};
+
+struct tel_noti_sms_incomming_etws_msg {
+       TelSmsEtwsMsgType_t EtwsMsgType; /**< ETWS message type */
+        short Length; /**< Size of array @a szMsgData (which is the actual TPDU message) */
+        char szMsgData[TAPI_NETTEXT_ETWS_SIZE_MAX + 1]; /**< ETWS message data[Refer 3GPP TS 23.041 9.4.1] */
+};
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  // _TEL_NETTEXT_H_
+
+/**
+ * @}
+*/
diff --git a/include/TelSs.h b/include/TelSs.h
new file mode 100644 (file)
index 0000000..6340912
--- /dev/null
@@ -0,0 +1,533 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file TelSs.h
+ */
+
+/**
+ * @internal
+ * @addtogroup CAPI_TELEPHONY_SERVICE_SS
+ * @{
+ */
+
+#ifndef _TEL_SS_H_
+#define _TEL_SS_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @brief Definition for the maximum length of the barring password.
+ * @since_tizen 2.3
+ */
+#define TAPI_SS_GSM_BARR_PW_LEN_MAX                            4
+
+/**
+ * @brief Definition for the maximum length of the dial digit.
+ * @since_tizen 2.3
+ */
+#define TAPI_CALL_DIALDIGIT_LEN_MAX                            82
+
+/**
+ * @brief Definition for the maximum size of user-to-user data.
+ * @since_tizen 2.3
+ */
+#define TAPI_SS_USSD_DATA_SIZE_MAX                             208
+
+/**
+ * @brief Definition for the maximum size of the SS record.
+ * @since_tizen 2.3
+ */
+#define TAPI_SS_RECORD_NUM_MAX                                 5
+
+/* Supplementary Svc */
+#define TAPI_SS_ADDRESS_LEN_MAX                                        40
+#define TAPI_SS_CCBS_SIZE_MAX                                  5
+#define TAPI_SS_TELECOMM_SERVCE_SIZE_MAX               13
+#define TAPI_SS_PHONE_NUM_LEN_MAX                              33
+#define TAPI_SS_MMISTRING_LEN_MAX                              33
+#define TAPI_SS_PWD_LEN_MAX                                            5
+#define TAPI_MAX_RELEASE_COMPLETE_DATA_LEN             260
+#define TAPI_MAX_ULONG                                                 0xffffffff
+
+/**
+ * @brief Enumeration for the call forwarding condition.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SS_CF_WHEN_CFU = 0x01, /**< 0x01 : Call Forwarding Unconditional */
+       TAPI_SS_CF_WHEN_CFB,        /**< 0x02 : Call Forwarding Mobile Busy */
+       TAPI_SS_CF_WHEN_CFNRy,      /**< 0x03 : Call Forwarding No Reply */
+       TAPI_SS_CF_WHEN_CFNRc,      /**< 0x04 : Call Forwarding Not Reachable */
+       TAPI_SS_CF_WHEN_CF_ALL,     /**< 0x05 : All Call Forwarding */
+       TAPI_SS_CF_WHEN_CFC,        /**< 0x06 : All Conditional Call Forwarding */
+       TAPI_SS_CF_WHEN_MAX         /**< 0x07 : Max */
+} TelSsForwardWhen_t;
+
+typedef enum {
+       TAPI_SS_CF_TON_UNKNOWN = 0, /**< Unknown */
+       TAPI_SS_CF_TON_INTERNATIONAL = 1, /**< International number */
+       TAPI_SS_CF_TON_NATIONAL = 2, /**< National number */
+       TAPI_SS_CF_TON_NETWORK_SPECIFIC = 3, /**< Network specific number */
+       TAPI_SS_CF_TON_DEDICATED_ACCESS = 4, /**< Subscriber number */
+       TAPI_SS_CF_TON_ALPHA_NUMERIC = 5, /**< Alphanumeric, GSM 7-bit default alphabet) */
+       TAPI_SS_CF_TON_ABBREVIATED_NUMBER = 6, /**< Abbreviated number */
+       TAPI_SS_CF_TON_RESERVED_FOR_EXT = 7 /**< Reserved for extension */
+} TelSsForwardTypeOfNum_t;
+
+typedef enum {
+       TAPI_SS_CF_NPI_UNKNOWN = 0, /**< Unknown */
+       TAPI_SS_CF_NPI_ISDN_TEL = 1, /**< ISDN/Telephone numbering plan */
+       TAPI_SS_CF_NPI_DATA_NUMBERING_PLAN = 3, /**< Data numbering plan */
+       TAPI_SS_CF_NPI_TELEX = 4, /**< Telex numbering plan */
+       TAPI_SS_CF_NPI_SVC_CNTR_SPECIFIC_PLAN = 5, /**< Service Center Specific plan */
+       TAPI_SS_CF_NPI_SVC_CNTR_SPECIFIC_PLAN2 = 6, /**< Service Center Specific plan */
+       TAPI_SS_CF_NPI_NATIONAL = 8, /**< National numbering plan */
+       TAPI_SS_CF_NPI_PRIVATE = 9, /**< Private numbering plan */
+       TAPI_SS_CF_NPI_ERMES_NUMBERING_PLAN = 10, /**< ERMES numbering plan */
+       TAPI_SS_CF_NPI_RESERVED_FOR_EXT = 0xF /**< Reserved for extension */
+} TelSsForwardNumberingPlanIdentity_t;
+
+/**
+ * @brief Enumeration for various types of call barring.
+ * @details Note, only one type of incoming barring and only one type of outgoing barring may be active at any time.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SS_CB_TYPE_BAOC = 0x01,         /**< 0x01 : Barring All Outgoing Calls */
+       TAPI_SS_CB_TYPE_BOIC,                /**< 0x02 : Barring Outgoing International Calls */
+       TAPI_SS_CB_TYPE_BOIC_NOT_HC,         /**< 0x03 : Barring Outgoing International Calls
+                                                                             except to Home Country */
+       TAPI_SS_CB_TYPE_BAIC,                /**< 0x04 : Barring All Incoming Calls */
+       TAPI_SS_CB_TYPE_BIC_ROAM,            /**< 0x05 : Barring Incoming Calls when roaming
+                                                                                 outside the Home Country */
+       TAPI_SS_CB_TYPE_AB,                  /**< 0x06 : All Barring Services */
+       TAPI_SS_CB_TYPE_AOB,                 /**< 0x07 : All Outgoing Barring Services */
+       TAPI_SS_CB_TYPE_AIB,                 /**< 0x08 : All Incoming Barring Services */
+       TAPI_SS_CB_TYPE_BIC_NOT_SIM,         /**< 0x09 : Barring Incoming Calls which is
+                                                                             not stored in the SIM memory */
+       TAPI_SS_CB_TYPE_MAX
+} TelSsBarringType_t;
+
+/**
+ * @brief Enumeration for the USSD indication type. Applicable to 3GPP(GSM/UMTS/LTE) only.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SS_USSD_STATUS_NOTIFY = 0x00, /**< Notify : to display USSD data to the user */
+       TAPI_SS_USSD_STATUS_NO_ACTION_REQUIRE = 0x01, /**< No further user action required */
+       TAPI_SS_USSD_STATUS_ACTION_REQUIRE = 0x02, /**< Further user action required */
+       TAPI_SS_USSD_STATUS_TERMINATED_BY_NET = 0x03, /**< 0x03 : USSD terminated by the network */
+       TAPI_SS_USSD_STATUS_OTHER_CLIENT = 0x04, /**< 0x04 : Other local client has responded */
+       TAPI_SS_USSD_STATUS_NOT_SUPPORT = 0x05, /**< 0x05 : Operation not supported */
+       TAPI_SS_USSD_STATUS_TIME_OUT = 0x06 /**< 0x06 : Time out when there is no response from the network */
+} TelSsUssdStatus_t;
+
+/**
+ * @brief Enumeration for the USSD type. Applicable to 3GPP(GSM/UMTS/LTE) only.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SS_USSD_TYPE_USER_INIT = 0x01, /**< USSD request type - User Initiated */
+       TAPI_SS_USSD_TYPE_USER_RSP, /**< USSD request type - User Response */
+       TAPI_SS_USSD_TYPE_USER_REL /**< USSD request type - User Release */
+} TelSsUssdType_t;
+
+/**
+ * @brief Enumeration for the call barring operation mode.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SS_CB_MODE_ACTIVATE, /**< Activate call barring */
+       TAPI_SS_CB_MODE_DEACTIVATE, /**< Deactivate call barring */
+} TelSsBarringMode_t;
+
+/**
+ * @brief Enumeration for the call barring operation mode.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SS_CW_MODE_ACTIVATE, /**< Activate call barring */
+       TAPI_SS_CW_MODE_DEACTIVATE, /**< Deactivate call barring */
+} TelSsCallWaitingMode_t;
+
+/**
+ * @brief Enumeration for the call type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       /* TELESERVICE */
+       TAPI_SS_CLASS_ALL_TELE=0x10,             /**< 0x10 : All Teleservices */
+       TAPI_SS_CLASS_VOICE=0x11,                /**< 0x11 : Voice ( telephony ) */
+       TAPI_SS_CLASS_ALL_DATA_TELE=0x12,        /**< 0x12 : All Data Teleservices */
+       TAPI_SS_CLASS_FAX=0x13,                  /**< 0x13 : Fax Service */
+       TAPI_SS_CLASS_SMS=0x16,                  /**< 0x16 : SMS service */
+       TAPI_SS_CLASS_VGCS=0x17,                 /**< 0x17 : Voice Group Call Service */
+       TAPI_SS_CLASS_VBS=0x18,                  /**< 0x18 : Voice Broadcast */
+       TAPI_SS_CLASS_ALL_TELE_EXPT_SMS=0x19,    /**< 0x19 : All teleservices except SMS */
+
+       /* BEARER SERVICE */
+       TAPI_SS_CLASS_ALL_BEARER=0x20,           /**< 0X20 : All Bearer services */
+       TAPI_SS_CLASS_ALL_ASYNC=0x21,            /**< 0x21 : All Async services */
+       TAPI_SS_CLASS_ALL_SYNC=0x22,             /**< 0x22 : All Sync services */
+       TAPI_SS_CLASS_ALL_CS_SYNC=0x24,          /**< 0x24 : All Circuit switched sync */
+       TAPI_SS_CLASS_ALL_CS_ASYNC=0x25,         /**< 0x25 : All Circuit switched async */
+       TAPI_SS_CLASS_ALL_DEDI_PS=0x26,          /**< 0x26 : All Dedicated packet Access */
+       TAPI_SS_CLASS_ALL_DEDI_PAD=0x27,         /**< 0x27 : All Dedicated PAD Access */
+       TAPI_SS_CLASS_ALL_DATA_CDA=0x28,                 /**< 0x28 : All Data CDA */
+
+       /* PLMN SPECIFIC TELESERVICE */
+       TAPI_SS_CLASS_PLMN_TELE_ALL = 0x50,      /**< 0x50 : PLMN specific teleservices */
+       TAPI_SS_CLASS_PLMN_TELE_1 = 0x51,        /**< 0x51 : PLMN specific teleservice 1 */
+       TAPI_SS_CLASS_PLMN_TELE_2 = 0x52,        /**< 0x52 : PLMN specific teleservice 2 */
+       TAPI_SS_CLASS_PLMN_TELE_3 = 0x53,        /**< 0x53 : PLMN specific teleservice 3 */
+       TAPI_SS_CLASS_PLMN_TELE_4 = 0x54,        /**< 0x54 : PLMN specific teleservice 4 */
+       TAPI_SS_CLASS_PLMN_TELE_5 = 0x55,        /**< 0x55 : PLMN specific teleservice 5 */
+       TAPI_SS_CLASS_PLMN_TELE_6 = 0x56,        /**< 0x56 : PLMN specific teleservice 6 */
+       TAPI_SS_CLASS_PLMN_TELE_7 = 0x57,        /**< 0x57 : PLMN specific teleservice 7 */
+       TAPI_SS_CLASS_PLMN_TELE_8 = 0x58,        /**< 0x58 : PLMN specific teleservice 8 */
+       TAPI_SS_CLASS_PLMN_TELE_9 = 0x59,        /**< 0x59 : PLMN specific teleservice 9 */
+       TAPI_SS_CLASS_PLMN_TELE_A = 0x60,        /**< 0x60 : PLMN specific teleservice 10 */
+       TAPI_SS_CLASS_PLMN_TELE_B = 0x61,        /**< 0x61 : PLMN specific teleservice 11 */
+       TAPI_SS_CLASS_PLMN_TELE_C = 0x62,        /**< 0x62 : PLMN specific teleservice 12 */
+       TAPI_SS_CLASS_PLMN_TELE_D = 0x63,        /**< 0x63 : PLMN specific teleservice 13 */
+       TAPI_SS_CLASS_PLMN_TELE_E = 0x64,        /**< 0x64 : PLMN specific teleservice 14 */
+       TAPI_SS_CLASS_PLMN_TELE_F = 0x65,        /**< 0x65 : PLMN specific teleservice 15 */
+
+       /* PLMN SPECIFIC BEARER SERVICE */
+       TAPI_SS_CLASS_PLMN_BEAR_ALL = 0x70,      /**< 0x70 : All PLMN specific bearer services */
+       TAPI_SS_CLASS_PLMN_BEAR_1 = 0x71,        /**< 0x71 : PLMN specific bearer service 1 */
+       TAPI_SS_CLASS_PLMN_BEAR_2 = 0x72,        /**< 0x72 : PLMN specific bearer service 2 */
+       TAPI_SS_CLASS_PLMN_BEAR_3 = 0x73,        /**< 0x73 : PLMN specific bearer service 3 */
+       TAPI_SS_CLASS_PLMN_BEAR_4 = 0x74,        /**< 0x74 : PLMN specific bearer service 4 */
+       TAPI_SS_CLASS_PLMN_BEAR_5 = 0x75,        /**< 0x75 : PLMN specific bearer service 5 */
+       TAPI_SS_CLASS_PLMN_BEAR_6 = 0x76,        /**< 0x76 : PLMN specific bearer service 6 */
+       TAPI_SS_CLASS_PLMN_BEAR_7 = 0x77,        /**< 0x77 : PLMN specific bearer service 7 */
+       TAPI_SS_CLASS_PLMN_BEAR_8 = 0x78,        /**< 0x78 : PLMN specific bearer service 8 */
+       TAPI_SS_CLASS_PLMN_BEAR_9 = 0x79,        /**< 0x79 : PLMN specific bearer service 9 */
+       TAPI_SS_CLASS_PLMN_BEAR_A = 0x80,        /**< 0x80 : PLMN specific bearer service 10 */
+       TAPI_SS_CLASS_PLMN_BEAR_B = 0x81,        /**< 0x81 : PLMN specific bearer service 11 */
+       TAPI_SS_CLASS_PLMN_BEAR_C = 0x82,        /**< 0x82 : PLMN specific bearer service 12 */
+       TAPI_SS_CLASS_PLMN_BEAR_D = 0x83,        /**< 0x83 : PLMN specific bearer service 13 */
+       TAPI_SS_CLASS_PLMN_BEAR_E = 0x84,        /**< 0x84 : PLMN specific bearer service 14 */
+       TAPI_SS_CLASS_PLMN_BEAR_F = 0x85,        /**< 0x85 : PLMN specific bearer service 15 */
+
+       /* CPHS - AUXILIARY SERVICE */
+       TAPI_SS_CLASS_AUX_VOICE = 0x89,                  /**< 0x89 : Auxiliary Voice ( Auxiliary telephony ) */
+
+       TAPI_SS_CLASS_ALL_GPRS_BEARER=0x99,      /**< 0x99 : All GPRS bearer services */
+       TAPI_SS_CLASS_ALL_TELE_BEARER=0xFF,      /**< 0xFF : All tele and bearer services */
+} TelSsClass_t;
+
+/**
+ * @brief Enumeration for the forward mode.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SS_CF_MODE_DISABLE_EV, /**< Deactivate call forwarding */
+       TAPI_SS_CF_MODE_ENABLE_EV, /**< Activate call forwarding */
+       TAPI_SS_CF_MODE_REGISTRATION_EV, /**< Register call forwarding  */
+       TAPI_SS_CF_MODE_ERASURE_EV, /**< Deregister call forwarding */
+} TelSsForwardMode_t;
+
+/**
+ * @brief Enumeration for no-reply time.
+ * @since_tizen 2.3
+ * @remarks Applicable to 3GPP(GSM/UMTS/LTE) only.
+ */
+typedef enum {
+       TAPI_SS_CF_NO_REPLY_TIME_5_SECS = 5,   /**< Timer value set to 5secs */
+       TAPI_SS_CF_NO_REPLY_TIME_10_SECS = 10, /**< Timer value set to 10secs */
+       TAPI_SS_CF_NO_REPLY_TIME_15_SECS = 15, /**< Timer value set to 15secs */
+       TAPI_SS_CF_NO_REPLY_TIME_20_SECS = 20, /**< Timer value set to 20secs */
+       TAPI_SS_CF_NO_REPLY_TIME_25_SECS = 25, /**< Timer value set to 25secs */
+       TAPI_SS_CF_NO_REPLY_TIME_30_SECS = 30, /**< Timer value set to 30secs */
+} TelSsNoReplyTime_t;
+
+/**
+ * @brief Enumeration for the supplementary service request results.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SS_SUCCESS=0x0, /**<  SS operation is successful */
+
+       TAPI_SS_UNKNOWNSUBSCRIBER= 0x01, /**< SS error indicating unknown/illegal subscriber */
+       TAPI_SS_ILLEGALSUBSCRIBER= 0x09, /**< This error is returned when illegality of the access has been @n
+        established by use of an authentication procedure */
+
+       TAPI_SS_BEARERSERVICENOTPROVISIONED= 0x0a, /**< The network returns this error when it is requested to @n
+        perform an operation on a supplementary service */
+       TAPI_SS_TELESERVICENOTPROVISIONED= 0x0b, /**< The network returns this error when it is requested to perform @n
+        an operation on a supplementary service */
+       TAPI_SS_ILLEGALEQUIPMENT= 0x0c, /**< This error is returned when the IMEI check procedure has shown that @n
+        the IMEI is blacklisted or it is not whitelisted */
+       TAPI_SS_CALLBARRED= 0x0d, /**< This error is returned by the network to the MS when call independent subscriber control procedures are barred by the operator */
+       TAPI_SS_ILLEGALSSOPERATION=0x10, /**< This error is returned by the network when it is requested to perform an illegal operation @n
+        which is defined as not applicable for the relevant supplementary service */
+       TAPI_SS_ERRORSTATUS= 0x11, /**< This error is returned by the network when it is requested to perform an operation @n
+        which is not compatible with the current status of the relevant supplementary service */
+       TAPI_SS_NOTAVAILABLE= 0x12, /**< SS not available in the network */
+       TAPI_SS_SUBSCRIPTIONVIOLATION= 0x13, /**< SS service subscription violation */
+       TAPI_SS_INCOMPATIBILITY= 0x14, /**< This error is returned by the network when it is requested for a supplementary service operation that is incompatible with the @n
+        status of another supplementary service or with the teleservice or bearer service for which the operation is requested */
+       TAPI_SS_FACILITYNOTSUPPORTED= 0x15, /**< SS service facility not supported */
+       TAPI_SS_ABSENTSUBSCRIBER= 0x1b, /**< This error is returned when the subscriber has activated the detach service or the system detects the absence condition */
+
+       TAPI_SS_SYSTEMFAILURE= 0x22, /**< This error is returned by the network, when it cannot perform an operation because of a failure in the network */
+       TAPI_SS_DATAMISSING= 0x23, /**< This error is returned by the network when an optional parameter is missing in an invoke component @n
+        or an inner data structure, while it is required by the context of the request */
+       TAPI_SS_UNEXPECTEDDATAVALUE= 0x24, /**< SS error indicating an unexpected data value on the network side *//**< SS operation barred */
+       TAPI_SS_PWREGISTRATIONFAILURE= 0x25, /**< SS error indicating a change password failure */
+       TAPI_SS_NEGATIVEPWCHECK= 0x26, /**< SS error indicating a negative password check */
+       TAPI_SS_NUMBEROFPWATTEMPTSVIOLATION= 0x2b, /**< SS error indicating violation in barring password attempts */
+
+       TAPI_SS_UNKNOWNALPHABET= 0x47, /**< SS error indicating unknown SS data coding of an alphabet */
+       TAPI_SS_USSDBUSY= 0x48, /**< SS error indicating USSD Busy(Already SS / USSD is ongoing) */
+
+       TAPI_SS_FIXED_DIALING_NUMBER_ONLY = 0x5F, /**< SS error indicating Dialing number is not FDN */
+
+       TAPI_SS_REJECTEDBYUSER= 0x79, /**< SS operation rejected by the user */
+       TAPI_SS_REJECTEDBYNETWORK=0x7a, /**< SS operation rejected by the network */
+       TAPI_SS_DEFLECTIONTOSERVEDSUBSCRIBER= 0x7b, /**< This error is returned if a diversion to the served @n
+        subscriber's number is requested */
+       TAPI_SS_SPECIALSERVICECODE= 0x7c, /**< This error is returned if a diversion to a special service code is requested */
+       TAPI_SS_INVALIDDEFLECTEDTONUMBER= 0x7d, /**< SS error indicating invalid deflected to a number */
+       TAPI_SS_MAXNOMPTYEXCEEDED= 0x7e, /**< SS error indicating Maximum MPTY is reached */
+       TAPI_SS_RESOURCESNOTAVAILABLE= 0x7f, /**< SS error indicating resources not available in the network */
+       TAPI_SS_REJECTEDBYCALLCONTROL= 0x80, /**< SS error indicating resources not available in the network */
+
+       TAPI_SS_TIMEREXPIRE, /**< SS operation timer expired on the network */
+       TAPI_SS_NET_NOT_ALLOWED_EMERGENCY_CALLS_ONLY, /**< SS operation is not allowed by the network */
+       TAPI_SS_UNKNOWNERROR, /**< SS error indicating an unknown error */
+       TAPI_SS_OEM_NOT_SUPPORTED /**< If OEM does not support any SS requests, then this error will be returned */
+} TelSsCause_t;
+
+/**
+ * @brief Enumeration for the status of a supplementary service feature (e.g. call forwarding or call barring).
+ * @details These enumerated values should be used as masks.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SS_STATUS_REGISTERED = 0x01, /**< Provisioned & registered (but not active/active-quiescent */
+       TAPI_SS_STATUS_PROVISIONED, /**<Provisioned but not registered (or active/active-quiescent) */
+       TAPI_SS_STATUS_ACTIVE, /**< Provisioned & registered & active */
+       TAPI_SS_STATUS_QUIESCENT, /**< Provisioned & registered & active but quiescent */
+       TAPI_SS_STATUS_NOTHING /**< Not provisioned */
+} TelSsStatus_t;
+
+/**
+ * @brief Enumeration for the types of identity presentation / restriction services.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CALLING_LINE_IDENTITY_PRESENTATION= 0x01, /**< Identify the party calling this phone */
+       TAPI_CALLING_LINE_IDENTITY_RESTRICTION, /**< Hide the identity of this phone when calling others */
+       TAPI_CONNECTED_LINE_IDENTITY_PRESENTATION, /**< Identify the party to whom the calling party (this phone) is connected */ /* 3GPP(GSM/UMTS/LTE) Specific */
+       TAPI_CONNECTED_LINE_IDENTITY_RESTRICTION, /**< Restrict yourself from being identified by incoming calls, such as forwarded calls */ /* 3GPP(GSM/UMTS/LTE) Specific */
+       TAPI_CALLED_LINE_IDENTITY_PRESENTATION, /**< Called line identity presentation */ /* 3GPP(GSM/UMTS/LTE) Specific */
+       TAPI_CALLING_NAME_PRESENTATION /**< Calling Name Presentation */ /* 3GPP(GSM/UMTS/LTE) Specific */
+} TelSsLineIdentificationType_t;
+
+/**
+ * @brief Enumeration for the CLI service status.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_CLI_STATUS_NOT_PROVISONED = 0x01, /**< Service not provided by the service provider */
+       TAPI_CLI_STATUS_PROVISIONED, /**< Service is provided by the service provider */
+       TAPI_CLI_STATUS_ACTIVATED, /**< Service is activated at the network */
+       TAPI_CLI_STATUS_UNKOWN, /**< Service status is unknown */
+       TAPI_CLI_STATUS_TEMP_RESTRICTED, /**< Service is temporarily restricted */
+       TAPI_CLI_STATUS_TEMP_ALLOWED /**< Service is temporarily allowed */
+} TelSsCliStatus_t;
+
+/**
+ * @brief Enumeration for the CLI service type.
+ * @since_tizen 2.3
+ */
+typedef enum {
+       TAPI_SS_CLI_CLIP = 0x01, /**< Calling Line Identification Presentation */
+       TAPI_SS_CLI_CLIR = 0x02, /**< Calling Line Identification Restriction */
+       TAPI_SS_CLI_COLP = 0x03, /**< Connected Line Identification Presentation */ /* 3GPP(GSM/UMTS/LTE) Specific */
+       TAPI_SS_CLI_COLR = 0x04, /**< Connected Line Identification Restriction */ /* 3GPP(GSM/UMTS/LTE) Specific */
+       TAPI_SS_CLI_CDIP = 0x05, /**< Called Line Identification Presentation */ /* 3GPP(GSM/UMTS/LTE) Specific*/
+       TAPI_SS_CLI_CNAP = 0x06, /**< Calling Name Presentation */ /* 3GPP(GSM/UMTS/LTE) Specific */
+} TelSsCliType_t;
+
+typedef enum {
+       TAPI_SS_TYPE_BARRING = 0x00,    /**< TBD */
+       TAPI_SS_TYPE_FORWARDING,        /**< TBD */
+       TAPI_SS_TYPE_WAITING,   /**< TBD */
+       TAPI_SS_TYPE_CLI,       /**< TBD */
+       TAPI_SS_TYPE_SEND_USSD, /**< TBD */
+       TAPI_SS_TYPE_MAX        /**< TBD */
+}TelSsInfoType_t;
+
+/**
+ * @brief The structure type for the parameters related to forward info.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSsClass_t Class;     /**< TBD */
+       TelSsForwardMode_t Mode; /**< Forward Mode */
+       TelSsForwardWhen_t Condition; /**< Forward Condition */
+       TelSsNoReplyTime_t NoReplyConditionTimer; /**< No reply wait time 5-30 secs in intervals of 5 */ /* 3GPP(GSM/UMTS/LTE) Specific */
+       TelSsForwardTypeOfNum_t Ton;    /**< TBD */
+       TelSsForwardNumberingPlanIdentity_t Npi;        /**< TBD */
+       unsigned char szPhoneNumber[TAPI_CALL_DIALDIGIT_LEN_MAX]; /**< Phone Number */
+} TelSsForwardInfo_t;
+
+/**
+ * @brief The structure type defining values for USSD request type. Applicable to 3GPP(GSM/UMTS/LTE) only.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSsUssdType_t Type;   /**< TBD */
+       unsigned char  Dcs;     /**< TBD */
+       int Length; /**< USSD  String Length */
+       char szString[TAPI_SS_USSD_DATA_SIZE_MAX]; /**< USSD  String */
+} TelSsUssdMsgInfo_t;
+
+/**
+ * @brief The structure type for parameters related to call barring.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSsClass_t Class; /**< Call type */
+       TelSsBarringMode_t Mode; /**< Barring mode */
+       TelSsBarringType_t Type; /**< Barring type */
+       char szPassword[TAPI_SS_GSM_BARR_PW_LEN_MAX]; /**< Password */ /* 3GPP(GSM/UMTS/LTE) Specific */
+} TelSsBarringInfo_t;
+
+/**
+ * @brief The structure type for parameters related to call waiting.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSsClass_t Class; /**< Call type */
+       TelSsCallWaitingMode_t Mode; /**< Waiting mode */
+} TelSsWaitingInfo_t;
+
+/**
+ * @brief The structure type for SUPS information message notification type.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSsCause_t Cause; /**< Cause */
+       TelSsInfoType_t SsType; /**< SUPS Information */
+} TelSsInfo_t;
+
+
+/**
+ * @brief The structure type for release complete message notification type.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       unsigned char RelCompMsgLen; /**< Specifies the Release complete msg length */
+       unsigned char szRelCompMsg[TAPI_MAX_RELEASE_COMPLETE_DATA_LEN]; /**<  Specifies the Release complete msg */
+} TelSsRelCompMsgInfo_t;
+
+/**
+ * @brief The structure type defining values for SS call barring record. Applicable to 3GPP(GSM/UMTS/LTE) only.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int record_num; /**< TBD */
+       struct {
+               TelSsClass_t Class;     /**< TBD */
+               TelSsStatus_t Status; /**< SS status */
+               TelSsBarringType_t Flavour; /**< Call barring types providing various barring conditions on which calls are barred */
+       } record[TAPI_SS_RECORD_NUM_MAX]; /**< Specifies the Maximum of #TAPI_SS_RECORD_NUM_MAX records */
+} TelSsBarringResp_t;
+
+typedef TelSsBarringResp_t TelSsBarringNoti_t;
+
+/**
+ * @brief The structure type defining values for SS call forwarding record. Applicable to 3GPP(GSM/UMTS/LTE) only.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int record_num; /**< TBD */
+       struct {
+               TelSsClass_t Class;     /**< TBD */
+               TelSsStatus_t Status; /**< Call forwarding SS status */
+               TelSsForwardWhen_t ForwardCondition; /**< Call forward types providing various conditions when a call can be forwarded */
+               int bCallForwardingNumberPresent; /**< Flag that indicates whether call forwarding number is present */
+               TelSsNoReplyTime_t NoReplyWaitTime;     /**< TBD */
+               TelSsForwardTypeOfNum_t Ton;    /**< TBD */
+               TelSsForwardNumberingPlanIdentity_t Npi;        /**< TBD */
+               unsigned char szCallForwardingNumber[TAPI_CALL_DIALDIGIT_LEN_MAX + 1]; /**< Forwarded number [Null Terminated string] */
+       } record[TAPI_SS_RECORD_NUM_MAX]; /**< Specifies the maximum of #TAPI_SS_RECORD_NUM_MAX records */
+} TelSsForwardResp_t;
+
+typedef TelSsForwardResp_t TelSsForwardNoti_t;
+
+/**
+ * @brief The structure type defining values for SS call waiting record. Applicable to 3GPP(GSM/UMTS/LTE) only.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       int record_num; /**< TBD */
+       struct {
+               TelSsClass_t Class;     /**< TBD */
+               TelSsStatus_t Status; /**< SS status */
+       } record[TAPI_SS_RECORD_NUM_MAX]; /**< Specifies the maximum of #TAPI_SS_RECORD_NUM_MAX records */
+} TelSsWaitingResp_t;
+
+typedef TelSsWaitingResp_t TelSsWaitingNoti_t;
+
+/**
+ * @brief The structure type defining values for calling line identity service. Applicable to 3GPP(GSM/UMTS/LTE) only.
+ * @since_tizen 2.3
+ */
+typedef struct {
+       TelSsLineIdentificationType_t Type; /**< Various line identification types */
+       TelSsCliStatus_t Status; /**< Line identification status from the network */
+} TelSsCliResp_t;
+
+/* Applicable to 3GPP(GSM/UMTS/LTE) only */
+typedef struct {
+       TelSsUssdType_t Type;   /**< TBD */
+       TelSsUssdStatus_t Status;       /**< TBD */
+       unsigned char Dcs;      /**< TBD */
+       int Length; /**< USSD String Length */
+       char szString[TAPI_SS_USSD_DATA_SIZE_MAX]; /**< USSD String */
+} TelSsUssdResp_t;
+
+/* Applicable to 3GPP(GSM/UMTS/LTE) only */
+typedef struct {
+       TelSsUssdStatus_t Status;       /**< TBD */
+       unsigned char Dcs;      /**< TBD */
+       int Length; /**< USSD String Length */
+       char szString[TAPI_SS_USSD_DATA_SIZE_MAX]; /**< USSD String */
+} TelSsUssdNoti_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _TEL_SS_H_
+
+/**
+ * @}
+ */
diff --git a/include/private/tapi_log.h b/include/private/tapi_log.h
deleted file mode 100644 (file)
index 06859d9..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * libtapi
- *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __TAPI_LOG_H__
-#define __TAPI_LOG_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef FEATURE_DLOG_DEBUG
-
-#include <dlog.h>
-
-#ifndef TAPI_LOG_TAG
-#define TAPI_LOG_TAG "LIBTAPI"
-#endif
-
-#define msg(fmt,args...) do { RLOG(LOG_INFO, TAPI_LOG_TAG, fmt "\n", ##args); } while (0)
-#define dbg(fmt,args...) do { RLOG(LOG_DEBUG, TAPI_LOG_TAG, "<%s:%d> " fmt "\n", __func__, __LINE__, ##args); } while (0)
-#define warn(fmt,args...) do { RLOG(LOG_WARN, TAPI_LOG_TAG, "<%s:%d> " fmt "\n", __func__, __LINE__, ##args); } while (0)
-#define err(fmt,args...) do { RLOG(LOG_FATAL, TAPI_LOG_TAG, "<%s:%d> " fmt "\n", __func__, __LINE__, ##args); } while (0)
-
-#else
-
-#define msg(fmt,args...)
-#define dbg(fmt,args...)
-#define warn(fmt,args...)
-#define err(fmt,args...)
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __TAPI_LOG_H__ */
diff --git a/include/private/tapi_private.h b/include/private/tapi_private.h
deleted file mode 100644 (file)
index 42ef486..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * libtapi
- *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __TAPI_PRIVATE_H__
-#define __TAPI_PRIVATE_H__
-
-#include <glib.h>
-#include <glib-object.h>
-#include <gio/gio.h>
-
-#include "tapi_log.h"
-#include "tapi_events.h"
-
-#include <tel_generated_code.h>
-
-#define TAPI_DBUS_TIMEOUT_DEFAULT              (60000)
-#define TAPI_DBUS_TIMEOUT_MAX                  (180000)
-
-#define TEL_RETURN_IF_CHECK_FAIL(expr, ret) \
-       do { \
-               if (!(expr)) \
-                       return ret; \
-       } while(0)
-
-#define MAKE_RESP_CB_DATA(data, handle, cb, user_data)  \
-       data = g_new0(TapiRespCbData, 1); \
-       data->handle = handle; \
-       data->resp_cb = cb; \
-       data->user_data = user_data
-
-#define MAKE_EVT_CB_DATA(data, cb, user_data)  \
-       data = g_new0(TapiEvtCbData, 1); \
-       data->evt_cb = cb; \
-       data->user_data = user_data
-
-#define RESP_CALLBACK_CALL(resp_cb_data, tel_result, result_data) \
-       if (resp_cb_data && resp_cb_data->resp_cb) \
-               resp_cb_data->resp_cb(resp_cb_data->handle, tel_result, \
-                                       result_data, resp_cb_data->user_data); \
-       g_free(resp_cb_data)
-
-#define CHECK_DEINIT(error, resp_cb_data, tel_result) \
-       if (error) { \
-               dbg("dbus error = %d (%s)", error->code, error->message); \
-                if (error->code == G_IO_ERROR_CANCELLED \
-                               && error->domain == G_IO_ERROR) { \
-                       g_error_free(error); \
-                       g_free(resp_cb_data); \
-                       return; \
-               } \
-               RESP_CALLBACK_CALL(resp_cb_data, tel_result, NULL); \
-               g_error_free(error); \
-               return; \
-       }
-
-#define EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, data) \
-       if (evt_cb_data->evt_cb) \
-               evt_cb_data->evt_cb(handle, evt_id, data, evt_cb_data->user_data)
-
-#define GET_TAPI_HANDLE(data) data->handle
-
-/**
- *  @private
- */
-struct tapi_handle {
-       TelephonyModem *modem_proxy;    /* Modem proxy created with GDBus helper */
-       TelephonyCall *call_proxy;
-       TelephonySms *sms_proxy;
-       TelephonySim *sim_proxy;
-       TelephonyNetwork *network_proxy;
-       TelephonySap *sap_proxy;
-       TelephonyGps *gps_proxy;
-       TelephonyPhonebook *phonebook_proxy;
-       TelephonySs *ss_proxy;
-       TelephonySat *sat_proxy;
-
-       int modem_property_handler;
-       int network_property_handler;
-       int sim_property_handler;
-       int sms_property_handler;
-
-       int network_signal_handler;
-       int phonebook_signal_handler;
-       int call_signal_handler;
-       int ss_signal_handler;
-       int sms_signal_handler;
-       int sat_signal_handler;
-       int sap_signal_handler;
-       int gps_signal_handler;
-
-       char *cp_name;
-       GHashTable *evt_table;
-};
-
-/**
- * This structure defines the tapi response callback data
- */
-typedef struct {
-       struct tapi_handle *handle; /**< Handle */
-       TapiResponseCb resp_cb; /**< Response Callback Type*/
-       void* user_data; /**< User Data */
-} TapiRespCbData;
-
-/**
- * This structure defines the tapi event callback data
- */
-typedef struct {
-       TapiEvtCb evt_cb; /**< Event Callback Type */
-       void *user_data; /**< User Data */
-} TapiEvtCbData;
-
-#endif /* __TAPI_PRIVATE_H__ */
diff --git a/include/tapi.h b/include/tapi.h
deleted file mode 100644 (file)
index e843a4a..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * libtapi
- *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __TAPI_H__
-#define __TAPI_H__
-
-/**
-*  @addtogroup TAPI
-*  @{
-*
-*  @file tapi.h
-*  @brief TAPI Interface
-*/
-
-#include <tel_return.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * TAPI Handle
- */
-typedef struct tapi_handle TelHandle;
-
-/**
- * TAPI Response Callback Type
- * @param handle #TelHandle obtained from tapi_init()
- * @param result Result of operation of type TelResult<Module>
- * @param data Response Data from operation
- * @param user_data User Data
- */
-typedef void (*TapiResponseCb)(TelHandle *handle, int result, void *data, void *user_data);
-
-/**
- *  @brief Fetches the list of available CPs
- *
- *  @par Sync (or) Async:
- *  Synchronous API
- *
- *  @param[out] cp_list List of available CP names
- *
- *  @return #TelReturn
- */
-TelReturn tapi_get_cp_name_list(char ***cp_list);
-
-/**
- *  @brief Acquires a TAPI Handle for specified CP name
- *
- *  @par Sync (or) Async:
- *  Synchronous API
- *
- *  @param[in] cp_name CP Name against which TAPI handle is required \n
- *  NULL CP Name will return TelHandle bound to the first CP in the list of available CPs
- *
- *  @return #TelHandle
- */
-TelHandle *tapi_init(const char *cp_name);
-
-/**
- *  @brief De-initializes the TAPI Handle
- *
- *  @par Sync (or) Async:
- *  Synchronous API
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *
- *  @return #TelReturn
- */
-TelReturn tapi_deinit(TelHandle *handle);
-
-#ifdef __cplusplus
-}
-#endif
-
-/** @}*/
-
-#endif /* __TAPI_H__ */
diff --git a/include/tapi_call.h b/include/tapi_call.h
deleted file mode 100644 (file)
index 7ac62b7..0000000
+++ /dev/null
@@ -1,617 +0,0 @@
-/*
- * libtapi
- *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __TAPI_CALL_H__
-#define __TAPI_CALL_H__
-
-/**
-*  @addtogroup TAPI_CALL
-*  @{
-*
-*  @file tapi_call.h
-*  @brief TAPI Call Interface
-*/
-
-#include "tapi.h"
-#include <tel_call.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/**
- *  @brief Send a request to make outgoing calls
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] call_dial_info #TelCallDial Dialing call info
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelCallResult values:\n
- *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_CALL_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
- *  <b>TEL_CALL_RESULT_FDN_RESTRICTED</b>: FDN calls only\n
- *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
- *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
- *  \em data NULL
- */
-TelReturn tapi_call_dial(TelHandle *handle, const TelCallDial *call_dial_info,
-                               TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Sends a request to answer incoming call
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] ans_type Call #TelCallAnswerType answering type. Example: accept,reject
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelCallResult values:\n
- *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_CALL_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
- *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
- *  \em data NULL
- */
-TelReturn tapi_call_answer(TelHandle *handle, TelCallAnswerType ans_type,
-                               TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Sends a request to end a particular active call
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] call_end_info #TelCallEnd Info to end a call
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelCallResult values:\n
- *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_CALL_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
- *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
- *  \em data NULL
- */
-TelReturn tapi_call_end(TelHandle *handle, const TelCallEnd *call_end_info,
-                       TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Sends a request to send DTMF string
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] dtmf_str DTMF string to send
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelCallResult values:\n
- *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_CALL_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
- *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
- *  \em data NULL
- */
-TelReturn tapi_call_send_dtmf(TelHandle *handle, const char *dtmf_str,
-                               TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Sends a request to hold a call
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelCallResult values:\n
- *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_CALL_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
- *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
- *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
- *  \em data NULL
- */
-TelReturn tapi_call_hold(TelHandle *handle, TapiResponseCb callback,
-                               void *user_data);
-
-/**
- *  @brief Sends a request to make the hold call active
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelCallResult values:\n
- *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
- *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
- *  \em data NULL
- */
-TelReturn tapi_call_active(TelHandle *handle, TapiResponseCb callback,
-                               void *user_data);
-
-/**
- *  @brief Sends a request to swap calls
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelCallResult values:\n
- *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
- *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
- *  \em data NULL
- */
-TelReturn tapi_call_swap(TelHandle *handle, TapiResponseCb callback,
-                               void *user_data);
-
-/**
- *  @brief send a request to join calls
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelCallResult values:\n
- *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
- *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
- *  \em data NULL
- */
-TelReturn tapi_call_join(TelHandle *handle, TapiResponseCb callback,
-                               void *user_data);
-
-/**
- *  @brief Sends a request to split calls
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] call_id Call Id of the call to split
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelCallResult values:\n
- *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
- *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
- *  \em data NULL
- */
-TelReturn tapi_call_split(TelHandle *handle, unsigned int call_id,
-                               TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Sends a request to transfer a call
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelCallResult values:\n
- *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
- *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
- *  \em data NULL
- */
-TelReturn tapi_call_transfer(TelHandle *handle, TapiResponseCb callback,
-                               void *user_data);
-
-/**
- *  @brief Sends a request to delflect a call
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] deflect_to Deflecting Number
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelCallResult values:\n
- *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
- *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
- *  \em data NULL
- */
-TelReturn tapi_call_deflect(TelHandle *handle, const char *deflect_to,
-                               TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Sends a request to set active line
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] active_line #TelCallActiveLine Active line info
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelCallResult values:\n
- *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_CALL_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
- *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
- *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
- *  \em data NULL
- */
-TelReturn tapi_call_set_active_line(TelHandle *handle, TelCallActiveLine active_line,
-                               TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Sends a request to get active line status
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelCallResult values:\n
- *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
- *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
- *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
- *  \em data #TelCallActiveLine if result is TEL_CALL_RESULT_SUCCESS
- */
-TelReturn tapi_call_get_active_line(TelHandle *handle, TapiResponseCb callback,
-                                       void *user_data);
-
-/**
- *  @brief Sends a request to get the call status of a particular call
- *
- *  @par Sync (or) Async:
- *  Synchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] call_id Id of the call to know the status of that call
- *  @param[out] call_status #TelCallStatus Status of the call
- */
-TelReturn tapi_call_get_status(TelHandle *handle, unsigned int call_id,
-                                       TelCallStatus *call_status );
-
-/**
- *  @brief Sends a request to get the call status of all ongoing calls
- *
- *  @par Sync (or) Async:
- *  Synchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[out] call_status_list #TelCallStatusList List of status of all calls
- */
-TelReturn tapi_call_get_status_all(TelHandle *handle, TelCallStatusList *call_status_list);
-
-/**
- *  @brief Sends a request to set volume level
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] volume_info #TelCallVolumeInfo Info to set Call Volume
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelCallResult values:\n
- *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_CALL_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
- *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
- *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
- *  \em data NULL
- */
-TelReturn tapi_call_set_volume_info(TelHandle *handle, const TelCallVolumeInfo *volume_info,
-                               TapiResponseCb callback, void *user_data );
-
-/**
- *  @brief Sends a request to get volume level
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] sound_device #TelCallSoundDevice Device info to get volume info
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelCallResult values:\n
- *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_CALL_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
- *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
- *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
- *  \em data (unsigned int volume_info) if result is TEL_CALL_RESULT_SUCCESS
- */
-TelReturn tapi_call_get_volume_info(TelHandle *handle, TelCallSoundDevice sound_device,
-                               TapiResponseCb callback, void *user_data );
-
-/**
- *  @brief Sends a request to set call sound path
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] sound_path_info #TelCallSoundPathInfo Info to set sound path
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelCallResult values:\n
- *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_CALL_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
- *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
- *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
- *  \em data NULL
- */
-TelReturn tapi_call_set_sound_path(TelHandle *handle, const TelCallSoundPathInfo *sound_path_info,
-                               TapiResponseCb callback, void *user_data );
-
-/**
- *  @brief Sends a request to set a call to mute
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] mute <b>TRUE</b>: Mute is ON\n <b>FALSE</b>: Mute is OFF
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelCallResult values:\n
- *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_CALL_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
- *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
- *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
- *  \em data NULL
- */
-TelReturn tapi_call_set_mute(TelHandle *handle, gboolean mute,
-                               TapiResponseCb callback, void *user_data );
-
-/**
- *  @brief Sends a request to get the status of call mute
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelCallResult values:\n
- *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
- *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
- *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
- *  \em data (gboolean enable) is valid if result is TEL_CALL_RESULT_SUCCESS <b>TRUE</b>: Mute is ON\n <b>FALSE</b>: Mute is OFF
- */
-TelReturn tapi_call_get_mute_status(TelHandle *handle,
-                               TapiResponseCb callback, void *user_data );
-
-/**
- *  @brief Sends a request to set call sound recording
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] sound_rec #TelCallSoundRecording Sound Recording start/stop info
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelCallResult values:\n
- *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_CALL_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
- *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
- *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
- *  \em data NULL
- */
-TelReturn tapi_call_set_sound_recording(TelHandle *handle, TelCallSoundRecording sound_rec,
-                               TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Sends a request to set sound equailization
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] sound_eq #TelCallSoundEqualization Info to set sound equalization
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelCallResult values:\n
- *  <b>TEL_CALL_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_CALL_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_CALL_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_CALL_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
- *  <b>TEL_CALL_RESULT_NETWORK_BUSY</b>: Network is busy\n
- *  <b>TEL_CALL_RESULT_SERVICE_NOT_ALLOWED</b>: Service is not allowed\n
- *  \em data NULL
- */
-TelReturn tapi_call_set_sound_equalization(TelHandle *handle,
-                               const TelCallSoundEqualization *sound_eq,
-                               TapiResponseCb callback, void *user_data);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __TAPI_CALL_H__ */
-
- /**
-* @}
-*/
diff --git a/include/tapi_common.h b/include/tapi_common.h
new file mode 100644 (file)
index 0000000..cc44d59
--- /dev/null
@@ -0,0 +1,170 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _TAPI_COMMON_H_
+#define _TAPI_COMMON_H_
+
+/**
+ * @file tapi_common.h
+ */
+
+/**
+ * @internal
+ * @addtogroup CAPI_TELEPHONY_SERVICE
+ * @{
+ */
+
+#include <stdio.h>
+#include <glib.h>
+
+#include <tapi_type.h>
+#include <tapi_event.h>
+#include <TapiUtility.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Fetches a list of available CPs.
+ *
+ * @details <b> Sync (or) Async: </b> Synchronous API.
+ *
+ * @since_tizen 2.3
+ *
+ * @return The list of available CPs on SUCCESS,
+ *         otherwise @c NULL on FAILURE
+ */
+char **tel_get_cp_name_list(void);
+
+/**
+ * @brief Acquires a TAPI Handle for the specified CP name.
+ *
+ * @details <b> Sync (or) Async: </b> Synchronous API.
+ *
+ * @since_tizen 2.3
+ *
+ * @param[in] cp_name The CP Name against which a TAPI handle is required (A NULL CP Name will return a #TapiHandle bound to the first CP in the list of available CPs)
+ *
+ * @return #TapiHandle on SUCCESS,
+ *         otherwise @c NULL on FAILURE
+ * @see tel_deinit()
+ */
+TapiHandle *tel_init(const char *cp_name);
+
+/**
+ * @brief Deinitializes the TAPI Handle.
+ * @details <b> Sync (or) Async: </b> Synchronous API.
+ *
+ * @since_tizen 2.3
+ *
+ * @param[in] handle The #TapiHandle obtained from tel_init()
+ *
+ * @return #TapiResult_t
+ * @see tel_init()
+ */
+int tel_deinit(TapiHandle *handle);
+
+/**
+ * @brief Registers a notification callback for events on the DBus interface.
+ *
+ * @details
+ * <b> Sync (or) Async: </b> Synchronous API.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The #TapiHandle obtained from tel_init()
+ *
+ * @param[in] noti_id The notification ID for which a callback has to be registered
+ *
+ * @param[in] callback #tapi_notification_cb - The notification callback that will be invoked on the event
+ *
+ * @param user_data The user data
+ *
+ * @return #TapiResult_t
+ */
+int tel_register_noti_event(TapiHandle *handle, const char *noti_id, tapi_notification_cb callback, void *user_data);
+
+/**
+ * @brief Deregisters a notification callback for events on the DBus interface.
+ *
+ * @details <b> Sync (or) Async: </b> Synchronous API.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The #TapiHandle obtained from tel_init()
+ *
+ * @param[in] noti_id The notification ID for which a callback has to be de-registered
+ *
+ * @return #TapiResult_t
+ */
+int tel_deregister_noti_event(TapiHandle *handle, const char *noti_id);
+
+/**
+ * @brief Gets the property value in an integer format for the given property.
+ *
+ * @details <b> Sync (or) Async: </b> Synchronous API.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The #TapiHandle obtained from tel_init()
+ *
+ * @param[in] property The property to be retrieved from Dbus
+ *
+ * @param[out] result The property value in integer format
+ *
+ * @return #TapiResult_t
+ */
+int tel_get_property_int(TapiHandle *handle, const char *property, int *result);
+
+/**
+ * @brief Gets the property value in a string format for the given property.
+ *
+ * @details <b> Sync (or) Async: </b> Synchronous API.
+ *
+ * @since_tizen 2.3
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/telephony
+ *
+ * @param[in] handle The #TapiHandle obtained from tel_init()
+ *
+ * @param[in] property The property to be retrieved from Dbus
+ *
+ * @param[out] result The property value in string format
+ *
+ * @return #TapiResult_t
+ */
+int tel_get_property_string(TapiHandle *handle, const char *property, char **result);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TAPI_COMMON_H_ */
+
+/**
+ * @}
+ */
diff --git a/include/tapi_event.h b/include/tapi_event.h
new file mode 100644 (file)
index 0000000..4d320bc
--- /dev/null
@@ -0,0 +1,209 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TAPI_EVENT_H__
+#define __TAPI_EVENT_H__
+
+#include <tapi_type.h>
+
+__BEGIN_DECLS
+
+/**
+ * @file tapi_event.h
+ */
+
+/**
+ * @internal
+ * @addtogroup CAPI_TELEPHONY_SERVICE
+ * @{
+ */
+
+/**
+ * @brief (Needs to be updated).
+ */
+#define DBUS_TELEPHONY_CALL_INTERFACE                          DBUS_TELEPHONY_SERVICE".Call"
+
+#define TAPI_NOTI_VOICE_CALL_STATUS_IDLE                       DBUS_TELEPHONY_CALL_INTERFACE":VoiceCallStatusIdle"
+#define TAPI_NOTI_VOICE_CALL_STATUS_ACTIVE                     DBUS_TELEPHONY_CALL_INTERFACE":VoiceCallStatusActive"
+#define TAPI_NOTI_VOICE_CALL_STATUS_HELD                       DBUS_TELEPHONY_CALL_INTERFACE":VoiceCallStatusHeld"
+#define TAPI_NOTI_VOICE_CALL_STATUS_DIALING                    DBUS_TELEPHONY_CALL_INTERFACE":VoiceCallStatusDialing"
+#define TAPI_NOTI_VOICE_CALL_STATUS_ALERT                      DBUS_TELEPHONY_CALL_INTERFACE":VoiceCallStatusAlert"
+#define TAPI_NOTI_VOICE_CALL_STATUS_INCOMING           DBUS_TELEPHONY_CALL_INTERFACE":VoiceCallStatusIncoming"
+#define TAPI_NOTI_VOICE_CALL_STATUS_WAITING                    DBUS_TELEPHONY_CALL_INTERFACE":VoiceCallStatusWaiting"
+
+#define TAPI_NOTI_VIDEO_CALL_STATUS_IDLE                       DBUS_TELEPHONY_CALL_INTERFACE":VideoCallStatusIdle"
+#define TAPI_NOTI_VIDEO_CALL_STATUS_ACTIVE                     DBUS_TELEPHONY_CALL_INTERFACE":VideoCallStatusActive"
+#define TAPI_NOTI_VIDEO_CALL_STATUS_DIALING                    DBUS_TELEPHONY_CALL_INTERFACE":VideoCallStatusDialing"
+#define TAPI_NOTI_VIDEO_CALL_STATUS_ALERT                      DBUS_TELEPHONY_CALL_INTERFACE":VideoCallStatusAlert"
+#define TAPI_NOTI_VIDEO_CALL_STATUS_INCOMING           DBUS_TELEPHONY_CALL_INTERFACE":VideoCallStatusIncoming"
+
+#define TAPI_NOTI_CALL_INFO_CALL_CONNECTED_LINE                DBUS_TELEPHONY_CALL_INTERFACE":CallConnectedLine"
+#define TAPI_NOTI_CALL_INFO_WAITING                                    DBUS_TELEPHONY_CALL_INTERFACE":Waiting"
+#define TAPI_NOTI_CALL_INFO_CUG                                                DBUS_TELEPHONY_CALL_INTERFACE":Cug"
+#define TAPI_NOTI_CALL_INFO_FORWARDED                          DBUS_TELEPHONY_CALL_INTERFACE":Forwarded"
+#define TAPI_NOTI_CALL_INFO_BARRED_INCOMING                    DBUS_TELEPHONY_CALL_INTERFACE":BarredIncoming"
+#define TAPI_NOTI_CALL_INFO_BARRED_OUTGOING                    DBUS_TELEPHONY_CALL_INTERFACE":BarredOutgoing"
+#define TAPI_NOTI_CALL_INFO_DEFLECTED                          DBUS_TELEPHONY_CALL_INTERFACE":Deflected"
+#define TAPI_NOTI_CALL_INFO_CLIR_SUPPRESSION_REJECT    DBUS_TELEPHONY_CALL_INTERFACE":ClirSuppressionReject"
+#define TAPI_NOTI_CALL_INFO_FORWARD_UNCONDITIONAL      DBUS_TELEPHONY_CALL_INTERFACE":ForwardUnconditional"
+#define TAPI_NOTI_CALL_INFO_FORWARD_CONDITIONAL                DBUS_TELEPHONY_CALL_INTERFACE":ForwardConditional"
+#define TAPI_NOTI_CALL_INFO_CALL_LINE_IDENTITY         DBUS_TELEPHONY_CALL_INTERFACE":CallLineIdentity"
+#define TAPI_NOTI_CALL_INFO_CALL_NAME_INFORMATION      DBUS_TELEPHONY_CALL_INTERFACE":CallNameInformation"
+#define TAPI_NOTI_CALL_INFO_FORWARDED_CALL                     DBUS_TELEPHONY_CALL_INTERFACE":ForwardedCall"
+#define TAPI_NOTI_CALL_INFO_CUG_CALL                           DBUS_TELEPHONY_CALL_INTERFACE":CugCall"
+#define TAPI_NOTI_CALL_INFO_DEFLECTED_CALL                     DBUS_TELEPHONY_CALL_INTERFACE":DeflectedCall"
+#define TAPI_NOTI_CALL_INFO_TRANSFERED_CALL                    DBUS_TELEPHONY_CALL_INTERFACE":TransferedCall"
+#define TAPI_NOTI_CALL_INFO_HELD                                       DBUS_TELEPHONY_CALL_INTERFACE":CallHeld"
+#define TAPI_NOTI_CALL_INFO_ACTIVE                                     DBUS_TELEPHONY_CALL_INTERFACE":CallActive"
+#define TAPI_NOTI_CALL_INFO_JOINED                                     DBUS_TELEPHONY_CALL_INTERFACE":CallJoined"
+#define TAPI_NOTI_CALL_INFO_RELEASED_ON_HOLD           DBUS_TELEPHONY_CALL_INTERFACE":ReleaseOnHold"
+#define TAPI_NOTI_CALL_INFO_TRANSFER_ALERT                     DBUS_TELEPHONY_CALL_INTERFACE":TransferAlert"
+#define TAPI_NOTI_CALL_INFO_TRANSFERED                         DBUS_TELEPHONY_CALL_INTERFACE":Transfered"
+#define TAPI_NOTI_CALL_INFO_CF_CHECK_MESSAGE           DBUS_TELEPHONY_CALL_INTERFACE":CfCheckMessage"
+#define TAPI_NOTI_CALL_INFO_REC                                                DBUS_TELEPHONY_CALL_INTERFACE":CallInfoRec"
+#define TAPI_NOTI_CALL_PRIVACY_MODE                                    DBUS_TELEPHONY_CALL_INTERFACE":CallPrivacyMode"
+#define TAPI_NOTI_CALL_OTASP_STATUS                                    DBUS_TELEPHONY_CALL_INTERFACE":CallOtaspStatus"
+#define TAPI_NOTI_CALL_OTAPA_STATUS                                    DBUS_TELEPHONY_CALL_INTERFACE":CallOtapaStatus"
+#define TAPI_NOTI_CALL_SIGNAL_INFO                             DBUS_TELEPHONY_CALL_INTERFACE":CallSignalInfo"
+#define TAPI_NOTI_CALL_MODIFY_REQUEST          DBUS_TELEPHONY_CALL_INTERFACE":CallModifyRequest" /* VoLTE only */
+
+#define TAPI_NOTI_CALL_SOUND_PATH                                      DBUS_TELEPHONY_CALL_INTERFACE":CallSoundPath"
+#define TAPI_NOTI_CALL_SOUND_RINGBACK_TONE                     DBUS_TELEPHONY_CALL_INTERFACE":CallSoundRingbackTone"
+#define TAPI_NOTI_CALL_SOUND_WBAMR                                     DBUS_TELEPHONY_CALL_INTERFACE":CallSoundWbamr"
+#define TAPI_NOTI_CALL_SOUND_EQUALIZATION                      DBUS_TELEPHONY_CALL_INTERFACE":CallSoundEqualiztion"
+#define TAPI_NOTI_CALL_SOUND_NOISE_REDUCTION           DBUS_TELEPHONY_CALL_INTERFACE":CallSoundNoiseReduction"
+#define TAPI_NOTI_CALL_SOUND_CLOCK_STATUS                      DBUS_TELEPHONY_CALL_INTERFACE":CallSoundClockStatus"
+#define TAPI_NOTI_CALL_PREFERRED_VOICE_SUBSCRIPTION            DBUS_TELEPHONY_CALL_INTERFACE":CallPreferredVoiceSubscription"
+
+
+#define DBUS_TELEPHONY_MODEM_INTERFACE                         DBUS_TELEPHONY_SERVICE".Modem"
+#define TAPI_NOTI_MODEM_POWER                                          DBUS_TELEPHONY_MODEM_INTERFACE":Power"
+#define TAPI_PROP_MODEM_POWER                                          DBUS_TELEPHONY_MODEM_INTERFACE":power"
+
+// SIM
+#define DBUS_TELEPHONY_SIM_INTERFACE                           DBUS_TELEPHONY_SERVICE".Sim"
+#define TAPI_NOTI_SIM_STATUS                                           DBUS_TELEPHONY_SIM_INTERFACE":Status"
+#define TAPI_NOTI_SIM_REFRESHED                                                DBUS_TELEPHONY_SIM_INTERFACE":Refreshed"
+#define TAPI_PROP_SIM_CALL_FORWARD_STATE                       DBUS_TELEPHONY_SIM_INTERFACE":cf_state"
+
+#define DBUS_TELEPHONY_SAP_INTERFACE                           DBUS_TELEPHONY_SERVICE".Sap"
+#define TAPI_NOTI_SAP_STATUS                                           DBUS_TELEPHONY_SAP_INTERFACE":Status"
+#define TAPI_NOTI_SAP_DISCONNECT                                       DBUS_TELEPHONY_SAP_INTERFACE":Disconnect"
+
+#define DBUS_TELEPHONY_SAT_INTERFACE                           DBUS_TELEPHONY_SERVICE".SAT"
+#define TAPI_NOTI_SAT_SETUP_MENU                                       DBUS_TELEPHONY_SAT_INTERFACE":SetupMenu"
+#define TAPI_NOTI_SAT_DISPLAY_TEXT                                     DBUS_TELEPHONY_SAT_INTERFACE":DisplayText"
+#define TAPI_NOTI_SAT_SELECT_ITEM                                      DBUS_TELEPHONY_SAT_INTERFACE":SelectItem"
+#define TAPI_NOTI_SAT_GET_INKEY                                                DBUS_TELEPHONY_SAT_INTERFACE":GetInkey"
+#define TAPI_NOTI_SAT_GET_INPUT                                                DBUS_TELEPHONY_SAT_INTERFACE":GetInput"
+#define TAPI_NOTI_SAT_REFRESH                                          DBUS_TELEPHONY_SAT_INTERFACE":Refresh"
+#define TAPI_NOTI_SAT_SEND_SMS                                         DBUS_TELEPHONY_SAT_INTERFACE":SendSMS"
+#define TAPI_NOTI_SAT_SETUP_EVENT_LIST                         DBUS_TELEPHONY_SAT_INTERFACE":SetupEventList"
+#define TAPI_NOTI_SAT_SEND_DTMF                                                DBUS_TELEPHONY_SAT_INTERFACE":SendDtmf"
+#define TAPI_NOTI_SAT_SESSION_END_EVENT                                DBUS_TELEPHONY_SAT_INTERFACE":EndProactiveSession"
+#define TAPI_NOTI_SAT_CALL_CONTROL_RESULT                      DBUS_TELEPHONY_SAT_INTERFACE":CallControlResult"
+#define TAPI_NOTI_SAT_MO_SM_CONTROL_RESULT                     DBUS_TELEPHONY_SAT_INTERFACE":MoSmControlResult"
+
+#define DBUS_TELEPHONY_PB_INTERFACE                                    DBUS_TELEPHONY_SERVICE".Phonebook"
+#define TAPI_NOTI_PB_STATUS                                                    DBUS_TELEPHONY_PB_INTERFACE":Status"
+
+// Network
+#define DBUS_TELEPHONY_NETWORK_INTERFACE                       DBUS_TELEPHONY_SERVICE".Network"
+#define TAPI_NOTI_NETWORK_REGISTRATION_STATUS          DBUS_TELEPHONY_NETWORK_INTERFACE":RegistrationStatus"
+#define TAPI_NOTI_NETWORK_CELLINFO                                     DBUS_TELEPHONY_NETWORK_INTERFACE":CellInfo"
+#define TAPI_NOTI_NETWORK_INFO                                         DBUS_TELEPHONY_NETWORK_INTERFACE":Info"
+#define TAPI_NOTI_NETWORK_CHANGE                                       DBUS_TELEPHONY_NETWORK_INTERFACE":Change"
+#define TAPI_NOTI_NETWORK_TIMEINFO                                     DBUS_TELEPHONY_NETWORK_INTERFACE":TimeInfo"
+#define TAPI_NOTI_NETWORK_IDENTITY                                     DBUS_TELEPHONY_NETWORK_INTERFACE":Identity"
+#define TAPI_NOTI_NETWORK_SIGNALSTRENGTH                       DBUS_TELEPHONY_NETWORK_INTERFACE":SignalStrength"
+#define TAPI_NOTI_NETWORK_EMERGENCY_CALLBACK_MODE      DBUS_TELEPHONY_NETWORK_INTERFACE":EmergencyCallbackMode"
+#define TAPI_NOTI_NETWORK_DEFAULT_DATA_SUBSCRIPTION            DBUS_TELEPHONY_NETWORK_INTERFACE":DefaultDataSubscription"
+#define TAPI_NOTI_NETWORK_DEFAULT_SUBSCRIPTION         DBUS_TELEPHONY_NETWORK_INTERFACE":DefaultSubscription"
+#define TAPI_NOTI_NETWORK_PROPERTY_INFO                                DBUS_TELEPHONY_NETWORK_INTERFACE":PropertyInfo"
+#define TAPI_PROP_NETWORK_LAC                                          DBUS_TELEPHONY_NETWORK_INTERFACE":lac"
+#define TAPI_PROP_NETWORK_PLMN                                         DBUS_TELEPHONY_NETWORK_INTERFACE":plmn"
+#define TAPI_PROP_NETWORK_CELLID                                       DBUS_TELEPHONY_NETWORK_INTERFACE":cell_id"
+#define TAPI_PROP_NETWORK_SERVICE_TYPE                         DBUS_TELEPHONY_NETWORK_INTERFACE":service_type"
+#define TAPI_PROP_NETWORK_ACT                                          DBUS_TELEPHONY_NETWORK_INTERFACE":access_technology"
+#define TAPI_PROP_NETWORK_PS_TYPE                                      DBUS_TELEPHONY_NETWORK_INTERFACE":ps_type"
+#define TAPI_PROP_NETWORK_CIRCUIT_STATUS                       DBUS_TELEPHONY_NETWORK_INTERFACE":circuit_status"
+#define TAPI_PROP_NETWORK_PACKET_STATUS                                DBUS_TELEPHONY_NETWORK_INTERFACE":packet_status"
+#define TAPI_PROP_NETWORK_ROAMING_STATUS                       DBUS_TELEPHONY_NETWORK_INTERFACE":roaming_status"
+#define TAPI_PROP_NETWORK_NAME_OPTION                          DBUS_TELEPHONY_NETWORK_INTERFACE":name_option"
+#define TAPI_PROP_NETWORK_NETWORK_NAME                         DBUS_TELEPHONY_NETWORK_INTERFACE":network_name"
+#define TAPI_PROP_NETWORK_SPN_NAME                                     DBUS_TELEPHONY_NETWORK_INTERFACE":spn_name"
+#define TAPI_PROP_NETWORK_SIGNALSTRENGTH_DBM           DBUS_TELEPHONY_NETWORK_INTERFACE":sig_dbm"
+#define TAPI_PROP_NETWORK_SIGNALSTRENGTH_LEVEL         DBUS_TELEPHONY_NETWORK_INTERFACE":sig_level"
+#define TAPI_PROP_NETWORK_IMS_VOICE_SUPPORT_STATUS     DBUS_TELEPHONY_NETWORK_INTERFACE":ims_voice_status"
+
+// SS
+#define DBUS_TELEPHONY_SS_INTERFACE                                    DBUS_TELEPHONY_SERVICE".Ss"
+#define TAPI_NOTI_SS_USSD                                                      DBUS_TELEPHONY_SS_INTERFACE":NotifyUSSD"
+#define TAPI_NOTI_SS_RELEASE_COMPLETE                          DBUS_TELEPHONY_SS_INTERFACE":ReleaseComplete"
+#define TAPI_NOTI_SS_FORWARD_STATUS                                    DBUS_TELEPHONY_SS_INTERFACE":NotifyForwarding"
+#define TAPI_NOTI_SS_BARRING_STATUS                                    DBUS_TELEPHONY_SS_INTERFACE":NotifyBarring"
+#define TAPI_NOTI_SS_WAITING_STATUS                                    DBUS_TELEPHONY_SS_INTERFACE":NotifyWaiting"
+#define TAPI_NOTI_SS_INFO                                                              DBUS_TELEPHONY_SS_INTERFACE":NotifySsInfo"
+
+// SMS
+#define DBUS_TELEPHONY_SMS_INTERFACE   DBUS_TELEPHONY_SERVICE".sms"
+
+/**
+ * @brief Definition for the unsolicited incoming SMS Event.
+ */
+#define TAPI_NOTI_SMS_INCOM_MSG                        DBUS_TELEPHONY_SMS_INTERFACE":IncommingMsg"
+
+/**
+ * @brief Definition for the unsolicited incoming cell broadcast message.
+ */
+#define TAPI_NOTI_SMS_CB_INCOM_MSG             DBUS_TELEPHONY_SMS_INTERFACE":IncommingCbMsg"
+
+/**
+ * @brief Definition for the unsolicited incoming cell broadcast message.
+ */
+#define TAPI_NOTI_SMS_ETWS_INCOM_MSG   DBUS_TELEPHONY_SMS_INTERFACE":IncommingEtwsMsg"
+
+/**
+ * @brief Definition for the unsolicited event indicating SIM memory status.
+ */
+#define TAPI_NOTI_SMS_MEMORY_STATUS            DBUS_TELEPHONY_SMS_INTERFACE":MemoryStatus"
+
+/**
+ * @brief Definition for the device ready indication.
+ */
+#define TAPI_NOTI_SMS_DEVICE_READY             DBUS_TELEPHONY_SMS_INTERFACE":SmsReady"
+
+// Gps
+#define DBUS_TELEPHONY_GPS_INTERFACE           DBUS_TELEPHONY_SERVICE".Gps"
+#define TAPI_NOTI_GPS_ASSIST_DATA                      DBUS_TELEPHONY_GPS_INTERFACE":AssistData"
+#define TAPI_NOTI_GPS_RESET_ASSIST_DATA                DBUS_TELEPHONY_GPS_INTERFACE":ResetAssistData"
+#define TAPI_NOTI_SMART_ASSISTANT_AREA_STATUS  DBUS_TELEPHONY_GPS_INTERFACE":AreaStatus"
+#define TAPI_NOTI_SMART_ASSISTANT_SYNC_STATUS  DBUS_TELEPHONY_GPS_INTERFACE":SyncStatus"
+
+#define DBUS_TELEPHONY_OEM_INTERFACE DBUS_TELEPHONY_SERVICE".OEM"
+#define TAPI_NOTI_OEM_DATA DBUS_TELEPHONY_OEM_INTERFACE":OemData"
+
+/**
+ * @}
+ */
+
+__END_DECLS
+
+#endif /* __TAPI_EVENT_H__ */
diff --git a/include/tapi_events.h b/include/tapi_events.h
deleted file mode 100644 (file)
index 74c0cae..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * libtapi
- *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __TAPI_EVENTS_H__
-#define __TAPI_EVENTS_H__
-
-#include <tapi.h>
-
-/**
-*  @addtogroup TAPI_EVENT
-*  @{
-*
-*  @file tapi_events.h
-*  @brief Telephony Event IDs
-*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * TAPI Event Callback Type
- * @param handle #TelHandle obtained from tapi_init()
- * @param evt_id Event ID. Refer \ref TAPI_EVENT
- * @param data Notification Data
- * @param user_data User Data
- */
-typedef void (*TapiEvtCb)(TelHandle *handle, const char *evt_id, void *data, void *user_data);
-
-/**
- *  @brief Register to a Telephony Event
- *
- *  @par Sync (or) Async:
- *  Synchronous API
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *
- *  @param[in] evt_id Event ID to register. Refer \ref TAPI_EVENT
- *
- *  @param[in] callback Callback to register for specified Event ID.
- *
- *  @param[in] user_data Callback user data
- *
- *  @return #TelReturn
- *  @par Usage
- *  @code
- *    #include <tapi_events.h> //include header
- *    TelReturn rv = tapi_register_event_id(handle, evt_id, callback, user_data); //Register Event
- *    if (TEL_RETURN_SUCCESS != rv) //Check if registration success
- *      DBG("Event Registration failed %d", rv);
- *  @endcode
- */
-TelReturn tapi_register_event_id(TelHandle *handle, const char *evt_id, TapiEvtCb callback, void *user_data);
-
-/**
- *  @brief De-register from a Telephony Event
- *
- *  @par Sync (or) Async:
- *  Synchronous API
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *
- *  @param[in] evt_id Event ID to deregister. Refer \ref TAPI_EVENT
- *
- *  @return #TelReturn
- */
-TelReturn tapi_deregister_event_id(TelHandle *handle, const char *evt_id);
-
-#ifdef __cplusplus
-}
-#endif
-
-/** @}*/
-
-#endif /* __TAPI_EVENTS_H__ */
diff --git a/include/tapi_gps.h b/include/tapi_gps.h
deleted file mode 100644 (file)
index ec5e874..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * libtapi
- *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
-*  @addtogroup TAPI_GPS
-*  @{
-*
-*  @file tapi_gps.h
-*  @brief Telephony GPS interface
-*/
-
-#ifndef __TAPI_GPS_H__
-#define __TAPI_GPS_H__
-
-#include <tapi.h>
-#include <tel_gps.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/**
- *  @brief This function sends the confirmation data for measure position message
- *
- *  @par Sync (or) Async:
- *  Synchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_FAILURE</b>: Operation Failed\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] gps_data GPS data info
- */
-TelReturn tapi_gps_confirm_measure_pos(TelHandle *handle, TelGpsDataInfo *gps_data);
-
-
-/**
- *  @brief This function is invoked to set the gps frequency aiding and allows the underlying OEM provider to scan the set band
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] state <b>TRUE</b>: Frequency aiding ON\n <b>FALSE</b>: Frequency aiding OFF
- *  @param[in] callback Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelModemResult values:\n
- *  <b>TEL_GPS_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_GPS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_GPS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  \em data NULL
- */
-TelReturn tapi_gps_set_frequency_aiding(TelHandle *handle, gboolean state, TapiResponseCb callback, void *user_data);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __TAPI_GPS_H__ */
-
-/**
- * @}
- */
diff --git a/include/tapi_modem.h b/include/tapi_modem.h
deleted file mode 100644 (file)
index 7eca14e..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * libtapi
- *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __TAPI_MODEM_H__
-#define __TAPI_MODEM_H__
-
-/**
-*  @addtogroup TAPI_MODEM
-*  @{
-*
-*  @file tapi_modem.h
-*  @brief TAPI Modem Interface
-*/
-
-#include "tapi.h"
-#include <tel_modem.h>
-#include <tel_return.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- *  @brief Changes modem power status
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] status Power status to set
- *  @param[in] callback Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelModemResult values:\n
- *  <b>TEL_MODEM_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_MODEM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_MODEM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  \em data NULL
- */
-TelReturn tapi_modem_set_power_status(TelHandle *handle, TelModemPowerStatus status,
-                               TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Toggles flight mode status
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] enable <b>TRUE</b>: Turn Flight mode ON\n <b>FALSE</b>: Turn Flight mode OFF
- *  @param[in] callback Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelModemResult values:\n
- *  <b>TEL_MODEM_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_MODEM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_MODEM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  \em data NULL
- */
-TelReturn tapi_modem_set_flight_mode(TelHandle *handle, gboolean enable,
-                               TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Fetches flight mode status
- *
- *  @par Sync (or) Async:
- *  Synchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_FAILURE</b>: Operation Failed\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[out] enable <b>TRUE</b>: Flight mode is ON\n <b>FALSE</b>: Flight mode is OFF
- */
-TelReturn tapi_modem_get_flight_mode(TelHandle *handle, gboolean *enable);
-
-/**
- *  @brief Fetches modem version information
- *
- *  @par Sync (or) Async:
- *  Synchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_FAILURE</b>: Operation Failed\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[out] version Version Information (\ref TelModemVersion)
- */
-TelReturn tapi_modem_get_version(TelHandle *handle, TelModemVersion *version);
-
-/**
- *  @brief Fetches device IMEI number
- *
- *  @par Sync (or) Async:
- *  Synchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[out] imei NULL terminated device IMEI number
- */
-TelReturn tapi_modem_get_imei(TelHandle *handle, char imei[TEL_MODEM_IMEI_LENGTH_MAX + 1]);
-
-/**
- *  @brief Fetches current modem status
- *
- *  @par Sync (or) Async:
- *  Synchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[out] status Modem status (\ref TelModemPowerStatus)
- */
-TelReturn tapi_modem_get_power_status(TelHandle *handle, TelModemPowerStatus *status);
-
-#ifdef __cplusplus
-}
-#endif
-
-/** @}*/
-
-#endif /* __TAPI_MODEM_H__ */
diff --git a/include/tapi_network.h b/include/tapi_network.h
deleted file mode 100644 (file)
index 1765cbe..0000000
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
- * libtapi
- *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __TAPI_NETWORK_H__
-#define __TAPI_NETWORK_H__
-
-/**
-*  @addtogroup TAPI_NETWORK
-*  @{
-*
-*  @file tapi_network.h
-*  @brief TAPI Network Interface
-*/
-
-#include "tapi.h"
-#include <tel_network.h>
-#include <tel_return.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/**
- *  @brief Get network registration status
- *
- *  @par Sync (or) Async:
- *  Synchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_FAILURE</b>: Operation failed\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[out] reg_info Network Registration Information (#TelNetworkRegistrationInfo).
- *  Out params are valid only when TelReturn is TEL_RETURN_SUCCESS.
- */
-TelReturn tapi_network_get_registration_info(TelHandle *handle,
-                                       TelNetworkRegistrationInfo *reg_info);
-
-/**
- *  @brief Get network identity information
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelNetworkResult values:\n
- *  <b>TEL_NETWORK_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_NETWORK_RESULT_FAILURE</b>: Operation failed\n
- *  \em data #TelNetworkIdentityInfo (data is valid only when TelNetworkResult is TEL_NETWORK_RESULT_SUCCESS)
- */
-TelReturn tapi_network_get_identity_info(TelHandle *handle,
-                       TapiResponseCb callback,
-                       void *user_data);
-
-/**
- *  @brief Scan networks
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelNetworkResult values:\n
- *  <b>TEL_NETWORK_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_NETWORK_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_NETWORK_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  \em data #TelNetworkPlmnList (data is valid only when TelNetworkResult is TEL_NETWORK_RESULT_SUCCESS)
- */
-TelReturn tapi_network_search(TelHandle *handle,
-                       TapiResponseCb callback,
-                       void *user_data);
-
-/**
- *  @brief Cancel the triggered network scanning.
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelNetworkResult values:\n
- *  <b>TEL_NETWORK_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_NETWORK_RESULT_FAILURE</b>: Operation failed\n
- *  \em data NULL
- */
-TelReturn tapi_network_cancel_search(TelHandle *handle,
-                       TapiResponseCb callback,
-                       void *user_data);
-
-/**
- *  @brief Register to network automatically
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelNetworkResult values:\n
- *  <b>TEL_NETWORK_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_NETWORK_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_NETWORK_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  \em data NULL
- */
-TelReturn tapi_network_select_automatic(TelHandle *handle,
-                       TapiResponseCb callback,
-                       void *user_data);
-
-/**
- *  @brief Register to specified network
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameter
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] select_info Manual Selection Information (#TelNetworkSelectManualInfo)
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelNetworkResult values:\n
- *  <b>TEL_NETWORK_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_NETWORK_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_NETWORK_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  \em data NULL
- */
-TelReturn tapi_network_select_manual(TelHandle *handle,
-                       const TelNetworkSelectManualInfo *select_info,
-                       TapiResponseCb callback,
-                       void *user_data);
-
-/**
- *  @brief Get network selection mode i.e. automatic or manual.
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
- *  <b>TEL_RETURN_FAILURE</b>: Operation failed
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelNetworkResult values:\n
- *  <b>TEL_NETWORK_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_NETWORK_RESULT_FAILURE</b>: Operation failed\n
- *  \em data #TelNetworkSelectionMode (data is valid only when TelNetworkResult is TEL_NETWORK_RESULT_SUCCESS)
- */
-TelReturn tapi_network_get_selection_mode(TelHandle *handle,
-                       TapiResponseCb callback,
-                       void *user_data);
-
-/**
- *  @brief Set the network preferred plmn
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameter
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] info Preferred PLMN Information (#TelNetworkPreferredPlmnInfo)
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelNetworkResult values:\n
- *  <b>TEL_NETWORK_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_NETWORK_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_NETWORK_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  \em data NULL
- */
-TelReturn tapi_network_set_preferred_plmn(TelHandle *handle,
-                       TelNetworkPreferredPlmnInfo *info,
-                       TapiResponseCb callback,
-                       void *user_data);
-
-/**
- *  @brief Get preferred plmn list
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameter
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelNetworkResult values:\n
- *  <b>TEL_NETWORK_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_NETWORK_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_NETWORK_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  \em data #TelNetworkPreferredPlmnList (data is valid only when TelNetworkResult is TEL_NETWORK_RESULT_SUCCESS)
- */
-TelReturn tapi_network_get_preferred_plmn(TelHandle *handle,
-                       TapiResponseCb callback,
-                       void *user_data);
-
-/**
- *  @brief Set network mode.
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameter
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] mode Network Mode (#TelNetworkMode)
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelNetworkResult values:\n
- *  <b>TEL_NETWORK_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_NETWORK_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_NETWORK_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  \em data NULL
- */
-TelReturn tapi_network_set_mode(TelHandle *handle,
-                       TelNetworkMode mode,
-                       TapiResponseCb callback,
-                       void *user_data);
-
-/**
- *  @brief Get network mode.
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameter
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelNetworkResult values:\n
- *  <b>TEL_NETWORK_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_NETWORK_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_NETWORK_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  \em data #TelNetworkMode (data is valid only when TelNetworkResult is TEL_NETWORK_RESULT_SUCCESS)
- */
-TelReturn tapi_network_get_mode(TelHandle *handle,
-                       TapiResponseCb callback,
-                       void *user_data);
-
-/**
- *  @brief Get neighboring cells info.
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameter
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelNetworkResult values:\n
- *  <b>TEL_NETWORK_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_NETWORK_RESULT_FAILURE</b>: Operation failed\n
- *  \em data #TelNetworkNeighbourCellInfo (data is valid only when TelNetworkResult is TEL_NETWORK_RESULT_SUCCESS)
- */
-TelReturn tapi_network_get_neighboring_cell_info(TelHandle *handle,
-                       TapiResponseCb callback,
-                       void *user_data);
-
-#ifdef __cplusplus
-}
-#endif
-
-/** @}*/
-
-#endif /* __TAPI_NETWORK_H__ */
-
diff --git a/include/tapi_phonebook.h b/include/tapi_phonebook.h
deleted file mode 100644 (file)
index 5ebe347..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * libtapi
- *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __TAPI_PHONEBOOK_H__
-#define __TAPI_PHONEBOOK_H__
-
-/**
-*  @addtogroup TAPI_PHONEBOOK
-*  @{
-*
-*  @file tapi_phonebook.h
-*  @brief TAPI Phonebook Interface
-*/
-
-#include <tapi.h>
-#include <tel_phonebook.h>
-#include <tel_return.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
- /**
- *  @brief Get SIM Phone book init status
- *
- *  @par Sync (or) Async:
- *  Synchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_FAILURE</b>: Operation failed\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[out] init_completed Phonebook init status. '0' is not init, '1' is init complete to use
- *  @param[out] pb_list Available SIM phonebook list. This value is valid in phonebook init complete case (#TelPbList)
- *  Out params are valid only when TelReturn is TEL_RETURN_SUCCESS.
- */
-TelReturn tapi_pb_get_sim_pb_init_info(TelHandle *handle,
-                               gboolean *init_completed, TelPbList *pb_list);
-
-
-/**
- *  @brief Get current inserted SIM phonebook informations
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] pb_type Different storage types to be selected in SIM (#TelPbType)
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelNetworkResult values:\n
- *  <b>TEL_PB_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_PB_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_PB_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_PB_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
- *  <b>TEL_PB_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  <b>TEL_PB_RESULT_UNKNOWN_FAILURE</b>: Unknown failure\n
- *  <b>TEL_PB_RESULT_NOT_INITIALIZED</b>: Phonebook not initialized\n
- *  <b>TEL_PB_RESULT_ACCESS_RESTRICTED</b>: Access restricted\n
- *  <b>TEL_PB_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
- *  \em data #TelPbInfo if result is TEL_PB_RESULT_SUCCESS
- */
-TelReturn tapi_pb_get_sim_pb_info(TelHandle *handle, TelPbType pb_type,
-                               TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Read SIM phone book entry information from given storage type
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] record Index for accessing the SIM data \n Different storage types to be selected in SIM (#TelPbRecordInfo)
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelNetworkResult values:\n
- *  <b>TEL_PB_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_PB_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_PB_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_PB_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
- *  <b>TEL_PB_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  <b>TEL_PB_RESULT_UNKNOWN_FAILURE</b>: Unknown failure\n
- *  <b>TEL_PB_RESULT_INVALID_INDEX</b>: The index passed was not a valid index\n
- *  <b>TEL_PB_RESULT_NOT_INITIALIZED</b>: Phonebook not initialized\n
- *  <b>TEL_PB_RESULT_ACCESS_RESTRICTED</b>: Access restricted\n
- *  <b>TEL_PB_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
- *  \em data #TelPbReadRecord if result is TEL_PB_RESULT_SUCCESS
- */
-TelReturn tapi_pb_read_sim_pb_record(TelHandle *handle, const TelPbRecordInfo *record,
-                               TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Add or edit SIM phone book record entry information
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] req_data Phonebook data which will be updated or added (#TelPbUpdateRecord)
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelNetworkResult values:\n
- *  <b>TEL_PB_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_PB_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_PB_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_PB_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
- *  <b>TEL_PB_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  <b>TEL_PB_RESULT_UNKNOWN_FAILURE</b>: Unknown failure\n
- *  <b>TEL_PB_RESULT_INVALID_INDEX</b>: The index passed was not a valid index\n
- *  <b>TEL_PB_RESULT_NOT_INITIALIZED</b>: Phonebook not initialized\n
- *  <b>TEL_PB_RESULT_ACCESS_RESTRICTED</b>: Access restricted\n
- *  <b>TEL_PB_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
- *  \em data NULL
- */
-TelReturn tapi_pb_update_sim_pb_record(TelHandle *handle, const TelPbUpdateRecord *req_data,
-                               TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Delete a SIM phonebook record
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request is successfully posted to telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] record Index for accessing the SIM data \n Different storage types to be selected in SIM (#TelPbRecordInfo)
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelNetworkResult values:\n
- *  <b>TEL_PB_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_PB_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_PB_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_PB_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
- *  <b>TEL_PB_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  <b>TEL_PB_RESULT_UNKNOWN_FAILURE</b>: Unknown failure\n
- *  <b>TEL_PB_RESULT_INVALID_INDEX</b>: The index passed was not a valid index\n
- *  <b>TEL_PB_RESULT_NOT_INITIALIZED</b>: Phonebook not initialized\n
- *  <b>TEL_PB_RESULT_ACCESS_RESTRICTED</b>: Access restricted\n
- *  <b>TEL_PB_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
- *  \em data NULL
- */
-TelReturn tapi_pb_delete_sim_pb_record(TelHandle *handle, const TelPbRecordInfo *record,
-                               TapiResponseCb callback, void *user_data);
-
-#ifdef __cplusplus
-}
-#endif
-
-/** @}*/
-
-#endif /* __TAPI_PHONEBOOK_H__ */
diff --git a/include/tapi_sap.h b/include/tapi_sap.h
deleted file mode 100644 (file)
index 90f825b..0000000
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * libtapi
- *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __TAPI_SAP_H__
-#define __TAPI_SAP_H__
-
-/**
-*  @addtogroup TAPI_SAP
-*  @{
-*
-*  @file tapi_sap.h
-*  @brief TAPI SAP Interface
-*/
-
-#include "tapi.h"
-#include <tel_sap.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- *  @brief This API is used to request to connect sap.
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request accepted successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] max_msg_size Maximum size of a message.
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSapResult values:\n
- *  <b>TEL_SAP_RESULT_SUCCESS</b>: Operation successfully completed\n
- *  <b>TEL_SAP_RESULT_UNABLE_TO_ESTABLISH</b>: Unable to Establish Connection\n
- *  <b>TEL_SAP_RESULT_NOT_SUPPORT_MAX_SIZE</b>: Server Does Not Support Message Length That Client Want to Send\n
- *  <b>TEL_SAP_RESULT_TOO_SMALL_MAX_SIZE</b>: Client wants to Connect with very Small Message Length which is Not Supported by Server\n
- *  <b>TEL_SAP_RESULT_ONGOING_CALL</b>: Server cannot Reset the SIM due to an Ongoing Call \n
- *  \em data unsigned char max_msg_size : Valid only when TelSapResult is TEL_SAP_RESULT_SUCCESS
- */
-TelReturn tapi_sap_req_connect(TelHandle *handle, unsigned int max_msg_size,
-                                       TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief This API is used to request to disconnect sap.
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request accepted successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSapResult values:\n
- *  <b>TEL_SAP_RESULT_SUCCESS</b>: Operation successfully completed\n
- *  <b>TEL_SAP_RESULT_FAILURE_NO_REASON</b>: No Reason\n
- *  \em data NULL
- */
-TelReturn tapi_sap_req_disconnect(TelHandle *handle, TapiResponseCb callback,
-                                       void *user_data);
-
-/**
- *  @brief This API is used to request the ATR.
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request accepted successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSapResult values:\n
- *  <b>TEL_SAP_RESULT_SUCCESS</b>: Operation successfully completed\n
- *  <b>TEL_SAP_RESULT_FAILURE_NO_REASON</b>: No Reason\n
- *  <b>TEL_SAP_RESULT_CARD_ALREADY_POWERED_OFF</b>: Card Already Powered Off\n
- *  <b>TEL_SAP_RESULT_CARD_REMOVED</b>: Card Removed\n
- *  <b>TEL_SAP_RESULT_DATA_NOT_AVAILABLE</b>: Data Not Available\n
- *  \em data #TelSapAtr : Valid only when TelSapResult is TEL_SAP_RESULT_SUCCESS
- */
-TelReturn tapi_sap_get_atr(TelHandle *handle, TapiResponseCb callback,
-                                       void *user_data);
-
-/**
- *  @brief This API is used to exchange an APDU command.
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request accepted successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] apdu_data #TelSapApdu APDU command to forward to the SIM card
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSapResult values:\n
- *  <b>TEL_SAP_RESULT_SUCCESS</b>: Operation successfully completed\n
- *  <b>TEL_SAP_RESULT_FAILURE_NO_REASON</b>: No Reason\n
- *  <b>TEL_SAP_RESULT_CARD_NOT_ACCESSIBLE</b>: Not Accessible\n
- *  <b>TEL_SAP_RESULT_CARD_ALREADY_POWERED_OFF</b>: Card Already Powered Off\n
- *  <b>TEL_SAP_RESULT_CARD_REMOVED</b>: Card Removed\n
- *  \em data #TelSapApduResp : Valid only when TelSapResult is TEL_SAP_RESULT_SUCCESS
- */
-TelReturn tapi_sap_req_transfer_apdu(TelHandle *handle, TelSapApdu *apdu_data,
-                                       TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief This API is used to set the transport protocol.
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request accepted successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] protocol #TelSimSapProtocol Identifier of the protocol to be used
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSapResult values:\n
- *  <b>TEL_SAP_RESULT_SUCCESS</b>: Operation successfully completed\n
- *  <b>TEL_SAP_RESULT_NOT_SUPPORTED</b>: Not Supported\n
- *  \em data NULL
- */
-TelReturn tapi_sap_req_transport_protocol(TelHandle *handle, TelSimSapProtocol protocol,
-                                               TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief This API is used to power ON/OFF or reset the SIM card.
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request accepted successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] power_mode #TelSapPowerMode Indicates the type of requested power mode
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSapResult values:\n
- *  <b>TEL_SAP_RESULT_SUCCESS</b>: Operation successfully completed\n
- *  <b>TEL_SAP_RESULT_FAILURE_NO_REASON</b>: No Reason\n
- *  <b>TEL_SAP_RESULT_CARD_NOT_ACCESSIBLE</b>: Not Accessible\n
- *  <b>TEL_SAP_RESULT_CARD_ALREADY_POWERED_OFF</b>: Card Already Powered Off\n
- *  <b>TEL_SAP_RESULT_CARD_REMOVED</b>: Card Removed\n
- *  <b>TEL_SAP_RESULT_CARD_ALREADY_POWERED_ON</b>: Card Already Powered On\n
- *  \em data NULL
- */
-TelReturn tapi_sap_req_power_operation(TelHandle *handle, TelSapPowerMode power_mode,
-                                               TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief This API is used to get the card reader status.
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request accepted successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSapResult values:\n
- *  <b>TEL_SAP_RESULT_SUCCESS</b>: Operation successfully completed\n
- *  <b>TEL_SAP_RESULT_FAILURE_NO_REASON</b>: No Reason\n
- *  <b>TEL_SAP_RESULT_DATA_NOT_AVAILABLE</b>: Data Not Available\n
- *  \em data #TelSapCardStatus : Valid only when TelSapResult is TEL_SAP_RESULT_SUCCESS
- */
-TelReturn tapi_sap_get_cardreader_status(TelHandle *handle, TapiResponseCb callback,
-                                               void *user_data);
-
-#ifdef __cplusplus
-}
-#endif
-
-/**
-* @}
-*/
-#endif /* __TAPI_SAP_H__ */
diff --git a/include/tapi_sat.h b/include/tapi_sat.h
deleted file mode 100644 (file)
index 0265ba0..0000000
+++ /dev/null
@@ -1,384 +0,0 @@
-/*
- * libtapi
- *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
-*  @addtogroup TAPI_SAT
-*  @{
-*
-*  @file tapi_sat.h
-*  @brief TAPI SAT Interface
-*/
-
-#ifndef __TAPI_SAT_H__
-#define __TAPI_SAT_H__
-
-#include <tapi.h>
-#include <tel_sat.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
- /**
- * @brief Sends the user choice of the main menu options to the USIM.
- *
- * @par Notes:
- * A set of possible menu options is supplied by the USIM
- * using the proactive command SET UP MENU. Telephony server receives the command
- * and publishes this information.SAT UI application should list the menu when it initially launched.
- * If the user subsequently chooses an option, then SAT UI application replies
- * the command with user's choice using this API.
- *
- * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is delivered with the async response as below.
- *
- * @par Warning:
- * Do not use this function. This function is dedicated to the SAT UI embedded application only.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @param [in] handle - #TelHandle obtained from tapi_init()
- * @param [in] menu_select - #TelSatMenuSelectionReqInfo contains information like which SAT menu item has been selected or whether Help is required.
- * @param [in] callback - Response callback
- * @param [in] user_data - user_data for user specification.
- *
- * @par Async Response Message:
- * - The event associated is TEL_EVENT_SAT_MENU_SELECTION_CNF and the Asynchronous return status is indicated by #TelSatEnvelopeResp.
- *
- * @pre
- *  - This function supposed to be called after getting TEL_EVENT_SAT_SETUP_MENU_IND event from telephony server\n
- *
- * @post
- *  - None
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *  <b>TEL_RETURN_FAILURE</b>: Operation Failed\n
- *
- * @par Prospective Clients:
- * SAT-UI
- *
- * @see tapi_sat_get_main_menu_info
- *
- * @code
- * #include <tapi_sat.h>
- * TelHandle *handle;  //obtained from tapi_init()
- * TapiResponseCb callback; //Response callback
- * void *user_data; // user_data for user specification
- * TelReturn ret_status = TEL_RETURN_SUCCESS;
- * TelSatMenuSelectionReqInfo selected_menu;
- * selected_menu.item_identifier = '1'; //selected menu num
- * selected_menu.b_is_help_requested = 0;
- * ret_status = tapi_sat_select_menu(handle, &selected_menu, callback, user_data);
- * @endcode
- *
- * @remarks None
- *
- *
- */
-/*================================================================================================*/
-TelReturn tapi_sat_select_menu(TelHandle *handle, const TelSatMenuSelectionReqInfo* menu_select, TapiResponseCb callback, void *user_data);
-
- /**
- * @brief  Download SAT events to USIM
- *
- * @par Notes:
- * A set of events for the terminal to monitor can be supplied by the USIM using the proactive command SET UP EVENT
- * LIST. If the USIM has sent this command, and an event which is part of the list subsequently occurs, the terminal
- * informs the USIM using this function, relevant for that event.
- * If USIM commands to monitor a browser termination event, the SAT-UI application has to call this function.
- *
- * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
- * However it just means that the API request has been transfered to the CP successfully.
- * The actual operation result is delivered with the async response as below.
- *
- * @par Warning:
- * Do not use this function. This function is dedicated to the SAT UI embedded application only.
- *
- * @par Sync (or) Async:
- * This is an Asynchronous API.
- *
- * @param [in] handle - #TelHandle obtained from tapi_init()
- * @param [in] event_data - #TelSatEventDownloadReqInfo contains the necessary parameters like event type and information associated with it.
- * @param [in] callback - Response callback
- * @param [in] user_data - user_data for user specification.
- *
- * @par Async Response Message:
- * - The event associated is TEL_EVENT_SAT_EVENT_DOWNLOAD_CNF and the Asynchronous return status is indicated by #TelSatEnvelopeResp.
- *
- * @pre
- *  - A SET UP EVENT LIST proactive command supplies a set of event to monitor.
- *
- * @post
- *  - None.
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *  <b>TEL_RETURN_FAILURE</b>: Operation Failed\n
- *
- * @par Prospective Clients:
- * SAT-UI
- *
- * @see None
- *
- * @code
- * #include <tapi_sat.h>
- * TelHandle *handle;  //obtained from tapi_init()
- * TapiResponseCb callback; //Response callback
- * void *user_data; // user_data for user specification
- * TelReturn ret_status = TEL_RETURN_SUCCESS;
- * TelSatEventDownloadReqInfo event_data;
- * event_data.event_download_type = TEL_SAT_EVENT_IDLE_SCREEN_AVAILABLE;
- * event_data.u.b_idle_screen_available = 1; //event occur or not
- * ret_status = tapi_sat_download_event(handle, &event_data, callback, user_data);
- * @endcode
- *
- * @remarks None
- *
- *
- */
-/*================================================================================================*/
-TelReturn tapi_sat_download_event(TelHandle *handle, const TelSatEventDownloadReqInfo*  event_data, TapiResponseCb callback, void *user_data);
-
-/**
- * @brief  Send the UI display status of the alpha identifier of a specific proactive command to Telephony Server.
- *
- * When SAT-UI receives a proactive command, SAT-UI should draw a UI for relevant command.
- * As it completes , SAT-UI inform USIM with this function. Afterwards, USIM is getting ready to send another commands.
- *
- * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
- *
- * @par Warning:
- * Do not use this function. This function is dedicated to the SAT UI embedded application only.
- *
- * @par Sync (or) Async:
- * This is a Synchronous API.
- *
- * @param [in] handle - #TelHandle obtained from tapi_init()
- * @param [in] command_id - Specific proactive command id from the Application
- * @param [in] status - #TelSatUiDisplayStatusType contain display status(SUCCESS/FAIL).
- *
- * @par Async Response Message:
- * - None.
- *
- * @pre
- *  - Display request for the alpha identifier of a Proactive Command should be sent by Telephony Server.
- *
- * @post
- *  - If the display status is SUCCESS Telephony Server sends a request to application for Proactive Command Execution.
- *  - If the display status is FAIL Telephony Server sends Terminal Response for the Proactive Command.
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_FAILURE</b>: Operation Failed\n
- *
- * @par Prospective Clients:
- * SAT-UI
- *
- * @see None
- *
- * @code
- * #include <tapi_sat.h>
- * TelHandle *handle;  //obtained from tapi_init()
- * int command_id; //this value should be server given value
- * TelReturn ret_status = TEL_RETURN_SUCCESS;
- * ret_status = tapi_sat_send_ui_display_status(handle, command_id, TEL_SAT_DISPLAY_SUCCESS);
- * @endcode
- *
- * @remarks None
- *
- *
- */
-/*================================================================================================*/
-TelReturn tapi_sat_send_ui_display_status(TelHandle *handle, int command_id, TelSatUiDisplayStatusType status);
-
- /**
- * @brief  This function sends the UI User confirmation data for a specific Proactive Command to the Telephony Server.
- *
- * In case that the proactive commands need user response, SAT-UI can send it using this function.
- * The response can be 'OK', 'Cancel', 'Move Back' and 'End Session'. Upon this response, USIM can send
- * a proactive command subsequently to indicate next UI action.
- *
- * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
- *
- * @par Warning:
- * Do not use this function. This function is dedicated to the SAT UI embedded application only.
- *
- * @par Sync (or) Async:
- * This is a synchronous API.
- *
- * @param [in] handle - #TelHandle obtained from tapi_init()
- * @param [in] pUserConfirmData -#TelSatUiUserConfirmInfo contains Specific user confirmation data.
- *
- * @par Async Response Message:
- * - None
- *
- * @pre
- *  - User Confirmation request for a specific Proactive Command should be sent to application by Telephony Server.
- *
- * @post
- *  - If the User Confirmation is positive Telephony Server sends a request to application for Proactive Command Execution.
- *  - If the User Confirmation is negative Telephony Server sends Terminal Response for the Proactive Command.
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_FAILURE</b>: Operation Failed\n
- *
- * @par Prospective Clients:
- * SAT-UI
- *
- * @see None
- *
- * @code
- * #include <tapi_sat.h>
- * TelHandle *handle;  //obtained from tapi_init()
- * TelReturn ret_status = TEL_RETURN_SUCCESS;
- * TelSatUiUserConfirmInfo cfm_data;
- * cfm_data.command_id = '1'; //this value should be server given value
- * cfm_data.command_type = TEL_SAT_CMD_TYPE_SETUP_CALL;
- * cfm_data.key_type = TEL_SAT_USER_CONFIRM_YES;
- * ret_status = tapi_sat_send_ui_user_confirm(handle, &cfm_data);
- * @endcode
- *
- * @remarks None
- *
- *
- */
-/*================================================================================================*/
-TelReturn tapi_sat_send_ui_user_confirm(TelHandle *handle, TelSatUiUserConfirmInfo *user_confirm_data);
-
- /**
- * @brief  This function provides SAT(Sim Application toolkit) Main Menu information for SAT-UI.
- *
- * Once the USIM supplies the SET UP MENU proactivae command, telephony server not only publish
- * TAPI_EVENT_SAT_SETUP_MENU_IND event but also caches the menu information.
- * The SAT-UI applicatoin can get the menu list using this function.
- *
- * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
- *
- * @par Warning:
- * Do not use this function. This function is dedicated to the SAT UI embedded application only.
- *
- * @par Sync (or) Async:
- * This is a Synchronous API.
- *
- * @param [in] handle - #TelHandle obtained from tapi_init()
- * @param [out] main_menu - #TelSatSetupMenuInfo contain all menu related information which are required like menu title, icon, item count, etc.
- *
- * @par Async Response Message:
- * - None
- *
- * @pre
- *  - When SAT SIM is inserted. we can get meaningful data. without SAT SIM, Null is returned
- *
- * @post
- *  - None.
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_FAILURE</b>: Operation Failed\n
- *
- * @par Prospective Clients:
- * SAT-UI
- *
- * @see tapi_sat_select_menu
- *
- * @code
- * #include <tapi_sat.h>
- * TelHandle *handle;  //obtained from tapi_init()
- * TelReturn ret_status = TEL_RETURN_SUCCESS;
- * TelSatSetupMenuInfo menu; //this struct will be pull up with SIM menu info
- * ret_status = tapi_sat_get_main_menu_info(handle, &menu);
- * @endcode
- *
- * @remarks None
- *
- *
- */
-/*================================================================================================*/
-TelReturn tapi_sat_get_main_menu_info(TelHandle *handle, TelSatSetupMenuInfo *main_menu);
-
- /**
- * @brief  This API provides the Operation result(s) for the Proactive Command execution by the Application(s) to the Telephony Server.
- *
- * The USIM commands the terminal to do some predefined action, such as sending short message,
- * making a voice call, launching an Internet browser and so on. Those actions are defined by 3GPP TS31.111.
- * Once a application executes the requested action by USIM, it reports the operation result to USIM using this function.
- *
- * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
- *
- * @par Warning:
- * Do not use this function. This function is dedicated to the SAT UI embedded application only.
- **
- * @par Sync (or) Async:
- * This is a Synchronous API.
- *
- * @param [in] handle - #TelHandle obtained from tapi_init()
- * @param [out] app_ret_info - #TelSatAppsRetInfo contains execution result of a specific proactive command by application.
- *
- * @par Async Response Message:
- * - None
- *
- * @pre
- *  - Proactive Command execution request should be sent by Telephony Server to SAT related applications.
- *
- * @post
- *  - None.
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_FAILURE</b>: Operation Failed\n
- *
- * @par Prospective Clients:
- * Embeded applications which are predefined by 3GPP TS31.111
- *
- * @see None
- *
- * @code
- * #include <tapi_sat.h>
- * TelHandle *handle;  //obtained from tapi_init()
- * TelReturn ret_status = TEL_RETURN_SUCCESS;
- * TelSatAppsRetInfo app_ret;
- * app_ret.command_type = TEL_SAT_CMD_TYPE_SETUP_CALL;
- * app_ret.command_id = 1; //this value should be server given value
- * app_ret.apps_ret.setup_call.resp = TEL_SAT_R_SUCCESS;
- * ret_status = tapi_sat_send_app_exec_result(handle, &app_ret);
- * @endcode
- *
- * @remarks None
- *
- *
- */
-/*================================================================================================*/
-TelReturn tapi_sat_send_app_exec_result(TelHandle *handle, TelSatAppsRetInfo *app_ret_info);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __TAPI_SAT_H__ */
-
-/**
- * @}
- */
diff --git a/include/tapi_sim.h b/include/tapi_sim.h
deleted file mode 100644 (file)
index 355ee3d..0000000
+++ /dev/null
@@ -1,917 +0,0 @@
-/*
- * libtapi
- *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
-*  @addtogroup TAPI_SIM
-*  @{
-*
-*  @file tapi_sim.h
-*  @brief TAPI SIM Interface
-*/
-
-#ifndef __TAPI_SIM_H__
-#define __TAPI_SIM_H__
-
-#include <tapi.h>
-#include <tel_sim.h>
-#include <tel_return.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/**
- *  @brief Get SIM Card Initialization status and SIM Card Identification
- *
- *  @par Sync (or) Async:
- *  Synchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[out] card_status SIM initialization status/Sim card identification value(#TelSimCardStatusInfo)
- */
-TelReturn tapi_sim_get_init_info(TelHandle *handle, TelSimCardStatusInfo *card_status);
-
-/**
- *  @brief Get the Card Type whether Card is a SIM or a USIM
- *
- *  @par Sync (or) Async:
- *  Synchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[out] card_type SIM card type information (#TelSimCardType)
- */
-TelReturn tapi_sim_get_type(TelHandle *handle, TelSimCardType *card_type);
-
-/**
- *  @brief Get the IMSI information
- *
- *  @par Sync (or) Async:
- *  Synchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[out] imsi IMSI information (#TelSimImsiInfo)
- */
-TelReturn tapi_sim_get_imsi(TelHandle *handle, TelSimImsiInfo *imsi);
-
-/**
- *  @brief Get sim ECC data
- *
- *  @par Sync (or) Async:
- *  Synchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[out] ecc SIM emergency call code information (#TelSimEccList)
- */
-TelReturn tapi_sim_get_ecc(TelHandle *handle, TelSimEccList *ecc);
-
-/**
- *  @brief Get a Unique identification number of the sim
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSimResult values:\n
- *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
- *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
- *                                                                                                                     when invalid SIM command is given or incorrect
- *                                                                                                                     parameters are supplied to the SIM\n
- *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
- *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
- *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
- *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
- *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
- *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
- *  \em data unsigned char icc_id : Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
- */
-TelReturn tapi_sim_get_iccid(TelHandle *handle, TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Get the language preference(indication) information
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSimResult values:\n
- *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
- *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
- *                                                                                                                     when invalid SIM command is given or incorrect
- *                                                                                                                     parameters are supplied to the SIM\n
- *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
- *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
- *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
- *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
- *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
- *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
- *  \em data #TelSimLanguagePreferenceCode : Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
- */
-TelReturn tapi_sim_get_language(TelHandle *handle, TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Update the language preference information to SIM card
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] language Language preference information (#TelSimLanguagePreferenceCode)
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
-  *
- *  @par Async Response:
- *  \em result Possible #TelSimResult values:\n
- *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
- *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
- *                                                                                                                     when invalid SIM command is given or incorrect
- *                                                                                                                     parameters are supplied to the SIM\n
- *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
- *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
- *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
- *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
- *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
- *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
- *  \em data NULL
- */
-TelReturn tapi_sim_set_language(TelHandle *handle, TelSimLanguagePreferenceCode language, TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Get the SIM Call forwarding indication related data(EF-CFIS and CPHS case)
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSimResult values:\n
- *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
- *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
- *                                                                                                                     when invalid SIM command is given or incorrect
- *                                                                                                                     parameters are supplied to the SIM\n
- *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
- *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
- *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
- *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
- *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
- *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
- *  \em data #TelSimCfisList : Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
- */
-TelReturn tapi_sim_get_callforwarding_info(TelHandle *handle, TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Get the SIM message waiting indication related data(EF-MWIS and CPHS case)
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSimResult values:\n
- *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
- *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
- *                                                                                                                     when invalid SIM command is given or incorrect
- *                                                                                                                     parameters are supplied to the SIM\n
- *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
- *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
- *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
- *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
- *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
- *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
- *  \em data #TelSimMwisList: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
- */
-TelReturn tapi_sim_get_messagewaiting_info(TelHandle *handle, TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Set the SIM message waiting indication related data(EF-MWIS and CPHS case)
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] req_mw Message Waiting related informations (#TelSimMwis)
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSimResult values:\n
- *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
- *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
- *                                                                                                                     when invalid SIM command is given or incorrect
- *                                                                                                                     parameters are supplied to the SIM\n
- *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
- *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
- *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
- *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
- *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
- *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
- *  \em data NULL
- */
-TelReturn tapi_sim_set_messagewaiting_info(TelHandle *handle, TelSimMwis *req_mw, TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Get the SIM mailbox related data(EF-MBDN, MBDI and CPHS case)
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSimResult values:\n
- *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
- *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
- *                                                                                                                     when invalid SIM command is given or incorrect
- *                                                                                                                     parameters are supplied to the SIM\n
- *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
- *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
- *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
- *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
- *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
- *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
- *  \em data #TelSimMailboxList: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
- */
-TelReturn tapi_sim_get_mailbox_info(TelHandle *handle, TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Set the SIM mailbox related data(EF-MBDN, MBDI and CPHS case)
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] req_mb Mailbox related informations (#TelSimMailBoxNumber)
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSimResult values:\n
- *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
- *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
- *                                                                                                                     when invalid SIM command is given or incorrect
- *                                                                                                                     parameters are supplied to the SIM\n
- *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
- *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
- *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
- *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
- *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
- *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
- *  \em data NULL
- */
-TelReturn tapi_sim_set_mailbox_info(TelHandle *handle, TelSimMailBoxNumber *req_mb, TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Get the SIM MSISDN data
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSimResult values:\n
- *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
- *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
- *                                                                                                                     when invalid SIM command is given or incorrect
- *                                                                                                                     parameters are supplied to the SIM\n
- *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
- *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
- *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
- *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
- *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
- *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
- *  \em data #TelSimMsisdnList: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
- */
-TelReturn tapi_sim_get_msisdn(TelHandle *handle, TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Get the the SIM SPN data
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSimResult values:\n
- *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
- *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
- *                                                                                                                     when invalid SIM command is given or incorrect
- *                                                                                                                     parameters are supplied to the SIM\n
- *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
- *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
- *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
- *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
- *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
- *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
- *  \em data #TelSimSpn: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
- */
-TelReturn tapi_sim_get_spn(TelHandle *handle, TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Get the SIM CPHS NETNAME data
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSimResult values:\n
- *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
- *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
- *                                                                                                                     when invalid SIM command is given or incorrect
- *                                                                                                                     parameters are supplied to the SIM\n
- *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
- *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
- *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
- *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
- *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
- *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
- *  \em data #TelSimCphsNetName: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
- */
-TelReturn tapi_sim_get_cphs_netname(TelHandle *handle, TapiResponseCb callback,        void *user_data);
-
-/**
- *  @brief Get the Service Provider Display Information
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSimResult values:\n
- *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
- *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
- *                                                                                                                     when invalid SIM command is given or incorrect
- *                                                                                                                     parameters are supplied to the SIM\n
- *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
- *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
- *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
- *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
- *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
- *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
- *  \em data #TelSimSpPlmnList: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
- */
-TelReturn tapi_sim_get_sp_display_info(TelHandle *handle, TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Execute the authentication procedure by using SIM
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] authentication_data Authentication code to be validated by ISIM,3G and GSM application in the SIM card (#TelSimAuthenticationData)
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSimResult values:\n
- *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
- *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
- *                                                                                                                     when invalid SIM command is given or incorrect
- *                                                                                                                     parameters are supplied to the SIM\n
- *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
- *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
- *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
- *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
- *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
- *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
- *  \em data #TelSimAuthenticationResponse: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
- */
-TelReturn tapi_sim_req_authentication(TelHandle *handle, TelSimAuthenticationData *authentication_data, TapiResponseCb callback, void *user_data);
-
-
-/**
- *  @brief This function performs PIN1/PIN2/SIM LOCK verification. This function performs PIN verification based on the pin type passed along with pin data
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] pin_data PIN code, entered by the user. you should make all parameters (#TelSimSecPinPw)
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSimResult values:\n
- *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
- *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
- *                                                                                                                     when invalid SIM command is given or incorrect
- *                                                                                                                     parameters are supplied to the SIM\n
- *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
- *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
- *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
- *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
- *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
- *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
- *  \em data #TelSimSecPinResult: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
- */
-TelReturn tapi_sim_verify_pins(TelHandle *handle, TelSimSecPinPw  *pin_data, TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief This function performs unblock PIN1/PIN2 operation based on PUK information passed along with
- *  unblock information entered by the user
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] puk_data Specifies unblocking PIN password and Specifies PIN password which you want to use after unblocking operation (#TelSimSecPukPw)
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSimResult values:\n
- *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
- *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
- *                                                                                                                     when invalid SIM command is given or incorrect
- *                                                                                                                     parameters are supplied to the SIM\n
- *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
- *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
- *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
- *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
- *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
- *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
- *  \em data #TelSimSecPukResult: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
- */
-TelReturn tapi_sim_verify_puks(TelHandle *handle, TelSimSecPukPw  *puk_data, TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Changes PIN1/PIN2 code based on the pin type passed along with old pin data and new pin data
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] pin_data Pin types, old pin code and new pin code (#TelSimSecChangePinPw)
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSimResult values:\n
- *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
- *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
- *                                                                                                                     when invalid SIM command is given or incorrect
- *                                                                                                                     parameters are supplied to the SIM\n
- *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
- *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
- *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
- *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
- *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
- *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
- *  \em data #TelSimSecPinResult: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
- */
-TelReturn tapi_sim_change_pins(TelHandle *handle, TelSimSecChangePinPw *pin_data, TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Disable the SIM facility
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] pw Structure which contains facility type and password (#TelSimFacilityPw)
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSimResult values:\n
- *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
- *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
- *                                                                                                                     when invalid SIM command is given or incorrect
- *                                                                                                                     parameters are supplied to the SIM\n
- *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
- *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
- *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
- *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
- *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
- *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
- *  \em data #TelSimFacilityResult: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
- */
-TelReturn tapi_sim_disable_facility(TelHandle *handle, TelSimFacilityPw *pw, TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Enable the SIM facility
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] pw Structure which contains facility type and password (#TelSimFacilityPw)
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSimResult values:\n
- *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
- *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
- *                                                                                                                     when invalid SIM command is given or incorrect
- *                                                                                                                     parameters are supplied to the SIM\n
- *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
- *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
- *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
- *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
- *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
- *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
- *  \em data #TelSimFacilityResult: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
- */
-TelReturn tapi_sim_enable_facility(TelHandle *handle, TelSimFacilityPw *pw, TapiResponseCb callback, void *user_data);
-
-
-/**
- *  @brief Get the SIM facility
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] type Type of security lock type enum values (#TelSimLockType)
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSimResult values:\n
- *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
- *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
- *                                                                                                                     when invalid SIM command is given or incorrect
- *                                                                                                                     parameters are supplied to the SIM\n
- *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
- *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
- *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
- *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
- *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
- *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
- *  \em data #TelSimFacilityInfo: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
- */
-TelReturn tapi_sim_get_facility(TelHandle *handle, TelSimLockType type, TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Get the SIM LOCK TYPE information
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] type Type of security lock type enum values (#TelSimLockType)
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSimResult values:\n
- *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
- *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
- *                                                                                                                     when invalid SIM command is given or incorrect
- *                                                                                                                     parameters are supplied to the SIM\n
- *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
- *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
- *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
- *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
- *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
- *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
- *  \em data #TelSimLockInfo: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
- */
-TelReturn tapi_sim_get_lock_info(TelHandle *handle, TelSimLockType type, TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief  This function provides common interface for accessing SIM data based on USIM generic command in ETSI TS 102 221
- * and 3GPP TS 31.102 Characteristics of the Universal Subscriber Identity Module (USIM) application.
- * This API provides only interface to send APDU. User should know well APDU usage.
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] apdu_data APDU data (#TelSimApdu)
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSimResult values:\n
- *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
- *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
- *                                                                                                                     when invalid SIM command is given or incorrect
- *                                                                                                                     parameters are supplied to the SIM\n
- *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
- *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
- *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
- *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
- *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
- *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
- *  \em data #TelSimApduResp: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
- */
-TelReturn tapi_sim_req_apdu(TelHandle *handle, TelSimApdu* apdu_data, TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief  This function provides common interface to get SIM ATR(Answer To Reset) value
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSimResult values:\n
- *  <b>TEL_SIM_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SIM_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SIM_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SIM_RESULT_MEMORY_FAILURE</b>: Memory allocation failed\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation not supported\n
- *  <b>TEL_SIM_RESULT_CARD_ERROR</b>: SIM card error - Permanently blocked and general errors\n
- *  <b>TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED</b>: SIM Incompatible pin operation that is in case
- *                                                                                                                     when invalid SIM command is given or incorrect
- *                                                                                                                     parameters are supplied to the SIM\n
- *  <b>TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION</b>: SIM PIN Incorrect password\n
- *  <b>TEL_SIM_RESULT_INCORRECT_PASSWORD</b>: SIM Incorrect password\n
- *  <b>TEL_SIM_RESULT_PIN_REQUIRED</b>: PIN Required\n
- *  <b>TEL_SIM_RESULT_PUK_REQUIRED</b>: PUK Required\n
- *  <b>TEL_SIM_RESULT_PERM_BLOCKED</b>: Permanent block SIM\n
- *  <b>TEL_SIM_RESULT_SQN_FAILURE</b>: status - SQN(SeQuenceNumber) failure\n
- *  <b>TEL_SIM_RESULT_OPERATION_NOT_PERMITTED</b>: Operation not permitted\n
- *  \em data #TelSimAtr: Valid only when TelSimResult is TEL_SIM_RESULT_SUCCESS
- */
-TelReturn tapi_sim_req_atr(TelHandle *handle, TapiResponseCb callback, void *user_data);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __TAPI_SIM_H__ */
-
-/**
-* @}
-*/
diff --git a/include/tapi_sms.h b/include/tapi_sms.h
deleted file mode 100644 (file)
index abb19ec..0000000
+++ /dev/null
@@ -1,468 +0,0 @@
-/*
- * libtapi
- *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __TAPI_SMS_H__
-#define __TAPI_SMS_H__
-
-/**
-*  @addtogroup TAPI_SMS
-*  @{
-*
-*  @file tapi_sms.h
-*  @brief TAPI SMS Interface
-*/
-
-#include "tapi.h"
-#include <tel_sms.h>
-#include <tel_return.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/**
- *  @brief Sends an SMS message to the Network(UMTS).
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] send_info #TelSmsSendInfo Sms Information to be sent
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSmsResult values:\n
- *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SMS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SMS_RESULT_NETWORK_CONGESTION</b>: Network Congestion\n
- *  <b>TEL_SMS_RESULT_NETWORK_FAILURE</b>: Network Failure\n
- *  <b>TEL_SMS_RESULT_INVALID_MANDATORY_INFO</b>: Invalid Mandatory Info\n
- *  <b>TEL_SMS_RESULT_SIM_FAILURE</b>: SIM Failure\n
- *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
- *  <b>TEL_SMS_RESULT_MEMORY_FAILURE</b>: Memory Failure\n
- *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
- *  \em data NULL
- */
-TelReturn tapi_sms_send(TelHandle *handle, const TelSmsSendInfo *send_info,
-                               TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Reads an SMS message from the SIM Card storage.
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] index Index of the Message to be Read
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSmsResult values:\n
- *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SMS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SMS_RESULT_SIM_FAILURE</b>: SIM Failure\n
- *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
- *  <b>TEL_SMS_RESULT_MEMORY_FAILURE</b>: Memory Failure\n
- *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
- *  \em data #TelSmsSimDataInfo
- */
-TelReturn tapi_sms_read_sms_in_sim(TelHandle *handle, unsigned int index,
-                               TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Writes an SMS message to the SIM Card storage.
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] wdata #TelSmsSimDataInfo SMS Message structure to write on the SIM
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSmsResult values:\n
- *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SMS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SMS_RESULT_SIM_FAILURE</b>: SIM Failure\n
- *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
- *  <b>TEL_SMS_RESULT_MEMORY_FAILURE</b>: Memory Failure\n
- *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
- *  \em data unsigned int index
- */
-TelReturn tapi_sms_write_sms_in_sim(TelHandle *handle, const TelSmsSimDataInfo *wdata,
-                               TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Deletes an SMS message from the SIM Card storage.
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] index Index of the Message to be Deleted
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSmsResult values:\n
- *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SMS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SMS_RESULT_SIM_FAILURE</b>: SIM Failure\n
- *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
- *  <b>TEL_SMS_RESULT_MEMORY_FAILURE</b>: Memory Failure\n
- *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
- *  \em data NULL
- */
-TelReturn tapi_sms_delete_sms_in_sim(TelHandle *handle, unsigned int index,
-                               TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Fetches SIM card's SMS capacity and state.
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_UNKNOWN_FAILURE</b>: Unknown Failure
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSmsResult values:\n
- *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SMS_RESULT_SIM_FAILURE</b>: SIM Failure\n
- *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
- *  <b>TEL_SMS_RESULT_MEMORY_FAILURE</b>: Memory Failure\n
- *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
- *  \em data #TelSmsStoredMsgCountInfo
- */
-TelReturn tapi_sms_get_count(TelHandle *handle, TapiResponseCb callback,
-                       void *user_data);
-
-/**
- *  @brief Sets SMS CB Message Identifiers in the appropriate EF-CBMI/EF-CBMIR file in (U)SIM.
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] cb_conf #TelSmsCbConfigInfo Structure containing SMS CB configuration parameters to be set in (U)SIM
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSmsResult values:\n
- *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SMS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
- *  <b>TEL_SMS_RESULT_SIM_FAILURE</b>: SIM Failure\n
- *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
- *  \em data NULL
- */
-TelReturn tapi_sms_set_cb_config(TelHandle *handle, const TelSmsCbConfigInfo *cb_conf,
-                               TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Retrieves SMS CB configuration parameters from EF-CBMI file in the (U)SIM.
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_UNKNOWN_FAILURE</b>: Unknown Failure
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSmsResult values:\n
- *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SMS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SMS_RESULT_SIM_FAILURE</b>: SIM Failure\n
- *  <b>TEL_SMS_RESULT_MEMORY_FAILURE</b>: Memory Failure\n
- *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
- *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
- *  \em data #TelSmsCbConfigInfo
- */
-TelReturn tapi_sms_get_cb_config(TelHandle *handle, TapiResponseCb callback,
-                               void *user_data);
-
-/**
- *  @brief Fetches SMS parameters for a particular SIM.
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_UNKNOWN_FAILURE</b>: Unknown Failure
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSmsResult values:\n
- *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SMS_RESULT_SIM_FAILURE</b>: SIM Failure\n
- *  <b>TEL_SMS_RESULT_MEMORY_FAILURE</b>: Memory Failure\n
- *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
- *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
- *  \em data #TelSmsParamsInfoList
- */
-TelReturn tapi_sms_get_parameters(TelHandle *handle, TapiResponseCb callback,
-                                       void *user_data);
-
-/**
- *  @brief Set SMS parameters which are used in the origination of MO messages.
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] params #TelSmsParamsInfo SMS Parameter information
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSmsResult values:\n
- *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SMS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SMS_RESULT_SIM_FAILURE</b>: SIM Failure\n
- *  <b>TEL_SMS_RESULT_MEMORY_FAILURE</b>: Memory Failure\n
- *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
- *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
- *  \em data NULL
- */
-TelReturn tapi_sms_set_parameters(TelHandle *handle,
-                                       const TelSmsParamsInfo *params,
-                                       TapiResponseCb callback,
-                                       void *user_data);
-
-/**
- *  @brief Sends a deliver report (for the received incoming SMS) to the network.
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] dr_info #TelSmsDeliverReportInfo SMS Data package and Report.
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSmsResult values:\n
- *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SMS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SMS_RESULT_SIM_FAILURE</b>: SIM Failure\n
- *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
- *  <b>TEL_SMS_RESULT_MEMORY_FAILURE</b>: Memory Failure\n
- *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
- *  \em data NULL
- */
-TelReturn tapi_sms_send_deliver_report(TelHandle *handle,
-                               const TelSmsDeliverReportInfo *dr_info,
-                               TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Sets SMS Service Centre Address information (in order to send the SMS).
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] sca #TelSmsSca SCA address information
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSmsResult values:\n
- *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SMS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SMS_RESULT_SIM_FAILURE</b>: SIM Failure\n
- *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
- *  <b>TEL_SMS_RESULT_MEMORY_FAILURE</b>: Memory Failure\n
- *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
- *  \em data NULL
- */
-TelReturn tapi_sms_set_sca(TelHandle *handle, TelSmsSca *sca,
-                               TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Fetches the current SMS Service Centre Address information.
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_UNKNOWN_FAILURE</b>: Unknown Failure
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSmsResult values:\n
- *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SMS_RESULT_SIM_FAILURE</b>: SIM Failure\n
- *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
- *  <b>TEL_SMS_RESULT_MEMORY_FAILURE</b>: Memory Failure\n
- *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
- *  \em data #TelSmsSca
- */
-TelReturn tapi_sms_get_sca(TelHandle *handle, TapiResponseCb callback,
-                               void *user_data);
-
-/**
- *  @brief  Informs modem about  the memory status of PDA (whether FULL or AVAILABLE).
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] available Memory Status. <b>TRUE</b>: PDA Memory available\n <b>FALSE</b>: PDA Memory FULL\n
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSmsResult values:\n
- *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SMS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
- *  <b>TEL_SMS_RESULT_MEMORY_FAILURE</b>: Memory Failure\n
- *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
- *  \em data NULL
- */
-TelReturn tapi_sms_set_memory_status(TelHandle *handle, gboolean available,
-                                       TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief  Set the message status for an SMS.
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] status_info #TelSmsStatusInfo Status of the message to be set.
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSmsResult values:\n
- *  <b>TEL_SMS_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SMS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SMS_RESULT_SIM_FAILURE</b>: SIM Failure\n
- *  <b>TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED</b>: Operation Not Supported\n
- *  <b>TEL_SMS_RESULT_MEMORY_FAILURE</b>: Memory Failure\n
- *  <b>TEL_SMS_RESULT_UNKNOWN_FAILURE</b>: Unknown Failure\n
- *  \em data NULL
- */
-TelReturn tapi_sms_set_message_status(TelHandle *handle, TelSmsStatusInfo *status_info,
-                                       TapiResponseCb callback, void *user_data);
-
-/**
- *  @brief Fetches the Init Status of SMS service.
- *
- *  @par Sync (or) Async:
- *  Synchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[out] init_status <b>TRUE</b>: SMS service is ready\n <b>FALSE</b>: SMS service is NOT ready.
- */
-TelReturn tapi_sms_get_init_status(TelHandle *handle, gboolean *init_status);
-
-/**
- *  @brief Fetches the  SIM memory status.
- *
- *  @par Sync (or) Async:
- *  Synchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[out] memory_full <b>TRUE</b>: Memory is available\n <b>FALSE</b>: Memory is NOT available.
- */
-TelReturn tapi_sms_get_sim_memory_status(TelHandle *handle,
-                                       gboolean *memory_full);
-
-#ifdef __cplusplus
-}
-#endif
-
-/**
-* @}
-*/
-
-#endif /* __TAPI_SMS_H__ */
diff --git a/include/tapi_ss.h b/include/tapi_ss.h
deleted file mode 100644 (file)
index b517fd5..0000000
+++ /dev/null
@@ -1,359 +0,0 @@
-/*
- * libtapi
- *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __TAPI_SS_H__
-#define __TAPI_SS_H__
-
-/**
-*  @addtogroup TAPI_SS
-*  @{
-*
-*  @file tapi_ss.h
-*  @brief TAPI SS Interface
-*/
-
-#include "tapi.h"
-#include <tel_ss.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/**
- *  @brief Sends a request to activate/deactivate call barring
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] barring_info #TelSsBarringInfo Barring Info to set
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSsResult values:\n
- *  <b>TEL_SS_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SS_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SS_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
- *  <b>TEL_SS_RESULT_SERVICE_NOT_AVAILABLE</b>: Service Unavailable\n
- *  <b>TEL_SS_RESULT_OPERATION_NOT_ALLOWED</b>: Operation not allowed\n
- *  <b>TEL_SS_RESULT_INCORRECT_OPERATION</b>: Incorrect Operation\n
- *  <b>TEL_SS_RESULT_INVALID_PASSWORD</b>: Invalid Password\n
- *  <b>TEL_SS_RESULT_PASSWORD_BLOCKED</b>: Password Blocked\n
- *  \em data NULL
- */
- TelReturn tapi_ss_set_barring(TelHandle *handle,
-                       const TelSsBarringInfo *barring_info,
-                       TapiResponseCb callback,
-                       void *user_data);
-
-/**
- *  @brief Sends a request to get call barring status
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] get_barring_info #TelSsBarringGetInfo Info to get Barring Status
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSsResult values:\n
- *  <b>TEL_SS_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SS_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SS_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
- *  <b>TEL_SS_RESULT_SERVICE_NOT_AVAILABLE</b>: Service Unavailable\n
- *  <b>TEL_SS_RESULT_OPERATION_NOT_ALLOWED</b>: Operation not allowed\n
- *  <b>TEL_SS_RESULT_INCORRECT_OPERATION</b>: Incorrect Operation\n
- *  \em data #TelSsBarringResp if result is TEL_SS_RESULT_SUCCESS
- */
-TelReturn tapi_ss_get_barring_status(TelHandle *handle,
-                       const TelSsBarringGetInfo *get_barring_info,
-                       TapiResponseCb callback,
-                       void *user_data);
-
-/**
- *  @brief Sends a request to change call barring password
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] barring_pwd_info #TelSsBarringPwdInfo Barring Info to change password
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSsResult values:\n
- *  <b>TEL_SS_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SS_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SS_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
- *  <b>TEL_SS_RESULT_SERVICE_NOT_AVAILABLE</b>: Service Unavailable\n
- *  <b>TEL_SS_RESULT_OPERATION_NOT_ALLOWED</b>: Operation not allowed\n
- *  <b>TEL_SS_RESULT_INCORRECT_OPERATION</b>: Incorrect Operation\n
- *  <b>TEL_SS_RESULT_INVALID_PASSWORD</b>: Invalid Password\n
- *  <b>TEL_SS_RESULT_PASSWORD_BLOCKED</b>: Password Blocked\n
- *  \em data NULL
- */
-TelReturn tapi_ss_change_barring_password(TelHandle *handle,
-                               const TelSsBarringPwdInfo *barring_pwd_info,
-                               TapiResponseCb callback,
-                               void *user_data);
-
-/**
- *  @brief Sends a request to activate/deactivate call forwarding
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] forwarding_info #TelSsForwardInfo forwarding Info to set
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSsResult values:\n
- *  <b>TEL_SS_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SS_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SS_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
- *  <b>TEL_SS_RESULT_SERVICE_NOT_AVAILABLE</b>: Service Unavailable\n
- *  <b>TEL_SS_RESULT_OPERATION_NOT_ALLOWED</b>: Operation not allowed\n
- *  <b>TEL_SS_RESULT_INCORRECT_OPERATION</b>: Incorrect Operation\n
- *  \em data NULL
- */
-TelReturn tapi_ss_set_forwarding(TelHandle *handle,
-                               const TelSsForwardInfo *forwarding_info,
-                               TapiResponseCb callback,
-                               void *user_data);
-
-/**
- *  @brief Sends a request to get call forwarding status
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] get_forwarding_info #TelSsForwardGetInfo Info to get Forwarding Status
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSsResult values:\n
- *  <b>TEL_SS_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SS_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SS_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
- *  <b>TEL_SS_RESULT_SERVICE_NOT_AVAILABLE</b>: Service Unavailable\n
- *  <b>TEL_SS_RESULT_OPERATION_NOT_ALLOWED</b>: Operation not allowed\n
- *  <b>TEL_SS_RESULT_INCORRECT_OPERATION</b>: Incorrect Operation\n
- *  \em data #TelSsForwardingResp if result is TEL_SS_RESULT_SUCCESS
- */
-TelReturn tapi_ss_get_forwarding_status(TelHandle *handle,
-                               const TelSsForwardGetInfo *get_forwarding_info,
-                               TapiResponseCb callback,
-                               void *user_data);
-
-/**
- *  @brief Sends a request to activate/deactivate call waiting
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] waiting_info #TelSsWaitingInfo Waiting Info to set
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSsResult values:\n
- *  <b>TEL_SS_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SS_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SS_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
- *  <b>TEL_SS_RESULT_SERVICE_NOT_AVAILABLE</b>: Service Unavailable\n
- *  <b>TEL_SS_RESULT_OPERATION_NOT_ALLOWED</b>: Operation not allowed\n
- *  <b>TEL_SS_RESULT_INCORRECT_OPERATION</b>: Incorrect Operation\n
- *  \em data NULL
- */
-TelReturn tapi_ss_set_waiting(TelHandle *handle,
-                               const TelSsWaitingInfo *waiting_info,
-                               TapiResponseCb callback,
-                               void *user_data);
-
-/**
- *  @brief Sends a request to get call waiting status
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] class #TelSsClass Class Info to get Forwarding Status
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSsResult values:\n
- *  <b>TEL_SS_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SS_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SS_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
- *  <b>TEL_SS_RESULT_SERVICE_NOT_AVAILABLE</b>: Service Unavailable\n
- *  <b>TEL_SS_RESULT_OPERATION_NOT_ALLOWED</b>: Operation not allowed\n
- *  <b>TEL_SS_RESULT_INCORRECT_OPERATION</b>: Incorrect Operation\n
- *  \em data #TelSsWaitingResp if result is TEL_SS_RESULT_SUCCESS
- */
-TelReturn tapi_ss_get_waiting_status(TelHandle *handle, TelSsClass class,
-                               TapiResponseCb callback,
-                               void *user_data);
-
-/**
- *  @brief Sends a request to set CLI
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] cli_info #TelSsCliInfo CLI Info to set
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSsResult values:\n
- *  <b>TEL_SS_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SS_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SS_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
- *  <b>TEL_SS_RESULT_SERVICE_NOT_AVAILABLE</b>: Service Unavailable\n
- *  <b>TEL_SS_RESULT_OPERATION_NOT_ALLOWED</b>: Operation not allowed\n
- *  <b>TEL_SS_RESULT_INCORRECT_OPERATION</b>: Incorrect Operation\n
- *  \em data NULL
- */
-TelReturn tapi_ss_set_cli(TelHandle *handle,
-                               const TelSsCliInfo *cli_info,
-                               TapiResponseCb callback,
-                               void *user_data);
-
-/**
- *  @brief Sends a request to get CLI status
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] type #TelSsCliType Type Info to get CLI Status
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSsResult values:\n
- *  <b>TEL_SS_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SS_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SS_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
- *  <b>TEL_SS_RESULT_SERVICE_NOT_AVAILABLE</b>: Service Unavailable\n
- *  <b>TEL_SS_RESULT_OPERATION_NOT_ALLOWED</b>: Operation not allowed\n
- *  <b>TEL_SS_RESULT_INCORRECT_OPERATION</b>: Incorrect Operation\n
- *  \em data #TelSsCliResp if result is TEL_SS_RESULT_SUCCESS
- */
-TelReturn tapi_ss_get_cli_status(TelHandle *handle, TelSsCliType type,
-                               TapiResponseCb callback,
-                               void *user_data);
-
-/**
- *  @brief Sends a request to send USSD
- *
- *  @par Sync (or) Async:
- *  Asynchronous API
- *
- *  @return Possible #TelReturn values:\n
- *  <b>TEL_RETURN_SUCCESS</b>: Request Successfully registered to Telephony\n
- *  <b>TEL_RETURN_INVALID_PARAMETER</b>: Invalid input parameters
- *
- *  @param[in] handle #TelHandle obtained from tapi_init()
- *  @param[in] ussd_request #TelSsUssdInfo USSD Info to send request
- *  @param[in] callback #TapiResponseCb Response callback
- *  @param[in] user_data Callback user data
- *
- *  @par Async Response:
- *  \em result Possible #TelSsResult values:\n
- *  <b>TEL_SS_RESULT_SUCCESS</b>: Operation completed successfully\n
- *  <b>TEL_SS_RESULT_FAILURE</b>: Operation failed\n
- *  <b>TEL_SS_RESULT_INVALID_PARAMETER</b>: Invalid input parameters\n
- *  <b>TEL_SS_RESULT_MEMORY_FAILURE</b>: Device could not allocate Memory to formulate a response\n
- *  <b>TEL_SS_RESULT_SERVICE_NOT_AVAILABLE</b>: Service Unavailable\n
- *  <b>TEL_SS_RESULT_OPERATION_NOT_ALLOWED</b>: Operation not allowed\n
- *  <b>TEL_SS_RESULT_INCORRECT_OPERATION</b>: Incorrect Operation\n
- *  \em data #TelSsUssdResp if result is TEL_SS_RESULT_SUCCESS
- */
-TelReturn tapi_ss_send_ussd_request(TelHandle *handle,
-                                       const TelSsUssdInfo *ussd_request,
-                                       TapiResponseCb callback,
-                                       void *user_data);
-
-#ifdef __cplusplus
-}
-#endif
-
-/**
-* @}
-*/
-
-#endif /* __TAPI_SS_H__ */
diff --git a/include/tapi_type.h b/include/tapi_type.h
new file mode 100644 (file)
index 0000000..7983e44
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TAPI_TYPE_H__
+#define __TAPI_TYPE_H__
+
+/**
+ * @file tapi_type.h
+ */
+
+/**
+ * @internal
+ * @addtogroup CAPI_TELEPHONY_SERVICE
+ * @{
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Definition for the telephony service name.
+ */
+#define DBUS_TELEPHONY_SERVICE      "org.tizen.telephony"
+
+/**
+ * @brief Definition for the telephony object path.
+ */
+#define DBUS_TELEPHONY_DEFAULT_PATH "/org/tizen/telephony"
+
+/**
+ * @brief The structure type containing the TAPI handle.
+ */
+typedef struct tapi_handle TapiHandle;
+
+/**
+ * @brief Called for the TAPI notification.
+ * @param[in] handle The #TapiHandle obtained from tel_init()
+ * @param[in] noti_id The notification ID for a callback has to be invoked
+ * @param[in] data The notification data
+ * @param[in] user_data The user data
+ */
+typedef void (*tapi_notification_cb)(TapiHandle *handle, const char *noti_id, void *data, void *user_data);
+
+/**
+ * @brief Called for the TAPI response.
+ * @param[in] handle  The #TapiHandle obtained from tel_init()
+ * @param[in] result  The result of the operation
+ * @param[in] data The response data from the operation
+ * @param[in] user_data The user data
+ */
+typedef void (*tapi_response_cb)(TapiHandle *handle, int result, void *data, void *user_data);
+
+#ifdef __cplusplus
+}
+#endif
+
+/**
+ * @}
+ */
+
+#endif /* __TAPI_TYPE_H__ */
diff --git a/libtapi.manifest b/libtapi.manifest
new file mode 100644 (file)
index 0000000..be0fa76
--- /dev/null
@@ -0,0 +1,8 @@
+<manifest>
+       <assign>
+               <filesystem path="/usr/bin/tapitest" exec_label="telephony_framework"/>
+       </assign>
+       <request>
+               <domain name="_"/>
+       </request>
+</manifest>
\ No newline at end of file
diff --git a/packaging/libtapi.manifest b/packaging/libtapi.manifest
deleted file mode 100644 (file)
index 573257c..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<manifest>
- <request>
-  <domain name="_"/>    
- </request>
-</manifest>
diff --git a/packaging/libtapi.spec b/packaging/libtapi.spec
new file mode 100644 (file)
index 0000000..f0b2520
--- /dev/null
@@ -0,0 +1,73 @@
+%define major 0
+%define minor 7
+%define patchlevel 84
+
+Name:           libtapi
+Version:        %{major}.%{minor}.%{patchlevel}
+Release:        2
+License:        Apache
+Summary:        Telephony dbus client library
+Group:          System/Libraries
+Source0:        libslp-tapi-%{version}.tar.gz
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(security-server)
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+
+%description
+Telephony client API library
+
+%package devel
+Summary:        Telephony client API (devel)
+Group:          Development/Libraries
+Requires:       %{name} = %{version}
+
+%description devel
+Telephony client API library (devel)
+
+%prep
+%setup -q
+
+%build
+export LDFLAGS+=" -Wl,-z,nodelete "
+
+export CFLAGS="$CFLAGS -DTIZEN_ENGINEER_MODE"
+export CXXFLAGS="$CXXFLAGS -DTIZEN_ENGINEER_MODE"
+export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE"
+
+export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
+export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
+export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
+
+
+cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+       -DTIZEN_ENGINEER_MODE=1 \
+
+make %{?_smp_mflags}
+
+%install
+%make_install
+
+rm -rf %{buildroot}%{_includedir}/telephony/tapi/.gitignore
+mkdir -p %{buildroot}%{_datadir}/license
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+
+%files
+%manifest libtapi.manifest
+%defattr(-,root,root,-)
+#%doc COPYING
+%{_libdir}/*.so.*
+%{_bindir}/tapitest
+%{_datadir}/license/libslp-tapi
+
+%files devel
+%defattr(-,root,root,-)
+%{_includedir}/telephony-client/*.h
+%{_libdir}/pkgconfig/*.pc
+%{_libdir}/*.so
diff --git a/packaging/libtapi3.spec b/packaging/libtapi3.spec
deleted file mode 100644 (file)
index 84eefba..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-%define major 3
-%define minor 0
-%define patchlevel 1
-
-Name:           libtapi3
-Version:    %{major}.%{minor}.%{patchlevel}
-Release:        1
-License:        Apache-2.0
-Summary:        Telephony client API library
-Group:          Telephony/Libraries
-Source0:        libtapi3-%{version}.tar.gz
-Source1001:     libtapi.manifest
-BuildRequires:  cmake
-BuildRequires:  python
-BuildRequires:  python-xml
-BuildRequires:  pkgconfig(dlog)
-BuildRequires:  pkgconfig(glib-2.0)
-BuildRequires:  pkgconfig(security-server)
-BuildRequires:  pkgconfig(tel-headers)
-
-%description
-Telephony client API library
-
-%package devel
-Summary:        Telephony client API (devel)
-Requires:       %{name} = %{version}
-
-%description devel
-Telephony client API library (devel)
-
-%prep
-%setup -q
-cp %{SOURCE1001} .
-
-%build
-%cmake . -DTAPI_VERSION=%{version}
-
-make %{?_smp_mflags}
-
-%install
-%make_install
-
-%post -p /sbin/ldconfig
-
-%postun -p /sbin/ldconfig
-
-%files
-%manifest libtapi.manifest
-%license LICENSE
-%defattr(-,root,root,-)
-%{_libdir}/*.so*
-%{_bindir}/tapitest
-
-%files devel
-%manifest libtapi.manifest
-%defattr(-,root,root,-)
-%{_includedir}/tapi-3.0/*.h
-%{_includedir}/tapi-3.0/private/*.h
-%{_libdir}/pkgconfig/*.pc
-%{_libdir}/*.so
diff --git a/src/common.h b/src/common.h
new file mode 100644 (file)
index 0000000..d105a77
--- /dev/null
@@ -0,0 +1,109 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _COMMON_H_
+#define _COMMON_H_
+
+#include <stdio.h>
+#include <glib.h>
+#include <gio/gio.h>
+
+__BEGIN_DECLS
+
+#define TAPI_SHORT_TIMEOUT    (5 * 1000) /* Unlimit: G_MAXINT */
+#define TAPI_DEFAULT_TIMEOUT    (60 * 1000) /* Unlimit: G_MAXINT */
+#define TAPI_UNRESTRICTED_TIMEOUT    (180 * 1000)
+
+#define MAKE_RESP_CB_DATA(data,handle,cb,user_data)  \
+       if (!handle) { return TAPI_API_INVALID_INPUT; } \
+       data = g_new0(struct tapi_resp_data, 1); \
+       data->handle = handle; \
+       data->cb_fn = cb; \
+       data->user_data = user_data
+
+#define CHECK_ERROR(error) \
+       if (error) { \
+               warn("dbus error = %d (%s)", error->code, error->message); \
+               if (error->code == G_IO_ERROR_CANCELLED \
+                               && error->domain == G_IO_ERROR) { \
+                       /* Do not invoke callback in case of deinit TapiHandle */ \
+               } else if (strstr(error->message, "No access rights")) { \
+                       err("Access denied"); \
+                       if (evt_cb_data->cb_fn) \
+                               evt_cb_data->cb_fn(evt_cb_data->handle, TAPI_ERROR_ACCESS_DENIED, NULL, evt_cb_data->user_data); \
+               } else if (strstr(error->message, "Operation not supported")) { \
+                       err("Operation not supported"); \
+                       if (evt_cb_data->cb_fn) \
+                               evt_cb_data->cb_fn(evt_cb_data->handle, TAPI_ERROR_OPERATION_NOT_SUPPORTED, NULL, evt_cb_data->user_data); \
+               } else { \
+                       if (evt_cb_data->cb_fn) \
+                               evt_cb_data->cb_fn(evt_cb_data->handle, TAPI_ERROR_OPERATION_FAILED, NULL, evt_cb_data->user_data); \
+               } \
+               g_error_free(error); \
+               g_free(evt_cb_data); \
+               return; \
+       }
+
+#define CALLBACK_CALL(data) \
+       if (evt_cb_data->cb_fn) { \
+               evt_cb_data->cb_fn (handle, noti_id, (data), evt_cb_data->user_data); \
+       }
+
+struct tapi_handle {
+       gpointer dbus_connection;
+       char *path;
+       char *cp_name;
+       GHashTable *evt_list;
+       char cookie[20];
+       GCancellable *ca;
+
+       GHashTable *cache_property;
+       guint prop_callback_evt_id;
+};
+
+struct tapi_resp_data {
+       tapi_response_cb cb_fn;
+       void* user_data;
+       struct tapi_handle *handle;
+};
+
+struct tapi_evt_cb {
+       int evt_id;
+       tapi_notification_cb cb_fn;
+       void* user_data;
+       struct tapi_handle *handle;
+};
+
+struct signal_map {
+       const char *signal_name;
+       void (*callback)(TapiHandle *handle, GVariant *param, char *noti_id,
+                       struct tapi_evt_cb *evt_cb_data);
+};
+
+void _process_network_event(const gchar *sig, GVariant *param,
+       TapiHandle *handle, char *noti_id, struct tapi_evt_cb *evt_cb_data);
+
+__END_DECLS
+
+#endif /* _TAPI_COMMON_H_ */
+
+/**
+ *  @}
+ */
index ffd46276a89efc576756ac3cce1493afa0ee2edb..9ff8f9b7eca21c8a72f9bd078fc5e06ac9157e7c 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
-#include "tapi_private.h"
-#include "tapi.h"
-#include "tapi_call.h"
-
-#include <tel_call.h>
+#include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
-static gboolean __tapi_check_call_type(TelCallType type)
-{
-       switch (type) {
-       case TEL_CALL_TYPE_VOICE:
-       case TEL_CALL_TYPE_VIDEO:
-       case TEL_CALL_TYPE_E911:
-               return TRUE;
-       }
+#include "TelCall.h"
+#include "tapi_common.h"
+#include "TapiUtility.h"
 
-       return FALSE;
-}
+#include "common.h"
+#include "tapi_log.h"
+#include "ITapiCall.h"
 
-static gboolean __tapi_check_ecc(TelCallEmergencyCategory ecc)
+static void on_response_call_dial(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       switch (ecc) {
-       case TEL_CALL_ECC_DEFAULT:
-       case TEL_CALL_ECC_POLICE:
-       case TEL_CALL_ECC_AMBULANCE:
-       case TEL_CALL_ECC_FIREBRIGADE:
-       case TEL_CALL_ECC_MARINEGUARD:
-       case TEL_CALL_ECC_MOUNTAINRESCUE:
-       case TEL_CALL_ECC_MANUAL_ECALL:
-       case TEL_CALL_ECC_AUTO_ECALL:
-               return TRUE;
-       }
+       GError *error = 0;
+       GDBusConnection *conn = 0;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
 
-       return FALSE;
-}
+       GVariant *dbus_result;
 
-static gboolean __tapi_check_answer_type(TelCallAnswerType type)
-{
-       switch (type) {
-       case TEL_CALL_ANSWER_ACCEPT:
-       case TEL_CALL_ANSWER_REJECT:
-       case TEL_CALL_ANSWER_REPLACE:
-       case TEL_CALL_ANSWER_HOLD_AND_ACCEPT:
-               return TRUE;
-       }
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       return FALSE;
-}
+       g_variant_get (dbus_result, "(i)", &result);
 
-static gboolean __tapi_check_end_type(TelCallEndType type)
-{
-       switch (type) {
-       case TEL_CALL_END:
-       case TEL_CALL_END_ALL:
-       case TEL_CALL_END_ACTIVE_ALL:
-       case TEL_CALL_END_HOLD_ALL:
-               return TRUE;
-       }
+       if (evt_cb_data->cb_fn)
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
 
-       return FALSE;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static gboolean __tapi_check_active_line(TelCallActiveLine active_line)
+static void on_response_call_answer(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       switch (active_line) {
-       case TEL_CALL_ACTIVE_LINE1:
-       case TEL_CALL_ACTIVE_LINE2:
-               return TRUE;
-       }
+       GError *error = 0;
+       GDBusConnection *conn = 0;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       TelCallAnswerCnf_t data;
 
-       return FALSE;
-}
+       GVariant *dbus_result;
 
-static gboolean __tapi_check_sound_device(TelCallSoundDevice dev)
-{
-       switch (dev) {
-       case TEL_SOUND_DEVICE_RECEIVER:
-       case TEL_SOUND_DEVICE_SPEAKER_PHONE:
-       case TEL_SOUND_DEVICE_HFK:
-       case TEL_SOUND_DEVICE_HEADSET:
-       case TEL_SOUND_DEVICE_BLUETOOTH:
-       case TEL_SOUND_DEVICE_EC:
-               return TRUE;
-       }
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       return FALSE;
-}
+       g_variant_get (dbus_result, "(ii)", &result, &data.id);
 
-static gboolean __tapi_check_sound_rec(TelCallSoundRecording sound_rec)
-{
-       switch (sound_rec) {
-       case TEL_SOUND_RECORDING_STOP:
-       case TEL_SOUND_RECORDING_START:
-       case TEL_SOUND_RECORDING_PAUSE:
-               return TRUE;
-       }
+       if (evt_cb_data->cb_fn)
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
 
-       return FALSE;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static gboolean __tapi_check_sound_direction(TelCallSoundDirection dir)
+static void on_response_call_end(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       switch (dir) {
-       case TEL_SOUND_DIRECTION_LEFT:
-       case TEL_SOUND_DIRECTION_RIGHT:
-               return TRUE;
-       }
+       GError *error = 0;
+       GDBusConnection *conn = 0;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       TelCallEndCnf_t data;
 
-       return FALSE;
-}
+       GVariant *dbus_result;
 
-static gboolean __tapi_check_sound_mode(TelCallSoundEqualizationMode mode)
-{
-       switch (mode) {
-       case TEL_SOUND_EQUALIZATION_MODE_OFF:
-       case TEL_SOUND_EQUALIZATION_MODE_ON:
-       case TEL_SOUND_EQUALIZATION_MODE_FLAG_OFF:
-       case TEL_SOUND_EQUALIZATION_MODE_FLAG_ON:
-       case TEL_SOUND_EQUALIZATION_MODE_SOFT1:
-       case TEL_SOUND_EQUALIZATION_MODE_SOFT2:
-               return TRUE;
-       }
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       return FALSE;
-}
+       g_variant_get (dbus_result, "(iii)", &result, &data.id, &data.type);
 
-static gboolean __tapi_check_sound_path(TelCallSoundPath path)
-{
-       switch (path) {
-       case TEL_SOUND_PATH_HANDSET:
-       case TEL_SOUND_PATH_HEADSET:
-       case TEL_SOUND_PATH_HANDSFREE:
-       case TEL_SOUND_PATH_BLUETOOTH:
-       case TEL_SOUND_PATH_STEREO_BLUETOOTH:
-       case TEL_SOUND_PATH_SPK_PHONE:
-       case TEL_SOUND_PATH_HEADSET_3_5PI:
-       case TEL_SOUND_PATH_BT_NSEC_OFF:
-       case TEL_SOUND_PATH_MIC2:
-       case TEL_SOUND_PATH_MIC1:
-       case TEL_SOUND_PATH_HEADSET_HAC:
-               return TRUE;
-       }
+       if (evt_cb_data->cb_fn)
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
 
-       return FALSE;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-void on_call_signal_emit_handler(TelephonyCall *call, gchar *sender_name,
-       gchar *signal_name, GVariant *parameters, gpointer user_data)
+static void on_response_call_hold(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiEvtCbData *evt_cb_data;
-       TelHandle *handle = user_data;
-       char *evt_id;
-
-       if (handle == NULL)
-               return;
-
-       evt_id = g_strdup_printf("%s:%s", TELEPHONY_CALL_INTERFACE,
-                                       signal_name);
-
-       /*
-        * If an event callback is registered process
-        * g-signal event
-        */
-       evt_cb_data = g_hash_table_lookup(handle->evt_table, evt_id);
-       if (evt_cb_data == NULL) {
-               g_free(evt_id);
-               return;
-       }
+       GError *error = 0;
+       GDBusConnection *conn = 0;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       TelCallHoldCnf_t data;
 
-       if (!g_strcmp0(signal_name, "VoiceCallStatusIdle")
-                       || !g_strcmp0(signal_name, "VideoCallStatusIdle")) {
-               TelCallStatusIdleNoti idle_noti;
-
-               g_variant_get(parameters, "(ui)", &idle_noti.call_id,
-                               &idle_noti.cause);
-
-               dbg("%s call_id(%d), end_cause(0x%x)", signal_name,
-                       idle_noti.call_id, idle_noti.cause);
-
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &idle_noti);
-       } else if (!g_strcmp0(signal_name, "VoiceCallStatusDialing")
-                       || !g_strcmp0(signal_name, "VideoCallStatusDialing")
-                       || !g_strcmp0(signal_name, "VoiceCallStatusAlert")
-                       || !g_strcmp0(signal_name, "VideoCallStatusAlert")
-                       || !g_strcmp0(signal_name, "VoiceCallStatusActive")
-                       || !g_strcmp0(signal_name, "VideoCallStatusActive")
-                       || !g_strcmp0(signal_name, "VoiceCallStatusHeld")
-                       || !g_strcmp0(signal_name, "VoiceCallStatusIncoming")
-                       || !g_strcmp0(signal_name, "VideoCallStatusIncoming")) {
-               guint call_id;
-               g_variant_get(parameters, "(u)", &call_id);
-
-               dbg("%s call_id(%d)", signal_name, call_id);
-
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &call_id);
-       } else if (!g_strcmp0(signal_name, "MoWaiting")
-                       || !g_strcmp0(signal_name, "MoForwarded")
-                       || !g_strcmp0(signal_name, "MoBarredIncoming")
-                       || !g_strcmp0(signal_name, "MoBarredOutgoing")
-                       || !g_strcmp0(signal_name, "MoForwardConditional")
-                       || !g_strcmp0(signal_name, "MoForwardUnconditional")
-                       || !g_strcmp0(signal_name, "MtForwarded")
-                       || !g_strcmp0(signal_name, "MoDeflected")
-                       || !g_strcmp0(signal_name, "MtDeflected")
-                       || !g_strcmp0(signal_name, "Transfered")
-                       || !g_strcmp0(signal_name, "CallActive")
-                       || !g_strcmp0(signal_name, "CallHeld")
-                       || !g_strcmp0(signal_name, "CallJoined")) {
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, NULL);
-       } else if (!g_strcmp0(signal_name, "CallSoundRingbackTone")) {
-               TelCallSoundRingbackToneNoti rb_tone;;
-
-               g_variant_get(parameters, "(i)", &rb_tone);
-               dbg("%s (%d)", signal_name, rb_tone);
-
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &rb_tone);
-       } else if (!g_strcmp0(signal_name, "CallSoundWbamr")) {
-               TelCallSoundWbamrNoti wbamr;
-
-               g_variant_get(parameters, "(i)", &wbamr);
-               dbg("%s (%d)", signal_name, wbamr);
-
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &wbamr);
-       } else if (!g_strcmp0(signal_name, "CallSoundEqualization")) {
-               TelCallSoundEqualizationNoti equ_noti;
-
-               g_variant_get(parameters, "(ii)", &equ_noti.mode,
-                                       &equ_noti.direction);
-
-               dbg("%s mode(%d), direction(%d)", signal_name, equ_noti.mode,
-                                                       equ_noti.direction);
-
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &equ_noti);
-       } else if (!g_strcmp0(signal_name, "CallSoundClockStatus")) {
-               gboolean clock_status;
-
-               g_variant_get(parameters, "(b)", &clock_status);
-               dbg("%s clock_status(%s)", signal_name, clock_status ? "TRUE":"FALSE");
-
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &clock_status);
-       } else
-               err("Unsupported signal %s", signal_name);
-
-       g_free(evt_id);
-}
-
-
-static void on_response_call_dial(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
-{
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelCallResult result = TEL_CALL_RESULT_FAILURE;
-       GError *error = NULL;
+       GVariant *dbus_result;
 
-       dbg("Entry");
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       telephony_call_call_dial_finish(handle->call_proxy, (int *)&result, res,
-                                               &error);
+       g_variant_get (dbus_result, "(ii)", &result, &data.id);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       if (evt_cb_data->cb_fn)
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_call_dial(TelHandle *handle,
-       const TelCallDial *call_dial_info,
-       TapiResponseCb callback, void *user_data)
+static void on_response_call_active(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       GError *error = 0;
+       GDBusConnection *conn = 0;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       TelCallActiveCnf_t data;
 
-       dbg("Entry");
+       GVariant *dbus_result;
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && call_dial_info && callback
-                       && __tapi_check_ecc(call_dial_info->ecc)
-                       && __tapi_check_call_type(call_dial_info->call_type),
-                       TEL_RETURN_INVALID_PARAMETER);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       /* If call type is not Emergency number must not be NULL */
-       if (call_dial_info->call_type != TEL_CALL_TYPE_E911)
-               TEL_RETURN_IF_CHECK_FAIL(strlen(call_dial_info->number) != 0,
-                                               TEL_RETURN_INVALID_PARAMETER);
+       g_variant_get (dbus_result, "(ii)", &result, &data.id);
 
-       dbg("Destination Number : %s", call_dial_info->number);
+       if (evt_cb_data->cb_fn)
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
-
-       telephony_call_call_dial(handle->call_proxy, call_dial_info->call_type,
-                               call_dial_info->ecc,
-                               call_dial_info->number, NULL,
-                               on_response_call_dial, rsp_cb_data);
-
-       return TEL_RETURN_SUCCESS;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_call_answer(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+static void on_response_call_swap(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelCallResult result = TEL_CALL_RESULT_FAILURE;
-       GError *error = NULL;
+       GError *error = 0;
+       GDBusConnection *conn = 0;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       TelCallSwapCnf_t data;
 
-       dbg("Entry");
+       GVariant *dbus_result;
 
-       telephony_call_call_answer_finish(handle->call_proxy, (int *)&result, res,
-                                               &error);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       g_variant_get (dbus_result, "(ii)", &result, &data.id);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       if (evt_cb_data->cb_fn)
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
+
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_call_answer(TelHandle *handle,
-                                       TelCallAnswerType ans_type,
-                                       TapiResponseCb callback,
-                                       void *user_data)
+static void on_response_call_join(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       GError *error = 0;
+       GDBusConnection *conn = 0;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       TelCallJoinCnf_t data;
 
-       dbg("Entry");
+       GVariant *dbus_result;
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback
-                                       && __tapi_check_answer_type(ans_type),
-                                       TEL_RETURN_INVALID_PARAMETER);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       g_variant_get (dbus_result, "(ii)", &result, &data.id);
 
-       telephony_call_call_answer(handle->call_proxy, ans_type, NULL,
-                                       on_response_call_answer, rsp_cb_data);
+       if (evt_cb_data->cb_fn)
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
 
-       return TEL_RETURN_SUCCESS;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_call_end(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+static void on_response_call_split(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelCallResult result = TEL_CALL_RESULT_FAILURE;
-       GError *error = NULL;
+       GError *error = 0;
+       GDBusConnection *conn = 0;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       TelCallSplitCnf_t data;
+
+       GVariant *dbus_result;
 
-       dbg("Entry");
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       telephony_call_call_end_finish(handle->call_proxy, (int *)&result, res,
-                                               &error);
+       g_variant_get (dbus_result, "(ii)", &result, &data.id);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       if (evt_cb_data->cb_fn)
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_call_end(TelHandle *handle,
-                                       const TelCallEnd *call_end_info,
-                                       TapiResponseCb callback,
-                                       void *user_data)
+static void on_response_call_transfer(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       GError *error = 0;
+       GDBusConnection *conn = 0;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       TelCallTransferCnf_t data;
 
-       dbg("Entry");
+       GVariant *dbus_result;
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback && call_end_info
-                               && __tapi_check_end_type(call_end_info->end_type),
-                                       TEL_RETURN_INVALID_PARAMETER);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       g_variant_get (dbus_result, "(ii)", &result, &data.id);
 
-       telephony_call_call_end(handle->call_proxy, call_end_info->call_id,
-                               call_end_info->end_type, NULL,
-                               on_response_call_end, rsp_cb_data);
+       if (evt_cb_data->cb_fn)
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
 
-       return TEL_RETURN_SUCCESS;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_call_send_dtmf(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+static void on_response_call_dtmf(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelCallResult result = TEL_CALL_RESULT_FAILURE;
-       GError *error = NULL;
+       GError *error = 0;
+       GDBusConnection *conn = 0;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
 
-       dbg("Entry");
+       GVariant *dbus_result;
 
-       telephony_call_call_send_dtmf_finish(handle->call_proxy, (int *)&result, res,
-                                               &error);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       g_variant_get (dbus_result, "(i)", &result);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       if (evt_cb_data->cb_fn)
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
+
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_call_send_dtmf(TelHandle *handle,
-                                               const char *dtmf_str,
-                                               TapiResponseCb callback,
-                                               void *user_data)
+static void on_response_call_deflect(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       GError *error = 0;
+       GDBusConnection *conn = 0;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
 
-       dbg("Entry");
+       GVariant *dbus_result;
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback && dtmf_str,
-                                       TEL_RETURN_INVALID_PARAMETER);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       g_variant_get (dbus_result, "(i)", &result);
 
-       telephony_call_call_send_dtmf(handle->call_proxy, dtmf_str, NULL,
-                                       on_response_call_send_dtmf, rsp_cb_data);
+       if (evt_cb_data->cb_fn)
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
 
-       return TEL_RETURN_SUCCESS;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_call_hold(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+static void on_response_get_call_privacy_mode(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelCallResult result = TEL_CALL_RESULT_FAILURE;
-       GError *error = NULL;
+       GError *error = 0;
+       GDBusConnection *conn = 0;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       TelCallGetPrivacyModeResp_t data;
+
+       GVariant *dbus_result;
 
-       dbg("Entry");
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       telephony_call_call_hold_finish(handle->call_proxy, (int *)&result, res,
-                                               &error);
+       g_variant_get (dbus_result, "(ii)", &result,&data.mode);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       if (evt_cb_data->cb_fn)
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_call_hold(TelHandle *handle, TapiResponseCb callback,
-                                       void *user_data)
+static void on_response_set_call_privacy_mode(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       GError *error = 0;
+       GDBusConnection *conn = 0;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
 
-       dbg("Entry");
+       GVariant *dbus_result;
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback,
-                                       TEL_RETURN_INVALID_PARAMETER);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       g_variant_get (dbus_result, "(i)", &result);
 
-       telephony_call_call_hold(handle->call_proxy, NULL,
-                                       on_response_call_hold, rsp_cb_data);
+       if (evt_cb_data->cb_fn)
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
 
-       return TEL_RETURN_SUCCESS;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-
-static void on_response_call_active(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+static void on_response_get_call_volume_info(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelCallResult result = TEL_CALL_RESULT_FAILURE;
-       GError *error = NULL;
+       GError *error = 0;
+       GDBusConnection *conn = 0;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1, i = 0;
+       TelCallGetVolumeInfoResp_t resp;
 
-       dbg("Entry");
+       GVariant *dbus_result = 0, *value = 0;
+       GVariantIter *iter = 0;
+       GVariantIter *iter_row = 0;
+       const gchar *key = 0;
 
-       telephony_call_call_active_finish(handle->call_proxy, (int *)&result, res,
-                                               &error);
+       memset(&resp, '\0', sizeof(TelCallGetVolumeInfoResp_t));
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-}
+       g_variant_get (dbus_result, "(aa{sv}i)", &iter, &result);
 
-EXPORT_API TelReturn tapi_call_active(TelHandle *handle,
-                                       TapiResponseCb callback,
-                                       void *user_data)
-{
-       TapiRespCbData *rsp_cb_data;
+       resp.record_num = g_variant_iter_n_children(iter);
 
-       dbg("Entry");
+       while ( g_variant_iter_next(iter, "a{sv}", &iter_row ) ) {
+               while ( g_variant_iter_loop( iter_row, "{sv}", &key, &value ) ) {
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback,
-                                       TEL_RETURN_INVALID_PARAMETER);
+                       if ( !g_strcmp0(key, "type") ) {
+                               int type = g_variant_get_int32(value);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+                               resp.record[i].device = (type & 0xf0);
+                               resp.record[i].type = (type & 0x0f);
+                       }
+                       else if ( !g_strcmp0(key, "level") ) {
+                               resp.record[i].volume = g_variant_get_int32(value);
+                       }
+               }
+               g_variant_iter_free(iter_row);
+               i++;
+       }
+       g_variant_iter_free(iter);
 
-       telephony_call_call_active(handle->call_proxy, NULL,
-                                       on_response_call_active, rsp_cb_data);
+       if (evt_cb_data->cb_fn)
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &resp, evt_cb_data->user_data);
 
-       return TEL_RETURN_SUCCESS;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_call_swap(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+static void on_response_set_call_volume_info(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelCallResult result = TEL_CALL_RESULT_FAILURE;
-       GError *error = NULL;
+       GError *error = 0;
+       GDBusConnection *conn = 0;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
 
-       dbg("Entry");
+       GVariant *dbus_result;
 
-       telephony_call_call_swap_finish(handle->call_proxy, (int *)&result, res,
-                                               &error);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       g_variant_get (dbus_result, "(i)", &result);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       if (evt_cb_data->cb_fn)
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
+
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_call_swap(TelHandle *handle, TapiResponseCb callback,
-                                       void *user_data)
+static void on_response_set_call_sound_path(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       GError *error = 0;
+       GDBusConnection *conn = 0;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
 
-       dbg("Entry");
+       GVariant *dbus_result;
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback,
-                                       TEL_RETURN_INVALID_PARAMETER);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       g_variant_get (dbus_result, "(i)", &result);
 
-       telephony_call_call_swap(handle->call_proxy, NULL,
-                                       on_response_call_swap, rsp_cb_data);
+       if (evt_cb_data->cb_fn)
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
 
-       return TEL_RETURN_SUCCESS;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_call_join(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+static void on_response_set_call_mute_status(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelCallResult result = TEL_CALL_RESULT_FAILURE;
-       GError *error = NULL;
+       GError *error = 0;
+       GDBusConnection *conn = 0;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+
+       GVariant *dbus_result;
 
-       dbg("Entry");
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       telephony_call_call_join_finish(handle->call_proxy, (int *)&result, res,
-                                               &error);
+       g_variant_get (dbus_result, "(i)", &result);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       if (evt_cb_data->cb_fn)
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_call_join(TelHandle *handle, TapiResponseCb callback,
-                                       void *user_data)
+static void on_response_get_call_mute_status(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       GError *error = 0;
+       GDBusConnection *conn = 0;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       TelCallGetMuteStatusResp_t resp;
 
-       dbg("Entry");
+       GVariant *dbus_result;
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback,
-                                       TEL_RETURN_INVALID_PARAMETER);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       g_variant_get (dbus_result, "(iii)", &result, &resp.path, &resp.status);
 
-       telephony_call_call_join(handle->call_proxy, NULL,
-                                       on_response_call_join, rsp_cb_data);
+       if (evt_cb_data->cb_fn)
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &resp, evt_cb_data->user_data);
 
-       return TEL_RETURN_SUCCESS;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_call_split(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+static void on_response_set_preferred_voice_subscription(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelCallResult result = TEL_CALL_RESULT_FAILURE;
-       GError *error = NULL;
+       GError *error = 0;
+       GDBusConnection *conn = 0;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+
+       GVariant *dbus_result;
 
-       dbg("Entry");
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       telephony_call_call_split_finish(handle->call_proxy, (int *)&result, res,
-                                               &error);
+       g_variant_get (dbus_result, "(i)", &result);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       if (evt_cb_data->cb_fn)
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_call_split(TelHandle *handle, unsigned int call_id,
-                                       TapiResponseCb callback,
-                                       void *user_data)
+
+EXPORT_API int tel_dial_call(TapiHandle *handle, const TelCallDial_t *pParams, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(pParams, TAPI_API_INVALID_PTR);
 
-       dbg("Entry");
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback,
-                                       TEL_RETURN_INVALID_PARAMETER);
+       param = g_variant_new("(iis)", pParams->CallType, pParams->Ecc, pParams->szNumber);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       msg("[%s] Request Dial. type:[%d]", handle->cp_name, pParams->CallType);
 
-       telephony_call_call_split(handle->call_proxy, call_id, NULL,
-                                       on_response_call_split, rsp_cb_data);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "Dial", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_call_dial, evt_cb_data );
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_call_transfer(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+
+EXPORT_API int tel_answer_call(TapiHandle *handle, unsigned int CallHandle, TelCallAnswerType_t AnsType, tapi_response_cb callback, void *user_data )
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelCallResult result = TEL_CALL_RESULT_FAILURE;
-       GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       telephony_call_call_transfer_finish(handle->call_proxy, (int *)&result, res,
-                                               &error);
+       if (AnsType > TAPI_CALL_ANSWER_HOLD_AND_ACCEPT)
+               return TAPI_API_INVALID_INPUT;
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-}
+       param = g_variant_new("(ii)", CallHandle, AnsType);
 
-EXPORT_API TelReturn tapi_call_transfer(TelHandle *handle,
-                                               TapiResponseCb callback,
-                                               void *user_data)
-{
-       TapiRespCbData *rsp_cb_data;
+       msg("[%s] Request Answer. id:[%d], type:[%d]", handle->cp_name, CallHandle, AnsType);
 
-       dbg("Entry");
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "Answer", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_call_answer, evt_cb_data );
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback,
-                                       TEL_RETURN_INVALID_PARAMETER);
+       return TAPI_API_SUCCESS;
+}
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+EXPORT_API int tel_end_call(TapiHandle *handle, unsigned int CallHandle, TelCallEndType_t EndType, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
 
-       telephony_call_call_transfer(handle->call_proxy, NULL,
-                                       on_response_call_transfer, rsp_cb_data);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       return TEL_RETURN_SUCCESS;
-}
+       if (EndType > TAPI_CALL_END_HOLD_ALL)
+               return TAPI_API_INVALID_INPUT;
 
-static void on_response_call_deflect(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
-{
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelCallResult result = TEL_CALL_RESULT_FAILURE;
-       GError *error = NULL;
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       dbg("Entry");
+       param = g_variant_new("(ii)", CallHandle, EndType);
 
-       telephony_call_call_deflect_finish(handle->call_proxy, (int *)&result, res,
-                                               &error);
+       msg("[%s] Request End. id:[%d], type:[%d]", handle->cp_name, CallHandle, EndType);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "End", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_call_end, evt_cb_data );
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_call_deflect(TelHandle *handle,
-                                       const char *deflect_to,
-                                       TapiResponseCb callback,
-                                       void *user_data)
+EXPORT_API int tel_hold_call(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data )
 {
-       TapiRespCbData *rsp_cb_data;
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback && deflect_to,
-                                       TEL_RETURN_INVALID_PARAMETER);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       param = g_variant_new("(i)", CallHandle);
 
-       telephony_call_call_deflect(handle->call_proxy, deflect_to, NULL,
-                                       on_response_call_deflect, rsp_cb_data);
+       msg("[%s] Request Hold. id:[%d]", handle->cp_name, CallHandle);
 
-       return TEL_RETURN_SUCCESS;
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "Hold", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_call_hold, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_call_set_active_line(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_active_call(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data )
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelCallResult result = TEL_CALL_RESULT_FAILURE;
-       GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       dbg("Entry");
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       telephony_call_call_set_active_line_finish(handle->call_proxy, (int *)&result,
-                                                       res, &error);
+       param = g_variant_new("(i)", CallHandle);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       msg("[%s] Request Active. id:[%d]", handle->cp_name, CallHandle);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "Active", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_call_active, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_call_set_active_line(TelHandle *handle,
-                                               TelCallActiveLine active_line,
-                                               TapiResponseCb callback,
-                                               void *user_data)
+EXPORT_API int tel_swap_call(TapiHandle *handle, unsigned int CallHandle1, unsigned int CallHandle2, tapi_response_cb callback, void *user_data )
 {
-       TapiRespCbData *rsp_cb_data;
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       dbg("Entry");
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback
-                                       && __tapi_check_active_line(active_line),
-                                       TEL_RETURN_INVALID_PARAMETER);
+       param = g_variant_new("(i)", CallHandle1);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       msg("[%s] Request Swap. id:[%d][%d]", handle->cp_name, CallHandle1, CallHandle2);
 
-       telephony_call_call_set_active_line(handle->call_proxy, active_line,
-                                       NULL, on_response_call_set_active_line,
-                                       rsp_cb_data);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "Swap", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_call_swap, evt_cb_data );
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_call_get_active_line(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_join_call(TapiHandle *handle, unsigned int CallHandle1, unsigned int CallHandle2, tapi_response_cb callback, void *user_data )
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelCallActiveLine active_line;
-       TelCallResult result = TEL_CALL_RESULT_FAILURE;
-       GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       telephony_call_call_get_active_line_finish(handle->call_proxy, (int *)&result,
-                                                       (int *)&active_line, res,
-                                                       &error);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       param = g_variant_new("(i)", CallHandle1);
 
-       if (result != TEL_CALL_RESULT_SUCCESS) {
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-       } else {
-               RESP_CALLBACK_CALL(rsp_cb_data, result, &active_line);
-       }
+       msg("[%s] Request Join", handle->cp_name);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "Join", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_call_join, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_call_get_active_line(TelHandle *handle,
-                                               TapiResponseCb callback,
-                                               void *user_data)
+EXPORT_API int tel_split_call(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data )
 {
-       TapiRespCbData *rsp_cb_data;
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback,
-               TEL_RETURN_INVALID_PARAMETER);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       param = g_variant_new("(i)", CallHandle);
 
-       telephony_call_call_get_active_line(handle->call_proxy,
-               NULL, on_response_call_get_active_line, rsp_cb_data);
+       msg("[%s] Request Split. id:[%d]", handle->cp_name, CallHandle);
 
-       return TEL_RETURN_SUCCESS;
-}
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "Split", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_call_split, evt_cb_data );
 
-static inline void __display_call_status(TelCallStatus *call_status)
-{
-       dbg("Call ID            %u", call_status->call_id);
-       dbg("####################");
-       dbg("Call type          %d", call_status->call_type);
-       dbg("Call state         %d", call_status->call_state);
-       dbg("Mobile %s", call_status->mo_call ? "Originated" : "Terminated");
-       dbg("Multiparty         %s", call_status->mpty ? "YES" : "NO");
-       dbg("Active line                %d", call_status->active_line);
-       dbg("Caller Information:");
-       dbg("CLI validity       %d", call_status->cli_validity);
-       dbg("Number             %s", call_status->number);
-       if (call_status->mo_call)
-               return;
-       dbg("CNI validity       %d", call_status->cni_validity);
-       dbg("Name               %s", call_status->name);
-       dbg("forward            %s", call_status->forward ? "YES" : "NO");
+       return TAPI_API_SUCCESS;
 }
 
-static void __set_call_info(TelCallStatus *call_status,
-       unsigned int call_id, TelCallType call_type, TelCallState call_state,
-       gboolean mo_call, gboolean mpty, TelCallCliValidity cli_validity,
-       char *number, TelCallCniValidity cni_validity, char *name,
-       gboolean forward, TelCallActiveLine active_line)
+EXPORT_API int tel_transfer_call(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data )
 {
-       call_status->call_id = call_id;
-       call_status->call_type = call_type;
-       call_status->call_state = call_state;
-       call_status->mo_call = mo_call;
-       call_status->mpty = mpty;
-       call_status->active_line = active_line;
-       call_status->cli_validity = cli_validity;
-       if (number)
-               g_strlcpy(call_status->number, number, TEL_CALL_CALLING_NUMBER_LEN_MAX + 1);
-       /* Mobile terminated call */
-       if (mo_call == TRUE)
-               return;
-
-       call_status->cni_validity = cni_validity;
-
-       if (name)
-               g_strlcpy(call_status->name, name, TEL_CALL_CALLING_NAME_LEN_MAX + 1);
-
-       call_status->forward = forward;
-}
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
 
-EXPORT_API TelReturn tapi_call_get_status(TelHandle *handle,
-       unsigned int call_id, TelCallStatus *call_status)
-{
-       TelReturn result = TEL_RETURN_FAILURE;
-       GError *error = NULL;
-       TelCallResult call_res;
-       unsigned int out_cid;
-       TelCallType call_type;
-       TelCallState call_state;
-       gboolean mo_call;
-       gboolean mpty;
-       TelCallCliValidity cli_validity;
-       char *number;
-       TelCallCniValidity cni_validity;
-       char *name;
-       gboolean forward;
-       TelCallActiveLine active_line;
-
-       dbg("Entry");
-
-       TEL_RETURN_IF_CHECK_FAIL(handle && call_status,
-                                       TEL_RETURN_INVALID_PARAMETER);
-
-       telephony_call_call_get_status_sync(handle->call_proxy, call_id,
-               (int *)&call_res, &out_cid, (int *)&call_type,
-               (int *)&call_state, &mo_call, &mpty, (int *)&cli_validity,
-               &number, (int *)&cni_validity, &name, &forward,
-               (int *)&active_line, NULL, &error);
-       if (error) {
-               dbg("dbus error = %d (%s)", error->code, error->message);
-               g_error_free(error);
-               goto exit;
-       }
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       if (call_res != TEL_CALL_RESULT_SUCCESS) {
-               err("GetStatus failed with error %d", call_res);
-               goto exit;
-       }
-       dbg("number[%s]", number);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       __set_call_info(call_status, out_cid, call_type, call_state, mo_call,
-               mpty, cli_validity, number, cni_validity,
-               name, forward, active_line);
+       param = g_variant_new("(i)", CallHandle);
 
-       g_free(number);
-       g_free(name);
+       msg("[%s] Request Transfer. id:[%d]", handle->cp_name, CallHandle);
 
-       result = TEL_RETURN_SUCCESS;
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "Transfer", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_call_transfer, evt_cb_data );
 
-       __display_call_status(call_status);
-
-exit:
-       return result;
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_call_get_status_all(TelHandle *handle,
-       TelCallStatusList *call_status_list)
+EXPORT_API int tel_start_call_cont_dtmf(TapiHandle *handle, unsigned char dtmf_digit, tapi_response_cb callback, void *user_data )
 {
-       TelReturn result = TEL_RETURN_FAILURE;
-       GError *error = NULL;
-       int call_res;
-       unsigned int count;
-       GVariant *call_list;
-
-       dbg("Entry");
-
-       TEL_RETURN_IF_CHECK_FAIL(handle && call_status_list,
-                                       TEL_RETURN_INVALID_PARAMETER);
-
-       telephony_call_call_get_status_all_sync(handle->call_proxy,
-               &call_res, &count, &call_list, NULL, &error);
-       if (error) {
-               dbg("dbus error = %d (%s)", error->code, error->message);
-               g_error_free(error);
-               goto out_error;
-       }
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
 
-       if (call_res != TEL_CALL_RESULT_SUCCESS) {
-               err("GetStatusAll failed with error %d", call_res);
-               g_variant_unref(call_list);
-               goto out_error;
-       }
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       if ((count != 0) && (g_variant_n_children(call_list) == count)) {
-               GVariantIter *iter = NULL, *iter_row = NULL;
-               GVariant *key_value;
-               const gchar *key;
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-               unsigned int call_id = 0;
-               TelCallType call_type = -1;
-               TelCallState call_state = -1;
-               gboolean mo_call = FALSE;
-               gboolean mpty = FALSE;
-               TelCallCliValidity cli_validity = -1;
-               char *number = NULL;
-               TelCallCniValidity cni_validity = -1;
-               char *name = NULL;
-               gboolean forward = FALSE;
-               TelCallActiveLine active_line = -1;
+       param = g_variant_new("(y)", dtmf_digit);
 
-               guint i = 0;
+       msg("[%s] Request cont DTMF", handle->cp_name);
 
-               dbg("Call status list count: [%d]", count);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "StartContDtmf", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, G_MAXINT, handle->ca,
+                       on_response_call_dtmf, evt_cb_data );
 
-               g_variant_get(call_list, "aa{sv}", &iter);
-               while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
-                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
-                               if (g_strcmp0(key, "call_id") == 0) {
-                                       call_id = g_variant_get_uint32(key_value);
-                               }
-                               else if (g_strcmp0(key, "call_type") == 0) {
-                                       call_type = g_variant_get_int32(key_value);
-                               }
-                               else if (g_strcmp0(key, "call_state") == 0) {
-                                       call_state = g_variant_get_int32(key_value);
-                               }
-                               else if (g_strcmp0(key, "mo_call") == 0) {
-                                       mo_call = g_variant_get_boolean(key_value);
-                               }
-                               else if (g_strcmp0(key, "mpty") == 0) {
-                                       mpty = g_variant_get_boolean(key_value);
-                               }
-                               else if (g_strcmp0(key, "cli_validity") == 0) {
-                                       cli_validity = g_variant_get_int32(key_value);
-                               }
-                               else if (g_strcmp0(key, "num") == 0) {
-                                       number = g_strdup(g_variant_get_string(key_value, NULL));
-                               }
-                               else if (g_strcmp0(key, "cni_validity") == 0) {
-                                       cni_validity = g_variant_get_int32(key_value);
-                               }
-                               else if (g_strcmp0(key, "name") == 0) {
-                                       name = g_strdup(g_variant_get_string(key_value, NULL));
-                               }
-                               else if (g_strcmp0(key, "forward") == 0) {
-                                       forward = g_variant_get_boolean(key_value);
-                               }
-                               else if (g_strcmp0(key, "active_line") == 0) {
-                                       active_line = g_variant_get_int32(key_value);
-                               }
-                       }
-                       g_variant_iter_free(iter_row);
+       return TAPI_API_SUCCESS;
+}
 
-                       /* Update out parameter */
-                       __set_call_info(&call_status_list->status[i],
-                               call_id, call_type, call_state, mo_call,
-                               mpty, cli_validity, number, cni_validity,
-                               name, forward, active_line);
-
-                       /* Free and reset the variables */
-                       g_free(number);
-                       g_free(name);
-                       call_id = 0;
-                       call_type = -1;
-                       call_state = -1;
-                       mo_call = FALSE;
-                       mpty = FALSE;
-                       cli_validity = -1;
-                       number = NULL;
-                       cni_validity = -1;
-                       name = NULL;
-                       forward = FALSE;
-                       active_line = -1;
-
-                       /* Print data */
-                       __display_call_status(&call_status_list->status[i]);
-                       i++;
-               }
-               g_variant_iter_free(iter);
+EXPORT_API int tel_stop_call_cont_dtmf(TapiHandle *handle, tapi_response_cb callback, void *user_data )
+{
+       struct tapi_resp_data *evt_cb_data = 0;
 
-               call_status_list->count = count;
-               result = TEL_RETURN_SUCCESS;
-       }
-       else {
-               call_status_list->count = 0;
-       }
-       g_variant_unref(call_list);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       dbg("Call count: [%d]", call_status_list->count);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-out_error:
-       return result;
+       msg("[%s] Stop cont DTMF", handle->cp_name);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "StopContDtmf", NULL, 0,
+                       G_DBUS_CALL_FLAGS_NONE, G_MAXINT, handle->ca,
+                       on_response_call_dtmf, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_call_set_volume_info(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_send_call_burst_dtmf(TapiHandle *handle, const TelCallBurstDtmf_t *info, tapi_response_cb callback, void *user_data )
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelCallResult result = TEL_CALL_RESULT_FAILURE;
-       GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(info, TAPI_API_INVALID_PTR);
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       dbg("Entry");
+       param = g_variant_new("(sii)", info->dtmf_string, info->pulse_width, info->inter_digit_interval);
 
-       telephony_call_call_set_volume_info_finish(handle->call_proxy, (int *)&result,
-                                                       res, &error);
+       msg("[%s] Send burst DTMF", handle->cp_name);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "SendBurstDtmf", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, G_MAXINT, handle->ca,
+                       on_response_call_dtmf, evt_cb_data );
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_call_set_volume_info(TelHandle *handle,
-                                       const TelCallVolumeInfo *volume_info,
-                                       TapiResponseCb callback,
-                                       void *user_data)
+EXPORT_API int tel_deflect_call(TapiHandle *handle, unsigned int CallHandle, const TelCallDeflectDstInfo_t *pInfo, tapi_response_cb callback, void *user_data )
 {
-       TapiRespCbData *rsp_cb_data;
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(pInfo, TAPI_API_INVALID_PTR);
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback && volume_info
-                               && __tapi_check_sound_device(volume_info->device)
-                               && (volume_info->volume <= 100),
-                               TEL_RETURN_INVALID_PARAMETER);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       param = g_variant_new("(is)", CallHandle, pInfo->number);
 
-       telephony_call_call_set_volume_info(handle->call_proxy,
-                                       volume_info->device,
-                                       volume_info->volume,
-                                       NULL, on_response_call_set_volume_info,
-                                       rsp_cb_data);
+       msg("[%s] deflect", handle->cp_name);
 
-       return TEL_RETURN_SUCCESS;
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "Deflect", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_call_deflect, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_call_get_volume_info(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_get_call_status(TapiHandle *handle, int call_id, TelCallStatus_t *out )
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       unsigned int volume;
-       TelCallResult result = TEL_CALL_RESULT_FAILURE;
-       GError *error = NULL;
+       GVariant *gv = 0;
+       GVariant *param = 0;
 
-       dbg("Entry");
+       GError *gerr = 0;
 
-       telephony_call_call_get_volume_info_finish(handle->call_proxy, (int *)&result,
-                                                       &volume, res, &error);
+       gchar *call_number;
+       gint call_type = 0;
+       gboolean call_direction = FALSE;
+       gint call_state = 0;
+       gboolean call_multiparty_state = FALSE;
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(out, TAPI_API_INVALID_PTR);
 
-       if (result != TEL_CALL_RESULT_SUCCESS) {
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-       } else {
-               RESP_CALLBACK_CALL(rsp_cb_data, result, &volume);
-       }
-}
+       param = g_variant_new("(i)", call_id);
 
-EXPORT_API TelReturn tapi_call_get_volume_info(TelHandle *handle,
-                                       TelCallSoundDevice sound_device,
-                                       TapiResponseCb callback,
-                                       void *user_data)
-{
-       TapiRespCbData *rsp_cb_data;
+       dbg("[%s] Func Entrance ", handle->cp_name);
+
+       gv = g_dbus_connection_call_sync(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "GetStatus", param, 0, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca, &gerr);
 
-       dbg("Entry");
+       if ( gv ) {
+               g_variant_get(gv, "(isibib)", &call_id, &call_number, &call_type, &call_direction, &call_state, &call_multiparty_state);
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && __tapi_check_sound_device(sound_device),
-                                       TEL_RETURN_INVALID_PARAMETER);
+               out->CallHandle = (int)call_id;
+               out->bMoCall = (int)call_direction;
+               strncpy( out->pNumber, call_number, TAPI_CALL_DIALDIGIT_LEN_MAX );
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+               dbg("[ check ] call_number : [%s] out->pNumber : [%s]", call_number, out->pNumber);
 
-       telephony_call_call_get_volume_info(handle->call_proxy, sound_device,
-                                       NULL, on_response_call_get_volume_info,
-                                       rsp_cb_data);
+               out->CallType = (TelCallType_t)call_type;
+               out->CallState = (TelCallStates_t)call_state;
+               out->bConferenceState = (int)call_multiparty_state;
 
-       return TEL_RETURN_SUCCESS;
+               g_free( call_number );
+               g_variant_unref (gv);
+               if (gerr)
+                       g_error_free (gerr);
+       } else {
+               dbg("[ error ] fail to get call status : (0x%x)", call_id);
+               g_error_free(gerr);
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_call_set_sound_path(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_get_call_status_all( TapiHandle *handle, TelCallStatusCallback cb, void *user_data )
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelCallResult result = TEL_CALL_RESULT_FAILURE;
-       GError *error = NULL;
+       GVariant *gv = 0;
+       GVariantIter *iter = 0, *iter_row = 0;
+       GError *gerr = 0;
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(cb, TAPI_API_INVALID_PTR);
 
-       telephony_call_call_set_sound_path_finish(handle->call_proxy, (int *)&result,
-                                                       res, &error);
+       dbg("[%s] Func Entrance ", handle->cp_name);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       gv = g_dbus_connection_call_sync(handle->dbus_connection,
+                                                                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                                                                       "GetStatusAll", 0, 0, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca, &gerr);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-}
+       if ( gv ) {
 
-EXPORT_API TelReturn tapi_call_set_sound_path(TelHandle *handle,
-                               const TelCallSoundPathInfo *sound_path_info,
-                               TapiResponseCb callback, void *user_data)
-{
-       TapiRespCbData *rsp_cb_data;
+               TelCallStatus_t data;
+               gchar *key = 0;
+               GVariant *value = 0;
 
-       dbg("Entry");
+               g_variant_get(gv, "(aa{sv})", &iter);
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback && sound_path_info
-                               && __tapi_check_sound_path(sound_path_info->path),
-                               TEL_RETURN_INVALID_PARAMETER);
+               while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &value)) {
 
-       telephony_call_call_set_sound_path(handle->call_proxy,
-                                       sound_path_info->path,
-                                       sound_path_info->ex_volume, NULL,
-                                       on_response_call_set_sound_path,
-                                       rsp_cb_data);
+                               if (!g_strcmp0(key, "call_id")) {
+                                       data.CallHandle = g_variant_get_int32(value);
+                               }
+                               else if (!g_strcmp0(key, "call_number")) {
+                                       strncpy(data.pNumber, g_variant_get_string(value, 0), TAPI_CALL_DIALDIGIT_LEN_MAX);
+                               }
+                               else if (!g_strcmp0(key, "call_type")) {
+                                       data.CallType = (int)g_variant_get_int32(value);
+                               }
+                               else if (!g_strcmp0(key, "call_direction")) {
+                                       data.bMoCall = (int)g_variant_get_boolean(value);
+                               }
+                               else if (!g_strcmp0(key, "call_state")) {
+                                       data.CallState = (int)g_variant_get_int32(value);
+                               }
+                               else if (!g_strcmp0(key, "call_multiparty_state")) {
+                                       data.bConferenceState = (int)g_variant_get_boolean(value);
+                               }
+                       }
+                       g_variant_iter_free(iter_row);
+
+                       cb( &data, user_data );
+               }
+               g_variant_iter_free(iter);
+               g_variant_unref (gv);
+               if (gerr)
+                       g_error_free (gerr);
+       } else {
+               if (strstr(gerr->message, "No access rights")) {
+                       err("Permission denied");
+                       return TAPI_API_ACCESS_DENIED;
+               } else {
+                       err("[error] fail to get call status (%s)", gerr->message);
+                       return TAPI_API_OPERATION_FAILED;
+               }
+       }
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_call_set_mute(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_get_call_privacy_mode(TapiHandle *handle, tapi_response_cb callback, void *user_data )
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelCallResult result = TEL_CALL_RESULT_FAILURE;
-       GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = 0;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       dbg("Entry");
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       telephony_call_call_set_mute_finish(handle->call_proxy, (int *)&result,
-                                                       res, &error);
+       dbg("[%s] Func Entrance ", handle->cp_name);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "GetPrivacyMode", 0, 0,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_get_call_privacy_mode, evt_cb_data );
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_call_set_mute(TelHandle *handle, gboolean mute,
-                               TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_set_call_privacy_mode(TapiHandle *handle, TelCallPrivacyMode_t privacy_mode, tapi_response_cb callback, void *user_data )
 {
-       TapiRespCbData *rsp_cb_data;
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *pParam = 0;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       dbg("Entry");
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback,
-                                       TEL_RETURN_INVALID_PARAMETER);
+       pParam = g_variant_new("(i)", privacy_mode);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       msg("[%s] Set Privacy. mode:[%d]", handle->cp_name, privacy_mode);
 
-       telephony_call_call_set_mute(handle->call_proxy, mute,
-                                       NULL, on_response_call_set_mute,
-                                       rsp_cb_data);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "SetPrivacyMode", pParam, 0,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_set_call_privacy_mode, evt_cb_data );
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_call_get_mute_status(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_get_call_volume_info(TapiHandle *handle, TelSoundDevice_t device, TelSoundType_t type, tapi_response_cb callback, void *user_data )
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       gboolean mute;
-       TelCallResult result = TEL_CALL_RESULT_FAILURE;
-       GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       telephony_call_call_get_mute_status_finish(handle->call_proxy, (int *)&result,
-                                                       &mute, res,
-                                                       &error);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       param = g_variant_new("(ii)", device, type);
 
-       if (result != TEL_CALL_RESULT_SUCCESS) {
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-       } else {
-               RESP_CALLBACK_CALL(rsp_cb_data, result, &mute);
-       }
+       dbg("[%s] Get Volume Info. device:[%d] type:[%d] ", handle->cp_name, device, type);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "GetSoundVolumeLevel", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_get_call_volume_info, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_call_get_mute_status(TelHandle *handle,
-                                               TapiResponseCb callback,
-                                               void *user_data)
+EXPORT_API int tel_set_call_volume_info(TapiHandle *handle, TelCallVolumeInfo_t *info, tapi_response_cb callback, void *user_data )
 {
-       TapiRespCbData *rsp_cb_data;
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(info, TAPI_API_INVALID_PTR);
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback,
-                                       TEL_RETURN_INVALID_PARAMETER);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       param = g_variant_new("(iii)", info->device, info->type, info->volume);
 
-       telephony_call_call_get_mute_status(handle->call_proxy, NULL,
-                                       on_response_call_get_mute_status,
-                                       rsp_cb_data);
+       dbg("[%s] Set Volume Info. device:[%d] type:[%d] volume:[%d] ",
+               handle->cp_name, info->device, info->type, info->volume);
 
-       return TEL_RETURN_SUCCESS;
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "SetSoundVolumeLevel", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_set_call_volume_info, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_call_set_sound_recording(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_set_call_sound_path(TapiHandle *handle, TelCallSoundPathInfo_t *info, tapi_response_cb callback, void *user_data )
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelCallResult result = TEL_CALL_RESULT_FAILURE;
-       GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(info, TAPI_API_INVALID_PTR);
 
-       dbg("Entry");
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       telephony_call_call_set_sound_recording_finish(handle->call_proxy,
-                                                       (int *)&result, res, &error);
+       param = g_variant_new("(ib)", info->path, info->ex_volume);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       dbg("[%s] Set Sound Path. path:[%d] ex_volume:[%d]", handle->cp_name, info->path, info->ex_volume);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "SetSoundPath", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_set_call_sound_path, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_call_set_sound_recording(TelHandle *handle,
-                                       TelCallSoundRecording sound_rec,
-                                       TapiResponseCb callback,
-                                       void *user_data)
+EXPORT_API int tel_set_call_mute_status(TapiHandle *handle, TelSoundMuteStatus_t mute, TelSoundMutePath_t path, tapi_response_cb callback, void *user_data )
 {
-       TapiRespCbData *rsp_cb_data;
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       dbg("Entry");
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback
-                                       && __tapi_check_sound_rec(sound_rec),
-                                       TEL_RETURN_INVALID_PARAMETER);
+       param = g_variant_new("(ii)", mute, path);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       dbg("[%s] Set Mute. mute:[%d] path:[%d] ", handle->cp_name, mute, path);
 
-       telephony_call_call_set_sound_recording(handle->call_proxy, sound_rec,
-                                       NULL,
-                                       on_response_call_set_sound_recording,
-                                       rsp_cb_data);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "SetSoundMuteStatus", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_set_call_mute_status, evt_cb_data );
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_call_set_sound_equalization(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_get_call_mute_status(TapiHandle *handle, tapi_response_cb callback, void *user_data )
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelCallResult result = TEL_CALL_RESULT_FAILURE;
-       GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = 0;
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_PTR);
 
-       telephony_call_call_set_sound_equalization_finish(handle->call_proxy,
-                                                               (int *)&result,
-                                                               res, &error);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       dbg("[%s] Func Entrance ", handle->cp_name);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "GetSoundMuteStatus", 0, 0,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_get_call_mute_status, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_call_set_sound_equalization(TelHandle *handle,
-                               const TelCallSoundEqualization *sound_eq,
-                               TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_set_call_preferred_voice_subscription(TapiHandle *handle, TelCallPreferredVoiceSubs_t preferred_subscription,
+       tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data;
-       GVariantBuilder *builder;
-       GVariant *parameter;
-       int i;
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_PTR);
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback && sound_eq
-                               && __tapi_check_sound_direction(sound_eq->direction)
-                               && __tapi_check_sound_mode(sound_eq->mode),
-                               TEL_RETURN_INVALID_PARAMETER);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       param = g_variant_new("(i)", preferred_subscription);
 
-       builder = g_variant_builder_new(G_VARIANT_TYPE("aq"));
-       for (i = 0; i < TEL_CALL_MAX_SOUND_EQ_PARAMETER_SIZE; i++)
-               g_variant_builder_add(builder, "q", sound_eq->parameter[i]);
+       dbg("[%s] Set Preferred Voice. subs:[%d]", handle->cp_name, preferred_subscription);
 
-       parameter = g_variant_new ("aq", builder);
-       g_variant_builder_unref (builder);
+       /* DBUS call */
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "SetPreferredVoiceSubscription", param, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_set_preferred_voice_subscription, evt_cb_data);
 
-       telephony_call_call_set_sound_equalization(handle->call_proxy,
-                               sound_eq->direction, sound_eq->mode, parameter,
-                               NULL, on_response_call_set_sound_equalization,
-                               rsp_cb_data);
+       return TAPI_API_SUCCESS;
+}
 
-       g_variant_unref(parameter);
+EXPORT_API int tel_get_call_preferred_voice_subscription(TapiHandle *handle, TelCallPreferredVoiceSubs_t *preferred_subscription)
+{
+       GError *gerr = NULL;
+       GVariant *sync_gv = NULL;
+       int subs = 0;
+       int result = 0;
+       TapiResult_t ret = TAPI_API_OPERATION_FAILED;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(preferred_subscription, TAPI_API_INVALID_PTR);
+
+       sync_gv = g_dbus_connection_call_sync(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "GetPreferredVoiceSubscription", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       &gerr);
+       if (sync_gv) {
+               g_variant_get(sync_gv, "(ii)", &subs, &result);
+
+               if (result == 0)
+                       *preferred_subscription = subs;
+               else
+                       *preferred_subscription = TAPI_CALL_PREFERRED_VOICE_SUBS_UNKNOWN;
+               dbg("'preferred' Voice Subscription: [%d]", subs);
+
+               ret = TAPI_API_SUCCESS;
+       } else {
+               err("Get 'preferred' Voice Subscription failed: [%s]", gerr->message);
+               g_error_free(gerr);
+       }
 
-       return TEL_RETURN_SUCCESS;
+       return ret;
 }
+
index 5e652fd546703e49df5f0566a01a32380d33c803..d1eb146d0d01b7ce193fad4e24de1a0fbdd7cefc 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
+#define _GNU_SOURCE
+#include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#include "tapi_private.h"
-
-#include <tapi_events.h>
-#include <tel_modem.h>
-#include <tel_sim.h>
-#include <tel_network.h>
-#include <tel_call.h>
-#include <tel_ss.h>
-#include <tel_sms.h>
-#include <tel_phonebook.h>
-#include <tel_sat.h>
-#include <tel_sap.h>
-#include <tel_gps.h>
-
-/* Signal Callbacks */
-extern void on_network_signal_emit_handler(TelephonyNetwork *network,
-       gchar *sender_name, gchar *signal_name,
-       GVariant *parameters, gpointer user_data);
-extern void on_phonebook_signal_emit_handler(TelephonyPhonebook *phonebook,
-       gchar *sender_name, gchar *signal_name,
-       GVariant *parameters, gpointer user_data);
-extern void on_call_signal_emit_handler(TelephonyCall *call,
-       gchar *sender_name, gchar *signal_name,
-       GVariant *parameters, gpointer user_data);
-extern void on_ss_signal_emit_handler(TelephonySs *ss,
-       gchar *sender_name, gchar *signal_name,
-       GVariant *parameters, gpointer user_data);
-extern void on_sms_signal_emit_handler(TelephonySms *sms,
-       gchar *sender_name, gchar *signal_name,
-       GVariant *parameters, gpointer user_data);
-extern void on_sat_signal_emit_handler(TelephonySat *sat,
-       gchar *sender_name, gchar *signal_name,
-       GVariant *parameters, gpointer user_data);
-extern void on_sap_signal_emit_handler(TelephonySap *sap,
-       gchar *sender_name, gchar *signal_name,
-       GVariant *parameters, gpointer user_data);
-extern void on_gps_signal_emit_handler(TelephonyGps *gps,
-       gchar *sender_name, gchar *signal_name,
-       GVariant *parameters, gpointer user_data);
-
-/* Property change Callbacks */
-extern void on_modem_property_change_handler(TelephonyModem *modem,
-       GVariant *changed_properties, const gchar *invalidated_properties, gpointer user_data);
-extern void on_sim_property_change_handler(TelephonySim *sim,
-       GVariant *changed_properties, const gchar *invalidated_properties, gpointer user_data);
-extern void on_sms_property_change_handler(TelephonySms *sms,
-       GVariant *changed_properties, const gchar *invalidated_properties, gpointer user_data);
-
-EXPORT_API TelReturn tapi_get_cp_name_list(char ***cp_list)
+#include <glib.h>
+#include <gio/gio.h>
+
+#include "tapi_common.h"
+#include "TapiUtility.h"
+
+#include "TelNetwork.h"
+#include "TelSms.h"
+#include "TelSat.h"
+#include "TelSs.h"
+#include "TelCall.h"
+
+#include "common.h"
+#include "tapi_log.h"
+
+extern char *g_cookie_name;
+extern int g_cookie_size;
+
+TelSatEventDownloadType_t g_event_list[TAPI_SAT_EVENT_LIST_MAX_COUNT] = {-1};
+
+static void _process_sms_event(const gchar *sig, GVariant *param,
+       TapiHandle *handle, char *noti_id, struct tapi_evt_cb *evt_cb_data)
 {
-       GDBusObjectManager *obj_manager = NULL;
-       GList *objects = NULL;
-       GList *iter = NULL;
-       GError *error = NULL;
-       unsigned int cp_count = 0;
-       unsigned int index = 0;
+       TAPI_RETURN_IF_FAIL(evt_cb_data);
 
-       *cp_list = NULL;
+       if (!g_strcmp0(sig, "IncommingMsg")) {
+               struct tel_noti_sms_incomming_msg noti;
+               guchar* decoded_sca = NULL;
+               guchar* decoded_tpdu = NULL;
 
-       obj_manager = telephony_object_manager_client_new_for_bus_sync(
-                                       G_BUS_TYPE_SYSTEM,
-                                       G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_NONE,
-                                       TELEPHONY_SERVICE,
-                                       TELEPHONY_OBJECT_PATH,
-                                       NULL, &error);
-       if (error) {
-               err("Error getting object manager client: %s", error->message);
-               g_error_free (error);
-               return TEL_RETURN_FAILURE;
+               gchar *sca = NULL;
+               gchar *tpdu = NULL;
+               int msg_len = 0;
+
+               gsize decoded_sca_len = 0;
+               gsize decoded_tpdu_len = 0;
+
+               memset(&noti, 0, sizeof(struct tel_noti_sms_incomming_msg));
+
+               g_variant_get(param, "(isis)", &noti.format, &sca, &msg_len, &tpdu);
+
+               decoded_sca = g_base64_decode((const gchar*)sca, &decoded_sca_len);
+               decoded_tpdu = g_base64_decode((const gchar*)tpdu, &decoded_tpdu_len);
+
+               dbg("ds :%d, dt : %d, ml :%d", decoded_sca_len, decoded_tpdu_len, msg_len);
+               if(TAPI_SIM_SMSP_ADDRESS_LEN < decoded_sca_len)
+                       decoded_sca_len = TAPI_SIM_SMSP_ADDRESS_LEN;
+
+               if(TAPI_NETTEXT_SMDATA_SIZE_MAX+1 <decoded_tpdu_len)
+                       decoded_tpdu_len = TAPI_NETTEXT_SMDATA_SIZE_MAX+1;
+
+               memcpy(noti.Sca, decoded_sca, decoded_sca_len);
+               memcpy(noti.szData, decoded_tpdu, decoded_tpdu_len);
+
+               noti.MsgLength = msg_len;
+
+               g_free(sca);
+               g_free(tpdu);
+               g_free(decoded_sca);
+               g_free(decoded_tpdu);
+
+               CALLBACK_CALL(&noti);
        }
+       else if (!g_strcmp0(sig, "IncommingCbMsg")) {
+               struct tel_noti_sms_incomming_cb_msg noti = {0};
+               gchar *cb_msg = NULL;
+
+               guchar * decoded_cbmsg = NULL;
+               gsize decoded_cbmsg_len = 0;
+               int cb_msg_len = 0;
+
+               g_variant_get(param, "(iis)", &noti.CbMsgType, &cb_msg_len, &cb_msg);
+
+               decoded_cbmsg = g_base64_decode(cb_msg, &decoded_cbmsg_len);
+
+               dbg("dt : %d, ml :%d", decoded_cbmsg_len, cb_msg_len);
 
-       objects = g_dbus_object_manager_get_objects(obj_manager);
+               if(TAPI_NETTEXT_CB_SIZE_MAX+1 <decoded_cbmsg_len)
+                       decoded_cbmsg_len = TAPI_NETTEXT_CB_SIZE_MAX+1;
 
-       cp_count = g_list_length(objects);
-       if (cp_count == 0)
-               goto out;
+               memcpy(&(noti.szMsgData[0]), decoded_cbmsg, decoded_cbmsg_len);
 
-       /* This will be freed by caller. +1 for NULL 'str' at the end */
-       *cp_list = calloc((cp_count + 1), sizeof(char*));
+               noti.Length = cb_msg_len;
 
-       for (iter = objects, index = 0; iter != NULL; iter = iter->next, index++) {
-               TelephonyObject *object = TELEPHONY_OBJECT(iter->data);
-               const gchar *object_path = g_dbus_object_get_object_path(G_DBUS_OBJECT(object));
-               if (object_path) {
-                       (*cp_list)[index] = strdup(object_path); /* Will be freed up caller */
-                       if ((*cp_list)[index] == NULL)
-                               g_error ("%s: strdup failed", G_STRLOC);
+               g_free(cb_msg);
+               g_free(decoded_cbmsg);
+
+               CALLBACK_CALL(&noti);
+       }
+       else if (!g_strcmp0(sig, "IncommingEtwsMsg")) {
+               struct tel_noti_sms_incomming_etws_msg noti;
+
+               GVariant *etwsMsg = NULL;
+               int i = 0;
+               GVariantIter *iter = 0;
+               GVariant *inner_gv = 0;
+
+
+               memset(&noti, 0, sizeof(struct tel_noti_sms_incomming_etws_msg));
+               g_variant_get(param, "(ii@v)", &noti.EtwsMsgType, &noti.Length, &etwsMsg);
+
+               inner_gv = g_variant_get_variant( etwsMsg );
+               g_variant_get(inner_gv, "ay", &iter);
+               while( g_variant_iter_loop( iter, "y", &noti.szMsgData[i] ) ) {
+                        i++;
+                        if( i >= TAPI_NETTEXT_ETWS_SIZE_MAX + 1 )
+                                break;
                }
+               g_variant_iter_free(iter);
+               g_variant_unref(etwsMsg);
+               g_variant_unref(inner_gv);
+
+               CALLBACK_CALL(&noti);
        }
+       else if (!g_strcmp0(sig, "MemoryStatus")) {
+               int noti = 0;
 
-out:
-       if (objects != NULL)
-               g_list_free_full(objects, g_object_unref);
+               g_variant_get(param, "(i)", &noti);
+               CALLBACK_CALL(&noti);
+       }
+       else if (!g_strcmp0(sig, "SmsReady")) {
+               gint noti = 0;
 
-       if (obj_manager != NULL)
-               g_object_unref (obj_manager);
+               g_variant_get(param, "(i)", &noti);
+               CALLBACK_CALL(&noti);
+       }
+       else {
+               dbg("not handled Sms noti[%s]", sig);
+       }
+}
 
-       return TEL_RETURN_SUCCESS;
+static void _process_call_event(const gchar *sig, GVariant *param,
+       TapiHandle *handle, char *noti_id, struct tapi_evt_cb *evt_cb_data)
+{
+       TAPI_RETURN_IF_FAIL(evt_cb_data);
+
+       if (!g_strcmp0(sig, "VoiceCallStatusIdle") || !g_strcmp0(sig, "VideoCallStatusIdle") ) {
+               TelCallStatusIdleNoti_t data;
+               int start_time = 0, end_time = 0;
+               g_variant_get(param, "(iiii)", &data.id, &data.cause, &start_time, &end_time);
+               msg("[ check ] (%s) %s : call_id(%d), end_cause(0x%x)", handle->cp_name, "Status Idle noti", data.id, data.cause);
+               CALLBACK_CALL(&data);
+       }
+       else if (!g_strcmp0(sig, "VoiceCallStatusDialing") || !g_strcmp0(sig, "VideoCallStatusDialing")) {
+               TelCallStatusDialingNoti_t data;
+               g_variant_get(param, "(i)", &data.id);
+               msg("[ check ] (%s) %s : call_id(%d)", handle->cp_name, "Status Dialing noti", data.id);
+               CALLBACK_CALL(&data);
+       }
+       else if (!g_strcmp0(sig, "VoiceCallStatusAlert") || !g_strcmp0(sig, "VideoCallStatusAlert")) {
+               TelCallStatusAlertNoti_t data;
+               g_variant_get(param, "(i)", &data.id);
+               msg("[ check ] (%s) %s : call_id(%d)", handle->cp_name, "Status Alert noti", data.id);
+               CALLBACK_CALL(&data);
+       }
+       else if (!g_strcmp0(sig, "VoiceCallStatusActive") || !g_strcmp0(sig, "VideoCallStatusActive")) {
+               TelCallStatusActiveNoti_t data;
+               g_variant_get(param, "(i)", &data.id);
+               msg("[ check ] (%s) %s : call_id(%d)", handle->cp_name, "Status Active noti", data.id);
+               CALLBACK_CALL(&data);
+       }
+       else if (!g_strcmp0(sig, "VoiceCallStatusHeld") ) {
+               TelCallStatusHeldNoti_t data;
+               g_variant_get(param, "(i)", &data.id);
+               msg("[ check ] (%s) %s : call_id(%d)", handle->cp_name, "Status Held noti", data.id);
+               CALLBACK_CALL(&data);
+       }
+       else if (!g_strcmp0(sig, "VoiceCallStatusIncoming") || !g_strcmp0(sig, "VideoCallStatusIncoming")) {
+               TelCallIncomingCallInfo_t data;
+               gchar *number = NULL;
+               gchar *name = NULL;
+
+               memset((void*)&data, 0, sizeof(TelCallIncomingCallInfo_t));
+               g_variant_get(param, "(iiisbis)",
+                               &data.CallHandle,
+                               &data.CliMode,
+                               &data.CliCause,
+                               &number,
+                               &data.fwded,
+                               &data.ActiveLine,
+                               &name);
+               if (number) {
+                       memcpy(data.szCallingPartyNumber, number, strlen(number));
+                       g_free(number);
+               }
+               if (name) {
+                       memcpy(data.CallingNameInfo.szNameData, name, strlen(name));
+                       g_free(name);
+               }
+               msg("[ check ] %s : call_id(%d)", "Status Incoming noti", data.CallHandle);
+               msg("[ check ] %s : cli_mode(%d)", "Status Incoming noti", data.CliMode);
+               msg("[ check ] %s : cli_cause(%d)", "Status Incoming noti", data.CliCause);
+               msg("[ check ] %s : cli_number(%s)", "Status Incoming noti", data.szCallingPartyNumber);
+               msg("[ check ] %s : is_forwarded(%d)", "Status Incoming noti", data.fwded);
+               msg("[ check ] %s : active_line(%d)", "Status Incoming noti", data.ActiveLine);
+               msg("[ check ] %s : call_name(%s)", "Status Incoming noti", data.CallingNameInfo.szNameData);
+
+               CALLBACK_CALL(&data);
+       }
+       else if (!g_strcmp0(sig, "Waiting")) {
+               TelCallInfoWaitingNoti_t data;
+               g_variant_get(param, "(i)", &data.id);
+               msg("[ check ] (%s) %s : data.id(%d)", handle->cp_name, "Call Info Waiting noti", data.id);
+               CALLBACK_CALL(&data.id);
+       }
+       else if (!g_strcmp0(sig, "Forwarded")) {
+               TelCallInfoForwardedNoti_t data;
+               g_variant_get(param, "(i)", &data.id);
+               msg("[ check ] (%s) %s : data.id(%d)", handle->cp_name, "Call Info Forwarded noti", data.id);
+               CALLBACK_CALL(&data.id);
+       }
+       else if (!g_strcmp0(sig, "ForwardedCall")) {
+               TelCallInfoForwardedCallNoti_t data;
+               g_variant_get(param, "(i)", &data.id);
+               dbg("[ check ] (%s) %s : data.id(%d)", handle->cp_name, "Call Info Forwarded Call noti", data.id);
+               CALLBACK_CALL(&data.id);
+       }
+       else if (!g_strcmp0(sig, "BarredIncoming")) {
+               TelCallInfoBarredIncomingNoti_t data;
+               g_variant_get(param, "(i)", &data.id);
+               msg("[ check ] (%s) %s : data.id(%d)", handle->cp_name, "Call Info Barred Incoming noti", data.id);
+               CALLBACK_CALL(&data.id);
+       }
+       else if (!g_strcmp0(sig, "BarredOutgoing")) {
+               TelCallInfoBarredOutgoingNoti_t data;
+               g_variant_get(param, "(i)", &data.id);
+               msg("[ check ] (%s) %s : data.id(%d)", handle->cp_name, "Call Info Barred Outgoing noti", data.id);
+               CALLBACK_CALL(&data.id);
+       }
+       else if (!g_strcmp0(sig, "ForwardConditional")) {
+               TelCallInfoForwardConditionalNoti_t data;
+               g_variant_get(param, "(i)", &data.id);
+               msg("[ check ] (%s) %s : data.id(%d)", handle->cp_name, "Call Info Forward Conditional noti", data.id);
+               CALLBACK_CALL(&data.id);
+       }
+       else if (!g_strcmp0(sig, "ForwardUnconditional")) {
+               TelCallInfoForwardUnconditionalNoti_t data;
+               g_variant_get(param, "(i)", &data.id);
+               msg("[ check ] (%s) %s : data.id(%d)", handle->cp_name, "Call Info Forward Unconditional noti", data.id);
+               CALLBACK_CALL(&data.id);
+       }
+       else if (!g_strcmp0(sig, "CallActive")) {
+               TelCallInfoActiveNoti_t data;
+               g_variant_get(param, "(i)", &data.id);
+               msg("[ check ] (%s) %s : data.id(%d)", handle->cp_name, "Call Info Call Active noti", data.id);
+               CALLBACK_CALL(&data.id);
+       }
+       else if (!g_strcmp0(sig, "CallHeld")) {
+               TelCallInfoHeldNoti_t data;
+               g_variant_get(param, "(i)", &data.id);
+               msg("[ check ] (%s) %s : data.id(%d)", handle->cp_name, "Call Info Call Held noti", data.id);
+               CALLBACK_CALL(&data.id);
+       }
+       else if (!g_strcmp0(sig, "CallJoined")) {
+               TelCallInfoJoinedNoti_t data;
+               g_variant_get(param, "(i)", &data.id);
+               msg("[ check ] (%s) %s : data.id(%d)", handle->cp_name, "Call Info Call Joined noti", data.id);
+               CALLBACK_CALL(&data.id);
+       }
+       else if (!g_strcmp0(sig, "CallPrivacyMode")) {
+               TelCallVoicePrivacyNoti_t data;
+               g_variant_get(param, "(i)", &data.privacy_mode);
+               msg("[ check ] %s (%s): data.privacy_mode(%d) ", "Call Privacy Info noti", handle->cp_name, data.privacy_mode);
+               CALLBACK_CALL(&data);
+       }
+       else if (!g_strcmp0(sig, "CallOtaspStatus")) {
+               TelCallOtaspStatusNoti_t otasp;
+               g_variant_get(param, "(i)", &otasp.otasp_status);
+               msg("[ check ] %s (%s): otasp_status(%d)", "Call OTASP Status ", handle->cp_name, otasp.otasp_status);
+               CALLBACK_CALL(&otasp);
+       }
+       else if (!g_strcmp0(sig, "CallOtapaStatus")) {
+               TelCallOtapaStatusNoti_t otapa;
+               g_variant_get(param, "(i)", &otapa.otapa_status);
+               msg("[ check ] %s : otapa_status(%d)", "Call OTAPA Status ", otapa.otapa_status);
+               CALLBACK_CALL(&otapa);
+       }
+       else if (!g_strcmp0(sig, "CallSignalInfo")) {
+               TelCallSignalInfoNoti_t signal_info;
+               unsigned int signal;
+               g_variant_get(param, "(iii)", &signal_info.signal_type, &signal_info.pitch_type, &signal);
+               msg("[ check ] %s (%s): Signal type(%d) Pitch type(%d)  Signal (%d)", "Call Alert Signal Info ", handle->cp_name, signal_info.signal_type, signal_info.pitch_type, signal);
+                if (signal_info.signal_type == TAPI_CALL_SIGNAL_TYPE_TONE) {
+                       signal_info.signal.sig_tone_type = signal;
+               } else if(signal_info.signal_type == TAPI_CALL_SIGNAL_TYPE_ISDN_ALERTING) {
+                       signal_info.signal.sig_isdn_alert_type = signal;
+               } else if(signal_info.signal_type == TAPI_CALL_SIGNAL_TYPE_IS54B_ALERTING) {
+                       signal_info.signal.sig_is54b_alert_type = signal;
+               } else {
+                       err("Unknown Signal type");
+                       return;
+               }
+               CALLBACK_CALL(&signal_info);
+       }
+       else if (!g_strcmp0(sig, "CallInfoRec")) {
+               TelCallRecordInfoNoti_t noti;
+               gchar *data = NULL;
+
+               memset(&noti, '\0', sizeof(TelCallRecordInfoNoti_t));
+               g_variant_get(param, "(iis)", &noti.info.id, &noti.info.type, &data);
+               if(noti.info.type == TAPI_CALL_REC_INFO_TYPE_NAME) {
+                       strncpy(noti.info.data.name, data, TAPI_CALLING_NAME_SIZE_MAX);
+                       msg("[ check ] %s (%s): id(%d) type(%d) name(%s)", "CallInfoRec", handle->cp_name,
+                               noti.info.id, noti.info.type, noti.info.data.name);
+               } else if (noti.info.type == TAPI_CALL_REC_INFO_TYPE_NUMBER) {
+                       strncpy(noti.info.data.number, data, TAPI_CALL_DIAL_NUMBER_LEN_MAX);
+                       msg("[ check ] %s (%s): id(%d) type(%d) number(%s)", "CallInfoRec", handle->cp_name,
+                               noti.info.id, noti.info.type, noti.info.data.number);
+               }
+
+               CALLBACK_CALL(&noti);
+               g_free(data);
+       }
+       else if (!g_strcmp0(sig, "CallSoundPath")) {
+               TelCallSoundPathNoti_t data;
+               g_variant_get(param, "(i)", &data.path);
+               msg("[ check ] (%s) %s : path(%d)", handle->cp_name, "Call Sound Path noti", data.path);
+               CALLBACK_CALL(&data);
+       }
+       else if (!g_strcmp0(sig, "CallSoundRingbackTone")) {
+               TelCallSoundRingbackToneNoti_t status;
+               g_variant_get(param, "(i)", &status);
+               msg("[ check ] (%s) %s : status(%d)", handle->cp_name, "Call Sound Ringbacktone noti", status);
+               CALLBACK_CALL(&status);
+       }
+       else if (!g_strcmp0(sig, "CallSoundWbamr")) {
+               TelCallSoundWbamrNoti_t status;
+               g_variant_get(param, "(i)", &status);
+               msg("[ check ] (%s) %s : status(%d)", handle->cp_name, "Call Sound Wbamr noti", status);
+               CALLBACK_CALL(&status);
+       }
+       else if (!g_strcmp0(sig, "CallSoundNoiseReduction")) {
+               TelCallSoundNoiseReductionNoti_t data;
+               g_variant_get(param, "(i)", &data.status);
+               msg("[ check ] (%s) %s : status(%d)", handle->cp_name, "Call Sound Noise Reduction noti", data.status);
+               CALLBACK_CALL(&data);
+       }
+       else if (!g_strcmp0(sig, "CallSoundClockStatus")) {
+               gboolean data;
+               g_variant_get(param, "(b)", &data);
+               msg("[ check ] (%s) %s : status(%d)", handle->cp_name, "Call Sound Clock Status noti", data);
+               CALLBACK_CALL(&data);
+       }
+       else if (!g_strcmp0(sig, "CallPreferredVoiceSubscription")) {
+               TelCallPreferredVoiceSubsNoti_t data;
+               g_variant_get(param, "(i)", &data.preferred_subs);
+               dbg("[ check ] %s : Voice preferred_subs(%d)", "Call Preferred Voice Subscription noti", data.preferred_subs);
+               CALLBACK_CALL(&data);
+       }
+       else {
+               dbg("not handled Call noti[%s]", sig);
+       }
 }
 
-EXPORT_API TelHandle *tapi_init(const char *cp_name)
+static void _process_sat_event(const gchar *sig, GVariant *param,
+       TapiHandle *handle, char *noti_id, struct tapi_evt_cb *evt_cb_data)
 {
-#define HANDLE_GERROR(error, log_msg) \
-       if (error) { \
-               err(log_msg": %s", error->message); \
-               g_error_free(error); \
-               goto fail; \
-       }
-
-       TelHandle *handle = NULL;
-       GDBusObjectManager *obj_manager = NULL;
-       GList *objects = NULL;
-       TelephonyObject *tel_object;
-       GList *interfaces = NULL;
-       GList *iter = NULL;
-       GError *error = NULL;
-       const gchar *cp_found = NULL;
+       TAPI_RETURN_IF_FAIL(evt_cb_data);
+
+       if (!g_strcmp0(sig, "SetupMenu")) {
+               TelSatSetupMenuInfo_t setup_menu;
+
+               gchar *title = NULL;
+               gint command_id, item_cnt;
+               gboolean b_present, b_helpinfo, b_updated;
+               GVariant *items = NULL;
+
+#if defined(TIZEN_SUPPORT_SAT_ICON)
+               GVariant *icon_id = NULL;
+               GVariant *icon_list = NULL;
+               int sat_index = 0, icon_index = 0;
+               GVariantIter *iter, *iter2;
+               GVariant *unbox = NULL;
+               /* Used to get icon data */
+               gboolean is_exist;
+               gint icon_quali, icon_identifier, width, height, ics, icon_data_len;
+               gchar *icon_data = NULL;
+               /* Used to get icon list data */
+               GVariant *unbox_list, *unbox_list_info ;
+               GVariant *icon_list_info;
+               gboolean is_list_exist;
+               gint icon_list_quali, list_cnt, icon_list_identifier, list_width, list_height, list_ics, icon_list_data_len;
+               gchar *icon_list_data = NULL;
+#else
+               int sat_index = 0;
+               GVariant *unbox;
+               GVariantIter *iter;
+#endif
+               memset(&setup_menu, 0, sizeof(TelSatSetupMenuInfo_t));
+
+#if defined(TIZEN_SUPPORT_SAT_ICON)
+               g_variant_get(param, "(ibs@vibb@v@v)", &command_id, &b_present, &title, &items, &item_cnt,
+                                       &b_helpinfo, &b_updated, &icon_id, &icon_list);
+#else
+               g_variant_get(param, "(ibs@vibb)", &command_id, &b_present, &title, &items, &item_cnt,
+                       &b_helpinfo, &b_updated);
+#endif
 
-#if !GLIB_CHECK_VERSION (2, 35, 3)
-       g_type_init();
+               setup_menu.commandId = command_id;
+               setup_menu.bIsMainMenuPresent = (b_present ? 1 : 0);
+               memcpy(setup_menu.satMainTitle, title, TAPI_SAT_DEF_TITLE_LEN_MAX+1);
+               g_free(title);
+               setup_menu.satMainMenuNum = item_cnt;
+               if(items && item_cnt > 0){
+                       gchar *item_str;
+                       gint item_id;
+                       unbox = g_variant_get_variant(items);
+                       dbg("items(%p) items type_format(%s)", items, g_variant_get_type_string(unbox));
+
+                       g_variant_get(unbox, "a(si)", &iter);
+                       while(g_variant_iter_loop(iter,"(si)",&item_str, &item_id)){
+                               setup_menu.satMainMenuItem[sat_index].itemId = item_id;
+                               memcpy(setup_menu.satMainMenuItem[sat_index].itemString, item_str, TAPI_SAT_DEF_ITEM_STR_LEN_MAX + 6);
+                               dbg("item index(%d) id(%d) str(%s)",sat_index, setup_menu.satMainMenuItem[sat_index].itemId, setup_menu.satMainMenuItem[sat_index].itemString);
+                               //dbg("item index(%d) id(%d) str(%s)",index, item_id, item_str);
+                               sat_index++;
+                       }
+                       g_variant_iter_free(iter);
+               }
+               setup_menu.bIsSatMainMenuHelpInfo = (b_helpinfo ? 1 : 0);
+               setup_menu.bIsUpdatedSatMainMenu = (b_updated ? 1 : 0);
+
+#if defined(TIZEN_SUPPORT_SAT_ICON)
+               if(icon_id) {
+                       unbox = g_variant_get_variant(icon_id);
+                       g_variant_get(unbox, "a(biiiiiis)", &iter);
+
+                       while(g_variant_iter_loop(iter,"(biiiiiis)", &is_exist, &icon_quali, &icon_identifier, &width, &height, &ics, &icon_data_len, &icon_data)){
+                               if(!is_exist)
+                                       break;
+                               setup_menu.iconId.bIsPresent = is_exist;
+                               setup_menu.iconId.iconQualifier = icon_quali;
+                               setup_menu.iconId.iconIdentifier = icon_identifier;
+                               setup_menu.iconId.iconInfo.width = width;
+                               setup_menu.iconId.iconInfo.height = height;
+                               setup_menu.iconId.iconInfo.ics = ics;
+                               if(icon_data_len > 0) {
+                                       setup_menu.iconId.iconInfo.iconDataLen = icon_data_len;
+                                       memcpy(setup_menu.iconId.iconInfo.iconFile, icon_data, icon_data_len);
+                               }
+                               dbg("icon exist(%d), icon_quali: (%d), icon_id: (%d), width: (%d), height: (%d), ics: (%d), icon_data_len: (%d)", setup_menu.iconId.bIsPresent, setup_menu.iconId.iconQualifier, setup_menu.iconId.iconIdentifier, setup_menu.iconId.iconInfo.width,
+                                       setup_menu.iconId.iconInfo.height, setup_menu.iconId.iconInfo.ics, setup_menu.iconId.iconInfo.iconDataLen);
+                       }
+                       g_variant_iter_free(iter);
+               }
+
+               if(icon_list){
+                       unbox_list = g_variant_get_variant(icon_list);
+                       g_variant_get(unbox_list, "a(biiv)", &iter);
+
+                       while(g_variant_iter_loop(iter,"(biiv)", &is_list_exist, &icon_list_quali, &list_cnt, &icon_list_info)){
+                               if(!is_list_exist)
+                                       break;
+                               setup_menu.iconIdList.bIsPresent = is_list_exist;
+                               setup_menu.iconIdList.iconListQualifier = icon_list_quali;
+                               setup_menu.iconIdList.iconCount = list_cnt;
+
+                               unbox_list_info = g_variant_get_variant(icon_list_info);
+                               g_variant_get(unbox_list_info, "a(iiiiis)", &iter2);
+
+                               while(g_variant_iter_loop(iter2,"(iiiiis)",&icon_list_identifier, &list_width, &list_height, &list_ics, &icon_list_data_len, &icon_list_data)){
+                                       setup_menu.iconIdList.iconIdentifierList[icon_index]= icon_identifier;
+                                       setup_menu.iconIdList.iconInfo[icon_index].width = list_width;
+                                       setup_menu.iconIdList.iconInfo[icon_index].height = list_height;
+                                       setup_menu.iconIdList.iconInfo[icon_index].ics = list_ics;
+                                       if(icon_list_data_len > 0) {
+                                               setup_menu.iconIdList.iconInfo[icon_index].iconDataLen = icon_list_data_len;
+                                               memcpy(setup_menu.iconIdList.iconInfo[icon_index].iconFile, icon_list_data, icon_list_data_len);
+                                       }
+                                       icon_index++;
+                               }
+                               g_variant_iter_free(iter2);
+                       }
+                       g_variant_iter_free(iter);
+               }
 #endif
+               dbg("command id (%d)", setup_menu.commandId);
+               dbg("menu present (%d)", setup_menu.bIsMainMenuPresent);
+               dbg("menu title (%s)", setup_menu.satMainTitle);
+               dbg("item cnt (%d)", setup_menu.satMainMenuNum);
+               dbg("menu help info (%d)", setup_menu.bIsSatMainMenuHelpInfo);
+               dbg("menu updated (%d)", setup_menu.bIsUpdatedSatMainMenu);
 
-       /* Find CP objects */
-       obj_manager = telephony_object_manager_client_new_for_bus_sync(
-                                       G_BUS_TYPE_SYSTEM,
-                                       G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_NONE,
-                                       TELEPHONY_SERVICE,
-                                       TELEPHONY_OBJECT_PATH,
-                                       NULL, &error);
-       if (error) {
-               err("Error getting object manager client:%s", error->message);
-               g_error_free(error);
-               return NULL;
+               dbg("icon exist(%d), icon_quali: (%d), icon_id: (%d), width: (%d), height: (%d), ics: (%d), icon_data_len: (%d)", setup_menu.iconId.bIsPresent, setup_menu.iconId.iconQualifier, setup_menu.iconId.iconIdentifier, setup_menu.iconId.iconInfo.width,
+                       setup_menu.iconId.iconInfo.height, setup_menu.iconId.iconInfo.ics, setup_menu.iconId.iconInfo.iconDataLen);
+
+               CALLBACK_CALL(&setup_menu);
+       }
+       else if (!g_strcmp0(sig, "DisplayText")) {
+               TelSatDisplayTextInd_t display_text;
+               gchar* text;
+               gint command_id, text_len, duration;
+               gboolean high_priority, user_rsp_required, immediately_rsp;
+
+#if defined(TIZEN_SUPPORT_SAT_ICON)
+               GVariant *unbox = NULL;
+               gboolean is_exist;
+               gint icon_quali, icon_identifier, width, height, ics, icon_data_len;
+               gchar *icon_data = NULL;
+               GVariant *icon_id = NULL;
+               GVariantIter *iter;
+#endif
+               memset(&display_text, 0, sizeof(TelSatDisplayTextInd_t));
+
+#if defined(TIZEN_SUPPORT_SAT_ICON)
+               g_variant_get(param, "(isiibbb@v)", &command_id, &text, &text_len, &duration,
+                       &high_priority, &user_rsp_required, &immediately_rsp, &icon_id);
+#else
+               g_variant_get(param, "(isiibbb)", &command_id, &text, &text_len, &duration,
+                       &high_priority, &user_rsp_required, &immediately_rsp);
+#endif
+               display_text.commandId = command_id;
+               memcpy(display_text.text.string, text, TAPI_SAT_DEF_TEXT_STRING_LEN_MAX+1);
+               g_free(text);
+               display_text.text.stringLen = text_len;
+               display_text.duration = duration;
+               display_text.bIsPriorityHigh = (high_priority ? 1 : 0);
+               display_text.bIsUserRespRequired = (user_rsp_required ? 1 : 0);
+               display_text.b_immediately_resp = (immediately_rsp ? 1 : 0);
+
+#if defined(TIZEN_SUPPORT_SAT_ICON)
+               if(icon_id) {
+                       unbox = g_variant_get_variant(icon_id);
+                       g_variant_get(unbox, "a(biiiiiis)", &iter);
+
+                       while(g_variant_iter_loop(iter,"(biiiiiis)", &is_exist, &icon_quali, &icon_identifier, &width, &height, &ics, &icon_data_len, &icon_data)) {
+                               if(!is_exist)
+                                       break;
+                               display_text.iconId.bIsPresent = is_exist;
+                               display_text.iconId.iconQualifier = icon_quali;
+                               display_text.iconId.iconIdentifier = icon_identifier;
+                               display_text.iconId.iconInfo.width = width;
+                               display_text.iconId.iconInfo.height = height;
+                               display_text.iconId.iconInfo.ics = ics;
+                               if(icon_data_len > 0) {
+                                       display_text.iconId.iconInfo.iconDataLen = icon_data_len;
+                                       memcpy(display_text.iconId.iconInfo.iconFile, icon_data, icon_data_len);
+                               }
+                               dbg("icon exist(%d), icon_quali: (%d), icon_id: (%d), width: (%d), height: (%d), ics: (%d), icon_data_len: (%d)", display_text.iconId.bIsPresent, display_text.iconId.iconQualifier, display_text.iconId.iconIdentifier, display_text.iconId.iconInfo.width,
+                                       display_text.iconId.iconInfo.height, display_text.iconId.iconInfo.ics, display_text.iconId.iconInfo.iconDataLen);
+                       }
+                       g_variant_iter_free(iter);
+               }
+#endif
+               dbg("command id (%d)", display_text.commandId);
+               dbg("display text (%s)", display_text.text.string);
+               dbg("string len(%d)", display_text.text.stringLen);
+               dbg("duration (%d)", display_text.duration);
+               dbg("high priority (%d)", display_text.bIsPriorityHigh);
+               dbg("user response required(%d)", display_text.bIsUserRespRequired);
+               dbg("immediately response (%d)", display_text.b_immediately_resp);
+
+               CALLBACK_CALL(&display_text);
+       }
+       else if (!g_strcmp0(sig, "SelectItem")) {
+               TelSatSelectItemInd_t select_item;
+
+               gboolean help_info ;
+               gchar *selected_text;
+               gint command_id, default_item_id, menu_cnt, text_len =0;
+               GVariant *menu_items;
+#if defined(TIZEN_SUPPORT_SAT_ICON)
+               GVariantIter *iter, *iter2;
+               GVariant *unbox = NULL;
+               gboolean is_exist;
+               gint icon_quali, icon_identifier, width, height, ics, icon_data_len;
+               gchar *icon_data = NULL;
+               GVariant *icon_id = NULL;
+               GVariant *icon_list = NULL;
+               int select_item_index = 0, icon_index = 0;
+               /* Used to get icon list data */
+               GVariant *unbox_list, *unbox_list_info ;
+               GVariant *icon_list_info;
+               gboolean is_list_exist;
+               gint icon_list_quali, list_cnt, icon_list_identifier, list_width, list_height, list_ics, icon_list_data_len;
+               gchar *icon_list_data = NULL;
+#else
+               int select_item_index = 0;
+               GVariant *unbox;
+               GVariantIter *iter;
+#endif
+               memset(&select_item, 0, sizeof(TelSatSelectItemInd_t));
+
+#if defined(TIZEN_SUPPORT_SAT_ICON)
+               g_variant_get(param, "(ibsiii@v@v@v)", &command_id, &help_info, &selected_text,
+                       &text_len, &default_item_id, &menu_cnt, &menu_items, &icon_id, &icon_list);
+#else
+               g_variant_get(param, "(ibsiii@v)", &command_id, &help_info, &selected_text,
+                       &text_len, &default_item_id, &menu_cnt, &menu_items);
+#endif
+               select_item.commandId = command_id;
+               select_item.bIsHelpInfoAvailable = (help_info ? 1 : 0);
+               memcpy(select_item.text.string, selected_text, TAPI_SAT_DEF_TITLE_LEN_MAX+1);
+               g_free(selected_text);
+               select_item.text.stringLen = text_len;
+               select_item.defaultItemIndex = default_item_id;
+               select_item.menuItemCount = menu_cnt;
+               if(menu_items && menu_cnt > 0){
+                       gchar *item_str;
+                       gint item_id, item_len;
+                       unbox = g_variant_get_variant(menu_items);
+                       dbg("items(%p) items type_format(%s)", menu_items, g_variant_get_type_string(unbox));
+
+                       g_variant_get(unbox, "a(iis)", &iter);
+                       while(g_variant_iter_loop(iter,"(iis)",&item_id, &item_len, &item_str)){
+                               select_item.menuItem[select_item_index].itemId = item_id;
+                               select_item.menuItem[select_item_index].textLen = item_len;
+                               memcpy(select_item.menuItem[select_item_index].text, item_str, TAPI_SAT_ITEM_TEXT_LEN_MAX + 1);
+                               dbg("item index(%d) id(%d) len(%d) str(%s)", select_item_index,
+                                               select_item.menuItem[select_item_index].itemId, select_item.menuItem[select_item_index].textLen, select_item.menuItem[select_item_index].text);
+                               select_item_index++;
+                       }
+                       g_variant_iter_free(iter);
+               }
+
+#if defined(TIZEN_SUPPORT_SAT_ICON)
+               if(icon_id) {
+                       unbox = g_variant_get_variant(icon_id);
+                       g_variant_get(unbox, "a(biiiiiis)", &iter);
+
+                       while(g_variant_iter_loop(iter,"(biiiiiis)", &is_exist, &icon_quali, &icon_identifier, &width, &height, &ics, &icon_data_len, &icon_data)) {
+                               if(!is_exist)
+                                       break;
+                               select_item.iconId.bIsPresent = is_exist;
+                               select_item.iconId.iconQualifier = icon_quali;
+                               select_item.iconId.iconIdentifier = icon_identifier;
+                               select_item.iconId.iconInfo.width = width;
+                               select_item.iconId.iconInfo.height = height;
+                               select_item.iconId.iconInfo.ics = ics;
+                               if(icon_data_len > 0) {
+                                       select_item.iconId.iconInfo.iconDataLen = icon_data_len;
+                                       memcpy(select_item.iconId.iconInfo.iconFile, icon_data, icon_data_len);
+                               }
+                               dbg("icon exist(%d), icon_quali: (%d), icon_id: (%d), width: (%d), height: (%d), ics: (%d), icon_data_len: (%d)", select_item.iconId.bIsPresent, select_item.iconId.iconQualifier, select_item.iconId.iconIdentifier, select_item.iconId.iconInfo.width,
+                                               select_item.iconId.iconInfo.height, select_item.iconId.iconInfo.ics, select_item.iconId.iconInfo.iconDataLen);
+                       }
+                       g_variant_iter_free(iter);
+               }
+
+               if(icon_list){
+                       unbox_list = g_variant_get_variant(icon_list);
+                       g_variant_get(unbox_list, "a(biiv)", &iter);
+
+                       while(g_variant_iter_loop(iter,"(biiv)", &is_list_exist, &icon_list_quali, &list_cnt, &icon_list_info)) {
+                               if(!is_list_exist)
+                                       break;
+                               select_item.iconIdList.bIsPresent = is_list_exist;
+                               select_item.iconIdList.iconListQualifier = icon_list_quali;
+                               select_item.iconIdList.iconCount = list_cnt;
+
+                               unbox_list_info = g_variant_get_variant(icon_list_info);
+                               g_variant_get(unbox_list_info, "a(iiiiis)", &iter2);
+
+                               while(g_variant_iter_loop(iter2,"(iiiiis)",&icon_list_identifier, &list_width, &list_height, &list_ics, &icon_list_data_len, &icon_list_data)){
+                                       select_item.iconIdList.iconIdentifierList[icon_index]= icon_identifier;
+                                       select_item.iconIdList.iconInfo[icon_index].width = list_width;
+                                       select_item.iconIdList.iconInfo[icon_index].height = list_height;
+                                       select_item.iconIdList.iconInfo[icon_index].ics = list_ics;
+                                       if(icon_list_data_len > 0) {
+                                               select_item.iconIdList.iconInfo[icon_index].iconDataLen = icon_list_data_len;
+                                               memcpy(select_item.iconIdList.iconInfo[icon_index].iconFile, icon_list_data, icon_list_data_len);
+                                       }
+                                       icon_index++;
+                               }
+                               g_variant_iter_free(iter2);
+                       }
+                       g_variant_iter_free(iter);
+               }
+#endif
+               dbg("command id (%d)", select_item.commandId);
+               dbg("help info(%d)", select_item.bIsHelpInfoAvailable);
+               dbg("selected item string(%s)", select_item.text.string);
+               dbg("string len(%d)", select_item.text.stringLen);
+               dbg("default item index(%d)", select_item.defaultItemIndex);
+               dbg("item count(%d)", select_item.menuItemCount);
+
+               CALLBACK_CALL(&select_item);
+       }
+       else if (!g_strcmp0(sig, "GetInkey")) {
+               TelSatGetInkeyInd_t get_inkey;
+
+               gint command_id, key_type, input_character_mode;
+               gint text_len, duration;
+               gboolean b_numeric, b_help_info;
+               gchar *text = NULL;
+#if defined(TIZEN_SUPPORT_SAT_ICON)
+               GVariant *unbox = NULL;
+               gboolean is_exist;
+               gint icon_quali, icon_identifier, width, height, ics, icon_data_len;
+               gchar *icon_data = NULL;
+               GVariant *icon_id = NULL;
+               GVariantIter *iter;
+#endif
+               memset(&get_inkey, 0, sizeof(TelSatGetInkeyInd_t));
+
+#if defined(TIZEN_SUPPORT_SAT_ICON)
+               g_variant_get(param, "(iiibbsii@v)", &command_id, &key_type, &input_character_mode,
+                       &b_numeric,&b_help_info, &text, &text_len, &duration, &icon_id);
+#else
+               g_variant_get(param, "(iiibbsii)", &command_id, &key_type, &input_character_mode,
+                       &b_numeric,&b_help_info, &text, &text_len, &duration);
+#endif
+               get_inkey.commandId = command_id;
+               get_inkey.keyType = key_type;
+               get_inkey.inputCharMode = input_character_mode;
+               get_inkey.bIsNumeric = (b_numeric ? 1 : 0);
+               get_inkey.bIsHelpInfoAvailable = (b_help_info ? 1 : 0);
+               memcpy(get_inkey.text.string, text, TAPI_SAT_DEF_TEXT_STRING_LEN_MAX+1);
+               g_free(text);
+               get_inkey.text.stringLen = text_len;
+               get_inkey.duration = duration;
+
+#if defined(TIZEN_SUPPORT_SAT_ICON)
+               if(icon_id) {
+                       unbox = g_variant_get_variant(icon_id);
+                       g_variant_get(unbox, "a(biiiiiis)", &iter);
+
+                       while(g_variant_iter_loop(iter,"(biiiiiis)", &is_exist, &icon_quali, &icon_identifier, &width, &height, &ics, &icon_data_len, &icon_data)) {
+                               if(!is_exist)
+                                       break;
+                               get_inkey.iconId.bIsPresent = is_exist;
+                               get_inkey.iconId.iconQualifier = icon_quali;
+                               get_inkey.iconId.iconIdentifier = icon_identifier;
+                               get_inkey.iconId.iconInfo.width = width;
+                               get_inkey.iconId.iconInfo.height = height;
+                               get_inkey.iconId.iconInfo.ics = ics;
+                               if(icon_data_len > 0) {
+                                       get_inkey.iconId.iconInfo.iconDataLen = icon_data_len;
+                                       memcpy(get_inkey.iconId.iconInfo.iconFile, icon_data, icon_data_len);
+                               }
+                               dbg("icon exist(%d), icon_quali: (%d), icon_id: (%d), width: (%d), height: (%d), ics: (%d), icon_data_len: (%d)", get_inkey.iconId.bIsPresent, get_inkey.iconId.iconQualifier, get_inkey.iconId.iconIdentifier, get_inkey.iconId.iconInfo.width,
+                                       get_inkey.iconId.iconInfo.height, get_inkey.iconId.iconInfo.ics, get_inkey.iconId.iconInfo.iconDataLen);
+                       }
+                       g_variant_iter_free(iter);
+               }
+#endif
+               dbg("command id(%d)", get_inkey.commandId);
+               dbg("key type(%d)", get_inkey.keyType);
+               dbg("input character mode(%d)", get_inkey.inputCharMode);
+               dbg("numeric(%d)", get_inkey.bIsNumeric);
+               dbg("help info available(%d)", get_inkey.bIsHelpInfoAvailable);
+               dbg("text (%s)", get_inkey.text.string);
+               dbg("text length", get_inkey.text.stringLen);
+               dbg("duration", get_inkey.duration);
+
+               CALLBACK_CALL(&get_inkey);
        }
+       else if (!g_strcmp0(sig, "GetInput")) {
+               TelSatGetInputInd_t get_input;
+
+               gint command_id, input_character_mode;
+               gint text_len, def_text_len, rsp_len_min, rsp_len_max;
+               gboolean b_numeric, b_help_info, b_echo_input;
+               gchar *text = NULL, *def_text = NULL;
+#if defined(TIZEN_SUPPORT_SAT_ICON)
+               GVariant *unbox = NULL;
+               gboolean is_exist;
+               gint icon_quali, icon_identifier, width, height, ics, icon_data_len;
+               gchar *icon_data = NULL;
+               GVariant *icon_id = NULL;
+               GVariantIter *iter;
+#endif
+               memset(&get_input, 0, sizeof(TelSatGetInputInd_t));
+
+#if defined(TIZEN_SUPPORT_SAT_ICON)
+               g_variant_get(param, "(iibbbsiiisi@v)", &command_id, &input_character_mode, &b_numeric, &b_help_info, &b_echo_input,
+                       &text, &text_len, &rsp_len_max, &rsp_len_min, &def_text, &def_text_len, &icon_id);
+#else
+               g_variant_get(param, "(iibbbsiiisi)", &command_id, &input_character_mode, &b_numeric, &b_help_info, &b_echo_input,
+                       &text, &text_len, &rsp_len_max, &rsp_len_min, &def_text, &def_text_len);
+#endif
+               get_input.commandId = command_id;
+               get_input.inputCharMode = input_character_mode;
+               get_input.bIsNumeric = (b_numeric ? 1 : 0);
+               get_input.bIsHelpInfoAvailable = (b_help_info ? 1 : 0);
+               get_input.bIsEchoInput = (b_echo_input ? 1 : 0);
+               memcpy(get_input.text.string, text, TAPI_SAT_DEF_TEXT_STRING_LEN_MAX+1);
+               g_free(text);
+               get_input.text.stringLen = text_len;
+               get_input.respLen.max = rsp_len_max;
+               get_input.respLen.min = rsp_len_min;
+               memcpy(get_input.defaultText.string, def_text, TAPI_SAT_DEF_TEXT_STRING_LEN_MAX+1);
+               g_free(def_text);
+               get_input.defaultText.stringLen = def_text_len;
+
+#if defined(TIZEN_SUPPORT_SAT_ICON)
+               if(icon_id) {
+                       unbox = g_variant_get_variant(icon_id);
+                       g_variant_get(unbox, "a(biiiiiis)", &iter);
+
+                       while(g_variant_iter_loop(iter,"(biiiiiis)", &is_exist, &icon_quali, &icon_identifier, &width, &height, &ics, &icon_data_len, &icon_data)) {
+                               if(!is_exist)
+                                       break;
+                               get_input.iconId.bIsPresent = is_exist;
+                               get_input.iconId.iconQualifier = icon_quali;
+                               get_input.iconId.iconIdentifier = icon_identifier;
+                               get_input.iconId.iconInfo.width = width;
+                               get_input.iconId.iconInfo.height = height;
+                               get_input.iconId.iconInfo.ics = ics;
+                               if(icon_data_len > 0) {
+                                       get_input.iconId.iconInfo.iconDataLen = icon_data_len;
+                                       memcpy(get_input.iconId.iconInfo.iconFile, icon_data, icon_data_len);
+                               }
+                               dbg("icon exist(%d), icon_quali: (%d), icon_id: (%d), width: (%d), height: (%d), ics: (%d), icon_data_len: (%d)", get_input.iconId.bIsPresent, get_input.iconId.iconQualifier, get_input.iconId.iconIdentifier, get_input.iconId.iconInfo.width,
+                                       get_input.iconId.iconInfo.height, get_input.iconId.iconInfo.ics, get_input.iconId.iconInfo.iconDataLen);
+                       }
+                       g_variant_iter_free(iter);
+               }
+#endif
+               dbg("command id(%d)", get_input.commandId);
+               dbg("input character mode(%d)", get_input.inputCharMode);
+               dbg("numeric(%d)", get_input.bIsNumeric);
+               dbg("help info avaiable(%d)", get_input.bIsHelpInfoAvailable);
+               dbg("echo input(%d)", get_input.bIsEchoInput);
+               dbg("text(%s)", get_input.text.string);
+               dbg("text length(%d)", get_input.text.stringLen);
+               dbg("response length max(%d)", get_input.respLen.max);
+               dbg("response length min(%d)", get_input.respLen.min);
+               dbg("default text(%s)", get_input.defaultText.string);
+               dbg("default text length(%d)", get_input.defaultText.stringLen);
+
+               CALLBACK_CALL(&get_input);
+       }
+       else if (!g_strcmp0(sig, "SendSMS")) {
+               TelSatSendSmsIndSmsData_t send_sms;
+
+               gint command_id, ton, npi, tpdu_type;
+               gboolean b_packing_required;
+               gint text_len, number_len, tpdu_data_len;
+               gchar* text = NULL, *dialling_number = NULL;
+               GVariant *tpdu_data;
+
+               memset(&send_sms, 0, sizeof(TelSatSendSmsIndSmsData_t));
+
+               g_variant_get(param, "(isibiisii@vi)", &command_id, &text, &text_len, &b_packing_required, &ton, &npi,
+                                       &dialling_number, &number_len, &tpdu_type, &tpdu_data, &tpdu_data_len);
+
+               send_sms.commandId = command_id;
+               send_sms.bIsPackingRequired = (b_packing_required ? 1 : 0);
+
+               send_sms.address.ton = ton;
+               send_sms.address.npi = npi;
+               send_sms.address.diallingNumberLen = number_len;
+               memcpy(send_sms.address.diallingNumber, dialling_number, TAPI_SAT_DIALLING_NUMBER_LEN_MAX);
+               g_free(dialling_number);
+               g_free(text);
+
+               send_sms.smsTpdu.tpduType = tpdu_type;
+               send_sms.smsTpdu.dataLen = tpdu_data_len;
+
+               if(tpdu_data){
+                       int send_sms_index = 0;
+                       guchar data;
+                       GVariantIter *iter = NULL;
+                       GVariant *inner_gv = NULL;
+
+                       inner_gv = g_variant_get_variant(tpdu_data);
+                       dbg("tpdu data exist type_format(%s)", g_variant_get_type_string(inner_gv));
+
+                       g_variant_get(inner_gv, "ay", &iter);
+                       while( g_variant_iter_loop (iter, "y", &data)){
+                               dbg("index(%d) data(%c)", send_sms_index, data);
+                               send_sms.smsTpdu.data[send_sms_index] = data;
+                               send_sms_index++;
+                       }
+                       g_variant_iter_free(iter);
+                       g_variant_unref(inner_gv);
+               }
 
-       objects = g_dbus_object_manager_get_objects(obj_manager);
-       for (iter = objects; iter != NULL; iter = iter->next) {
-               tel_object = TELEPHONY_OBJECT(iter->data);
-               const gchar *object_path = g_dbus_object_get_object_path(G_DBUS_OBJECT(tel_object));
+               dbg("command id(%d)", send_sms.commandId);
+               dbg("packing required(%d)", send_sms.bIsPackingRequired);
+               dbg("address ton(%d)", send_sms.address.ton);
+               dbg("address npi(%d)", send_sms.address.npi);
+               dbg("address dialing number (%s)", send_sms.address.diallingNumber);
+               dbg("address number length (%d)", send_sms.address.diallingNumberLen);
+               dbg("tpdu type (%d)", send_sms.smsTpdu.tpduType);
+               dbg("tpdu length (%d)", send_sms.smsTpdu.dataLen);
 
-               /* NULL: First CP in list, else matching */
-               if ((cp_name == NULL) || (g_strcmp0(cp_name, object_path) == 0)) {
-                       cp_found = object_path;
-                       break;
+               CALLBACK_CALL(&send_sms);
+       }
+       else if (!g_strcmp0(sig, "SetupEventList")) {
+               int g_index = 0;
+               gint event_cnt;
+               GVariant *evt_list;
+               TelSatEventListData_t event_list;
+
+               memset(&event_list, 0, sizeof(TelSatEventListData_t));
+
+               g_variant_get(param, "(i@v)", &event_cnt, &evt_list);
+
+               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("g_index(%d) event(%d)", g_index, data);
+                               g_event_list[g_index] = data;
+
+                               if(data == TAPI_EVENT_SAT_DW_TYPE_IDLE_SCREEN_AVAILABLE){
+                                       event_list.bIsIdleScreenAvailable = 1;
+                               }
+                               else if(data == TAPI_EVENT_SAT_DW_TYPE_LANGUAGE_SELECTION){
+                                       event_list.bIsLanguageSelection = 1;
+                               }
+                               else if(data == TAPI_EVENT_SAT_DW_TYPE_BROWSER_TERMINATION){
+                                       event_list.bIsBrowserTermination = 1;
+                               }
+                               else if(data == TAPI_EVENT_SAT_DW_TYPE_DATA_AVAILABLE){
+                                       event_list.bIsDataAvailable = 1;
+                               }
+                               else if(data == TAPI_EVENT_SAT_DW_TYPE_CHANNEL_STATUS){
+                                       event_list.bIsChannelStatus = 1;
+                               }
+
+                               g_index++;
+                       }
+                       //while end
+                       g_variant_iter_free(iter);
+                       g_variant_unref(inner_gv);
                }
+
+               dbg("event list cnt(%d)", event_cnt);
+
+               CALLBACK_CALL(&event_list);
        }
+       else if (!g_strcmp0(sig, "Refresh")) {
+               TelSatRefreshInd_t refresh_info;
 
-       if (cp_found == NULL)
-               goto out;
+               gint command_id = 0;
+               gint refresh_type =0;
+               gint file_cnt = 0;
+               GVariant *file_list = NULL;
 
-       dbg("cp_found: [%s]", cp_found);
+               memset(&refresh_info, 0, sizeof(TelSatRefreshInd_t));
 
-       /* Allocate new Handle */
-       handle = g_new0(struct tapi_handle, 1);
+               g_variant_get(param, "(ii@v)", &command_id, &refresh_type, &file_list);
+
+               refresh_info.commandId = command_id;
+               refresh_info.refreshMode = refresh_type;
+
+               if(file_list){
+                       int g_index = 0;
+                       guchar data;
+                       GVariantIter *iter = NULL;
+                       GVariant *inner_gv = NULL;
+
+                       inner_gv = g_variant_get_variant(file_list);
+                       dbg("file 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("g_index(%d) file id(%d)", g_index, data);
+                               refresh_info.fileId[g_index] = data;
+                               g_index++;
+                       }
+                       file_cnt = g_index;
+
+                       //while end
+                       g_variant_iter_free(iter);
+                       g_variant_unref(inner_gv);
+               }
+               refresh_info.fileCount = file_cnt;
+
+               dbg("refresh event/file cnt(%d)", refresh_info.fileCount);
+
+               CALLBACK_CALL(&refresh_info);
+       }
+       else if (!g_strcmp0(sig, "SendDtmf")) {
+               TelSatSendDtmfIndDtmfData_t send_dtmf;
+
+               gint command_id = 0;
+               gint text_len = 0, dtmf_str_len = 0;
+               gchar *text = NULL;
+               gchar *dtmf_str = NULL;
+
+               memset(&send_dtmf, 0, sizeof(TelSatSendDtmfIndDtmfData_t));
+
+               g_variant_get(param, "(isisi)", &command_id, &text, &text_len, &dtmf_str, &dtmf_str_len);
+
+               send_dtmf.commandId = command_id;
+               send_dtmf.bIsHiddenMode = 1;
+
+               send_dtmf.dtmfString.stringLen = dtmf_str_len;
+               memcpy(send_dtmf.dtmfString.string, dtmf_str, TAPI_SAT_DEF_TEXT_STRING_LEN_MAX+1);
+               g_free(dtmf_str);
+               g_free(text);
+
+               dbg("dtmf event command id(%d)", send_dtmf.commandId);
+               dbg("dtmf event dtmf(%s)", send_dtmf.dtmfString.string);
+
+               CALLBACK_CALL(&send_dtmf);
+       }
+       else if (!g_strcmp0(sig, "EndProactiveSession")) {
+               int command_type = 0;
+
+               g_variant_get(param, "(i)", &command_type);
+               dbg("end session evt : command type(%d)", command_type);
+               CALLBACK_CALL(&command_type);
+       }
+       else if (!g_strcmp0(sig, "CallControlResult")) {
+               TelSatCallCtrlIndData_t call_ctrl_result_ind;
+               gint call_ctrl_result = 0, disp_len = 0;
+               gint bc_repeat_indicator = 0, ton = 0x0F, npi=0X0F;
+               gchar *text = NULL, *call_num = NULL, *ss_string = NULL, *sub_addr = NULL, *ccp1 = NULL, *ccp2 = NULL;
+
+               memset(&call_ctrl_result_ind, 0x00, sizeof(TelSatCallCtrlIndData_t));
+
+               g_variant_get(param, "(isiisssssi)", &call_ctrl_result, &text, &ton, &npi, &call_num,
+                       &ss_string, &sub_addr, &ccp1, &ccp2, &bc_repeat_indicator);
+
+               call_ctrl_result_ind.callCtrlResult = call_ctrl_result;
+               disp_len = strlen(text); //alpha id
+               if(disp_len >1) {
+                       call_ctrl_result_ind.dispData.stringLen = disp_len;
+                       memcpy(&call_ctrl_result_ind.dispData.string, text, disp_len);
+                       call_ctrl_result_ind.bIsUserInfoDisplayEnabled = 1;
+               }
+               g_free(text);
+
+               if(strlen(call_num) > 1 && (g_strcmp0(call_num,"") != 0) ){
+                       call_ctrl_result_ind.callCtrlCnfType = TAPI_SAT_CALL_TYPE_MO_VOICE;
+                       call_ctrl_result_ind.u.callCtrlCnfCallData.address.stringLen = strlen(call_num);
+                       memcpy(&call_ctrl_result_ind.u.callCtrlCnfCallData.address.string, call_num, strlen(call_num));
+                       call_ctrl_result_ind.u.callCtrlCnfCallData.subAddress.stringLen = strlen(sub_addr);
+                       memcpy(&call_ctrl_result_ind.u.callCtrlCnfCallData.subAddress.string, sub_addr, strlen(sub_addr));
+                       call_ctrl_result_ind.u.callCtrlCnfCallData.ccp1.stringLen = strlen(ccp1);
+                       memcpy(&call_ctrl_result_ind.u.callCtrlCnfCallData.ccp1.string, ccp1, strlen(ccp1));
+                       call_ctrl_result_ind.u.callCtrlCnfCallData.ccp1.stringLen = strlen(ccp2);
+                       memcpy(&call_ctrl_result_ind.u.callCtrlCnfCallData.ccp1.string, ccp2, strlen(ccp2));
+                       call_ctrl_result_ind.u.callCtrlCnfCallData.bcRepeatIndicator = bc_repeat_indicator;
+               }//call number exist
+               else if( strlen(ss_string) > 1 && (g_strcmp0(ss_string,"") != 0) ){
+                       call_ctrl_result_ind.callCtrlCnfType = TAPI_SAT_CALL_TYPE_SS;
+                       call_ctrl_result_ind.u.callCtrlCnfSsData.ssString.stringLen = strlen(ss_string);
+                       memcpy(&call_ctrl_result_ind.u.callCtrlCnfSsData.ssString.string, ss_string, strlen(ss_string));
+                       call_ctrl_result_ind.u.callCtrlCnfSsData.subAddress.stringLen = strlen(sub_addr);
+                       memcpy(&call_ctrl_result_ind.u.callCtrlCnfSsData.subAddress.string, sub_addr, strlen(sub_addr));
+                       call_ctrl_result_ind.u.callCtrlCnfSsData.ccp1.stringLen = strlen(ccp1);
+                       memcpy(&call_ctrl_result_ind.u.callCtrlCnfSsData.ccp1.string, ccp1, strlen(ccp1));
+                       call_ctrl_result_ind.u.callCtrlCnfSsData.ccp1.stringLen = strlen(ccp2);
+                       memcpy(&call_ctrl_result_ind.u.callCtrlCnfSsData.ccp1.string, ccp2, strlen(ccp2));
+                       call_ctrl_result_ind.u.callCtrlCnfSsData.bcRepeatIndicator = bc_repeat_indicator;
+               }//ss string exist
+               else{
+                       dbg("not matched call control");
+                       goto EXIT;
+               }
+
+               CALLBACK_CALL(&call_ctrl_result_ind);
+
+EXIT:
+               g_free(call_num);
+               g_free(sub_addr);
+               g_free(ccp1);
+               g_free(ccp2);
+               g_free(ss_string);
+       }
+       else if (!g_strcmp0(sig, "MoSmControlResult")) {
+               TelSatMoSmCtrlIndData_t mo_sm_ctrl_result_ind;
+               gint call_ctrl_result = 0 ,disp_len = 0;
+               gint rp_dst_ton = 0x0F, rp_dst_npi = 0X0F, tp_dst_ton = 0x0F, tp_dst_npi = 0X0F;
+               gchar *text = NULL, *rp_dst_call_num = NULL, *tp_dst_call_num = NULL;
+
+               memset(&mo_sm_ctrl_result_ind, 0x00, sizeof(TelSatMoSmCtrlIndData_t));
+
+               g_variant_get(param, "(isiisiis)", &call_ctrl_result, &text,
+                       &rp_dst_ton, &rp_dst_npi, &rp_dst_call_num, &tp_dst_ton, &tp_dst_npi, &tp_dst_call_num);
+
+               mo_sm_ctrl_result_ind.moSmsCtrlResult= call_ctrl_result;
+               disp_len = strlen(text); //alpha id
+               if(disp_len >1) {
+                       mo_sm_ctrl_result_ind.dispData.stringLen = disp_len;
+                       memcpy(&mo_sm_ctrl_result_ind.dispData.string, text, disp_len);
+                       mo_sm_ctrl_result_ind.bIsUserInfoDisplayEnabled = 1;
+               }
+
+               if(strlen(rp_dst_call_num) > 1 && (g_strcmp0(rp_dst_call_num,"") != 0) ){
+                       mo_sm_ctrl_result_ind.tpDestAddr.bIsDigitOnly = 1;
+                       mo_sm_ctrl_result_ind.rpDestAddr.stringLen = strlen(rp_dst_call_num);
+                       memcpy(&mo_sm_ctrl_result_ind.rpDestAddr.string, rp_dst_call_num, strlen(rp_dst_call_num));
+               }// rp dst call number exist
+               else if( strlen(tp_dst_call_num) > 1 && (g_strcmp0(tp_dst_call_num,"") != 0) ){
+                       mo_sm_ctrl_result_ind.tpDestAddr.bIsDigitOnly = 1;
+                       mo_sm_ctrl_result_ind.tpDestAddr.stringLen = strlen(tp_dst_call_num);
+                       memcpy(&mo_sm_ctrl_result_ind.tpDestAddr.string, tp_dst_call_num, strlen(tp_dst_call_num));
+               }//tp dst call number exist
+               else{
+                       dbg("Any destination address are not provided, use default one.");
+               }
+               g_free(text);
+               g_free(rp_dst_call_num);
+               g_free(tp_dst_call_num);
+
+               CALLBACK_CALL(&mo_sm_ctrl_result_ind);
+       }
+       else {
+               dbg("not handled Sat noti[%s]", sig);
+       }
+}
+
+static void _process_sim_event(const gchar *sig, GVariant *param,
+       TapiHandle *handle, char *noti_id, struct tapi_evt_cb *evt_cb_data)
+{
+       TAPI_RETURN_IF_FAIL(evt_cb_data);
+
+       if (!g_strcmp0(sig, "Status")) {
+               int status = 0;
+               g_variant_get(param, "(i)", &status);
+               CALLBACK_CALL(&status);
+       } else if (!g_strcmp0(sig, "Refreshed")) {
+               int type = 0;
+               g_variant_get(param, "(i)", &type);
+               CALLBACK_CALL(&type);
+       } else {
+               dbg("not handled SIM noti[%s]",sig );
+       }
+}
+
+static void _process_pb_event(const gchar *sig, GVariant *param,
+       TapiHandle *handle, char *noti_id, struct tapi_evt_cb *evt_cb_data)
+{
+       TAPI_RETURN_IF_FAIL(evt_cb_data);
+
+       if (!g_strcmp0(sig, "Status")) {
+               TelSimPbStatus_t status;
+               g_variant_get(param, "(ibbbbbb)",
+                       &status.init_completed,
+                       &status.pb_list.b_fdn,
+                       &status.pb_list.b_adn,
+                       &status.pb_list.b_sdn,
+                       &status.pb_list.b_3g,
+                       &status.pb_list.b_aas,
+                       &status.pb_list.b_gas);
+
+               msg("(%s) init[%d] fdn[%d] adn[%d] sdn[%d] usim[%d] aas[%d] gas[%d]",
+                       handle->cp_name, status.init_completed, status.pb_list.b_fdn,status.pb_list.b_adn,status.pb_list.b_sdn,status.pb_list.b_3g,status.pb_list.b_aas,status.pb_list.b_gas);
+               CALLBACK_CALL(&status);
+       } else {
+               dbg("not handled Phonebook noti[%s]",sig );
+       }
+}
+
+static void _process_sap_event(const gchar *sig, GVariant *param,
+       TapiHandle *handle, char *noti_id, struct tapi_evt_cb *evt_cb_data)
+{
+       TAPI_RETURN_IF_FAIL(evt_cb_data);
+
+       if (!g_strcmp0(sig, "Status")) {
+               int noti = 0;
+               g_variant_get(param, "(i)", &noti);
+               CALLBACK_CALL(&noti);
+       } else if (!g_strcmp0(sig, "Disconnect")) {
+               int disconnect = 0;
+               g_variant_get(param, "(i)", &disconnect);
+               CALLBACK_CALL(&disconnect);
+       } else {
+               dbg("not handled SAP noti[%s]",sig );
+       }
+}
+
+static void _process_modem_event(const gchar *sig, GVariant *param,
+       TapiHandle *handle, char *noti_id, struct tapi_evt_cb *evt_cb_data)
+{
+       TAPI_RETURN_IF_FAIL(evt_cb_data);
+
+       if (!g_strcmp0(sig, "Power")) {
+               int noti = 0;
+
+               g_variant_get(param, "(i)", &noti);
+
+               CALLBACK_CALL(&noti);
+       }
+       else {
+               dbg("not handled Modem noti[%s]", sig);
+       }
+
+       return;
+}
+
+static void _process_ss_event(const gchar *sig, GVariant *param,
+       TapiHandle *handle, char *noti_id, struct tapi_evt_cb *evt_cb_data)
+{
+       GVariant *value = 0;
+       GVariantIter *iter = 0;
+       GVariantIter *iter_row = 0;
+       const gchar *key = 0;
+       int i = 0;
+
+       TAPI_RETURN_IF_FAIL(evt_cb_data);
+
+       if (!g_strcmp0(sig, "NotifyUSSD")) {
+               TelSsUssdMsgInfo_t noti;
+               char *str = NULL;
+               memset(&noti, 0, sizeof(TelSsUssdMsgInfo_t));
+
+               g_variant_get(param, "(iiis)", &noti.Type, &noti.Dcs, &noti.Length, &str);
+
+               if (str) {
+                       g_strlcpy((char*)noti.szString, str, TAPI_SS_USSD_DATA_SIZE_MAX);
+                       g_free(str);
+               }
+
+               CALLBACK_CALL(&noti);
+       }
+       else if (!g_strcmp0(sig, "NotifySsInfo")) {
+               TelSsInfo_t noti;
+               memset(&noti, 0, sizeof(TelSsInfo_t));
+
+               g_variant_get(param, "(ii)", &noti.Cause, &noti.SsType);
+
+               CALLBACK_CALL(&noti);
+       }
+       else if (!g_strcmp0(sig, "ReleaseComplete")) {
+               TelSsRelCompMsgInfo_t noti;
+               GVariant *msg = 0;
+               int len = 0;
+
+               memset ( &noti, 0, sizeof( TelSsRelCompMsgInfo_t ));
+
+               g_variant_get(param, "(i@v)", &len, &msg);
+
+               noti.RelCompMsgLen = (unsigned char)len;
+
+               if(msg){
+                       int count = 0;
+                       guchar data;
+                       GVariantIter *msg_iter = NULL;
+                       GVariant *inner_gv = NULL;
+
+                       inner_gv = g_variant_get_variant(msg);
+                       msg("[ check ] data exist type_format(%s)", g_variant_get_type_string(inner_gv));
+
+                       g_variant_get(inner_gv, "ay", &msg_iter);
+                       while( g_variant_iter_loop (msg_iter, "y", &data)){
+                               msg("index(%d) data(%c)", count, data);
+                               noti.szRelCompMsg[count] = data;
+                               count++;
+                       }
+                       g_variant_iter_free(msg_iter);
+                       g_variant_unref(msg);
+                       g_variant_unref(inner_gv);
+               }
+
+               CALLBACK_CALL(&noti);
+
+       } else if ( !g_strcmp0(sig, "NotifyForwarding") ) {
+
+               TelSsForwardNoti_t noti;
+               memset(&noti, 0, sizeof(TelSsForwardNoti_t));
+
+               g_variant_get (param, "(aa{sv})", &iter);
+
+               noti.record_num = g_variant_iter_n_children(iter);
+
+               if (TAPI_SS_RECORD_NUM_MAX < noti.record_num) {
+                       noti.record_num = TAPI_SS_RECORD_NUM_MAX;
+               }
+
+               while ( g_variant_iter_next(iter, "a{sv}", &iter_row ) && (i < noti.record_num)) {
+                       while ( g_variant_iter_loop( iter_row, "{sv}", &key, &value ) ) {
+
+                               if ( !g_strcmp0(key, "ss_class") ) {
+                                       noti.record[i].Class = g_variant_get_int32(value);
+                               }
+
+                               if ( !g_strcmp0(key, "ss_status") ) {
+                                       noti.record[i].Status = g_variant_get_int32(value);
+                               }
+
+                               if ( !g_strcmp0(key, "forwarding_mode") ) {
+                                       noti.record[i].ForwardCondition = g_variant_get_int32(value);
+                               }
+
+                               if ( !g_strcmp0(key, "number_present") ) {
+                                       noti.record[i].bCallForwardingNumberPresent = g_variant_get_int32(value);
+                               }
 
-       /* Find interfaces available for the given CP */
-       interfaces = g_dbus_object_get_interfaces(G_DBUS_OBJECT (tel_object));
-       for (iter = interfaces; iter != NULL; iter = iter->next) {
-               GDBusInterface *interface = G_DBUS_INTERFACE(iter->data);
-               const gchar *interface_name = g_dbus_interface_get_info(interface)->name;
-
-               /* Create proxies and register for Signals and Property change events */
-               if ((handle->modem_proxy == NULL)
-                       && (g_strcmp0(interface_name, TELEPHONY_MODEM_INTERFACE) == 0)) {
-                       handle->modem_proxy = telephony_modem_proxy_new_for_bus_sync(
-                                               G_BUS_TYPE_SYSTEM,
-                                               G_DBUS_PROXY_FLAGS_NONE,
-                                               TELEPHONY_SERVICE,
-                                               cp_found, NULL, &error);
-                       HANDLE_GERROR(error, "Error getting modem proxy");
-
-                       /* Setting Proxy default timeout as DEFAULT value (60 secs) */
-                       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->modem_proxy,
-                               TAPI_DBUS_TIMEOUT_DEFAULT);
-
-
-                       handle->modem_property_handler = g_signal_connect(
-                                               handle->modem_proxy,
-                                               "g-properties-changed",
-                                               G_CALLBACK(on_modem_property_change_handler),
-                                               handle);
-               } else if ((handle->sim_proxy == NULL)
-                       && (g_strcmp0(interface_name, TELEPHONY_SIM_INTERFACE) == 0)) {
-                       handle->sim_proxy = telephony_sim_proxy_new_for_bus_sync(
-                                               G_BUS_TYPE_SYSTEM,
-                                               G_DBUS_PROXY_FLAGS_NONE,
-                                               TELEPHONY_SERVICE,
-                                               cp_found, NULL, &error);
-                       HANDLE_GERROR(error, "Error getting sim proxy");
-
-                       /* Setting Proxy default timeout as DEFAULT value (60 secs) */
-                       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->sim_proxy,
-                               TAPI_DBUS_TIMEOUT_DEFAULT);
-
-                       handle->sim_property_handler = g_signal_connect(
-                                               handle->sim_proxy,
-                                               "g-properties-changed",
-                                               G_CALLBACK(on_sim_property_change_handler),
-                                               handle);
-               } else if ((handle->network_proxy == NULL)
-                       && (g_strcmp0(interface_name, TELEPHONY_NETWORK_INTERFACE) == 0)) {
-                       handle->network_proxy = telephony_network_proxy_new_for_bus_sync(
-                                               G_BUS_TYPE_SYSTEM,
-                                               G_DBUS_PROXY_FLAGS_NONE,
-                                               TELEPHONY_SERVICE,
-                                               cp_found, NULL, &error);
-                       HANDLE_GERROR(error, "Error getting network proxy");
-
-                       /* Setting Proxy default timeout as DEFAULT value (60 secs) */
-                       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->network_proxy,
-                               TAPI_DBUS_TIMEOUT_DEFAULT);
-
-                       handle->network_signal_handler = g_signal_connect(
-                                               handle->network_proxy,
-                                               "g-signal",
-                                               G_CALLBACK(on_network_signal_emit_handler),
-                                               handle);
-               } else if ((handle->call_proxy == NULL)
-                       && (g_strcmp0(interface_name, TELEPHONY_CALL_INTERFACE) == 0)) {
-                       handle->call_proxy = telephony_call_proxy_new_for_bus_sync(
-                                               G_BUS_TYPE_SYSTEM,
-                                               G_DBUS_PROXY_FLAGS_NONE,
-                                               TELEPHONY_SERVICE,
-                                               cp_found, NULL, &error);
-                       HANDLE_GERROR(error, "Error getting call proxy");
-
-                       /* Setting Proxy default timeout as DEFAULT value (60 secs) */
-                       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->call_proxy,
-                               TAPI_DBUS_TIMEOUT_DEFAULT);
-
-                       handle->call_signal_handler = g_signal_connect(
-                                               handle->call_proxy,
-                                               "g-signal",
-                                               G_CALLBACK(on_call_signal_emit_handler),
-                                               handle);
-               } else if ((handle->ss_proxy == NULL)
-                       && (g_strcmp0(interface_name, TELEPHONY_SS_INTERFACE) == 0)) {
-                       handle->ss_proxy = telephony_ss_proxy_new_for_bus_sync(
-                                               G_BUS_TYPE_SYSTEM,
-                                               G_DBUS_PROXY_FLAGS_NONE,
-                                               TELEPHONY_SERVICE,
-                                               cp_found, NULL, &error);
-                       HANDLE_GERROR(error, "Error getting ss proxy");
-
-                       /* Setting Proxy default timeout as DEFAULT value (60 secs) */
-                       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->ss_proxy,
-                               TAPI_DBUS_TIMEOUT_DEFAULT);
-
-                       handle->ss_signal_handler = g_signal_connect(
-                                               handle->ss_proxy,
-                                               "g-signal",
-                                               G_CALLBACK(on_ss_signal_emit_handler),
-                                               handle);
-               } else if ((handle->sms_proxy == NULL)
-                       && (g_strcmp0(interface_name, TELEPHONY_SMS_INTERFACE) == 0)) {
-                       handle->sms_proxy = telephony_sms_proxy_new_for_bus_sync(
-                                               G_BUS_TYPE_SYSTEM,
-                                               G_DBUS_PROXY_FLAGS_NONE,
-                                               TELEPHONY_SERVICE,
-                                               cp_found, NULL, &error);
-                       HANDLE_GERROR(error, "Error getting sms proxy");
-
-                       /* Setting Proxy default timeout as DEFAULT value (60 secs) */
-                       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->sms_proxy,
-                               TAPI_DBUS_TIMEOUT_DEFAULT);
-
-                       handle->sms_signal_handler = g_signal_connect(
-                                               handle->sms_proxy,
-                                               "g-signal",
-                                               G_CALLBACK(on_sms_signal_emit_handler),
-                                               handle);
-
-                       handle->sms_property_handler = g_signal_connect(
-                                               handle->sms_proxy,
-                                               "g-properties-changed",
-                                               G_CALLBACK(on_sms_property_change_handler),
-                                               handle);
-               } else if ((handle->phonebook_proxy == NULL)
-                       && (g_strcmp0(interface_name, TELEPHONY_PB_INTERFACE) == 0)) {
-                       handle->phonebook_proxy = telephony_phonebook_proxy_new_for_bus_sync(
-                                               G_BUS_TYPE_SYSTEM,
-                                               G_DBUS_PROXY_FLAGS_NONE,
-                                               TELEPHONY_SERVICE,
-                                               cp_found, NULL, &error);
-                       HANDLE_GERROR(error, "Error getting phonebook proxy");
-
-                       /* Setting Proxy default timeout as DEFAULT value (60 secs) */
-                       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->phonebook_proxy,
-                               TAPI_DBUS_TIMEOUT_DEFAULT);
-
-                       handle->phonebook_signal_handler = g_signal_connect(
-                                               handle->phonebook_proxy,
-                                               "g-signal",
-                                               G_CALLBACK(on_phonebook_signal_emit_handler),
-                                               handle);
-               } else if ((handle->sat_proxy == NULL)
-                       && (g_strcmp0(interface_name, TELEPHONY_SAT_INTERFACE) == 0)) {
-                       handle->sat_proxy = telephony_sat_proxy_new_for_bus_sync(
-                                               G_BUS_TYPE_SYSTEM,
-                                               G_DBUS_PROXY_FLAGS_NONE,
-                                               TELEPHONY_SERVICE,
-                                               cp_found, NULL, &error);
-                       HANDLE_GERROR(error, "Error getting sat proxy");
-
-                       /* Setting Proxy default timeout as DEFAULT value (60 secs) */
-                       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->sat_proxy,
-                               TAPI_DBUS_TIMEOUT_DEFAULT);
-
-                       handle->sat_signal_handler = g_signal_connect(
-                                               handle->sat_proxy,
-                                               "g-signal",
-                                               G_CALLBACK(on_sat_signal_emit_handler),
-                                               handle);
-               } else if ((handle->sap_proxy == NULL)
-                       && (g_strcmp0(interface_name, TELEPHONY_SAP_INTERFACE) == 0)) {
-                       handle->sap_proxy = telephony_sap_proxy_new_for_bus_sync(
-                                               G_BUS_TYPE_SYSTEM,
-                                               G_DBUS_PROXY_FLAGS_NONE,
-                                               TELEPHONY_SERVICE,
-                                               cp_found, NULL, &error);
-                       HANDLE_GERROR(error, "Error getting sap proxy");
-
-                       /* Setting Proxy default timeout as DEFAULT value (60 secs) */
-                       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->sap_proxy,
-                               TAPI_DBUS_TIMEOUT_DEFAULT);
-
-                       handle->sap_signal_handler = g_signal_connect(
-                                               handle->sap_proxy,
-                                               "g-signal",
-                                               G_CALLBACK(on_sap_signal_emit_handler),
-                                               handle);
-               } else if ((handle->gps_proxy == NULL)
-                       && (g_strcmp0(interface_name, TELEPHONY_GPS_INTERFACE) == 0)) {
-                       handle->gps_proxy = telephony_gps_proxy_new_for_bus_sync(
-                                               G_BUS_TYPE_SYSTEM,
-                                               G_DBUS_PROXY_FLAGS_NONE,
-                                               TELEPHONY_SERVICE,
-                                               cp_found, NULL, &error);
-                       HANDLE_GERROR(error, "Error getting gps proxy");
-
-                       /* Setting Proxy default timeout as DEFAULT value (60 secs) */
-                       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->gps_proxy,
-                               TAPI_DBUS_TIMEOUT_DEFAULT);
-
-                       handle->gps_signal_handler = g_signal_connect(
-                                               handle->gps_proxy,
-                                               "g-signal",
-                                               G_CALLBACK(on_gps_signal_emit_handler),
-                                               handle);
-               }
-       }
-
-       handle->cp_name = g_strdup(cp_found);
-       handle->evt_table = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
-
-       goto out;
+                               if ( !g_strcmp0(key, "no_reply_time") ) {
+                                       noti.record[i].NoReplyWaitTime = g_variant_get_int32(value);
+                               }
+
+                               if ( !g_strcmp0(key, "type_of_number") ) {
+                                       noti.record[i].Ton = g_variant_get_int32(value);
+                               }
+
+                               if ( !g_strcmp0(key, "numbering_plan_identity") ) {
+                                       noti.record[i].Npi = g_variant_get_int32(value);
+                               }
+
+                               if ( !g_strcmp0(key, "forwarding_number") ) {
+                                       strncpy((char *)noti.record[i].szCallForwardingNumber, g_variant_get_string(value, 0), TAPI_CALL_DIALDIGIT_LEN_MAX );
+                               }
+
+                       }
+                       i++;
+                       g_variant_iter_free(iter_row);
+               }
+               g_variant_iter_free(iter);
+
+               CALLBACK_CALL(&noti);
+
+       } else if ( !g_strcmp0(sig, "NotifyWaiting") ) {
+
+               TelSsWaitingNoti_t noti;
+               memset(&noti, '\0', sizeof(TelSsWaitingNoti_t));
+
+               g_variant_get (param, "(aa{sv})", &iter);
+
+               noti.record_num = g_variant_iter_n_children(iter);
+
+               if (TAPI_SS_RECORD_NUM_MAX < noti.record_num) {
+                       noti.record_num = TAPI_SS_RECORD_NUM_MAX;
+               }
+
+               while ( g_variant_iter_next(iter, "a{sv}", &iter_row ) && (i < noti.record_num)) {
+                       while ( g_variant_iter_loop( iter_row, "{sv}", &key, &value ) ) {
+
+                               if ( !g_strcmp0(key, "ss_class") ) {
+                                       noti.record[i].Class = g_variant_get_int32(value);
+                               }
+
+                               if ( !g_strcmp0(key, "ss_status") ) {
+                                       noti.record[i].Status = g_variant_get_int32(value);
+                               }
+                       }
+                       i++;
+                       g_variant_iter_free(iter_row);
+               }
+               g_variant_iter_free(iter);
+
+               CALLBACK_CALL(&noti);
+
+       } else if ( !g_strcmp0(sig, "NotifyBarring") ) {
+
+               TelSsBarringNoti_t noti;
+               memset(&noti, '\0', sizeof(TelSsBarringNoti_t));
+
+               g_variant_get (param, "(aa{sv})", &iter);
+
+               noti.record_num = g_variant_iter_n_children(iter);
+
+               if (TAPI_SS_RECORD_NUM_MAX < noti.record_num) {
+                       noti.record_num = TAPI_SS_RECORD_NUM_MAX;
+               }
+
+               while ( g_variant_iter_next(iter, "a{sv}", &iter_row ) ) {
+                       while ( g_variant_iter_loop( iter_row, "{sv}", &key, &value ) && (i < noti.record_num)) {
+
+                               if ( !g_strcmp0(key, "ss_class") ) {
+                                       noti.record[i].Class = g_variant_get_int32(value);
+                               }
+
+                               if ( !g_strcmp0(key, "ss_status") ) {
+                                       noti.record[i].Status = g_variant_get_int32(value);
+                               }
+
+                               if ( !g_strcmp0(key, "barring_mode") ) {
+                                       noti.record[i].Flavour = g_variant_get_int32(value);
+                               }
+
+                       }
+                       i++;
+                       g_variant_iter_free(iter_row);
+               }
+               g_variant_iter_free(iter);
+
+               CALLBACK_CALL(&noti);
+
+       } else {
+               dbg("not handled SS noti[%s]", sig);
+       }
+
+       return;
+}
+
+static void _process_gps_event(const gchar *sig, GVariant *param,
+               TapiHandle *handle, char *noti_id, struct tapi_evt_cb *evt_cb_data)
+{
+       gboolean b_decode_data = FALSE;
+       guchar *decoded_data = NULL;
+
+       TAPI_RETURN_IF_FAIL(evt_cb_data);
+
+       if (!g_strcmp0(sig, "AssistData")) {
+               b_decode_data = TRUE;
+       }
+       else if (!g_strcmp0(sig, "MeasurePosition")) {
+               b_decode_data = TRUE;
+       }
+       else if (!g_strcmp0(sig, "ResetAssistData")) {
+               /* noting to decode */
+       }
+       else if (!g_strcmp0(sig, "FrequencyAiding")) {
+               b_decode_data = TRUE;
+       }
+       else {
+               dbg("not handled Gps noti[%s]", sig);
+       }
+
+       /* decoding data */
+       if(b_decode_data) {
+               gchar *data = NULL;
+               gsize length;
+               dbg("[%s] decoding start", sig);
+
+               g_variant_get(param, "(s)", &data);
+               decoded_data = g_base64_decode((const gchar *)data, &length);
+               if (decoded_data) {
+                       CALLBACK_CALL(decoded_data);
+               }
+               g_free(data);
+               dbg("length=%d", length);
+       }
+
+       if (decoded_data)
+               g_free(decoded_data);
+}
+
+static void on_prop_callback(GDBusConnection *conn, const gchar *name, const gchar *path, const gchar *interface,
+               const gchar *sig, GVariant *param, gpointer user_data)
+{
+       TapiHandle *handle = user_data;
+       struct tapi_evt_cb *evt_cb_data = NULL;
+       const gchar *interface_name_for_signal;
+       GVariant *changed_properties = NULL;
+       gchar **invalidated_properties = NULL;
+       GVariantIter iter;
+       gchar *key;
+       GVariant *value;
+       gchar *prev_value;
+       char noti_id[256];
+       char *data;
+
+       TAPI_RETURN_IF_FAIL(handle);
+
+       if (!g_variant_is_of_type (param, G_VARIANT_TYPE ("(sa{sv}as)"))) {
+               err("PropertiesChanged parameter type mismatch ('%s')", g_variant_get_type_string(param));
+               return;
+       }
+
+       g_variant_get (param, "(&s@a{sv}^a&s)", &interface_name_for_signal,
+                       &changed_properties, &invalidated_properties);
+
+       if (!changed_properties) {
+               err("Cannot get changed_properties");
+               goto fail;
+       }
+
+       g_variant_iter_init (&iter, changed_properties);
+       while (g_variant_iter_next (&iter, "{sv}", &key, &value)) {
+
+               memset(noti_id, 0, 256);
+               snprintf (noti_id, 255, "%s:%s", interface_name_for_signal, key);
+
+               evt_cb_data = g_hash_table_lookup (handle->evt_list, noti_id);
+               if (!evt_cb_data) {
+                       g_variant_unref (value);
+                       g_free((gchar *)key);
+                       /* ignore un-registered property change callback */
+                       continue;
+
+               }
+               if (g_variant_is_of_type (value, G_VARIANT_TYPE_STRING )) {
+                       data = g_try_malloc0 (g_variant_get_size (value) + 3);
+                       if (!data) {
+                               warn ("g_try_malloc0 failed");
+                               g_variant_unref (value);
+                               g_free((gchar *)key);
+                               continue;
+                       }
+                       data[0] = 's';
+                       data[1] = ':';
+                       memcpy (data + 2, g_variant_get_data (value),
+                                       g_variant_get_size (value));
+               }
+               else if (g_variant_is_of_type (value, G_VARIANT_TYPE_BOOLEAN )) {
+                       data = g_strdup_printf ("b:%d",
+                                       *(guchar *) g_variant_get_data (value));
+               }
+               else {
+                       data = g_strdup_printf ("i:%d", *(int *) g_variant_get_data (value));
+               }
+
+               prev_value = g_hash_table_lookup (handle->cache_property, noti_id);
+               if (prev_value) {
+                       if (g_strcmp0 (data, prev_value) == 0) {
+                               g_free (data);
+                               g_variant_unref (value);
+                               g_free((gchar *)key);
+                               continue;
+                       }
+               }
+
+               msg("[%s] save prop: [%s] - [%s]", handle->cp_name, noti_id, data);
+               g_hash_table_replace (handle->cache_property, g_strdup(noti_id), data);
+
+               {
+                       int param_i = 0;
+                       if (data[0] == 's') {
+                               CALLBACK_CALL((void * ) (data + 2));
+                       }
+                       else {
+                               param_i = atoi (data + 2);
+                               CALLBACK_CALL((void * )&param_i);
+                       }
+               }
+               g_variant_unref (value);
+               g_free((gchar *)key);
+       }
+
+       if (changed_properties != NULL )
+               g_variant_unref (changed_properties);
 
 fail:
-       (void) tapi_deinit(handle);
+       if (invalidated_properties)
+               g_free (invalidated_properties);
+}
 
-out:
-       if (interfaces != NULL)
-               g_list_free_full(interfaces, g_object_unref);
+static void on_signal_callback(GDBusConnection *conn, const gchar *name, const gchar *path, const gchar *interface,
+               const gchar *sig, GVariant *param, gpointer user_data)
+{
+       TapiHandle *handle = user_data;
+       struct tapi_evt_cb *evt_cb_data = NULL;
+       char *noti_id;
 
-       if (objects != NULL)
-               g_list_free_full(objects, g_object_unref);
+       TAPI_RETURN_IF_FAIL(handle);
 
-       if (obj_manager != NULL)
-               g_object_unref (obj_manager);
+       noti_id = g_strdup_printf("%s:%s", interface, sig);
 
-       return handle;
+       evt_cb_data = g_hash_table_lookup(handle->evt_list, noti_id);
+       if (!evt_cb_data) {
+               dbg("can't find noti_id(%s) callback info", noti_id);
+               g_free(noti_id);
+               return;
+       }
+
+       if (!g_strcmp0(interface, DBUS_TELEPHONY_SMS_INTERFACE)) {
+               _process_sms_event(sig, param, handle, noti_id, evt_cb_data);
+       }
+       else if (!g_strcmp0(interface, DBUS_TELEPHONY_CALL_INTERFACE)) {
+               _process_call_event(sig, param, handle, noti_id, evt_cb_data);
+       }
+       else if (!g_strcmp0(interface, DBUS_TELEPHONY_SAT_INTERFACE)) {
+               _process_sat_event(sig, param, handle, noti_id, evt_cb_data);
+       }
+       else if (!g_strcmp0(interface, DBUS_TELEPHONY_SIM_INTERFACE)) {
+               _process_sim_event(sig, param, handle, noti_id, evt_cb_data);
+       }
+       else if (!g_strcmp0(interface, DBUS_TELEPHONY_PB_INTERFACE)) {
+               _process_pb_event(sig, param, handle, noti_id, evt_cb_data);
+       }
+       else if (!g_strcmp0(interface, DBUS_TELEPHONY_SAP_INTERFACE)) {
+               _process_sap_event(sig, param, handle, noti_id, evt_cb_data);
+       }
+       else if (!g_strcmp0(interface, DBUS_TELEPHONY_MODEM_INTERFACE)) {
+               _process_modem_event(sig, param, handle, noti_id, evt_cb_data);
+       }
+       else if (!g_strcmp0(interface, DBUS_TELEPHONY_SS_INTERFACE)) {
+               _process_ss_event(sig, param, handle, noti_id, evt_cb_data);
+       }
+       else if (!g_strcmp0(interface, DBUS_TELEPHONY_GPS_INTERFACE)) {
+               _process_gps_event(sig, param, handle, noti_id, evt_cb_data);
+       }
+       else if (!g_strcmp0(interface, DBUS_TELEPHONY_NETWORK_INTERFACE)) {
+               _process_network_event(sig, param, handle, noti_id, evt_cb_data);
+       }
+       else {
+       }
+       g_free(noti_id);
 }
 
-EXPORT_API TelReturn tapi_deinit(TelHandle *handle)
+EXPORT_API char** tel_get_cp_name_list(void)
 {
-       if (handle == NULL) {
-               err("TAPI handle is NULL");
-               return TEL_RETURN_INVALID_PARAMETER;
+       gpointer d_conn = NULL;
+       GError *error = NULL;
+
+       GVariantIter *iter = NULL;
+       GVariant *rst = NULL;
+
+       gchar *modem_path = NULL;
+       GSList *list = NULL;
+       GSList *l = NULL;
+
+       int i = 0, element_cnt = 0;
+       gchar **cp_list = NULL;
+
+       d_conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error);
+       if (!d_conn) {
+               err("Error creating dbus connection: %s\n", error->message);
+               g_error_free (error);
+               return NULL;
        }
 
-       if (handle->modem_proxy) {
-               if (handle->modem_property_handler > 0)
-                       g_signal_handler_disconnect(handle->modem_proxy,
-                               handle->modem_property_handler);
+       rst = g_dbus_connection_call_sync(d_conn, DBUS_TELEPHONY_SERVICE , "/org/tizen/telephony",
+                       "org.tizen.telephony.Manager", "GetModems", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, NULL, &error);
+       if (!rst) {
+               err( "GetModems() failed. (%s)", error->message);
+               g_error_free (error);
+               goto OUT;
+       }
+
+       g_variant_get (rst, "(as)", &iter);
+       while (g_variant_iter_next(iter, "s", &modem_path)){
+               list = g_slist_append(list, modem_path);
+       }
+       g_variant_iter_free (iter);
 
-               g_object_unref(handle->modem_proxy);
+       if (!list) {
+               err( "No CP name");
+               goto OUT;
        }
 
-       if (handle->sim_proxy) {
-               if (handle->sim_property_handler > 0)
-                       g_signal_handler_disconnect(handle->sim_proxy,
-                               handle->sim_property_handler);
+       element_cnt = g_slist_length(list);
+       cp_list = g_new0(char*, element_cnt + 1);
+       if (!cp_list) {
+               goto OUT;
+       }
+
+       for (l = list; l; l = l->next, i++) {
+               cp_list[i] = g_strdup(l->data);
+               g_free (l->data);
 
-               g_object_unref(handle->sim_proxy);
+               dbg("cp name[%d] = %s", i, cp_list[i]);
        }
+       cp_list[element_cnt] = NULL;
+
+       g_slist_free(list);
 
-       if (handle->network_proxy) {
-               if (handle->network_signal_handler > 0)
-                       g_signal_handler_disconnect(handle->network_proxy,
-                               handle->network_signal_handler);
+OUT:
+       if(d_conn)
+               g_object_unref(d_conn);
 
-               if (handle->network_property_handler > 0)
-                       g_signal_handler_disconnect(handle->network_proxy,
-                               handle->network_property_handler);
+       if (rst)
+               g_variant_unref(rst);
 
-               g_object_unref(handle->network_proxy);
+       return cp_list;
+}
+
+static char *get_property (TapiHandle *handle, const char *property,
+               const GVariantType *type)
+{
+       char **dbus_info;
+       GVariant *value = NULL;
+       GVariant *value_container = NULL;
+       GError *error = NULL;
+       char *data = NULL;
+
+       dbus_info = g_strsplit (property, ":", 2);
+       if (!dbus_info) {
+               dbg("invalid property");
+               return NULL ;
        }
 
+       if (!dbus_info[0] || !dbus_info[1]) {
+               dbg("invalid property");
+               goto OUT;
+       }
 
-       if (handle->call_proxy) {
-               if (handle->call_signal_handler > 0)
-                       g_signal_handler_disconnect(handle->call_proxy,
-                               handle->call_signal_handler);
+       value_container = g_dbus_connection_call_sync (handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path,
+                       "org.freedesktop.DBus.Properties", "Get",
+                       g_variant_new ("(ss)", dbus_info[0], dbus_info[1]),
+                       G_VARIANT_TYPE ("(v)"), G_DBUS_CALL_FLAGS_NONE,
+                       TAPI_DEFAULT_TIMEOUT, handle->ca, &error);
 
-               g_object_unref(handle->call_proxy);
+       if (error) {
+               if (error->code == G_DBUS_ERROR_ACCESS_DENIED) {
+                       warn("Access Denied");
+                       g_error_free(error);
+                       return g_strdup("No access rights");
+               } else {
+                       warn("dbus error = %d (%s)", error->code, error->message);
+                       g_error_free (error);
+               }
        }
 
-       if (handle->ss_proxy) {
-               if (handle->ss_signal_handler > 0)
-                       g_signal_handler_disconnect(handle->ss_proxy,
-                               handle->ss_signal_handler);
+       if (!value_container)
+               return NULL ;
+
+       g_variant_get (value_container, "(v)", &value);
+       g_variant_unref (value_container);
 
-               g_object_unref(handle->ss_proxy);
+       if (g_variant_is_of_type (value, G_VARIANT_TYPE_STRING )) {
+               data = g_try_malloc0 (g_variant_get_size (value));
+               if (!data) {
+                       warn ("calloc failed");
+                       g_variant_unref (value);
+                       goto OUT;
+               }
+               memcpy (data, g_variant_get_data (value), g_variant_get_size (value));
+       }
+       else if (g_variant_is_of_type (value, G_VARIANT_TYPE_BOOLEAN )) {
+               data = g_strdup_printf ("%d", *(guchar *) g_variant_get_data (value));
+       }
+       else {
+               data = g_strdup_printf ("%d", *(int *) g_variant_get_data (value));
        }
+       msg("prop:[%s][%s] - [%s]", handle->cp_name, dbus_info[1], data);
 
-       if (handle->sms_proxy) {
-               if (handle->sms_signal_handler > 0)
-                       g_signal_handler_disconnect(handle->sms_proxy,
-                               handle->sms_signal_handler);
+       g_variant_unref (value);
+
+OUT:
+       g_strfreev (dbus_info);
+
+       return data;
+}
+
+EXPORT_API int tel_get_property_int (TapiHandle *handle,
+               const char *property, int *result)
+{
+       char *data;
 
-               if (handle->sms_property_handler > 0)
-                       g_signal_handler_disconnect(handle->sms_proxy,
-                               handle->sms_property_handler);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_INPUT);
+       TAPI_RET_ERR_NUM_IF_FAIL(property, TAPI_API_INVALID_INPUT);
+       TAPI_RET_ERR_NUM_IF_FAIL(result, TAPI_API_INVALID_INPUT);
 
-               g_object_unref(handle->sms_proxy);
+       data = get_property (handle, property, G_VARIANT_TYPE_INT32);
+       if (!data) {
+               return TAPI_API_OPERATION_FAILED;
+       } else if (!g_strcmp0(data, "No access rights")) {
+               return TAPI_API_ACCESS_DENIED;
        }
 
-       if (handle->phonebook_proxy) {
-               if (handle->phonebook_signal_handler > 0)
-                       g_signal_handler_disconnect(handle->phonebook_proxy,
-                               handle->phonebook_signal_handler);
+       *result = atoi(data);
 
-               g_object_unref(handle->phonebook_proxy);
+       g_free (data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_property_string(TapiHandle *handle, const char *property, char **result)
+{
+       char *data;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_INPUT);
+       TAPI_RET_ERR_NUM_IF_FAIL(property, TAPI_API_INVALID_INPUT);
+       TAPI_RET_ERR_NUM_IF_FAIL(result, TAPI_API_INVALID_INPUT);
+
+       data = get_property (handle, property, G_VARIANT_TYPE_STRING);
+       if (!data) {
+               return TAPI_API_OPERATION_FAILED;
+       } else if (!g_strcmp0(data, "No access rights")) {
+               return TAPI_API_ACCESS_DENIED;
        }
 
-       if (handle->sat_proxy) {
-               if (handle->sat_signal_handler > 0)
-                       g_signal_handler_disconnect(handle->sat_proxy,
-                               handle->sat_signal_handler);
+       *result = data;
 
-               g_object_unref(handle->sat_proxy);
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API TapiHandle* tel_init(const char *cp_name)
+{
+       GError *error = NULL;
+       struct tapi_handle *handle;
+
+#if !GLIB_CHECK_VERSION(2, 35, 0)
+       g_type_init();
+#endif
+
+       handle = g_new0(struct tapi_handle, 1);
+       if (!handle) {
+               return NULL;
        }
 
-       if (handle->sap_proxy) {
-               if (handle->sap_signal_handler > 0)
-                       g_signal_handler_disconnect(handle->sap_proxy,
-                               handle->sap_signal_handler);
+       handle->dbus_connection = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error);
+       if (!handle->dbus_connection) {
+               err("Error creating dbus connection: %s\n", error->message);
+               g_free(handle);
+               g_error_free (error);
+               return NULL;
+       }
+
+       msg("tel_init: [%s]:[%s]:[%s]", g_dbus_connection_get_unique_name(
+                               handle->dbus_connection), program_invocation_name, cp_name?cp_name:"Null");
+
+       handle->ca = g_cancellable_new();
 
-               g_object_unref(handle->sap_proxy);
+       if (cp_name) {
+               handle->cp_name = g_strdup(cp_name);
        }
+       else {
+               char **list = NULL;
+               int i = 0;
+
+               list = tel_get_cp_name_list();
+               if (!list) {
+                       g_cancellable_cancel(handle->ca);
+                       g_object_unref(handle->ca);
+                       g_object_unref(handle->dbus_connection);
+                       g_free(handle);
+                       return NULL;
+               }
+
+               if (!list[0]) {
+                       g_cancellable_cancel(handle->ca);
+                       g_object_unref(handle->ca);
+                       g_object_unref(handle->dbus_connection);
+                       g_free(handle);
+                       g_free (list);
+                       return NULL;
+               }
+
+               handle->cp_name = g_strdup(list[0]);
 
-       if (handle->gps_proxy) {
-               if (handle->gps_signal_handler > 0)
-                       g_signal_handler_disconnect(handle->gps_proxy,
-                               handle->gps_signal_handler);
+               /* Free the list of CP names */
+               while (list[i] != NULL) {
+                       g_free(list[i++]);
+               }
 
-               g_object_unref(handle->gps_proxy);
+               g_free (list);
        }
 
-       if (handle->evt_table)
-               g_hash_table_destroy(handle->evt_table);
+       handle->evt_list = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
+       handle->cache_property = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
+
+       handle->path = g_strdup_printf("%s/%s",
+                       DBUS_TELEPHONY_DEFAULT_PATH, handle->cp_name);
+
+       return handle;
+}
+
+static gboolean _unregister_noti(gpointer key, gpointer value, gpointer user_data)
+{
+       struct tapi_evt_cb *evt_cb_data = value;
+       TapiHandle *handle = user_data;
+
+       g_dbus_connection_signal_unsubscribe(handle->dbus_connection, evt_cb_data->evt_id);
+
+       return TRUE;
+}
 
-       g_free(handle->cp_name);
+EXPORT_API int tel_deinit(TapiHandle* handle)
+{
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_INPUT);
+
+       if (handle->cp_name)
+               g_free(handle->cp_name);
+
+       if (handle->path)
+               g_free(handle->path);
+
+       g_dbus_connection_signal_unsubscribe(handle->dbus_connection, handle->prop_callback_evt_id);
+       g_hash_table_foreach_remove(handle->evt_list, _unregister_noti, handle);
+       g_hash_table_destroy(handle->evt_list);
+       g_hash_table_destroy(handle->cache_property);
+
+       g_cancellable_cancel(handle->ca);
+       g_object_unref(handle->ca);
+
+       g_object_unref (handle->dbus_connection);
+
+       memset(handle, 0, sizeof(struct tapi_handle));
        g_free(handle);
 
-       return TEL_RETURN_SUCCESS;
+       msg("tel_deinit done");
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_register_noti_event (TapiHandle *handle, const char *noti_id,
+               tapi_notification_cb callback, void *user_data)
+{
+       gchar **dbus_str = NULL;
+       gpointer tmp = NULL;
+       struct tapi_evt_cb *evt_cb_data = NULL;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_INPUT);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle->dbus_connection, TAPI_API_INVALID_INPUT);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_INPUT);
+       TAPI_RET_ERR_NUM_IF_FAIL(noti_id, TAPI_API_INVALID_INPUT);
+
+       tmp = g_hash_table_lookup (handle->evt_list, noti_id);
+       if (tmp != NULL ) {
+               dbg("noti_id(%s) is already registered", noti_id);
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       dbus_str = g_strsplit (noti_id, ":", 2);
+       if (!dbus_str) {
+               dbg("invalid noti_id");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       if (!dbus_str[0] || !dbus_str[1]) {
+               g_strfreev (dbus_str);
+               dbg("invalid noti_id");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       evt_cb_data = g_new0(struct tapi_evt_cb, 1);
+       evt_cb_data->cb_fn = callback;
+       evt_cb_data->user_data = user_data;
+
+       dbg("[%s] signal (%s)", handle->cp_name, dbus_str[1]);
+
+       if (dbus_str[1][0] >= 'a' && dbus_str[1][0] <= 'z') {
+               /* Property change callback - only one time */
+               if (handle->prop_callback_evt_id == 0) {
+                       handle->prop_callback_evt_id = g_dbus_connection_signal_subscribe (
+                                       handle->dbus_connection, DBUS_TELEPHONY_SERVICE, /* Sender */
+                                       "org.freedesktop.DBus.Properties", /* Interface */
+                                       "PropertiesChanged", /* Member */
+                                       handle->path, /* Object path */
+                                       NULL, /* arg0 */
+                                       G_DBUS_SIGNAL_FLAGS_NONE, on_prop_callback, handle, NULL );
+               }
+       }
+       else {
+               /* Signal callback */
+               evt_cb_data->evt_id = g_dbus_connection_signal_subscribe (
+                               handle->dbus_connection, DBUS_TELEPHONY_SERVICE, /* Sender */
+                               dbus_str[0], /* Interface */
+                               dbus_str[1], /* Member */
+                               handle->path, /* Object path */
+                               NULL, /* arg0 */
+                               G_DBUS_SIGNAL_FLAGS_NONE, on_signal_callback, handle, NULL );
+
+       }
+
+       g_hash_table_insert (handle->evt_list, g_strdup (noti_id), evt_cb_data);
+
+       g_strfreev (dbus_str);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_deregister_noti_event (TapiHandle *handle,
+               const char *noti_id)
+{
+       struct tapi_evt_cb *evt_cb_data = NULL;
+       gboolean rv = FALSE;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_INPUT);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle->dbus_connection, TAPI_API_INVALID_INPUT);
+
+       evt_cb_data = g_hash_table_lookup (handle->evt_list, noti_id);
+       if (!evt_cb_data) {
+               dbg("event does not registered");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       g_dbus_connection_signal_unsubscribe (handle->dbus_connection,
+                       evt_cb_data->evt_id);
+
+       rv = g_hash_table_remove (handle->evt_list, noti_id);
+       if (!rv) {
+               dbg("fail to deregister noti event(%s)", noti_id);
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       return TAPI_API_SUCCESS;
 }
+/*     EOF     */
diff --git a/src/tapi_event.c b/src/tapi_event.c
deleted file mode 100644 (file)
index 58500ff..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * libtapi
- *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "tapi_private.h"
-#include "tapi_events.h"
-
-EXPORT_API TelReturn tapi_register_event_id(TelHandle *handle,
-                                               const char *evt_id,
-                                               TapiEvtCb callback,
-                                               void *user_data)
-{
-       TapiEvtCbData *evt_cb_data;
-       gchar **dbus_str;
-
-       if (handle == NULL || callback == NULL || evt_id == NULL) {
-               err("Invalid input parameters");
-               return TEL_RETURN_INVALID_PARAMETER;
-       }
-
-       dbus_str = g_strsplit(evt_id, ":", 2);
-       if (!dbus_str) {
-               dbg("invalid evt_id");
-               return TEL_RETURN_INVALID_PARAMETER;
-       }
-
-       if (!dbus_str[0] || !dbus_str[1]) {
-               g_strfreev(dbus_str);
-               dbg("invalid evt_id");
-               return TEL_RETURN_INVALID_PARAMETER;
-       }
-
-       evt_cb_data = g_hash_table_lookup(handle->evt_table, evt_id);
-       if (evt_cb_data != NULL) {
-               dbg("evt_id(%s) is already registered", evt_id);
-               g_strfreev(dbus_str);
-               return TEL_RETURN_INVALID_PARAMETER;
-       }
-
-       MAKE_EVT_CB_DATA(evt_cb_data, callback, user_data);
-
-       dbg("path(%s) interface (%s) signal (%s)", handle->cp_name, dbus_str[0], dbus_str[1]);
-
-       g_hash_table_insert(handle->evt_table, g_strdup(evt_id), evt_cb_data);
-
-       g_strfreev(dbus_str);
-
-       return TEL_RETURN_SUCCESS;
-}
-
-EXPORT_API TelReturn tapi_deregister_event_id(TelHandle *handle, const char *evt_id)
-{
-       gboolean rv = FALSE;
-
-       if (handle == NULL) {
-               err("invalid parameter");
-               return TEL_RETURN_INVALID_PARAMETER;
-       }
-
-       rv = g_hash_table_remove(handle->evt_table, evt_id);
-       if (!rv) {
-               err("fail to deregister noti event(%s)", evt_id);
-               return TEL_RETURN_FAILURE;
-       }
-
-       return TEL_RETURN_SUCCESS;
-}
diff --git a/src/tapi_gps.c b/src/tapi_gps.c
deleted file mode 100644 (file)
index e512edc..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * libtapi
- *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "tapi_log.h"
-#include "tapi.h"
-#include "tapi_private.h"
-
-#include "tapi_gps.h"
-
-void on_gps_signal_emit_handler(TelephonyGps *gps, gchar *sender_name,
-                                                       gchar *signal_name, GVariant *parameters,
-                                                       gpointer user_data)
-{
-       TapiEvtCbData *evt_cb_data = NULL;
-       TelHandle *handle = user_data;
-       char *evt_id = NULL;
-
-       dbg("Entry");
-
-       if (handle == NULL)
-               return;
-
-       evt_id = g_strdup_printf("%s:%s", TELEPHONY_GPS_INTERFACE,
-                                       signal_name);
-
-       evt_cb_data = g_hash_table_lookup(handle->evt_table, evt_id);
-       if (evt_cb_data == NULL) {
-               g_free(evt_id);
-               return;
-       }
-
-       if (!g_strcmp0(signal_name, "AssistData")
-               || !g_strcmp0(signal_name, "MeasurePosition")) {
-               TelGpsDataInfo gps_data = {0, };
-               char *data = NULL;
-
-               g_variant_get(parameters, "(s)", &data);
-
-               /* Decode data */
-               gps_data.data = g_base64_decode(data, &gps_data.data_len);
-               dbg("signal[%s] data_len[%s]", signal_name, gps_data.data_len);
-
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &gps_data);
-
-               g_free(data);
-               g_free(gps_data.data);
-       } else if (!g_strcmp0(signal_name, "ResetAssistData")) {
-               dbg("signal[%s]", signal_name);
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, NULL);
-       } else {
-               err("Unhandled signal [%s]", signal_name);
-       }
-
-       g_free(evt_id);
-}
-
-EXPORT_API TelReturn tapi_gps_confirm_measure_pos(TelHandle *handle,
-                       TelGpsDataInfo *gps_data)
-{
-       TelGpsResult result;
-       GError *error = NULL;
-       gchar *encoded_data = NULL;
-
-       dbg("Entry");
-
-       g_return_val_if_fail(handle != NULL && gps_data != NULL,
-                       TEL_RETURN_INVALID_PARAMETER);
-
-       encoded_data = g_base64_encode((const guchar *)gps_data->data, gps_data->data_len);
-
-       telephony_gps_call_confirm_measure_pos_sync(handle->gps_proxy, encoded_data,
-                       (int *)&result, NULL, &error);
-
-       g_free(encoded_data);
-
-       if (error != NULL) {
-               err("dbus error: %d (%s)", error->code, error->message);
-               g_error_free(error);
-               return TEL_RETURN_FAILURE;
-       }
-
-       if (result != TEL_GPS_RESULT_SUCCESS) {
-               err("confirm gps measure pos fail: %d", result);
-               return TEL_RETURN_FAILURE;
-       }
-
-       return TEL_RETURN_SUCCESS;
-}
-
-static void on_response_gps_set_frequency_aiding(GObject *source_object,
-                       GAsyncResult *res, gpointer user_data)
-{
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelGpsResult result = TEL_GPS_RESULT_FAILURE;
-       GError *error = NULL;
-
-       dbg("Entry");
-
-       telephony_gps_call_set_frequency_aiding_finish(handle->gps_proxy,
-                       (int *)&result, res, &error);
-
-       CHECK_DEINIT(error, rsp_cb_data, result);
-
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-}
-
-EXPORT_API TelReturn tapi_gps_set_frequency_aiding(TelHandle *handle,
-                       gboolean state,
-                       TapiResponseCb callback, void *user_data)
-{
-       TapiRespCbData *rsp_cb_data;
-
-       dbg("Entry");
-
-       g_return_val_if_fail(handle != NULL && callback != NULL,
-                       TEL_RETURN_INVALID_PARAMETER);
-
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
-
-       telephony_gps_call_set_frequency_aiding(handle->gps_proxy, state, NULL,
-                       on_response_gps_set_frequency_aiding, rsp_cb_data);
-
-       return TEL_RETURN_SUCCESS;
-}
diff --git a/src/tapi_log.h b/src/tapi_log.h
new file mode 100644 (file)
index 0000000..158d2ac
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TAPI_LOG_H__
+#define __TAPI_LOG_H__
+
+__BEGIN_DECLS
+
+#ifdef FEATURE_DLOG_DEBUG
+
+#include <dlog.h>
+
+#ifndef TAPI_LOG_TAG
+#define TAPI_LOG_TAG "LIBTAPI"
+#endif
+
+#define msg(fmt,args...)  { RLOG(LOG_INFO, TAPI_LOG_TAG, fmt "\n", ##args); }
+#define dbg(fmt,args...)  { RLOG(LOG_DEBUG, TAPI_LOG_TAG, fmt "\n", ##args); }
+#define warn(fmt,args...)  { RLOG(LOG_WARN, TAPI_LOG_TAG, fmt "\n", ##args); }
+#define err(fmt,args...)  { RLOG(LOG_ERROR, TAPI_LOG_TAG, fmt "\n", ##args); }
+#define fatal(fmt,args...)  { RLOG(LOG_FATAL, TAPI_LOG_TAG, fmt "\n", ##args); }
+
+#define smsg(fmt,args...)  { SECURE_RLOG(LOG_INFO, TAPI_LOG_TAG, fmt "\n", ##args); }
+#define sdbg(fmt,args...)  { SECURE_RLOG(LOG_DEBUG, TAPI_LOG_TAG, fmt "\n", ##args); }
+#define swarn(fmt,args...)  { SECURE_RLOG(LOG_WARN, TAPI_LOG_TAG, fmt "\n", ##args); }
+#define serr(fmt,args...)  { SECURE_RLOG(LOG_ERROR, TAPI_LOG_TAG, fmt "\n", ##args); }
+#define sfatal(fmt,args...)  { SECURE_RLOG(LOG_FATAL, TAPI_LOG_TAG, fmt "\n", ##args); }
+
+#else
+
+#define msg(fmt,args...)
+#define dbg(fmt,args...)
+#define warn(fmt,args...)
+#define err(fmt,args...)
+#define fatal(fmt,args...)
+
+#define smsg(fmt,args...)
+#define sdbg(fmt,args...)
+#define swarn(fmt,args...)
+#define serr(fmt,args...)
+#define sfatal(fmt,args...)
+
+#endif
+
+__END_DECLS
+
+#endif
index 54f3568f4b6dbc305713e4556880fdf5bfa7ce2c..734cf05c1a5df66a692f116b44ff80b5c4ac7565 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
-#include "tapi_private.h"
-#include "tapi.h"
-#include "tapi_modem.h"
-
-#include <tel_modem.h>
+#include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
-static gboolean __tapi_check_power_status(TelModemPowerStatus status)
+#include "tapi_common.h"
+#include "TapiUtility.h"
+
+#include "TelMisc.h"
+#include "TelPower.h"
+#include "ITapiModem.h"
+
+#include "common.h"
+#include "tapi_log.h"
+
+static void on_response_default_set(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       switch (status) {
-       case TEL_MODEM_POWER_OFF:
-       case TEL_MODEM_POWER_ON:
-       case TEL_MODEM_POWER_ERROR:
-               return TRUE;
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+
+       GVariant *dbus_result;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
+
+       g_variant_get (dbus_result, "(i)", &result);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
        }
 
-       return FALSE;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-void on_modem_property_change_handler(TelephonyModem *modem,
-       GVariant *changed_properties, const gchar *invalidated_properties,
-       gpointer user_data)
+static void on_response_get_version(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiEvtCbData *evt_cb_data;
-       TelHandle *handle = user_data;
-       GVariantIter *iter;
-       const gchar *key;
-       GVariant *value;
-
-       if (handle == NULL)
-               return;
-
-       if (g_variant_n_children(changed_properties) == 0)
-               return;
-
-       dbg("Properties Changed:");
-
-       g_variant_get(changed_properties, "a{sv}", &iter);
-       while (g_variant_iter_loop(iter, "{sv}", &key, &value)) {
-               char *evt_id;
-
-               dbg("%s", key);
-
-               evt_id = g_strdup_printf("%s:%s",
-                                       TELEPHONY_MODEM_INTERFACE,
-                                       key);
-               /*
-                * If an event callback is registered process
-                * g-properties-changed event
-                */
-               evt_cb_data = g_hash_table_lookup(handle->evt_table,
-                                                       evt_id);
-               if (!evt_cb_data) {
-                       dbg("Application not registered on event %s",
-                                                       evt_id);
-                       g_free(evt_id);
-                       continue;
-               }
-
-               if (g_strcmp0("status", key) == 0) {
-                       TelModemPowerStatus status = g_variant_get_int32(value);
-                       dbg("value: %d", status);
-                       EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id,
-                                               &status);
-               } else if (g_strcmp0("flight_mode_status", key) == 0) {
-                       int fm = g_variant_get_int32(value);
-                       gboolean enable;
-
-                       switch (fm) {
-                       case TEL_MODEM_FLIGHT_MODE_ON:
-                               enable = TRUE;
-                               break;
-                       case TEL_MODEM_FLIGHT_MODE_OFF:
-                               enable = FALSE;
-                               break;
-                       case TEL_MODEM_FLIGHT_MODE_UNKNOWN:
-                       default:
-                               err("flight mode status error");
-                               continue;
-                       }
-                       dbg("value: %d", enable);
-                       EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id,
-                                               &enable);
-
-               } else if (g_strcmp0("imei", key) == 0) {
-                       char *imei = (char *)g_variant_get_string(value, NULL);
-
-                       if (imei)
-                               if (strlen(imei) > TEL_MODEM_IMEI_LENGTH_MAX) {
-                                       err("Invalid IMEI length");
-                                       return;
-                               }
-
-                       dbg("value: %s", imei);
-                       EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, imei);
-
-               } else if (g_strcmp0("version", key) == 0) {
-                       TelModemVersion version = {{'\0'}, {'\0'}, {'\0'}, {'\0'}};
-                       GVariantIter *iter = NULL;
-                       GVariant *key_value;
-                       const gchar *key;
-
-                       g_variant_get(value, "a{sv}", &iter);
-                       while (g_variant_iter_loop(iter, "{sv}", &key, &key_value)) {
-                               if (g_strcmp0(key, "software_version") == 0) {
-                                       g_strlcpy(version.software_version,
-                                               g_variant_get_string(key_value, NULL),
-                                               TEL_MODEM_VERSION_LENGTH_MAX);
-                               }
-
-                               if (g_strcmp0(key, "hardware_version") == 0) {
-                                       g_strlcpy(version.hardware_version,
-                                               g_variant_get_string(key_value, NULL),
-                                               TEL_MODEM_VERSION_LENGTH_MAX);
-                               }
-
-                               if (g_strcmp0(key, "calibration_date") == 0) {
-                                       g_strlcpy(version.calibration_date,
-                                               g_variant_get_string(key_value, NULL),
-                                               TEL_MODEM_VERSION_LENGTH_MAX);
-                               }
-
-                               if (g_strcmp0(key, "product_code") == 0) {
-                                       g_strlcpy(version.product_code,
-                                               g_variant_get_string(key_value, NULL),
-                                               TEL_MODEM_VERSION_LENGTH_MAX);
-                               }
-                       }
-                       g_variant_iter_free(iter);
-
-                       EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id,
-                                               &version);
-               }
-
-               g_variant_iter_free(iter);
-               g_free(evt_id);
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       TelMiscVersionInformation data;
+       char *sw = NULL, *hw = NULL, *rf = NULL, *product = NULL, *prl = NULL, *eri = NULL;
+
+       GVariant *dbus_result;
+
+       memset(&data, 0, sizeof(TelMiscVersionInformation));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
+
+
+       g_variant_get (dbus_result, "(issssss)", &result,
+                       &sw, &hw, &rf, &product, &prl, &eri);
+
+       dbg("product code [%s]", product);
+
+       g_strlcpy((gchar *)data.szSwVersion, sw, MAX_VERSION_LEN);
+       g_strlcpy((gchar *)data.szHwVersion, hw, MAX_VERSION_LEN);
+       g_strlcpy((gchar *)data.szRfCalDate, rf, MAX_VERSION_LEN);
+       g_strlcpy((gchar *)data.szProductCode, product, TAPI_MISC_PRODUCT_CODE_LEN_MAX);
+       g_strlcpy((gchar *)data.szPrlVersion, prl, TAPI_MISC_PRL_ERI_VER_LEN_MAX);
+       g_strlcpy((gchar *)data.szEriVersion, eri, TAPI_MISC_PRL_ERI_VER_LEN_MAX);
+
+       g_free(sw);
+       g_free(hw);
+       g_free(rf);
+       g_free(product);
+       g_free(prl);
+       g_free(eri);
+
+       if (evt_cb_data->cb_fn) {
+               if (result != 0)
+                       evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
+               else
+                       evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
        }
-}
 
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
+}
 
-static void on_response_modem_set_power_status(GObject *source_object,
-                                               GAsyncResult *res,
-                                               gpointer user_data)
+static void on_response_get_serial_number(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       int result = TEL_MODEM_RESULT_FAILURE;
        GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       TelMiscSNInformation data;
+       char *sn = NULL, *meid = NULL, *imei = NULL, *imeisv = NULL;
 
-       telephony_modem_call_set_power_status_finish(handle->modem_proxy,
-                                               &result, res, &error);
+       GVariant *dbus_result;
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       if (result != TEL_MODEM_RESULT_SUCCESS)
-               err("Failed to set modem power status - result: [%d]", result);
-       else
-               dbg("set modem power status: [SUCCESS]");
+       g_variant_get (dbus_result, "(issss)", &result,
+                       &sn, &meid, &imei, &imeisv);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       g_strlcpy((gchar *)data.szEsn, sn, TAPI_MISC_ME_SN_LEN_MAX);
+       g_strlcpy((gchar *)data.szMeid, meid, TAPI_MISC_ME_SN_LEN_MAX);
+       g_strlcpy((gchar *)data.szImei, imei, TAPI_MISC_ME_SN_LEN_MAX);
+       g_strlcpy((gchar *)data.szImeiSv, imeisv, TAPI_MISC_ME_SN_LEN_MAX);
+
+
+       g_free(sn);
+       g_free(meid);
+       g_free(imei);
+       g_free(imeisv);
+
+       if (evt_cb_data->cb_fn) {
+               if (result != 0)
+                       evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
+               else
+                       evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
+       }
+
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-/* Set modem power status to ON OFF or RESET */
-EXPORT_API TelReturn tapi_modem_set_power_status(TelHandle *handle,
-                                               TelModemPowerStatus status,
-                                               TapiResponseCb callback,
-                                               void *user_data)
+static void on_response_get_imei(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       char *imei = NULL;
 
-       dbg("Entry");
+       GVariant *dbus_result;
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && __tapi_check_power_status(status)
-                               && callback, TEL_RETURN_INVALID_PARAMETER);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       g_variant_get (dbus_result, "(is)", &result, &imei);
 
-       telephony_modem_call_set_power_status(handle->modem_proxy, status,
-                                       NULL,
-                                       on_response_modem_set_power_status,
-                                       rsp_cb_data);
+       if (evt_cb_data->cb_fn) {
+               if (result != 0)
+                       evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
+               else
+                       evt_cb_data->cb_fn(evt_cb_data->handle, result, imei, evt_cb_data->user_data);
+       }
+       g_free(imei);
 
-       return TEL_RETURN_SUCCESS;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_modem_set_flight_mode(GObject *source_object,
-                                               GAsyncResult *res,
-                                               gpointer user_data)
+static void on_response_get_flight_mode(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       int result = TEL_MODEM_RESULT_FAILURE;
        GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       gboolean mode = FALSE;
 
-       telephony_modem_call_set_flight_mode_finish(handle->modem_proxy,
-                                                       &result, res, &error);
+       GVariant *dbus_result;
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       if (result != TEL_MODEM_RESULT_SUCCESS)
-               err("Failed to set modem flight mode - result: [%d]", result);
-       else
-               dbg("set modem flight mode: [SUCCESS]");
+       g_variant_get (dbus_result, "(bi)", &mode, &result);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &mode, evt_cb_data->user_data);
+       }
+
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_modem_set_flight_mode(TelHandle *handle,
-                                               gboolean enable,
-                                               TapiResponseCb callback,
-                                               void *user_data)
+/**
+ *
+ * Turn Off or Turn On the Modem.
+ *
+ * @param[in]  tapi_power_phone_cmd_t  Turn ON or OFF.
+ * @param[out] NONE
+ * @return             TapiResult_t API result code. Either Success or some Error Code.
+ * @exception  In case of exceptions return value contains appropriate error code.
+ * @remarks            None.
+ * @see                        tapi_power_phone_cmd_t, TapiResult_t.
+ */
+EXPORT_API int tel_process_power_command(TapiHandle *handle, tapi_power_phone_cmd_t cmd, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       dbg("Entry");
+       msg("[%s] tel_process_power_command:[%d] (0:ON,1:OFF,2:RST,3:LOW)", handle->cp_name, cmd);
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback,
-                                       TEL_RETURN_INVALID_PARAMETER);
+       if (cmd > TAPI_PHONE_POWER_MAX)
+               return TAPI_API_INVALID_INPUT;
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       param = g_variant_new("(i)", cmd);
 
-       telephony_modem_call_set_flight_mode(handle->modem_proxy, enable,
-                                       NULL,
-                                       on_response_modem_set_flight_mode,
-                                       rsp_cb_data);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_MODEM_INTERFACE,
+                       "SetPower", param, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_default_set, evt_cb_data);
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_modem_get_flight_mode(TelHandle *handle,
-                                               gboolean *enable)
+/**
+ *
+ * Enter in to or Leave from Flight Mode.
+ *
+ * @param[in]  Enable (if 1, Enable and if 0, Disable)
+ * @param[out] NONE
+ * @return             TapiResult_t API result code. Either Success or some Error Code.
+ * @exception  In case of exceptions return value contains appropriate error code.
+ * @remarks            None
+ * @see                        None.
+ */
+EXPORT_API int tel_set_flight_mode(TapiHandle *handle, tapi_power_flight_mode_type_t mode, tapi_response_cb callback, void *user_data)
 {
-       int flight_mode_status;
-       GError *error = NULL;
-       TelReturn result = TEL_RETURN_SUCCESS;
-       int modem_res;
-
-       dbg("Entry");
-
-       TEL_RETURN_IF_CHECK_FAIL(handle, TEL_RETURN_INVALID_PARAMETER);
-
-       flight_mode_status =
-               telephony_modem_get_flight_mode_status(handle->modem_proxy);
-
-       switch (flight_mode_status) {
-       case TEL_MODEM_FLIGHT_MODE_ON:
-               *enable = TRUE;
-               goto out;
-       case TEL_MODEM_FLIGHT_MODE_OFF:
-               *enable = FALSE;
-               goto out;
-       case TEL_MODEM_FLIGHT_MODE_UNKNOWN:
-               /*
-                * Need to read state from modem directly to update DBus cached
-                * property.
-                */
-               break;
-       default:
-               err("flight mode status error");
-               result = TEL_RETURN_FAILURE;
-               goto out;
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+       gboolean b_mode;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       msg("[%s] requested flight mode:[%d] (1:enter, 2:leave)", handle->cp_name, mode);
+
+       if (mode == TAPI_POWER_FLIGHT_MODE_ENTER) {
+               b_mode = TRUE;
+       }
+       else if (mode == TAPI_POWER_FLIGHT_MODE_LEAVE) {
+               b_mode = FALSE;
        }
+       else {
+               return TAPI_API_INVALID_INPUT;
+       };
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(b)", b_mode);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_MODEM_INTERFACE,
+                       "SetFlightMode", param, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, 180000, handle->ca,
+                       on_response_default_set, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_flight_mode(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+
+       dbg("Func Entrance");
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_PTR);
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_MODEM_INTERFACE,
+                       "GetFlightMode", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_get_flight_mode, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_misc_me_version(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+
+       dbg("Func Entrance");
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_PTR);
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_MODEM_INTERFACE,
+                       "GetVersion", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_get_version, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API TelMiscVersionInformation *tel_get_misc_me_version_sync(TapiHandle *handle)
+{
+       GVariant *dbus_result;
+       GError *error = NULL;
+       int result = -1;
+       TelMiscVersionInformation *data = NULL;
+       char *sw = NULL, *hw = NULL, *rf = NULL, *product = NULL, *prl = NULL, *eri = NULL;
+
+       dbg("Func Entrance");
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, NULL);
+
+       dbus_result = g_dbus_connection_call_sync(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_MODEM_INTERFACE,
+                       "GetVersion", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_SHORT_TIMEOUT, handle->ca, &error);
 
-       telephony_modem_call_get_flight_mode_sync(handle->modem_proxy,
-                                                       &modem_res, enable,
-                                                       NULL, &error);
        if (error) {
-               dbg("dbus error = %d (%s)", error->code, error->message);
+               warn("dbus error = %d (%s)", error->code, error->message);
                g_error_free(error);
-               result = TEL_RETURN_FAILURE;
-               goto out;
        }
 
-       if (modem_res != TEL_MODEM_RESULT_SUCCESS)
-               result = TEL_RETURN_FAILURE;
+       if (!dbus_result)
+               return NULL;
 
-out:
-       return result;
+       g_variant_get (dbus_result, "(issssss)", &result,
+                       &sw, &hw, &rf, &product, &prl, &eri);
+       g_variant_unref(dbus_result);
+
+       if (result != 0)
+               goto OUT;
+
+       dbg("product code[%s]", product);
+
+       data = calloc(1, sizeof(TelMiscVersionInformation));
+       if (!data)
+               goto OUT;
+
+       g_strlcpy((gchar *)data->szSwVersion, sw, MAX_VERSION_LEN);
+       g_strlcpy((gchar *)data->szHwVersion, hw, MAX_VERSION_LEN);
+       g_strlcpy((gchar *)data->szRfCalDate, rf, MAX_VERSION_LEN);
+       g_strlcpy((gchar *)data->szProductCode, product, TAPI_MISC_PRODUCT_CODE_LEN_MAX);
+       g_strlcpy((gchar *)data->szPrlVersion, prl, TAPI_MISC_PRL_ERI_VER_LEN_MAX);
+       g_strlcpy((gchar *)data->szEriVersion, eri, TAPI_MISC_PRL_ERI_VER_LEN_MAX);
+
+OUT:
+       g_free(sw);
+       g_free(hw);
+       g_free(rf);
+       g_free(product);
+       g_free(prl);
+       g_free(eri);
+
+       return data;
 }
 
-EXPORT_API TelReturn tapi_modem_get_version(TelHandle *handle,
-                                               TelModemVersion *version)
+EXPORT_API int tel_get_misc_me_imei(TapiHandle *handle, tapi_response_cb callback, void *user_data)
 {
-       GVariant *dbus_version;
-       TelReturn result = TEL_RETURN_SUCCESS;
-
-       dbg("Entry");
-
-       TEL_RETURN_IF_CHECK_FAIL(handle, TEL_RETURN_INVALID_PARAMETER);
-
-       /* dbus_version doesn't need to be g_variant_unref() */
-       dbus_version = telephony_modem_get_version(handle->modem_proxy);
-       if (dbus_version != NULL) {
-               GVariantIter *iter = NULL;
-               GVariant *key_value;
-               const gchar *key;
-
-               g_variant_get(dbus_version, "a{sv}", &iter);
-               while (g_variant_iter_loop(iter, "{sv}", &key, &key_value)) {
-                       if (g_strcmp0(key, "software_version") == 0) {
-                               g_strlcpy(version->software_version,
-                                       g_variant_get_string(key_value, NULL),
-                                       TEL_MODEM_VERSION_LENGTH_MAX + 1);
-                       }
-                       else if (g_strcmp0(key, "hardware_version") == 0) {
-                               g_strlcpy(version->hardware_version,
-                                       g_variant_get_string(key_value, NULL),
-                                       TEL_MODEM_VERSION_LENGTH_MAX + 1);
-                       }
-                       else if (g_strcmp0(key, "calibration_date") == 0) {
-                               g_strlcpy(version->calibration_date,
-                                       g_variant_get_string(key_value, NULL),
-                                       TEL_MODEM_VERSION_LENGTH_MAX + 1);
-                       }
-                       else if (g_strcmp0(key, "product_code") == 0) {
-                               g_strlcpy(version->product_code,
-                                       g_variant_get_string(key_value, NULL),
-                                       TEL_MODEM_VERSION_LENGTH_MAX + 1);
-                       }
-               }
-               g_variant_iter_free(iter);
-
-               if (strlen(version->software_version)
-                               || strlen(version->hardware_version)
-                               || strlen(version->calibration_date)
-                               || strlen(version->product_code)) {
-                       dbg("Version information - Software: [%s] "\
-                               "Hardware: [%s] Calibration date: [%d] "\
-                               "Product code: [%s]", version->software_version,
-                               version->hardware_version,
-                               version->calibration_date,
-                               version->product_code);
-                       return result;
-               }
-       }
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-       /* Fetch version information from Modem */
-       {
-               gchar *soft, *hard, *cal_date, *prod_code;
-               gint modem_res;
-               GError *error = NULL;
-
-               telephony_modem_call_get_version_sync(handle->modem_proxy,
-                       &modem_res, &soft, &hard, &cal_date, &prod_code, NULL, &error);
-               if (error) {
-                       dbg("dbus error = %d (%s)", error->code, error->message);
-                       g_error_free(error);
-                       result = TEL_RETURN_FAILURE;
-                       goto out;
-               }
-
-               if (modem_res != TEL_MODEM_RESULT_SUCCESS) {
-                       result = TEL_RETURN_FAILURE;
-                       goto out;
-               }
-
-               if (soft) {
-                       strncpy(version->software_version, soft,
-                               TEL_MODEM_VERSION_LENGTH_MAX);
-                       version->software_version[TEL_MODEM_VERSION_LENGTH_MAX] = '\0';
-               }
-
-               if (hard) {
-                       strncpy(version->hardware_version, hard,
-                               TEL_MODEM_VERSION_LENGTH_MAX);
-                       version->hardware_version[TEL_MODEM_VERSION_LENGTH_MAX] = '\0';
-               }
-
-               if (cal_date) {
-                       strncpy(version->calibration_date, cal_date,
-                               TEL_MODEM_VERSION_LENGTH_MAX);
-                       version->calibration_date[TEL_MODEM_VERSION_LENGTH_MAX] = '\0';
-               }
-
-               if (prod_code) {
-                       strncpy(version->product_code, prod_code,
-                               TEL_MODEM_VERSION_LENGTH_MAX);
-                       version->product_code[TEL_MODEM_VERSION_LENGTH_MAX] = '\0';
-               }
-
-               g_free(soft);
-               g_free(hard);
-               g_free(cal_date);
-               g_free(prod_code);
-       }
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_PTR);
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       sdbg("[%s] Func Entrance", handle->cp_name);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_MODEM_INTERFACE,
+                       "GetIMEI", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_get_imei, evt_cb_data);
 
-out:
-       return result;
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_modem_get_imei(TelHandle *handle,
-                               char imei[TEL_MODEM_IMEI_LENGTH_MAX + 1])
+EXPORT_API char *tel_get_misc_me_imei_sync(TapiHandle *handle)
 {
+       GVariant *dbus_result;
        GError *error = NULL;
-       char *dbus_imei;
-       TelReturn result = TEL_RETURN_FAILURE;
-       int modem_res;
-       unsigned int imei_len;
-
-       dbg("Entry");
-
-       TEL_RETURN_IF_CHECK_FAIL(handle, TEL_RETURN_INVALID_PARAMETER);
-
-       /* dbus_imei doesn't need to be g_free() */
-       dbus_imei= (char *)telephony_modem_get_imei(handle->modem_proxy);
-       if (dbus_imei != NULL && strlen(dbus_imei) > 0) {
-               imei_len = strlen(dbus_imei);
-               if (imei_len > TEL_MODEM_IMEI_LENGTH_MAX)
-                       err("Invalid IMEI length %d", imei_len);
-               else {
-                       memcpy(imei, dbus_imei, imei_len + 1);
-                       result = TEL_RETURN_SUCCESS;
-               }
-
-               goto out;
-       }
+       char *imei = NULL;
+       int result = 0;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, NULL);
+
+       sdbg("[%s] Func Entrance", handle->cp_name);
+
+       dbus_result = g_dbus_connection_call_sync(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_MODEM_INTERFACE,
+                       "GetIMEI", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_SHORT_TIMEOUT, handle->ca, &error);
 
-       /*
-        * dbus_imei needs to be g_free() because this function is using
-        * g_variant_get() internally.
-        */
-       telephony_modem_call_get_imei_sync(handle->modem_proxy, &modem_res,
-                                               &dbus_imei, NULL, &error);
        if (error) {
-               dbg("dbus error = %d (%s)", error->code, error->message);
+               warn("dbus error = %d (%s)", error->code, error->message);
                g_error_free(error);
-               goto out;
        }
 
-       if (modem_res != TEL_MODEM_RESULT_SUCCESS || dbus_imei == NULL)
-               goto out;
+       if (!dbus_result)
+               return NULL;
 
-       imei_len = strlen(dbus_imei);
-       if (imei_len > TEL_MODEM_IMEI_LENGTH_MAX)
-               err("Invalid IMEI length %d", imei_len);
-       else {
-               memcpy(imei, dbus_imei, imei_len + 1);
-               result = TEL_RETURN_SUCCESS;
-       }
+       g_variant_get (dbus_result, "(is)", &result, &imei);
+       g_variant_unref(dbus_result);
 
-       g_free(dbus_imei);
+       if (result != 0) {
+               g_free(imei);
+               return NULL;
+       }
 
-out:
-       return result;
+       return imei;
 }
 
+EXPORT_API int tel_get_misc_me_sn(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_PTR);
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-EXPORT_API TelReturn tapi_modem_get_power_status(TelHandle *handle,
-                                               TelModemPowerStatus *status)
+       sdbg("[%s] Func Entrance", handle->cp_name);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_MODEM_INTERFACE,
+                       "GetSerialNumber", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_get_serial_number, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API TelMiscSNInformation *tel_get_misc_me_sn_sync(TapiHandle *handle)
 {
-       dbg("Entry");
+       GVariant *dbus_result;
+       GError *error = NULL;
+       char *sn = NULL, *meid = NULL,*imei = NULL, *imeisv = NULL;
+       TelMiscSNInformation *data = NULL;
+       int result = 0;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, NULL);
+
+       sdbg("[%s] Func Entrance", handle->cp_name);
 
-       TEL_RETURN_IF_CHECK_FAIL(handle, TEL_RETURN_INVALID_PARAMETER);
+       dbus_result = g_dbus_connection_call_sync(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_MODEM_INTERFACE,
+                       "GetSerialNumber", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_SHORT_TIMEOUT, handle->ca, &error);
+       if (error) {
+               warn("dbus error = %d (%s)", error->code, error->message);
+               g_error_free(error);
+       }
+
+       if (!dbus_result)
+               return NULL;
+
+       g_variant_get (dbus_result, "(issss)", &result, &sn, &meid, &imei, &imeisv);
+       g_variant_unref(dbus_result);
+
+       if (result != 0)
+               goto OUT;
+
+       data = calloc(1, sizeof(TelMiscSNInformation));
+       if (!data)
+               goto OUT;
+
+       g_strlcpy((gchar *)data->szEsn, sn, TAPI_MISC_ME_SN_LEN_MAX);
+       g_strlcpy((gchar *)data->szMeid, meid, TAPI_MISC_ME_SN_LEN_MAX);
+       g_strlcpy((gchar *)data->szImei, imei, TAPI_MISC_ME_SN_LEN_MAX);
+       g_strlcpy((gchar *)data->szImeiSv, imeisv, TAPI_MISC_ME_SN_LEN_MAX);
+
+OUT:
+       g_free(sn);
+       g_free(meid);
+       g_free(imei);
+       g_free(imeisv);
+
+       return data;
+}
+
+EXPORT_API int tel_check_modem_power_status(TapiHandle *handle, int *result)
+{
+       int ret = TAPI_API_SUCCESS;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(result, TAPI_API_INVALID_PTR);
+
+       ret = tel_get_property_int(handle, TAPI_PROP_MODEM_POWER, result);
+       if (ret == TAPI_API_ACCESS_DENIED) {
+               err("Access denied");
+               return ret;
+       } else if (ret != TAPI_API_SUCCESS) {
+               err("failed. (ret=%d)", ret);
+               return ret;
+       }
 
-       *status = telephony_modem_get_status(handle->modem_proxy);
+       msg("[%s] modem_power_status = %d (0=on,1=off,2=rst,3=low)", handle->cp_name, *result);
 
-       return TEL_RETURN_SUCCESS;
+       return ret;
 }
index ba941ed7239b0ed550fedbc9dcf365a9072404f0..e71bb4c54f662a0a0d1d8fc479ed361f93a85c2d 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
+#include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
-#include "tapi_log.h"
-#include "tapi_private.h"
+#include "tapi_common.h"
+#include "TapiUtility.h"
+#include "TelNetwork.h"
 
-#include "tapi_network.h"
+#include "common.h"
+#include "tapi_log.h"
+#include "ITapiNetwork.h"
 
-static gboolean __tapi_check_plmn(char *plmn)
+static int _convert_systemtype_to_act(int type)
 {
-       if (plmn == NULL)
-               return FALSE;
+       switch (type) {
+               case TAPI_NETWORK_SYSTEM_GSM:
+                       return 0x1;
 
-       if (strlen(plmn) < 5 || strlen(plmn) > 6)
-               return FALSE;
+               case TAPI_NETWORK_SYSTEM_GPRS:
+                       return 0x2;
 
-       return TRUE;
+               case TAPI_NETWORK_SYSTEM_EGPRS:
+                       return 0x3;
+
+               case TAPI_NETWORK_SYSTEM_PCS1900:
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_UMTS:
+                       return 0x4;
+
+               case TAPI_NETWORK_SYSTEM_GSM_AND_UMTS:
+                       return 0x5;
+
+               case TAPI_NETWORK_SYSTEM_IS95A:
+                       return 0x11;
+
+               case TAPI_NETWORK_SYSTEM_IS95B:
+                       return 0x12;
+
+               case TAPI_NETWORK_SYSTEM_CDMA_1X:
+                       return 0x13;
+
+               case TAPI_NETWORK_SYSTEM_EVDO_REV_0:
+                       return 0x14;
+
+               case TAPI_NETWORK_SYSTEM_1X_EVDO_REV_0_HYBRID:
+                       return 0x15;
+
+               case TAPI_NETWORK_SYSTEM_EVDO_REV_A:
+                       return 0x16;
+
+               case TAPI_NETWORK_SYSTEM_1X_EVDO_REV_A_HYBRID:
+                       return 0x17;
+
+               case TAPI_NETWORK_SYSTEM_EVDO_REV_B:
+                       return 0x18;
+
+               case TAPI_NETWORK_SYSTEM_1X_EVDO_REV_B_HYBRID:
+                       return 0x19;
+
+               case TAPI_NETWORK_SYSTEM_EVDV:
+                       return 0x1A;
+
+               case TAPI_NETWORK_SYSTEM_EHRPD:
+                       return 0x1B;
+
+               case TAPI_NETWORK_SYSTEM_LTE:
+                       return 0x21;
+
+               default:
+                       break;
+       }
+
+       return 0xFF;
 }
 
-static gboolean __tapi_check_act(TelNetworkAct act)
+static int _convert_act_to_systemtype(int act)
 {
-       switch(act) {
-       case TEL_NETWORK_ACT_UNKNOWN:
-       case TEL_NETWORK_ACT_GSM:
-       case TEL_NETWORK_ACT_GPRS:
-       case TEL_NETWORK_ACT_EGPRS:
-       case TEL_NETWORK_ACT_UMTS:
-       case TEL_NETWORK_ACT_GSM_AND_UMTS:
-       case TEL_NETWORK_ACT_HSDPA:
-       case TEL_NETWORK_ACT_HSUPA:
-       case TEL_NETWORK_ACT_HSPA:
-       case TEL_NETWORK_ACT_LTE:
-               return TRUE;
+       switch (act) {
+               case 0x1:
+                       return TAPI_NETWORK_SYSTEM_GSM;
+
+               case 0x2:
+                       return TAPI_NETWORK_SYSTEM_GPRS;
+
+               case 0x3:
+                       return TAPI_NETWORK_SYSTEM_EGPRS;
+
+               case 0x4:
+                       return TAPI_NETWORK_SYSTEM_UMTS;
+
+               case 0x5:
+                       return TAPI_NETWORK_SYSTEM_GSM_AND_UMTS;
+
+               case 0x11:
+                       return TAPI_NETWORK_SYSTEM_IS95A;
+
+               case 0x12:
+                       return TAPI_NETWORK_SYSTEM_IS95B;
+
+               case 0x13:
+                       return TAPI_NETWORK_SYSTEM_CDMA_1X;
+
+               case 0x14:
+                       return TAPI_NETWORK_SYSTEM_EVDO_REV_0;
+
+               case 0x15:
+                       return TAPI_NETWORK_SYSTEM_1X_EVDO_REV_0_HYBRID;
+
+               case 0x16:
+                       return TAPI_NETWORK_SYSTEM_EVDO_REV_A;
+
+               case 0x17:
+                       return TAPI_NETWORK_SYSTEM_1X_EVDO_REV_A_HYBRID;
+
+               case 0x18:
+                       return TAPI_NETWORK_SYSTEM_EVDO_REV_B;
+
+               case 0x19:
+                       return TAPI_NETWORK_SYSTEM_1X_EVDO_REV_B_HYBRID;
+
+               case 0x1A:
+                       return TAPI_NETWORK_SYSTEM_EVDV;
+
+               case 0x1B:
+                       return TAPI_NETWORK_SYSTEM_EHRPD;
+
+               case 0x21:
+                       return TAPI_NETWORK_SYSTEM_LTE;
+
+               default:
+                       break;
        }
 
-       return FALSE;
+       return TAPI_NETWORK_SYSTEM_NO_SRV;
 }
 
-static gboolean __tapi_check_network_mode(TelNetworkMode mode)
+static void on_signal_registration_status (TapiHandle *handle, GVariant *param,
+               char *noti_id, struct tapi_evt_cb *evt_cb_data)
 {
-       switch(mode) {
-       case TEL_NETWORK_MODE_AUTO:
-       case TEL_NETWORK_MODE_2G:
-       case TEL_NETWORK_MODE_3G:
-       case TEL_NETWORK_MODE_LTE:
-               return TRUE;
-       }
+       TelNetworkRegistrationStatus_t noti;
 
-       return FALSE;
+       g_variant_get(param, "(iiib)", &noti.cs, &noti.ps, &noti.type, &noti.is_roaming);
+
+       CALLBACK_CALL(&noti);
 }
 
-void on_network_signal_emit_handler(TelephonyNetwork *network,
-       gchar *sender_name, gchar *signal_name,
-       GVariant *parameters, gpointer user_data)
+static void on_signal_strength (TapiHandle *handle, GVariant *param,
+               char *noti_id, struct tapi_evt_cb *evt_cb_data)
 {
-       TapiEvtCbData *evt_cb_data;
-       TelHandle *handle = user_data;
-       char *evt_id;
+       struct tel_noti_network_signal_strength noti;
 
-       if (handle == NULL || signal_name == NULL)
-               return;
+       g_variant_get(param, "(i)", &noti.dbm);
 
-       evt_id = g_strdup_printf("%s:%s", TELEPHONY_NETWORK_INTERFACE,
-                                       signal_name);
-
-       /*
-        * If an event callback is registered process
-        * g-signal event
-        */
-       evt_cb_data = g_hash_table_lookup(handle->evt_table, evt_id);
-       if (evt_cb_data == NULL) {
-               dbg("Application not registered on event %s",
-                                                       evt_id);
-               g_free(evt_id);
-               return;
+       CALLBACK_CALL(&noti);
+}
+
+static void on_signal_cell_info (TapiHandle *handle, GVariant *param,
+               char *noti_id, struct tapi_evt_cb *evt_cb_data)
+{
+       struct tel_noti_network_cell_info noti;
+
+       memset(&noti, 0, sizeof(struct tel_noti_network_cell_info));
+       g_variant_get(param, "(ii)", &noti.lac, &noti.cell_id);
+
+       CALLBACK_CALL(&noti);
+}
+
+static void on_signal_change (TapiHandle *handle, GVariant *param,
+               char *noti_id, struct tapi_evt_cb *evt_cb_data)
+{
+       struct tel_noti_network_change noti;
+       char *plmn = NULL;
+       int act;
+       memset(&noti, 0, sizeof(struct tel_noti_network_change));
+
+       g_variant_get(param, "(is)", &act, &plmn);
+
+       noti.act = _convert_act_to_systemtype(act);
+
+       if (plmn) {
+               snprintf(noti.plmn, 7, "%s", plmn);
+               g_free(plmn);
        }
 
-       if (!g_strcmp0(signal_name, "RegistrationStatus")) {
-               TelNetworkRegStatusInfo reg_status;
+       CALLBACK_CALL(&noti);
+}
 
-               g_variant_get(parameters, "(iii)", &reg_status.cs_status,
-                                       &reg_status.ps_status, &reg_status.act);
+static void on_signal_time_info (TapiHandle *handle, GVariant *param,
+               char *noti_id, struct tapi_evt_cb *evt_cb_data)
+{
+       struct tel_noti_network_time_info noti;
+       char *plmn = NULL;
+
+       memset(&noti, 0, sizeof(struct tel_noti_network_time_info));
+       g_variant_get(param, "(iiiiiiiiibs)", &noti.year, &noti.month, &noti.day,
+                       &noti.hour, &noti.minute, &noti.second,
+                       &noti.wday, &noti.gmtoff, &noti.dstoff, &noti.isdst,
+                       &plmn);
+
+       if (plmn) {
+               snprintf(noti.plmn, 7, "%s", plmn);
+               g_free(plmn);
+       }
 
-               dbg("%s cs_status(%d), ps_status(%d), act(%d)", signal_name,
-                       reg_status.cs_status, reg_status.ps_status, reg_status.act);
+       CALLBACK_CALL(&noti);
+}
 
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &reg_status);
-       } else if (!g_strcmp0(signal_name, "CellInfo")) {
-               TelNetworkCellInfo cell_info;
+static void on_signal_identity (TapiHandle *handle, GVariant *param,
+               char *noti_id, struct tapi_evt_cb *evt_cb_data)
+{
+       struct tel_noti_network_identity noti;
+       char *plmn = NULL, *s_name = NULL, *f_name = NULL;
 
-               g_variant_get(parameters, "(uuu)", &cell_info.lac,
-                                       &cell_info.cell_id, &cell_info.rac);
+       memset(&noti, 0, sizeof(struct tel_noti_network_identity));
 
-               dbg("%s lac(%d), cell_id(%d), rac(%d)", signal_name,
-                       cell_info.lac, cell_info.cell_id, cell_info.rac);
+       g_variant_get(param, "(sss)", &plmn, &s_name, &f_name);
 
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &cell_info);
-       } else if (!g_strcmp0(signal_name, "Identity")) {
-               TelNetworkIdentityInfo identity = {NULL, NULL, NULL};
+       if (plmn) {
+               snprintf(noti.plmn, 7, "%s", plmn);
+               g_free(plmn);
+       }
+       if (s_name) {
+               snprintf(noti.short_name, 17, "%s", s_name);
+               g_free(s_name);
+       }
+       if (f_name) {
+               snprintf(noti.full_name, 33, "%s", f_name);
+               g_free(f_name);
+       }
 
-               g_variant_get(parameters, "(sss)", &identity.plmn,
-                                       &identity.short_name, &identity.long_name);
+       CALLBACK_CALL(&noti);
+}
 
-               dbg("%s plmn(%s), short_name(%s), long_name(%s)", signal_name,
-                       identity.plmn, identity.short_name, identity.long_name);
+static void on_emergency_callback_mode (TapiHandle *handle, GVariant *param,
+               char *noti_id, struct tapi_evt_cb *evt_cb_data)
+{
+       struct tel_noti_network_emergency_callback_mode noti;
 
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &identity);
-               g_free(identity.plmn);
-               g_free(identity.short_name);
-               g_free(identity.long_name);
-       } else if (!g_strcmp0(signal_name, "Rssi")) {
-               unsigned int rssi;
-               g_variant_get(parameters, "(u)", &rssi);
+       memset(&noti, 0, sizeof(struct tel_noti_network_emergency_callback_mode));
 
-               dbg("%s rssi(%u)", signal_name, rssi);
+       g_variant_get(param, "(i)", &noti.mode);
 
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &rssi);
-       } else if (!g_strcmp0(signal_name, "TimeInfo")) {
-               TelNetworkNitzInfoNoti time_info = {0, 0, 0, 0, 0, 0, 0, FALSE, 0, NULL};
+       CALLBACK_CALL(&noti);
+}
 
-               g_variant_get(parameters, "(uuuuuuibis)", &time_info.year, &time_info.month,
-                       &time_info.day, &time_info.hour, &time_info.minute, &time_info.second,
-                       &time_info.gmtoff, &time_info.isdst, &time_info.dstoff, &time_info.plmn);
+static void on_signal_default_data_subscription (TapiHandle *handle, GVariant *param,
+               char *noti_id, struct tapi_evt_cb *evt_cb_data)
+{
+       struct tel_noti_network_default_data_subs noti;
 
-               dbg("%s year(%u), month(%u), day(%u), hour(%u), minute(%u), second(%u), \
-                       gmtoff(%d), isdst(%s), dstoff(%d), plmn(%s)", signal_name,
-                       time_info.year, time_info.month, time_info.day, time_info.hour,
-                       time_info.minute, time_info.second, time_info.gmtoff,
-                       time_info.isdst ? "TRUE":"FALSE", time_info.dstoff, time_info.plmn);
+       memset(&noti, 0, sizeof(struct tel_noti_network_default_data_subs));
 
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &time_info);
-               g_free(time_info.plmn);
-       } else
-               err("Unhandled Signal: %s", signal_name);
+       g_variant_get(param, "(i)", &noti.default_subs);
 
-       g_free(evt_id);
+       CALLBACK_CALL(&noti);
 }
 
-EXPORT_API TelReturn tapi_network_get_registration_info(TelHandle *handle,
-       TelNetworkRegistrationInfo *reg_info)
+static void on_signal_default_subscription (TapiHandle *handle, GVariant *param,
+               char *noti_id, struct tapi_evt_cb *evt_cb_data)
 {
-       dbg("Entry");
+       struct tel_noti_network_default_subs noti;
+
+       memset(&noti, 0, sizeof(struct tel_noti_network_default_subs));
 
-       g_return_val_if_fail(handle != NULL && reg_info != NULL,
-                       TEL_RETURN_INVALID_PARAMETER);
+       g_variant_get(param, "(i)", &noti.default_subs);
 
-       reg_info->reg_status_info.cs_status =
-                       telephony_network_get_cs_status(handle->network_proxy);
+       CALLBACK_CALL(&noti);
+}
 
-       reg_info->reg_status_info.ps_status =
-                       telephony_network_get_ps_status(handle->network_proxy);
+static struct signal_map signals[] = {
+       { "RegistrationStatus", on_signal_registration_status },
+       { "SignalStrength", on_signal_strength },
+       { "CellInfo", on_signal_cell_info },
+       { "Change", on_signal_change },
+       { "TimeInfo", on_signal_time_info },
+       { "Identity", on_signal_identity },
+       { "EmergencyCallbackMode", on_emergency_callback_mode },
+       { "DefaultDataSubscription", on_signal_default_data_subscription },
+       { "DefaultSubscription", on_signal_default_subscription },
+};
+
+void _process_network_event(const gchar *sig, GVariant *param,
+       TapiHandle *handle, char *noti_id, struct tapi_evt_cb *evt_cb_data)
+{
+       unsigned int i;
+       TAPI_RETURN_IF_FAIL(evt_cb_data);
+
+       for (i = 0; i < sizeof (signals) / sizeof (struct signal_map); i++) {
+               dbg("Received (%s)(%s) signal from telephony", handle->cp_name, sig);
+               if (!g_strcmp0 (sig, signals[i].signal_name)) {
+                       signals[i].callback (handle, param, noti_id, evt_cb_data);
+                       return;
+               }
+       }
 
-       reg_info->reg_status_info.act =
-                       telephony_network_get_act(handle->network_proxy);
+       dbg("not handled NETWORK noti[%s]",sig );
+}
 
-       reg_info->cell_info.lac =
-                       telephony_network_get_lac(handle->network_proxy);
+static gboolean _check_plmn(const char *plmn)
+{
+       unsigned int plmn_len = 0;
 
-       reg_info->cell_info.cell_id =
-                       telephony_network_get_cell_id(handle->network_proxy);
+       if (plmn == NULL) {
+               err("PLMN is NULL");
+               return FALSE;
+       }
 
-       reg_info->cell_info.rac =
-                       telephony_network_get_rac(handle->network_proxy);
+       plmn_len = strlen(plmn);
+       if (plmn_len < 5 || plmn_len > 6) {
+               err("PLMN length(%d) is invalid", plmn_len);
+               return FALSE;
+       }
 
-       return TEL_RETURN_SUCCESS;
+       return TRUE;
 }
 
-static void on_response_network_get_identity_info(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+static gboolean _check_operation(TelNetworkPreferredPlmnOp_t operation)
+{
+       switch(operation) {
+       case TAPI_NETWORK_PREF_PLMN_ADD:
+       case TAPI_NETWORK_PREF_PLMN_EDIT:
+       case TAPI_NETWORK_PREF_PLMN_DELETE:
+               return TRUE;
+       default:
+               /*Do Nothing*/
+               err("Default Case executed. Unknown PLMN Op");
+               break;
+       }
+       err("operation %d is not supported", operation);
+       return FALSE;
+}
+
+static gboolean _check_network_mode(int mode)
+{
+       if (mode == TAPI_NETWORK_MODE_AUTO) {
+               return TRUE;
+       } else {
+               if (mode & TAPI_NETWORK_MODE_GSM) {
+                       mode &= ~TAPI_NETWORK_MODE_GSM;
+               }
+               if (mode & TAPI_NETWORK_MODE_WCDMA) {
+                       mode &= ~TAPI_NETWORK_MODE_WCDMA;
+               }
+               if (mode & TAPI_NETWORK_MODE_1XRTT) {
+                       mode &= ~TAPI_NETWORK_MODE_1XRTT;
+               }
+               if (mode & TAPI_NETWORK_MODE_LTE) {
+                       mode &= ~TAPI_NETWORK_MODE_LTE;
+               }
+               if (mode & TAPI_NETWORK_MODE_EVDO) {
+                       mode &= ~TAPI_NETWORK_MODE_EVDO;
+               }
+               if (mode == 0)
+                       return TRUE;
+       }
+       err("mode %d is not supported", mode);
+       return FALSE;
+}
+
+static gboolean _check_emergency_callback_mode(TelNetworkEmergencyCallbackMode_t mode)
+{
+       switch(mode) {
+       case TAPI_NETWORK_EMERGENCY_CALLBACK_MODE_ENTER:
+       case TAPI_NETWORK_EMERGENCY_CALLBACK_MODE_EXIT:
+               return TRUE;
+       default:
+               /*Do Nothing*/
+               err("Default Case executed. Unknown Emergency callback mode");
+               break;
+       }
+       err("emergency callback mode %d is not supported", mode);
+       return FALSE;
+}
+
+static gboolean _check_roaming_preference(TelNetworkPrefNetType_t roam_pref)
+{
+       switch(roam_pref) {
+       case TAPI_NETWORK_PREF_NET_TYPE_HOME_ONLY:
+       case TAPI_NETWORK_PREF_NET_TYPE_AFFILIATED:
+       case TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC:
+       case TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC_A:
+       case TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC_B:
+       case TAPI_NETWORK_PREF_NET_TYPE_ROAM_DOMESTIC:
+       case TAPI_NETWORK_PREF_NET_TYPE_ROAM_INTERNATIONAL:
+       case TAPI_NETWORK_PREF_NET_TYPE_ROAM_DUAL:
+       case TAPI_NETWORK_PREF_NET_TYPE_BLANK:
+               return TRUE;
+       default:
+               /*Do Nothing*/
+               err("Default Case executed. Unknown roaming preference");
+               break;
+       }
+       err("roam_pref %d is not supported", roam_pref);
+       return FALSE;
+}
+
+static void on_response_search_network (GObject *source_object,
+               GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelNetworkResult result = TEL_NETWORK_RESULT_FAILURE;
-       TelNetworkIdentityInfo id_info;
        GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       int i;
 
-       dbg("Entry");
+       TelNetworkPlmnList_t list;
 
-       memset(&id_info, 0, sizeof(id_info));
-       telephony_network_call_get_identity_info_finish(handle->network_proxy,
-               (int *)&result, &id_info.plmn, &id_info.short_name,
-               &id_info.long_name, res, &error);
+       GVariant *dbus_result = NULL;
+       GVariant *value = NULL;
+       GVariantIter *iter = NULL;
+       GVariantIter *iter_row = NULL;
+       const gchar *key = NULL;
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       memset (&list, 0, sizeof(TelNetworkPlmnList_t));
 
-       if (result != TEL_NETWORK_RESULT_SUCCESS) {
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-       } else {
-               RESP_CALLBACK_CALL(rsp_cb_data, result, &id_info);
+       dbus_result = g_dbus_connection_call_finish (
+                       G_DBUS_CONNECTION (source_object), res, &error);
+       CHECK_ERROR(error);
+
+       g_variant_get (dbus_result, "(aa{sv}i)", &iter, &result);
+
+       list.networks_count = g_variant_iter_n_children(iter);
+
+       i = 0;
+       while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
+               while (g_variant_iter_loop(iter_row, "{sv}", &key, &value)) {
+                       if (!g_strcmp0(key, "plmn")) {
+                               strncpy(list.network_list[i].plmn, g_variant_get_string(value, NULL), TAPI_NETWORK_PLMN_LEN_MAX);
+                               list.network_list[i].plmn_id = atoi(g_variant_get_string(value, NULL));
+                       }
+                       if (!g_strcmp0(key, "act")) {
+                               list.network_list[i].access_technology = _convert_act_to_systemtype(g_variant_get_int32(value));
+                       }
+                       if (!g_strcmp0(key, "type")) {
+                               list.network_list[i].type_of_plmn = g_variant_get_int32(value);
+                       }
+                       if (!g_strcmp0(key, "name")) {
+                               strncpy(list.network_list[i].network_name, g_variant_get_string(value, NULL), 40);
+                       }
+               }
+               i++;
+               g_variant_iter_free(iter_row);
        }
+       g_variant_iter_free(iter);
 
-       g_free(id_info.plmn);
-       g_free(id_info.short_name);
-       g_free(id_info.long_name);
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &list, evt_cb_data->user_data);
+       }
+
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_network_get_identity_info(TelHandle *handle,
-       TapiResponseCb callback, void *user_data)
+static void on_response_get_network_selection_mode (GObject *source_object,
+               GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
 
-       dbg("Entry");
+       GVariant *dbus_result;
+       int mode = 0;
 
-       g_return_val_if_fail(handle != NULL && callback != NULL,
-               TEL_RETURN_INVALID_PARAMETER);
+       dbus_result = g_dbus_connection_call_finish (
+                       G_DBUS_CONNECTION (source_object), res, &error);
+       CHECK_ERROR(error);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       g_variant_get (dbus_result, "(ii)", &mode, &result);
 
-       telephony_network_call_get_identity_info(handle->network_proxy,
-               NULL,
-               on_response_network_get_identity_info, rsp_cb_data);
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &mode, evt_cb_data->user_data);
+       }
 
-       return TEL_RETURN_SUCCESS;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_network_search(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+static void on_response_default_set (GObject *source_object, GAsyncResult *res,
+               gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+
+       GVariant *dbus_result;
+
+       dbus_result = g_dbus_connection_call_finish (
+                       G_DBUS_CONNECTION (source_object), res, &error);
+       CHECK_ERROR(error);
+
+       g_variant_get (dbus_result, "(i)", &result);
 
-       GVariant *nw_list;
-       TelNetworkPlmnList plmn_list;
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
+       }
+
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
+}
 
-       TelNetworkResult result = TEL_NETWORK_RESULT_FAILURE;
+static void on_response_get_network_preferred_plmn (GObject *source_object,
+               GAsyncResult *res, gpointer user_data)
+{
        GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       int i;
 
-       dbg("Entry");
+       TelNetworkPreferredPlmnList_t list;
 
-       memset(&plmn_list, 0, sizeof(TelNetworkPlmnList));
+       GVariant *dbus_result = NULL;
+       GVariant *value = NULL;
+       GVariantIter *iter = NULL;
+       GVariantIter *iter_row = NULL;
+       const gchar *key = NULL;
 
-       /* Setting back Proxy default timeout to DEFAULT value */
-       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->network_proxy,
-               TAPI_DBUS_TIMEOUT_DEFAULT);
+       memset (&list, 0, sizeof(TelNetworkPreferredPlmnList_t));
 
+       dbus_result = g_dbus_connection_call_finish (
+                       G_DBUS_CONNECTION (source_object), res, &error);
+       CHECK_ERROR(error);
 
-       telephony_network_call_search_finish(handle->network_proxy,
-                       (int *)&result, &plmn_list.count, &nw_list, res, &error);
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       g_variant_get (dbus_result, "(aa{sv}i)", &iter, &result);
 
-       if (result != TEL_NETWORK_RESULT_SUCCESS) {
-               g_variant_unref(nw_list);
+       list.NumOfPrefPlmns = g_variant_iter_n_children(iter);
 
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       if (list.NumOfPrefPlmns == 0) {
+               dbg("num_of_.. = 0");
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, result, &list, evt_cb_data->user_data);
+               }
+
+               g_free(evt_cb_data);
                return;
        }
 
-       if ((plmn_list.count != 0)
-                       && (g_variant_n_children(nw_list) == plmn_list.count)) {
-               GVariantIter *iter = NULL, *iter_row = NULL;
-               GVariant *key_value;
-               const gchar *key;
-               guint i = 0;
-
-               dbg("Network search list count: [%d]", plmn_list.count);
-               plmn_list.network_list =
-                       g_malloc0(sizeof(TelNetworkInfo)*plmn_list.count);
-
-               g_variant_get(nw_list, "aa{sv}", &iter);
-               while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
-                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
-                               if (g_strcmp0(key, "plmn_status") == 0) {
-                                       plmn_list.network_list[i].plmn_status =
-                                               g_variant_get_int32(key_value);
-                               }
-                               else if (g_strcmp0(key, "act") == 0) {
-                                       plmn_list.network_list[i].act =
-                                               g_variant_get_int32(key_value);
-                               }
-                               else if (g_strcmp0(key, "network_identity") == 0) {
-                                       GVariantIter *iter2 = NULL;
-                                       GVariant *key_value2;
-                                       const gchar *key2;
-
-                                       g_variant_get(key_value, "a{sv}", &iter2);
-                                       while (g_variant_iter_loop(iter2, "{sv}", &key2, &key_value2)) {
-                                               if (g_strcmp0(key2, "plmn") == 0) {
-                                                       plmn_list.network_list[i].network_identity.plmn =
-                                                               (gchar *)g_variant_get_string(key_value2, NULL);
-                                               }
-                                               else if (g_strcmp0(key2, "short_name") == 0) {
-                                                       plmn_list.network_list[i].network_identity.short_name =
-                                                               (gchar *)g_variant_get_string(key_value2, NULL);
-                                               }
-                                               else if (g_strcmp0(key2, "long_name") == 0) {
-                                                       plmn_list.network_list[i].network_identity.long_name =
-                                                               (gchar *)g_variant_get_string(key_value2, NULL);
-                                               }
-                                       }
-                                       g_variant_iter_free(iter2);
-                               }
+       i = 0;
+       while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
+               while (g_variant_iter_loop(iter_row, "{sv}", &key, &value)) {
+                       if (!g_strcmp0(key, "plmn")) {
+                               strncpy(list.PrefPlmnRecord[i].Plmn, g_variant_get_string(value, NULL), 6);
+                       }
+                       if (!g_strcmp0(key, "act")) {
+                               list.PrefPlmnRecord[i].SystemType = _convert_act_to_systemtype(g_variant_get_int32(value));
+                       }
+                       if (!g_strcmp0(key, "index")) {
+                               list.PrefPlmnRecord[i].Index = g_variant_get_int32(value);
+                       }
+                       if (!g_strcmp0(key, "name")) {
+                               strncpy(list.PrefPlmnRecord[i].network_name, g_variant_get_string(value, NULL), 40);
                        }
-                       i++;
-                       g_variant_iter_free(iter_row);
                }
-               g_variant_iter_free(iter);
-       }
-       else {
-               warn("Network search list count is NOT valid - Count: [%d]",
-                       plmn_list.count);
-               plmn_list.count = 0;
+               i++;
+               g_variant_iter_free(iter_row);
        }
-       g_variant_unref(nw_list);
+       g_variant_iter_free(iter);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, &plmn_list);
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &list, evt_cb_data->user_data);
+       }
 
-       /* Free resource */
-       g_free(plmn_list.network_list);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_network_search(TelHandle *handle,
-       TapiResponseCb callback, void *user_data)
+static void on_response_get_network_mode (GObject *source_object,
+               GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data;
-
-       dbg("Entry");
+       GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
 
-       g_return_val_if_fail(handle != NULL && callback != NULL,
-                       TEL_RETURN_INVALID_PARAMETER);
+       GVariant *dbus_result;
+       int mode = 0;
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       dbus_result = g_dbus_connection_call_finish (
+                       G_DBUS_CONNECTION (source_object), res, &error);
+       CHECK_ERROR(error);
 
-       /* Setting Proxy default timeout as 180 secs */
-       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->network_proxy,
-               TAPI_DBUS_TIMEOUT_MAX);
+       g_variant_get (dbus_result, "(ii)", &mode, &result);
 
-       telephony_network_call_search(handle->network_proxy,
-               NULL,
-               on_response_network_search, rsp_cb_data);
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &mode, evt_cb_data->user_data);
+       }
 
-       return TEL_RETURN_SUCCESS;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_network_cancel_search(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+static void on_response_get_network_serving (GObject *source_object,
+               GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelNetworkResult result = TEL_NETWORK_RESULT_FAILURE;
        GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+
+       TelNetworkServing_t data;
+
+       GVariantIter *iter;
+       GVariant *value = NULL;
+       const gchar *key = NULL;
+       GVariant *dbus_result;
+       char *plmn;
+       int v0, v4, v5;
+       char v1, v2, v3, v6, v7;
+
+       memset (&data, 0, sizeof(TelNetworkServing_t));
+
+       dbus_result = g_dbus_connection_call_finish (
+                       G_DBUS_CONNECTION (source_object), res, &error);
+       CHECK_ERROR(error);
+
+       g_variant_get (dbus_result, "(a{sv}i)", &iter, &result);
+
+       while (g_variant_iter_loop(iter, "{sv}", &key, &value)) {
+               if (!g_strcmp0(key, "serving")) {
+                       g_variant_get(value, "(is)", &v0, &plmn);
+                       data.act = _convert_act_to_systemtype(v0);
+                       if (plmn) {
+                               snprintf(data.plmn, 7, "%s", plmn);
+                               g_free(plmn);
+                       }
+               }
+               else if (!g_strcmp0(key, "g_serving")) {
+                       g_variant_get(value, "(i)", &v0);
+                       data.info.lac = v0;
+               }
+               else if (!g_strcmp0(key, "c_serving")) {
+                       g_variant_get(value, "(iuuuiiuu)", &v0, &v1, &v2, &v3, &v4, &v5, &v6, &v7);
+                       data.info.cdma_info.carrier = v0;
+                       data.info.cdma_info.system_id = v1;
+                       data.info.cdma_info.network_id = v2;
+                       data.info.cdma_info.base_station_id = v3;
+                       data.info.cdma_info.base_station_latitude = v4;
+                       data.info.cdma_info.base_station_longitude = v5;
+                       data.info.cdma_info.registration_zone = v6;
+                       data.info.cdma_info.pilot_offset = v7;
+               }
+       }
+       g_variant_iter_free(iter);
 
-       dbg("Entry");
-
-       telephony_network_call_cancel_search_finish(handle->network_proxy,
-               (int *)&result, res, &error);
-
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
+       }
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_network_cancel_search(TelHandle *handle,
-       TapiResponseCb callback, void *user_data)
+static void on_response_get_neighboring_cell_info (GObject *source_object,
+               GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       int geran_index = 0, umts_index = 0;
+
+       TelNetworkNeighboringCellInfo_t list;
+
+       GVariant *dbus_result = NULL;
+       GVariant *value = NULL;
+       GVariantIter *iter = NULL;
+       GVariantIter *iter_row = NULL;
+       const gchar *key = NULL;
+       gint v0, v1, v2, v3, v4, v5;
+
+       memset (&list, 0, sizeof(TelNetworkNeighboringCellInfo_t));
+
+       dbus_result = g_dbus_connection_call_finish (
+                       G_DBUS_CONNECTION (source_object), res, &error);
+       CHECK_ERROR(error);
+
+       g_variant_get (dbus_result, "(aa{sv}i)", &iter, &result);
+
+       while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
+               while (g_variant_iter_loop(iter_row, "{sv}", &key, &value)) {
+                       if (!g_strcmp0(key, "serving")) {
+                               g_variant_get(value, "(iii)", &v0,&v1,&v2);
+                               list.serving.act = _convert_act_to_systemtype(v0);
+                               list.serving.mcc = v1;
+                               list.serving.mnc = v2;
+                       }
+                       else if (!g_strcmp0(key, "g_serving")) {
+                               g_variant_get(value, "(iiiii)", &v0,&v1,&v2,&v3,&v4);
+                               list.serving.cell.geran.cell_id = v0;
+                               list.serving.cell.geran.lac             = v1;
+                               list.serving.cell.geran.bcch    = v2;
+                               list.serving.cell.geran.bsic    = v3;
+                               list.serving.cell.geran.rxlev   = v4;
+                       }
+                       else if (!g_strcmp0(key, "u_serving")) {
+                               g_variant_get(value, "(iiiii)", &v0,&v1,&v2,&v3,&v4);
+                               list.serving.cell.umts.cell_id  = v0;
+                               list.serving.cell.umts.lac              = v1;
+                               list.serving.cell.umts.arfcn    = v2;
+                               list.serving.cell.umts.psc              = v3;
+                               list.serving.cell.umts.rscp             = v4;
+                       }
+                       else if (!g_strcmp0(key, "l_serving")) {
+                               g_variant_get(value, "(iiiii)", &v0,&v1,&v2,&v3,&v4);
+                               list.serving.cell.lte.cell_id   = v0;
+                               list.serving.cell.lte.lac               = v1;
+                               list.serving.cell.lte.earfcn    = v2;
+                               list.serving.cell.lte.tac               = v3;
+                               list.serving.cell.lte.rssi              = v4;
+                       }
+                       else if (!g_strcmp0(key, "c_serving")) {
+                               g_variant_get(value, "(uuuuii)", &v0, &v1, &v2, &v3, &v4, &v5);
+                               list.serving.cell.cdma.system_id = v0;
+                               list.serving.cell.cdma.network_id = v1;
+                               list.serving.cell.cdma.base_station_id = v2;
+                               list.serving.cell.cdma.reference_pn = v3;
+                               list.serving.cell.cdma.base_station_latitude = v4;
+                               list.serving.cell.cdma.base_station_longitude = v5;
+                       }
+                       else if (!g_strcmp0(key, "geran")) {
+                               g_variant_get(value, "(iiiii)", &v0,&v1,&v2,&v3,&v4);
+                               list.geran_list[geran_index].cell_id    = v0;
+                               list.geran_list[geran_index].lac                = v1;
+                               list.geran_list[geran_index].bcch               = v2;
+                               list.geran_list[geran_index].bsic               = v3;
+                               list.geran_list[geran_index].rxlev              = v4;
+                               geran_index++;
+                       }
+                       else if (!g_strcmp0(key, "umts")) {
+                               g_variant_get(value, "(iiiii)", &v0,&v1,&v2,&v3,&v4);
+                               list.umts_list[umts_index].cell_id      = v0;
+                               list.umts_list[umts_index].lac          = v1;
+                               list.umts_list[umts_index].arfcn        = v2;
+                               list.umts_list[umts_index].psc          = v3;
+                               list.umts_list[umts_index].rscp         = v4;
+                               umts_index++;
+                       }
+               }
+               g_variant_iter_free(iter_row);
+       }
+       g_variant_iter_free(iter);
 
-       dbg("Entry");
+       list.geran_list_count = geran_index;
+       list.umts_list_count = umts_index;
+       dbg("act=%d, count(geran:%d, umts:%d)", list.serving.act, geran_index, umts_index);
 
-       g_return_val_if_fail(handle != NULL && callback != NULL,
-                       TEL_RETURN_INVALID_PARAMETER);
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &list, evt_cb_data->user_data);
+       }
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
+}
+
+static void on_response_select_network (GObject *source_object, GAsyncResult *res,
+        gpointer user_data)
+{
+       GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       GVariant *dbus_result;
 
-       telephony_network_call_cancel_search(handle->network_proxy,
-               NULL,
-               on_response_network_cancel_search, rsp_cb_data);
+       dbus_result = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source_object), res, &error);
+       CHECK_ERROR(error);
+       g_variant_get (dbus_result, "(i)", &result);
 
-       return TEL_RETURN_SUCCESS;
+       /* Map result received from libtcore to TapiResult_t */
+       if (result == 0)
+               result = TAPI_API_SUCCESS;
+       else {
+               switch (result) {
+                       case 0x50000001:
+                               result = TAPI_API_NETWORK_PLMN_NOT_ALLOWED;
+                               break;
+                       case 0x50000002:
+                               result = TAPI_API_NETWORK_ROAMING_NOT_ALLOWED;
+                               break;
+                       default:
+                               /*Do Nothing*/
+                               break;
+               }
+       }
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
+       }
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_network_select_automatic(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+static void on_response_get_network_roaming_preference (GObject *source_object,
+               GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelNetworkResult result = TEL_NETWORK_RESULT_FAILURE;
        GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
 
-       dbg("Entry");
+       GVariant *dbus_result;
+       TelNetworkPrefNetType_t roam_pref;
 
-       /* Setting back Proxy default timeout to DEFAULT value */
-       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->network_proxy,
-               TAPI_DBUS_TIMEOUT_DEFAULT);
+       dbus_result = g_dbus_connection_call_finish (
+                       G_DBUS_CONNECTION (source_object), res, &error);
+       CHECK_ERROR(error);
 
-       telephony_network_call_select_automatic_finish(handle->network_proxy,
-               (int *)&result, res, &error);
+       g_variant_get (dbus_result, "(ii)", &roam_pref, &result);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &roam_pref, evt_cb_data->user_data);
+       }
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_network_select_automatic(TelHandle *handle,
-       TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_search_network(TapiHandle *handle, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data;
-
-       dbg("Entry");
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-       g_return_val_if_fail(handle != NULL && callback != NULL,
-                       TEL_RETURN_INVALID_PARAMETER);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle != NULL && callback != NULL, TAPI_API_INVALID_PTR);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       /* Setting Proxy default timeout as 180 secs */
-       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->network_proxy,
-               TAPI_DBUS_TIMEOUT_MAX);
+       msg("[%s] network_search requested", handle->cp_name);
 
-       telephony_network_call_select_automatic(handle->network_proxy,
-               NULL,
-               on_response_network_select_automatic, rsp_cb_data);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
+                       "Search", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_UNRESTRICTED_TIMEOUT, handle->ca,
+                       on_response_search_network, evt_cb_data);
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_network_select_manual(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_get_network_selection_mode(struct tapi_handle *handle, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelNetworkResult result = TEL_NETWORK_RESULT_FAILURE;
-       GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-       dbg("Entry");
+       dbg("Func Entrance");
 
-       /* Setting back Proxy default timeout to DEFAULT value */
-       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->network_proxy,
-               TAPI_DBUS_TIMEOUT_DEFAULT);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle != NULL && callback != NULL, TAPI_API_INVALID_PTR);
 
-       telephony_network_call_select_manual_finish(handle->network_proxy,
-               (int *)&result, res, &error);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
+                       "GetSelectionMode", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_get_network_selection_mode, evt_cb_data);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_network_select_manual(TelHandle *handle,
-       const TelNetworkSelectManualInfo *select_info,
-       TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_select_network_automatic(struct tapi_handle *handle, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle != NULL, TAPI_API_INVALID_PTR);
 
-       g_return_val_if_fail(handle != NULL && select_info != NULL
-               && __tapi_check_plmn(select_info->plmn)
-               && __tapi_check_act(select_info->act) && callback != NULL,
-               TEL_RETURN_INVALID_PARAMETER);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       param = g_variant_new("(isi)",
+                       0, /* Automatic */
+                       "",
+                       0);
 
-       /* Setting Proxy default timeout as 180 secs */
-       g_dbus_proxy_set_default_timeout((GDBusProxy *)handle->network_proxy,
-               TAPI_DBUS_TIMEOUT_MAX);
+       msg("[%s] automatic selection requested", handle->cp_name);
 
-       telephony_network_call_select_manual(handle->network_proxy,
-               select_info->plmn, select_info->act, NULL,
-               on_response_network_select_manual, rsp_cb_data);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
+                       "SetSelectionMode", param, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_UNRESTRICTED_TIMEOUT, handle->ca,
+                       on_response_default_set, evt_cb_data);
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_network_get_selection_mode(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_select_network_manual(struct tapi_handle *handle, const char *plmn, int type, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelNetworkResult result = TEL_NETWORK_RESULT_FAILURE;
-       TelNetworkSelectionMode mode;
-       GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle != NULL && _check_plmn(plmn), TAPI_API_INVALID_PTR);
 
-       telephony_network_call_get_selection_mode_finish(handle->network_proxy,
-               (int *)&result, (int *)&mode, res, &error);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       param = g_variant_new("(isi)",
+                       1, /* Manual */
+                       plmn,
+                       _convert_systemtype_to_act(type));
 
-       if (result != TEL_NETWORK_RESULT_SUCCESS) {
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-       } else {
-               RESP_CALLBACK_CALL(rsp_cb_data, result, &mode);
-       }
+       msg("[%s] manual selection requested plmn:[%s] type:[%d]",handle->cp_name, plmn?plmn:"", type);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
+                       "SetSelectionMode", param, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_UNRESTRICTED_TIMEOUT, handle->ca,
+                       on_response_select_network, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_network_get_selection_mode(TelHandle *handle,
-       TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_set_network_preferred_plmn(
+               TapiHandle *handle,
+               TelNetworkPreferredPlmnOp_t operation,
+               TelNetworkPreferredPlmnInfo_t *info,
+               tapi_response_cb callback,
+               void *user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+       int act = 0;
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle != NULL && info != NULL &&
+                                                       _check_operation(operation) &&
+                                                       _check_plmn((const char *)&info->Plmn), TAPI_API_INVALID_PTR);
 
-       g_return_val_if_fail(handle != NULL && callback != NULL,
-               TEL_RETURN_INVALID_PARAMETER);
+       dbg("Func Entrance");
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       telephony_network_call_get_selection_mode(handle->network_proxy,
-               NULL,
-               on_response_network_get_selection_mode, rsp_cb_data);
+       switch (info->SystemType) {
+               case TAPI_NETWORK_SYSTEM_GSM:
+                       act = 1;
+                       break;
 
-       return TEL_RETURN_SUCCESS;
-}
+               case TAPI_NETWORK_SYSTEM_UMTS:
+                       act = 4;
+                       break;
 
-static void on_response_network_set_preferred_plmn(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
-{
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelNetworkResult result = TEL_NETWORK_RESULT_FAILURE;
-       GError *error = NULL;
+               case TAPI_NETWORK_SYSTEM_GPRS:
+                       act = 2;
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_EGPRS:
+                       act = 3;
+                       break;
 
-       dbg("Entry");
+               case TAPI_NETWORK_SYSTEM_GSM_AND_UMTS:
+                       act = 4;
+                       break;
+
+               default:
+                       act = 4;
+                       break;
+       }
 
-       telephony_network_call_set_preferred_plmn_finish(handle->network_proxy,
-               (int *)&result, res, &error);
+       param = g_variant_new("(iiis)",
+                       operation,
+                       info->Index,
+                       act,
+                       info->Plmn);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
+                       "SetPreferredPlmn", param, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_default_set, evt_cb_data);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_network_set_preferred_plmn(TelHandle *handle,
-       TelNetworkPreferredPlmnInfo *info,
-       TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_get_network_preferred_plmn(TapiHandle *handle, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-       dbg("Entry");
+       dbg("Func Entrance");
 
-       g_return_val_if_fail(handle != NULL && info != NULL
-               && __tapi_check_plmn(info->plmn)
-               && __tapi_check_act(info->act)
-               && info->index > 0 && callback != NULL,
-               TEL_RETURN_INVALID_PARAMETER);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle != NULL && callback != NULL, TAPI_API_INVALID_PTR);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       telephony_network_call_set_preferred_plmn(handle->network_proxy,
-               info->index, info->plmn, info->act, NULL,
-               on_response_network_set_preferred_plmn, rsp_cb_data);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
+                       "GetPreferredPlmn", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_get_network_preferred_plmn, evt_cb_data);
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_network_get_preferred_plmn(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_set_network_mode(TapiHandle *handle, int mode, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
 
-       GVariant *pref_plmn_list;
-       TelNetworkPreferredPlmnList plmn_list;
+       TAPI_RET_ERR_NUM_IF_FAIL(handle != NULL &&
+                                                               _check_network_mode(mode), TAPI_API_INVALID_PTR);
 
-       TelNetworkResult result = TEL_NETWORK_RESULT_FAILURE;
-       GError *error = NULL;
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       dbg("Entry");
+       param = g_variant_new("(i)",
+                       mode);
 
-       memset(&plmn_list, 0, sizeof(TelNetworkPreferredPlmnList));
+       msg("[%s] requested mode:[0x%x]", handle->cp_name, mode);
 
-       telephony_network_call_get_preferred_plmn_finish(handle->network_proxy,
-               (int *)&result, &plmn_list.count, &pref_plmn_list, res, &error);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
+                       "SetMode", param, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_UNRESTRICTED_TIMEOUT, handle->ca,
+                       on_response_default_set, evt_cb_data);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       return TAPI_API_SUCCESS;
+}
 
-       if (result != TEL_NETWORK_RESULT_SUCCESS) {
-               g_variant_unref(pref_plmn_list);
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-               return;
-       }
+EXPORT_API int tel_get_network_mode(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-       if ((plmn_list.count != 0)
-                       && (g_variant_n_children(pref_plmn_list) == plmn_list.count)) {
-               GVariantIter *iter = NULL, *iter_row = NULL;
-               GVariant *key_value;
-               const gchar *key;
-               guint i = 0;
-
-               dbg("Preferred PLMN list count: [%d]", plmn_list.count);
-               plmn_list.list =
-                       g_malloc0(sizeof(TelNetworkPreferredPlmnInfo)*plmn_list.count);
-
-               g_variant_get(pref_plmn_list, "aa{sv}", &iter);
-               while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
-                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
-                               if (g_strcmp0(key, "index") == 0) {
-                                       plmn_list.list[i].index =
-                                               g_variant_get_uint32(key_value);
-                               }
-                               else if (g_strcmp0(key, "plmn") == 0) {
-                                       plmn_list.list[i].plmn =
-                                               (gchar *)g_variant_get_string(key_value, NULL);
-                               }
-                               else if (g_strcmp0(key, "act") == 0) {
-                                       plmn_list.list[i].act =
-                                               g_variant_get_int32(key_value);
-                               }
-                       }
-                       i++;
-                       g_variant_iter_free(iter_row);
-               }
-               g_variant_iter_free(iter);
-       }
-       else {
-               warn("Preferred PLMN list count is NOT valid - Count: [%d]",
-                       plmn_list.count);
-               plmn_list.count = 0;
-       }
-       g_variant_unref(pref_plmn_list);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle != NULL && callback != NULL, TAPI_API_INVALID_PTR);
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, &plmn_list);
+       dbg("[%s] Func Entrance", handle->cp_name);
 
-       /* Free resource */
-       g_free(plmn_list.list);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
+                       "GetMode", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_get_network_mode, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_network_get_preferred_plmn(TelHandle *handle,
-       TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_cancel_network_manual_search(TapiHandle *handle, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle != NULL, TAPI_API_INVALID_PTR);
 
-       g_return_val_if_fail(handle != NULL && callback != NULL,
-               TEL_RETURN_INVALID_PARAMETER);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       msg("[%s] network search cancel requested", handle->cp_name);
 
-       telephony_network_call_get_preferred_plmn(handle->network_proxy,
-               NULL,
-               on_response_network_get_preferred_plmn, rsp_cb_data);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
+                       "SearchCancel", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_default_set, evt_cb_data);
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_network_set_mode(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_get_network_serving(TapiHandle *handle, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelNetworkResult result = TEL_NETWORK_RESULT_FAILURE;
-       GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle != NULL && callback != NULL, TAPI_API_INVALID_PTR);
 
-       telephony_network_call_set_mode_finish(handle->network_proxy,
-               (int *)&result, res, &error);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       dbg("[%s] Func Entrance", handle->cp_name);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
+                       "GetServingNetwork", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_get_network_serving, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_network_set_mode(TelHandle *handle,
-       TelNetworkMode mode, TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_get_network_neighboring_cell_info(TapiHandle *handle, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle != NULL && callback != NULL, TAPI_API_INVALID_PTR);
 
-       g_return_val_if_fail(handle != NULL
-               && __tapi_check_network_mode(mode)
-               && callback != NULL,
-               TEL_RETURN_INVALID_PARAMETER);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       dbg("[%s] Func Entrance", handle->cp_name);
 
-       telephony_network_call_set_mode(handle->network_proxy,
-               mode, NULL,
-               on_response_network_set_mode, rsp_cb_data);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
+                       "GetNgbrCellInfo", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_get_neighboring_cell_info, evt_cb_data);
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_network_get_mode(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_set_network_default_data_subscription(TapiHandle *handle, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelNetworkResult result = TEL_NETWORK_RESULT_FAILURE;
-       TelNetworkMode mode;
-       GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_PTR);
 
-       telephony_network_call_get_mode_finish(handle->network_proxy,
-               (int *)&result, (int *)&mode, res, &error);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       msg("[%s] Func Entrance", handle->cp_name);
 
-       if (result != TEL_NETWORK_RESULT_SUCCESS) {
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-       } else {
-               RESP_CALLBACK_CALL(rsp_cb_data, result, &mode);
-       }
+       /* DBUS call */
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
+                       "SetDefaultDataSubscription", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_default_set, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_network_get_mode(TelHandle *handle,
-       TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_set_network_emergency_callback_mode(TapiHandle *handle, TelNetworkEmergencyCallbackMode_t mode, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle != NULL &&
+                                                               _check_emergency_callback_mode(mode), TAPI_API_INVALID_PTR);
 
-       g_return_val_if_fail(handle != NULL && callback != NULL,
-                       TEL_RETURN_INVALID_PARAMETER);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       param = g_variant_new("(i)", mode);
 
-       telephony_network_call_get_mode(handle->network_proxy,
-               NULL,
-               on_response_network_get_mode, rsp_cb_data);
+       msg("[%s] emergency callback mode :[%d]", handle->cp_name, mode);
 
-       return TEL_RETURN_SUCCESS;
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
+                       "SetEmergencyCallbackMode", param, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_default_set, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_network_get_neighboring_cell_info(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_set_network_roaming_preference(TapiHandle *handle, TelNetworkPrefNetType_t roam_pref, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
 
-       TelNetworkNeighbourCellInfo cell_info;
-       GVariant *gsm_var, *umts_var;
+       TAPI_RET_ERR_NUM_IF_FAIL(handle != NULL &&
+                                                               _check_roaming_preference(roam_pref), TAPI_API_INVALID_PTR);
 
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       TelNetworkResult result = TEL_NETWORK_RESULT_FAILURE;
-       GError *error = NULL;
+       param = g_variant_new("(i)", roam_pref);
 
-       dbg("Entry");
+       msg("[%s] roam_pref:[%d]", handle->cp_name, roam_pref);
 
-       memset(&cell_info, 0, sizeof(TelNetworkNeighbourCellInfo));
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
+                       "SetRoamingPreference", param, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_default_set, evt_cb_data);
 
-       telephony_network_call_get_ngbr_cell_info_finish(handle->network_proxy,
-               (int *)&result, &cell_info.gsm_list_count, &gsm_var,
-               &cell_info.umts_list_count, &umts_var,
-               res, &error);
+       return TAPI_API_SUCCESS;
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+}
 
-       if (result != TEL_NETWORK_RESULT_SUCCESS) {
-               g_variant_unref(gsm_var);
-               g_variant_unref(umts_var);
+EXPORT_API int tel_get_network_roaming_preference(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-               return;
-       }
+       TAPI_RET_ERR_NUM_IF_FAIL(handle != NULL && callback != NULL, TAPI_API_INVALID_PTR);
 
-       if ((cell_info.gsm_list_count != 0)
-                       && (g_variant_n_children(gsm_var) == cell_info.gsm_list_count)) {
-               GVariantIter *iter = NULL, *iter_row = NULL;
-               GVariant *key_value;
-               const gchar *key;
-               guint i = 0;
-
-               dbg("GSM Cell list count: [%d]", cell_info.gsm_list_count);
-               cell_info.gsm_list =
-                       g_malloc0(sizeof(TelNetworkGsmNeighbourCellInfo));
-
-               g_variant_get(gsm_var, "aa{sv}", &iter);
-               while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
-                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
-                               if (g_strcmp0(key, "cell_id") == 0) {
-                                       cell_info.gsm_list->cell_id =
-                                               g_variant_get_int32(key_value);
-                               }
-                               else if (g_strcmp0(key, "lac") == 0) {
-                                       cell_info.gsm_list->lac =
-                                               g_variant_get_int32(key_value);
-                               }
-                               else if (g_strcmp0(key, "bcch") == 0) {
-                                       cell_info.gsm_list->bcch =
-                                               g_variant_get_int32(key_value);
-                               }
-                               else if (g_strcmp0(key, "bsic") == 0) {
-                                       cell_info.gsm_list->bsic =
-                                               g_variant_get_int32(key_value);
-                               }
-                               else if (g_strcmp0(key, "rxlev") == 0) {
-                                       cell_info.gsm_list->rxlev =
-                                               g_variant_get_int32(key_value);
-                               }
-                       }
-                       i++;
-                       g_variant_iter_free(iter_row);
-               }
-               g_variant_iter_free(iter);
-       }
-       else {
-               warn("GSM Cell list count is NOT valid - Count: [%d]",
-                       cell_info.gsm_list_count);
-               cell_info.gsm_list_count = 0;
-       }
-       g_variant_unref(gsm_var);
-
-       if ((cell_info.umts_list_count != 0)
-                       && (g_variant_n_children(umts_var) == cell_info.umts_list_count)) {
-               GVariantIter *iter = NULL, *iter_row = NULL;
-               GVariant *key_value;
-               const gchar *key;
-               guint i = 0;
-
-               dbg("GSM Cell list count: [%d]", cell_info.umts_list_count);
-               cell_info.umts_list =
-                       g_malloc0(sizeof(TelNetworkUmtsNeighbourCellInfo));
-
-               g_variant_get(umts_var, "aa{sv}", &iter);
-               while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
-                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
-                               if (g_strcmp0(key, "cell_id") == 0) {
-                                       cell_info.umts_list->cell_id =
-                                               g_variant_get_int32(key_value);
-                               }
-                               else if (g_strcmp0(key, "lac") == 0) {
-                                       cell_info.umts_list->lac =
-                                               g_variant_get_int32(key_value);
-                               }
-                               else if (g_strcmp0(key, "arfcn") == 0) {
-                                       cell_info.umts_list->arfcn =
-                                               g_variant_get_int32(key_value);
-                               }
-                               else if (g_strcmp0(key, "psc") == 0) {
-                                       cell_info.umts_list->psc =
-                                               g_variant_get_int32(key_value);
-                               }
-                               else if (g_strcmp0(key, "rscp") == 0) {
-                                       cell_info.umts_list->rscp =
-                                               g_variant_get_int32(key_value);
-                               }
-                       }
-                       i++;
-                       g_variant_iter_free(iter_row);
-               }
-               g_variant_iter_free(iter);
-       }
-       else {
-               warn("GSM Cell list count is NOT valid - Count: [%d]",
-                       cell_info.umts_list_count);
-               cell_info.umts_list_count = 0;
-       }
-       g_variant_unref(umts_var);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, &cell_info);
+       dbg("[%s] Func Entrance", handle->cp_name);
 
-       /* Free resource */
-       g_free(cell_info.gsm_list);
-       g_free(cell_info.umts_list);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
+                       "GetRoamingPreference", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_get_network_roaming_preference, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+
+}
+
+EXPORT_API int tel_get_network_default_data_subscription(TapiHandle *handle, TelNetworkDefaultDataSubs_t *default_subscription)
+{
+       GError *gerr = NULL;
+       GVariant *sync_gv = NULL;
+       int subs = 0;
+       int result = 0;
+       TapiResult_t ret = TAPI_API_OPERATION_FAILED;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(default_subscription, TAPI_API_INVALID_PTR);
+
+       sync_gv = g_dbus_connection_call_sync(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
+                       "GetDefaultDataSubscription", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       &gerr);
+       if (sync_gv) {
+               g_variant_get(sync_gv, "(ii)", &subs, &result);
+
+               if (result == 0)
+                       *default_subscription = subs;
+               else
+                       *default_subscription = TAPI_NETWORK_DEFAULT_DATA_SUBS_UNKNOWN;
+
+               msg("'default' Data Subscription: [%d]", subs);
+
+               g_variant_unref(sync_gv);
+               ret = TAPI_API_SUCCESS;
+       } else {
+               err("Get Data Subscription failed: [%s]", gerr->message);
+               g_error_free(gerr);
+       }
+
+       return ret;
 }
 
-EXPORT_API TelReturn tapi_network_get_neighboring_cell_info(TelHandle *handle,
-       TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_set_network_default_subscription(TapiHandle *handle, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       struct tapi_resp_data *evt_cb_data = NULL;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_PTR);
 
-       dbg("Entry");
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       g_return_val_if_fail(handle != NULL && callback != NULL,
-                       TEL_RETURN_INVALID_PARAMETER);
+       dbg("[%s] Set 'default' Subscription (for CS)", handle->cp_name);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       /* DBUS call */
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
+                       "SetDefaultSubscription", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_default_set, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
 
-       telephony_network_call_get_ngbr_cell_info(handle->network_proxy,
-               NULL,
-               on_response_network_get_neighboring_cell_info, rsp_cb_data);
+EXPORT_API int tel_get_network_default_subscription(TapiHandle *handle, TelNetworkDefaultSubs_t *default_subscription)
+{
+       GError *gerr = NULL;
+       GVariant *sync_gv = NULL;
+       int subs = 0;
+       int result = 0;
+       TapiResult_t ret = TAPI_API_OPERATION_FAILED;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(default_subscription, TAPI_API_INVALID_PTR);
+
+       sync_gv = g_dbus_connection_call_sync(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
+                       "GetDefaultSubscription", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       &gerr);
+       if (sync_gv) {
+               g_variant_get(sync_gv, "(ii)", &subs, &result);
+
+               if (result == 0)
+                       *default_subscription = subs;
+               else
+                       *default_subscription = TAPI_NETWORK_DEFAULT_SUBS_UNKNOWN;
+               dbg("'default' Subscription (for CS): [%d]", subs);
+
+               g_variant_unref(sync_gv);
+               ret = TAPI_API_SUCCESS;
+       } else {
+               err("Get 'default' Subscription (for CS) failed: [%s]", gerr->message);
+               g_error_free(gerr);
+       }
 
-       return TEL_RETURN_SUCCESS;
+       return ret;
 }
index 92d64f927859116b9531e9288cc71d9741bf2cdb..ba22464a066f088d1c74b67ce316c2bf35ebceda 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
-#include "tapi_private.h"
-#include "tapi.h"
-#include "tapi_phonebook.h"
 
-#include <tel_phonebook.h>
+#include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
-static gboolean __tapi_check_pb_type(TelPbType pb_type)
-{
-       switch (pb_type) {
-       case TEL_PB_FDN:
-       case TEL_PB_ADN:
-       case TEL_PB_SDN:
-       case TEL_PB_USIM:
-               return TRUE;
-       }
+#include "tapi_common.h"
+#include "TapiUtility.h"
+#include "TelSim.h"
 
-       return FALSE;
-}
+#include "common.h"
+#include "tapi_log.h"
+#include "ITapiPhonebook.h"
 
-void on_phonebook_signal_emit_handler(TelephonyPhonebook *phonebook,
-       gchar *sender_name, gchar *signal_name,
-       GVariant *parameters, gpointer user_data)
+static void move_str (char *dest, unsigned int len, gchar *src)
 {
-       TapiEvtCbData *evt_cb_data;
-       TelHandle *handle = user_data;
-       char *evt_id;
+       if (!dest || !src)
+               return;
 
-       if (handle == NULL || signal_name == NULL)
+       if (strlen (src) == 0)
                return;
 
-       evt_id = g_strdup_printf("%s:%s", TELEPHONY_PB_INTERFACE,
-                                       signal_name);
+       snprintf (dest, len, "%s", src);
+}
+
+static void on_response_get_sim_pb_count(GObject *source_object, GAsyncResult *res, gpointer user_data)
+{
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
+
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimPbAccessResult_t result = TAPI_SIM_PB_SUCCESS;
+       TelSimPbStorageInfo_t pb_cnt ;
+       gint used = 0, total = 0;
 
-       /*
-        * If an event callback is registered process
-        * g-signal event
-        */
-       evt_cb_data = g_hash_table_lookup(handle->evt_table, evt_id);
-       if (evt_cb_data == NULL) {
-               g_free(evt_id);
-               return;
-       }
+       memset(&pb_cnt, 0, sizeof(TelSimPbStorageInfo_t));
 
-       if (!g_strcmp0(signal_name, "Status")) {
-               TelPbInitInfo init_info;
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-               g_variant_get(parameters, "(bbbbb)",
-                       &init_info.init_status,
-                       &init_info.pb_list.fdn, &init_info.pb_list.adn,
-                       &init_info.pb_list.sdn, &init_info.pb_list.usim);
+       g_variant_get (dbus_result, "(iiii)",
+                       &result,
+                       &pb_cnt.StorageFileType,
+                       &used,
+                       &total);
 
-               dbg("%s pb_status(%s), FDN(%d), ADN(%d), SDN(%d), USIM(%d)",
-                       signal_name, init_info.init_status ? "TRUE" : "FALSE",
-                       init_info.pb_list.fdn, init_info.pb_list.adn,
-                       init_info.pb_list.sdn, init_info.pb_list.usim);
+       pb_cnt.UsedRecordCount = used;
+       pb_cnt.TotalRecordCount = total;
 
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &init_info);
-       } else
-               err("Unhandled Signal: %s", signal_name);
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &pb_cnt, evt_cb_data->user_data);
+       }
 
-       g_free(evt_id);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
+static void on_response_get_sim_pb_meta_info(GObject *source_object, GAsyncResult *res, gpointer user_data)
+{
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
+
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimPbAccessResult_t result = TAPI_SIM_PB_SUCCESS;
+       TelSimPbEntryInfo_t pb_entry ;
+
+       gint imin = 0, imax = 0, nmax = 0, tmax = 0, used = 0;
+
+       memset(&pb_entry, 0, sizeof(TelSimPbEntryInfo_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
+
+       g_variant_get (dbus_result, "(iiiiiii)",
+                       &result,
+                       &pb_entry.StorageFileType,
+                       &imin,
+                       &imax,
+                       &nmax,
+                       &tmax,
+                       &used);
+
+       pb_entry.PbIndexMin = imin;
+       pb_entry.PbIndexMax = imax;
+       pb_entry.PbNumLenMax =nmax;
+       pb_entry.PbTextLenMax = tmax;
+       pb_entry.PbUsedCount = used;
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &pb_entry, evt_cb_data->user_data);
+       }
+
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
+}
 
-EXPORT_API TelReturn tapi_pb_get_sim_pb_init_info(TelHandle *handle,
-       gboolean *init_completed, TelPbList *pb_list)
+static void on_response_get_sim_pb_usim_meta_info(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
        GError *error = NULL;
-       TelPbResult pb_result = TEL_PB_RESULT_FAILURE;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
+       GVariant *value = NULL;
+       GVariantIter *iter = NULL;
+       GVariantIter *iter_row = NULL;
+       const gchar *key = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimPbAccessResult_t result = TAPI_SIM_PB_SUCCESS;
+       TelSimPbCapabilityInfo_t list ;
+       int i = 0;
+
+       dbg("Func Entrance");
+       memset(&list, 0, sizeof(TelSimPbCapabilityInfo_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
+
+       g_variant_get(dbus_result, "(iaa{sv})", &result, &iter);
+       list.FileTypeCount = g_variant_iter_n_children(iter);
+
+       i = 0;
+       while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
+               while (g_variant_iter_loop(iter_row, "{sv}", &key, &value)) {
+                       if (!g_strcmp0(key, "field_type")) {
+                               list.FileTypeInfo[i].field_type = g_variant_get_int32(value);
+                       }
+                       if (!g_strcmp0(key, "index_max")) {
+                               list.FileTypeInfo[i].index_max = g_variant_get_int32(value);
+                       }
+                       if (!g_strcmp0(key, "text_max")) {
+                               list.FileTypeInfo[i].text_max = g_variant_get_int32(value);
+                       }
+                       if (!g_strcmp0(key, "used_count")) {
+                               list.FileTypeInfo[i].used_count = g_variant_get_int32(value);
+                       }
+               }
+               i++;
+               g_variant_iter_free(iter_row);
+       }
+       g_variant_iter_free(iter);
 
-       dbg("Entry");
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &list, evt_cb_data->user_data);
+       }
 
-       TEL_RETURN_IF_CHECK_FAIL(handle
-               && init_completed && pb_list,
-               TEL_RETURN_INVALID_PARAMETER);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
+}
 
-       telephony_phonebook_call_get_init_info_sync(handle->phonebook_proxy,
-               (gint *)&pb_result, init_completed, &pb_list->fdn, &pb_list->adn,
-               &pb_list->sdn, &pb_list->usim, NULL, &error);
-       if (error) {
-               dbg("dbus error = %d (%s)", error->code, error->message);
-               g_error_free(error);
-               return TEL_RETURN_FAILURE;
+static void on_response_read_sim_pb_record(GObject *source_object, GAsyncResult *res, gpointer user_data)
+{
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
+
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimPbAccessResult_t result = TAPI_SIM_PB_SUCCESS;
+       TelSimPbRecord_t pb_rec ;
+
+       gint i = 0, ni = 0;
+       gchar *name = NULL;
+       gchar *number = NULL;
+       gchar *sne = NULL;
+       gchar *anr1 = NULL;
+       gchar *anr2 = NULL;
+       gchar *anr3 = NULL;
+       gchar *email1 = NULL;
+       gchar *email2 = NULL;
+       gchar *email3 = NULL;
+       gchar *email4 = NULL;
+
+       memset(&pb_rec, 0, sizeof(TelSimPbRecord_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
+
+       g_variant_get (dbus_result, "(iiiisisisisisisissssi)",
+                       &result,
+                       &pb_rec.phonebook_type,
+                       &i,
+                       &ni,
+                       &name,
+                       &pb_rec.dcs,
+                       &number,
+                       &pb_rec.ton,
+                       &sne,
+                       &pb_rec.sne_dcs,
+                       &anr1,
+                       &pb_rec.anr1_ton,
+                       &anr2,
+                       &pb_rec.anr2_ton,
+                       &anr3,
+                       &pb_rec.anr3_ton,
+                       &email1,
+                       &email2,
+                       &email3,
+                       &email4,
+                       &pb_rec.group_index);
+
+       pb_rec.index = i;
+       pb_rec.next_index = ni;
+
+       move_str ((char *)pb_rec.name, TAPI_SIM_PB_RECORD_NAME_MAX_LEN, name);
+       move_str ((char *)pb_rec.number, TAPI_SIM_PB_RECORD_NUMBER_MAX_LEN, number);
+       move_str ((char *)pb_rec.sne, TAPI_SIM_PB_RECORD_NAME_MAX_LEN, sne);
+       move_str ((char *)pb_rec.anr1, TAPI_SIM_PB_RECORD_NUMBER_MAX_LEN, anr1);
+       move_str ((char *)pb_rec.anr2, TAPI_SIM_PB_RECORD_NUMBER_MAX_LEN, anr2);
+       move_str ((char *)pb_rec.anr3, TAPI_SIM_PB_RECORD_NUMBER_MAX_LEN, anr3);
+       move_str ((char *)pb_rec.email1, TAPI_SIM_PB_RECORD_EMAIL_MAX_LEN, email1);
+       move_str ((char *)pb_rec.email2, TAPI_SIM_PB_RECORD_EMAIL_MAX_LEN, email2);
+       move_str ((char *)pb_rec.email3, TAPI_SIM_PB_RECORD_EMAIL_MAX_LEN, email3);
+
+       msg("type[%d], index[%d], next_index[%d]", pb_rec.phonebook_type,
+                       pb_rec.index, pb_rec.next_index);
+       dbg("name[%s], dcs[%d]", pb_rec.name, pb_rec.dcs);
+       dbg("number[%s], ton[%d]", pb_rec.number, pb_rec.ton);
+
+       if (pb_rec.phonebook_type==TAPI_SIM_PB_3GSIM) {
+               dbg("sne[%s], sne_dcs[%d]", pb_rec.sne, pb_rec.sne_dcs);
+               dbg("anr1([%d][%s]),anr2([%d][%s]),anr3([%d][%s])",
+                               pb_rec.anr1_ton, pb_rec.anr1, pb_rec.anr2_ton, pb_rec.anr2,
+                               pb_rec.anr3_ton, pb_rec.anr3);
+               dbg("email[%s] [%s][%s][%s]", pb_rec.email1, pb_rec.email2,
+                               pb_rec.email3, pb_rec.email4);
+               dbg("group_index[%d], pb_control[%d]", pb_rec.group_index,
+                               pb_rec.pb_control);
        }
 
-       if (pb_result != TEL_PB_RESULT_SUCCESS) {
-               err("Failed to get SIM PB init info - pb_result: [%d]", pb_result);
-               return TEL_RETURN_FAILURE;
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &pb_rec, evt_cb_data->user_data);
        }
 
-       dbg("init_completed: [%d] pb_list->fdn: [%d] pb_list->adn:[%d] "\
-               "pb_list->sdn: [%d] pb_list->usim: [%d]", *init_completed,
-               pb_list->fdn, pb_list->adn, pb_list->sdn, pb_list->usim);
+       g_free(name);
+       g_free(number);
+       g_free(sne);
+       g_free(anr1);
+       g_free(anr2);
+       g_free(anr3);
+       g_free(email1);
+       g_free(email2);
+       g_free(email3);
+       g_free(email4);
+
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
+}
+
+static void on_response_update_sim_pb_record(GObject *source_object, GAsyncResult *res, gpointer user_data)
+{
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
+
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimPbAccessResult_t result = TAPI_SIM_PB_SUCCESS;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       return TEL_RETURN_SUCCESS;
+       g_variant_get (dbus_result, "(i)", &result);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
+       }
+
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_pb_get_sim_pb_info(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+static void on_response_delete_sim_pb_record(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelPbResult pb_result = TEL_PB_RESULT_FAILURE;
-       int pb_type;
-       TelPbInfo pb_info = {0, };
-       GVariant *dbus_info;
        GError *error = NULL;
-       GVariantIter *iter = NULL;
-       GVariant *key_value;
-       const gchar *key;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
 
-       dbg("Entry");
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimPbAccessResult_t result = TAPI_SIM_PB_SUCCESS;
 
-       telephony_phonebook_call_get_info_finish(handle->phonebook_proxy,
-               (gint *)&pb_result, &pb_type, &dbus_info, res, &error);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       CHECK_DEINIT(error, rsp_cb_data, pb_result);
+       g_variant_get (dbus_result, "(i)", &result);
 
-       if (pb_result != TEL_PB_RESULT_SUCCESS) {
-               g_variant_unref(dbus_info);
-               err("Failed to get SIM PB info - pb_result: [%d]", pb_result);
-               RESP_CALLBACK_CALL(rsp_cb_data, pb_result, NULL);
-               return;
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
        }
 
-       pb_info.pb_type = pb_type;
-       g_variant_get(dbus_info, "a{sv}", &iter);
-       if (pb_info.pb_type == TEL_PB_USIM) {
-               TelPbUsimInfo *usim = (TelPbUsimInfo *)(&pb_info.info_u.usim);
-
-               while (g_variant_iter_loop(iter, "{sv}", &key, &key_value)) {
-                       if (g_strcmp0(key, "max_count") == 0)
-                               usim->max_count = g_variant_get_uint32(key_value);
-                       else if (g_strcmp0(key, "used_count") == 0)
-                               usim->used_count = g_variant_get_uint32(key_value);
-                       else if (g_strcmp0(key, "max_num_len") == 0)
-                               usim->max_num_len = g_variant_get_uint32(key_value);
-                       else if (g_strcmp0(key, "max_text_len") == 0)
-                               usim->max_text_len = g_variant_get_uint32(key_value);
-                       else if (g_strcmp0(key, "max_anr_count") == 0)
-                               usim->max_anr_count = g_variant_get_byte(key_value);
-                       else if (g_strcmp0(key, "max_anr_len") == 0)
-                               usim->max_anr_len = g_variant_get_uint32(key_value);
-                       else if (g_strcmp0(key, "max_email_count") == 0)
-                               usim->max_email_count = g_variant_get_byte(key_value);
-                       else if (g_strcmp0(key, "max_email_len") == 0)
-                               usim->max_email_len = g_variant_get_uint32(key_value);
-                       else if (g_strcmp0(key, "max_sne_len") == 0)
-                               usim->max_sne_len = g_variant_get_uint32(key_value);
-                       else if (g_strcmp0(key, "max_gas_count") == 0)
-                               usim->max_gas_count = g_variant_get_uint32(key_value);
-                       else if (g_strcmp0(key, "max_gas_len") == 0)
-                               usim->max_gas_len = g_variant_get_uint32(key_value);
-                       else if (g_strcmp0(key, "max_aas_count") == 0)
-                               usim->max_aas_count = g_variant_get_uint32(key_value);
-                       else if (g_strcmp0(key, "max_aas_len") == 0)
-                               usim->max_aas_len = g_variant_get_uint32(key_value);
-               }
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
+}
 
-               dbg("pb_type: [%d] max_count: [%d] used_count: [%d] max_num_len: [%d] " \
-                       "max_text_len: [%d] max_anr_count: [%d] max_anr_len: [%d] " \
-                       "max_email_count: [%d] max_email_len: [%d] max_sne_len: [%d] " \
-                       "max_gas_count: [%d] max_gas_len: [%d] "\
-                       "max_aas_count: [%d] max_aas_len: [%d]",
-                       pb_info.pb_type, usim->max_count,
-                       usim->used_count, usim->max_num_len,
-                       usim->max_text_len, usim->max_anr_count,
-                       usim->max_anr_len, usim->max_email_count,
-                       usim->max_email_len, usim->max_sne_len,
-                       usim->max_gas_count, usim->max_gas_len,
-                       usim->max_aas_count, usim->max_aas_len);
+EXPORT_API int tel_get_sim_pb_init_info(TapiHandle *handle, int *init_completed, TelSimPbList_t *pb_list)
+{
+       GError *gerr = NULL;
+       GVariant *sync_gv = NULL;
+       int init_status = 0;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(init_completed, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(pb_list, TAPI_API_INVALID_PTR);
+
+       sync_gv = g_dbus_connection_call_sync(handle->dbus_connection, DBUS_TELEPHONY_SERVICE,
+                       handle->path, DBUS_TELEPHONY_PB_INTERFACE, "GetInitStatus", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca, &gerr);
+
+       if (sync_gv) {
+               g_variant_get(sync_gv, "(ibbbbbb)",
+                               &init_status,
+                               &pb_list->b_fdn,
+                               &pb_list->b_adn,
+                               &pb_list->b_sdn,
+                               &pb_list->b_3g,
+                               &pb_list->b_aas,
+                               &pb_list->b_gas);
+               *init_completed = init_status;
+               g_variant_unref(sync_gv);
        }
        else {
-               TelPbSimInfo *sim = (TelPbSimInfo *)(&pb_info.info_u.sim);
-
-               while (g_variant_iter_loop(iter, "{sv}", &key, &key_value)) {
-                       if (g_strcmp0(key, "max_count") == 0)
-                               sim->max_count = g_variant_get_uint32(key_value);
-                       else if (g_strcmp0(key, "used_count") == 0)
-                               sim->used_count = g_variant_get_uint32(key_value);
-                       else if (g_strcmp0(key, "max_num_len") == 0)
-                               sim->max_num_len = g_variant_get_uint32(key_value);
-                       else if (g_strcmp0(key, "max_text_len") == 0)
-                               sim->max_text_len = g_variant_get_uint32(key_value);
-               }
-
-               dbg("pb_type: [%d] max_count: [%d] used_count: [%d] max_num_len: [%d]" \
-                       "max_text_len: [%d]",
-                       pb_info.pb_type, sim->max_count, sim->used_count,
-                       sim->max_num_len, sim->max_text_len);
+               err("Operation Failed - Error: (%s)", gerr->message);
+               g_error_free (gerr);
+               return TAPI_API_OPERATION_FAILED;
        }
-       g_variant_iter_free(iter);
-       g_variant_unref(dbus_info);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, pb_result, &pb_info);
+       dbg("b_(fdn[%d] adn[%d] sdn[%d] 3g[%d] aas[%d] gas[%d])",
+               pb_list->b_fdn,pb_list->b_adn,pb_list->b_sdn,pb_list->b_3g,pb_list->b_aas,pb_list->b_gas);
+
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_pb_get_sim_pb_info(TelHandle *handle,
-       TelPbType pb_type, TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_get_sim_pb_count(TapiHandle *handle, TelSimPbType_t pb_type, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
+
+       dbg("Func Entrance");
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_PTR);
 
-       dbg("Entry");
+       if ( (pb_type != TAPI_SIM_PB_FDN) && (pb_type != TAPI_SIM_PB_ADN) && (pb_type != TAPI_SIM_PB_SDN)
+                       && (pb_type     != TAPI_SIM_PB_3GSIM) && (pb_type != TAPI_SIM_PB_AAS) && (pb_type != TAPI_SIM_PB_GAS))
+               return TAPI_API_INVALID_INPUT;
 
-       TEL_RETURN_IF_CHECK_FAIL(handle
-               && callback && __tapi_check_pb_type(pb_type),
-               TEL_RETURN_INVALID_PARAMETER);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       param = g_variant_new("(i)", pb_type);
 
-       telephony_phonebook_call_get_info(handle->phonebook_proxy,
-               pb_type,
-               NULL,
-               on_response_pb_get_sim_pb_info, rsp_cb_data);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_PB_INTERFACE,
+                       "GetCount", param, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_get_sim_pb_count, evt_cb_data);
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_pb_read_sim_pb_record(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_get_sim_pb_meta_info(TapiHandle *handle, TelSimPbType_t pb_type, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
 
-       TelPbReadRecord pb_rec;
-       int pb_type;
+       dbg("Func Entrance");
 
-       GVariant *dbus_rec;
-       GVariantIter *iter = NULL;
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_PTR);
 
-       GError *error = NULL;
-       TelPbResult pb_result = TEL_PB_RESULT_FAILURE;
+       if ( (pb_type != TAPI_SIM_PB_FDN) && (pb_type != TAPI_SIM_PB_ADN) && (pb_type != TAPI_SIM_PB_SDN)
+                       && (pb_type     != TAPI_SIM_PB_3GSIM) && (pb_type != TAPI_SIM_PB_AAS) && (pb_type != TAPI_SIM_PB_GAS))
+               return TAPI_API_INVALID_INPUT;
 
-       memset(&pb_rec, 0, sizeof(TelPbReadRecord));
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       telephony_phonebook_call_read_record_finish(handle->phonebook_proxy,
-               (gint *)&pb_result, &pb_rec.index, &pb_rec.next_index, &pb_type, &dbus_rec,
-               res, &error);
-       CHECK_DEINIT(error, rsp_cb_data, pb_result);
+       param = g_variant_new("(i)", pb_type);
 
-       if (pb_result != TEL_PB_RESULT_SUCCESS) {
-               g_variant_unref(dbus_rec);
-               err("Failed to read SIM PB record - pb_result: [%d]", pb_result);
-               RESP_CALLBACK_CALL(rsp_cb_data, pb_result, NULL);
-               return;
-       }
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_PB_INTERFACE,
+                       "GetInfo", param, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_get_sim_pb_meta_info, evt_cb_data);
 
-       pb_rec.pb_type = pb_type;
-       g_variant_get(dbus_rec, "a{sv}", &iter);
-       if (pb_rec.pb_type == TEL_PB_USIM) {
-               GVariant *key_value;
-               const gchar *key;
+       return TAPI_API_SUCCESS;
+}
 
-               TelPbUsimRecord *usim = (TelPbUsimRecord *)&(pb_rec.rec_u.usim);
+EXPORT_API int tel_get_sim_pb_usim_meta_info(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
 
-               while (g_variant_iter_loop(iter, "{sv}", &key, &key_value)) {
-                       if (g_strcmp0(key, "name") == 0) {
-                               g_strlcpy(usim->name,
-                                       g_variant_get_string(key_value, NULL),
-                                       TEL_PB_TEXT_MAX_LEN + 1);
-                       }
-                       else if (g_strcmp0(key, "number") == 0) {
-                               g_strlcpy(usim->number,
-                                       g_variant_get_string(key_value, NULL),
-                                       TEL_PB_NUMBER_MAX_LEN + 1);
-                       }
-                       else if (g_strcmp0(key, "sne") == 0) {
-                               g_strlcpy(usim->sne,
-                                       g_variant_get_string(key_value, NULL),
-                                       TEL_PB_TEXT_MAX_LEN + 1);
-                       }
-                       else if (g_strcmp0(key, "grp_name") == 0) {
-                               g_strlcpy(usim->grp_name,
-                                       g_variant_get_string(key_value, NULL),
-                                       TEL_PB_TEXT_MAX_LEN + 1);
-                       }
-                       else if (g_strcmp0(key, "anr_count") == 0) {
-                               usim->anr_count = g_variant_get_byte(key_value);
-                       }
-                       else if (g_strcmp0(key, "anr") == 0) {
-                               GVariantIter *iter2 = NULL, *iter_row2= NULL;
-                               GVariant *key_value2;
-                               const gchar *key2;
-                               guint count = 0;
-
-                               g_variant_get(key_value, "aa{sv}", &iter2);
-                               while (g_variant_iter_next(iter2, "a{sv}", &iter_row2)) {
-                                       while (g_variant_iter_loop(iter_row2, "{sv}", &key2, &key_value2)) {
-                                               if (g_strcmp0(key2, "number") == 0) {
-                                                       g_strlcpy(usim->anr[count].number,
-                                                               g_variant_get_string(key_value2, NULL),
-                                                               TEL_PB_NUMBER_MAX_LEN + 1);
-                                               }
-                                               else if (g_strcmp0(key2, "description") == 0) {
-                                                       usim->anr[count].description =
-                                                               g_variant_get_boolean(key_value2);
-                                               }
-                                               else if (g_strcmp0(key2, "aas") == 0) {
-                                                       g_strlcpy(usim->anr[count].aas,
-                                                               g_variant_get_string(key_value2, NULL),
-                                                               TEL_PB_TEXT_MAX_LEN + 1);
-                                               }
-                                       }
-                                       count++;
-                                       g_variant_iter_free(iter_row2);
-                               }
-                               g_variant_iter_free(iter2);
-                       }
-                       else if (g_strcmp0(key, "email_count") == 0) {
-                               usim->email_count = g_variant_get_byte(key_value);
-                       }
-                       else if (g_strcmp0(key, "email") == 0) {
-                               GVariantIter *iter2 = NULL;
-                               GVariant *key_value2;
-                               const gchar *key2;
-                               guint count = 0;
-                               char *tmp;
-
-                               g_variant_get(key_value, "a{sv}", &iter2);
-                               while (g_variant_iter_loop(iter2, "{sv}", &key2, &key_value2)) {
-                                       for (count = 0; count < usim->email_count; count++) {
-                                               tmp = g_strdup_printf("%d", count);
-                                               if (g_strcmp0(key2, tmp) == 0) {
-                                                       gconstpointer email = g_variant_get_data(key_value2);
-                                                       g_strlcpy(usim->email[count], email, strlen(email)+1);
-                                               }
-                                               g_free(tmp);
-                                       }
-                               }
-                               g_variant_iter_free(iter2);
-                       }
-                       else if (g_strcmp0(key, "hidden") == 0) {
-                               usim->hidden = g_variant_get_boolean(key_value);
-                       }
-               }
-       }
-       else {
-               GVariant *key_value;
-               const gchar *key;
+       dbg("Func Entrance");
 
-               TelPbSimRecord *sim = (TelPbSimRecord *)&(pb_rec.rec_u.sim);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_PTR);
 
-               while (g_variant_iter_loop(iter, "{sv}", &key, &key_value)) {
-                       if (g_strcmp0(key, "name") == 0) {
-                               g_strlcpy(sim->name,
-                                       g_variant_get_string(key_value, NULL),
-                                       TEL_PB_TEXT_MAX_LEN + 1);
-                       }
-                       else if (g_strcmp0(key, "number") == 0) {
-                               g_strlcpy(sim->number,
-                                       g_variant_get_string(key_value, NULL),
-                                       TEL_PB_NUMBER_MAX_LEN + 1);
-                       }
-               }
-       }
-       g_variant_iter_free(iter);
-       g_variant_unref(dbus_rec);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_PB_INTERFACE,
+                       "GetUsimMetaInfo", param, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_get_sim_pb_usim_meta_info, evt_cb_data);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, pb_result, &pb_rec);
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_pb_read_sim_pb_record(TelHandle *handle,
-       const TelPbRecordInfo *record,
-       TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_read_sim_pb_record(TapiHandle *handle, TelSimPbType_t pb_type, unsigned short pb_index, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
+
+       msg("read type:[%d] index:[%d]", pb_type, pb_index);
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_PTR);
+
+       if (pb_index == 0)
+               return TAPI_API_INVALID_INPUT;
 
-       dbg("Entry");
+       if ( (pb_type != TAPI_SIM_PB_FDN) && (pb_type != TAPI_SIM_PB_ADN) && (pb_type != TAPI_SIM_PB_SDN)
+                       && (pb_type     != TAPI_SIM_PB_3GSIM) && (pb_type != TAPI_SIM_PB_AAS) && (pb_type != TAPI_SIM_PB_GAS))
+               return TAPI_API_INVALID_INPUT;
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && record && callback
-               && __tapi_check_pb_type(record->pb_type)
-               && record->index, TEL_RETURN_INVALID_PARAMETER);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       param = g_variant_new("(ii)", pb_type, pb_index);
 
-       telephony_phonebook_call_read_record(handle->phonebook_proxy,
-               record->pb_type, record->index,
-               NULL,
-               on_response_pb_read_sim_pb_record, rsp_cb_data);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_PB_INTERFACE,
+                       "ReadRecord", param, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_read_sim_pb_record, evt_cb_data);
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_pb_update_sim_pb_record(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_update_sim_pb_record(TapiHandle *handle, const TelSimPbRecord_t *req_data, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelPbResult pb_result = TEL_PB_RESULT_FAILURE;
-       GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
 
-       telephony_phonebook_call_update_record_finish(handle->phonebook_proxy,
-               (gint *)&pb_result, res, &error);
+       dbg("Func Entrance");
 
-       CHECK_DEINIT(error, rsp_cb_data, pb_result);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL((req_data != NULL) , TAPI_API_INVALID_PTR);
 
-       if (pb_result != TEL_PB_RESULT_SUCCESS)
-               err("Failed to update SIM PB record - pb_result: [%d]", pb_result);
-       else
-               dbg("update SIM PB record: [SUCCESS]");
+       if (req_data->index == 0) {
+               return TAPI_API_INVALID_INPUT;
+       }
 
-       RESP_CALLBACK_CALL(rsp_cb_data, pb_result, NULL);
-}
+       if ((req_data->phonebook_type != TAPI_SIM_PB_FDN)
+                       && (req_data->phonebook_type != TAPI_SIM_PB_ADN) && (req_data->phonebook_type != TAPI_SIM_PB_SDN)
+                       && (req_data->phonebook_type != TAPI_SIM_PB_3GSIM) && (req_data->phonebook_type != TAPI_SIM_PB_AAS)
+                       && (req_data->phonebook_type != TAPI_SIM_PB_GAS)) {
+               return TAPI_API_INVALID_INPUT;
+       }
 
-EXPORT_API TelReturn tapi_pb_update_sim_pb_record(TelHandle *handle,
-       const TelPbUpdateRecord *record,
-       TapiResponseCb callback, void *user_data)
-{
-       TapiRespCbData *rsp_cb_data;
-
-       GVariantBuilder update_builder;
-       GVariant *var_update = NULL;
-
-       dbg("Entry");
-
-       TEL_RETURN_IF_CHECK_FAIL(handle && record && callback
-               && __tapi_check_pb_type(record->pb_type)
-               && record->index, TEL_RETURN_INVALID_PARAMETER);
-
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
-
-       dbg("Phonebook Type: [%d] Index: [%d]", record->pb_type, record->index);
-
-       g_variant_builder_init(&update_builder, G_VARIANT_TYPE("a{sv}"));
-       if (record->pb_type == TEL_PB_USIM) {
-               GVariant *var_anr = NULL, *var_email = NULL;
-               GVariantBuilder anr_builder, email_builder;
-
-               TelPbUsimRecord *usim = (TelPbUsimRecord *)&(record->rec_u.usim);
-               guint count = 0;
-
-               dbg("Name: [%s] Number: [%s] SNE: [%s] Group Name: [%s]",
-                       usim->name, usim->number, usim->sne, usim->grp_name);
-               g_variant_builder_add(&update_builder, "{sv}",
-                       "name", g_variant_new_string(usim->name));
-               g_variant_builder_add(&update_builder, "{sv}",
-                       "number", g_variant_new_string(usim->number));
-               g_variant_builder_add(&update_builder, "{sv}",
-                       "sne", g_variant_new_string(usim->sne));
-               g_variant_builder_add(&update_builder, "{sv}",
-                       "grp_name", g_variant_new_string(usim->grp_name));
-
-               /* ANR */
-               dbg("ANR count: [%d]", usim->anr_count);
-               g_variant_builder_add(&update_builder, "{sv}",
-                       "anr_count", g_variant_new_byte(usim->anr_count));
-
-               g_variant_builder_init(&anr_builder, G_VARIANT_TYPE("aa{sv}"));
-               if (usim->anr_count && usim->anr_count <= TEL_PB_ANR_MAX_COUNT) {
-                       for (count = 0; count < usim->anr_count; count++) {
-                               g_variant_builder_open(&anr_builder, G_VARIANT_TYPE("a{sv}"));
-
-                               dbg("ANR[%d] - Number: [%s] Description: [%s] AAS: [%s]",
-                                       count, usim->anr[count].number,
-                                       (usim->anr[count].description ? "YES" : "NO"),
-                                       usim->anr[count].aas);
-                               g_variant_builder_add(&anr_builder, "{sv}",
-                                       "number", g_variant_new_string(usim->anr[count].number));
-                               g_variant_builder_add(&anr_builder, "{sv}",
-                                       "description", g_variant_new_boolean(usim->anr[count].description));
-                               g_variant_builder_add(&anr_builder, "{sv}",
-                                       "aas", g_variant_new_string(usim->anr[count].aas));
-
-                               g_variant_builder_close(&anr_builder);
-                       }
-               }
-               var_anr = g_variant_builder_end(&anr_builder);
-               g_variant_builder_add(&update_builder, "{sv}",
-                       "anr", var_anr);
-
-               /* e-mail */
-               dbg("e-mail count: [%d]", usim->email_count);
-               g_variant_builder_add(&update_builder, "{sv}",
-                       "email_count", g_variant_new_byte(usim->email_count));
-
-               g_variant_builder_init(&email_builder, G_VARIANT_TYPE("a{sv}"));
-               if (usim->email_count && usim->email_count <= TEL_PB_EMAIL_MAX_COUNT) {
-                       for (count = 0; count < usim->email_count; count++) {
-                               char *tmp = g_strdup_printf("%d", count);
-
-                               dbg("e-mail[%s] - [%s]", tmp, usim->email[count]);
-                               g_variant_builder_add(&email_builder, "{sv}",
-                                       tmp,
-                                       g_variant_new_from_data(G_VARIANT_TYPE("ay"),
-                                               usim->email[count], strlen(usim->email[count]),
-                                               TRUE, NULL, NULL));
-                               g_free(tmp);
-                       }
-               }
-               var_email = g_variant_builder_end(&email_builder);
-               g_variant_builder_add(&update_builder, "{sv}",
-                       "email", var_email);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-               dbg("Hidden: [%s]", usim->hidden ? "YES" : "NO");
-               g_variant_builder_add(&update_builder, "{sv}",
-                       "hidden", g_variant_new_boolean(usim->hidden));
-       }
-       else {
-               TelPbSimRecord *sim = (TelPbSimRecord *)&(record->rec_u.sim);
-
-               dbg("Name: [%s] Number: [%s]",
-                       sim->name, sim->number);
-               g_variant_builder_add(&update_builder, "{sv}",
-                       "name", g_variant_new_string(sim->name));
-               g_variant_builder_add(&update_builder, "{sv}",
-                       "number", g_variant_new_string(sim->number));
+       msg("type[%d], index[%d], next_index[%d]",req_data->phonebook_type, req_data->index, req_data->next_index);
+       dbg("name[%s], dcs[%d]",req_data->name, req_data->dcs);
+       dbg("number[%s], ton[%d]",req_data->number, req_data->ton);
+
+       if(req_data->phonebook_type == TAPI_SIM_PB_3GSIM) {
+               dbg("sne[%s] sne_dcs[%d]",req_data->sne, req_data->sne_dcs);
+               dbg("anr1([%d][%s]),anr2([%d][%s]),anr3([%d][%s])",
+                       req_data->anr1_ton,req_data->anr1,req_data->anr2_ton,req_data->anr2,req_data->anr3_ton,req_data->anr3);
+               dbg("email[%s] [%s][%s][%s]",req_data->email1,req_data->email2,req_data->email3,req_data->email4);
+               dbg("group_index[%d], pb_control[%d]",req_data->group_index,req_data->pb_control);
        }
-       var_update = g_variant_builder_end(&update_builder);
 
-       telephony_phonebook_call_update_record(handle->phonebook_proxy,
-               record->pb_type, record->index, var_update,
-               NULL,
-               on_response_pb_update_sim_pb_record, rsp_cb_data);
+       param = g_variant_new("(iisisisisisisissssi)",
+                       req_data->phonebook_type,
+                       req_data->index,
+                       req_data->name,
+                       req_data->dcs,
+                       req_data->number,
+                       req_data->ton,
+                       req_data->sne,
+                       req_data->sne_dcs,
+                       req_data->anr1,
+                       req_data->anr1_ton,
+                       req_data->anr2,
+                       req_data->anr2_ton,
+                       req_data->anr3,
+                       req_data->anr3_ton,
+                       req_data->email1,
+                       req_data->email2,
+                       req_data->email3,
+                       req_data->email4,
+                       req_data->group_index);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_PB_INTERFACE,
+                       "UpdateRecord", param, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_update_sim_pb_record, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
 
-       return TEL_RETURN_SUCCESS;
 }
 
-static void on_response_pb_delete_sim_pb_record(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_delete_sim_pb_record(TapiHandle *handle, TelSimPbType_t pb_type, unsigned short pb_index, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelPbResult pb_result = TEL_PB_RESULT_FAILURE;
-       GError *error = NULL;
-
-       telephony_phonebook_call_delete_record_finish(handle->phonebook_proxy,
-               (gint *)&pb_result, res, &error);
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
 
-       CHECK_DEINIT(error, rsp_cb_data, pb_result);
+       msg("delete type:[%d] index:[%d]", pb_type, pb_index);
 
-       if (pb_result != TEL_PB_RESULT_SUCCESS)
-               err("Failed to delete SIM PB record - pb_result: [%d]", pb_result);
-       else
-               dbg("delete SIM PB record: [SUCCESS]");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, pb_result, NULL);
-}
-
-EXPORT_API TelReturn tapi_pb_delete_sim_pb_record(TelHandle *handle,
-       const TelPbRecordInfo *record,
-       TapiResponseCb callback, void *user_data)
-{
-       TapiRespCbData *rsp_cb_data = user_data;
 
-       dbg("Entry");
+       if (pb_index == 0)
+               return TAPI_API_INVALID_INPUT;
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && record && callback
-               && __tapi_check_pb_type(record->pb_type)
-               && record->index, TEL_RETURN_INVALID_PARAMETER);
+       if ( (pb_type != TAPI_SIM_PB_FDN) && (pb_type != TAPI_SIM_PB_ADN) && (pb_type != TAPI_SIM_PB_SDN)
+                       && (pb_type     != TAPI_SIM_PB_3GSIM) && (pb_type != TAPI_SIM_PB_AAS) && (pb_type != TAPI_SIM_PB_GAS))
+               return TAPI_API_INVALID_INPUT;
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       dbg("Delete SIM record - Phonebook type: [%d] Index: [%d] index",
-               record->pb_type, record->index);
+       param = g_variant_new("(ii)", pb_type, pb_index);
 
-       telephony_phonebook_call_delete_record(handle->phonebook_proxy,
-               record->pb_type, record->index,
-               NULL,
-               on_response_pb_delete_sim_pb_record, rsp_cb_data);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_PB_INTERFACE,
+                       "DeleteRecord", param, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_delete_sim_pb_record, evt_cb_data);
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
index 4a8f7366e4e5f5a119b457cfff1df509ca2c544b..657d8b5c7b2ccdf8a3eb3cdc5804d608ba59c8e5 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#include "tapi_log.h"
-#include "tapi.h"
-#include "tapi_private.h"
+#include "tapi_common.h"
+#include "TapiUtility.h"
+#include "TelSim.h"
 
-#include "tel_sap.h"
-#include "tapi_sap.h"
+#include "common.h"
+#include "tapi_log.h"
+#include "ITapiSap.h"
 
-void on_sap_signal_emit_handler(TelephonySap *sap, gchar *sender_name,
-                                                       gchar *signal_name, GVariant *parameters,
-                                                       gpointer user_data)
+static void on_response_sap_connect(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiEvtCbData *evt_cb_data = NULL;
-       TelHandle *handle = user_data;
-       char *evt_id = NULL;
-
-       dbg("Entry");
-
-       if (handle == NULL) {
-               err("handle is null");
-               return;
-       }
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
 
-       evt_id = g_strdup_printf("%s:%s", TELEPHONY_SAP_INTERFACE,
-                                       signal_name);
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimSapConnectionStatus_t result = TAPI_SIM_SAP_CONNECTION_STATUS_OK;
+       gint max_msg_size = 0;
 
-       evt_cb_data = g_hash_table_lookup(handle->evt_table, evt_id);
-       if (evt_cb_data == NULL) {
-               warn("evt_cb_data is null for the signal[%s]", signal_name);
-               g_free(evt_id);
-               return;
-       }
+       dbg("Func Entrance");
 
-       if (!g_strcmp0(signal_name, "Status")) {
-               TelSapCardStatus status;
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-               g_variant_get(parameters, "(i)", &status);
-               dbg("signal[%s] status[%d]", signal_name, status);
+       g_variant_get(dbus_result, "(ii)", &result, &max_msg_size);
 
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &status);
-       } else {
-               err("Unsupported signal %s", signal_name);
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, (void*)&max_msg_size, evt_cb_data->user_data);
        }
-       g_free(evt_id);
-}
-
-static void on_response_sap_req_connect(GObject *source_object,
-                       GAsyncResult *res, gpointer user_data)
-{
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSapResult result = TEL_SAP_RESULT_FAILURE_NO_REASON;
-       unsigned int max_msg_size;
-       GError *error = NULL;
 
-       dbg("Entry");
-
-       telephony_sap_call_req_connect_finish(handle->sap_proxy,
-                       (int *)&result, &max_msg_size, res, &error);
-
-       CHECK_DEINIT(error, rsp_cb_data, result);
-
-       RESP_CALLBACK_CALL(rsp_cb_data, result, &max_msg_size);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_sap_req_connect(TelHandle *handle,
-                       unsigned int max_msg_size,
-                       TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_req_sap_connect(TapiHandle *handle, int max_msg_size, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
 
-       dbg("Entry");
+       dbg("Func Entrance w/ max_msg_size[%d]",max_msg_size);
 
-       g_return_val_if_fail(handle != NULL && callback != NULL,
-                       TEL_RETURN_INVALID_PARAMETER);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       telephony_sap_call_req_connect(handle->sap_proxy, max_msg_size, NULL,
-                       on_response_sap_req_connect, rsp_cb_data);
+       param = g_variant_new("(i)", max_msg_size);
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SAP_INTERFACE, "Connect", param, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT,
+                       handle->ca, on_response_sap_connect, evt_cb_data);
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_sap_req_disconnect(GObject *source_object,
-                       GAsyncResult *res, gpointer user_data)
+static void on_response_sap_disconnect(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSapResult result = TEL_SAP_RESULT_FAILURE_NO_REASON;
        GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
 
-       dbg("Entry");
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimSapResultCode_t result = TAPI_SIM_SAP_RESULT_CODE_OK;
 
-       telephony_sap_call_req_disconnect_finish(handle->sap_proxy,
-                       (int *)&result, res, &error);
+       dbg("Func Entrance");
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
+
+       g_variant_get(dbus_result, "(i)", &result);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
+       }
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_sap_req_disconnect(TelHandle *handle,
-                       TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_req_sap_disconnect(TapiHandle *handle, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-       dbg("Entry");
+       dbg("Func Entrance ");
 
-       g_return_val_if_fail(handle != NULL && callback != NULL,
-                       TEL_RETURN_INVALID_PARAMETER);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       telephony_sap_call_req_disconnect(handle->sap_proxy, NULL,
-                       on_response_sap_req_disconnect, rsp_cb_data);
+               g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SAP_INTERFACE, "Disconnect", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT,
+                       handle->ca, on_response_sap_disconnect, evt_cb_data);
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_sap_get_atr(GObject *source_object,
-                       GAsyncResult *res, gpointer user_data)
+static void on_response_sap_connection_status(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSapResult result = TEL_SAP_RESULT_FAILURE_NO_REASON;
-       TelSapAtr atr;
-       char *content = NULL;
        GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
 
-       guchar *binary_content;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimSapStatusInfo_t result = TAPI_SIM_SAP_STATUS_UNKNOWN;
 
-       dbg("Entry");
+       dbg("Func Entrance");
 
-       telephony_sap_call_get_atr_finish(handle->sap_proxy,
-                       (int *)&result, &content, res, &error);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       g_variant_get(dbus_result, "(i)", &result);
 
-       if (result != TEL_SAP_RESULT_SUCCESS) {
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-               g_free(content);
-               return;
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
        }
 
-       binary_content = g_base64_decode(content, &atr.atr_len);
-
-       if (atr.atr_len > TEL_SAP_ATR_LEN_MAX) {
-               err("ATR length is too long");
-               RESP_CALLBACK_CALL(rsp_cb_data,
-                               TEL_SAP_RESULT_FAILURE_NO_REASON, NULL);
-               g_free(content);
-               g_free(binary_content);
-               return;
-       }
-
-       memcpy(atr.atr, binary_content, atr.atr_len);
-
-       RESP_CALLBACK_CALL(rsp_cb_data, result, &atr);
-       g_free(content);
-       g_free(binary_content);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_sap_get_atr(TelHandle *handle,
-                       TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_req_sap_connection_status(TapiHandle *handle, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-       dbg("Entry");
+       dbg("Func Entrance");
 
-       g_return_val_if_fail(handle != NULL && callback != NULL,
-                       TEL_RETURN_INVALID_PARAMETER);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       telephony_sap_call_get_atr(handle->sap_proxy, NULL,
-                       on_response_sap_get_atr, rsp_cb_data);
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SAP_INTERFACE, "GetStatus", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT,
+                       handle->ca, on_response_sap_connection_status, evt_cb_data);
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_sap_req_transfer_apdu(GObject *source_object,
-                       GAsyncResult *res, gpointer user_data)
+static void on_response_sap_transfer_atr(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSapResult result = TEL_SAP_RESULT_FAILURE_NO_REASON;
-       TelSapApduResp rsp;
-       char *pdu = NULL;
        GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
+
+       GVariantIter *iter = NULL;
+       GVariant *param_gv = NULL;
+       GVariant *inner_gv = NULL;
+       guchar rt_i;
+       int i = 0;
+
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimSapResultCode_t result = TAPI_SIM_SAP_RESULT_CODE_OK;
+       TelSapAtrInfo_t r_atr;
+
+       dbg("Func Entrance");
+       memset(&r_atr, 0, sizeof(TelSapAtrInfo_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
+
+       /*      dbg("dbus_result type_format(%s)", g_variant_get_type_string(dbus_result));*/
+       g_variant_get(dbus_result, "(i@v)", &result, &param_gv);
+       inner_gv = g_variant_get_variant(param_gv);
+
+       g_variant_get(inner_gv, "ay", &iter);
+       while (g_variant_iter_loop(iter, "y", &rt_i)) {
+               r_atr.atr_data[i] = rt_i;
+               i++;
+       }
+       r_atr.atr_len = (int) i;
+       g_variant_iter_free(iter);
+       g_variant_unref(inner_gv);
+       g_variant_unref(param_gv);
+       /*              for(i=0; i < (int)r_atr.atr_len; i++)
+        dbg("r_atr[%d][0x%02x]",i, r_atr.atr_data[i]);*/
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, (void*)&r_atr, evt_cb_data->user_data);
+       }
 
-       guchar *binary_pdu;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
+}
 
-       dbg("Entry");
+EXPORT_API int tel_req_sap_transfer_atr(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-       telephony_sap_call_req_transfer_apdu_finish(handle->sap_proxy,
-                       (int *)&result, &pdu, res, &error);
+       dbg("Func Entrance");
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       if (result != TEL_SAP_RESULT_SUCCESS) {
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-               g_free(pdu);
-               return;
-       }
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       binary_pdu = g_base64_decode(pdu, &rsp.apdu_resp_len);
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SAP_INTERFACE, "GetATR", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT,
+                       handle->ca, on_response_sap_transfer_atr, evt_cb_data);
 
-       if (rsp.apdu_resp_len > TEL_SAP_APDU_RESP_LEN_MAX) {
-               err("Req Transfer APDU response pdu length is too long");
-               RESP_CALLBACK_CALL(rsp_cb_data,
-                               TEL_SAP_RESULT_FAILURE_NO_REASON, NULL);
-               g_free(pdu);
-               g_free(binary_pdu);
-               return;
-       }
+       return TAPI_API_SUCCESS;
+}
 
-       memcpy(rsp.apdu_resp, binary_pdu, rsp.apdu_resp_len);
+static void on_response_sap_transfer_apdu(GObject *source_object, GAsyncResult *res, gpointer user_data)
+{
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
+
+       GVariantIter *iter = NULL;
+       GVariant *param_gv = NULL;
+       GVariant *inner_gv = NULL;
+       guchar rt_i;
+       int i = 0;
+
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimSapResultCode_t result = TAPI_SIM_SAP_RESULT_CODE_OK;
+       TelSapApduData_t r_apdu;
+
+       dbg("Func Entrance");
+       memset(&r_apdu, 0, sizeof(TelSapApduData_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
+
+       /*      dbg("dbus_result type_format(%s)", g_variant_get_type_string(dbus_result));*/
+       g_variant_get(dbus_result, "(i@v)", &result, &param_gv);
+       inner_gv = g_variant_get_variant(param_gv);
+
+       g_variant_get(inner_gv, "ay", &iter);
+       while (g_variant_iter_loop(iter, "y", &rt_i)) {
+               r_apdu.apdu_data[i] = rt_i;
+               i++;
+       }
+       r_apdu.apdu_len = (int) i;
+       g_variant_iter_free(iter);
+       g_variant_unref(inner_gv);
+       g_variant_unref(param_gv);
+       /*              for(i=0; i < (int)r_apdu.apdu_len; i++)
+        dbg("apdu[%d][0x%02x]",i, r_apdu.apdu_data[i]);*/
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, (void*)&r_apdu, evt_cb_data->user_data);
+       }
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, &rsp);
-       g_free(pdu);
-       g_free(binary_pdu);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_sap_req_transfer_apdu(TelHandle *handle,
-                       TelSapApdu *apdu, TapiResponseCb callback,
-                       void *user_data)
+EXPORT_API int tel_req_sap_transfer_apdu(TapiHandle *handle, TelSapApduData_t *apdu_data, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data;
-       char *encoded_apdu;
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariantBuilder builder;
+       GVariant *param = NULL;
+       GVariant *inner_gv = NULL;
+       int i = 0;
 
-       dbg("Entry");
+       dbg("Func Entrance");
 
-       g_return_val_if_fail(handle != NULL && apdu != NULL &&
-                       apdu->apdu_len < TEL_SAP_APDU_LEN_MAX &&
-                       callback != NULL, TEL_RETURN_INVALID_PARAMETER);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(apdu_data, TAPI_API_INVALID_PTR);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       encoded_apdu = g_base64_encode(apdu->apdu, apdu->apdu_len);
-       telephony_sap_call_req_transfer_apdu(handle->sap_proxy,
-                       encoded_apdu, NULL,
-                       on_response_sap_req_transfer_apdu, rsp_cb_data);
+       g_variant_builder_init(&builder, G_VARIANT_TYPE ("ay"));
+       for (i = 0; i < apdu_data->apdu_len; i++) {
+               dbg("apdu_data->apdu_data[%d][0x%02x]", i,apdu_data->apdu_data[i]);
+               g_variant_builder_add(&builder, "y", apdu_data->apdu_data[i]);
+       }
+       inner_gv = g_variant_builder_end(&builder);
+       param = g_variant_new("(v)", inner_gv);
+       /*g_variant_builder_unref (builder);*/
+
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SAP_INTERFACE, "TransferAPDU", param, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT,
+                       handle->ca, on_response_sap_transfer_apdu, evt_cb_data);
 
-       g_free(encoded_apdu);
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_sap_req_transport_protocol(GObject *source_object,
-                       GAsyncResult *res, gpointer user_data)
+static void on_response_sap_transport_protocol(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSapResult result = TEL_SAP_RESULT_FAILURE_NO_REASON;
        GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
+
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimSapResultCode_t result = TAPI_SIM_SAP_RESULT_CODE_OK;
 
-       dbg("Entry");
+       dbg("Func Entrance");
 
-       telephony_sap_call_req_transport_protocol_finish(handle->sap_proxy,
-                       (int *)&result, res, &error);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       g_variant_get(dbus_result, "(i)", &result);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
+       }
+
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_sap_req_transport_protocol(TelHandle *handle,
-                       TelSimSapProtocol protocol,
-                       TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_req_sap_transport_protocol(TapiHandle *handle, TelSimSapProtocol_t protocol, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
 
-       dbg("Entry");
+       dbg("Func Entrance w/ protocol[%d]", protocol);
 
-       g_return_val_if_fail(handle != NULL &&
-                       protocol <= TEL_SIM_SAP_PROTOCOL_T1 && callback != NULL,
-                       TEL_RETURN_INVALID_PARAMETER);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       telephony_sap_call_req_transport_protocol(handle->sap_proxy, protocol,
-                       NULL, on_response_sap_req_transport_protocol, rsp_cb_data);
+       param = g_variant_new("(i)", protocol);
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SAP_INTERFACE, "SetProtocol", param, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT,
+                       handle->ca, on_response_sap_transport_protocol, evt_cb_data);
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_sap_req_power_operation(GObject *source_object,
-                       GAsyncResult *res, gpointer user_data)
+static void on_response_sap_power_operation(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSapResult result = TEL_SAP_RESULT_FAILURE_NO_REASON;
        GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
 
-       dbg("Entry");
-
-       telephony_sap_call_req_power_operation_finish(handle->sap_proxy,
-                       (int *)&result, res, &error);
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimSapResultCode_t result = TAPI_SIM_SAP_RESULT_CODE_OK;
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       dbg("Func Entrance");
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-}
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-EXPORT_API TelReturn tapi_sap_req_power_operation(TelHandle *handle,
-                       TelSapPowerMode mode,
-                       TapiResponseCb callback, void *user_data)
-{
-       TapiRespCbData *rsp_cb_data;
+       g_variant_get(dbus_result, "(i)", &result);
 
-       dbg("Entry");
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
+       }
 
-       g_return_val_if_fail(handle != NULL && mode <= TEL_SAP_SIM_RESET_REQ &&
-                       callback != NULL,
-                       TEL_RETURN_INVALID_PARAMETER);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
+}
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+EXPORT_API int tel_req_sap_power_operation(TapiHandle *handle, TelSimSapPowerMode_t power_mode, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
+       gint mode = 0;
+       dbg("Func Entrance w/ power_mode[%d]", power_mode);
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       switch (power_mode) {
+               case TAPI_SIM_SAP_POWER_SIM_ON_REQ:
+                       mode = 0;
+                       break;
+               case TAPI_SIM_SAP_POWER_SIM_OFF_REQ:
+                       mode =1;
+                       break;
+               case TAPI_SIM_SAP_RESET_SIM_REQ:
+                       mode = 2;
+                       break;
+               default:
+                       dbg("not handed value[%d]", power_mode);
+                       break;
+       }
 
-       telephony_sap_call_req_power_operation(handle->sap_proxy, mode,
-                       NULL, on_response_sap_req_power_operation, rsp_cb_data);
+       param = g_variant_new("(i)", mode);
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SAP_INTERFACE, "SetPower", param, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT,
+                       handle->ca, on_response_sap_power_operation, evt_cb_data);
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_sap_get_card_reader_status(GObject *source_object,
-                       GAsyncResult *res, gpointer user_data)
+static void on_response_sap_cardreader_status(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSapResult result = TEL_SAP_RESULT_FAILURE_NO_REASON;
-       int status;
        GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
 
-       dbg("Entry");
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimSapResultCode_t result = TAPI_SIM_SAP_RESULT_CODE_OK;
+       TelSimSapCardStatus_t reader_status = TAPI_SIM_SAP_CARD_STATUS_UNKNOWN;
 
-       telephony_sap_call_get_card_reader_status_finish(handle->sap_proxy,
-                       (int *)&result, (int *)&status, res, &error);
+       dbg("Func Entrance");
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
+
+       g_variant_get(dbus_result, "(ii)", &result, &reader_status);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, (void*)&reader_status, evt_cb_data->user_data);
+       }
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, &status);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_sap_get_cardreader_status(TelHandle *handle,
-                       TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_req_sap_cardreader_status(TapiHandle *handle, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-       dbg("Entry");
+       dbg("Func Entrance ");
 
-       g_return_val_if_fail(handle != NULL && callback != NULL,
-                       TEL_RETURN_INVALID_PARAMETER);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       telephony_sap_call_get_card_reader_status(handle->sap_proxy, NULL,
-                       on_response_sap_get_card_reader_status, rsp_cb_data);
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SAP_INTERFACE, "GetCardReaderStatus", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT,
+                       handle->ca, on_response_sap_cardreader_status, evt_cb_data);
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
index 805d003b37b84e1ff2b3cb836d96808532b744c5..b15fce9a58a43b7da46891020f2a77801d93718a 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
-#include "tapi_private.h"
-#include "tapi.h"
-#include "tapi_sat.h"
-
+#include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
-#define TEL_SAT_EVENT_LIST_MAX_COUNT   17 /**< max count of sat event list */
-
-TelSatEventListType g_event_list[TEL_SAT_EVENT_LIST_MAX_COUNT];
-
-void on_sat_signal_emit_handler(TelephonySat *sat, gchar *sender_name,
-               gchar *signal_name, GVariant *parameters, gpointer user_data)
-{
-       TapiEvtCbData *evt_cb_data;
-       TelHandle *handle = user_data;
-       char *evt_id;
-
-       if (handle == NULL)
-       return;
-
-       evt_id = g_strdup_printf("%s:%s", TELEPHONY_SAT_INTERFACE,
-                               signal_name);
-       /*
-        * If an event callback is registered process
-        * g-signal event
-        */
-       evt_cb_data = g_hash_table_lookup(handle->evt_table, evt_id);
-       if (evt_cb_data == NULL) {
-               g_free(evt_id);
-               return;
-       }
-
-       if (!g_strcmp0(signal_name, "SetupMenu")) {
-               TelSatSetupMenuInfo setup_menu;
-               gint item_cnt;
-               GVariant *items = NULL;
-
-               memset(&setup_menu, 0, sizeof(TelSatSetupMenuInfo));
-
-               g_variant_get(parameters, "(ibs@vibb)", &setup_menu.command_id, &setup_menu.is_main_menu_present, &setup_menu.sat_main_title, &items, &item_cnt,
-                                       &setup_menu.is_sat_main_menu_help_info, &setup_menu.is_updated_sat_main_menu);
-
-               setup_menu.sat_main_menu_item_count = item_cnt;
-               if (items && item_cnt > 0) {
-                       int index = 0;
-                       GVariant *unbox;
-                       GVariantIter *iter;
-
-                       gchar *item_str;
-                       gint item_id;
-                       unbox = g_variant_get_variant(items);
-                       dbg("items(%p) items type_format(%s)", items, g_variant_get_type_string(unbox));
-
-                       g_variant_get(unbox, "a(si)", &iter);
-                       while (g_variant_iter_loop(iter,"(si)",&item_str, &item_id)) {
-                               setup_menu.sat_main_menu_item[index].item_id = item_id;
-                               memcpy(setup_menu.sat_main_menu_item[index].item_string, item_str, TEL_SAT_DEF_ITEM_STR_LEN_MAX + 6);
-                               dbg("item index(%d) id(%d) str(%s)",index, setup_menu.sat_main_menu_item[index].item_id, setup_menu.sat_main_menu_item[index].item_string);
-                               index++;
-                       }
-                       g_variant_iter_free(iter);
-               }
-
-               dbg("command id (%d)", setup_menu.command_id);
-               dbg("menu present (%d)", setup_menu.is_main_menu_present);
-               dbg("menu title (%s)", setup_menu.sat_main_title);
-               dbg("item cnt (%d)", setup_menu.sat_main_menu_item_count);
-               dbg("menu help info (%d)", setup_menu.is_sat_main_menu_help_info);
-               dbg("menu updated (%d)", setup_menu.is_updated_sat_main_menu);
-
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &setup_menu);
-       }
-       else if (!g_strcmp0(signal_name, "DisplayText")) {
-               TelSatDisplayTextInd display_text;
-
-               memset(&display_text, 0, sizeof(TelSatDisplayTextInd));
-
-               g_variant_get(parameters, "(isiibbb)", &display_text.command_id, &display_text.text.string, &display_text.text.string_len, &display_text.duration,
-                       &display_text.is_priority_high, &display_text.is_user_resp_required, &display_text.immediately_resp);
-
-               dbg("command id (%d)", display_text.command_id);
-               dbg("display text (%s)", display_text.text.string);
-               dbg("string len(%d)", display_text.text.string_len);
-               dbg("duration (%d)", display_text.duration);
-               dbg("high priority (%d)", display_text.is_priority_high);
-               dbg("user response required(%d)", display_text.is_user_resp_required);
-               dbg("immediately response (%d)", display_text.immediately_resp);
-
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &display_text);
-       }
-       else if (!g_strcmp0(signal_name, "SelectItem")) {
-               TelSatSelectItemInd select_item;
-               gint menu_cnt;
-               GVariant *menu_items;
-
-               memset(&select_item, 0, sizeof(TelSatSelectItemInd));
-
-               g_variant_get(parameters, "(ibsiii@v)", &select_item.command_id, &select_item.is_help_info_available, &select_item.text.string,
-                       &select_item.text.string_len, &select_item.default_item_index, &menu_cnt, &menu_items);
-
-               select_item.menu_item_count = menu_cnt;
-               if (menu_items && menu_cnt > 0) {
-                       int index = 0;
-                       GVariant *unbox;
-                       GVariantIter *iter;
-
-                       gchar *item_str;
-                       gint item_id, item_len;
-                       unbox = g_variant_get_variant(menu_items);
-                       dbg("items(%p) items type_format(%s)", menu_items, g_variant_get_type_string(unbox));
-
-                       g_variant_get(unbox, "a(iis)", &iter);
-                       while (g_variant_iter_loop(iter,"(iis)",&item_id, &item_len, &item_str)) {
-                               select_item.menu_item[index].item_id = item_id;
-                               select_item.menu_item[index].text_len = item_len;
-                               memcpy(select_item.menu_item[index].text, item_str, TEL_SAT_ITEM_TEXT_LEN_MAX + 1);
-                               dbg("item index(%d) id(%d) len(%d) str(%s)", index,
-                                               select_item.menu_item[index].item_id, select_item.menu_item[index].text_len, select_item.menu_item[index].text);
-                               index++;
-                       }
-                       g_variant_iter_free(iter);
-               }
-
-               dbg("command id (%d)", select_item.command_id);
-               dbg("help info(%d)", select_item.is_help_info_available);
-               dbg("selected item string(%s)", select_item.text.string);
-               dbg("string len(%d)", select_item.text.string_len);
-               dbg("default item index(%d)", select_item.default_item_index);
-               dbg("item count(%d)", select_item.menu_item_count);
-
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &select_item);
-       }
-       else if (!g_strcmp0(signal_name, "GetInkey")) {
-               TelSatGetInkeyInd get_inkey;
-
-               memset(&get_inkey, 0, sizeof(TelSatGetInkeyInd));
-
-               g_variant_get(parameters, "(iiibbsii)", &get_inkey.command_id, &get_inkey.key_type, &get_inkey.input_char_mode,
-                       &get_inkey.is_numeric, &get_inkey.is_help_info_available, &get_inkey.text.string, &get_inkey.text.string_len, &get_inkey.duration);
-
-               dbg("command id(%d)", get_inkey.command_id);
-               dbg("key type(%d)", get_inkey.key_type);
-               dbg("input character mode(%d)", get_inkey.input_char_mode);
-               dbg("numeric(%d)", get_inkey.is_numeric);
-               dbg("help info available(%d)", get_inkey.is_help_info_available);
-               dbg("text (%s)", get_inkey.text.string);
-               dbg("text length", get_inkey.text.string_len);
-               dbg("duration", get_inkey.duration);
-
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &get_inkey);
-       }
-       else if (!g_strcmp0(signal_name, "GetInput")) {
-               TelSatGetInputInd get_input;
-
-               memset(&get_input, 0, sizeof(TelSatGetInputInd));
-
-               g_variant_get(parameters, "(iibbbsiiisi)", &get_input.command_id, &get_input.input_char_mode, &get_input.is_numeric, &get_input.is_help_info_available, &get_input.is_echo_input,
-                       &get_input.text.string, &get_input.text.string_len, &get_input.resp_len.max, &get_input.resp_len.min, &get_input.default_text.string, &get_input.default_text.string_len);
-
-               dbg("command id(%d)", get_input.command_id);
-               dbg("input character mode(%d)", get_input.input_char_mode);
-               dbg("numeric(%d)", get_input.is_numeric);
-               dbg("help info avaiable(%d)", get_input.is_help_info_available);
-               dbg("echo input(%d)", get_input.is_echo_input);
-               dbg("text(%s)", get_input.text.string);
-               dbg("text length(%d)", get_input.text.string_len);
-               dbg("response length max(%d)", get_input.resp_len.max);
-               dbg("response length min(%d)", get_input.resp_len.min);
-               dbg("default text(%s)", get_input.default_text.string);
-               dbg("default text length(%d)", get_input.default_text.string_len);
-
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &get_input);
-       }
-       else if (!g_strcmp0(signal_name, "SendSMS")) {
-               TelSatSendSmsIndSmsData send_sms;
-               GVariant *tpdu_data;
-               gchar* text;
-               gint text_len;
-
-               memset(&send_sms, 0, sizeof(TelSatSendSmsIndSmsData));
-
-               g_variant_get(parameters, "(isibiisii@vi)", &send_sms.command_id, &text, &text_len, &send_sms.is_packing_required, &send_sms.address.ton, &send_sms.address.npi,
-                                       &send_sms.address.dialing_number, &send_sms.address.dialing_number_len, &send_sms.sms_tpdu.tpdu_type, &tpdu_data, &send_sms.sms_tpdu.data_len);
-
-               if (tpdu_data) {
-                       int index = 0;
-                       guchar data;
-                       GVariantIter *iter = NULL;
-                       GVariant *inner_gv = NULL;
-
-                       inner_gv = g_variant_get_variant(tpdu_data);
-                       dbg("tpdu data exist type_format(%s)", g_variant_get_type_string(inner_gv));
-
-                       g_variant_get(inner_gv, "ay", &iter);
-                       while ( g_variant_iter_loop (iter, "y", &data)) {
-                               dbg("index(%d) data(%c)", index, data);
-                               send_sms.sms_tpdu.data[index] = data;
-                               index++;
-                       }
-                       g_variant_iter_free(iter);
-                       g_variant_unref(inner_gv);
-               }
-
-               dbg("command id(%d)", send_sms.command_id);
-               dbg("packing required(%d)", send_sms.is_packing_required);
-               dbg("address ton(%d)", send_sms.address.ton);
-               dbg("address npi(%d)", send_sms.address.npi);
-               dbg("address dialing number (%s)", send_sms.address.dialing_number);
-               dbg("address number length (%d)", send_sms.address.dialing_number_len);
-               dbg("tpdu type (%d)", send_sms.sms_tpdu.tpdu_type);
-               dbg("tpdu length (%d)", send_sms.sms_tpdu.data_len);
-
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &send_sms);
-       }
-       else if (!g_strcmp0(signal_name, "SetupEventList")) {
-               int g_index = 0;
-               gint event_cnt;
-               GVariant *evt_table;
-               TelSatEventListData event_list;
-
-               memset(&event_list, 0, sizeof(TelSatEventListData));
-
-               g_variant_get(parameters, "(i@v)", &event_cnt, &evt_table);
-
-               if (evt_table) {
-                       guchar data;
-                       GVariantIter *iter = NULL;
-                       GVariant *inner_gv = NULL;
-
-                       inner_gv = g_variant_get_variant(evt_table);
-                       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("g_index(%d) event(%d)", g_index, data);
-                               g_event_list[g_index] = data;
-
-                               if (data == TEL_SAT_EVENT_IDLE_SCREEN_AVAILABLE) {
-                                       event_list.is_idle_screen_available = 1;
-                               }
-                               else if (data == TEL_SAT_EVENT_LANGUAGE_SELECTION) {
-                                       event_list.is_language_selection = 1;
-                               }
-                               else if (data == TEL_SAT_EVENT_BROWSER_TERMINATION) {
-                                       event_list.is_browser_termination = 1;
-                               }
-                               else if (data == TEL_SAT_EVENT_DATA_AVAILABLE) {
-                                       event_list.is_data_available = 1;
-                               }
-                               else if (data == TEL_SAT_EVENT_CHANNEL_STATUS) {
-                                       event_list.is_channel_status = 1;
-                               }
-                               g_index++;
-                       }
-                       //while end
-                       g_variant_iter_free(iter);
-                       g_variant_unref(inner_gv);
-               }
-
-               dbg("event list cnt(%d)", event_cnt);
-
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &event_list);
-       }
-       else if (!g_strcmp0(signal_name, "Refresh")) {
-               TelSatRefreshInd refresh_info;
-               gint file_cnt = 0;
-               GVariant *file_list = NULL;
-
-               memset(&refresh_info, 0, sizeof(TelSatRefreshInd));
-
-               g_variant_get(parameters, "(ii@v)", &refresh_info.command_id, &refresh_info.refresh_mode, &file_list);
-
-               if (file_list) {
-                       int g_index = 0;
-                       guchar data;
-                       GVariantIter *iter = NULL;
-                       GVariant *inner_gv = NULL;
-
-                       inner_gv = g_variant_get_variant(file_list);
-                       dbg("file 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("g_index(%d) file id(%d)", g_index, data);
-                               /* TODO: Use TelSimFileID from tel_sim.h */
-                               //refresh_info.file_id[g_index] = data;
-                               g_index++;
-                       }
-                       file_cnt = g_index;
-
-                       //while end
-                       g_variant_iter_free(iter);
-                       g_variant_unref(inner_gv);
-               }
-               refresh_info.file_count = file_cnt;
-
-               dbg("refresh event/file cnt(%d)", refresh_info.file_count);
-
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &refresh_info);
-       }
-       else if (!g_strcmp0(signal_name, "SendDtmf")) {
-               TelSatSendDtmfIndDtmfData send_dtmf;
-
-               gint command_id = 0;
-               gint text_len = 0;
-               gchar *text = NULL;
-
-               memset(&send_dtmf, 0, sizeof(TelSatSendDtmfIndDtmfData));
-
-               g_variant_get(parameters, "(isisi)", &send_dtmf.command_id, &text, &text_len, &send_dtmf.dtmf_string.string, &send_dtmf.dtmf_string.string_len);
-
-               send_dtmf.command_id = command_id;
-               if (text_len <= 0 || g_strcmp0(text,"") == 0 ) {
-                       send_dtmf.is_hidden_mode = 1;
-               }
-
-               dbg("dtmf event command id(%d)", send_dtmf.command_id);
-               dbg("dtmf event dtmf(%s)", send_dtmf.dtmf_string.string);
-
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &send_dtmf);
-       }
-       else if (!g_strcmp0(signal_name, "EndProactiveSession")) {
-               int command_type = 0;
-
-               g_variant_get(parameters, "(i)", &command_type);
-               dbg("end session evt : command type(%d)", command_type);
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &command_type);
-       }
-       else {
-               dbg("not handled Sat noti[%s]", signal_name);
-       }
-}
-
-static GVariant* generate_event_download_data(const TelSatEventDownloadReqInfo *event_data)
-{
-       GVariant *result = NULL;
-
-       switch(event_data->event_download_type)
-       {
-               case TEL_SAT_EVENT_IDLE_SCREEN_AVAILABLE:{
-                       gboolean idle_screen;
-                       dbg("idle screen available (%d)", event_data->event_download_data.is_idle_screen_available);
-
-                       idle_screen = event_data->event_download_data.is_idle_screen_available;
-                       result = g_variant_new("(b)", idle_screen);
-               } break;
-               case TEL_SAT_EVENT_LANGUAGE_SELECTION:{
-                       gint selected_language;
-                       dbg("selected language (%d)", event_data->event_download_data.language_selection_event_req_info);
-
-                       selected_language = event_data->event_download_data.language_selection_event_req_info;
-                       result = g_variant_new("(i)", selected_language);
-               } break;
-               case TEL_SAT_EVENT_BROWSER_TERMINATION:{
-                       gint browser_termination_cause;
-                       dbg("Cause of browser termination (%d)", event_data->event_download_data.browser_termination_event_req_info);
+#include "tapi_common.h"
+#include "TapiUtility.h"
+#include "TelSat.h"
 
-                       browser_termination_cause = event_data->event_download_data.browser_termination_event_req_info;
-                       result = g_variant_new("(i)", browser_termination_cause);
-               } break;
-               case TEL_SAT_EVENT_DATA_AVAILABLE:
-               case TEL_SAT_EVENT_CHANNEL_STATUS:
-               default :
-                       dbg("not support download event (%d)", event_data->event_download_type);
-                       result = g_variant_new("()");
-                       break;
-       }
+#include "common.h"
+#include "tapi_log.h"
+#include "ITapiSat.h"
 
-       return result;
-}
+extern TelSatEventDownloadType_t g_event_list[TAPI_SAT_EVENT_LIST_MAX_COUNT];
 
-static GVariant* generate_app_exec_result_data(TelSatAppsRetInfo *result_info)
+static GVariant* _tapi_sat_gen_app_exec_result_data(TelSatAppsRetInfo_t *result_info)
 {
        GVariant *result = NULL;
 
-       switch(result_info->command_type)
+       switch(result_info->commandType)
        {
-               case TEL_SAT_PROATV_CMD_SETUP_MENU:{
+               case TAPI_SAT_CMD_TYPE_SETUP_MENU:{
                        gint exec_result;
                        dbg("setup menu : result format (i)");
 
-                       exec_result = result_info->apps_ret.setup_menu_resp;
+                       exec_result = result_info->appsRet.setupMenu.resp;
                        result = g_variant_new("(i)", exec_result);
                } break;
-               case TEL_SAT_PROATV_CMD_REFRESH:{
+               case TAPI_SAT_CMD_TYPE_REFRESH:{
                        gint app_type, exec_result;
                        dbg("refresh : result format (ii)");
 
-                       app_type = result_info->apps_ret.refresh.app_type;
-                       exec_result = result_info->apps_ret.refresh.resp;
+                       app_type = result_info->appsRet.refresh.appType;
+                       exec_result = result_info->appsRet.refresh.resp;
                        result = g_variant_new("(ii)", app_type, exec_result);
                } break;
-               case TEL_SAT_PROATV_CMD_SETUP_CALL:{
+               case TAPI_SAT_CMD_TYPE_SETUP_CALL:{
                        gint exec_result, me_problem, call_ctrl_problem, call_cause;
                        dbg("setup call : result format (iiii)");
 
-                       exec_result = result_info->apps_ret.setup_call.resp;
-                       me_problem = result_info->apps_ret.setup_call.me_problem;
-                       call_ctrl_problem = result_info->apps_ret.setup_call.permanent_call_ctrl_problem;
-                       /* TODO: need to confirm call_cause */
-                       //call_cause = result_info->apps_ret.setup_call.call_cause;
-                       call_cause = 0;
+                       exec_result = result_info->appsRet.setupCall.resp;
+                       me_problem = result_info->appsRet.setupCall.meProblem;
+                       call_ctrl_problem = result_info->appsRet.setupCall.permanentCallCtrlProblem;
+                       call_cause = result_info->appsRet.setupCall.tapiCause;
                        result = g_variant_new("(iiii)", exec_result, me_problem, call_ctrl_problem, call_cause);
                } break;
-               case TEL_SAT_PROATV_CMD_SEND_SS:{
+               case TAPI_SAT_CMD_TYPE_SEND_SS:{
+                       int ss_index;
                        gint exec_result, me_problem, ss_cause, call_ctrl_problem, ss_str_len;
-                       gchar *ss_string = NULL;
-                       dbg("send ss : result format (iiisii)");
-
-                       exec_result = result_info->apps_ret.send_ss.resp;
-                       me_problem = result_info->apps_ret.send_ss.me_problem;
-                       /* TODO: need to confirm ss_cause */
-                       //ss_cause = result_info->apps_ret.send_ss.ss_cause;
-                       ss_cause = 0;
-                       call_ctrl_problem = result_info->apps_ret.send_ss.additional_call_ctrl_problem_info;
-                       ss_str_len = result_info->apps_ret.send_ss.ss_string.string_len;
-                       ss_string = g_strdup((gchar*)result_info->apps_ret.send_ss.ss_string.string);
-
-                       result = g_variant_new("(iiisii)", exec_result, me_problem, ss_cause, ss_string, ss_str_len, call_ctrl_problem);
+                       GVariantBuilder builder;
+                       GVariant *ss_str = NULL;
+                       dbg("send ss : result format (iiivii)");
+
+                       exec_result = result_info->appsRet.sendSs.resp;
+                       me_problem = result_info->appsRet.sendSs.meProblem;
+                       ss_cause = result_info->appsRet.sendSs.ssCause;
+                       call_ctrl_problem = result_info->appsRet.sendSs.additionalCallCtrlProblemInfo;
+                       ss_str_len = result_info->appsRet.sendSs.ssString.stringLen;
+
+                       g_variant_builder_init(&builder, G_VARIANT_TYPE ("ay"));
+                       for (ss_index = 0; ss_index < ss_str_len; ss_index++) {
+                               dbg("index(%d) data(%d)", ss_index, result_info->appsRet.sendSs.ssString.string[ss_index]);
+                               g_variant_builder_add(&builder, "y", result_info->appsRet.sendSs.ssString.string[ss_index]);
+                       }
+                       ss_str = g_variant_builder_end(&builder);
+
+                       result = g_variant_new("(iiivii)", exec_result, me_problem, ss_cause, ss_str, ss_str_len, call_ctrl_problem);
                } break;
-               case TEL_SAT_PROATV_CMD_SEND_USSD:{
-                       int index;
+               case TAPI_SAT_CMD_TYPE_SEND_USSD:{
+                       int ussd_index;
                        gint exec_result, me_problem, ss_cause, ussd_str_len;
-                       GVariantBuilder *builder = NULL;
+                       GVariantBuilder builder;
                        GVariant *ussd_str = NULL;
 
                        dbg("send ussd : result format (iiivi)");
 
-                       exec_result = result_info->apps_ret.send_ussd.resp;
-                       me_problem = result_info->apps_ret.send_ussd.me_problem;
-                       /* TODO: need to confirm ss_cause */
-                       //ss_cause = result_info->apps_ret.send_ussd.ss_cause;
-                       ss_cause = 0;
-                       ussd_str_len = result_info->apps_ret.send_ussd.ussd_string.string_len;
-
-                       builder = g_variant_builder_new(G_VARIANT_TYPE ("ay"));
-                       for (index = 0; index < ussd_str_len; index++) {
-                               dbg("index(%d) data(%d)", index, result_info->apps_ret.send_ussd.ussd_string.string[index]);
-                               g_variant_builder_add(builder, "y", result_info->apps_ret.send_ussd.ussd_string.string[index]);
+                       exec_result = result_info->appsRet.sendUssd.resp;
+                       me_problem = result_info->appsRet.sendUssd.meProblem;
+                       ss_cause = result_info->appsRet.sendUssd.ssCause;
+                       ussd_str_len = result_info->appsRet.sendUssd.ussdString.stringLen;
+
+                       g_variant_builder_init(&builder, G_VARIANT_TYPE ("ay"));
+                       for (ussd_index = 0; ussd_index < ussd_str_len; ussd_index++) {
+                               dbg("index(%d) data(%d)", ussd_index, result_info->appsRet.sendUssd.ussdString.string[ussd_index]);
+                               g_variant_builder_add(&builder, "y", result_info->appsRet.sendUssd.ussdString.string[ussd_index]);
                        }
-                       ussd_str = g_variant_builder_end(builder);
+                       ussd_str = g_variant_builder_end(&builder);
 
                        result = g_variant_new("(iiivi)", exec_result, me_problem, ss_cause, ussd_str, ussd_str_len);
                } break;
-               case TEL_SAT_PROATV_CMD_SEND_SMS:{
+               case TAPI_SAT_CMD_TYPE_SEND_SMS:{
                        gint exec_result;
                        dbg("send sms: result format (i)");
 
-                       exec_result = result_info->apps_ret.send_sms_resp;
+                       exec_result = result_info->appsRet.sendSms.resp;
                        result = g_variant_new("(i)", exec_result);
                } break;
-               case TEL_SAT_PROATV_CMD_SEND_DTMF:{
+               case TAPI_SAT_CMD_TYPE_SEND_DTMF:{
                        gint exec_result;
                        dbg("send DTMF: result format (i)");
 
-                       exec_result = result_info->apps_ret.send_dtmf_resp;
+                       exec_result = result_info->appsRet.sendDtmf.resp;
                        result = g_variant_new("(i)", exec_result);
                } break;
-               case TEL_SAT_PROATV_CMD_LAUNCH_BROWSER:{
+               case TAPI_SAT_CMD_TYPE_LAUNCH_BROWSER:{
                        gint exec_result, browser_problem;
                        dbg("launch browser: result format (ii)");
 
-                       exec_result = result_info->apps_ret.launch_browser.resp;
-                       browser_problem = result_info->apps_ret.launch_browser.browser_problem;
+                       exec_result = result_info->appsRet.launchBrowser.resp;
+                       browser_problem = result_info->appsRet.launchBrowser.browserProblem;
                        result = g_variant_new("(ii)", exec_result, browser_problem);
                } break;
-               case TEL_SAT_PROATV_CMD_SETUP_IDLE_MODE_TEXT:{
+               case TAPI_SAT_CMD_TYPE_SETUP_IDLE_MODE_TEXT:{
                        gint exec_result;
                        dbg("setup idle mode text: result format (i)");
 
-                       exec_result = result_info->apps_ret.setup_idle_mode_text_resp;
+                       exec_result = result_info->appsRet.setupIdleModeText.resp;
                        result = g_variant_new("(i)", exec_result);
                } break;
-               case TEL_SAT_PROATV_CMD_LANGUAGE_NOTIFICATION:{
+               case TAPI_SAT_CMD_TYPE_LANGUAGE_NOTIFICATION:{
                        gint exec_result;
                        dbg("language notification: result format (i)");
 
-                       exec_result = result_info->apps_ret.language_noti_resp;
+                       exec_result = result_info->appsRet.languageNoti.resp;
                        result = g_variant_new("(i)", exec_result);
                } break;
-               case TEL_SAT_PROATV_CMD_PROVIDE_LOCAL_INFO:{
+               case TAPI_SAT_CMD_TYPE_PROVIDE_LOCAL_INFO:{
                        gint exec_result;
                        dbg("provide local info: result format (i)");
 
-                       exec_result = result_info->apps_ret.provide_local_info.resp;
+                       exec_result = result_info->appsRet.provideLocalInfo.resp;
                        result = g_variant_new("(i)", exec_result);
                } break;
-               case TEL_SAT_PROATV_CMD_PLAY_TONE:{
+               case TAPI_SAT_CMD_TYPE_PLAY_TONE:{
                        gint exec_result;
                        dbg("play tone: result format (i)");
 
-                       exec_result = result_info->apps_ret.play_tone_resp;
+                       exec_result = result_info->appsRet.playTone.resp;
                        result = g_variant_new("(i)", exec_result);
                } break;
-               case TEL_SAT_PROATV_CMD_DISPLAY_TEXT:{
+               case TAPI_SAT_CMD_TYPE_DISPLAY_TEXT:{
                        gint exec_result, me_problem;
                        dbg("display text: result format (ii)");
 
-                       exec_result = result_info->apps_ret.display_text.resp;
-                       me_problem = result_info->apps_ret.display_text.me_problem;
+                       exec_result = result_info->appsRet.displayText.resp;
+                       me_problem = result_info->appsRet.displayText.meProblem;
                        result = g_variant_new("(ii)", exec_result, me_problem);
                } break;
                default:
-                       dbg("unhandled command type(0x%x", result_info->command_type);
+                       dbg("unhandled command type(0x%x", result_info->commandType);
+                       result = g_variant_new("()");
                        break;
        }
 
        return result;
 }
 
-static void on_response_sat_select_menu(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static GVariant* _tapi_sat_gen_event_download_data(const TelSatEventDownloadReqInfo_t *pEventData)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSatResult result = TEL_SAT_RESULT_FAILURE;
-       GError *error = NULL;
-       gint envelop_rsp;
+       GVariant *result = NULL;
 
-       /* Finish and extract the response data */
-       telephony_sat_call_select_menu_finish(handle->sat_proxy,
-                                               (gint *)&result, &envelop_rsp, res, &error);
+       switch(pEventData->eventDownloadType)
+       {
+               case TAPI_EVENT_SAT_DW_TYPE_IDLE_SCREEN_AVAILABLE:{
+                       gboolean idle_screen;
+                       dbg("idle screen available (%d)", pEventData->u.bIdleScreenAvailable);
 
-       /* Process Response data */
-       CHECK_DEINIT(error, rsp_cb_data, result);
+                       idle_screen = pEventData->u.bIdleScreenAvailable;
+                       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);
 
-       if (result != TEL_SAT_RESULT_SUCCESS) {
-               err("Failed to select menu item - result: [%d] envelop response: [%d]", result, envelop_rsp);
+                       selected_language = pEventData->u.languageSelectionEventReqInfo.language;
+                       result = g_variant_new("(i)", selected_language);
+               } break;
+               case TAPI_EVENT_SAT_DW_TYPE_BROWSER_TERMINATION:{
+                       gint browser_termination_cause;
+                       dbg("Cause of browser termination (%d)", pEventData->u.browserTerminationEventReqInfo.browserTerminationCause);
 
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-               return;
+                       browser_termination_cause = pEventData->u.browserTerminationEventReqInfo.browserTerminationCause;
+                       result = g_variant_new("(i)", browser_termination_cause);
+               } break;
+               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);
+                       result = g_variant_new("()");
+                       break;
        }
 
-       dbg("menu selection: [SUCCESS]");
-       /* Invoke response callback */
-       RESP_CALLBACK_CALL(rsp_cb_data, result, &envelop_rsp);
+       return result;
 }
 
-/**
- *
- * To send envelope command (MENU SELECTION) to USIM.
- *
- * @return             values in enum TelReturn.
- * @param[in]          TelSatMenuSelectionReqInfo menu selection evelope data.
- * @Interface          Asynchronous.
- * @remark
- * @Refer              TelSatMenuSelectionReqInfo
- */
-EXPORT_API TelReturn tapi_sat_select_menu(TelHandle *handle, const TelSatMenuSelectionReqInfo *menu_select, TapiResponseCb callback, void *user_data)
+static void on_response_menu_selection_envelop(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
 
-       dbg("Entry");
+       GVariant *dbus_result;
+       struct tapi_resp_data *evt_cb_data = user_data;
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
+       int result = -1;
+       int envelop_rsp = 0;
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       dbg("item_identifier: [%d] is_help_requested: [%s]",
-               menu_select->item_identifier, menu_select->is_help_requested ? "HELP" : "NO HELP");
+       g_variant_get (dbus_result, "(ii)", &result, &envelop_rsp);
+       dbg("menu selection envelop result(%d) envelop response(%d)", result, envelop_rsp);
 
-       telephony_sat_call_select_menu(handle->sat_proxy, menu_select->item_identifier,
-                                       menu_select->is_help_requested,
-                                       NULL,
-                                       on_response_sat_select_menu,
-                                       rsp_cb_data);
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &envelop_rsp, evt_cb_data->user_data);
+       }
 
-       return TEL_RETURN_SUCCESS;
+       g_variant_unref(dbus_result);
+       g_free(evt_cb_data);
 }
 
-static void on_response_sat_download_event(GObject *source_object, GAsyncResult *res, gpointer user_data)
+static void on_response_download_event_envelop(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSatResult result = TEL_SAT_RESULT_FAILURE;
        GError *error = NULL;
-       gint envelop_rsp;
+       GDBusConnection *conn = NULL;
+
+       GVariant *dbus_result;
+       struct tapi_resp_data *evt_cb_data = user_data;
 
-       /* Finish and extract the response data */
-       telephony_sat_call_download_event_finish(handle->sat_proxy,
-                                               (gint *)&result, &envelop_rsp, res, &error);
+       int result = -1;
+       int envelop_rsp = 0;
 
-       /* Process Response data */
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       if (result != TEL_SAT_RESULT_SUCCESS) {
-               err("Failed to download event - result: [%d] envelop response: [%d]", result, envelop_rsp);
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-               return;
+       g_variant_get (dbus_result, "(ii)", &result, &envelop_rsp);
+       dbg("download event envelop result(%d) envelop response(%d)", result, envelop_rsp);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &envelop_rsp, evt_cb_data->user_data);
        }
 
-       dbg("download event: [SUCCESS]");
-       /* Invoke response callback */
-       RESP_CALLBACK_CALL(rsp_cb_data, result, &envelop_rsp);
+       g_variant_unref(dbus_result);
+       g_free(evt_cb_data);
+}
+
+/**
+ *
+ * To send envelope command (MENU SELECTION) to USIM.
+ *
+ * @return             values in enum TapiResult_t.
+ * @param[in]          TelSatMenuSelectionReqInfo_t    menu selection evelope data.
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer              TelSatMenuSelectionReqInfo_t
+ */
+
+EXPORT_API int tel_select_sat_menu(TapiHandle *handle, const TelSatMenuSelectionReqInfo_t *pMenuSelect, tapi_response_cb callback, void *user_data)
+{
+       gint item_id;
+       gboolean help_req;
+       GVariant *inparam = NULL;
+       struct tapi_resp_data *evt_cb_data = NULL;
+
+       dbg("Func Entrance ");
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle->dbus_connection, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(pMenuSelect, TAPI_API_INVALID_PTR);
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       item_id = pMenuSelect->itemIdentifier;
+       help_req = ( (pMenuSelect->bIsHelpRequested != 0) ? TRUE : FALSE);
+       dbg("item id(%d) help request(%d)", item_id, help_req);
+       inparam = g_variant_new("(ib)", item_id, help_req);
+
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SAT_INTERFACE, "SelectMenu", inparam, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT,
+                       handle->ca, on_response_menu_selection_envelop, evt_cb_data);
+
+       g_variant_unref(inparam);
+
+       return TAPI_API_SUCCESS;
 }
 
 /**
  *
  * API to send event download to SIM.
  *
- * @return             values in enum TelReturn.
- * @param[in]          TelSatEventDownloadReqInfo      event download data.
+ * @return             values in enum TapiResult_t.
+ * @param[in]          TelSatEventDownloadReqInfo_t    event download data.
  * @Interface          Asynchronous.
  * @remark
- * @Refer              TelSatEventDownloadReqInfo
+ * @Refer              TelSatEventDownloadReqInfo_t
  */
-EXPORT_API TelReturn tapi_sat_download_event(TelHandle *handle,
-       const TelSatEventDownloadReqInfo *event_data,
-       TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_download_sat_event(TapiHandle *handle, const TelSatEventDownloadReqInfo_t *pEventData, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data;
-       GVariant *download_data = NULL;
        gboolean evt_check = FALSE;
        int g_index = 0;
+       gint event_download_type, src_dev, dest_dev;
+       GVariant *download_data = NULL;
 
-       dbg("Entry");
+       GVariant *inparam = NULL;
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && event_data && callback, TEL_RETURN_INVALID_PARAMETER);
+       dbg("Func Entrance ");
 
-       if (event_data->event_download_type != TEL_SAT_EVENT_BROWSER_TERMINATION) {
-               for (g_index = 0; g_event_list[g_index] > 0; g_index++) {
-                       if (g_event_list[g_index] == event_data->event_download_type) {
-                               dbg("event (%d) shoud be passed to sim", event_data->event_download_type);
-                               evt_check = TRUE;
-                               break;
-                       }
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle->dbus_connection, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(pEventData, TAPI_API_INVALID_PTR);
+
+       for(g_index = 0; g_event_list[g_index] > 0; g_index++){
+               if(pEventData->eventDownloadType == TAPI_EVENT_SAT_DW_TYPE_BROWSER_TERMINATION || g_event_list[g_index] == pEventData->eventDownloadType ){
+                       dbg("event (%d) shoud be passed to sim");
+                       evt_check = TRUE;
                }
        }
-       else
-               evt_check = TRUE;
 
-       if (!evt_check) {
-               dbg("Request (%d) not initiated from SIM", event_data->event_download_type);
-               return TEL_RETURN_OPERATION_NOT_SUPPORTED;
+       if(!evt_check){
+               dbg("sim does not request event(%d)", pEventData->eventDownloadType);
+               return TAPI_API_SAT_EVENT_NOT_REQUIRED_BY_USIM;
        }
 
-       download_data = generate_event_download_data(event_data);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       event_download_type = pEventData->eventDownloadType;
+       src_dev = TAPI_SAT_DEVICE_ID_ME;
+       dest_dev = TAPI_SAT_DEVICE_ID_SIM;
+       download_data = _tapi_sat_gen_event_download_data(pEventData);
+       TAPI_RET_ERR_NUM_IF_FAIL(download_data, TAPI_API_INVALID_PTR);
 
-       telephony_sat_call_download_event(handle->sat_proxy,
-               event_data->event_download_type, TEL_SAT_DEVICE_ID_ME,
-               TEL_SAT_DEVICE_ID_SIM, download_data, NULL,
-               on_response_sat_download_event, rsp_cb_data);
+       dbg("event type(%d)", event_download_type);
+       inparam = g_variant_new("(iiiv)", event_download_type, src_dev, dest_dev, download_data);
 
-       return TEL_RETURN_SUCCESS;
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SAT_INTERFACE, "DownloadEvent", inparam, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT,
+                       handle->ca, on_response_download_event_envelop, evt_cb_data);
+
+       g_variant_unref(inparam);
+
+       return TAPI_API_SUCCESS;
 }
 
 /**
  *
  * API to get main menu information.
  *
- * @return             values in enum TelReturn.
- * @param[out] TelSatSetupMenuInfo     main menu data.
+ * @return             values in enum TapiResult_t.
+ * @param[out]         TelSatSetupMenuInfo_t   main menu data.
  * @Interface          Synchronous.
  * @remark
- * @Refer              TelSatSetupMenuInfo
+ * @Refer              TelSatSetupMenuInfo_t
  */
-EXPORT_API TelReturn tapi_sat_get_main_menu_info(TelHandle *handle, TelSatSetupMenuInfo *main_menu)
+EXPORT_API int tel_get_sat_main_menu_info(TapiHandle *handle, TelSatSetupMenuInfo_t *pMainMenu)
 {
-       GError *error = NULL;
-       TelReturn result = TEL_RETURN_SUCCESS;
-       gint sat_res;
+       GError *error;
+       GVariant *rst = NULL;
+
        gchar *title;
+       gint result, command_id, item_cnt;
+       gboolean b_present, b_helpinfo, b_updated;
        GVariant *items = NULL;
+#if defined(TIZEN_SUPPORT_SAT_ICON)
+       GVariant *icon_id = NULL;
+       GVariant *icon_list = NULL;
+       int sat_index = 0, icon_index = 0;
+       /* Used to get icon data */
        GVariant *unbox;
-       GVariantIter *iter;
-       gchar *item_str;
-       gint item_id;
-       int index = 0;
-
-       dbg("Entry");
-
-       TEL_RETURN_IF_CHECK_FAIL(handle, TEL_RETURN_INVALID_PARAMETER);
-
-       telephony_sat_call_get_main_menu_info_sync(handle->sat_proxy,
-               &sat_res, &main_menu->command_id, &main_menu->is_main_menu_present,
-               (gchar **)&title, &items, (gint *)&main_menu->sat_main_menu_item_count,
-               &main_menu->is_sat_main_menu_help_info, &main_menu->is_updated_sat_main_menu,
-               NULL, &error);
-       if (error) {
-               dbg("dbus error = %d (%s)", error->code, error->message);
-               g_error_free(error);
-               result = TEL_RETURN_FAILURE;
-               goto out;
+       gboolean is_exist;
+       gint icon_quali, icon_identifier, width, height, ics, icon_data_len;
+       gchar *icon_data = NULL;
+       /* Used to get icon list data */
+       GVariant *unbox_list, *unbox_list_info ;
+       GVariantIter *iter, *iter2;
+       GVariant *icon_list_info;
+       gboolean is_list_exist;
+       gint icon_list_quali, list_cnt, icon_list_identifier, list_width, list_height, list_ics, icon_list_data_len;
+       gchar *icon_list_data = NULL;
+#else
+       int sat_index = 0;
+#endif
+       dbg("Func Entrance ");
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle->dbus_connection, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(pMainMenu, TAPI_API_INVALID_PTR);
+
+       memset(pMainMenu, 0, sizeof(TelSatSetupMenuInfo_t));
+
+       error = NULL;
+       rst = g_dbus_connection_call_sync(handle->dbus_connection, DBUS_TELEPHONY_SERVICE , handle->path,
+                       DBUS_TELEPHONY_SAT_INTERFACE, "GetMainMenuInfo", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca, &error);
+
+       if(!rst){
+               dbg( "error to get main menu(%s)", error->message);
+               g_error_free (error);
+               return TAPI_API_OPERATION_FAILED;
        }
-       memcpy(main_menu->sat_main_title, title, TEL_SAT_DEF_TITLE_LEN_MAX);
-       dbg("Command ID: [%d] Menu: [%s] Title: [%s] count: [%d]",
-               main_menu->command_id, main_menu->is_main_menu_present ? "PRESENT" : "NOT PRESENT",
-               main_menu->sat_main_title, main_menu->sat_main_menu_item_count);
-       if (items && main_menu->sat_main_menu_item_count > 0) {
+
+       dbg("menu_info type_format(%s)", g_variant_get_type_string(rst));
+
+#if defined(TIZEN_SUPPORT_SAT_ICON)
+       g_variant_get(rst, "(iibs@vibb@v@v)", &result, &command_id, &b_present, &title, &items, &item_cnt,
+                       &b_helpinfo, &b_updated, &icon_id, &icon_list);
+#else
+       g_variant_get(rst, "(iibs@vibb)", &result, &command_id, &b_present, &title, &items, &item_cnt,
+                       &b_helpinfo, &b_updated);
+#endif
+       g_variant_unref(rst);
+
+       pMainMenu->commandId = command_id;
+       pMainMenu->bIsMainMenuPresent = (b_present ? 1 : 0);
+
+       if(strlen(title) > TAPI_SAT_DEF_TITLE_LEN_MAX+1){
+               memcpy(pMainMenu->satMainTitle, title, TAPI_SAT_DEF_TITLE_LEN_MAX+1);
+       }
+       else{
+               memcpy(pMainMenu->satMainTitle, title, strlen(title));
+       }
+       g_free(title);
+
+       pMainMenu->satMainMenuNum = item_cnt;
+       if(items && item_cnt > 0){
+               GVariant *unbox;
+               GVariantIter *iter;
+
+               gchar *item_str;
+               gint item_id;
                unbox = g_variant_get_variant(items);
                dbg("items(%p) items type_format(%s)", items, g_variant_get_type_string(unbox));
 
                g_variant_get(unbox, "a(si)", &iter);
-               while (g_variant_iter_loop(iter,"(si)",&item_str, &item_id)) {
-                       main_menu->sat_main_menu_item[index].item_id = item_id;
+               while(g_variant_iter_loop(iter,"(si)",&item_str, &item_id)){
+                       pMainMenu->satMainMenuItem[sat_index].itemId = item_id;
 
-                       if (strlen(item_str) > TEL_SAT_DEF_ITEM_STR_LEN_MAX + 6) {
-                               memcpy(main_menu->sat_main_menu_item[index].item_string, item_str, TEL_SAT_DEF_ITEM_STR_LEN_MAX + 6);
+                       if(strlen(item_str) > TAPI_SAT_DEF_ITEM_STR_LEN_MAX + 6){
+                               memcpy(pMainMenu->satMainMenuItem[sat_index].itemString, item_str, TAPI_SAT_DEF_ITEM_STR_LEN_MAX + 6);
                        }
-                       else {
-                               memcpy(main_menu->sat_main_menu_item[index].item_string, item_str, strlen(item_str));
+                       else{
+                               memcpy(pMainMenu->satMainMenuItem[sat_index].itemString, item_str, strlen(item_str));
                        }
 
-                       dbg("item index(%d) id(%d) str(%s)",index, main_menu->sat_main_menu_item[index].item_id, main_menu->sat_main_menu_item[index].item_string);
-                       index++;
+                       dbg("item index(%d) id(%d) str(%s)",sat_index, pMainMenu->satMainMenuItem[sat_index].itemId, pMainMenu->satMainMenuItem[sat_index].itemString);
+                       //dbg("item index(%d) id(%d) str(%s)",index, item_id, item_str);
+                       sat_index++;
                }
                g_variant_iter_free(iter);
        }
+       pMainMenu->bIsSatMainMenuHelpInfo = (b_helpinfo ? 1 : 0);
+       pMainMenu->bIsUpdatedSatMainMenu = (b_updated ? 1 : 0);
 
-       if (sat_res != TEL_SAT_RESULT_SUCCESS)
-               result = TEL_RETURN_FAILURE;
+#if defined(TIZEN_SUPPORT_SAT_ICON)
+       if(icon_id) {
+               unbox = g_variant_get_variant(icon_id);
+               g_variant_get(unbox, "a(biiiiiis)", &iter);
 
-out:
-       return result;
+               while(g_variant_iter_loop(iter,"(biiiiiis)", &is_exist, &icon_quali, &icon_identifier, &width, &height, &ics, &icon_data_len, &icon_data)){
+                       if(!is_exist)
+                               break;
+                       pMainMenu->iconId.bIsPresent = is_exist;
+                       pMainMenu->iconId.iconQualifier = icon_quali;
+                       pMainMenu->iconId.iconIdentifier = icon_identifier;
+                       pMainMenu->iconId.iconInfo.width = width;
+                       pMainMenu->iconId.iconInfo.height = height;
+                       pMainMenu->iconId.iconInfo.ics = ics;
+                       if(icon_data_len > 0) {
+                               pMainMenu->iconId.iconInfo.iconDataLen = icon_data_len;
+                               memcpy(pMainMenu->iconId.iconInfo.iconFile, icon_data, icon_data_len);
+                       }
+                       dbg("icon exist(%d), icon_quali: (%d), icon_id: (%d), width: (%d), height: (%d), ics: (%d), icon_data_len: (%d)", pMainMenu->iconId.bIsPresent, pMainMenu->iconId.iconQualifier, pMainMenu->iconId.iconIdentifier, pMainMenu->iconId.iconInfo.width,
+                               pMainMenu->iconId.iconInfo.height, pMainMenu->iconId.iconInfo.ics, pMainMenu->iconId.iconInfo.iconDataLen);
+               }
+               g_variant_iter_free(iter);
+       }
+
+       if(icon_list){
+               unbox_list = g_variant_get_variant(icon_list);
+               g_variant_get(unbox_list, "a(biiv)", &iter);
+
+               while(g_variant_iter_loop(iter,"(biiv)", &is_list_exist, &icon_list_quali, &list_cnt, &icon_list_info)){
+                       if(!is_list_exist)
+                               break;
+                       pMainMenu->iconIdList.bIsPresent = is_list_exist;
+                       pMainMenu->iconIdList.iconListQualifier = icon_list_quali;
+                       pMainMenu->iconIdList.iconCount = list_cnt;
+
+                       unbox_list_info = g_variant_get_variant(icon_list_info);
+                       g_variant_get(unbox_list_info, "a(iiiiis)", &iter2);
+
+                       while(g_variant_iter_loop(iter2,"(iiiiis)",&icon_list_identifier, &list_width, &list_height, &list_ics, &icon_list_data_len, &icon_list_data)){
+                               pMainMenu->iconIdList.iconIdentifierList[icon_index]= icon_identifier;
+                               pMainMenu->iconIdList.iconInfo[icon_index].width = list_width;
+                               pMainMenu->iconIdList.iconInfo[icon_index].height = list_height;
+                               pMainMenu->iconIdList.iconInfo[icon_index].ics = list_ics;
+                               if(icon_list_data_len > 0) {
+                                       pMainMenu->iconIdList.iconInfo[icon_index].iconDataLen = icon_list_data_len;
+                                       memcpy(pMainMenu->iconIdList.iconInfo[icon_index].iconFile, icon_list_data, icon_list_data_len);
+                               }
+                               icon_index++;
+                       }
+                       g_variant_iter_free(iter2);
+               }
+               g_variant_iter_free(iter);
+       }
+#endif
+       dbg("result (%d)", result);
+       dbg("command id (%d)", pMainMenu->commandId);
+       dbg("menu present (%d)", pMainMenu->bIsMainMenuPresent);
+       dbg("menu title (%s)", pMainMenu->satMainTitle);
+       dbg("item cnt (%d)", pMainMenu->satMainMenuNum);
+       dbg("menu help info (%d)", pMainMenu->bIsSatMainMenuHelpInfo);
+       dbg("menu updated (%d)", pMainMenu->bIsUpdatedSatMainMenu);
+
+       return TAPI_API_SUCCESS;
 }
 
 /**
  *
  * API to send UI display status.
  *
- * @return             values in enum TelReturn.
- * @param[in]          TelSatUiDisplayStatusType       display status data.
*  command_id command identifier
- * @Interface          Synchronous.
+ * @return             values in enum TapiResult_t.
+ * @param[in]          TelSatUiDisplayStatusType_t     display status data.
command_id    command identifier
+ * @Interface          Asynchronous.
  * @remark
- * @Refer              TelSatUiDisplayStatusType
+ * @Refer              TelSatUiDisplayStatusType_t
  */
-EXPORT_API TelReturn tapi_sat_send_ui_display_status(TelHandle *handle, int command_id, TelSatUiDisplayStatusType status)
+EXPORT_API int tel_send_sat_ui_display_status(TapiHandle *handle, int commandId, TelSatUiDisplayStatusType_t status)
 {
-       GError *error = NULL;
-       TelReturn result = TEL_RETURN_SUCCESS;
-       gint sat_res;
+       GError *error;
+       GVariant *rst = NULL;
+
+       gint result, command_id;
+       gboolean display_status;
+       GVariant *inparam = NULL;
 
-       dbg("Entry");
+       dbg("Func Entrance ");
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && command_id && status , TEL_RETURN_INVALID_PARAMETER);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle->dbus_connection, TAPI_API_INVALID_PTR);
 
-       telephony_sat_call_send_ui_display_status_sync(handle->sat_proxy,
-                                                       command_id, status, &sat_res,
-                                                       NULL, &error);
-       if (error) {
-               dbg("dbus error = %d (%s)", error->code, error->message);
-               g_error_free(error);
-               result = TEL_RETURN_FAILURE;
-               goto out;
+       command_id = commandId;
+       display_status = ( (status == TAPI_SAT_DISPLAY_SUCCESS) ? TRUE : FALSE);
+       dbg("command id(%d) display status(%d)", command_id, display_status);
+       inparam = g_variant_new("(ib)", command_id, display_status);
+
+       error = NULL;
+       rst = g_dbus_connection_call_sync(handle->dbus_connection, DBUS_TELEPHONY_SERVICE , handle->path,
+                       DBUS_TELEPHONY_SAT_INTERFACE, "SendUiDisplayStatus", inparam, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca, &error);
+
+       if(!rst){
+               dbg( "error to send ui display status(%s)", error->message);
+               g_error_free (error);
+               return TAPI_API_OPERATION_FAILED;
        }
 
-       if (sat_res != TEL_SAT_RESULT_SUCCESS)
-               result = TEL_RETURN_FAILURE;
+       dbg("send ui display status format(%s)", g_variant_get_type_string(rst));
+
+       g_variant_get(rst, "(i)", &result);
+       if(result){
+               result = TAPI_API_SUCCESS;
+       }
+       else{
+               result = TAPI_API_OPERATION_FAILED;
+       }
+       g_variant_unref(rst);
+       dbg("result (%d)", result);
 
-out:
        return result;
 }
 
@@ -778,56 +594,73 @@ out:
  *
  * API to send UI user confirmation data.
  *
- * @return             values in enum TelReturn.
+ * @return             values in enum TapiResult_t.
  * @param[in]          command_id      command identifier
* command_type        command type
* key_type            user confirmation value
* addtional_data      addtional data
* data_len            data length
- * @Interface          Synchronous.
command_type          command type
key_type                      user confirmation value
addtional_data                addtional data
data_len                      data length
+ * @Interface          Asynchronous.
  * @remark
  * @Refer
  */
-EXPORT_API TelReturn tapi_sat_send_ui_user_confirm(TelHandle *handle, TelSatUiUserConfirmInfo *user_confirm_data)
+EXPORT_API int tel_send_sat_ui_user_confirm(TapiHandle *handle, TelSatUiUserConfirmInfo_t *pUserConfirmData)
 {
-       GError *error = NULL;
-       TelReturn result = TEL_RETURN_SUCCESS;
-       gint sat_res, data_len;
-       GVariantBuilder *builder = NULL;
-       GVariant *add_data_var =  NULL;
-       int index = 0;
+       GError *error;
+       GVariant *rst = NULL;
+       GVariantBuilder builder;
+       GVariant *inner_gv = NULL;
+
+       int sat_index = 0;
        gchar *data;
+       gint result, command_id, command_type, key_type, data_len;
+       GVariant *inparam = NULL;
 
-       dbg("Entry");
+       dbg("Func Entrance ");
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && user_confirm_data->command_id && user_confirm_data->command_type
-                                                                  && user_confirm_data->key_type && user_confirm_data->additional_data, TEL_RETURN_INVALID_PARAMETER);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle->dbus_connection, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(pUserConfirmData, TAPI_API_INVALID_PTR);
 
-       data = (gchar *)user_confirm_data->additional_data;
-       data_len = user_confirm_data->data_len;
+       command_id = pUserConfirmData->commandId;
+       command_type = pUserConfirmData->commandType;
+       key_type = pUserConfirmData->keyType;
+       data = (gchar *)pUserConfirmData->pAdditionalData;
+       data_len = pUserConfirmData->dataLen;
 
-       builder = g_variant_builder_new(G_VARIANT_TYPE ("ay"));
-       for (index = 0; index < data_len; index++) {
-               dbg("index(%d) data(%d)", index, data[index]);
-               g_variant_builder_add(builder, "y", data[index]);
+       g_variant_builder_init(&builder, G_VARIANT_TYPE ("ay"));
+       for (sat_index = 0; sat_index < data_len; sat_index++) {
+               dbg("index(%d) data(%d)", sat_index, data[sat_index]);
+               g_variant_builder_add(&builder, "y", data[sat_index]);
        }
-       add_data_var = g_variant_builder_end(builder);
-
-       telephony_sat_call_send_user_confirm_sync(handle->sat_proxy,
-                                                       user_confirm_data->command_id, user_confirm_data->command_type,
-                                                       user_confirm_data->key_type, add_data_var, &sat_res,
-                                                       NULL, &error);
-       if (error) {
-               dbg("dbus error = %d (%s)", error->code, error->message);
-               g_error_free(error);
-               result = TEL_RETURN_FAILURE;
-               goto out;
+       inner_gv = g_variant_builder_end(&builder);
+
+       dbg("command id(%d) command type(%d) key type(%d) data len(%d)",
+                       command_id, command_type, key_type, data_len);
+       inparam = g_variant_new("(iiiv)", command_id, command_type, key_type, inner_gv);
+
+       error = NULL;
+       rst = g_dbus_connection_call_sync(handle->dbus_connection, DBUS_TELEPHONY_SERVICE , handle->path,
+                       DBUS_TELEPHONY_SAT_INTERFACE, "SendUserConfirm", inparam, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca, &error);
+
+       if(!rst){
+               dbg( "error to send ui user confirm(%s)", error->message);
+               g_error_free (error);
+               return TAPI_API_OPERATION_FAILED;
        }
 
-       if (sat_res != TEL_SAT_RESULT_SUCCESS)
-               result = TEL_RETURN_FAILURE;
+       dbg("send ui user confirm format(%s)", g_variant_get_type_string(rst));
+
+       g_variant_get(rst, "(i)", &result);
+       if(result){
+               result = TAPI_API_SUCCESS;
+       }
+       else{
+               result = TAPI_API_OPERATION_FAILED;
+       }
+       g_variant_unref(rst);
+       dbg("result (%d)", result);
 
-out:
        return result;
 }
 
@@ -835,38 +668,57 @@ out:
  *
  * API to send application excution result.
  *
- * @return             values in enum TelReturn.
- * @param[in]          TelSatAppsRetInfo       application result information data.
- * @Interface          Synchronous.
+ * @return             values in enum TapiResult_t.
+ * @param[in]          TelSatAppsRetInfo_t     application result information data.
+ * @Interface          Asynchronous.
  * @remark
- * @Refer              TelSatAppsRetInfo
+ * @Refer              TelSatAppsRetInfo_t
  */
-EXPORT_API TelReturn tapi_sat_send_app_exec_result(TelHandle *handle, TelSatAppsRetInfo *app_ret_info)
+EXPORT_API int tel_send_sat_app_exec_result(TapiHandle *handle, TelSatAppsRetInfo_t *pAppRetInfo)
 {
-       GError *error = NULL;
-       TelReturn result = TEL_RETURN_SUCCESS;
-       gint sat_res;
+       GError *error;
+       GVariant *rst = NULL;
+
+       gint result, command_id, command_type;
        GVariant *app_exec_result = NULL;
+       GVariant *inparam = NULL;
+
+       dbg("Func Entrance ");
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle->dbus_connection, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(pAppRetInfo, TAPI_API_INVALID_PTR);
 
-       dbg("Entry");
+       command_id = pAppRetInfo->commandId;
+       command_type = pAppRetInfo->commandType;
+       app_exec_result = _tapi_sat_gen_app_exec_result_data(pAppRetInfo);
+       TAPI_RET_ERR_NUM_IF_FAIL(app_exec_result, TAPI_API_INVALID_PTR);
 
-       app_exec_result = generate_app_exec_result_data(app_ret_info);
+       dbg("command id(%d) command type(%d) exec_result(%s)", command_id, command_type, g_variant_get_type_string(app_exec_result));
+       inparam = g_variant_new("(iiv)", command_id, command_type, app_exec_result);
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && app_ret_info->command_id && app_ret_info->command_type && app_exec_result, TEL_RETURN_INVALID_PARAMETER);
+       error = NULL;
+       dbg("test (%s)", g_variant_get_type_string(inparam));
+       rst = g_dbus_connection_call_sync(handle->dbus_connection, DBUS_TELEPHONY_SERVICE , handle->path,
+                       DBUS_TELEPHONY_SAT_INTERFACE, "SendAppExecResult", inparam, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca, &error);
 
-       telephony_sat_call_send_app_exec_result_sync(handle->sat_proxy,
-                                                       app_ret_info->command_id, app_ret_info->command_type, app_exec_result, &sat_res,
-                                                       NULL, &error);
-       if (error) {
-               dbg("dbus error = %d (%s)", error->code, error->message);
-               g_error_free(error);
-               result = TEL_RETURN_FAILURE;
-               goto out;
+       if(!rst){
+               dbg( "error to send app execution result(%s)", error->message);
+               g_error_free (error);
+               return TAPI_API_OPERATION_FAILED;
        }
 
-       if (sat_res != TEL_SAT_RESULT_SUCCESS)
-               result = TEL_RETURN_FAILURE;
+       dbg("send app execution result format(%s)", g_variant_get_type_string(rst));
+
+       g_variant_get(rst, "(i)", &result);
+       if(result){
+               result = TAPI_API_SUCCESS;
+       }
+       else{
+               result = TAPI_API_OPERATION_FAILED;
+       }
+       g_variant_unref(rst);
+       dbg("result (%d)", result);
 
-out:
        return result;
 }
index 0dfc8b3aa7e600db30cdcd175c25b291daf0f53d..0e5f293ecf5b468104c1164d42d0f40a23ef91a2 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
-#include "tapi_private.h"
-#include "tapi_log.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 
-#include "tapi_sim.h"
-
-#define CHECK_IF_SIM_PRESENT(status) \
-do { \
-       switch (status) { \
-       case TEL_SIM_STATUS_UNKNOWN: \
-       case TEL_SIM_STATUS_CARD_ERROR: \
-       case TEL_SIM_STATUS_CARD_NOT_PRESENT: \
-       case TEL_SIM_STATUS_CARD_REMOVED: \
-               err("SIM NOT present"); \
-               return TEL_RETURN_FAILURE; \
-       default: \
-               break; \
-       } \
-} while (0)
-
-#define CHECK_IF_SIM_INITIALIZED(status) \
-do { \
-       if (status != TEL_SIM_STATUS_SIM_INIT_COMPLETED) { \
-               err("SIM init NOT completed!!!"); \
-               return TEL_RETURN_FAILURE; \
-       } \
-} while (0)
-
-#define CHECK_LANGUAGE_VALID(language) \
-do { \
-       switch (language) { \
-               case TEL_SIM_LP_GERMAN: \
-               case TEL_SIM_LP_ENGLISH: \
-               case TEL_SIM_LP_ITALIAN: \
-               case TEL_SIM_LP_FRENCH: \
-               case TEL_SIM_LP_SPANISH: \
-               case TEL_SIM_LP_DUTCH: \
-               case TEL_SIM_LP_SWEDISH: \
-               case TEL_SIM_LP_DANISH: \
-               case TEL_SIM_LP_PORTUGUESE: \
-               case TEL_SIM_LP_FINNISH: \
-               case TEL_SIM_LP_NORWEGIAN: \
-               case TEL_SIM_LP_GREEK: \
-               case TEL_SIM_LP_TURKISH: \
-               case TEL_SIM_LP_HUNGARIAN: \
-               case TEL_SIM_LP_POLISH: \
-               case TEL_SIM_LP_KOREAN: \
-               case TEL_SIM_LP_CHINESE: \
-               case TEL_SIM_LP_RUSSIAN: \
-               case TEL_SIM_LP_JAPANESE: \
-                       break; \
-               default: \
-                       return TEL_RETURN_INVALID_PARAMETER; \
-       } \
-} while (0)
-
-static void __get_sim_status_info(TelephonySim *sim_proxy,
-       TelSimCardStatusInfo *status_info)
-{
-       GVariant *var = telephony_sim_get_card_status(sim_proxy);
-       if (var) {
-               GVariantIter *iter = NULL;
-               GVariant *key_value;
-               const gchar *key;
-
-               g_variant_get(var, "a{sv}", &iter);
-               while (g_variant_iter_loop(iter, "{sv}", &key, &key_value)) {
-                       if (g_strcmp0(key, "status") == 0) {
-                               status_info->status = g_variant_get_int32(key_value);
-                       }
-                       else if (g_strcmp0(key, "change_status") == 0) {
-                               status_info->change_status = g_variant_get_int32(key_value);
-                       }
-               }
-               g_variant_iter_free(iter);
-       }
-       else {
-               err("var is NULL");
-               status_info->status = TEL_SIM_STATUS_UNKNOWN;
-               status_info->change_status = TEL_SIM_CHANGE_STATUS_UNKNOWN;
-       }
+#include "tapi_common.h"
+#include "TapiUtility.h"
+#include "TelSim.h"
+
+#include "common.h"
+#include "tapi_log.h"
+#include "ITapiSim.h"
+
+#define DBUS_SIM_STATUS_ERROR "SIM STATUS ERROR"
+#define DBUS_SIM_NOT_FOUND "SIM NOT FOUND"
+#define DBUS_SIM_PERM_BLOCKED "SIM PERM BLOCKED"
+#define DBUS_SIM_CARD_ERROR "SIM CARD ERROR"
+#define DBUS_SIM_NOT_INITIALIZED "SIM NOT INITIALIZED"
+#define DBUS_SIM_INIT_COMPLETED "SIM INIT COMPLETED"
+#define DBUS_SIM_LOCKED "SIM LOCKED"
+#define DBUS_SIM_NOT_READY "SIM NOT READY"
+#define DBUS_SIM_RESPONSE_DATA_ERROR "SIM RESPONSE DATA ERROR"
+#define DBUS_SIM_SERVICE_IS_DISABLED "SIM SERVICE IS DISABLED"
+#define DBUS_SIM_SERVICE_NOT_SUPPORTED_FOR_NVSIM "SERVICE NOT SUPPORTED FOR NVSIM"
+#define DBUS_SIM_ACCESS_DENIED "No access rights"
+
+#define TAPI_PIN_TIMEOUT    (350 * 1000) /* Unlimit: G_MAXINT */
+
+#define TAPI_SIM_FUNCTION_ENTER(handle) { \
+       dbg("Func Enterance. cp_name[%s]", handle->cp_name); \
 }
 
-void on_sim_property_change_handler(TelephonySim *sim,
-       GVariant *changed_properties, const gchar *invalidated_properties,
-       gpointer user_data)
-{
-       TapiEvtCbData *evt_cb_data;
-       TelHandle *handle = user_data;
-       GVariantIter *iter;
-       const gchar *key;
-       GVariant *value;
-
-       if (handle == NULL)
-               return;
-
-       if (g_variant_n_children(changed_properties) == 0)
-               return;
-
-       dbg("Properties Changed:");
-
-       g_variant_get(changed_properties, "a{sv}", &iter);
-       while (g_variant_iter_loop(iter, "{sv}", &key, &value)) {
-               char *evt_id;
-
-               dbg("%s", key);
-
-               evt_id = g_strdup_printf("%s:%s",
-                                       TELEPHONY_SIM_INTERFACE,
-                                       key);
-               /*
-                * If an event callback is registered process
-                * g-properties-changed event
-                */
-               evt_cb_data = g_hash_table_lookup(handle->evt_table,
-                                                       evt_id);
-               if (!evt_cb_data) {
-                       dbg("Application not registered on event %s",
-                                                       evt_id);
-                       g_free(evt_id);
-                       continue;
-               }
+#define TAPI_SIM_RESP_CB_ENTER(evt_cb_data) { \
+       if (evt_cb_data && evt_cb_data->handle) \
+               dbg("Func Enterance. cp_name[%s]", evt_cb_data->handle->cp_name); \
+}
 
-               if (g_strcmp0("card_status", key) == 0) {
-                       TelSimCardStatusInfo status_info = {0, };
+#define TAPI_SIM_CHECK_TAPI_STATE() { \
+       TAPI_SIM_FUNCTION_ENTER(handle); \
+       if (_tel_check_tapi_state() != 0) \
+               return TAPI_API_SERVICE_NOT_READY; \
+}
 
-                       __get_sim_status_info(sim, &status_info);
-                       dbg("SIM status changed!! SIM status: [%d], Card changed: [%d]",
-                               status_info.status, status_info.change_status);
+#define TAPI_SIM_CHECK_ERR_MSG(error) { \
+               TapiResult_t ret = TAPI_API_OPERATION_FAILED; \
+               if (error) { \
+                       ret = __check_err_msg(error->message); \
+                       g_error_free(error); \
+               } \
+               return ret; \
+}
 
-                       EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &status_info);
-               }
+#define TAPI_SIM_CALL_CBFUNC(evtcbdata, result, data) { \
+               if (evtcbdata->cb_fn) { \
+                       evtcbdata->cb_fn(evtcbdata->handle, result, data, evtcbdata->user_data); \
+               } \
+}
 
-               g_free(evt_id);
-       }
-       g_variant_iter_free(iter);
+#define TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evtcbdata) { \
+               TapiResult_t ret = TAPI_API_OPERATION_FAILED; \
+               if (error) { \
+                       ret = __check_err_msg(error->message); \
+                       g_error_free(error); \
+               } \
+               TAPI_SIM_CALL_CBFUNC(evtcbdata, ret, NULL); \
+               g_free(evtcbdata); \
+               return; \
 }
 
-EXPORT_API TelReturn tapi_sim_get_init_info(TelHandle *handle, TelSimCardStatusInfo *status_info)
+#define SIM_CHECK_ERROR(error, evt_cb_data) \
+       if (error) { \
+               warn("(%s) dbus error = %d (%s)", evt_cb_data->handle->cp_name, error->code, error->message); \
+               if (error->code == G_IO_ERROR_CANCELLED \
+                               && error->domain == G_IO_ERROR) { \
+                       /* Do not invoke callback in case of deinit TapiHandle */ \
+                       g_error_free(error); \
+                       g_free(evt_cb_data); \
+                       return; \
+               } else if (strstr(error->message, "No access rights")) { \
+                       err("Access denied"); \
+                       if (evt_cb_data->cb_fn) \
+                               evt_cb_data->cb_fn(evt_cb_data->handle, TAPI_ERROR_ACCESS_DENIED, NULL, evt_cb_data->user_data); \
+                       g_error_free(error); \
+                       g_free(evt_cb_data); \
+                       return; \
+               } else if (strstr(error->message, "Operation not supported")) { \
+                       err("Operation not supported"); \
+                       if (evt_cb_data->cb_fn) \
+                               evt_cb_data->cb_fn(evt_cb_data->handle, TAPI_ERROR_OPERATION_NOT_SUPPORTED, NULL, evt_cb_data->user_data); \
+                       g_error_free(error); \
+                       g_free(evt_cb_data); \
+                       return; \
+               } \
+       }
+
+struct tapi_sim_resp_data {
+       struct tapi_resp_data tapi_resp;
+       TapiHandle *handle;
+};
+
+static TapiResult_t __check_err_msg(gchar* err_msg)
 {
-       dbg("Entry");
-
-       TEL_RETURN_IF_CHECK_FAIL(handle && status_info, TEL_RETURN_INVALID_PARAMETER);
-
-       /* Fetch SIM Init status and Card changed information from DBUS property */
-       __get_sim_status_info(handle->sim_proxy, status_info);
-
-       dbg("SIM - Status: [%d] Change status: [%d]",
-               status_info->status, status_info->change_status);
+       TapiResult_t ret = TAPI_API_OPERATION_FAILED;
+       if (err_msg == NULL)
+               return ret;
+
+       err( "error from dbus layer. (%s)", err_msg);
+
+       if( strstr(err_msg, DBUS_SIM_NOT_FOUND) ) {
+               ret = TAPI_API_SIM_NOT_FOUND;
+       } else if( strstr(err_msg, DBUS_SIM_PERM_BLOCKED) ) {
+               ret = TAPI_API_SIM_PERM_BLOCKED;
+       } else if( strstr(err_msg, DBUS_SIM_CARD_ERROR) ) {
+               ret = TAPI_API_SIM_CARD_ERROR;
+       } else if( strstr(err_msg, DBUS_SIM_NOT_INITIALIZED) ) {
+               ret = TAPI_API_SIM_NOT_INITIALIZED;
+       } else if( strstr(err_msg, DBUS_SIM_INIT_COMPLETED) ) {
+               ret = TAPI_API_SUCCESS;
+       } else if( strstr(err_msg, DBUS_SIM_LOCKED) ) {
+               ret = TAPI_API_SIM_LOCKED;
+       } else if( strstr(err_msg, DBUS_SIM_NOT_READY) ) {
+               ret = TAPI_API_SERVICE_NOT_READY;
+       } else if( strstr(err_msg, DBUS_SIM_RESPONSE_DATA_ERROR) ) {
+               ret = TAPI_API_OPERATION_FAILED;
+       } else if( strstr(err_msg, DBUS_SIM_SERVICE_IS_DISABLED) ) {
+               ret = TAPI_API_SIM_SERVICE_IS_DISABLED;
+       } else if (strstr(err_msg, DBUS_SIM_ACCESS_DENIED)) {
+               ret = TAPI_API_ACCESS_DENIED;
+       } else if( strstr(err_msg, DBUS_SIM_SERVICE_NOT_SUPPORTED_FOR_NVSIM) ){
+               ret = TAPI_API_NOT_SUPPORTED;
+       }else {
+               ret = TAPI_API_OPERATION_FAILED;
+       }
+
+       return ret;
+}
 
-       return TEL_RETURN_SUCCESS;
+static int _tel_check_tapi_state()
+{
+       return 0;
 }
 
-EXPORT_API TelReturn tapi_sim_get_type(TelHandle *handle, TelSimCardType *card_type)
+static void on_response_get_sim_iccid(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TelSimCardStatusInfo status_info = {0,};
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
 
-       dbg("Entry");
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
+       TelSimIccIdInfo_t iccid_info;
+       gchar *iccid = NULL;
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && card_type, TEL_RETURN_INVALID_PARAMETER);
-       __get_sim_status_info(handle->sim_proxy, &status_info);
-       CHECK_IF_SIM_PRESENT(status_info.status);
+       TAPI_SIM_RESP_CB_ENTER(evt_cb_data);
+       memset(&iccid_info, 0, sizeof(TelSimIccIdInfo_t));
 
-       /* Fetch Card type from DBUS property */
-       *card_type = telephony_sim_get_sim_type(handle->sim_proxy);
-       dbg("SIM Card type: [%s]",
-               (*card_type == TEL_SIM_CARD_TYPE_GSM ? "GSM"
-               : (*card_type == TEL_SIM_CARD_TYPE_USIM ? "USIM"
-               : (*card_type == TEL_SIM_CARD_TYPE_RUIM ? "RUSM"
-               : (*card_type == TEL_SIM_CARD_TYPE_ISIM ? "ISIM"
-               : "UNKNOWN")))));
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       SIM_CHECK_ERROR(error, evt_cb_data);
 
+       if (!dbus_result) {
+               TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evt_cb_data);
+       }
 
-       return TEL_RETURN_SUCCESS;
+       g_variant_get(dbus_result, "(is)", &result, &iccid);
+       iccid_info.icc_length = strlen((const char*)iccid);
+       if(iccid_info.icc_length > TAPI_SIM_ICCID_LEN_MAX){
+               dbg("current tapi support 20 byte but received length[%d] so changed");
+               iccid_info.icc_length = TAPI_SIM_ICCID_LEN_MAX;
+       }
+       memcpy(iccid_info.icc_num, iccid, iccid_info.icc_length);
+       g_free(iccid);
+
+       TAPI_SIM_CALL_CBFUNC(evt_cb_data, result, &iccid_info);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_sim_get_imsi(TelHandle *handle, TelSimImsiInfo *imsi)
+static void on_response_get_sim_language(GObject *source_object, GAsyncResult *res,
+               gpointer user_data)
 {
-       const gchar *mcc = NULL, *mnc = NULL, *msin = NULL;
-       gint sim_result = TEL_SIM_RESULT_FAILURE;
        GError *error = NULL;
-       TelSimCardStatusInfo status_info = {0,};
-
-       dbg("Entry");
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && imsi, TEL_RETURN_INVALID_PARAMETER);
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimLanguagePreferenceCode_t lang = TAPI_SIM_LP_LANG_UNSPECIFIED;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
 
-       __get_sim_status_info(handle->sim_proxy, &status_info);
-       CHECK_IF_SIM_PRESENT(status_info.status);
+       TAPI_SIM_RESP_CB_ENTER(evt_cb_data);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       SIM_CHECK_ERROR(error, evt_cb_data);
 
-       /* Fetch MCC, MNC and MSIN from DBUS property */
-       mcc = telephony_sim_get_mcc(handle->sim_proxy);
-       if (mcc && strlen(mcc)) {
-               mnc = telephony_sim_get_mnc(handle->sim_proxy);
-               if (mnc && strlen(mnc)) {
-                       msin = telephony_sim_get_msin(handle->sim_proxy);
-                       if (msin && strlen(msin)) {
-                               goto imsi_fetched;
-                       }
-               }
-       }
-
-       telephony_sim_call_get_imsi_sync(handle->sim_proxy,
-               &sim_result, (gchar **)&mcc, (gchar **)&mnc, (gchar **)&msin,
-               NULL, &error);
-       if (error) {
-               err("DBUS Error - Code: [%d] Message: [%s], ", error->code, error->message);
-               g_error_free(error);
-               return TEL_SIM_RESULT_FAILURE;
-       }
-       else if (sim_result != TEL_SIM_RESULT_SUCCESS) {
-               err("Failed to get IMSI - sim_result: [%d]", sim_result);
-               return TEL_SIM_RESULT_FAILURE;
+       if (!dbus_result) {
+               TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evt_cb_data);
        }
 
-imsi_fetched:
-       /* Update MCC, MNC and MSIN */
-       TEL_RETURN_IF_CHECK_FAIL((strlen(mcc) < TEL_SIM_MCC_MNC_LEN_MAX)
-               /* MNC can be 2 or 3 digits, considering the lower limit */
-               || (strlen(mnc) < (TEL_SIM_MCC_MNC_LEN_MAX - 1))
-               || (strlen(msin) <= TEL_SIM_MSIN_LEN_MAX), TEL_SIM_RESULT_FAILURE);
-
-       memcpy(imsi->mcc, mcc, strlen(mcc)+1);
-       memcpy(imsi->mnc, mnc, strlen(mnc)+1);
-       memcpy(imsi->msin, msin, strlen(msin)+1);
+       g_variant_get(dbus_result, "(ii)", &result, &lang);
 
-       dbg("MCC: [%s] MNC: [%s] MSIN: [%s]", imsi->mcc, imsi->mnc, imsi->msin);
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &lang, evt_cb_data->user_data);
+       }
 
-       return TEL_RETURN_SUCCESS;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_sim_get_ecc(TelHandle *handle, TelSimEccList *ecc)
+static void on_response_set_sim_language(GObject *source_object, GAsyncResult *res,
+               gpointer user_data)
 {
-       GVariant *ecc_list = NULL;
        GError *error = NULL;
-       gint sim_result = TEL_SIM_RESULT_FAILURE;
-       TelSimCardStatusInfo status_info = {0,};
-
-       dbg("Entry");
-
-       TEL_RETURN_IF_CHECK_FAIL(handle && ecc, TEL_RETURN_INVALID_PARAMETER);
-       __get_sim_status_info(handle->sim_proxy, &status_info);
-       CHECK_IF_SIM_PRESENT(status_info.status);
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
 
-       telephony_sim_call_get_ecc_sync(handle->sim_proxy,
-                                       &sim_result, &ecc->count, &ecc_list,
-                                       NULL, &error);
-       if (error) {
-               err("DBUS Error - Code: [%d] Message: [%s], ", error->code, error->message);
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
 
-               /* Free 'error' */
-               g_error_free(error);
+       TAPI_SIM_RESP_CB_ENTER(evt_cb_data);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       SIM_CHECK_ERROR(error, evt_cb_data);
 
-               return TEL_RETURN_FAILURE;
+       if (!dbus_result) {
+               TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evt_cb_data);
        }
 
-       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
-               err("Failed to get ECC list - sim_result: [%d]", sim_result);
+       g_variant_get(dbus_result, "(i)", &result);
 
-               /* Free resources */
-               g_variant_unref(ecc_list);
-
-               return TEL_RETURN_FAILURE;
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
        }
 
-       if ((ecc->count != 0)
-                       && (ecc->count <= TEL_SIM_ECC_LIST_MAX)) {
-               GVariantIter *iter = NULL, *iter_row = NULL;
-               GVariant *key_value;
-               const gchar *key;
-               guint i = 0;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
+}
 
-               dbg("ECC list count: [%d]", ecc->count);
+static void on_response_get_sim_callforwarding_info(GObject *source_object, GAsyncResult *res,
+               gpointer user_data)
+{
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
+       GVariant *value = NULL;
+       GVariantIter *cphs_iter = NULL;
+       GVariantIter *iter = NULL;
+       GVariantIter *iter_row = NULL;
+       const gchar *key = NULL;
+       const gchar *str_value = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
+       TelSimCallForwardingResp_t cf;
+       int i =0;
+
+       TAPI_SIM_RESP_CB_ENTER(evt_cb_data);
+       memset(&cf, 0, sizeof(TelSimCallForwardingResp_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       SIM_CHECK_ERROR(error, evt_cb_data);
+
+       if (!dbus_result) {
+               TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evt_cb_data);
+       }
+       dbg("dbus_result format(%s)", g_variant_get_type_string(dbus_result));
+       g_variant_get(dbus_result, "(ibaa{sv}a{sv})", &result, &cf.b_cphs, &iter, &cphs_iter);
+
+       if( cf.b_cphs ) {
+               while (g_variant_iter_loop(cphs_iter, "{sv}", &key, &value)) {
+                       if (!g_strcmp0(key, "b_line1")) {
+                               cf.cphs_cf.b_line1 = g_variant_get_boolean(value);
+                       }
+                       if (!g_strcmp0(key, "b_line2")) {
+                               cf.cphs_cf.b_line2 = g_variant_get_boolean(value);
+                       }
+                       if (!g_strcmp0(key, "b_fax")) {
+                               cf.cphs_cf.b_fax = g_variant_get_boolean(value);
+                       }
+                       if (!g_strcmp0(key, "b_data")) {
+                               cf.cphs_cf.b_data = g_variant_get_boolean(value);
+                       }
+               }
+       } else {
+               cf.cf_list.profile_count = g_variant_iter_n_children(iter);
 
-               g_variant_get(ecc_list, "aa{sv}", &iter);
                while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
-                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
-                               if (g_strcmp0(key, "number") == 0) {
-                                       g_strlcpy(ecc->list[i].number,
-                                               g_variant_get_string(key_value, NULL),
-                                               TEL_SIM_ECC_NUMBER_LEN_MAX + 1);
+                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &value)) {
+                               if (!g_strcmp0(key, "rec_index")) {
+                                       cf.cf_list.cf[i].rec_index = g_variant_get_int32(value);
                                }
-
-                               if (g_strcmp0(key, "name") == 0) {
-                                       g_strlcpy(ecc->list[i].name,
-                                               g_variant_get_string(key_value, NULL),
-                                               TEL_SIM_ECC_TEXT_MAX + 1);
+                               if (!g_strcmp0(key, "msp_num")) {
+                                       cf.cf_list.cf[i].msp_num = g_variant_get_byte(value);
                                }
-
-                               if (g_strcmp0(key, "category") == 0) {
-                                       ecc->list[i].category = g_variant_get_int32(key_value);
+                               if (!g_strcmp0(key, "cfu_status")) {
+                                       cf.cf_list.cf[i].cfu_status = g_variant_get_byte(value);
+                               }
+                               if (!g_strcmp0(key, "cfu_num")) {
+                                       str_value = g_variant_get_string(value, NULL);
+                                       snprintf(cf.cf_list.cf[i].cfu_num, strlen((const char*) str_value) + 1, "%s", str_value);
+                               }
+                               if (!g_strcmp0(key, "ton")) {
+                                       cf.cf_list.cf[i].ton = g_variant_get_int32(value);
+                               }
+                               if (!g_strcmp0(key, "npi")) {
+                                       cf.cf_list.cf[i].npi = g_variant_get_int32(value);
+                               }
+                               if (!g_strcmp0(key, "cc2_id")) {
+                                       cf.cf_list.cf[i].cc2_id = g_variant_get_byte(value);
+                               }
+                               if (!g_strcmp0(key, "ext7_id")) {
+                                       cf.cf_list.cf[i].ext7_id = g_variant_get_byte(value);
                                }
                        }
                        i++;
@@ -314,1775 +335,2013 @@ EXPORT_API TelReturn tapi_sim_get_ecc(TelHandle *handle, TelSimEccList *ecc)
                }
                g_variant_iter_free(iter);
        }
-       else {
-               warn("ECC list count is NOT valid - Count: [%d]", ecc->count);
-               ecc->count = 0;
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &cf, evt_cb_data->user_data);
        }
 
-       return TEL_RETURN_SUCCESS;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_sim_get_iccid(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+static void on_response_set_sim_callforwarding_info(GObject *source_object, GAsyncResult *res,
+               gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       gchar *iccid = NULL;
-
        GError *error = NULL;
-       gint sim_result = TEL_SIM_RESULT_FAILURE;
-
-       dbg("Entry");
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
 
-       /* Finish and extract the response data */
-       telephony_sim_call_get_iccid_finish(handle->sim_proxy,
-                                       &sim_result, &iccid, res, &error);
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
 
-       /* Process Response data */
-       CHECK_DEINIT(error, rsp_cb_data, sim_result);
-       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
-               err("Failed to get SIM ICCID - sim_result: [%d]", sim_result);
+       TAPI_SIM_RESP_CB_ENTER(evt_cb_data);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       SIM_CHECK_ERROR(error, evt_cb_data);
 
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
-               return;
+       if (!dbus_result) {
+               TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evt_cb_data);
        }
 
-       /* Sanity check for ICCID */
-       if (strlen(iccid) > TEL_SIM_ICCID_LEN_MAX) {
-               err("Received invalid ICCID: [%s] Length: [%d]", iccid, strlen(iccid));
-               sim_result = TEL_SIM_RESULT_FAILURE;
-               g_free(iccid);                  /* Send NULL iccid to in failure case */
-               iccid = NULL;
-       }
-       else {
-               dbg("Received ICCID: [%s] Length: [%d]", iccid, strlen(iccid));
-       }
+       g_variant_get(dbus_result, "(i)", &result);
 
-       /* Invoke response callback */
-       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, iccid);
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
+       }
 
-       /* Free resources */
-       g_free(iccid);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_sim_get_iccid(TelHandle *handle,
-       TapiResponseCb callback, void *user_data)
-{
-       TapiRespCbData *rsp_cb_data = NULL;
-       TelSimCardStatusInfo status_info = {0,};
-
-       dbg("Entry");
-
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
 
-       __get_sim_status_info(handle->sim_proxy, &status_info);
-       CHECK_IF_SIM_PRESENT(status_info.status);
+static void on_response_get_sim_messagewaiting_info(GObject *source_object, GAsyncResult *res,
+               gpointer user_data)
+{
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
+       GVariant *value = NULL;
+       GVariantIter *cphs_iter = NULL;
+       GVariantIter *iter = NULL;
+       GVariantIter *iter_row = NULL;
+       const gchar *key = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
+       TelSimMessageWaitingResp_t mw;
+       int i =0;
+
+       TAPI_SIM_RESP_CB_ENTER(evt_cb_data);
+       memset(&mw, 0, sizeof(TelSimMessageWaitingResp_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       SIM_CHECK_ERROR(error, evt_cb_data);
+
+       if (!dbus_result) {
+               TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evt_cb_data);
+       }
+
+       dbg("dbus_result format(%s)", g_variant_get_type_string(dbus_result));
+       g_variant_get(dbus_result, "(ibaa{sv}a{sv})", &result, &mw.b_cphs, &iter, &cphs_iter);
+
+       if( mw.b_cphs ) {
+               while (g_variant_iter_loop(cphs_iter, "{sv}", &key, &value)) {
+                       if (!g_strcmp0(key, "b_voice1")) {
+                               mw.cphs_mw.b_voice1 = g_variant_get_boolean(value);
+                       }
+                       if (!g_strcmp0(key, "b_voice2")) {
+                               mw.cphs_mw.b_voice2 = g_variant_get_boolean(value);
+                       }
+                       if (!g_strcmp0(key, "b_fax")) {
+                               mw.cphs_mw.b_fax = g_variant_get_boolean(value);
+                       }
+                       if (!g_strcmp0(key, "b_data")) {
+                               mw.cphs_mw.b_data = g_variant_get_boolean(value);
+                       }
+               }
+               g_variant_iter_free(cphs_iter);
+       } else {
+               while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
+                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &value)) {
+                               if (!g_strcmp0(key, "rec_index")) {
+                                       mw.mw_list.mw[i].rec_index = g_variant_get_int32(value);
+                               }
+                               if (!g_strcmp0(key, "indicator_status")) {
+                                       mw.mw_list.mw[i].indicator_status = g_variant_get_byte(value);
+                               }
+                               if (!g_strcmp0(key, "voice_count")) {
+                                       mw.mw_list.mw[i].voice_count = g_variant_get_int32(value);
+                               }
+                               if (!g_strcmp0(key, "fax_count")) {
+                                       mw.mw_list.mw[i].fax_count = g_variant_get_int32(value);
+                               }
+                               if (!g_strcmp0(key, "email_count")) {
+                                       mw.mw_list.mw[i].email_count = g_variant_get_int32(value);
+                               }
+                               if (!g_strcmp0(key, "other_count")) {
+                                       mw.mw_list.mw[i].other_count = g_variant_get_int32(value);
+                               }
+                               if (!g_strcmp0(key, "video_count")) {
+                                       mw.mw_list.mw[i].video_count = g_variant_get_int32(value);
+                               }
+                       }
+                       i++;
+                       g_variant_iter_free(iter_row);
+                       mw.mw_list.profile_count++;
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+                       /* Max MSP record supported check */
+                       if (i == TAPI_SIM_MSP_CNT_MAX)
+                               break;
+               }
+               g_variant_iter_free(iter);
+       }
 
-       /* DBUS Request - GET (ICCID) */
-       telephony_sim_call_get_iccid(handle->sim_proxy,
-               NULL, on_response_sim_get_iccid, rsp_cb_data);
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &mw, evt_cb_data->user_data);
+       }
 
-       return TEL_RETURN_SUCCESS;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_sim_get_language(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+static void on_response_set_sim_messagewaiting_info(GObject *source_object, GAsyncResult *res,
+               gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       gint language;  /* aligned to TelSimLanguagePreferenceCode */
-
        GError *error = NULL;
-       gint sim_result = TEL_SIM_RESULT_FAILURE;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
 
-       /* Finish and extract the response data */
-       telephony_sim_call_get_language_finish(handle->sim_proxy,
-                                       &sim_result, &language, res, &error);
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
 
-       /* Process Response data */
-       CHECK_DEINIT(error, rsp_cb_data, sim_result);
-       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
-               err("Failed to get SIM Language - sim_result: [%d]", sim_result);
+       TAPI_SIM_RESP_CB_ENTER(evt_cb_data);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       SIM_CHECK_ERROR(error, evt_cb_data);
 
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
-               return;
+       if (!dbus_result) {
+               TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evt_cb_data);
        }
-       dbg("Language: [0x%02x]", language);
 
-       /* Invoke response callback */
-       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &language);
-}
+       g_variant_get(dbus_result, "(i)", &result);
 
-EXPORT_API TelReturn tapi_sim_get_language(TelHandle *handle,
-       TapiResponseCb callback, void *user_data)
-{
-       TapiRespCbData *rsp_cb_data = NULL;
-       TelSimCardStatusInfo status_info = {0,};
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
+       }
 
-       dbg("Entry");
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
+}
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
+static void on_response_get_sim_mailbox_info(GObject *source_object, GAsyncResult *res,
+               gpointer user_data)
+{
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
+       GVariant *value = NULL;
+       GVariantIter *iter = NULL;
+       GVariantIter *iter_row = NULL;
+       const gchar *key = NULL;
+       const gchar *str_value = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
+       TelSimMailboxList_t list;
+       int i = 0;
+       gboolean b_cphs = 0;
+
+       TAPI_SIM_RESP_CB_ENTER(evt_cb_data);
+       memset(&list, 0, sizeof(TelSimMailboxList_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       SIM_CHECK_ERROR(error, evt_cb_data);
+
+       if (!dbus_result) {
+               TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evt_cb_data);
+       }
+
+       g_variant_get(dbus_result, "(ibaa{sv})", &result, &b_cphs, &iter);
+       list.count = g_variant_iter_n_children(iter);
+       msg("list.count=[%d]", list.count);
 
-       __get_sim_status_info(handle->sim_proxy, &status_info);
-       CHECK_IF_SIM_PRESENT(status_info.status);
+       i = 0;
+       while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
+               while (g_variant_iter_loop(iter_row, "{sv}", &key, &value)) {
+                       list.list[i].b_cphs = b_cphs;
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+                       if (!g_strcmp0(key, "rec_index")) {
+                               list.list[i].rec_index = g_variant_get_int32(value);
+                       }
+                       if (!g_strcmp0(key, "profile_num")) {
+                               list.list[i].profile_num = g_variant_get_int32(value);
+                       }
+                       if (!g_strcmp0(key, "mb_type")) {
+                               list.list[i].mb_type = g_variant_get_int32(value);
+                       }
+                       if (!g_strcmp0(key, "alpha_id_max_len")) {
+                               list.list[i].alpha_id_max_len = g_variant_get_int32(value);
+                       }
+                       if (!g_strcmp0(key, "alpha_id")) {
+                               str_value = g_variant_get_string(value, NULL);
+                               snprintf(list.list[i].alpha_id, strlen((const char*)str_value) + 1, "%s", str_value);
+                       }
+                       if (!g_strcmp0(key, "ton")) {
+                               list.list[i].ton = g_variant_get_int32(value);
+                       }
+                       if (!g_strcmp0(key, "npi")) {
+                               list.list[i].npi = g_variant_get_int32(value);
+                       }
+                       if (!g_strcmp0(key, "num")) {
+                               str_value = g_variant_get_string(value, NULL);
+                               snprintf(list.list[i].num, strlen((const char*)str_value) + 1, "%s", str_value);
+                       }
+                       if (!g_strcmp0(key, "cc_id")) {
+                               list.list[i].cc_id = g_variant_get_byte(value);
+                       }
+                       if (!g_strcmp0(key, "ext1_id")) {
+                               list.list[i].ext1_id = g_variant_get_byte(value);
+                       }
+               }
+               i++;
+               g_variant_iter_free(iter_row);
+       }
+       g_variant_iter_free(iter);
 
-       /* DBUS Request - GET (Language) */
-       telephony_sim_call_get_language(handle->sim_proxy,
-                       NULL, on_response_sim_get_language, rsp_cb_data);
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &list, evt_cb_data->user_data);
+       }
 
-       return TEL_RETURN_SUCCESS;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_sim_set_language(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+static void on_response_set_sim_mailbox_info(GObject *source_object, GAsyncResult *res,
+               gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-
        GError *error = NULL;
-       gint sim_result = TEL_SIM_RESULT_FAILURE;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
 
-       /* Finish and extract the response data */
-       telephony_sim_call_set_language_finish(handle->sim_proxy,
-                                       &sim_result, res, &error);
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
 
-       /* Process Response data */
-       CHECK_DEINIT(error, rsp_cb_data, sim_result);
+       TAPI_SIM_RESP_CB_ENTER(evt_cb_data);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       SIM_CHECK_ERROR(error, evt_cb_data);
+
+       if (!dbus_result) {
+               TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evt_cb_data);
+       }
 
-       if (TEL_SIM_RESULT_SUCCESS != sim_result)
-               err("Failed to set SIM Language - sim_result: [%d]", sim_result);
-       else
-               dbg("SIM Language set");
+       g_variant_get(dbus_result, "(i)", &result);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
+       }
+
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_sim_set_language(TelHandle *handle,
-       TelSimLanguagePreferenceCode language, TapiResponseCb callback, void *user_data)
+static void on_response_get_sim_cphs_info(GObject *source_object, GAsyncResult *res,
+               gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = NULL;
-       TelSimCardStatusInfo status_info = {0,};
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
 
-       dbg("Entry");
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
+       TelSimCphsInfo_t cphs;
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
+       TAPI_SIM_RESP_CB_ENTER(evt_cb_data);
+       memset(&cphs, 0, sizeof(TelSimCphsInfo_t));
 
-       __get_sim_status_info(handle->sim_proxy, &status_info);
-       CHECK_IF_SIM_PRESENT(status_info.status);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       SIM_CHECK_ERROR(error, evt_cb_data);
 
-       CHECK_LANGUAGE_VALID(language);
+       if (!dbus_result) {
+               TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evt_cb_data);
+       }
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       g_variant_get(dbus_result, "(iibbbbb)", &result, &cphs.CphsPhase,
+                       &cphs.CphsServiceTable.bOperatorNameShortForm, &cphs.CphsServiceTable.bMailBoxNumbers,
+                       &cphs.CphsServiceTable.bServiceStringTable,
+                       &cphs.CphsServiceTable.bCustomerServiceProfile,
+                       &cphs.CphsServiceTable.bInformationNumbers);
 
-       /* DBUS Request - SET (Language) */
-       telephony_sim_call_set_language(handle->sim_proxy,
-                       language, NULL, on_response_sim_set_language, rsp_cb_data);
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &cphs, evt_cb_data->user_data);
+       }
 
-       return TEL_RETURN_SUCCESS;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_sim_get_callforwarding_info(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+static void on_response_get_sim_service_table(GObject *source_object, GAsyncResult *res,
+               gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-
-       GVariant *cf_list = NULL;
-       TelSimCfisList cf_info;
-
        GError *error = NULL;
-       gint sim_result = TEL_SIM_RESULT_FAILURE;
-
-       memset(&cf_info, 0x0, sizeof(TelSimCfisList));
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result = NULL;
 
-       /* Finish and extract the response data */
-       telephony_sim_call_get_call_forwarding_info_finish(handle->sim_proxy,
-               &sim_result, &cf_info.profile_count, &cf_list, res, &error);
+       GVariantIter *iter = NULL;
+       GVariant *param_gv = NULL;
+       GVariant *inner_gv = NULL;
+       guchar value = 0;
+       int i = 0;
 
-       /* Process Response data */
-       CHECK_DEINIT(error, rsp_cb_data, sim_result);
-       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
-               err("Failed to get SIM Call forwarding info - sim_result: [%d]", sim_result);
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
+       TelSimServiceTable_t svct;
 
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
+       TAPI_SIM_RESP_CB_ENTER(evt_cb_data);
+       memset(&svct, 0, sizeof(TelSimServiceTable_t));
 
-               /* Free resources */
-               g_variant_unref(cf_list);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       SIM_CHECK_ERROR(error, evt_cb_data);
 
-               return;
+       if (!dbus_result) {
+               TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evt_cb_data);
        }
 
-       /* Validate Response data */
-       /**
-        * The Profile Identity shall be between 1 and 4 as defined
-        * in TS 23.097 for MSP
-        */
-       if ((cf_info.profile_count != 0)
-                       && (cf_info.profile_count <= TEL_SIM_MSP_CNT_MAX)
-                       && (g_variant_n_children(cf_list) == cf_info.profile_count)) {
-               GVariantIter *iter = NULL, *iter_row = NULL;
-               GVariant *key_value;
-               const gchar *key;
-               guint i = 0;
+       g_variant_get(dbus_result, "(ii@v)", &result, &svct.sim_type, &param_gv);
+       inner_gv = g_variant_get_variant(param_gv);
 
-               dbg("Call forwarding list count: [%d]", cf_info.profile_count);
+       g_variant_get(inner_gv, "ay", &iter);
 
-               g_variant_get(cf_list, "aa{sv}", &iter);
-               while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
-                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
-                               if (g_strcmp0(key, "profile_id") == 0) {
-                                       cf_info.cf[i].profile_id = g_variant_get_byte(key_value);
-                               }
+       if (TAPI_SIM_CARD_TYPE_GSM == svct.sim_type) {
+               while (g_variant_iter_loop(iter, "y", &value)) {
+                       svct.table.sst.service[i] = value;
+                       i++;
+               }
+       } else if(TAPI_SIM_CARD_TYPE_USIM == svct.sim_type) {
+               while (g_variant_iter_loop(iter, "y", &value)) {
+                       svct.table.ust.service[i] = value;
+                       i++;
+               }
+       } else if(TAPI_SIM_CARD_TYPE_RUIM == svct.sim_type) {
+               g_variant_get(dbus_result, "(ii@v)", &result, &svct.table.cst.cdma_svc_table, &param_gv);
+               inner_gv = g_variant_get_variant(param_gv);
 
-                               if (g_strcmp0(key, "indication") == 0) {
-                                       memcpy(cf_info.cf[i].indication,
-                                               g_variant_get_data(key_value),
-                                               TEL_SIM_CALL_FORWARDING_TYPE_MAX);
-                               }
+               g_variant_get(inner_gv, "ay", &iter);
+
+               if(TAPI_SIM_CDMA_SVC_TABLE == svct.table.cst.cdma_svc_table) {
+                       while (g_variant_iter_loop(iter, "y", &value)) {
+                               svct.table.cst.service.cdma_service[i] = value;
+                               i++;
                        }
-                       i++;
-                       g_variant_iter_free(iter_row);
+               } else if(TAPI_SIM_CSIM_SVC_TABLE == svct.table.cst.cdma_svc_table) {
+                       while (g_variant_iter_loop(iter, "y", &value)) {
+                               svct.table.cst.service.csim_service[i] = value;
+                               i++;
+                       }
+               } else {
+                       err("Invalid cdma_svc_table:[%d]", svct.table.cst.cdma_svc_table);
                }
-               g_variant_iter_free(iter);
+       } else {
+               err("Invalid sim_type:[%d]", svct.sim_type);
        }
-       else {
-               err("Invalid Profile count: [%d]", cf_info.profile_count);
 
-               cf_info.profile_count = 0;
-               sim_result = TEL_SIM_RESULT_FAILURE;
+       g_variant_iter_free(iter);
+       g_variant_unref(inner_gv);
+       g_variant_unref(param_gv);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &svct, evt_cb_data->user_data);
        }
 
-       /* Invoke response callback */
-       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &cf_info);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_sim_get_callforwarding_info(TelHandle *handle,
-       TapiResponseCb callback, void *user_data)
+static void on_response_get_sim_msisdn(GObject *source_object, GAsyncResult *res,
+               gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = NULL;
-       TelSimCardStatusInfo status_info = {0,};
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
+       GVariant *value = NULL;
+       GVariantIter *iter = NULL;
+       GVariantIter *iter_row = NULL;
+       const gchar *key = NULL;
+       const gchar *str_value = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
+       TelSimMsisdnList_t list;
+       int i = 0;
 
-       dbg("Entry");
+       TAPI_SIM_RESP_CB_ENTER(evt_cb_data);
+       memset(&list, 0, sizeof(TelSimMsisdnList_t));
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       SIM_CHECK_ERROR(error, evt_cb_data);
 
-       __get_sim_status_info(handle->sim_proxy, &status_info);
-       CHECK_IF_SIM_INITIALIZED(status_info.status);
+       if (!dbus_result) {
+               TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evt_cb_data);
+       }
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       g_variant_get(dbus_result, "(iaa{sv})", &result, &iter);
+       list.count = g_variant_iter_n_children(iter);
 
-       /* DBUS Request - GET (Call Forwarding info) */
-       telephony_sim_call_get_call_forwarding_info(handle->sim_proxy,
-               NULL, on_response_sim_get_callforwarding_info, rsp_cb_data);
+       /*this can be changed regarding concept*/
+       if(list.count > 3){
+               dbg("current list.count[%d] but we fixed maximum with 3", list.count);
+               list.count = 3;
+       }
+       /*this can be changed regarding concept*/
 
-       return TEL_RETURN_SUCCESS;
-}
+       i = 0;
+       while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
+               while (g_variant_iter_loop(iter_row, "{sv}", &key, &value)) {
+                       if (!g_strcmp0(key, "name")) {
+                               str_value = g_variant_get_string(value, NULL);
+                               snprintf(list.list[i].name, strlen((const char*)str_value) + 1, "%s", str_value);
+                       }
+                       if (!g_strcmp0(key, "number")) {
+                               str_value = g_variant_get_string(value, NULL);
+                               snprintf(list.list[i].num, strlen((const char*)str_value) + 1, "%s", str_value);
+                       }
+               }
+               i++;
+               g_variant_iter_free(iter_row);
+               /*this can be changed regarding concept*/
+               if (i == 3)
+                       break;
+               /*this can be changed regarding concept*/
+       }
+       g_variant_iter_free(iter);
 
-static void on_response_sim_get_messagewaiting_info(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
-{
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       msg("msisdn count[%d]", list.count);
+       for(i =0; i < list.count; i++){
+               dbg("msisdn[%d]-name[%s]number[%s]",i,list.list[i].name, list.list[i].num);
+       }
 
-       GVariant *mw_list = NULL;
-       TelSimMwisList mw_info;
+       TAPI_SIM_CALL_CBFUNC(evt_cb_data, result, &list);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
+}
 
+static void on_response_get_sim_oplmnwact(GObject *source_object, GAsyncResult *res,
+               gpointer user_data)
+{
        GError *error = NULL;
-       gint sim_result = TEL_SIM_RESULT_FAILURE;
-
-       memset(&mw_info, 0x0, sizeof(TelSimMwisList));
-
-       /* Finish and extract the response data */
-       telephony_sim_call_get_message_waiting_info_finish(handle->sim_proxy,
-               &sim_result, &mw_info.profile_count, &mw_list, res, &error);
-
-       /* Process Response data */
-       CHECK_DEINIT(error, rsp_cb_data, sim_result);
-       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
-               err("Failed to get SIM Message Waiting info - sim_result: [%d]", sim_result);
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
+       GVariant *value = NULL;
+       GVariantIter *iter = NULL;
+       GVariantIter *iter_row = NULL;
+       const gchar *key = NULL;
+       const gchar *str_value = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
+       TelSimOplmnwactList_t list;
+       int i = 0;
 
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
+       TAPI_SIM_RESP_CB_ENTER(evt_cb_data);
+       memset(&list, 0, sizeof(TelSimOplmnwactList_t));
 
-               /* Free resources */
-               g_variant_unref(mw_list);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       SIM_CHECK_ERROR(error, evt_cb_data);
 
-               return;
+       if (!dbus_result) {
+               TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evt_cb_data);
        }
 
-       /* Validate Response data */
-       /**
-        * The Profile Identity shall be between 1 and 4 as defined
-        * in TS 23.097 for MSP
-        */
-       if ((mw_info.profile_count != 0)
-                       && (mw_info.profile_count <= TEL_SIM_MSP_CNT_MAX)
-                       && (g_variant_n_children(mw_list) == mw_info.profile_count)) {
-               GVariantIter *iter = NULL, *iter_row = NULL;
-               GVariant *key_value;
-               const gchar *key;
-               guint i = 0;
+       g_variant_get(dbus_result, "(iaa{sv})", &result, &iter);
+       list.count = g_variant_iter_n_children(iter);
 
-               dbg("Message Waiting list count: [%d]", mw_info.profile_count);
-
-               g_variant_get(mw_list, "aa{sv}", &iter);
-               while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
-                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
-                               if (g_strcmp0(key, "profile_id") == 0) {
-                                       mw_info.mw[i].profile_id = g_variant_get_byte(key_value);
-                               }
-                               else if (g_strcmp0(key, "count_valid") == 0) {
-                                       mw_info.mw[i].count_valid = g_variant_get_boolean(key_value);
-                               }
-                               else if (g_strcmp0(key, "msg_waiting") == 0) {
-                                       GVariantIter *iter2 = NULL, *iter_row2 = NULL;
-                                       GVariant *key_value2;
-                                       const gchar *key2;
-                                       guint j = 0;
-
-                                       g_variant_get(key_value, "aa{sv}", &iter2);
-                                       while (g_variant_iter_next(iter2, "a{sv}", &iter_row2)) {
-                                               while (g_variant_iter_loop(iter_row2, "{sv}", &key2, &key_value2)) {
-                                                       if (g_strcmp0(key2, "indication") == 0) {
-                                                               mw_info.mw[i].msg_waiting[j].indication =
-                                                                       g_variant_get_boolean(key_value2);
-                                                       }
-                                                       else if (g_strcmp0(key2, "count") == 0) {
-                                                               mw_info.mw[i].msg_waiting[j].count =
-                                                                       g_variant_get_byte(key_value2);
-                                                       }
-                                               }
-                                               j++;
-                                               g_variant_iter_free(iter_row2);
-                                       }
-                                       g_variant_iter_free(iter2);
-                               }
+       i = 0;
+       while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
+               while (g_variant_iter_loop(iter_row, "{sv}", &key, &value)) {
+                       if (!g_strcmp0(key, "plmn")) {
+                               str_value = g_variant_get_string(value, NULL);
+                               snprintf(list.list[i].plmn, strlen((const char*)str_value) + 1, "%s", str_value);
+                       }
+                       if (!g_strcmp0(key, "b_umst")) {
+                               list.list[i].b_umts = g_variant_get_boolean(value);
+                       }
+                       if (!g_strcmp0(key, "b_gsm")) {
+                               list.list[i].b_gsm = g_variant_get_boolean(value);
                        }
-                       i++;
-                       g_variant_iter_free(iter_row);
                }
-               g_variant_iter_free(iter);
+               i++;
+               g_variant_iter_free(iter_row);
        }
-       else {
-               err("Invalid Profile count: [%d]", mw_info.profile_count);
-               mw_info.profile_count = 0;
-               sim_result = TEL_SIM_RESULT_FAILURE;
+       g_variant_iter_free(iter);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &list, evt_cb_data->user_data);
        }
 
-       /* Invoke response callback */
-       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &mw_info);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_sim_get_messagewaiting_info(TelHandle *handle,
-       TapiResponseCb callback, void *user_data)
+static void on_response_get_sim_spn(GObject *source_object, GAsyncResult *res,
+               gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = NULL;
-       TelSimCardStatusInfo status_info = {0,};
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
 
-       dbg("Entry");
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
+       TelSimSpn_t spn_info;
+       gchar *spn = NULL;
+       guchar dc = 0;
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
+       TAPI_SIM_RESP_CB_ENTER(evt_cb_data);
+       memset(&spn_info, 0, sizeof(TelSimSpn_t));
 
-       __get_sim_status_info(handle->sim_proxy, &status_info);
-       CHECK_IF_SIM_INITIALIZED(status_info.status);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       SIM_CHECK_ERROR(error, evt_cb_data);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       if (!dbus_result) {
+               TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evt_cb_data);
+       }
 
-       /* DBUS Request - GET (Message Waiting info) */
-       telephony_sim_call_get_message_waiting_info(handle->sim_proxy,
-               NULL, on_response_sim_get_messagewaiting_info, rsp_cb_data);
+       g_variant_get(dbus_result, "(iys)", &result, &dc, &spn);
 
-       return TEL_RETURN_SUCCESS;
+       dbg("result[%d]", result);
+       if ( result == TAPI_SIM_ACCESS_SUCCESS) {
+               msg("spn[%s], display condition[0x%x]", spn, dc);
+               spn_info.display_condition = dc;
+               snprintf((char *)spn_info.spn, strlen((const char*)spn)+1, "%s", spn);
+       }
+       g_free(spn);
+
+       TAPI_SIM_CALL_CBFUNC(evt_cb_data, result, &spn_info);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_sim_set_messagewaiting_info(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+static void on_response_get_sim_cphs_netname(GObject *source_object, GAsyncResult *res,
+               gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-
        GError *error = NULL;
-       gint sim_result = TEL_SIM_RESULT_FAILURE;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
 
-       /* Finish and extract the response data */
-       telephony_sim_call_set_message_waiting_info_finish(handle->sim_proxy,
-                                       &sim_result, res, &error);
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
+       TelSimCphsNetName_t cphs_net;
+       gchar *full_name = NULL;
+       gchar *short_name = NULL;
 
-       /* Process Response data */
-       CHECK_DEINIT(error, rsp_cb_data, sim_result);
+       TAPI_SIM_RESP_CB_ENTER(evt_cb_data);
+       memset(&cphs_net, 0, sizeof(TelSimCphsNetName_t));
 
-       dbg("Set Message waiting info: [%s]",
-                       (sim_result == TEL_SIM_RESULT_SUCCESS ? "SUCCESS" : "FAIL"));
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       SIM_CHECK_ERROR(error, evt_cb_data);
 
-       /* Invoke response callback */
-       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
-}
+       if (!dbus_result) {
+               TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evt_cb_data);
+       }
 
-EXPORT_API TelReturn tapi_sim_set_messagewaiting_info(TelHandle *handle,
-       TelSimMwis *req_mw, TapiResponseCb callback, void *user_data)
-{
-       TapiRespCbData *rsp_cb_data = NULL;
-       GVariant *var_mw;
-       GVariantBuilder builder;
-       unsigned int i;
-       TelSimCardStatusInfo status_info = {0,};
+       g_variant_get(dbus_result, "(iss)", &result, &full_name, &short_name);
 
-       dbg("Entry");
+       dbg("result[%d]", result);
+       if ( result == TAPI_SIM_ACCESS_SUCCESS) {
+               msg("full name[%s], short name[%s]", full_name, short_name);
+               snprintf((char *)cphs_net.full_name, strlen((const char*)full_name)+1, "%s", full_name);
+               snprintf((char *)cphs_net.short_name, strlen((const char*)short_name)+1, "%s", short_name);
+       }
+       g_free(full_name);
+       g_free(short_name);
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && req_mw && callback, TEL_RETURN_INVALID_PARAMETER);
-       __get_sim_status_info(handle->sim_proxy, &status_info);
-       CHECK_IF_SIM_INITIALIZED(status_info.status);
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &cphs_net, evt_cb_data->user_data);
+       }
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
+}
 
-       dbg("Profile ID: [%d] ", req_mw->profile_id);
+static void on_response_req_sim_authentication(GObject *source_object, GAsyncResult *res,
+               gpointer user_data)
+{
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
+
+       GVariantIter *iter = NULL;
+       GVariant *ak_gv = NULL;
+       GVariant *cp_gv = NULL;
+       GVariant *it_gv = NULL;
+       GVariant *resp_gv = NULL;
+       GVariant *ak = NULL;
+       GVariant *cp = NULL;
+       GVariant *it = NULL;
+       GVariant *resp = NULL;
+       guchar rt_i;
+       int i = 0;
+
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
+       TelSimAuthenticationResponse_t auth_resp;
+
+       TAPI_SIM_RESP_CB_ENTER(evt_cb_data);
+       memset(&auth_resp, 0, sizeof(TelSimAuthenticationResponse_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       SIM_CHECK_ERROR(error, evt_cb_data);
+
+       if (!dbus_result) {
+               TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evt_cb_data);
+       }
+
+       dbg("dbus_result type_format(%s)", g_variant_get_type_string(dbus_result));
+       g_variant_get(dbus_result, "(iii@v@v@v@v)", &result, &auth_resp.auth_type,
+                       &auth_resp.auth_result, &ak_gv, &cp_gv, &it_gv, &resp_gv);
+
+       ak = g_variant_get_variant(ak_gv);
+       g_variant_get(ak, "ay", &iter);
+       while (g_variant_iter_loop(iter, "y", &rt_i)) {
+               auth_resp.authentication_key[i] = rt_i;
+               i++;
+       }
+       auth_resp.authentication_key_length = i;
+       g_variant_iter_free(iter);
+       i = 0;
 
-       g_variant_builder_init(&builder, G_VARIANT_TYPE("a(by)"));
-       for (i = 0; i < TEL_SIM_MAILBOX_TYPE_MAX; i++) {
-               g_variant_builder_add(&builder, "(by)",
-                               req_mw->msg_waiting[i].indication,
-                               req_mw->msg_waiting[i].count);
+       cp = g_variant_get_variant(cp_gv);
+       g_variant_get(cp, "ay", &iter);
+       while (g_variant_iter_loop(iter, "y", &rt_i)) {
+               auth_resp.cipher_data[i] = rt_i;
+               i++;
        }
+       auth_resp.cipher_length = i;
+       g_variant_iter_free(iter);
+       i = 0;
 
-       var_mw = g_variant_builder_end(&builder);
+       it = g_variant_get_variant(it_gv);
+       g_variant_get(it, "ay", &iter);
+       while (g_variant_iter_loop(iter, "y", &rt_i)) {
+               auth_resp.integrity_data[i] = rt_i;
+               i++;
+       }
+       auth_resp.integrity_length = i;
+       g_variant_iter_free(iter);
+       i = 0;
 
-       /* DBUS Request - SET (Message Waiting info) */
-       telephony_sim_call_set_message_waiting_info(handle->sim_proxy,
-                       req_mw->profile_id, req_mw->count_valid, var_mw, NULL,
-                       on_response_sim_set_messagewaiting_info, rsp_cb_data);
+       resp = g_variant_get_variant(resp_gv);
+       g_variant_get(resp, "ay", &iter);
+       while (g_variant_iter_loop(iter, "y", &rt_i)) {
+               auth_resp.resp_data[i] = rt_i;
+               i++;
+       }
+       auth_resp.resp_length = i;
+       g_variant_iter_free(iter);
+       i = 0;
 
-       g_variant_unref(var_mw);
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &auth_resp, evt_cb_data->user_data);
+       }
 
-       return TEL_RETURN_SUCCESS;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_sim_get_mailbox_info(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+static void on_response_verify_sim_pins(GObject *source_object, GAsyncResult *res,
+               gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-
-       GVariant *mb_list = NULL;
-       TelSimMailboxList mb_info;
-
        GError *error = NULL;
-       gint sim_result = TEL_SIM_RESULT_FAILURE;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
 
-       memset(&mb_info, 0x0, sizeof(TelSimMailboxList));
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimPinOperationResult_t result = TAPI_SIM_PIN_OPERATION_SUCCESS;
+       TelSimSecResult_t sec_rt;
 
-       /* Finish and extract the response data */
-       telephony_sim_call_get_mailbox_info_finish(handle->sim_proxy,
-               &sim_result, &mb_info.alpha_id_max_len, &mb_info.count, &mb_list,
-               res, &error);
+       TAPI_SIM_RESP_CB_ENTER(evt_cb_data);
+       memset(&sec_rt, 0, sizeof(TelSimSecResult_t));
 
-       /* Process Response data */
-       CHECK_DEINIT(error, rsp_cb_data, sim_result);
-       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
-               err("Failed to get SIM Mailbox info - sim_result: [%d]", sim_result);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       SIM_CHECK_ERROR(error, evt_cb_data);
 
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
-               return;
+       if (!dbus_result) {
+               TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evt_cb_data);
        }
 
-       /* Validate Response data */
-       /**
-        * The Profile Identity shall be between 1 and 4 as defined
-        * in TS 23.097 for MSP
-        */
-       if ((mb_info.count != 0)
-                       && (mb_info.count == g_variant_n_children(mb_list))) {
-               GVariantIter *iter = NULL, *iter_row = NULL;
-               GVariant *key_value;
-               const gchar *key;
-               guint i = 0;
+       g_variant_get(dbus_result, "(iii)", &result, &sec_rt.type, &sec_rt.retry_count);
 
-               dbg("Mailbox list count: [%d]", mb_info.count);
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &sec_rt, evt_cb_data->user_data);
+       }
 
-               g_variant_get(mb_list, "aa{sv}", &iter);
-               while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
-                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
-                               if (g_strcmp0(key, "profile_id") == 0) {
-                                       mb_info.list[i].profile_id = g_variant_get_byte(key_value);
-                               }
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
+}
 
-                               if (g_strcmp0(key, "mb_type") == 0) {
-                                       mb_info.list[i].mb_type = g_variant_get_int32(key_value);
-                               }
+static void on_response_verify_sim_puks(GObject *source_object, GAsyncResult *res,
+               gpointer user_data)
+{
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
 
-                               if (g_strcmp0(key, "alpha_id_len") == 0) {
-                                       mb_info.list[i].alpha_id_len = g_variant_get_uint32(key_value);
-                               }
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimPinOperationResult_t result = TAPI_SIM_PIN_OPERATION_SUCCESS;
+       TelSimSecResult_t sec_rt;
 
-                               if (g_strcmp0(key, "alpha_id") == 0) {
-                                       memcpy(mb_info.list[i].alpha_id,
-                                               g_variant_get_data(key_value),
-                                               TEL_SIM_ALPHA_ID_LEN_MAX);
-                               }
+       TAPI_SIM_RESP_CB_ENTER(evt_cb_data);
+       memset(&sec_rt, 0, sizeof(TelSimSecResult_t));
 
-                               if (g_strcmp0(key, "number") == 0) {
-                                       memcpy(mb_info.list[i].number,
-                                               g_variant_get_data(key_value),
-                                               TEL_SIM_MBDN_NUM_LEN_MAX);
-                               }
-                       }
-                       i++;
-                       g_variant_iter_free(iter_row);
-               }
-               g_variant_iter_free(iter);
-       }
-       else {
-               err("Invalid Mailbox list count: [%d]", mb_info.count);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       SIM_CHECK_ERROR(error, evt_cb_data);
 
-               sim_result = TEL_SIM_RESULT_FAILURE;
-               mb_info.count = 0;
+       if (!dbus_result) {
+               TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evt_cb_data);
        }
 
-       /* Free resources */
-       g_variant_unref(mb_list);
+       g_variant_get(dbus_result, "(iii)", &result, &sec_rt.type, &sec_rt.retry_count);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &sec_rt, evt_cb_data->user_data);
+       }
 
-       /* Invoke response callback */
-       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &mb_info);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_sim_get_mailbox_info(TelHandle *handle,
-       TapiResponseCb callback, void *user_data)
+static void on_response_change_sim_pins(GObject *source_object, GAsyncResult *res,
+               gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = NULL;
-       TelSimCardStatusInfo status_info = {0,};
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
+
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimPinOperationResult_t result = TAPI_SIM_PIN_OPERATION_SUCCESS;
+       TelSimSecResult_t sec_rt;
 
-       dbg("Entry");
+       TAPI_SIM_RESP_CB_ENTER(evt_cb_data);
+       memset(&sec_rt, 0, sizeof(TelSimSecResult_t));
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
-       __get_sim_status_info(handle->sim_proxy, &status_info);
-       CHECK_IF_SIM_INITIALIZED(status_info.status);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       SIM_CHECK_ERROR(error, evt_cb_data);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       if (!dbus_result) {
+               TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evt_cb_data);
+       }
 
-       /* DBUS Request - GET (Mailbox info) */
-       telephony_sim_call_get_mailbox_info(handle->sim_proxy,
-                       NULL, on_response_sim_get_mailbox_info, rsp_cb_data);
+       g_variant_get(dbus_result, "(iii)", &result, &sec_rt.type, &sec_rt.retry_count);
 
-       return TEL_RETURN_SUCCESS;
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &sec_rt, evt_cb_data->user_data);
+       }
+
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_sim_set_mailbox_info(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+static void on_response_disable_sim_facility(GObject *source_object, GAsyncResult *res,
+               gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-
        GError *error = NULL;
-       gint sim_result = TEL_SIM_RESULT_FAILURE;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
 
-       /* Finish and extract the response data */
-       telephony_sim_call_set_mailbox_info_finish(handle->sim_proxy, &sim_result, res, &error);
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimPinOperationResult_t result = TAPI_SIM_PIN_OPERATION_SUCCESS;
+       TelSimFacilityResult_t f_rt;
 
-       /* Process Response data */
-       CHECK_DEINIT(error, rsp_cb_data, sim_result);
+       TAPI_SIM_RESP_CB_ENTER(evt_cb_data);
+       memset(&f_rt, 0, sizeof(TelSimFacilityResult_t));
 
-       dbg("Set Mailbox info: [%s]",
-                       (sim_result == TEL_SIM_RESULT_SUCCESS ? "SUCCESS" : "FAIL"));
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       SIM_CHECK_ERROR(error, evt_cb_data);
 
-       /* Invoke response callback */
-       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
+       if (!dbus_result) {
+               TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evt_cb_data);
+       }
+
+       g_variant_get(dbus_result, "(iii)", &result, &f_rt.type, &f_rt.retry_count);
+
+       TAPI_SIM_CALL_CBFUNC(evt_cb_data, result, &f_rt);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_sim_set_mailbox_info(TelHandle *handle,
-       TelSimMailBoxNumber *req_mb,
-       TapiResponseCb callback, void *user_data)
+static void on_response_enable_sim_facility(GObject *source_object, GAsyncResult *res,
+               gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = NULL;
-       TelSimCardStatusInfo status_info = {0,};
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
 
-       dbg("Entry");
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimPinOperationResult_t result = TAPI_SIM_PIN_OPERATION_SUCCESS;
+       TelSimFacilityResult_t f_rt;
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && req_mb && callback, TEL_RETURN_INVALID_PARAMETER);
-       __get_sim_status_info(handle->sim_proxy, &status_info);
-       CHECK_IF_SIM_INITIALIZED(status_info.status);
+       TAPI_SIM_RESP_CB_ENTER(evt_cb_data);
+       memset(&f_rt, 0, sizeof(TelSimFacilityResult_t));
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       SIM_CHECK_ERROR(error, evt_cb_data);
 
-       dbg("Profile ID: [%d] mailbox type: [%d]  Alpha ID Length:[%d] "
-               "Alpha ID: [%s] Number: [%s]", req_mb->profile_id,
-               req_mb->mb_type, req_mb->alpha_id_len, req_mb->alpha_id,
-               req_mb->number);
+       if (!dbus_result) {
+               TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evt_cb_data);
+       }
 
-       /* DBUS Request - SET (Mailbox info) */
-       telephony_sim_call_set_mailbox_info(handle->sim_proxy,
-               req_mb->profile_id, req_mb->mb_type, req_mb->alpha_id_len,
-               req_mb->alpha_id, req_mb->number, NULL,
-               on_response_sim_set_mailbox_info, rsp_cb_data);
+       g_variant_get(dbus_result, "(iii)", &result, &f_rt.type, &f_rt.retry_count);
 
-       return TEL_RETURN_SUCCESS;
+       TAPI_SIM_CALL_CBFUNC(evt_cb_data, result, &f_rt);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_sim_get_msisdn(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+static void on_response_get_sim_facility(GObject *source_object, GAsyncResult *res,
+               gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-
-       GVariant *msisdn_list = NULL;
-       TelSimMsisdnList msisdn_info;
-
        GError *error = NULL;
-       gint sim_result = TEL_SIM_RESULT_FAILURE;
-       guint i = 0;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
 
-       memset(&msisdn_info, 0x0, sizeof(TelSimMsisdnList));
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimPinOperationResult_t result = TAPI_SIM_PIN_OPERATION_SUCCESS;
+       TelSimFacilityInfo_t fi;
 
-       /* Finish and extract the response data */
-       telephony_sim_call_get_msisdn_finish(handle->sim_proxy,
-               &sim_result, &msisdn_info.count, &msisdn_list, res, &error);
+       TAPI_SIM_RESP_CB_ENTER(evt_cb_data);
+       memset(&fi, 0, sizeof(TelSimFacilityInfo_t));
 
-       /* Process Response data */
-       CHECK_DEINIT(error, rsp_cb_data, sim_result);
-       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
-               err("Failed to get SIM MSISDN - sim_result: [%d]", sim_result);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       SIM_CHECK_ERROR(error, evt_cb_data);
 
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
-               return;
+       if (!dbus_result) {
+               TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evt_cb_data);
        }
 
-       if ((msisdn_info.count != 0)
-                       && (msisdn_info.count == g_variant_n_children(msisdn_list))) {
-               GVariantIter *iter = NULL, *iter_row = NULL;
-               GVariant *key_value;
-               const gchar *key;
-               guint i = 0;
+       g_variant_get(dbus_result, "(iii)", &result, &fi.type, &fi.f_status);
 
-               dbg("MSISDN list count: [%d]", msisdn_info.count);
-               msisdn_info.list = g_malloc0(msisdn_info.count * sizeof(TelSimMsisdnList));
+       TAPI_SIM_CALL_CBFUNC(evt_cb_data, result, &fi);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
+}
 
-               g_variant_get(msisdn_list, "aa{sv}", &iter);
-               while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
-                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
-                               if (g_strcmp0(key, "alpha_id") == 0) {
-                                       msisdn_info.list[i].alpha_id =
-                                               g_strdup(g_variant_get_string(key_value, NULL));
-                               }
+static void on_response_get_sim_lock_info(GObject *source_object, GAsyncResult *res,
+               gpointer user_data)
+{
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
 
-                               if (g_strcmp0(key, "num") == 0) {
-                                       msisdn_info.list[i].num =
-                                               g_strdup(g_variant_get_string(key_value, NULL));
-                               }
-                       }
-                       i++;
-                       g_variant_iter_free(iter_row);
-               }
-               g_variant_iter_free(iter);
-       }
-       else {
-               err("Invalid MSISDN list count: [%d]", msisdn_info.count);
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimPinOperationResult_t result = TAPI_SIM_PIN_OPERATION_SUCCESS;
+       TelSimLockInfo_t lock;
 
-               sim_result = TEL_SIM_RESULT_FAILURE;
-               msisdn_info.count = 0;
-       }
+       TAPI_SIM_RESP_CB_ENTER(evt_cb_data);
+       memset(&lock, 0, sizeof(TelSimLockInfo_t));
 
-       /* Free resources */
-       g_variant_unref(msisdn_list);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       SIM_CHECK_ERROR(error, evt_cb_data);
 
-       /* Invoke response callback */
-       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &msisdn_info);
+       if (!dbus_result) {
+               TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evt_cb_data);
+       }
 
-       /* Free resources */
-       i = 0;
-       while (msisdn_info.count) {
-               g_free(msisdn_info.list[i].alpha_id);
-               g_free(msisdn_info.list[i].num);
+       g_variant_get(dbus_result, "(iiii)", &result, &lock.lock_type, &lock.lock_status,
+                       &lock.retry_count);
 
-               msisdn_info.count--;
-               i++;
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &lock, evt_cb_data->user_data);
        }
-       g_free(msisdn_info.list);
+
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_sim_get_msisdn(TelHandle *handle, TapiResponseCb callback, void *user_data)
+static void on_response_req_sim_apdu(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = NULL;
-       TelSimCardStatusInfo status_info = {0,};
-
-       dbg("Entry");
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
-       __get_sim_status_info(handle->sim_proxy, &status_info);
-       CHECK_IF_SIM_INITIALIZED(status_info.status);
+       GVariantIter *iter = NULL;
+       GVariant *param_gv = NULL;
+       GVariant *inner_gv = NULL;
+       guchar rt_i;
+       unsigned short i = 0;
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
+       TelSimApduResp_t r_apdu;
 
-       /* DBUS Request - GET (MSIDN) */
-       telephony_sim_call_get_msisdn(handle->sim_proxy,
-               NULL, on_response_sim_get_msisdn, rsp_cb_data);
+       TAPI_SIM_RESP_CB_ENTER(evt_cb_data);
+       memset(&r_apdu, 0, sizeof(TelSimApduResp_t));
 
-       return TEL_RETURN_SUCCESS;
-}
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       SIM_CHECK_ERROR(error, evt_cb_data);
 
-static void on_response_sim_get_spn(GObject *source_object,
-                                               GAsyncResult *res, gpointer user_data)
-{
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       if (!dbus_result) {
+               TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evt_cb_data);
+       }
 
-       TelSimSpn spn_info;
-       gint display_condition; /* Aligned to TelSimSpnDispCondition */
-       gchar *spn;
+       /*      dbg("dbus_result type_format(%s)", g_variant_get_type_string(dbus_result));*/
+       g_variant_get(dbus_result, "(i@v)", &result, &param_gv);
+       inner_gv = g_variant_get_variant(param_gv);
 
-       GError *error = NULL;
-       gint sim_result = TEL_SIM_RESULT_FAILURE;
+       g_variant_get(inner_gv, "ay", &iter);
+       while (g_variant_iter_loop(iter, "y", &rt_i)) {
+               r_apdu.apdu_resp[i] = rt_i;
+               i++;
+               if (i >= TAPI_SIM_APDU_MAX_LEN)
+                       break;
+       }
+       r_apdu.apdu_resp_len = i;
+       dbg("r_apdu.apdu_resp_len=[%d]", r_apdu.apdu_resp_len);
+       g_variant_iter_free(iter);
+       g_variant_unref(inner_gv);
+       g_variant_unref(param_gv);
 
-       memset(&spn_info, 0x0, sizeof(TelSimSpn));
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &r_apdu, evt_cb_data->user_data);
+       }
 
-       /* Finish and extract the response data */
-       telephony_sim_call_get_spn_finish(handle->sim_proxy,
-                                       &sim_result, &display_condition, &spn, res, &error);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
+}
 
-       /* Process Response data */
-       CHECK_DEINIT(error, rsp_cb_data, sim_result);
-       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
-               err("Failed to get SIM SPN - sim_result: [%d]", sim_result);
+static void on_response_req_sim_atr(GObject *source_object, GAsyncResult *res, gpointer user_data)
+{
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
 
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
-               return;
-       }
+       GVariantIter *iter = NULL;
+       GVariant *param_gv = NULL;
+       GVariant *inner_gv = NULL;
+       guchar rt_i;
+       unsigned short i = 0;
 
-       /* Validate Response data */
-       if (strlen(spn) > TEL_SIM_SPN_LEN_MAX) {
-               err("Invalid SPN length: [%d] SPN: [%s]", strlen(spn), spn);
-               sim_result = TEL_SIM_RESULT_FAILURE;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
+       TelSimAtrResp_t r_atr;
 
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
+       TAPI_SIM_RESP_CB_ENTER(evt_cb_data);
+       memset(&r_atr, 0, sizeof(TelSimAtrResp_t));
 
-               /* Free resources */
-               g_free(spn);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       SIM_CHECK_ERROR(error, evt_cb_data);
 
-               return;
+       if (!dbus_result) {
+               TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evt_cb_data);
        }
 
-       memcpy(spn_info.spn, spn, strlen(spn));
-       spn_info.spn[strlen(spn)] = '\0';
-       spn_info.display_condition = display_condition;
+       dbg("dbus_result type_format(%s)", g_variant_get_type_string(dbus_result));
+       g_variant_get(dbus_result, "(i@v)", &result, &param_gv);
+       inner_gv = g_variant_get_variant(param_gv);
 
-       /* Free resources */
-       g_free(spn);
+       g_variant_get(inner_gv, "ay", &iter);
+       while (g_variant_iter_loop(iter, "y", &rt_i)) {
+               r_atr.atr_resp[i] = rt_i;
+               i++;
+       }
+       r_atr.atr_resp_len = i;
+       dbg("r_atr.atr_resp_len=[%d]", r_atr.atr_resp_len);
+       g_variant_iter_free(iter);
+       g_variant_unref(inner_gv);
+       g_variant_unref(param_gv);
 
-       dbg("SPN: [%s] Display condition: [%d]", spn_info.spn, spn_info.display_condition);
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &r_atr, evt_cb_data->user_data);
+       }
 
-       /* Invoke response callback */
-       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &spn_info);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_sim_get_spn(TelHandle *handle, TapiResponseCb callback, void *user_data)
+static void on_response_set_sim_power_state(GObject *source_object, GAsyncResult *res,
+               gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = NULL;
-       TelSimCardStatusInfo status_info = {0,};
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       GVariant *dbus_result;
 
-       dbg("Entry");
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimPowerSetResult_t result = TAPI_SIM_POWER_SET_SUCCESS;
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
-       __get_sim_status_info(handle->sim_proxy, &status_info);
-       CHECK_IF_SIM_INITIALIZED(status_info.status);
+       TAPI_SIM_RESP_CB_ENTER(evt_cb_data);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       SIM_CHECK_ERROR(error, evt_cb_data);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       if (!dbus_result) {
+               TAPI_SIM_CHECK_ERR_MSG_AND_CALL_NULL_CBFUNC(error, evt_cb_data);
+       }
+
+       g_variant_get(dbus_result, "(i)", &result);
 
-       /* DBUS Request - GET (SPN) */
-       telephony_sim_call_get_spn(handle->sim_proxy,
-                                       NULL, on_response_sim_get_spn, rsp_cb_data);
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
+       }
 
-       return TEL_RETURN_SUCCESS;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_sim_get_cphs_netname(GObject *source_object,
-                                               GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_get_sim_init_info(TapiHandle *handle, TelSimCardStatus_t *sim_status,
+               int *card_changed)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       GError *gerr = NULL;
+       GVariant *sync_gv = NULL;
+       TelSimCardStatus_t init_status = 0;
+       int changed = FALSE;
 
-       TelSimCphsNetName cphs_info;
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(sim_status, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(card_changed, TAPI_API_INVALID_PTR);
 
-       GError *error = NULL;
-       gint sim_result = TEL_SIM_RESULT_FAILURE;
-
-       memset(&cphs_info, 0x0, sizeof(TelSimCphsNetName));
+       TAPI_SIM_CHECK_TAPI_STATE();
 
-       /* Finish and extract the response data */
-       telephony_sim_call_get_cphs_net_name_finish(handle->sim_proxy,
-                       &sim_result, &cphs_info.full_name, &cphs_info.short_name, res, &error);
+       sync_gv = g_dbus_connection_call_sync(handle->dbus_connection, DBUS_TELEPHONY_SERVICE,
+                       handle->path, DBUS_TELEPHONY_SIM_INTERFACE, "GetInitStatus", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca, &gerr);
 
-       /* Process Response data */
-       CHECK_DEINIT(error, rsp_cb_data, sim_result);
-       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
-               err("Failed to get CPHS Network name - sim_result: [%d]", sim_result);
+       if (sync_gv) {
+               g_variant_get(sync_gv, "(ib)", &init_status, &changed);
+               *sim_status = init_status;
+               *card_changed = changed;
+               msg("[%s] sim_init_status[%d] changed[%d]", handle->cp_name, init_status, changed);
 
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
-               return;
+               g_variant_unref(sync_gv);
+       } else {
+               TAPI_SIM_CHECK_ERR_MSG(gerr);
        }
-       dbg("CPHS - Full name: [%s] Short name: [%s]", cphs_info.full_name, cphs_info.short_name);
 
-       /* Invoke response callback */
-       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &cphs_info);
-
-       /* Free resources */
-       g_free(cphs_info.full_name);
-       g_free(cphs_info.short_name);
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_sim_get_cphs_netname(TelHandle *handle, TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_get_sim_type(TapiHandle *handle, TelSimCardType_t *card_type)
 {
-       TapiRespCbData *rsp_cb_data = NULL;
-       TelSimCardStatusInfo status_info = {0,};
-
-       dbg("Entry");
+       GError *gerr = NULL;
+       GVariant *sync_gv = NULL;
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
-       __get_sim_status_info(handle->sim_proxy, &status_info);
-       CHECK_IF_SIM_INITIALIZED(status_info.status);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(card_type, TAPI_API_INVALID_PTR);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       TAPI_SIM_CHECK_TAPI_STATE();
 
-       /* DBUS Request - GET (CPHS Network name) */
-       telephony_sim_call_get_cphs_net_name(handle->sim_proxy,
-                                       NULL, on_response_sim_get_cphs_netname, rsp_cb_data);
+       sync_gv = g_dbus_connection_call_sync(handle->dbus_connection, DBUS_TELEPHONY_SERVICE,
+                       handle->path, DBUS_TELEPHONY_SIM_INTERFACE, "GetCardType", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca, &gerr);
+       if (sync_gv) {
+               g_variant_get(sync_gv, "(i)", card_type);
 
-       return TEL_RETURN_SUCCESS;
+               g_variant_unref(sync_gv);
+       } else {
+               TAPI_SIM_CHECK_ERR_MSG(gerr);
+       }
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_sim_get_sp_display_info(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_get_sim_imsi(TapiHandle *handle, TelSimImsiInfo_t *imsi)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-
-       GVariant *sp_list;
-       TelSimSpPlmnList sp_info;
-
-       GError *error = NULL;
-       gint sim_result = TEL_SIM_RESULT_FAILURE;
-       guint i = 0;
-
-       memset(&sp_info, 0, sizeof(TelSimSpPlmnList));
-
-       /* Finish and extract the response data */
-       telephony_sim_call_get_sp_display_info_finish(handle->sim_proxy,
-               &sim_result, &sp_info.count, &sp_list, res, &error);
-
-       /* Process Response data */
-       CHECK_DEINIT(error, rsp_cb_data, sim_result);
-       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
-               err("Failed to get SIM SP Display info - sim_result: [%d]", sim_result);
+       GError *gerr = NULL;
+       GVariant *sync_gv = NULL;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(imsi, TAPI_API_INVALID_PTR);
+
+       TAPI_SIM_CHECK_TAPI_STATE();
+
+       sync_gv = g_dbus_connection_call_sync(handle->dbus_connection, DBUS_TELEPHONY_SERVICE,
+                       handle->path, DBUS_TELEPHONY_SIM_INTERFACE, "GetIMSI", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca, &gerr);
+       if (sync_gv) {
+               gchar *gplmn = NULL;
+               gchar *gmsin = NULL;
+               int gplmn_len = 0;
+               int gmsin_len = 0;
+
+               g_variant_get(sync_gv, "(ss)", &gplmn, &gmsin);
+
+               gplmn_len = strlen((const char*)gplmn);
+               gmsin_len = strlen((const char*)gmsin);
+
+               if (gplmn_len >= 5 && gmsin_len >= 9) {
+                       snprintf(imsi->szMcc, 3 + 1, "%s", gplmn);
+                       snprintf(imsi->szMnc, gplmn_len - 3 + 1, "%s", &gplmn[3]);
+                       snprintf(imsi->szMsin, gmsin_len + 1, "%s", gmsin);
+               } else {
+                       msg("invalid length.(plmn_len=%d, msin_len=%d)", gplmn_len,gmsin_len);
+                       memset(imsi, 0, sizeof(TelSimImsiInfo_t));
+               }
+               g_free(gplmn);
+               g_free(gmsin);
 
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
-               return;
+               g_variant_unref(sync_gv);
+       } else {
+               TAPI_SIM_CHECK_ERR_MSG(gerr);
        }
 
-       /* Validate Response data */
-       if ((sp_info.count != 0)
-                       && (g_variant_n_children(sp_list) == sp_info.count)) {
-               GVariantIter *iter = NULL, *iter_row = NULL;
-               GVariant *key_value;
-               const gchar *key;
-               guint i = 0;
-
-               dbg("SPN list count: [%d]", sp_info.count);
-               sp_info.list = g_malloc0(sp_info.count * sizeof(TelSimSpPlmnList));
+       return TAPI_API_SUCCESS;
+}
 
-               g_variant_get(sp_list, "aa{sv}", &iter);
+EXPORT_API int tel_get_sim_ecc(TapiHandle *handle, TelSimEccList_t *ecc)
+{
+       GError *gerr = NULL;
+       GVariant *sync_gv;
+       GVariant *value = NULL;
+       GVariantIter *iter = NULL;
+       GVariantIter *iter_row = NULL;
+       const gchar *key = NULL;
+       const gchar *str_value = NULL;
+       int i = 0;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(ecc, TAPI_API_INVALID_PTR);
+
+       TAPI_SIM_CHECK_TAPI_STATE();
+
+       memset(ecc, 0, sizeof(TelSimEccList_t));
+
+       sync_gv = g_dbus_connection_call_sync(handle->dbus_connection, DBUS_TELEPHONY_SERVICE,
+                       handle->path, DBUS_TELEPHONY_SIM_INTERFACE, "GetECC", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca, &gerr);
+
+       if (sync_gv) {
+/*             dbg("ecc type_format(%s)", g_variant_get_type_string(sync_gv));*/
+               g_variant_get(sync_gv, "(aa{sv})", &iter);
+               ecc->ecc_count = g_variant_iter_n_children(iter);
+               msg("ecc->ecc_count[%d]",ecc->ecc_count);
+               i = 0;
                while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
-                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
-                               if (g_strcmp0(key, "index") == 0) {
-                                       sp_info.list[i].index =
-                                               g_variant_get_uint32(key_value);
+                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &value)) {
+                               if (!g_strcmp0(key, "name")) {
+                                       str_value = g_variant_get_string(value, NULL);
+                                       snprintf(ecc->list[i].name, strlen((const char*)str_value) + 1, "%s", str_value);
                                }
-
-                               if (g_strcmp0(key, "plmn") == 0) {
-                                       sp_info.list[i].plmn =
-                                               g_strdup(g_variant_get_string(key_value, NULL));
+                               if (!g_strcmp0(key, "number")) {
+                                       str_value = g_variant_get_string(value, NULL);
+                                       snprintf(ecc->list[i].number, strlen((const char*)str_value) + 1, "%s", str_value);
+                               }
+                               if (!g_strcmp0(key, "category")) {
+                                       ecc->list[i].category = g_variant_get_int32(value);
                                }
                        }
                        i++;
                        g_variant_iter_free(iter_row);
                }
                g_variant_iter_free(iter);
-       }
-       else {
-               err("Invalid SP info count: [%d] SPN: [%s]", sp_info.count);
 
-               sim_result = TEL_SIM_RESULT_FAILURE;
-               sp_info.count = 0;
+               g_variant_unref(sync_gv);
        }
-
-       /* Free  resources */
-       g_variant_unref(sp_list);
-
-       /* Invoke response callback */
-       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &sp_info);
-
-       /* Free  resources */
-       i = 0;
-       while (sp_info.count) {
-               g_free(sp_info.list[i].plmn);
-
-               sp_info.count--;
-               i++;
+       else {
+               TAPI_SIM_CHECK_ERR_MSG(gerr);
        }
-       g_free(sp_info.list);
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_sim_get_sp_display_info(TelHandle *handle,
-       TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_get_sim_iccid(TapiHandle *handle, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = NULL;
-       TelSimCardStatusInfo status_info = {0,};
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
-       __get_sim_status_info(handle->sim_proxy, &status_info);
-       CHECK_IF_SIM_INITIALIZED(status_info.status);
+       TAPI_SIM_CHECK_TAPI_STATE();
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       /* DBUS Request - GET (SP Display info) */
-       telephony_sim_call_get_sp_display_info(handle->sim_proxy,
-               NULL, on_response_sim_get_sp_display_info, rsp_cb_data);
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "GetICCID", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_get_sim_iccid, evt_cb_data);
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_sim_req_authentication(GObject *source_object,
-                                               GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_get_sim_language(TapiHandle *handle, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-
-       TelSimAuthenticationResponse auth_resp;
-       gint auth_type; /* Aligned to TelSimAuthenticationType */
-       gchar *resp_data, *authentication_key, *cipher_data, *integrity_data;
-       guchar *decoded_data;
-       gsize decoded_data_len = 0;
-
-       GError *error = NULL;
-       gint sim_result = TEL_SIM_RESULT_FAILURE;
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-       memset(&auth_resp, 0x0, sizeof(TelSimAuthenticationResponse));
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       /* Finish and extract the response data */
-       telephony_sim_call_req_authentication_finish(handle->sim_proxy,
-                       &sim_result, &auth_type, &resp_data, &authentication_key,
-                       &cipher_data, &integrity_data, res, &error);
-
-       /* Process Response data */
-       CHECK_DEINIT(error, rsp_cb_data, sim_result);
-       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
-               err("Failed to get SIM SP Display info - sim_result: [%d]", sim_result);
-
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
-               return;
-       }
-       auth_resp.auth_type = auth_type;
+       TAPI_SIM_CHECK_TAPI_STATE();
 
-       /* Decode Base64 - Response data */
-       decoded_data = g_base64_decode((const gchar *)resp_data, &decoded_data_len);
-       if (decoded_data_len > TEL_SIM_AUTH_MAX_RESP_DATA_LEN) {
-               err("Invalid Response Data length: [%d]", decoded_data_len);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "GetLanguage", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT,
+                       handle->ca, on_response_get_sim_language, evt_cb_data);
 
-               /* Free resources */
-               g_free(decoded_data);
-               g_free(resp_data);
-
-               return;
-       }
+       return TAPI_API_SUCCESS;
+}
 
-       if (decoded_data_len)
-               memcpy(auth_resp.resp_data, decoded_data, decoded_data_len);
-       auth_resp.resp_length = decoded_data_len;
+EXPORT_API int tel_set_sim_language(TapiHandle *handle, TelSimLanguagePreferenceCode_t language,
+               tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
 
-       /* Free resources */
-       g_free(decoded_data);
-       decoded_data = NULL;
-       g_free(resp_data);
-       decoded_data_len = 0;
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       /* Decode Base64 - Authentication Key */
-       decoded_data = g_base64_decode((const gchar *)authentication_key, &decoded_data_len);
-       if (decoded_data_len > TEL_SIM_AUTH_MAX_RESP_DATA_LEN) {
-               err("Invalid Authentication Key length: [%d]", decoded_data_len);
+       TAPI_SIM_CHECK_TAPI_STATE();
 
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-               /* Free resources */
-               g_free(decoded_data);
-               g_free(authentication_key);
+       param = g_variant_new("(i)", language);
 
-               return;
-       }
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "SetLanguage", param, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT,
+                       handle->ca, on_response_set_sim_language, evt_cb_data);
 
-       if (decoded_data_len)
-               memcpy(auth_resp.authentication_key, decoded_data, decoded_data_len);
-       auth_resp.authentication_key_length = decoded_data_len;
+       return TAPI_API_SUCCESS;
+}
 
-       /* Free resources */
-       g_free(decoded_data);
-       decoded_data = NULL;
-       g_free(authentication_key);
-       decoded_data_len = 0;
+EXPORT_API int tel_get_sim_callforwarding_info(TapiHandle *handle, tapi_response_cb callback,
+               void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-       /* Decode Base64 - Cipher data */
-       decoded_data = g_base64_decode((const gchar *)cipher_data, &decoded_data_len);
-       if (decoded_data_len > TEL_SIM_AUTH_MAX_RESP_DATA_LEN) {
-               err("Invalid Cipher Data length: [%d]", decoded_data_len);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
+       TAPI_SIM_CHECK_TAPI_STATE();
 
-               /* Free resources */
-               g_free(decoded_data);
-               g_free(cipher_data);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-               return;
-       }
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "GetCallForwarding", NULL, NULL, G_DBUS_CALL_FLAGS_NONE,
+                       TAPI_DEFAULT_TIMEOUT, handle->ca, on_response_get_sim_callforwarding_info, evt_cb_data);
 
-       if (decoded_data_len)
-               memcpy(auth_resp.cipher_data, decoded_data, decoded_data_len);
-       auth_resp.cipher_length = decoded_data_len;
+       return TAPI_API_SUCCESS;
+}
 
-       /* Free resources */
-       g_free(decoded_data);
-       decoded_data = NULL;
-       g_free(cipher_data);
-       decoded_data_len = 0;
+EXPORT_API int tel_set_sim_callforwarding_info(TapiHandle *handle, TelSimCallForwardingReq_t *req_cf,
+               tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
+       gchar *g_number = NULL;
 
-       /* Decode Base64 - Integrity data */
-       decoded_data = g_base64_decode((const gchar *)integrity_data, &decoded_data_len);
-       if (decoded_data_len > TEL_SIM_AUTH_MAX_RESP_DATA_LEN) {
-               err("Invalid Integrity Data length: [%d]", decoded_data_len);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(req_cf, TAPI_API_INVALID_PTR);
 
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
+       TAPI_SIM_CHECK_TAPI_STATE();
 
-               /* Free resources */
-               g_free(decoded_data);
-               g_free(integrity_data);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-               return;
+       g_number = calloc(1, strlen((const char*)&req_cf->cf_data_u.cf.cfu_num)+1);
+       if (!g_number) {
+               g_free(evt_cb_data);
+               return TAPI_API_SYSTEM_OUT_OF_MEM;
        }
 
-       if (decoded_data_len)
-               memcpy(auth_resp.integrity_data, decoded_data, decoded_data_len);
-       auth_resp.integrity_length = decoded_data_len;
+       memcpy((void*)g_number, (const void*)&req_cf->cf_data_u.cf.cfu_num, strlen((const char*)&req_cf->cf_data_u.cf.cfu_num));
 
-       /* Free resources */
-       g_free(decoded_data);
-       decoded_data = NULL;
-       g_free(integrity_data);
-       decoded_data_len = 0;
+       param = g_variant_new("(biiyiisiibbbb)",
+                       req_cf->b_cphs,
+                       req_cf->cf_data_u.cf.rec_index,
+                       req_cf->cf_data_u.cf.msp_num,
+                       req_cf->cf_data_u.cf.cfu_status,
+                       req_cf->cf_data_u.cf.ton,
+                       req_cf->cf_data_u.cf.npi,
+                       g_number,
+                       req_cf->cf_data_u.cf.cc2_id,
+                       req_cf->cf_data_u.cf.ext7_id,
+                       req_cf->cf_data_u.cphs_cf.b_line1,
+                       req_cf->cf_data_u.cphs_cf.b_line2,
+                       req_cf->cf_data_u.cphs_cf.b_fax,
+                       req_cf->cf_data_u.cphs_cf.b_data);
 
-       dbg("Authentication type: [%d] Authentication Response Length: [%d] "\
-               "Authentication Key Length: [%d] Cipher Length: [%d] Integrity Length: [%d]",
-               auth_resp.auth_type, auth_resp.resp_length, auth_resp.authentication_key_length,
-               auth_resp.cipher_length, auth_resp.integrity_length);
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "SetCallForwarding", param, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT,
+                       handle->ca, on_response_set_sim_callforwarding_info, evt_cb_data);
 
-       /* Invoke response callback */
-       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &auth_resp);
+       if (g_number)
+               free(g_number);
+
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_sim_req_authentication(TelHandle *handle,
-               TelSimAuthenticationData *authentication_data, TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_get_sim_messagewaiting_info(TapiHandle *handle, tapi_response_cb callback,
+               void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = NULL;
-       gchar *encoded_rand, *encoded_autn;
-       TelSimCardStatusInfo status_info = {0,};
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && authentication_data && callback, TEL_RETURN_INVALID_PARAMETER);
-       __get_sim_status_info(handle->sim_proxy, &status_info);
-       CHECK_IF_SIM_INITIALIZED(status_info.status);
+       TAPI_SIM_CHECK_TAPI_STATE();
 
-       if (authentication_data->auth_type > TEL_SIM_AUTH_IMS_AKA) {
-               err("Invalid Authentication type: [%d]", authentication_data->auth_type);
-               return TEL_RETURN_INVALID_PARAMETER;
-       }
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       if (authentication_data->rand_length == 0) {
-               err("Invalid RAND length: [%d]", authentication_data->auth_type);
-               return TEL_RETURN_INVALID_PARAMETER;
-       }
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "GetMessageWaiting", NULL, NULL, G_DBUS_CALL_FLAGS_NONE,
+                       TAPI_DEFAULT_TIMEOUT, handle->ca, on_response_get_sim_messagewaiting_info, evt_cb_data);
 
-       if ((authentication_data->auth_type != TEL_SIM_AUTH_GSM)
-                       && (authentication_data->autn_length == 0)) {
-               err("Invalid inputs - Auth type: [%d] AUTN length: [%d]",
-                               authentication_data->auth_type, authentication_data->autn_length);
-               return TEL_RETURN_INVALID_PARAMETER;
-       }
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_set_sim_messagewaiting_info(TapiHandle *handle, TelSimMessageWaitingReq_t *req_mw,
+               tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(req_mw, TAPI_API_INVALID_PTR);
+
+       TAPI_SIM_CHECK_TAPI_STATE();
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       dbg("b_cphs[%d], rec_index[%d], indicator_status[0x%x], voice_count[%d], fax_count[%d], email_count[%d], other_count[%d], video_count[%d], b_voice1[%d],b_voice2[%d],b_fax[%d], b_data[%d]",
+                       req_mw->b_cphs,
+                       req_mw->mw_data_u.mw.rec_index,
+                       req_mw->mw_data_u.mw.indicator_status,
+                       req_mw->mw_data_u.mw.voice_count,
+                       req_mw->mw_data_u.mw.fax_count,
+                       req_mw->mw_data_u.mw.email_count,
+                       req_mw->mw_data_u.mw.other_count,
+                       req_mw->mw_data_u.mw.video_count,
+                       req_mw->mw_data_u.cphs_mw.b_voice1,
+                       req_mw->mw_data_u.cphs_mw.b_voice2,
+                       req_mw->mw_data_u.cphs_mw.b_fax,
+                       req_mw->mw_data_u.cphs_mw.b_data);
+
+       param = g_variant_new("(biyiiiiibbbb)",
+                       req_mw->b_cphs,
+                       req_mw->mw_data_u.mw.rec_index,
+                       req_mw->mw_data_u.mw.indicator_status,
+                       req_mw->mw_data_u.mw.voice_count,
+                       req_mw->mw_data_u.mw.fax_count,
+                       req_mw->mw_data_u.mw.email_count,
+                       req_mw->mw_data_u.mw.other_count,
+                       req_mw->mw_data_u.mw.video_count,
+                       req_mw->mw_data_u.cphs_mw.b_voice1,
+                       req_mw->mw_data_u.cphs_mw.b_voice2,
+                       req_mw->mw_data_u.cphs_mw.b_fax,
+                       req_mw->mw_data_u.cphs_mw.b_data);
+
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "SetMessageWaiting", param, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT,
+                       handle->ca, on_response_set_sim_messagewaiting_info, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+EXPORT_API int tel_get_sim_mailbox_info(TapiHandle *handle, tapi_response_cb callback,
+               void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-       /* Encode Base64 - Rand data */
-       encoded_rand = g_base64_encode((const guchar *)authentication_data->rand_data,
-                                       authentication_data->rand_length);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       /* Encode Base64 - Authentication data */
-       encoded_autn = g_base64_encode((const guchar *)authentication_data->autn_data,
-                                       authentication_data->autn_length);
+       TAPI_SIM_CHECK_TAPI_STATE();
 
-       /* DBUS Request - REQ (Authentication) */
-       telephony_sim_call_req_authentication(handle->sim_proxy,
-                       authentication_data->auth_type, encoded_rand, encoded_autn, NULL,
-                       on_response_sim_req_authentication, rsp_cb_data);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       /* Free resources */
-       g_free(encoded_rand);
-       g_free(encoded_autn);
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "GetMailbox", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT,
+                       handle->ca, on_response_get_sim_mailbox_info, evt_cb_data);
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_sim_verify_pins(GObject *source_object,
-                                               GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_set_sim_mailbox_info(TapiHandle *handle, TelSimMailBoxNumber_t *req_mb,
+               tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-
-       TelSimSecPinResult verify_pin_resp;
-       gint pin_type;  /* Aligned to TelSimPinType */
-
-       GError *error = NULL;
-       gint sim_result = TEL_SIM_RESULT_FAILURE;
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
+       gchar *g_alpha = NULL;
+       gchar *g_number = NULL;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(req_mb, TAPI_API_INVALID_PTR);
+
+       TAPI_SIM_CHECK_TAPI_STATE();
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       g_alpha = calloc(1, strlen((const char*)&req_mb->alpha_id)+1);
+       if (!g_alpha) {
+               g_free(evt_cb_data);
+               return TAPI_API_SYSTEM_OUT_OF_MEM;
+       }
+
+       memcpy((void*)g_alpha, (const void*)&req_mb->alpha_id, strlen((const char*)&req_mb->alpha_id));
+
+       g_number = calloc(1, strlen((const char*)&req_mb->num)+1);
+       if (!g_number) {
+               free(g_alpha);
+               g_free(evt_cb_data);
+               return TAPI_API_SYSTEM_OUT_OF_MEM;
+       }
+
+       memcpy((void*)g_number, (const void*)&req_mb->num, strlen((const char*)&req_mb->num));
+
+       dbg("req_mb->b_cphs[%d], req_mb->rec_index[%d], req_mb->profile_num[%d], req_mb->mb_type[%d], req_mb->alpha_id_max_len[%d],req_mb->alpha_id[%s]",
+                       req_mb->b_cphs,
+                       req_mb->rec_index,
+                       req_mb->profile_num,
+                       req_mb->mb_type,
+                       req_mb->alpha_id_max_len,
+                       g_alpha);
+
+       dbg("req_mb->ton[%d],req_mb->npi[%d],g_number[%s],req_mb->cc_id[%d],req_mb->ext1_id[%d]",
+                       req_mb->ton,
+                       req_mb->npi,
+                       g_number,
+                       req_mb->cc_id,
+                       req_mb->ext1_id);
+
+       param = g_variant_new("(biiiisiisii)",
+                       req_mb->b_cphs,
+                       req_mb->mb_type,
+                       req_mb->rec_index,
+                       req_mb->profile_num,
+                       req_mb->alpha_id_max_len,
+                       g_alpha,
+                       req_mb->ton,
+                       req_mb->npi,
+                       g_number,
+                       req_mb->cc_id,
+                       req_mb->ext1_id);
+
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "SetMailbox", param, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT,
+                       handle->ca, on_response_set_sim_mailbox_info, evt_cb_data);
+
+       if (g_alpha)
+               free(g_alpha);
+
+       if (g_number)
+               free(g_number);
+
+       return TAPI_API_SUCCESS;
+}
 
-       memset(&verify_pin_resp, 0, sizeof(TelSimSecPinResult));
+EXPORT_API int tel_get_sim_cphs_info(TapiHandle *handle, tapi_response_cb callback,
+               void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-       /* Finish and extract the response data */
-       telephony_sim_call_verify_pins_finish(handle->sim_proxy,
-                       &sim_result, &pin_type, &verify_pin_resp.retry_count, res, &error);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       /* Process Response data */
-       CHECK_DEINIT(error, rsp_cb_data, sim_result);
-       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
-               err("Failed to Verify SIM PIN - sim_result: [%d]", sim_result);
+       TAPI_SIM_CHECK_TAPI_STATE();
 
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
-               return;
-       }
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       verify_pin_resp.pin_type = pin_type;
-       dbg("Verify PIN - Type: [%d] Re-try count: [%d]", verify_pin_resp.pin_type, verify_pin_resp.retry_count);
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "GetCPHSInfo", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_get_sim_cphs_info, evt_cb_data);
 
-       /* Invoke response callback */
-       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &verify_pin_resp);
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_sim_verify_pins(TelHandle *handle,
-                       TelSimSecPinPw  *pin_data, TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_get_sim_service_table(TapiHandle *handle, tapi_response_cb callback,
+               void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = NULL;
-       TelSimCardStatusInfo status_info = {0,};
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && pin_data && pin_data->pw && callback,
-                               TEL_RETURN_INVALID_PARAMETER);
-       __get_sim_status_info(handle->sim_proxy, &status_info);
-       CHECK_IF_SIM_PRESENT(status_info.status);
+       TAPI_SIM_CHECK_TAPI_STATE();
 
-       if ((strlen(pin_data->pw) < 4) || (strlen(pin_data->pw) > 8)) {
-               err("Invalid PIN length: [%d", strlen(pin_data->pw));
-               return TEL_RETURN_INVALID_PARAMETER;
-       }
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "GetServiceTable", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_get_sim_service_table, evt_cb_data);
 
-       /* DBUS Request - VERIFY (PIN) */
-       telephony_sim_call_verify_pins(handle->sim_proxy,
-                                       pin_data->pin_type, pin_data->pw, NULL,
-                                       on_response_sim_verify_pins, rsp_cb_data);
-
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_sim_verify_puks(GObject *source_object,
-                                               GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_get_sim_msisdn(TapiHandle *handle, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-
-       TelSimSecPukResult verify_puk_resp;
-       gint puk_type;  /* Aligned to TelSimPukType */
-
-       GError *error = NULL;
-       gint sim_result = TEL_SIM_RESULT_FAILURE;
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-       memset(&verify_puk_resp, 0x0, sizeof(TelSimSecPukResult));
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       /* Finish and extract the response data */
-       telephony_sim_call_verify_puks_finish(handle->sim_proxy,
-                       &sim_result, &puk_type, &verify_puk_resp.retry_count, res, &error);
+       TAPI_SIM_CHECK_TAPI_STATE();
 
-       /* Process Response data */
-       CHECK_DEINIT(error, rsp_cb_data, sim_result);
-       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
-               err("Failed to Verify SIM PUK - sim_result: [%d]", sim_result);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
-               return;
-       }
-       verify_puk_resp.puk_type = puk_type;
-       dbg("Verify PUK - Type: [%d] Re-try count: [%d]", verify_puk_resp.puk_type, verify_puk_resp.retry_count);
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "GetMSISDN", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_get_sim_msisdn, evt_cb_data);
 
-       /* Invoke response callback */
-       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &verify_puk_resp);
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_sim_verify_puks(TelHandle *handle,
-               TelSimSecPukPw *puk_data, TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_get_sim_oplmnwact(TapiHandle *handle, tapi_response_cb callback,
+               void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = NULL;
-       TelSimCardStatusInfo status_info = {0,};
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && puk_data && puk_data->puk_pw &&
-                               puk_data->new_pin_pw && callback, TEL_RETURN_INVALID_PARAMETER);
-       __get_sim_status_info(handle->sim_proxy, &status_info);
-       CHECK_IF_SIM_PRESENT(status_info.status);
+       TAPI_SIM_CHECK_TAPI_STATE();
 
-       if ((strlen(puk_data->puk_pw) < 4) || (strlen(puk_data->puk_pw) > 8)
-                       || (strlen(puk_data->new_pin_pw) < 4) || (strlen(puk_data->new_pin_pw) > 8)) {
-               err("Invalid lengths - PUK: [%d] New PIN: [%d]",
-                               strlen(puk_data->puk_pw), strlen(puk_data->new_pin_pw));
-               return TEL_RETURN_INVALID_PARAMETER;
-       }
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "GetOplmnwact", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT,
+                       handle->ca, on_response_get_sim_oplmnwact, evt_cb_data);
 
-       /* DBUS Request - VERIFY (PUKS) */
-       telephony_sim_call_verify_puks(handle->sim_proxy,
-                       puk_data->puk_type, puk_data->puk_pw, puk_data->new_pin_pw,
-                       NULL, on_response_sim_verify_puks, rsp_cb_data);
-
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_sim_change_pins(GObject *source_object,
-                                               GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_get_sim_spn(TapiHandle *handle, tapi_response_cb callback,
+               void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       GError *error = NULL;
-       gint sim_result = TEL_SIM_RESULT_FAILURE;
-       TelSimSecPinResult change_pin_resp;
-       gint pin_type;
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-       memset(&change_pin_resp, 0, sizeof(TelSimSecPinResult));
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       /* Finish and extract the response data */
-       telephony_sim_call_change_pins_finish(handle->sim_proxy,
-                       &sim_result, &pin_type, &change_pin_resp.retry_count, res, &error);
+       TAPI_SIM_CHECK_TAPI_STATE();
 
-       /* Process Response data */
-       CHECK_DEINIT(error, rsp_cb_data, sim_result);
-       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
-               err("Failed to Change SIM PIN - sim_result: [%d]", sim_result);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
-               return;
-       }
-       change_pin_resp.pin_type = pin_type;
-       dbg("Change PIN - Type: [%d] Re-try count: [%d]",
-                       change_pin_resp.pin_type, change_pin_resp.retry_count);
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "GetSpn", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT,
+                       handle->ca, on_response_get_sim_spn, evt_cb_data);
 
-       /* Invoke response callback */
-       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &change_pin_resp);
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_sim_change_pins(TelHandle *handle,
-               TelSimSecChangePinPw *pin_data, TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_get_sim_cphs_netname(TapiHandle *handle, tapi_response_cb callback,
+               void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = NULL;
-       TelSimCardStatusInfo status_info = {0,};
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback && pin_data && pin_data->old_pw &&
-                               pin_data->new_pw && callback, TEL_RETURN_INVALID_PARAMETER);
-       __get_sim_status_info(handle->sim_proxy, &status_info);
-       CHECK_IF_SIM_INITIALIZED(status_info.status);
+       TAPI_SIM_CHECK_TAPI_STATE();
 
-       if ((strlen(pin_data->old_pw) < 4) || (strlen(pin_data->old_pw) > 8)
-                       || (strlen(pin_data->new_pw) < 4) || (strlen(pin_data->new_pw) > 8)) {
-               err("Invalid lengths - Old PIN: [%d] New PIN: [%d]",
-                               strlen(pin_data->old_pw), strlen(pin_data->new_pw));
-               return TEL_RETURN_INVALID_PARAMETER;
-       }
-
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       /* DBUS Request - CHANGE (PINS) */
-       telephony_sim_call_change_pins(handle->sim_proxy,
-                       pin_data->pin_type, pin_data->old_pw, pin_data->new_pw,
-                       NULL, on_response_sim_change_pins, rsp_cb_data);
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "GetCphsNetName", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT,
+                       handle->ca, on_response_get_sim_cphs_netname, evt_cb_data);
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_sim_disable_facility(GObject *source_object,
-                                               GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_req_sim_authentication(TapiHandle *handle,
+               TelSimAuthenticationData_t *authentication_data, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariantBuilder builder;
+       GVariant *param = NULL;
+       GVariant *rand_gv = NULL;
+       GVariant *autn_gv = NULL;
+       int i =0;
 
-       TelSimFacilityResult disable_facility_resp;
-       gint facility_type;     /* Aligned to TelSimLockType */
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(authentication_data, TAPI_API_INVALID_PTR);
 
-       GError *error = NULL;
-       gint sim_result = TEL_SIM_RESULT_FAILURE;
+       TAPI_SIM_CHECK_TAPI_STATE();
+
+       if (authentication_data->auth_type > TAPI_SIM_AUTH_TYPE_3G)
+               return TAPI_API_INVALID_INPUT;
 
-       memset(&disable_facility_resp, 0, sizeof(TelSimFacilityResult));
+       if (authentication_data->rand_length == 0)
+               return TAPI_API_INVALID_INPUT;
 
-       /* Finish and extract the response data */
-       telephony_sim_call_disable_facility_finish(handle->sim_proxy,
-                       &sim_result, &facility_type, &disable_facility_resp.retry_count, res, &error);
+       if (authentication_data->auth_type != TAPI_SIM_AUTH_TYPE_GSM
+                       && authentication_data->autn_length == 0)
+               return TAPI_API_INVALID_INPUT;
 
-       /* Process Response data */
-       CHECK_DEINIT(error, rsp_cb_data, sim_result);
-       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
-               err("Failed to Disable SIM facility - sim_result: [%d]", sim_result);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
-               return;
+       g_variant_builder_init(&builder, G_VARIANT_TYPE ("ay"));
+       for (i = 0; i < authentication_data->rand_length; i++) {
+               dbg("authentication_data->rand_data[%d][0x%02x]", i,authentication_data->rand_data[i]);
+               g_variant_builder_add(&builder, "y", authentication_data->rand_data[i]);
        }
-       disable_facility_resp.type = facility_type;
-       dbg("Disable Facility - Type: [%d] Re-try count: [%d]",
-                       disable_facility_resp.type, disable_facility_resp.retry_count);
+       rand_gv = g_variant_builder_end(&builder);
+
+       g_variant_builder_init(&builder, G_VARIANT_TYPE ("ay"));
+               for (i = 0; i < authentication_data->autn_length; i++) {
+                       dbg("authentication_data->autn_data[%d][0x%02x]", i,authentication_data->autn_data[i]);
+                       g_variant_builder_add(&builder, "y", authentication_data->autn_data[i]);
+               }
+       autn_gv = g_variant_builder_end(&builder);
+
+       param = g_variant_new("(ivv)", authentication_data->auth_type, rand_gv, autn_gv);
+
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "Authentication", param, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT,
+                       handle->ca, on_response_req_sim_authentication, evt_cb_data);
 
-       /* Invoke response callback */
-       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &disable_facility_resp);
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_sim_disable_facility(TelHandle *handle,
-               TelSimFacilityPw *pw, TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_verifiy_sim_pins(TapiHandle *handle, const TelSimSecPw_t *pin_data,
+               tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = NULL;
-       TelSimCardStatusInfo status_info = {0,};
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
+       gchar *gpw = NULL;
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(pin_data, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(pin_data->pw, TAPI_API_INVALID_PTR);
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && pw && pw->pw && callback, TEL_RETURN_INVALID_PARAMETER);
-       __get_sim_status_info(handle->sim_proxy, &status_info);
-       CHECK_IF_SIM_INITIALIZED(status_info.status);
+       TAPI_SIM_CHECK_TAPI_STATE();
 
-       if (pw->lock_type >TEL_SIM_LOCK_PC) {
-               err("Invalid input - Lock type: [%d]", pw->lock_type);
-               return TEL_RETURN_INVALID_PARAMETER;
-       }
+       msg("pin type[%d]", pin_data->type);
+       if (pin_data->type != TAPI_SIM_PTYPE_PIN1 && pin_data->type != TAPI_SIM_PTYPE_PIN2
+                       && pin_data->type != TAPI_SIM_PTYPE_SIM)
+               return TAPI_API_INVALID_INPUT;
 
-       if ((pw->lock_type < TEL_SIM_LOCK_PN)
-                       && ((strlen(pw->pw) < 4) || (strlen(pw->pw) > 8))) {
-               err("Invalid input - Lock type: [%d] PIN length: [%d]",
-                               pw->lock_type, strlen(pw->pw));
-               return TEL_RETURN_INVALID_PARAMETER;
-       }
+       if ((pin_data->pw_len < 4) || (pin_data->pw_len > 8))
+               return TAPI_API_INVALID_INPUT;
 
-       if ((pw->lock_type > TEL_SIM_LOCK_FD) && (strlen(pw->pw) < 6)) {
-               err("Invalid input - Lock type: [%d] PIN length: [%d]",
-                               pw->lock_type, strlen(pw->pw));
-               return TEL_RETURN_INVALID_PARAMETER;
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       gpw = calloc(1, pin_data->pw_len+1);
+       if (!gpw) {
+               g_free(evt_cb_data);
+               return TAPI_API_SYSTEM_OUT_OF_MEM;
        }
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       memcpy((void*)gpw, (const void*)pin_data->pw, pin_data->pw_len);
 
-       /* DBUS Request - DISABLE (Facility) */
-       telephony_sim_call_disable_facility(handle->sim_proxy,
-                       pw->lock_type, pw->pw, NULL, on_response_sim_disable_facility, rsp_cb_data);
+       param = g_variant_new("(is)", pin_data->type, gpw);
 
-       return TEL_RETURN_SUCCESS;
-}
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "VerifySec", param, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_PIN_TIMEOUT,
+                       handle->ca, on_response_verify_sim_pins, evt_cb_data);
 
-static void on_response_sim_enable_facility(GObject *source_object,
-                                               GAsyncResult *res, gpointer user_data)
-{
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-
-       TelSimFacilityResult enable_facility_resp;
-       gint facility_type;     /* Aligned to TelSimLockType */
+       if (gpw)
+               free(gpw);
 
-       GError *error = NULL;
-       gint sim_result = TEL_SIM_RESULT_FAILURE;
-
-       memset(&enable_facility_resp, 0x0, sizeof(TelSimFacilityResult));
+       return TAPI_API_SUCCESS;
+}
 
-       /* Finish and extract the response data */
-       telephony_sim_call_enable_facility_finish(handle->sim_proxy,
-                       &sim_result, &facility_type, &enable_facility_resp.retry_count, res, &error);
+EXPORT_API int tel_verify_sim_puks(TapiHandle *handle, const TelSimSecPw_t *puk_data,
+               const TelSimSecPw_t *new_pin_data, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
+       gchar *gpin = NULL;
+       gchar *gpuk = NULL;
 
-       /* Process Response data */
-       CHECK_DEINIT(error, rsp_cb_data, sim_result);
-       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
-               err("Failed to Enable SIM facility - sim_result: [%d]", sim_result);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL((puk_data != NULL && new_pin_data != NULL), TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL((puk_data->pw != NULL && new_pin_data->pw != NULL),    TAPI_API_INVALID_PTR);
 
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
-               return;
-       }
-       enable_facility_resp.type = facility_type;
-       dbg("Enable Facility - Type: [%d] Re-try count: [%d]",
-                       enable_facility_resp.type, enable_facility_resp.retry_count);
+       TAPI_SIM_CHECK_TAPI_STATE();
 
-       /* Invoke response callback */
-       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &enable_facility_resp);
-}
+       msg("puk type[%d] pin type[%d]", puk_data->type, new_pin_data->type);
+       if ((puk_data->type != TAPI_SIM_PTYPE_PUK1 && puk_data->type != TAPI_SIM_PTYPE_PUK2)
+                       || (new_pin_data->type != TAPI_SIM_PTYPE_PIN1 && new_pin_data->type != TAPI_SIM_PTYPE_PIN2))
+               return TAPI_API_INVALID_INPUT;
 
-EXPORT_API TelReturn tapi_sim_enable_facility(TelHandle *handle,
-               TelSimFacilityPw *pw, TapiResponseCb callback, void *user_data)
-{
-       TapiRespCbData *rsp_cb_data = NULL;
-       TelSimCardStatusInfo status_info = {0,};
+       if ((puk_data->type != TAPI_SIM_PTYPE_PUK1 || new_pin_data->type != TAPI_SIM_PTYPE_PIN1)
+                       && (puk_data->type != TAPI_SIM_PTYPE_PUK2 || new_pin_data->type != TAPI_SIM_PTYPE_PIN2))
+               return TAPI_API_INVALID_INPUT;
 
-       dbg("Entry");
+       if ((puk_data->pw_len < 4) || (puk_data->pw_len > 8) || (new_pin_data->pw_len < 4)
+                       || (new_pin_data->pw_len > 8))
+               return TAPI_API_INVALID_INPUT;
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback && pw && pw->pw,
-                               TEL_RETURN_INVALID_PARAMETER);
-       __get_sim_status_info(handle->sim_proxy, &status_info);
-       CHECK_IF_SIM_INITIALIZED(status_info.status);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       if (pw->lock_type >TEL_SIM_LOCK_PC) {
-               err("Invalid input - Lock type: [%d]", pw->lock_type);
-               return TEL_RETURN_INVALID_PARAMETER;
+       gpin = calloc(1, new_pin_data->pw_len+1);
+       if (!gpin) {
+               g_free(evt_cb_data);
+               return TAPI_API_SYSTEM_OUT_OF_MEM;
        }
 
-       if ((pw->lock_type < TEL_SIM_LOCK_PN)
-                       && ((strlen(pw->pw) < 4) || (strlen(pw->pw) > 8))) {
-               err("Invalid input - Lock type: [%d] PIN length: [%d]",
-                               pw->lock_type, strlen(pw->pw));
-               return TEL_RETURN_INVALID_PARAMETER;
+       gpuk = calloc(1, puk_data->pw_len+1);
+       if (!gpuk) {
+               g_free(evt_cb_data);
+               free(gpin);
+               return TAPI_API_SYSTEM_OUT_OF_MEM;
        }
 
-       if ((pw->lock_type > TEL_SIM_LOCK_FD) && (strlen(pw->pw) < 6)) {
-               err("Invalid input - Lock type: [%d] PIN length: [%d]",
-                               pw->lock_type, strlen(pw->pw));
-               return TEL_RETURN_INVALID_PARAMETER;
-       }
+       memcpy((void*)gpin, (const void*)new_pin_data->pw, new_pin_data->pw_len);
+       memcpy((void*)gpuk, (const void*)puk_data->pw, puk_data->pw_len);
+
+       param = g_variant_new("(iss)", puk_data->type, gpuk, gpin);
+
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "VerifyPUK", param, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_PIN_TIMEOUT,
+                       handle->ca, on_response_verify_sim_puks, evt_cb_data);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       if (gpin)
+               free(gpin);
 
-       /* DBUS Request - ENABLE (Facility) */
-       telephony_sim_call_enable_facility(handle->sim_proxy,
-                       pw->lock_type, pw->pw, NULL, on_response_sim_enable_facility, rsp_cb_data);
+       if (gpuk)
+               free(gpuk);
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_sim_get_facility(GObject *source_object,
-                                               GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_change_sim_pins(TapiHandle *handle, const TelSimSecPw_t *old_pin,
+               const TelSimSecPw_t *new_pin, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
+       gchar *gpin_o = NULL;
+       gchar *gpin_n = NULL;
 
-       TelSimFacilityInfo facility_info;
-       gint facility_type;     /* Aligned to TelSimLockType */
-       gint facility_status;   /* Aligned to TelSimFacilityStatus */
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL((old_pin != NULL && new_pin != NULL), TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL((old_pin->pw != NULL && new_pin->pw != NULL), TAPI_API_INVALID_PTR);
 
-       GError *error = NULL;
-       gint sim_result = TEL_SIM_RESULT_FAILURE;
+       TAPI_SIM_CHECK_TAPI_STATE();
 
-       memset(&facility_info, 0, sizeof(TelSimFacilityInfo));
+       msg("old_pin type[%d],new_pin type[%d]", old_pin->type, new_pin->type);
+       if ((old_pin->type != TAPI_SIM_PTYPE_PIN1) && (old_pin->type != TAPI_SIM_PTYPE_PIN2)
+                       && (new_pin->type != TAPI_SIM_PTYPE_PIN1) && (new_pin->type != TAPI_SIM_PTYPE_PIN2))
+               return TAPI_API_INVALID_INPUT;
 
-       /* Finish and extract the response data */
-       telephony_sim_call_get_facility_finish(handle->sim_proxy,
-                       &sim_result, &facility_type, &facility_status, res, &error);
+       if (old_pin->type != new_pin->type)
+               return TAPI_API_INVALID_INPUT;
 
-       /* Process Response data */
-       CHECK_DEINIT(error, rsp_cb_data, sim_result);
-       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
-               err("Failed to Get SIM facility - sim_result: [%d]", sim_result);
+       if ((old_pin->pw_len < 4) || (old_pin->pw_len > 8))
+               return TAPI_API_INVALID_INPUT;
 
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
-               return;
-       }
-       facility_info.type = facility_type;
-       facility_info.f_status = facility_status;
-       dbg("Get Facility - Type: [%d] Status: [%d]",
-                       facility_info.type, facility_info.f_status);
+       if ((new_pin->pw_len < 4) || (new_pin->pw_len > 8))
+               return TAPI_API_INVALID_INPUT;
 
-       /* Invoke response callback */
-       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &facility_info);
-}
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-EXPORT_API TelReturn tapi_sim_get_facility(TelHandle *handle,
-               TelSimLockType type, TapiResponseCb callback, void *user_data)
-{
-       TapiRespCbData *rsp_cb_data = NULL;
-       TelSimCardStatusInfo status_info = {0,};
+       gpin_o = calloc(1, old_pin->pw_len+1);
+       if (!gpin_o) {
+               g_free(evt_cb_data);
+               return TAPI_API_SYSTEM_OUT_OF_MEM;
+       }
+
+       gpin_n = calloc(1, new_pin->pw_len+1);
+       if (!gpin_n) {
+               free(gpin_o);
+               g_free(evt_cb_data);
+               return TAPI_API_SYSTEM_OUT_OF_MEM;
+       }
 
-       dbg("Entry");
+       memcpy((void*)gpin_o, (const void*)old_pin->pw, old_pin->pw_len);
+       memcpy((void*)gpin_n, (const void*)new_pin->pw, new_pin->pw_len);
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
-       __get_sim_status_info(handle->sim_proxy, &status_info);
-       CHECK_IF_SIM_PRESENT(status_info.status);
+       param = g_variant_new("(iss)", old_pin->type, gpin_o, gpin_n);
+       msg("old_pin len[%d],new_pin len[%d]", old_pin->pw_len, new_pin->pw_len);
 
-       if (type >TEL_SIM_LOCK_PC) {
-               err("Invalid input - Facility type: [%d]", type);
-               return TEL_RETURN_INVALID_PARAMETER;
-       }
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "ChangePIN", param, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT,
+                       handle->ca, on_response_change_sim_pins, evt_cb_data);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       if (gpin_o)
+               free(gpin_o);
 
-       /* DBUS Request - GET (Facility) */
-       telephony_sim_call_get_facility(handle->sim_proxy,
-                       type, NULL, on_response_sim_get_facility, rsp_cb_data);
+       if (gpin_n)
+               free(gpin_n);
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_sim_get_lock_info(GObject *source_object,
-                                               GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_disable_sim_facility(TapiHandle *handle, TelSimFacilityPw_t *pw,
+               tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
+       gchar *gpw = NULL;
 
-       TelSimLockInfo lock_info;
-       gint lock_type; /* Aligned to TelSimLockType */
-       gint lock_status;       /* Aligned to TelSimLockStatus */
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(pw, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(pw->pw, TAPI_API_INVALID_PTR);
 
-       GError *error = NULL;
-       gint sim_result = TEL_SIM_RESULT_FAILURE;
+       TAPI_SIM_CHECK_TAPI_STATE();
 
-       memset(&lock_info, 0x0, sizeof(TelSimLockInfo));
+       dbg("facility type[%d]", pw->lock_type);
+       if(pw->lock_type < TAPI_SIM_LOCK_PS || pw->lock_type >TAPI_SIM_LOCK_PC)
+               return TAPI_API_INVALID_INPUT;
+       if ((pw->lock_type < TAPI_SIM_LOCK_PN) && ((pw->pw_len < 4) || (pw->pw_len > 8)) )
+               return TAPI_API_INVALID_INPUT;
+       if ((pw->lock_type > TAPI_SIM_LOCK_FD) && (pw->pw_len < 6) )
+               return TAPI_API_INVALID_INPUT;
 
-       /* Finish and extract the response data */
-       telephony_sim_call_get_lock_info_finish(handle->sim_proxy, &sim_result, &lock_type,
-                                                                                       &lock_status, &lock_info.retry_count,
-                                                                                       res, &error);
-       /* Process Response data */
-       CHECK_DEINIT(error, rsp_cb_data, sim_result);
-       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
-               err("Failed to Get SIM Lock info: [%d]", sim_result);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
-               return;
+       gpw = calloc(1, pw->pw_len+1);
+       if (!gpw) {
+               g_free(evt_cb_data);
+               return TAPI_API_SYSTEM_OUT_OF_MEM;
        }
-       lock_info.lock_type = lock_type;
-       lock_info.lock_status = lock_status;
-       dbg("SIM lock - Type: [%d] Status: [%d] Re-try count: [%d]",
-                       lock_info.lock_type, lock_info.lock_status, lock_info.retry_count);
 
-       /* Invoke response callback */
-       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &lock_info);
+       memcpy((void*)gpw, (const void*)pw->pw, pw->pw_len);
+
+       param = g_variant_new("(is)", pw->lock_type, gpw);
+
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "DisableFacility", param, NULL, G_DBUS_CALL_FLAGS_NONE,
+                       TAPI_DEFAULT_TIMEOUT, handle->ca, on_response_disable_sim_facility, evt_cb_data);
+
+       if (gpw)
+               free(gpw);
+
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_sim_get_lock_info(TelHandle *handle,
-               TelSimLockType type, TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_enable_sim_facility(TapiHandle *handle, TelSimFacilityPw_t *pw,
+               tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = NULL;
-       TelSimCardStatusInfo status_info = {0,};
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
+       gchar *gpw = NULL;
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(pw, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(pw->pw, TAPI_API_INVALID_PTR);
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
-       __get_sim_status_info(handle->sim_proxy, &status_info);
-       CHECK_IF_SIM_PRESENT(status_info.status);
+       TAPI_SIM_CHECK_TAPI_STATE();
 
-       if (type >TEL_SIM_LOCK_PC) {
-               err("Invalid input - Lock type: [%d]", type);
-               return TEL_RETURN_INVALID_PARAMETER;
+       msg("facility type[%d]", pw->lock_type);
+       if(pw->lock_type < TAPI_SIM_LOCK_PS || pw->lock_type >TAPI_SIM_LOCK_PC)
+               return TAPI_API_INVALID_INPUT;
+       if ((pw->lock_type < TAPI_SIM_LOCK_PN) && ((pw->pw_len < 4) || (pw->pw_len > 8)) )
+               return TAPI_API_INVALID_INPUT;
+       if ((pw->lock_type > TAPI_SIM_LOCK_FD) && (pw->pw_len < 6) )
+               return TAPI_API_INVALID_INPUT;
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       gpw = calloc(1, pw->pw_len+1);
+       if (!gpw) {
+               g_free(evt_cb_data);
+               return TAPI_API_SYSTEM_OUT_OF_MEM;
        }
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       memcpy((void*)gpw, (const void*)pw->pw, pw->pw_len);
+
+       param = g_variant_new("(is)", pw->lock_type, gpw);
 
-       /* DBUS Request - GET (Lock info) */
-       telephony_sim_call_get_lock_info(handle->sim_proxy,
-                       type, NULL, on_response_sim_get_lock_info, rsp_cb_data);
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "EnableFacility", param, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT,
+                       handle->ca, on_response_enable_sim_facility, evt_cb_data);
 
-       return TEL_RETURN_SUCCESS;
+       if (gpw)
+               free(gpw);
+
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_sim_req_apdu(GObject *source_object,
-                                               GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_get_sim_facility(TapiHandle *handle, TelSimLockType_t type,
+               tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
 
-       TelSimApduResp apdu_resp;
-       guchar *decode_apdu_resp;
-       gsize decode_apdu_resp_len;
-       gchar *apdu;
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       GError *error = NULL;
-       gint sim_result = TEL_SIM_RESULT_FAILURE;
+       TAPI_SIM_CHECK_TAPI_STATE();
 
-       memset(&apdu_resp, 0x0, sizeof(TelSimApduResp));
+       msg("facility type[%d]", type);
+       if(type < TAPI_SIM_LOCK_PS || type >TAPI_SIM_LOCK_PC)
+               return TAPI_API_INVALID_INPUT;
 
-       /* Finish and extract the response data */
-       telephony_sim_call_req_apdu_finish(handle->sim_proxy, &sim_result, &apdu, res, &error);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       /* Process Response data */
-       CHECK_DEINIT(error, rsp_cb_data, sim_result);
-       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
-               err("Failed to Request SIM apdu: [%d]", sim_result);
+       param = g_variant_new("(i)", type);
 
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
-               return;
-       }
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "GetFacility", param, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT,
+                       handle->ca, on_response_get_sim_facility, evt_cb_data);
 
-       /* Decode Base64 - APDU Response */
-       decode_apdu_resp = g_base64_decode((const gchar *)apdu, &decode_apdu_resp_len);
-       if (decode_apdu_resp_len > TEL_SIM_APDU_RESP_LEN_MAX) {
-               err("Invalid APDU response length: [%d]", decode_apdu_resp_len);
+       return TAPI_API_SUCCESS;
+}
 
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
+EXPORT_API int tel_get_sim_lock_info(TapiHandle *handle, TelSimLockType_t type,
+               tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
 
-               /* Free resources */
-               g_free(decode_apdu_resp);
-               g_free(apdu);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-               return;
-       }
+       TAPI_SIM_CHECK_TAPI_STATE();
 
-       if (decode_apdu_resp_len)
-               memcpy(apdu_resp.apdu_resp, decode_apdu_resp, decode_apdu_resp_len);
-       apdu_resp.apdu_resp_len = decode_apdu_resp_len;
+       msg("lock type[%d]", type);
+       if(type < TAPI_SIM_LOCK_PS || type >TAPI_SIM_LOCK_PC)
+               return TAPI_API_INVALID_INPUT;
 
-       dbg("APDU response - Length: [%d] Data: [%s]",
-                       apdu_resp.apdu_resp_len, decode_apdu_resp);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       /* Invoke response callback */
-       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &apdu_resp);
+       param = g_variant_new("(i)", type);
 
-       /* Free resources */
-       g_free(decode_apdu_resp);
-       g_free(apdu);
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "GetLockInfo", param, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT,
+                       handle->ca, on_response_get_sim_lock_info, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_sim_req_apdu(TelHandle *handle, TelSimApdu* apdu_data,
-                                                                         TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_set_sim_power_state(TapiHandle *handle, TelSimPowerState_t state,
+               tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = NULL;
-       gchar *encoded_req_apdu;
-       TelSimCardStatusInfo status_info = {0,};
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && apdu_data
-                       && apdu_data->apdu_len && callback, TEL_RETURN_INVALID_PARAMETER);
-       __get_sim_status_info(handle->sim_proxy, &status_info);
-       CHECK_IF_SIM_INITIALIZED(status_info.status);
+       dbg("Func Enterance. cp_name[%s], state[%d]", handle->cp_name, state);
+       //TAPI_SIM_CHECK_TAPI_STATE(); -- TO be decided later
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       if (state >= TAPI_SIM_POWER_UNSPECIFIED){
+               return TAPI_API_INVALID_INPUT;
+       }
 
-       /* Encode Base64 */
-       encoded_req_apdu = g_base64_encode((const guchar *)apdu_data->apdu,
-                                                       apdu_data->apdu_len);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       /* DBUS Request - REQ (APDU) */
-       telephony_sim_call_req_apdu(handle->sim_proxy,
-                       encoded_req_apdu, NULL, on_response_sim_req_apdu, rsp_cb_data);
+       param = g_variant_new("(i)", state);
 
-       /* Free resources */
-       g_free(encoded_req_apdu);
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "SetPowerstate", param, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT,
+                       handle->ca, on_response_set_sim_power_state, evt_cb_data);
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_sim_req_atr(GObject *source_object,
-                                               GAsyncResult *res, gpointer user_data)
-{
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-
-       TelSimAtr atr_resp;
-       guchar *decode_atr_resp;
-       gsize decode_atr_resp_len;
-       gchar *atr;
 
-       GError *error = NULL;
-       gint sim_result = TEL_SIM_RESULT_FAILURE;
+EXPORT_API int tel_req_sim_apdu(TapiHandle *handle, TelSimApdu_t* apdu_data,
+               tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariantBuilder builder;
+       GVariant *param = NULL;
+       GVariant *inner_gv = NULL;
+       int i = 0;
 
-       memset(&atr_resp, 0, sizeof(TelSimAtr));
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(apdu_data, TAPI_API_INVALID_PTR);
 
-       /* Finish and extract the response data */
-       telephony_sim_call_req_atr_finish(handle->sim_proxy, &sim_result, &atr, res, &error);
+       TAPI_SIM_CHECK_TAPI_STATE();
 
-       /* Process Response data */
-       CHECK_DEINIT(error, rsp_cb_data, sim_result);
-       if (TEL_SIM_RESULT_SUCCESS != sim_result) {
-               err("Failed to request SIM atr: [%d]", sim_result);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
-               return;
+       g_variant_builder_init(&builder, G_VARIANT_TYPE ("ay"));
+       for (i = 0; i < apdu_data->apdu_len; i++) {
+               g_variant_builder_add(&builder, "y", apdu_data->apdu[i]);
        }
+       inner_gv = g_variant_builder_end(&builder);
+       param = g_variant_new("(v)", inner_gv);
 
-       /* Decode Base64 - ATR Response */
-       decode_atr_resp = g_base64_decode((const gchar *)atr, &decode_atr_resp_len);
-       if (decode_atr_resp_len > TEL_SIM_ATR_LEN_MAX) {
-               err("Invalid ATR response length: [%d]", decode_atr_resp_len);
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "TransferAPDU", param, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT,
+                       handle->ca, on_response_req_sim_apdu, evt_cb_data);
 
-               /* Invoke response callback */
-               RESP_CALLBACK_CALL(rsp_cb_data, sim_result, NULL);
+       return TAPI_API_SUCCESS;
+}
 
-               /* Free resources */
-               g_free(decode_atr_resp);
-               g_free(atr);
+EXPORT_API int tel_req_sim_atr(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-               return;
-       }
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       if (decode_atr_resp_len)
-               memcpy(atr_resp.atr, decode_atr_resp, decode_atr_resp_len);
-       atr_resp.atr_len = decode_atr_resp_len;
+       TAPI_SIM_CHECK_TAPI_STATE();
 
-       dbg("ATR response - Length: [%d] Data: [%s]", atr_resp.atr_len, decode_atr_resp);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       /* Invoke response callback */
-       RESP_CALLBACK_CALL(rsp_cb_data, sim_result, &atr_resp);
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "GetATR", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_req_sim_atr, evt_cb_data);
 
-       /* Free resources */
-       g_free(decode_atr_resp);
-       g_free(atr);
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_sim_req_atr(TelHandle *handle, TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_get_sim_application_list(TapiHandle *handle, unsigned char *app_list)
 {
-       TapiRespCbData *rsp_cb_data = NULL;
-       TelSimCardStatusInfo status_info = {0,};
+       GError *gerr = NULL;
+       GVariant *sync_gv = NULL;
 
-       dbg("Entry");
+       dbg("Func Entrance");
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback, TEL_RETURN_INVALID_PARAMETER);
-       __get_sim_status_info(handle->sim_proxy, &status_info);
-       CHECK_IF_SIM_INITIALIZED(status_info.status);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(app_list, TAPI_API_INVALID_PTR);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       sync_gv = g_dbus_connection_call_sync(handle->dbus_connection, DBUS_TELEPHONY_SERVICE,
+                       handle->path, DBUS_TELEPHONY_SIM_INTERFACE, "GetAppList", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca, &gerr);
 
-       /* DBUS Request - REQ (ATR) */
-       telephony_sim_call_req_atr(handle->sim_proxy,
-                       NULL, on_response_sim_req_atr, rsp_cb_data);
+       if (sync_gv) {
+               g_variant_get(sync_gv, "(y)", app_list);
+               g_variant_unref(sync_gv);
+       } else {
+               TAPI_SIM_CHECK_ERR_MSG(gerr);
+       }
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
+
index 5d0780549156958d949051163459699dda0ca899..f21706459f0a8dad6af88b59b9d81a7d8f41ff6e 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <stdlib.h>
 #include <string.h>
 
-#include "tapi_log.h"
-#include "tapi.h"
-#include "tapi_private.h"
-
-#include "tapi_sms.h"
-
-static gboolean __tapi_check_sim_sms_data(const TelSmsSimDataInfo *data)
-{
-       if (data == NULL)
-               return FALSE;
-
-       switch (data->status) {
-       case TEL_SMS_STATUS_MT_READ:
-       case TEL_SMS_STATUS_MT_UNREAD:
-       case TEL_SMS_STATUS_MO_SENT:
-       case TEL_SMS_STATUS_MO_NOT_SENT:
-       case TEL_SMS_STATUS_MO_DELIVERED:
-       case TEL_SMS_STATUS_MO_DELIVERY_NOT_CONFIRMED:
-       case TEL_SMS_STATUS_REPLACED:
-               break;
-       default:
-               return FALSE;
-       }
+#include "tapi_common.h"
+#include "TapiUtility.h"
+#include "TelSms.h"
 
-       if (data->data.tpdu_length > TEL_SMS_SMDATA_SIZE_MAX)
-               return FALSE;
-
-       return TRUE;
-}
+#include "common.h"
+#include "tapi_log.h"
+#include "ITapiNetText.h"
 
-void on_sms_property_change_handler(TelephonySms *sms,
-       GVariant *changed_properties, const gchar *invalidated_properties,
-       gpointer user_data)
+static void on_response_default(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
 
-       TapiEvtCbData *evt_cb_data = NULL;
-       TelHandle *handle = user_data;
-       GVariantIter *iter;
-       const gchar *key;
-       GVariant *value;
-
-       if (handle == NULL)
-               return;
-
-       if (g_variant_n_children(changed_properties) == 0)
-               return;
-
-       dbg("Properties Changed:");
-
-       g_variant_get(changed_properties, "a{sv}", &iter);
-       while (g_variant_iter_loop(iter, "{sv}", &key, &value)) {
-               char *evt_id;
+       GVariant *dbus_result = NULL;
+       int data = 0;
 
-               dbg("%s", key);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-               evt_id = g_strdup_printf("%s:%s", TELEPHONY_SMS_INTERFACE, key);
+       dbg("on_response_default type_format(%s)", g_variant_get_type_string(dbus_result));
 
-               evt_cb_data = g_hash_table_lookup(handle->evt_table, evt_id);
+       g_variant_get (dbus_result, "(i)", &result);
 
-               if (evt_cb_data) {
-                       if (!g_strcmp0("SimMemoryStatus", key)
-                               || !g_strcmp0("InitStatus", key)) {
-                               gboolean status = g_variant_get_boolean(value);
-                               dbg("status[%d]", status);
-                               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &status);
-                       }
+       if (evt_cb_data) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
                }
-               g_free(evt_id);
+
+               g_free(evt_cb_data);
        }
-       g_variant_iter_free(iter);
+       g_variant_unref(dbus_result);
 }
 
-void on_sms_signal_emit_handler(TelephonySms *sms, gchar *sender_name,
-               gchar *signal_name, GVariant *parameters, gpointer user_data)
+static void on_response_read_msg(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiEvtCbData *evt_cb_data = NULL;
-       TelHandle *handle = user_data;
-       char *evt_id = NULL;
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+
+       TelSmsData_t    readMsg = {0,};
+       GVariant *dbus_result = NULL;
+
+       GVariant *sca = 0, *tpdu = 0;
+       int i = 0;
+       GVariantIter *iter = 0;
+       GVariant *inner_gv = 0;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
+
+       dbg("on_response_read_msg type_format(%s)", g_variant_get_type_string(dbus_result));
+
+//     readMsg.SimIndex = 0xFFFFFFFF;
+       g_variant_get (dbus_result, "(iiii@vi@v)", &result,
+                       &readMsg.SimIndex,
+                       &readMsg.MsgStatus,
+                       &readMsg.SmsData.format,
+                       &sca,
+                       &readMsg.SmsData.MsgLength,
+                       &tpdu);
+
+       inner_gv = g_variant_get_variant( sca );
+       g_variant_get(inner_gv, "ay", &iter);
+       while( g_variant_iter_loop(iter, "y", &readMsg.SmsData.Sca[i] ) ) {
+               i++;
+               if( i >= TAPI_SIM_SMSP_ADDRESS_LEN )
+                       break;
+       }
 
-       dbg("Entry");
+       g_variant_iter_free(iter);
 
-       if (handle == NULL)
-               return;
+       inner_gv = g_variant_get_variant( tpdu );
+       g_variant_get(inner_gv, "ay", &iter);
+       i= 0;
+       while( g_variant_iter_loop(iter, "y", &readMsg.SmsData.szData[i]) ) {
+               i++;
+               if( i >= TAPI_NETTEXT_SMDATA_SIZE_MAX + 1 )
+                       break;
+       }
+       g_variant_iter_free(iter);
+       g_variant_unref(sca);
+       g_variant_unref(tpdu);
+       g_variant_unref(inner_gv);
 
-       evt_id = g_strdup_printf("%s:%s", TELEPHONY_SMS_INTERFACE,
-                                       signal_name);
+       if (evt_cb_data) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, result, &readMsg, evt_cb_data->user_data);
+               }
 
-       evt_cb_data = g_hash_table_lookup(handle->evt_table, evt_id);
-       if (evt_cb_data == NULL) {
-               g_free(evt_id);
-               return;
+               g_free(evt_cb_data);
        }
+       g_variant_unref(dbus_result);
+}
 
-       if (!g_strcmp0(signal_name, "IncomingMsg")) {
-               TelSmsDatapackageInfo incoming_msg;
-               GVariant *sca;
-               char *sca_number = NULL;
-               char *tpdu = NULL;
-               guchar *decoded_tpdu = NULL;
+static void on_response_write_msg(GObject *source_object, GAsyncResult *res, gpointer user_data)
+{
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       int sms_index = 0;
 
-               GVariantIter *iter = NULL;
-               GVariant *key_value;
-               const gchar *key;
+       GVariant *dbus_result = NULL;
 
-               memset(&incoming_msg, 0, sizeof(TelSmsDatapackageInfo));
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-               g_variant_get(parameters, "(@a{sv}s)", &sca, &tpdu);
-               g_variant_get(sca, "a{sv}", &iter);
-               while (g_variant_iter_loop(iter, "{sv}", &key, &key_value)) {
-                       if (g_strcmp0(key, "ton") == 0) {
-                               incoming_msg.sca.ton = g_variant_get_byte(key_value);
-                       }
-                       else if (g_strcmp0(key, "npi") == 0) {
-                               incoming_msg.sca.npi = g_variant_get_byte(key_value);
-                       }
-                       else if (g_strcmp0(key, "number") == 0) {
-                               g_strlcpy(incoming_msg.sca.number,
-                                       g_variant_get_string(key_value, NULL),
-                                       TEL_SMS_SCA_LEN_MAX + 1);
-                       }
-               }
-               g_variant_iter_free(iter);
+       dbg("on_response_write_msg type_format(%s)", g_variant_get_type_string(dbus_result));
 
-               dbg("TON: [%d] NPI: [%d] SCA: [%s]",
-                       incoming_msg.sca.ton, incoming_msg.sca.npi,
-                       incoming_msg.sca.number);
+       g_variant_get (dbus_result, "(ii)", &result, &sms_index);
 
-               decoded_tpdu = g_base64_decode(tpdu, &incoming_msg.tpdu_length);
-               if (!decoded_tpdu) {
-                       err("base64 decoding of tpdu failed");
-                       goto out;
+       if (evt_cb_data) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, result, &sms_index, evt_cb_data->user_data);
                }
-               else if (incoming_msg.tpdu_length > TEL_SMS_SMDATA_SIZE_MAX) {
-                       err("invalid tpdu length received: [%d]", incoming_msg.tpdu_length);
-                       g_free(decoded_tpdu);
-                       goto out;
-               }
-
-               memcpy((gchar*)incoming_msg.tpdu, (gchar*)decoded_tpdu,
-                               TEL_SMS_SMDATA_SIZE_MAX);
-
-               dbg("Signal [%s] TPDU length: [%d]",
-                       signal_name, incoming_msg.tpdu_length);
-
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &incoming_msg);
 
-               g_free(decoded_tpdu);
-out:
-               g_variant_unref(sca);
-               g_free(sca_number);
-               g_free(tpdu);
+               g_free(evt_cb_data);
        }
-       else if (!g_strcmp0(signal_name, "IncomingCbMsg")) {
-               TelSmsCbMsgInfo cb_msg;
-               char *pdu = NULL;
-               memset(&cb_msg, 0, sizeof(TelSmsCbMsgInfo));
+       g_variant_unref(dbus_result);
+}
 
-               g_variant_get(parameters, "(is)", &cb_msg.cb_type, &pdu);
+static void on_response_delete_msg(GObject *source_object, GAsyncResult *res, gpointer user_data)
+{
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       int del_index = -1;
 
-               cb_msg.cb_data = g_base64_decode(pdu, &cb_msg.length);
-               if (cb_msg.cb_data) {
-                       dbg("signal[%s] cb_type[%d] cb_data[%s] cb_data_len[%d]",
-                               signal_name, cb_msg.cb_type, pdu, cb_msg.length);
-               } else {
-                       dbg("signal[%s] cb_type[%d] cb_data_len[%d]",
-                               signal_name, cb_msg.cb_type, cb_msg.length);
-               }
+       GVariant *dbus_result = NULL;
 
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &cb_msg);
-               g_free(pdu);
-               g_free(cb_msg.cb_data);
-       }
-       else if (!g_strcmp0(signal_name, "IncomingEtwsMsg")) {
-               TelSmsEtwsMsgInfo etws_msg;
-               char *pdu = NULL;
-               memset(&etws_msg, 0, sizeof(TelSmsEtwsMsgInfo));
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-               g_variant_get(parameters, "(is)", &etws_msg.etws_type, &pdu);
-               etws_msg.etws_data = g_base64_decode(pdu, &etws_msg.length);
+       dbg("on_response_delete_msg type_format(%s)", g_variant_get_type_string(dbus_result));
 
-               if (etws_msg.etws_data) {
-                       dbg("signal[%s] etws_type[%d]  etws_data[%s] etws_data_len[%d]",
-                               signal_name, etws_msg.etws_type, pdu, etws_msg.length);
-               } else {
-                       dbg("signal[%s] etws_type[%d]  etws_data_len[%d]",
-                               signal_name, etws_msg.etws_type, etws_msg.length);
-               }
-
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &etws_msg);
+       g_variant_get (dbus_result, "(ii)", &result, &del_index);
 
-               g_free(pdu);
-               g_free(etws_msg.etws_data);
+       if (evt_cb_data) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, result, &del_index, evt_cb_data->user_data);
+               }
 
+               g_free(evt_cb_data);
        }
-       else {
-               err("Unsupported signal [%s]", signal_name);
-       }
-
-       g_free(evt_id);
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_sms_send(GObject *source_object,
-                       GAsyncResult *res, gpointer user_data)
+static void on_response_get_msg_count(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
        GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       TelSmsStoredMsgCountInfo_t storedMsgCnt = {0,};
+
+       GVariant *dbus_result = NULL;
+       int i = 0;
+       int idx = 0;
+       GVariantIter *iter = NULL;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       dbg("Entry");
+       dbg("on_response_get_msg_count type_format(%s)", g_variant_get_type_string(dbus_result));
 
-       telephony_sms_call_send_finish(handle->sms_proxy, (int *)&result,
-                       res, &error);
+       g_variant_get (dbus_result, "(iiiai)", &result,
+                                                               &storedMsgCnt.TotalCount,
+                                                               &storedMsgCnt.UsedCount,
+                                                               &iter);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       i = 0;
+       while (g_variant_iter_loop(iter, "i", &idx)) {
+               storedMsgCnt.IndexList[i] = idx;
+               i++;
+               if (i >= TAPI_NETTEXT_SMS_MSG_NUM_MAX)
+                       break;
+       }
+
+       g_variant_iter_free(iter);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       if (evt_cb_data) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, result, &storedMsgCnt, evt_cb_data->user_data);
+               }
+
+               g_free(evt_cb_data);
+       }
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_sms_send(TelHandle *handle,
-                       const TelSmsSendInfo *info,
-                       TapiResponseCb callback, void *user_data)
+static void on_response_get_sca(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data;
-       GVariantBuilder sca_builder;
-       GVariant *sca;
-       char *encoded_tpdu;
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       TelSmsAddressInfo_t scaInfo = {0,};
 
-       dbg("Entry");
+       GVariant *dbus_result = NULL;
 
-       g_return_val_if_fail(handle != NULL && info != NULL &&
-                       info->send_data.tpdu_length <= TEL_SMS_SMDATA_SIZE_MAX &&
-                       callback != NULL,
-                       TEL_RETURN_INVALID_PARAMETER);
+       GVariant *num = 0;
+       int i = 0;
+       GVariantIter *iter = 0;
+       GVariant *inner_gv = 0;
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
 
-       g_variant_builder_init(&sca_builder, G_VARIANT_TYPE("a{sv}"));
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       g_variant_builder_add(&sca_builder, "{sv}",
-               "ton", g_variant_new_byte(info->send_data.sca.ton));
-       g_variant_builder_add(&sca_builder, "{sv}",
-               "npi", g_variant_new_byte(info->send_data.sca.npi));
-       g_variant_builder_add(&sca_builder, "{sv}",
-               "number", g_variant_new_string(info->send_data.sca.number));
+       dbg("on_response_get_sca type_format(%s)", g_variant_get_type_string(dbus_result));
 
-       sca = g_variant_builder_end(&sca_builder);
+       g_variant_get (dbus_result, "(iiii@v)", &result,
+                                       &scaInfo.Ton,
+                                       &scaInfo.Npi,
+                                       &scaInfo.DialNumLen,
+                                       &num);
 
-       encoded_tpdu = g_base64_encode(info->send_data.tpdu, info->send_data.tpdu_length);
+       inner_gv = g_variant_get_variant( num );
+       g_variant_get(inner_gv, "ay", &iter);
+       while( g_variant_iter_loop(iter, "y", &scaInfo.szDiallingNum[i] ) ) {
+               i++;
+               if( i >= TAPI_SIM_SMSP_ADDRESS_LEN + 1 )
+                       break;
+       }
+       g_variant_iter_free(iter);
+       g_variant_unref(num);
+       g_variant_unref(inner_gv);
 
-       telephony_sms_call_send(handle->sms_proxy,
-               info->more_msgs,
-               sca, encoded_tpdu, NULL,
-               on_response_sms_send, rsp_cb_data);
+       if (evt_cb_data) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, result, &scaInfo, evt_cb_data->user_data);
+               }
 
-       g_free(encoded_tpdu);
-       return TEL_RETURN_SUCCESS;
+               g_free(evt_cb_data);
+       }
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_sms_read_sms_in_sim(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+static void on_response_get_cb_config(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-
-       TelSmsSimDataInfo data;
-       TelSmsMsgStatus status;
-       GVariant *sca = NULL;
-       unsigned int pdu_len;
-       char *encoded_pdu = NULL;
-       guchar *pdu = NULL;
-
-       GVariantIter *iter = NULL;
-       GVariant *key_value;
-       const gchar *key;
-
-       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
        GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       int i;
+       TelSmsCbConfig_t cbConfig = {0,};
+
+       GVariant *dbus_result = NULL;
+       GVariant *value = NULL;
+       GVariantIter *iter = NULL;
+       GVariantIter *iter_row = NULL;
+       const gchar *key = NULL;
 
-       dbg("Entry");
-
-       telephony_sms_call_read_in_sim_finish(handle->sms_proxy,
-               (int *)&result, (int *)&status, &sca, &encoded_pdu, res, &error);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       dbg("on_response_get_cb_config type_format(%s)", g_variant_get_type_string(dbus_result));
 
-       if (result != TEL_SMS_RESULT_SUCCESS) {
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-               goto out;
-       }
+       g_variant_get (dbus_result, "(iiiiiaa{sv})", &result,
+                                       &cbConfig.Net3gppType,
+                                       &cbConfig.CBEnabled,
+                                       &cbConfig.MsgIdMaxCount,
+                                       &cbConfig.MsgIdRangeCount,
+                                       &iter);
 
-       pdu = g_base64_decode(encoded_pdu, &pdu_len);
-       if (pdu_len > TEL_SMS_SMDATA_SIZE_MAX) {
-               err("PDU length is wrong");
-               RESP_CALLBACK_CALL(rsp_cb_data, TEL_SMS_RESULT_FAILURE, NULL);
-               goto out;
-       }
-
-       data.status = status;
-       data.data.tpdu_length = pdu_len;
-       memcpy(data.data.tpdu, pdu, pdu_len);
-
-       g_variant_get(sca, "a{sv}", &iter);
-       while (g_variant_iter_loop(iter, "{sv}", &key, &key_value)) {
-               if (g_strcmp0(key, "ton") == 0) {
-                       data.data.sca.ton = g_variant_get_byte(key_value);
-               }
-               else if (g_strcmp0(key, "npi") == 0) {
-                       data.data.sca.npi = g_variant_get_byte(key_value);
-               }
-               else if (g_strcmp0(key, "number") == 0) {
-                       g_strlcpy(data.data.sca.number,
-                               g_variant_get_string(key_value, NULL),
-                               TEL_SMS_SCA_LEN_MAX + 1);
+       i = 0;
+       while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
+               while (g_variant_iter_loop(iter_row, "{sv}", &key, &value)) {
+                       if (!g_strcmp0(key, "FromMsgId")) {
+                               cbConfig.MsgIDs[i].Net3gpp.FromMsgId = g_variant_get_uint16(value);
+                       }
+                       if (!g_strcmp0(key, "ToMsgId")) {
+                               cbConfig.MsgIDs[i].Net3gpp.ToMsgId = g_variant_get_uint16(value);
+                       }
+                       if (!g_strcmp0(key, "CBCategory")) {
+                               cbConfig.MsgIDs[i].Net3gpp2.CBCategory = g_variant_get_uint16(value);
+                       }
+                       if (!g_strcmp0(key, "CBLanguage")) {
+                               cbConfig.MsgIDs[i].Net3gpp2.CBLanguage = g_variant_get_uint16(value);
+                       }
+                       if (!g_strcmp0(key, "Selected")) {
+                               cbConfig.MsgIDs[i].Net3gpp.Selected = g_variant_get_byte(value);
+                       }
                }
+               i++;
+               g_variant_iter_free(iter_row);
        }
        g_variant_iter_free(iter);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, &data);
+       if (evt_cb_data) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, result, &cbConfig, evt_cb_data->user_data);
+               }
 
-out:
-       g_variant_unref(sca);
-       g_free(encoded_pdu);
-       g_free(pdu);
+               g_free(evt_cb_data);
+       }
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_sms_read_sms_in_sim(TelHandle *handle,
-               unsigned int index, TapiResponseCb callback, void *user_data)
+static void on_response_get_sms_params(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       TelSmsParams_t paramInfo = {0,};
+
+       GVariant *dbus_result = NULL;
+
+       GVariant *alphaId = 0, *destDialNum = 0, *scaDialNum = 0;
+       int i = 0;
+       GVariantIter *iter = 0;
+       GVariant *inner_gv = 0;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
+
+       dbg("on_response_get_sms_params type_format(%s)", g_variant_get_type_string(dbus_result));
+
+       g_variant_get (dbus_result, "(iiii@viiii@viii@viii)", &result,
+                                                               &paramInfo.RecordIndex,
+                                                               &paramInfo.RecordLen,
+                                                               &paramInfo.AlphaIdLen,
+                                                               &alphaId,
+                                                               &paramInfo.ParamIndicator,
+                                                               &paramInfo.TpDestAddr.DialNumLen,
+                                                               &paramInfo.TpDestAddr.Ton,
+                                                               &paramInfo.TpDestAddr.Npi,
+                                                               &destDialNum,
+                                                               &paramInfo.TpSvcCntrAddr.DialNumLen,
+                                                               &paramInfo.TpSvcCntrAddr.Ton,
+                                                               &paramInfo.TpSvcCntrAddr.Npi,
+                                                               &scaDialNum,
+                                                               &paramInfo.TpProtocolId,
+                                                               &paramInfo.TpDataCodingScheme,
+                                                               &paramInfo.TpValidityPeriod);
+
+       inner_gv = g_variant_get_variant( alphaId );
+       g_variant_get(inner_gv, "ay", &iter);
+       while( g_variant_iter_loop(iter, "y", &paramInfo.szAlphaId[i] ) ) {
+               i++;
+               if( i >= TAPI_SIM_SMSP_ALPHA_ID_LEN_MAX + 1 )
+                       break;
+       }
 
-       dbg("Entry");
+       g_variant_iter_free(iter);
 
-       g_return_val_if_fail(handle != NULL &&
-                       index < TEL_SMS_GSM_MSG_NUM_MAX &&
-                       callback != NULL,
-                       TEL_RETURN_INVALID_PARAMETER);
+       inner_gv = g_variant_get_variant( destDialNum );
+       g_variant_get(inner_gv, "ay", &iter);
+       i = 0;
+       while( g_variant_iter_loop(iter, "y", &paramInfo.TpDestAddr.szDiallingNum[i] ) ) {
+               i++;
+               if( i >= TAPI_SIM_SMSP_ADDRESS_LEN + 1 )
+                       break;
+       }
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       g_variant_iter_free(iter);
 
-       telephony_sms_call_read_in_sim(handle->sms_proxy,
-               index, NULL,
-               on_response_sms_read_sms_in_sim, rsp_cb_data);
+       inner_gv = g_variant_get_variant( scaDialNum );
+       g_variant_get(inner_gv, "ay", &iter);
+       i = 0;
+       while( g_variant_iter_loop(iter, "y", &paramInfo.TpSvcCntrAddr.szDiallingNum[i] ) ) {
+               i++;
+               if( i >= TAPI_SIM_SMSP_ADDRESS_LEN + 1 )
+                       break;
+       }
 
-       return TEL_RETURN_SUCCESS;
+       g_variant_iter_free(iter);
+       g_variant_unref(alphaId);
+       g_variant_unref(destDialNum);
+       g_variant_unref(scaDialNum);
+       g_variant_unref(inner_gv);
+
+       if (evt_cb_data) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, result, &paramInfo, evt_cb_data->user_data);
+               }
+
+               g_free(evt_cb_data);
+       }
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_sms_write_sms_in_sim(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+static void on_response_get_sms_param_cnt(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
-       unsigned int index;
        GError *error = NULL;
+       GDBusConnection *conn = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       int recordCount = 0;
+
+       GVariant *dbus_result = NULL;
 
-       dbg("Entry");
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       telephony_sms_call_write_in_sim_finish(handle->sms_proxy,
-                       (int *)&result, &index, res, &error);
+       dbg("on_response_get_sms_param_cnt type_format(%s)", g_variant_get_type_string(dbus_result));
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       g_variant_get (dbus_result, "(ii)", &result,
+                       &recordCount);
 
-       if (result != TEL_SMS_RESULT_SUCCESS) {
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-       } else {
-               RESP_CALLBACK_CALL(rsp_cb_data, result, &index);
+       if (evt_cb_data) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, result, &recordCount, evt_cb_data->user_data);
+               }
+
+               g_free(evt_cb_data);
        }
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_sms_write_sms_in_sim(TelHandle *handle,
-       const TelSmsSimDataInfo *wdata,
-       TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_send_sms(struct tapi_handle *handle,
+               const TelSmsDatapackageInfo_t *pDataPackage,
+               int bMoreMsgToSend,
+               tapi_response_cb callback, void* user_data)
 {
-       TapiRespCbData *rsp_cb_data;
-       GVariantBuilder sca_builder;
-       GVariant *sca;
-       char *encoded_tpdu;
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+       GVariant *sca = 0, *packet_sca = 0;
+       GVariant *tpdu = 0, *packet_tpdu = 0;
+       GVariantBuilder b;
+       int i;
 
-       dbg("Entry");
+       dbg("Func Entrance ");
 
-       g_return_val_if_fail(handle != NULL &&
-                       __tapi_check_sim_sms_data(wdata) && callback != NULL,
-                       TEL_RETURN_INVALID_PARAMETER);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(pDataPackage, TAPI_API_INVALID_PTR);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       if (pDataPackage->Sca[0] > TAPI_SIM_SMSP_ADDRESS_LEN) {
+               err("Invalid SCA length:[%d]", pDataPackage->Sca[0]);
+               return TAPI_API_INVALID_INPUT;
+       }
 
-       g_variant_builder_init(&sca_builder, G_VARIANT_TYPE("a{sv}"));
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       g_variant_builder_add(&sca_builder, "{sv}",
-               "ton", g_variant_new_byte(wdata->data.sca.ton));
-       g_variant_builder_add(&sca_builder, "{sv}",
-               "npi", g_variant_new_byte(wdata->data.sca.npi));
-       g_variant_builder_add(&sca_builder, "{sv}",
-               "number", g_variant_new_string(wdata->data.sca.number));
+       g_variant_builder_init(&b, G_VARIANT_TYPE("ay") );
+       for( i=0; i<TAPI_SIM_SMSP_ADDRESS_LEN; i++) {
+               g_variant_builder_add(&b, "y", pDataPackage->Sca[i] );
+       }
+       sca = g_variant_builder_end(&b);
+       packet_sca = g_variant_new("v", sca);
 
-       sca = g_variant_builder_end(&sca_builder);
+       g_variant_builder_init(&b, G_VARIANT_TYPE("ay") );
+       for( i=0; i<TAPI_NETTEXT_SMDATA_SIZE_MAX + 1; i++) {
+               g_variant_builder_add(&b, "y", pDataPackage->szData[i] );
+       }
+       tpdu = g_variant_builder_end(&b);
+       packet_tpdu = g_variant_new("v", tpdu);
 
-       encoded_tpdu = g_base64_encode(wdata->data.tpdu, wdata->data.tpdu_length);
+       param = g_variant_new("(i@vi@vi)", pDataPackage->format, packet_sca,
+                                                       pDataPackage->MsgLength,
+                                                       packet_tpdu,
+                                                       bMoreMsgToSend);
 
-       telephony_sms_call_write_in_sim(handle->sms_proxy,
-               wdata->status, sca, encoded_tpdu,
-               NULL,
-               on_response_sms_write_sms_in_sim, rsp_cb_data);
+       g_dbus_connection_call(handle->dbus_connection,
+               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
+               "SendMsg", param, NULL,
+               G_DBUS_CALL_FLAGS_NONE, 120000, handle->ca,
+               on_response_default, evt_cb_data);
 
-       g_free(encoded_tpdu);
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_sms_delete_sms_in_sim(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_read_sms_in_sim(struct tapi_handle *handle, int read_index, tapi_response_cb callback, void* user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
-       GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
 
-       dbg("Entry");
+       dbg("Func Entrance ");
 
-       telephony_sms_call_delete_in_sim_finish(handle->sms_proxy,
-                       (int *)&result, res, &error);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_PTR);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       if( (read_index < 0) || (read_index > TAPI_NETTEXT_MAX_INDEX) ) {
+               err("Invalid Input -Read SMS %d",read_index);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-}
-
-EXPORT_API TelReturn tapi_sms_delete_sms_in_sim(TelHandle *handle,
-       unsigned int index,
-       TapiResponseCb callback, void *user_data)
-{
-       TapiRespCbData *rsp_cb_data;
-
-       dbg("Entry");
+               return TAPI_API_INVALID_INPUT;
+       }
 
-       g_return_val_if_fail(handle != NULL &&
-                       callback != NULL,
-                       TEL_RETURN_INVALID_PARAMETER);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       param = g_variant_new("(i)", read_index);
 
-       telephony_sms_call_delete_in_sim(handle->sms_proxy, index, NULL,
-                       on_response_sms_delete_sms_in_sim, rsp_cb_data);
+       g_dbus_connection_call(handle->dbus_connection,
+               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
+               "ReadMsg", param, NULL,
+               G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+               on_response_read_msg, evt_cb_data);
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_sms_get_count(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_write_sms_in_sim(struct tapi_handle *handle, const TelSmsData_t *pWriteData, tapi_response_cb callback, void* user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
-       TelSmsStoredMsgCountInfo info;
-       GError *error = NULL;
-
-       GVariant *var;
-       GVariantIter *iter;
-       unsigned int index;
-       gint i = 0;
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+       GVariant *sca = 0, *packet_sca = 0;
+       GVariant *tpdu = 0, *packet_tpdu = 0;
+       GVariantBuilder b;
+       int i;
 
-       dbg("Entry");
+       dbg("Func Entrance ");
 
-       memset(&info, 0, sizeof(TelSmsStoredMsgCountInfo));
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(pWriteData, TAPI_API_INVALID_PTR);
 
-       telephony_sms_call_get_count_finish(handle->sms_proxy,
-                       (int *)&result, &info.total_count, &info.used_count,
-                       &var, res, &error);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
-
-       if (result != TEL_SMS_RESULT_SUCCESS) {
-               g_variant_unref(var);
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-               return;
-       }
-
-       if (info.used_count == 0) {
-               g_variant_unref(var);
-               RESP_CALLBACK_CALL(rsp_cb_data, result, &info);
-               return;
+        g_variant_builder_init(&b, G_VARIANT_TYPE("ay") );
+       for( i=0; i<TAPI_SIM_SMSP_ADDRESS_LEN; i++) {
+               g_variant_builder_add(&b, "y", pWriteData->SmsData.Sca[i] );
        }
+       sca = g_variant_builder_end(&b);
+       packet_sca = g_variant_new("v", sca);
 
-       if (info.used_count > TEL_SMS_GSM_MSG_NUM_MAX) {
-               err("Invalid result!");
-               g_variant_unref(var);
-               result = TEL_SMS_RESULT_FAILURE;
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-               return;
+        g_variant_builder_init(&b, G_VARIANT_TYPE("ay") );
+       for( i=0; i<TAPI_NETTEXT_SMDATA_SIZE_MAX + 1; i++) {
+               g_variant_builder_add(&b, "y", pWriteData->SmsData.szData[i] );
        }
+       tpdu = g_variant_builder_end(&b);
+       packet_tpdu = g_variant_new("v", tpdu);
 
-       g_variant_get(var, "au", &iter);
-
-       dbg("Fetching index ...");
-       while (g_variant_iter_next(iter, "u", &index)) {
-               dbg("index - %d", index);
-               info.index_list[i] = index;
-               i++;
-       }
+       param = g_variant_new("(ii@vi@v)", pWriteData->SmsData.format,pWriteData->MsgStatus,
+                                                       packet_sca,
+                                                       pWriteData->SmsData.MsgLength,
+                                                       packet_tpdu);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, &info);
+       g_dbus_connection_call(handle->dbus_connection,
+               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
+               "SaveMsg", param, NULL,
+               G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+               on_response_write_msg, evt_cb_data);
 
-       g_variant_iter_free(iter);
-       g_variant_unref(var);
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_sms_get_count(TelHandle *handle,
-       TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_delete_sms_in_sim(struct tapi_handle *handle, int del_index, tapi_response_cb callback, void* user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
 
-       dbg("Entry");
+       dbg("Func Entrance ");
 
-       g_return_val_if_fail(handle != NULL && callback != NULL,
-                       TEL_RETURN_INVALID_PARAMETER);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_PTR);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       if ((del_index < -1) || (del_index > TAPI_NETTEXT_MAX_INDEX)) {
+               err("Invalid Index Input");
+               return TAPI_API_INVALID_INPUT;
+       }
 
-       telephony_sms_call_get_count(handle->sms_proxy, NULL,
-                       on_response_sms_get_count, rsp_cb_data);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       return TEL_RETURN_SUCCESS;
+       param = g_variant_new("(i)", del_index);
+
+       g_dbus_connection_call(handle->dbus_connection,
+               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
+               "DeleteMsg", param, NULL,
+               G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+               on_response_delete_msg, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_sms_set_cb_config(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_get_sms_count(struct tapi_handle *handle, tapi_response_cb callback, void* user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
-       GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = NULL;
+
+       dbg("Func Entrance ");
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_PTR);
 
-       telephony_sms_call_set_cb_config_finish(handle->sms_proxy,
-                       (int *)&result, res, &error);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       g_dbus_connection_call(handle->dbus_connection,
+               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
+               "GetMsgCount", NULL, NULL,
+               G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+               on_response_get_msg_count, evt_cb_data);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_sms_set_cb_config(TelHandle *handle,
-       const TelSmsCbConfigInfo *cb_conf,
-       TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_get_sms_sca(struct tapi_handle *handle, int sca_index, tapi_response_cb callback, void* user_data)
 {
-       TapiRespCbData *rsp_cb_data;
-       GVariant *mids;
-       GVariantBuilder builder;
-       unsigned int i;
-
-       dbg("Entry");
-
-       g_return_val_if_fail(handle != NULL && callback != NULL &&
-                       cb_conf != NULL &&
-                       cb_conf->msg_id_range_cnt < TEL_SMS_GSM_CBMI_LIST_SIZE_MAX,
-                       TEL_RETURN_INVALID_PARAMETER);
-
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
-
-       g_variant_builder_init(&builder, G_VARIANT_TYPE("aa{sv}"));
-       for (i = 0; i < cb_conf->msg_id_range_cnt; i++) {
-               g_variant_builder_open(&builder, G_VARIANT_TYPE("a{sv}"));
-
-               g_variant_builder_add(&builder, "{sv}",
-                       "from_msg_id",
-                       g_variant_new_uint16(cb_conf->msg_ids[i].from_msg_id));
-               g_variant_builder_add(&builder, "{sv}",
-                       "to_msg_id",
-                       g_variant_new_uint16(cb_conf->msg_ids[i].to_msg_id));
-               g_variant_builder_add(&builder, "{sv}",
-                       "selected",
-                       g_variant_new_boolean(cb_conf->msg_ids[i].selected));
-
-               g_variant_builder_close(&builder);
-       }
-       mids = g_variant_builder_end(&builder);
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
 
-       telephony_sms_call_set_cb_config(handle->sms_proxy,
-                       cb_conf->cb_enabled, cb_conf->msg_id_range_cnt,
-                       mids, NULL,
-                       on_response_sms_set_cb_config, rsp_cb_data);
+       dbg("Func Entrance ");
 
-       return TEL_RETURN_SUCCESS;
-}
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_PTR);
 
-static void on_response_sms_get_cb_config(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
-{
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
-       TelSmsCbConfigInfo config;
-       GError *error = NULL;
+       if ((sca_index < 0) || (sca_index > TAPI_NETTEXT_MAX_INDEX)) {
+               err("Invalid Index Input");
+               return TAPI_API_INVALID_INPUT;
+       }
 
-       GVariant *var;
-       GVariantIter *iter = NULL, *iter_row = NULL;
-       GVariant *key_value;
-       const gchar *key;
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       guint count = 0;
+       param = g_variant_new("(i)", sca_index);
 
-       dbg("Entry");
+       g_dbus_connection_call(handle->dbus_connection,
+               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
+               "GetSca", param, NULL,
+               G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+               on_response_get_sca, evt_cb_data);
 
-       memset(&config, 0, sizeof(TelSmsCbConfigInfo));
+       return TAPI_API_SUCCESS;
+}
 
-       telephony_sms_call_get_cb_config_finish(handle->sms_proxy,
-                       (int *)&result, &config.cb_enabled,
-                       &config.msg_id_range_cnt, &var,
-                       res, &error);
+EXPORT_API int tel_set_sms_sca(struct tapi_handle *handle, const TelSmsAddressInfo_t *pSCA, int sca_index, tapi_response_cb callback, void* user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+       GVariant *sca = 0, *packet_sca = 0;
+       GVariantBuilder b;
+       int i;
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       dbg("Func Entrance ");
 
-       if (result != TEL_SMS_RESULT_SUCCESS) {
-               g_variant_unref(var);
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-               return;
-       }
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(pSCA, TAPI_API_INVALID_PTR);
 
-       if (config.msg_id_range_cnt == 0) {
-               g_variant_unref(var);
-               RESP_CALLBACK_CALL(rsp_cb_data, result, &config);
-               return;
+       if ((sca_index < 0) || (sca_index > TAPI_NETTEXT_MAX_INDEX)) {
+               err("Invalid Index Input");
+               return TAPI_API_INVALID_INPUT;
        }
 
-       if (g_variant_n_children(var) != config.msg_id_range_cnt
-               || config.msg_id_range_cnt > TEL_SMS_GSM_CBMI_LIST_SIZE_MAX) {
-               err("Invalid result!");
-               g_variant_unref(var);
-               result = TEL_SMS_RESULT_FAILURE;
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-               return;
-       }
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       g_variant_get(var, "aa{sv}", &iter);
-       while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
-               while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
-                       if (g_strcmp0(key, "from_msg_id") == 0) {
-                               config.msg_ids[count].from_msg_id =
-                                       g_variant_get_uint16(key_value);
-                       }
-                       else if (g_strcmp0(key, "to_msg_id") == 0) {
-                               config.msg_ids[count].to_msg_id =
-                                       g_variant_get_uint16(key_value);
-                       }
-                       else if (g_strcmp0(key, "number") == 0) {
-                               config.msg_ids[count].selected =
-                                       g_variant_get_boolean(key_value);
-                       }
-               }
-               count++;
-               g_variant_iter_free(iter_row);
+        g_variant_builder_init(&b, G_VARIANT_TYPE("ay") );
+       for( i=0; i<TAPI_SIM_SMSP_ADDRESS_LEN + 1; i++) {
+               g_variant_builder_add(&b, "y", pSCA->szDiallingNum[i] );
        }
-       g_variant_iter_free(iter);
+       sca = g_variant_builder_end(&b);
+       packet_sca = g_variant_new("v", sca);
+
+       param = g_variant_new("(iiii@v)", sca_index,
+                                                       pSCA->Ton,
+                                                       pSCA->Npi,
+                                                       pSCA->DialNumLen,
+                                                       packet_sca);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, &config);
+       g_dbus_connection_call(handle->dbus_connection,
+               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
+               "SetSca", param, NULL,
+               G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+               on_response_default, evt_cb_data);
 
-       g_variant_unref(var);
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_sms_get_cb_config(TelHandle *handle,
-       TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_get_sms_cb_config(struct tapi_handle *handle, tapi_response_cb callback, void* user_data)
 {
-       TapiRespCbData *rsp_cb_data;
+       struct tapi_resp_data *evt_cb_data = NULL;
 
-       dbg("Entry");
+       dbg("Func Entrance ");
 
-       g_return_val_if_fail(handle != NULL && callback != NULL,
-                       TEL_RETURN_INVALID_PARAMETER);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_PTR);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       telephony_sms_call_get_cb_config(handle->sms_proxy, NULL,
-                       on_response_sms_get_cb_config, rsp_cb_data);
+       g_dbus_connection_call(handle->dbus_connection,
+               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
+               "GetCbConfig", NULL, NULL,
+               G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+               on_response_get_cb_config, evt_cb_data);
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_sms_get_parameters(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_set_sms_cb_config(struct tapi_handle *handle, const TelSmsCbConfig_t *pCBConfig, tapi_response_cb callback, void* user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
-       TelSmsParamsInfoList param_list;
-       GError *error = NULL;
-
-       GVariant *var;
-       GVariantIter *iter = NULL, *iter_row = NULL;
-       GVariant *key_value;
-       const gchar *key;
-
-       guint count = 0;
-
-       TelSmsParamsInfo *params;
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+       GVariant *msgId = 0, *packet_msgId = 0;
+       GVariantBuilder b;
+       int i = 0;
 
-       dbg("Entry");
+       dbg("Func Entrance ");
 
-       telephony_sms_call_get_parameters_finish(handle->sms_proxy,
-               (int *)&result, &param_list.count, &var, res, &error);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(pCBConfig, TAPI_API_INVALID_PTR);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
-
-       if (result != TEL_SMS_RESULT_SUCCESS) {
-               g_variant_unref(var);
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-               return;
-       }
-
-       if (param_list.count == 0) {
-               g_variant_unref(var);
-               RESP_CALLBACK_CALL(rsp_cb_data, result, &param_list);
-               return;
-       }
+       if ((pCBConfig->Net3gppType > 2) || (pCBConfig->MsgIdRangeCount < 0)) {
+               err("Invalid Input -3gppType(%d)",pCBConfig->Net3gppType);
+               err("Invalid Input -MsgIdRangeCount(%d)",pCBConfig->MsgIdRangeCount);
 
-       if (g_variant_n_children(var) != param_list.count) {
-               err("Invalid result!");
-               g_variant_unref(var);
-               result = TEL_SMS_RESULT_FAILURE;
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-               return;
+               return TAPI_API_INVALID_INPUT;
        }
 
-       param_list.params =
-               g_malloc0(sizeof(TelSmsParamsInfo) * param_list.count);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       params = param_list.params;
+       g_variant_builder_init( &b, G_VARIANT_TYPE("aa{sv}") );
 
-       g_variant_get(var, "aa{sv}", &iter);
-       while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
-               while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
-                       if (g_strcmp0(key, "index") == 0) {
-                               params[count].index = g_variant_get_uint32(key_value);
-                       }
-                       else if (g_strcmp0(key, "sca") == 0) {
-                               GVariantIter *iter2 = NULL;
-                               GVariant *key_value2;
-                               const gchar *key2;
-
-                               g_variant_get(key_value, "a{sv}", &iter2);
-                               while (g_variant_iter_loop(iter2, "{sv}", &key2, &key_value2)) {
-                                       if (g_strcmp0(key2, "ton") == 0) {
-                                               params[count].sca.ton =
-                                                       g_variant_get_byte(key_value2);
-                                       }
-                                       else if (g_strcmp0(key2, "npi") == 0) {
-                                               params[count].sca.npi =
-                                                       g_variant_get_byte(key_value2);
-                                       }
-                                       else if (g_strcmp0(key2, "number") == 0) {
-                                               g_strlcpy(params[count].sca.number,
-                                                       g_variant_get_string(key_value2, NULL),
-                                                       TEL_SMS_SCA_LEN_MAX + 1);
-                                       }
-                               }
-                               g_variant_iter_free(iter2);
-                       }
-                       else if (g_strcmp0(key, "vp") == 0) {
-                               params[count].vp = g_variant_get_uint16(key_value);
-                       }
+       for (i = 0; i < pCBConfig->MsgIdRangeCount; i++) {
+               g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}"));
+               if( pCBConfig->Net3gppType == TAPI_NETTEXT_CB_MSG_GSM ) {
+                       g_variant_builder_add(&b, "{sv}", "FromMsgId", g_variant_new_uint16(pCBConfig->MsgIDs[i].Net3gpp.FromMsgId));
+                       g_variant_builder_add(&b, "{sv}", "ToMsgId", g_variant_new_uint16(pCBConfig->MsgIDs[i].Net3gpp.ToMsgId));
+               } else if( pCBConfig->Net3gppType == TAPI_NETTEXT_CB_MSG_UMTS) {
+                       g_variant_builder_add(&b, "{sv}", "CBCategory", g_variant_new_uint16(pCBConfig->MsgIDs[i].Net3gpp2.CBCategory));
+                       g_variant_builder_add(&b, "{sv}", "CBLanguage", g_variant_new_uint16(pCBConfig->MsgIDs[i].Net3gpp2.CBLanguage));
+               } else {
+                       dbg("Unknown 3gpp type");
+                       return FALSE;
                }
-               count++;
-               g_variant_iter_free(iter_row);
+               g_variant_builder_add(&b, "{sv}", "Selected", g_variant_new_byte(pCBConfig->MsgIDs[i].Net3gpp.Selected));
+               g_variant_builder_close(&b);
        }
-       g_variant_iter_free(iter);
-
-       RESP_CALLBACK_CALL(rsp_cb_data, result, &param_list);
-
-       g_variant_unref(var);
-       g_free(param_list.params);
-}
-
-EXPORT_API TelReturn tapi_sms_get_parameters(TelHandle *handle,
-       TapiResponseCb callback, void *user_data)
-{
-       TapiRespCbData *rsp_cb_data;
-
-       dbg("Entry");
-
-       g_return_val_if_fail(handle != NULL && callback != NULL,
-                       TEL_RETURN_INVALID_PARAMETER);
-
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
-
-       telephony_sms_call_get_parameters(handle->sms_proxy, NULL,
-                       on_response_sms_get_parameters, rsp_cb_data);
-
-       return TEL_RETURN_SUCCESS;
-}
-
-static void on_response_sms_set_parameters(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
-{
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
-       GError *error = NULL;
 
-       dbg("Entry");
+       msgId = g_variant_builder_end(&b);
+       packet_msgId = g_variant_new("v", msgId);
 
-       telephony_sms_call_set_parameters_finish(handle->sms_proxy,
-                       (int *)&result, res, &error);
+       param = g_variant_new("(iiii@v)", pCBConfig->Net3gppType,
+                                                       pCBConfig->CBEnabled,
+                                                       pCBConfig->MsgIdMaxCount,
+                                                       pCBConfig->MsgIdRangeCount,
+                                                       packet_msgId);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       g_dbus_connection_call(handle->dbus_connection,
+               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
+               "SetCbConfig", param, NULL,
+               G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+               on_response_default, evt_cb_data);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_sms_set_parameters(TelHandle *handle,
-       const TelSmsParamsInfo *params,
-       TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_set_sms_memory_status(struct tapi_handle *handle, int memoryStatus, tapi_response_cb callback, void* user_data)
 {
-       TapiRespCbData *rsp_cb_data;
-       GVariantBuilder sca_builder;
-       GVariant *sca;
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
 
-       dbg("Entry");
+       dbg("Func Entrance ");
 
-       g_return_val_if_fail(handle != NULL && callback != NULL &&
-                       params != NULL && params->index > 0,
-                       TEL_RETURN_INVALID_PARAMETER);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
-
-       g_variant_builder_init(&sca_builder, G_VARIANT_TYPE("a{sv}"));
-
-       g_variant_builder_add(&sca_builder, "{sv}",
-               "ton", g_variant_new_byte(params->sca.ton));
-       g_variant_builder_add(&sca_builder, "{sv}",
-               "npi", g_variant_new_byte(params->sca.npi));
-       g_variant_builder_add(&sca_builder, "{sv}",
-               "number", g_variant_new_string(params->sca.number));
-
-       sca = g_variant_builder_end(&sca_builder);
-
-       telephony_sms_call_set_parameters(handle->sms_proxy, params->index,
-                       sca, params->vp, NULL,
-                       on_response_sms_set_parameters, rsp_cb_data);
-
-       return TEL_RETURN_SUCCESS;
-}
-
-static void on_response_sms_send_deliver_report(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
-{
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
-       GError *error = NULL;
+       if ((memoryStatus < TAPI_NETTEXT_PDA_MEMORY_STATUS_AVAILABLE) || (memoryStatus > TAPI_NETTEXT_PDA_MEMORY_STATUS_FULL)) {
+               err("Invalid Input -MemoryStatus Nettext");
+               return TAPI_API_INVALID_INPUT;
+       }
 
-       dbg("Entry");
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       telephony_sms_call_send_deliver_report_finish(handle->sms_proxy,
-                       (int *)&result, res, &error);
+       param = g_variant_new("(i)", memoryStatus);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       g_dbus_connection_call(handle->dbus_connection,
+               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
+               "SetMemStatus", param, NULL,
+               G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+               on_response_default, evt_cb_data);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_sms_send_deliver_report(TelHandle *handle,
-       const TelSmsDeliverReportInfo *dr_info,
-       TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_send_sms_deliver_report(struct tapi_handle *handle,
+               const TelSmsDatapackageInfo_t *pDataPackage,
+               TelSmsResponse_t RPCause,
+               tapi_response_cb callback, void* user_data)
 {
-       TapiRespCbData *rsp_cb_data;
-       GVariantBuilder sca_builder;
-       GVariant *sca;
-       char *encoded_tpdu;
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+       gchar *encoded_sca = NULL;
+       gchar *encoded_tpdu = NULL;
 
-       dbg("Entry");
+       dbg("Func Entrance ");
 
-       g_return_val_if_fail(handle != NULL && dr_info != NULL &&
-                       dr_info->report <= TEL_SMS_DELIVERY_REPORT_UNSPECIFIED_ERROR &&
-                       dr_info->data.tpdu_length <= TEL_SMS_SMDATA_SIZE_MAX &&
-                       callback != NULL,
-                       TEL_RETURN_INVALID_PARAMETER);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(pDataPackage, TAPI_API_INVALID_PTR);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       g_variant_builder_init(&sca_builder, G_VARIANT_TYPE("a{sv}"));
+       encoded_sca = g_base64_encode((const guchar*)(pDataPackage->Sca), TAPI_SIM_SMSP_ADDRESS_LEN);
+       if (NULL == encoded_sca) {
+               dbg("g_base64_encode: Failed to encode SCA");
+               g_free(evt_cb_data);
+               return TAPI_API_OPERATION_FAILED;
+       }
 
-       g_variant_builder_add(&sca_builder, "{sv}",
-               "ton", g_variant_new_byte(dr_info->data.sca.ton));
-       g_variant_builder_add(&sca_builder, "{sv}",
-               "npi", g_variant_new_byte(dr_info->data.sca.npi));
-       g_variant_builder_add(&sca_builder, "{sv}",
-               "number", g_variant_new_string(dr_info->data.sca.number));
+       encoded_tpdu = g_base64_encode((const guchar*)(pDataPackage->szData), TAPI_NETTEXT_SMDATA_SIZE_MAX + 1);
+       if (NULL == encoded_sca) {
+               dbg("g_base64_encode: Failed to encode TPDU");
+               g_free(encoded_sca);
+               g_free(evt_cb_data);
+               return TAPI_API_OPERATION_FAILED;
+       }
 
-       sca = g_variant_builder_end(&sca_builder);
+       param = g_variant_new("(isisi)", pDataPackage->format, encoded_sca,
+                                                       pDataPackage->MsgLength,
+                                                       encoded_tpdu,
+                                                       RPCause);
 
-       encoded_tpdu = g_base64_encode(dr_info->data.tpdu, dr_info->data.tpdu_length);
-       telephony_sms_call_send_deliver_report(handle->sms_proxy,
-                       dr_info->report, sca, encoded_tpdu, NULL,
-                       on_response_sms_send_deliver_report, rsp_cb_data);
+       g_dbus_connection_call(handle->dbus_connection,
+               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
+               "SetDeliveryReport", param, NULL,
+               G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+               on_response_default, evt_cb_data);
 
+       g_free(encoded_sca);
        g_free(encoded_tpdu);
-       g_variant_unref(sca);
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_sms_set_sca(GObject *source_object,
-                       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_set_sms_message_status(struct tapi_handle *handle, int set_index, TelSmsMsgStatus_t msgStatus, tapi_response_cb callback, void* user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
-       GError *error = NULL;
-
-       dbg("Entry");
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
 
-       telephony_sms_call_set_sca_finish(handle->sms_proxy,
-                       (int *)&result, res, &error);
+       dbg("Func Entrance ");
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-}
-
-EXPORT_API TelReturn tapi_sms_set_sca(TelHandle *handle, TelSmsSca *sca,
-                       TapiResponseCb callback, void *user_data)
-{
-       TapiRespCbData *rsp_cb_data;
-       GVariantBuilder sca_builder;
-       GVariant *var_sca;
-
-       dbg("Entry");
-
-       g_return_val_if_fail(handle != NULL && sca != NULL &&
-                       callback != NULL,
-                       TEL_RETURN_INVALID_PARAMETER);
-
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
-
-       g_variant_builder_init(&sca_builder, G_VARIANT_TYPE("a{sv}"));
+       if ((set_index < 0) || (set_index > TAPI_NETTEXT_MAX_INDEX) ||
+               (msgStatus > TAPI_NETTEXT_STATUS_RESERVED)) {
+               err("Invalid Input -MsgStatus Set Nettext");
+               return TAPI_API_INVALID_INPUT;
+       }
 
-       g_variant_builder_add(&sca_builder, "{sv}",
-               "ton", g_variant_new_byte(sca->ton));
-       g_variant_builder_add(&sca_builder, "{sv}",
-               "npi", g_variant_new_byte(sca->npi));
-       g_variant_builder_add(&sca_builder, "{sv}",
-               "number", g_variant_new_string(sca->number));
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       var_sca = g_variant_builder_end(&sca_builder);
+       param = g_variant_new("(ii)", set_index, msgStatus);
 
-       telephony_sms_call_set_sca(handle->sms_proxy, var_sca, NULL,
-                       on_response_sms_set_sca, rsp_cb_data);
+       g_dbus_connection_call(handle->dbus_connection,
+               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
+               "SetMsgStatus", param, NULL,
+               G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+               on_response_default, evt_cb_data);
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_sms_get_sca(GObject *source_object,
-                       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_get_sms_parameters(struct tapi_handle *handle, int get_index, tapi_response_cb callback, void* user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-
-       TelSmsSca sca;
-       GVariant *var_sca;
-
-       GVariantIter *iter = NULL;
-       GVariant *key_value;
-       const gchar *key;
-
-       GError *error = NULL;
-       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
-
-       dbg("Entry");
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
 
-       telephony_sms_call_get_sca_finish(handle->sms_proxy,
-                       (int *)&result, &var_sca, res, &error);
+       dbg("Func Entrance ");
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_PTR);
 
-       if (result != TEL_SMS_RESULT_SUCCESS) {
-               g_variant_unref(var_sca);
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-               return;
+       if ((get_index < 0) || (get_index > TAPI_NETTEXT_MAX_INDEX)) {
+               err("Invalid Input -SMS Param Get Nettext");
+               return TAPI_API_INVALID_INPUT;
        }
 
-       g_variant_get(var_sca, "a{sv}", &iter);
-       while (g_variant_iter_loop(iter, "{sv}", &key, &key_value)) {
-               if (g_strcmp0(key, "ton") == 0) {
-                       sca.ton = g_variant_get_byte(key_value);
-               }
-               else if (g_strcmp0(key, "npi") == 0) {
-                       sca.npi = g_variant_get_byte(key_value);
-               }
-               else if (g_strcmp0(key, "number") == 0) {
-                       g_strlcpy(sca.number,
-                               g_variant_get_string(key_value, NULL),
-                               TEL_SMS_SCA_LEN_MAX + 1);
-               }
-       }
-       g_variant_iter_free(iter);
-
-       RESP_CALLBACK_CALL(rsp_cb_data, result, &sca);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       g_variant_unref(var_sca);
-}
+       param = g_variant_new("(i)", get_index);
 
-EXPORT_API TelReturn tapi_sms_get_sca(TelHandle *handle,
-                       TapiResponseCb callback, void *user_data)
-{
-       TapiRespCbData *rsp_cb_data;
+       g_dbus_connection_call(handle->dbus_connection,
+               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
+               "GetSmsParams", param, NULL,
+               G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+               on_response_get_sms_params, evt_cb_data);
 
-       dbg("Entry");
-
-       g_return_val_if_fail(handle != NULL && callback != NULL,
-                       TEL_RETURN_INVALID_PARAMETER);
-
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
-
-       telephony_sms_call_get_sca(handle->sms_proxy, NULL,
-                       on_response_sms_get_sca, rsp_cb_data);
-
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_sms_set_memory_status(GObject *source_object,
-                       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_set_sms_parameters(struct tapi_handle *handle, const TelSmsParams_t *pSmsSetParameters, tapi_response_cb callback, void* user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
-       GError *error = NULL;
-
-       dbg("Entry");
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+       GVariant *alphaId = 0, *packet_alphaId = 0;
+       GVariant *destDialNum = 0, *packet_destDialNum = 0;
+       GVariant *scaDialNum = 0, *packet_scaDialNum = 0;
+       GVariantBuilder b;
+       int i;
 
-       telephony_sms_call_set_memory_status_finish(handle->sms_proxy,
-                       (int *)&result, res, &error);
+       dbg("Func Entrance ");
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(pSmsSetParameters, TAPI_API_INVALID_PTR);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-}
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-EXPORT_API TelReturn tapi_sms_set_memory_status(TelHandle *handle,
-                       gboolean available, TapiResponseCb callback,
-                       void *user_data)
-{
-       TapiRespCbData *rsp_cb_data;
+        g_variant_builder_init(&b, G_VARIANT_TYPE("ay") );
+       for( i=0; i<TAPI_SIM_SMSP_ALPHA_ID_LEN_MAX + 1; i++) {
+               g_variant_builder_add(&b, "y", pSmsSetParameters->szAlphaId[i] );
+       }
+       alphaId = g_variant_builder_end(&b);
+       packet_alphaId = g_variant_new("v", alphaId);
 
-       dbg("Entry");
+        g_variant_builder_init(&b, G_VARIANT_TYPE("ay") );
+       for( i=0; i<TAPI_SIM_SMSP_ADDRESS_LEN + 1; i++) {
+               g_variant_builder_add(&b, "y", pSmsSetParameters->TpDestAddr.szDiallingNum[i] );
+       }
+       destDialNum = g_variant_builder_end(&b);
+       packet_destDialNum = g_variant_new("v", destDialNum);
 
-       g_return_val_if_fail(handle != NULL && callback != NULL,
-                       TEL_RETURN_INVALID_PARAMETER);
+        g_variant_builder_init(&b, G_VARIANT_TYPE("ay") );
+       for( i=0; i<TAPI_SIM_SMSP_ADDRESS_LEN + 1; i++) {
+               g_variant_builder_add(&b, "y", pSmsSetParameters->TpSvcCntrAddr.szDiallingNum[i] );
+       }
+       scaDialNum = g_variant_builder_end(&b);
+       packet_scaDialNum = g_variant_new("v", scaDialNum);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       param = g_variant_new("(iii@viiii@viii@viii)", pSmsSetParameters->RecordIndex,
+                                                                       pSmsSetParameters->RecordLen,
+                                                                       pSmsSetParameters->AlphaIdLen,
+                                                                       packet_alphaId,
+                                                                       pSmsSetParameters->ParamIndicator,
+                                                                       pSmsSetParameters->TpDestAddr.DialNumLen,
+                                                                       pSmsSetParameters->TpDestAddr.Ton,
+                                                                       pSmsSetParameters->TpDestAddr.Npi,
+                                                                       packet_destDialNum,
+                                                                       pSmsSetParameters->TpSvcCntrAddr.DialNumLen,
+                                                                       pSmsSetParameters->TpSvcCntrAddr.Ton,
+                                                                       pSmsSetParameters->TpSvcCntrAddr.Npi,
+                                                                       packet_scaDialNum,
+                                                                       pSmsSetParameters->TpProtocolId,
+                                                                       pSmsSetParameters->TpDataCodingScheme,
+                                                                       pSmsSetParameters->TpValidityPeriod);
 
-       telephony_sms_call_set_memory_status(handle->sms_proxy, available,
-                       NULL, on_response_sms_set_memory_status, rsp_cb_data);
+       g_dbus_connection_call(handle->dbus_connection,
+               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
+               "SetSmsParams", param, NULL,
+               G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+               on_response_default, evt_cb_data);
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_sms_set_message_status(GObject *source_object,
-                       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_get_sms_parameter_count(struct tapi_handle *handle, tapi_response_cb callback, void* user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSmsResult result = TEL_SMS_RESULT_FAILURE;
-       GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = NULL;
+
+       dbg("Func Entrance ");
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_PTR);
 
-       telephony_sms_call_set_message_status_finish(handle->sms_proxy,
-                       (int *)&result, res, &error);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       g_dbus_connection_call(handle->dbus_connection,
+               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
+               "GetSmsParamCnt", NULL, NULL,
+               G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+               on_response_get_sms_param_cnt, evt_cb_data);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_sms_set_message_status(TelHandle *handle,
-                       TelSmsStatusInfo *info, TapiResponseCb callback,
-                       void *user_data)
+EXPORT_API int tel_check_sms_device_status(struct tapi_handle *handle, int *pReadyStatus)
 {
-       TapiRespCbData *rsp_cb_data;
-
-       dbg("Entry");
+       GError *error;
+       GVariant *smsReady = NULL;
 
-       g_return_val_if_fail(handle != NULL && callback != NULL &&
-                       info != NULL && info->index > 0 &&
-                       info->status <= TEL_SMS_STATUS_REPLACED,
-                       TEL_RETURN_INVALID_PARAMETER);
+       dbg("Func Entrance ");
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(pReadyStatus, TAPI_API_INVALID_PTR);
 
-       telephony_sms_call_set_message_status(handle->sms_proxy, info->index,
-                       info->status, NULL, on_response_sms_set_message_status,
-                       rsp_cb_data);
+       memset(pReadyStatus, 0, sizeof(int));
 
-       return TEL_RETURN_SUCCESS;
-}
-
-EXPORT_API TelReturn tapi_sms_get_init_status(TelHandle *handle,
-                       gboolean *init_status)
-{
-       g_return_val_if_fail(handle != NULL && init_status != NULL,
-                       TEL_RETURN_INVALID_PARAMETER);
-
-       *init_status = telephony_sms_get_init_status(handle->sms_proxy);
+       error = NULL;
+       smsReady = g_dbus_connection_call_sync(handle->dbus_connection, DBUS_TELEPHONY_SERVICE,
+               handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
+               "GetSmsReadyStatus", NULL, NULL, G_DBUS_CALL_FLAGS_NONE,
+               TAPI_DEFAULT_TIMEOUT, NULL, &error);
+       if (!smsReady) {
+               dbg( "error to get SMS ready_status(%s)", error->message);
+               g_error_free (error);
+               return TAPI_API_OPERATION_FAILED;
+       }
 
-       return TEL_RETURN_SUCCESS;
-}
+       dbg("get SMS ready_status type_format(%s)", g_variant_get_type_string(smsReady));
 
-EXPORT_API TelReturn tapi_sms_get_sim_memory_status(TelHandle *handle,
-                       gboolean *memory_full)
-{
-       g_return_val_if_fail(handle != NULL && memory_full != NULL,
-                       TEL_RETURN_INVALID_PARAMETER);
+       g_variant_get(smsReady, "(b)", pReadyStatus);
+       g_variant_unref(smsReady);
 
-       *memory_full = telephony_sms_get_sim_memory_status(handle->sms_proxy);
+       msg("************SMS_device_status (%d)", *pReadyStatus);
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
index 0fcd87e1121ab38c55c36a08cca562a6696a1b1a..e40519c158cc7bb4ab66fcef3ad304a881d84e5d 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
-#include "tapi_private.h"
-#include "tapi.h"
-#include "tapi_ss.h"
 
-#include <tel_ss.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
 
-void on_ss_signal_emit_handler(TelephonySs *ss, gchar *sender_name,
-                                       gchar *signal_name, GVariant *parameters,
-                                       gpointer user_data)
-{
-       TapiEvtCbData *evt_cb_data = NULL;
-       TelHandle *handle = user_data;
-       char *evt_id = NULL;
+#include "tapi_common.h"
+#include "TapiUtility.h"
+#include "TelSs.h"
 
-       dbg("Entry");
+#include "common.h"
+#include "tapi_log.h"
+#include "ITapiSs.h"
 
-       if (handle == NULL) {
-               err("invalid handle");
-               return;
-       }
+static void on_response_get_ss_barring_status(GObject *source_object, GAsyncResult *res, gpointer user_data)
+{
+       GError *error = 0;
+       GDBusConnection *conn = 0;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1, i = 0;
+       TelSsBarringResp_t resp;
 
-       evt_id = g_strdup_printf("%s:%s", TELEPHONY_SS_INTERFACE,
-                                       signal_name);
+       GVariant *dbus_result = 0, *value = 0;
+       GVariantIter *iter = 0;
+       GVariantIter *iter_row = 0;
+       const gchar *key = 0;
 
-       evt_cb_data = g_hash_table_lookup(handle->evt_table, evt_id);
-       if (evt_cb_data == NULL) {
-               err("invalid evt_id[%s]", evt_id);
-               g_free(evt_id);
-               return;
-       }
+       memset(&resp, '\0', sizeof(TelSsBarringResp_t));
 
-       if (!g_strcmp0(signal_name, "NotifyUssd")) {
-               TelSsUssdNoti ussd_noti;
-               memset(&ussd_noti, 0, sizeof(TelSsUssdNoti));
-               g_variant_get(parameters, "(is)", &ussd_noti.status, &ussd_noti.str);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-               dbg("signal[%s] status[%d] str[%s]", signal_name,
-                                       ussd_noti.status, ussd_noti.str);
+       g_variant_get (dbus_result, "(aa{sv}i)", &iter, &result);
 
-               EVT_CALLBACK_CALL(handle, evt_cb_data, evt_id, &ussd_noti);
-               g_free(ussd_noti.str);
-       } else {
-               err("Unsupported signal %s", signal_name);
+       resp.record_num = g_variant_iter_n_children(iter);
+
+       if (TAPI_SS_RECORD_NUM_MAX < resp.record_num) {
+               resp.record_num = TAPI_SS_RECORD_NUM_MAX;
        }
 
-       g_free(evt_id);
-}
+       while ( g_variant_iter_next(iter, "a{sv}", &iter_row ) && (i < resp.record_num)) {
+               while ( g_variant_iter_loop( iter_row, "{sv}", &key, &value ) ) {
 
-static gboolean __tapi_check_ss_class(TelSsClass ss_class)
-{
-       switch (ss_class) {
-       case TEL_SS_CLASS_ALL_TELE_BEARER:
-       case TEL_SS_CLASS_ALL_TELE:
-       case TEL_SS_CLASS_VOICE:
-       case TEL_SS_CLASS_ALL_DATA_TELE:
-       case TEL_SS_CLASS_FAX:
-       case TEL_SS_CLASS_SMS:
-       case TEL_SS_CLASS_VGCS:
-       case TEL_SS_CLASS_VBS:
-       case TEL_SS_CLASS_ALL_TELE_EXPT_SMS:
-       case TEL_SS_CLASS_ALL_BEARER:
-       case TEL_SS_CLASS_ALL_ASYNC:
-       case TEL_SS_CLASS_ALL_SYNC:
-       case TEL_SS_CLASS_ALL_CS_SYNC:
-       case TEL_SS_CLASS_ALL_CS_ASYNC:
-       case TEL_SS_CLASS_ALL_DEDI_PS:
-       case TEL_SS_CLASS_ALL_DEDI_PAD:
-       case TEL_SS_CLASS_ALL_DATA_CDA:
-       case TEL_SS_CLASS_ALL_GPRS_BEARER:
-       case TEL_SS_CLASS_AUX_VOICE:
-               return TRUE;
-       }
+                       if ( !g_strcmp0(key, "ss_class") ) {
+                               resp.record[i].Class = g_variant_get_int32(value);
+                       }
 
-       return FALSE;
-}
+                       if ( !g_strcmp0(key, "ss_status") ) {
+                               resp.record[i].Status = g_variant_get_int32(value);
+                       }
 
-static gboolean __tapi_check_barring_type(TelSsBarringType type)
-{
-       switch (type) {
-       case TEL_SS_CB_TYPE_BAOC:
-       case TEL_SS_CB_TYPE_BOIC:
-       case TEL_SS_CB_TYPE_BOIC_NOT_HC:
-       case TEL_SS_CB_TYPE_BAIC:
-       case TEL_SS_CB_TYPE_BIC_ROAM:
-       case TEL_SS_CB_TYPE_NS:
-       case TEL_SS_CB_TYPE_AB:
-       case TEL_SS_CB_TYPE_AOB:
-       case TEL_SS_CB_TYPE_AIB:
-               return TRUE;
+                       if ( !g_strcmp0(key, "barring_mode") ) {
+                               resp.record[i].Flavour = g_variant_get_int32(value);
+                       }
+
+               }
+               i++;
+               g_variant_iter_free(iter_row);
        }
+       g_variant_iter_free(iter);
 
-       return FALSE;
-}
-static gboolean __tapi_check_barring_pwd(const char *pwd)
-{
-       if (pwd == NULL || (strlen(pwd) > TEL_SS_BARRING_PASSWORD_LEN_MAX))
-               return FALSE;
-       else
-               return TRUE;
-}
-static gboolean __tapi_check_forwarding_mode(TelSsForwardMode mode)
-{
-       switch (mode) {
-       case TEL_SS_CF_MODE_DISABLE:
-       case TEL_SS_CF_MODE_ENABLE:
-       case TEL_SS_CF_MODE_REGISTER:
-       case TEL_SS_CF_MODE_DEREGISTER:
-               return TRUE;
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &resp, evt_cb_data->user_data);
        }
 
-       return FALSE;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static gboolean __tapi_check_forwarding_condition(TelSsForwardCondition condition)
+static void on_response_change_ss_barring_password(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       switch (condition) {
-       case TEL_SS_CF_COND_CFU:
-       case TEL_SS_CF_COND_CFB:
-       case TEL_SS_CF_COND_CFNRY:
-       case TEL_SS_CF_COND_CFNRC:
-       case TEL_SS_CF_COND_ALL:
-       case TEL_SS_CF_COND_ALL_CFC:
-               return TRUE;
-       }
+       GError *error = 0;
+       GDBusConnection *conn = 0;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
 
-       return FALSE;
-}
+       GVariant *dbus_result = 0;
 
-static gboolean __tapi_check_forwarding_number(const char *number)
-{
-       if (number == NULL || (strlen(number) > TEL_SS_NUMBER_LEN_MAX))
-               return FALSE;
-       else
-               return TRUE;
-}
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-static gboolean __tapi_check_and_get_cli_status(const TelSsCliInfo *cli_info, gint *status)
-{
-       switch (cli_info->type) {
-       case TEL_SS_CLI_CLIR:
-               if (cli_info->status.clir <= TEL_CLIR_STATUS_SUPPRESSION) {
-                       *status = cli_info->status.clir;
-                       return TRUE;
-               }
-       break;
-       case TEL_SS_CLI_CLIP:
-               if (cli_info->status.clip == TEL_SS_CLI_DISABLE || cli_info->status.clip == TEL_SS_CLI_ENABLE) {
-                       *status = cli_info->status.clip;
-                       return TRUE;
-               }
-       break;
-       case TEL_SS_CLI_COLP:
-               if (cli_info->status.colp == TEL_SS_CLI_DISABLE || cli_info->status.colp == TEL_SS_CLI_ENABLE) {
-                       *status = cli_info->status.colp;
-                       return TRUE;
-               }
-       break;
-       case TEL_SS_CLI_COLR:
-               if (cli_info->status.colr == TEL_SS_CLI_DISABLE || cli_info->status.colr == TEL_SS_CLI_ENABLE) {
-                       *status = cli_info->status.colr;
-                       return TRUE;
-               }
-       break;
-       case TEL_SS_CLI_CDIP:
-               if (cli_info->status.cdip == TEL_SS_CLI_DISABLE || cli_info->status.cdip == TEL_SS_CLI_ENABLE) {
-                       *status = cli_info->status.cdip;
-                       return TRUE;
-               }
-       break;
-       case TEL_SS_CLI_CNAP:
-               if (cli_info->status.cnap == TEL_SS_CLI_DISABLE || cli_info->status.cnap == TEL_SS_CLI_ENABLE) {
-                       *status = cli_info->status.cnap;
-                       return TRUE;
-               }
+       g_variant_get (dbus_result, "(i)",  &result);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, NULL, evt_cb_data->user_data);
        }
 
-       return FALSE;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static gboolean __tapi_check_cli_type(TelSsCliType type)
+static void on_response_get_ss_forward_status(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       switch (type) {
-       case TEL_SS_CLI_CLIR:
-       case TEL_SS_CLI_CLIP:
-       case TEL_SS_CLI_COLP:
-       case TEL_SS_CLI_COLR:
-       case TEL_SS_CLI_CDIP:
-       case TEL_SS_CLI_CNAP:
-               return TRUE;
-       }
+       GError *error = 0;
+       GDBusConnection *conn = 0;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1, i = 0;
+       TelSsForwardResp_t resp;
 
-       return FALSE;
-}
+       GVariant *dbus_result = 0, *value = 0;
+       GVariantIter *iter = 0;
+       GVariantIter *iter_row = 0;
+       const gchar *key = 0;
 
-static gboolean __tapi_check_ussd_type(TelSsUssdType type)
-{
-       switch (type) {
-       case TEL_SS_USSD_TYPE_USER_INIT:
-       case TEL_SS_USSD_TYPE_USER_RSP:
-       case TEL_SS_USSD_TYPE_USER_REL:
-               return TRUE;
-       }
 
-       return FALSE;
-}
+       memset(&resp, '\0', sizeof(TelSsForwardResp_t));
 
-static gboolean __tapi_check_ussd_string(unsigned char *string)
-{
-       if (string == NULL)
-               return FALSE;
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       return TRUE;
-}
+       g_variant_get (dbus_result, "(aa{sv}i)", &iter, &result);
 
-static void on_response_ss_set_barring(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
-{
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSsResult result = TEL_SS_RESULT_FAILURE;
-       GError *error = NULL;
+       resp.record_num = g_variant_iter_n_children(iter);
 
-       dbg("Entry");
+       if (TAPI_SS_RECORD_NUM_MAX < resp.record_num) {
+               resp.record_num = TAPI_SS_RECORD_NUM_MAX;
+       }
 
-       telephony_ss_call_set_barring_finish(handle->ss_proxy, (int *)&result, res, &error);
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       while ( g_variant_iter_next(iter, "a{sv}", &iter_row ) && (i < resp.record_num)) {
+               while ( g_variant_iter_loop( iter_row, "{sv}", &key, &value ) ) {
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-}
+                       if ( !g_strcmp0(key, "ss_class") ) {
+                               resp.record[i].Class = g_variant_get_int32(value);
+                       }
 
-EXPORT_API TelReturn tapi_ss_set_barring(TelHandle *handle,
-       const TelSsBarringInfo *barring_info,
-       TapiResponseCb callback, void *user_data)
-{
-       TapiRespCbData *rsp_cb_data = NULL;
+                       if ( !g_strcmp0(key, "ss_status") ) {
+                               resp.record[i].Status = g_variant_get_int32(value);
+                       }
 
-       dbg("Entry");
+                       if ( !g_strcmp0(key, "forwarding_mode") ) {
+                               resp.record[i].ForwardCondition = g_variant_get_int32(value);
+                       }
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback
-               && barring_info && __tapi_check_ss_class(barring_info->class)
-               && __tapi_check_barring_type(barring_info->type)
-               && __tapi_check_barring_pwd(barring_info->pwd),
-               TEL_RETURN_INVALID_PARAMETER);
+                       if ( !g_strcmp0(key, "number_present") ) {
+                               resp.record[i].bCallForwardingNumberPresent = g_variant_get_int32(value);
+                       }
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+                       if ( !g_strcmp0(key, "no_reply_time") ) {
+                               resp.record[i].NoReplyWaitTime = g_variant_get_int32(value);
+                       }
 
-       telephony_ss_call_set_barring(handle->ss_proxy,
-               barring_info->class, barring_info->enable,
-               barring_info->type, barring_info->pwd, NULL,
-               on_response_ss_set_barring, rsp_cb_data);
+                       if ( !g_strcmp0(key, "type_of_number") ) {
+                               resp.record[i].Ton = g_variant_get_int32(value);
+                       }
 
-       return TEL_RETURN_SUCCESS;
+                       if ( !g_strcmp0(key, "number_plan_identity") ) {
+                               resp.record[i].Npi = g_variant_get_int32(value);
+                       }
+
+                       if ( !g_strcmp0(key, "forwarding_number") ) {
+                               strncpy((char *)resp.record[i].szCallForwardingNumber, g_variant_get_string(value, 0), TAPI_CALL_DIALDIGIT_LEN_MAX );
+                       }
+
+               }
+               i++;
+               g_variant_iter_free(iter_row);
+       }
+       g_variant_iter_free(iter);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &resp, evt_cb_data->user_data);
+       }
+
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_ss_get_barring_status(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+static void on_response_get_ss_waiting_status(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSsResult result = TEL_SS_RESULT_FAILURE;
+       GError *error = 0;
+       GDBusConnection *conn = 0;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1, i = 0;
+       TelSsWaitingResp_t resp;
 
-       GVariant *record_list;
-       TelSsBarringResp barring_resp = {0, };
+       GVariant *dbus_result = 0, *value = 0;
+       GVariantIter *iter = 0;
+       GVariantIter *iter_row = 0;
+       const gchar *key = 0;
 
-       GError *error = NULL;
 
-       dbg("Entry");
+       memset(&resp, '\0', sizeof(TelSsWaitingResp_t));
 
-       telephony_ss_call_get_barring_status_finish(handle->ss_proxy,
-               (int *)&result, &(barring_resp.record_num),
-               &record_list, res, &error);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       g_variant_get (dbus_result, "(aa{sv}i)", &iter, &result);
 
-       if (result != TEL_SS_RESULT_SUCCESS) {
-               g_variant_unref(record_list);
-               err("Failed to get barring status: %d", result);
+       resp.record_num = g_variant_iter_n_children(iter);
 
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-               return;
+       if (TAPI_SS_RECORD_NUM_MAX < resp.record_num) {
+               resp.record_num = TAPI_SS_RECORD_NUM_MAX;
        }
 
-       if ((barring_resp.record_num != 0)
-                       && (g_variant_n_children(record_list)
-                       == barring_resp.record_num)) {
-               GVariantIter *iter = NULL, *iter_row = NULL;
-               GVariant *key_value;
-               const gchar *key;
-               guint i = 0;
-
-               dbg("Barring status list count: [%d]", barring_resp.record_num);
-               barring_resp.records =
-                       g_malloc0(sizeof(TelSsBarringInfoRecord)*barring_resp.record_num);
-
-               g_variant_get(record_list, "aa{sv}", &iter);
-               while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
-                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
-                               if (g_strcmp0(key, "class") == 0) {
-                                       barring_resp.records[i].class = g_variant_get_int32(key_value);
-                               }
-
-                               if (g_strcmp0(key, "enable") == 0) {
-                                       barring_resp.records[i].enable = g_variant_get_boolean(key_value);
-                               }
-
-                               if (g_strcmp0(key, "type") == 0) {
-                                       barring_resp.records[i].type = g_variant_get_int32(key_value);
-                               }
+       while ( g_variant_iter_next(iter, "a{sv}", &iter_row ) && (i < resp.record_num) ) {
+               while ( g_variant_iter_loop( iter_row, "{sv}", &key, &value ) ) {
+
+                       if ( !g_strcmp0(key, "ss_class") ) {
+                               resp.record[i].Class = g_variant_get_int32(value);
+                       }
+
+                       if ( !g_strcmp0(key, "ss_status") ) {
+                               resp.record[i].Status = g_variant_get_int32(value);
                        }
-                       i++;
-                       g_variant_iter_free(iter_row);
                }
-               g_variant_iter_free(iter);
-       }
-       else {
-               warn("Barring status list count is NOT valid - Count: [%d]", barring_resp.record_num);
-               barring_resp.record_num = 0;
+               i++;
+               g_variant_iter_free(iter_row);
        }
-       g_variant_unref(record_list);
+       g_variant_iter_free(iter);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, &barring_resp);
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &resp, evt_cb_data->user_data);
+       }
 
-       g_free(barring_resp.records);
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-EXPORT_API TelReturn tapi_ss_get_barring_status(TelHandle *handle,
-       const TelSsBarringGetInfo *get_barring_info,
-       TapiResponseCb callback, void *user_data)
+static void on_response_set_ss_cli_status(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = NULL;
+       GError *error = 0;
+       GDBusConnection *conn = 0;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       int data = 0;
 
-       dbg("Entry");
+       GVariant *dbus_result = 0;
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback
-               && get_barring_info && __tapi_check_ss_class(get_barring_info->class)
-               && __tapi_check_barring_type(get_barring_info->type),
-               TEL_RETURN_INVALID_PARAMETER);
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       g_variant_get (dbus_result, "(i)",  &result);
 
-       telephony_ss_call_get_barring_status(handle->ss_proxy,
-               get_barring_info->class, get_barring_info->type, NULL,
-               on_response_ss_get_barring_status, rsp_cb_data);
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
+       }
 
-       return TEL_RETURN_SUCCESS;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_ss_change_barring_password(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+static void on_response_get_ss_cli_status(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSsResult result = TEL_SS_RESULT_FAILURE;
-       GError *error = NULL;
+       GError *error = 0;
+       GDBusConnection *conn = 0;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       TelSsCliResp_t resp;
 
-       dbg("Entry");
+       GVariant *dbus_result = 0;
 
-       telephony_ss_call_change_barring_password_finish(handle->ss_proxy, (int *)&result, res, &error);
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       memset(&resp, '\0', sizeof(TelSsCliResp_t));
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-}
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-EXPORT_API TelReturn tapi_ss_change_barring_password(TelHandle *handle,
-       const TelSsBarringPwdInfo *barring_pwd_info,
-       TapiResponseCb callback, void *user_data)
-{
-       TapiRespCbData *rsp_cb_data = NULL;
+       g_variant_get (dbus_result, "(iii)",  &result, &resp.Type, &resp.Status);
 
-       dbg("Entry");
-
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback
-               && barring_pwd_info && __tapi_check_barring_pwd(barring_pwd_info->new_pwd)
-               && __tapi_check_barring_pwd(barring_pwd_info->old_pwd),
-               TEL_RETURN_INVALID_PARAMETER);
-
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
-
-       telephony_ss_call_change_barring_password(handle->ss_proxy,
-               barring_pwd_info->old_pwd, barring_pwd_info->new_pwd, NULL,
-               on_response_ss_change_barring_password, rsp_cb_data);
+       msg("Type(%d), Status(%d)", resp.Type, resp.Status);
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &resp, evt_cb_data->user_data);
+       }
 
-       return TEL_RETURN_SUCCESS;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_ss_set_forwarding(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+static void on_response_send_ss_ussd_request(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSsResult result = TEL_SS_RESULT_FAILURE;
-       GError *error = NULL;
+       GError *error = 0;
+       GDBusConnection *conn = 0;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       char *tmp_str = 0;
+       TelSsUssdResp_t resp;
 
-       dbg("Entry");
+       GVariant *dbus_result = 0;
 
-       telephony_ss_call_set_forwarding_finish(handle->ss_proxy, (int *)&result, res, &error);
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       memset(&resp, '\0', sizeof(TelSsUssdResp_t));
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-}
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_ERROR(error);
 
-EXPORT_API TelReturn tapi_ss_set_forwarding(TelHandle *handle,
-       const TelSsForwardInfo *forwarding_info,
-       TapiResponseCb callback, void *user_data)
-{
-       TapiRespCbData *rsp_cb_data = NULL;
-
-       dbg("Entry");
+       g_variant_get (dbus_result, "(iiiiis)",  &result, &resp.Type, &resp.Status, &resp.Dcs, &resp.Length, &tmp_str);
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback
-               && forwarding_info && __tapi_check_ss_class(forwarding_info->class)
-               && __tapi_check_forwarding_mode(forwarding_info->mode)
-               && __tapi_check_forwarding_condition(forwarding_info->condition)
-               && __tapi_check_forwarding_number(forwarding_info->number),
-               TEL_RETURN_INVALID_PARAMETER);
-
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       if (!result) {
+               memcpy( resp.szString, tmp_str, resp.Length );
+               g_free(tmp_str);
+       }
 
-       telephony_ss_call_set_forwarding(handle->ss_proxy,
-               forwarding_info->class, forwarding_info->mode, forwarding_info->condition,
-               forwarding_info->number, forwarding_info->wait_time, NULL,
-               on_response_ss_set_forwarding, rsp_cb_data);
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &resp, evt_cb_data->user_data);
+       }
 
-       return TEL_RETURN_SUCCESS;
+       g_free(evt_cb_data);
+       g_variant_unref(dbus_result);
 }
 
-static void on_response_ss_get_forwarding_status(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+EXPORT_API int tel_set_ss_barring(TapiHandle *handle, TelSsBarringInfo_t *info, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+       const gchar *method = NULL;
 
-       GVariant *record_list;
-       TelSsForwardingResp forwarding_resp = {0, };
+       dbg("Func Entrance ");
 
-       GError *error = NULL;
-       TelSsResult result = TEL_SS_RESULT_FAILURE;
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(info, TAPI_API_INVALID_PTR);
 
-       dbg("Entry");
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       telephony_ss_call_get_forwarding_status_finish(handle->ss_proxy,
-               (int *)&result, &(forwarding_resp.record_num),
-               &record_list, res, &error);
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       param = g_variant_new("(iis)", info->Class, info->Type, info->szPassword);
 
-       if (result != TEL_SS_RESULT_SUCCESS) {
-               g_variant_unref(record_list);
-               err("Failed to get forwarding status: %d", result);
+       if ( info->Mode == TAPI_SS_CB_MODE_ACTIVATE ) {
+               msg("[ check ] barring activate");
+               method = "ActivateBarring";
 
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-               return;
-       }
+       } else {
+               msg("[ check ] barring deactivate");
+               method = "DeactivateBarring";
 
-       if ((forwarding_resp.record_num != 0)
-                       && (g_variant_n_children(record_list)
-                       == forwarding_resp.record_num)) {
-               GVariantIter *iter = NULL, *iter_row = NULL;
-               GVariant *key_value;
-               const gchar *key;
-               guint i = 0;
-
-               dbg("Forwarding status list count: [%d]", forwarding_resp.record_num);
-               forwarding_resp.records =
-                       g_malloc0(sizeof(TelSsForwardingInfoRecord)*forwarding_resp.record_num);
-
-               g_variant_get(record_list, "aa{sv}", &iter);
-               while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
-                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
-                               if (g_strcmp0(key, "class") == 0) {
-                                       forwarding_resp.records[i].class = g_variant_get_int32(key_value);
-                               }
-
-                               if (g_strcmp0(key, "enable") == 0) {
-                                       forwarding_resp.records[i].enable = g_variant_get_boolean(key_value);
-                               }
-
-                               if (g_strcmp0(key, "condition") == 0) {
-                                       forwarding_resp.records[i].condition = g_variant_get_int32(key_value);
-                               }
-
-                               if (g_strcmp0(key, "number") == 0) {
-                                       g_strlcpy(forwarding_resp.records[i].number,
-                                               g_variant_get_string(key_value, NULL),
-                                               TEL_SS_NUMBER_LEN_MAX + 1);
-                               }
-
-                               if (g_strcmp0(key, "wait_time") == 0) {
-                                       forwarding_resp.records[i].wait_time = g_variant_get_int32(key_value);
-                               }
-                       }
-                       i++;
-                       g_variant_iter_free(iter_row);
-               }
-               g_variant_iter_free(iter);
-       }
-       else {
-               warn("Forwarding status list count is NOT valid - Count: [%d]",
-                       forwarding_resp.record_num);
-               forwarding_resp.record_num = 0;
        }
-       g_variant_unref(record_list);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, &forwarding_resp);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
+                       method, param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_get_ss_barring_status, evt_cb_data );
 
-       g_free(forwarding_resp.records);
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_ss_get_forwarding_status(TelHandle *handle,
-       const TelSsForwardGetInfo *get_forwarding_info,
-       TapiResponseCb callback, void *user_data)
+EXPORT_API int tel_get_ss_barring_status(TapiHandle *handle, TelSsClass_t class, TelSsBarringType_t type, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = NULL;
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
 
-       dbg("Entry");
+       dbg("Func Entrance ");
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback
-               && get_forwarding_info && __tapi_check_ss_class(get_forwarding_info->class)
-               && __tapi_check_forwarding_condition(get_forwarding_info->condition),
-               TEL_RETURN_INVALID_PARAMETER);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_PTR);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       telephony_ss_call_get_forwarding_status(handle->ss_proxy,
-               get_forwarding_info->class, get_forwarding_info->condition, NULL,
-               on_response_ss_get_forwarding_status, rsp_cb_data);
+       param = g_variant_new("(ii)", class, type);
 
-       return TEL_RETURN_SUCCESS;
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
+                       "GetBarringStatus", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_get_ss_barring_status, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_ss_set_waiting(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+/**********************************************************************************************
+ *
+ * This function is used to change call barring password.
+ *
+ * @param      pOldPassword[IN] of type char* Specifies the Old Call Barring Password.
+ * @param      pNewPassword[IN] of type char* Specifies the New Call Barring Password.
+ * @param      pNewPasswordAgain[IN] of type char* Specifies the New Call Barring Password for Confirm.
+ * @return     enum type TapiResult_t Specifies the API's Return result.
+ * @remark
+ *
+ ***********************************************************************************************/
+EXPORT_API int tel_change_ss_barring_password(TapiHandle *handle,
+               const char *old_password,
+               const char *new_password,
+               const char *new_password_again,
+               tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSsResult result = TEL_SS_RESULT_FAILURE;
-       GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
 
-       dbg("Entry");
+       msg("barring_password change request");
 
-       telephony_ss_call_set_waiting_finish(handle->ss_proxy, (int *)&result, res, &error);
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(old_password, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(new_password, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(new_password_again, TAPI_API_INVALID_PTR);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-}
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-EXPORT_API TelReturn tapi_ss_set_waiting(TelHandle *handle,
-       const TelSsWaitingInfo *waiting_info,
-       TapiResponseCb callback, void *user_data)
-{
-       TapiRespCbData *rsp_cb_data = NULL;
+       param = g_variant_new("(sss)", old_password, new_password, new_password_again);
 
-       dbg("Entry");
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
+                       "ChangeBarringPassword", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_change_ss_barring_password, evt_cb_data );
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback
-               && waiting_info && __tapi_check_ss_class(waiting_info->class),
-               TEL_RETURN_INVALID_PARAMETER);
+       return TAPI_API_SUCCESS;
+}
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+/**********************************************************************************************
+ *
+ * This function is used to Activate or Deactivate the call forwarding feature.
+ *
+ * @param      forwardInfo[IN] of type TelSsForwardInfo_t which specifies the Teleservice and CF flavour, Forwarded to number.
+ * @return     enum type TapiResult_t Specifies the API's Return result.
+ * @remark
+ *
+ ***********************************************************************************************/
+EXPORT_API int tel_set_ss_forward(TapiHandle *handle, const TelSsForwardInfo_t *info, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+       const gchar *method = 0;
 
-       telephony_ss_call_set_waiting(handle->ss_proxy,
-               waiting_info->class, waiting_info->enable, NULL,
-               on_response_ss_set_waiting, rsp_cb_data);
+       dbg("Func Entrance ");
 
-       return TEL_RETURN_SUCCESS;
-}
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(info, TAPI_API_INVALID_PTR);
 
-static void on_response_ss_get_waiting_status(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
-{
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       GVariant *record_list;
-       TelSsWaitingResp waiting_resp = {0, };
+       param = g_variant_new("(iiiiis)", info->Class, info->Condition,
+                       info->NoReplyConditionTimer, info->Ton, info->Npi, info->szPhoneNumber);
 
-       GError *error = NULL;
-       TelSsResult result = TEL_SS_RESULT_FAILURE;
+       switch ( info->Mode ) {
+               case TAPI_SS_CF_MODE_DISABLE_EV: {
+                       msg("[ check ] forwarding deactivate");
+                       method = "DeactivateForwarding";
+               } break;
 
-       dbg("Entry");
+               case TAPI_SS_CF_MODE_ENABLE_EV: {
+                       msg("[ check ] forwarding activate");
+                       method = "ActivateForwarding";
+               } break;
 
-       telephony_ss_call_get_waiting_status_finish(handle->ss_proxy,
-               (int *)&result, &(waiting_resp.record_num),
-               &record_list, res, &error);
-       CHECK_DEINIT(error, rsp_cb_data, result);
+               case TAPI_SS_CF_MODE_REGISTRATION_EV: {
+                       msg("[ check ] forwarding registration");
+                       method = "RegisterForwarding";
+               } break;
 
-       if (result != TEL_SS_RESULT_SUCCESS) {
-               g_variant_unref(record_list);
-               err("Failed to get waiting status: %d", result);
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-               return;
-       }
+               case TAPI_SS_CF_MODE_ERASURE_EV: {
+                       msg("[ check ] forwarding deregistration");
+                       method = "DeregisterForwarding";
+               } break;
 
-       if ((waiting_resp.record_num != 0)
-                       && (g_variant_n_children(record_list)
-                       == waiting_resp.record_num)) {
-               GVariantIter *iter = NULL, *iter_row = NULL;
-               GVariant *key_value;
-               const gchar *key;
-               guint i = 0;
-
-               dbg("Waiting status list count: [%d]", waiting_resp.record_num);
-               waiting_resp.records =
-                       g_malloc0(sizeof(TelSsWaitingInfo)*waiting_resp.record_num);
-
-               g_variant_get(record_list, "aa{sv}", &iter);
-               while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
-                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &key_value)) {
-                               if (g_strcmp0(key, "class") == 0) {
-                                       waiting_resp.records[i].class = g_variant_get_int32(key_value);
-                               }
-
-                               if (g_strcmp0(key, "enable") == 0) {
-                                       waiting_resp.records[i].enable = g_variant_get_boolean(key_value);
-                               }
-                       }
-                       i++;
-                       g_variant_iter_free(iter_row);
-               }
-               g_variant_iter_free(iter);
+               default:
+                       err("[ error ] invalid input : (0x%x)", info->Mode);
+                       return TAPI_API_INVALID_INPUT;
        }
-       else {
-               warn("Waiting status list count is NOT valid - Count: [%d]",
-                       waiting_resp.record_num);
-               waiting_resp.record_num = 0;
-       }
-       g_variant_unref(record_list);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, &waiting_resp);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
+                       method, param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_get_ss_forward_status, evt_cb_data );
 
-       g_free(waiting_resp.records);
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_ss_get_waiting_status(TelHandle *handle,
-       TelSsClass class,
-       TapiResponseCb callback, void *user_data)
+/**********************************************************************************************
+ *
+ * This function is used to interrogate the status of call forwarding feature.
+ *
+ * @param      forwardType[IN] of type TelSsForwardType_t which specifies the telecommunication service.
+ * @param      condition[IN]   is of type TelSsForwardWhen_t specified the CF flavour
+ * @return     enum type TapiResult_t Specifies the API's Return result.
+ * @remark
+ *
+ ***********************************************************************************************/
+EXPORT_API int tel_get_ss_forward_status(TapiHandle *handle, TelSsClass_t class, TelSsForwardWhen_t condition, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = NULL;
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       dbg("Func Entrance ");
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_PTR);
 
-       TEL_RETURN_IF_CHECK_FAIL(handle
-               && callback
-               && __tapi_check_ss_class(class),
-               TEL_RETURN_INVALID_PARAMETER);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       param = g_variant_new("(ii)", class, condition);
 
-       telephony_ss_call_get_waiting_status(handle->ss_proxy,
-               class, NULL,
-               on_response_ss_get_waiting_status, rsp_cb_data);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
+                       "GetForwardingStatus", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_get_ss_forward_status, evt_cb_data );
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_ss_set_cli(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+/**********************************************************************************************
+ *
+ * This function is used to Activate or dectivate call waiting feature.
+ *
+ * @param      waitInfo[IN] of type TelSsWaitingInfo_t which specifies the telecommunication service and mode.
+ * @return     enum type TapiResult_t Specifies the API's Return result.
+ * @remark
+ *
+ ***********************************************************************************************/
+EXPORT_API int tel_set_ss_waiting(TapiHandle *handle, const TelSsWaitingInfo_t *info, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSsResult result = TEL_SS_RESULT_FAILURE;
-       GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+       const gchar *method = 0;
 
-       dbg("Entry");
+       dbg("Func Entrance ");
 
-       telephony_ss_call_set_cli_finish(handle->ss_proxy, (int *)&result, res, &error);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(info, TAPI_API_INVALID_PTR);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-}
+       param = g_variant_new("(i)", info->Class);
 
-EXPORT_API TelReturn tapi_ss_set_cli(TelHandle *handle,
-       const TelSsCliInfo *cli_info,
-       TapiResponseCb callback, void *user_data)
-{
-       TapiRespCbData *rsp_cb_data = NULL;
-       int cli_status;
+       if ( info->Mode == TAPI_SS_CW_MODE_ACTIVATE ) {
+               msg("[ check ] waiting activate");
+               method = "ActivateWaiting";
+       } else {
+               msg("[ check ] waiting deactivate");
+               method = "DeactivateWaiting";
+       }
 
-       dbg("Entry");
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
+                       method, param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_get_ss_waiting_status, evt_cb_data );
 
-       TEL_RETURN_IF_CHECK_FAIL(handle
-               && callback && cli_info
-               && __tapi_check_and_get_cli_status(cli_info, &cli_status),
-               TEL_RETURN_INVALID_PARAMETER);
+       return TAPI_API_SUCCESS;
+}
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+/**********************************************************************************************
+ *
+ * This function is used to interrogate the status of call waiting feature.
+ *
+ * @param      CallType[IN] of type TelSsCallType_t which specifies the telecommunication service .
+ * @return     enum type TapiResult_t Specifies the API's Return result.
+ * @remark
+ *
+ ***********************************************************************************************/
 
-       telephony_ss_call_set_cli(handle->ss_proxy,
-               cli_info->type, cli_status, NULL,
-               on_response_ss_set_cli, rsp_cb_data);
+EXPORT_API int tel_get_ss_waiting_status(TapiHandle *handle, const TelSsClass_t class, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
 
-       return TEL_RETURN_SUCCESS;
-}
+       dbg("Func Entrance ");
 
-static void on_response_ss_get_cli_status(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
-{
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSsResult result = TEL_SS_RESULT_FAILURE;
-       TelSsCliResp cli_resp = {0, };
-       int net_status;
-       int dev_status;
-       GError *error = NULL;
-
-       dbg("Entry");
-
-       telephony_ss_call_get_cli_status_finish(handle->ss_proxy,
-               (int *)&result, (int *)(&(cli_resp.type)), &net_status, &dev_status,
-               res, &error);
-
-       CHECK_DEINIT(error, rsp_cb_data, result);
-
-       if (result != TEL_SS_RESULT_SUCCESS) {
-               err("Failed to get CLI status: %d", result);
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-               return;
-       }
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_PTR);
 
-       switch (cli_resp.type) {
-       case TEL_SS_CLI_CLIR:
-               cli_resp.status.clir.net_status = (TelSsClirNetworkStatus)net_status;
-               cli_resp.status.clir.dev_status = (TelSsClirDeviceStatus)dev_status;
-       break;
-       case TEL_SS_CLI_CLIP:
-               cli_resp.status.clip.net_status = (TelSsCliNetworkStatus)net_status;
-               cli_resp.status.clip.dev_status = (TelSsCliDeviceStatus)dev_status;
-       break;
-       case TEL_SS_CLI_COLP:
-               cli_resp.status.colp.net_status = (TelSsCliNetworkStatus)net_status;
-               cli_resp.status.colp.dev_status = (TelSsCliDeviceStatus)dev_status;
-       break;
-       case TEL_SS_CLI_COLR:
-               cli_resp.status.colr.net_status = (TelSsCliNetworkStatus)net_status;
-               cli_resp.status.colr.dev_status = (TelSsCliDeviceStatus)dev_status;
-       break;
-       case TEL_SS_CLI_CDIP:
-               cli_resp.status.cdip.net_status = (TelSsCliNetworkStatus)net_status;
-               cli_resp.status.cdip.dev_status = (TelSsCliDeviceStatus)dev_status;
-       break;
-       case TEL_SS_CLI_CNAP:
-               cli_resp.status.cnap.net_status = (TelSsCliNetworkStatus)net_status;
-               cli_resp.status.cnap.dev_status = (TelSsCliDeviceStatus)dev_status;
-       break;
-       default :
-               result = TEL_SS_RESULT_FAILURE;
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-               return;
-       }
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(i)", class);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
+                       "GetWaitingStatus", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_get_ss_waiting_status, evt_cb_data );
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, &cli_resp);
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_ss_get_cli_status(TelHandle *handle,
-       TelSsCliType type,
-       TapiResponseCb callback, void *user_data)
+/**********************************************************************************************
+ *
+ * This function is used to set the status of CLI services feature.
+ *
+ * @param      CliType[IN] of type TelSsCliType_t which specifies the CLI service .
+ * @return     enum type TapiResult_t Specifies the API's Return result.
+ * @remark
+ *
+ ***********************************************************************************************/
+EXPORT_API int tel_set_ss_cli_status(TapiHandle *handle, TelSsCliType_t type, TelSsCliStatus_t status, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = NULL;
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       msg("set cli type:[%d] status:[%d]", type, status);
 
-       dbg("Entry");
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_PTR);
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback
-               && __tapi_check_cli_type(type), TEL_RETURN_INVALID_PARAMETER);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       param = g_variant_new("(ii)", type, status);
 
-       telephony_ss_call_get_cli_status(handle->ss_proxy,
-               type, NULL, on_response_ss_get_cli_status, rsp_cb_data);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
+                       "SetCLIStatus", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_set_ss_cli_status, evt_cb_data );
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
 
-static void on_response_ss_send_ussd_request(GObject *source_object,
-       GAsyncResult *res, gpointer user_data)
+/**********************************************************************************************
+ *
+ * This function is used to interrogate the status of CLI services feature.
+ *
+ * @param      CliType[IN] of type TelSsCliType_t which specifies the CLI service .
+ * @return     enum type TapiResult_t Specifies the API's Return result.
+ * @remark
+ *
+ ***********************************************************************************************/
+EXPORT_API int tel_get_ss_cli_status(TapiHandle *handle, TelSsCliType_t type, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = user_data;
-       TelHandle *handle = GET_TAPI_HANDLE(rsp_cb_data);
-       TelSsResult result = TEL_SS_RESULT_FAILURE;
-       TelSsUssdResp ussd_resp = {0, };
-       GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
 
-       dbg("Entry");
+       dbg("Func Entrance ");
 
-       telephony_ss_call_send_ussd_request_finish(handle->ss_proxy,
-               (int *)&result, (int *)(&(ussd_resp.type)), (int *)(&(ussd_resp.status)),
-               (gchar **)&(ussd_resp.str), res, &error);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(callback, TAPI_API_INVALID_PTR);
 
-       CHECK_DEINIT(error, rsp_cb_data, result);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       if (result != TEL_SS_RESULT_SUCCESS) {
-               g_free(ussd_resp.str);
-               err("USSD request failed: %d", result);
-               RESP_CALLBACK_CALL(rsp_cb_data, result, NULL);
-               return;
-       }
+       param = g_variant_new("(i)", type);
 
-       RESP_CALLBACK_CALL(rsp_cb_data, result, &ussd_resp);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
+                       "GetCLIStatus", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, TAPI_DEFAULT_TIMEOUT, handle->ca,
+                       on_response_get_ss_cli_status, evt_cb_data );
 
-       g_free(ussd_resp.str);
+       return TAPI_API_SUCCESS;
 }
 
-EXPORT_API TelReturn tapi_ss_send_ussd_request(TelHandle *handle,
-       const TelSsUssdInfo *ussd_request,
-       TapiResponseCb callback, void *user_data)
+/**********************************************************************************************
+ *
+ * This function is used to send a USSD string and also the User response for a NW intiated USSD.
+ *
+ * @param      pAppMsg[IN] of type TelSsUssdMsgInfo_t which specifies the USSD String,length of the string, format of the string.
+ * @return     enum type TapiResult_t Specifies the API's Return result.
+ * @remark     TelSsUssdMsgInfo_t ->IndType is not used while calling this function, This is used for sending the response.
+ *                     Limo standard defines only one structure for Request and response.
+ *
+ ***********************************************************************************************/
+EXPORT_API int tel_send_ss_ussd_request(TapiHandle *handle, const TelSsUssdMsgInfo_t *info, tapi_response_cb callback, void *user_data)
 {
-       TapiRespCbData *rsp_cb_data = NULL;
-
-       dbg("Entry");
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
 
-       TEL_RETURN_IF_CHECK_FAIL(handle && callback
-               && ussd_request && __tapi_check_ussd_type(ussd_request->type)
-               && __tapi_check_ussd_string(ussd_request->str),
-               TEL_RETURN_INVALID_PARAMETER);
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(info, TAPI_API_INVALID_PTR);
 
-       MAKE_RESP_CB_DATA(rsp_cb_data, handle, callback, user_data);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
-       telephony_ss_call_send_ussd_request(handle->ss_proxy,
-               ussd_request->type, (const gchar *)ussd_request->str, NULL,
-               on_response_ss_send_ussd_request, rsp_cb_data);
+       param = g_variant_new("(iiis)", info->Type, info->Dcs, info->Length, info->szString);
+       msg("ussd type:[%d] length:[%d]", info->Type, info->Length);
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
+                       "SendUSSD", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, G_MAXINT, handle->ca,
+                       on_response_send_ss_ussd_request, evt_cb_data );
 
-       return TEL_RETURN_SUCCESS;
+       return TAPI_API_SUCCESS;
 }
-/*     EOF  */
diff --git a/tapi-3.0.pc.in b/tapi-3.0.pc.in
deleted file mode 100644 (file)
index abef914..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@PREFIX@
-exec_prefix=@EXEC_PREFIX@
-libdir=@LIBDIR@
-includedir=@INCLUDEDIR@
-
-Name: tapi
-Description: Telephony client API library
-Requires: glib-2.0
-Version: @TAPI_VERSION@
-Libs: -L${libdir} -ltapi-3.0
-Cflags: -I${includedir}/tapi-3.0 -I${includedir}/tel-headers/include
diff --git a/tapi.pc.in b/tapi.pc.in
new file mode 100644 (file)
index 0000000..f4cc802
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=@PREFIX@
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: TAPI Library
+Description: Telephony DBUS Client
+Requires: glib-2.0 gobject-2.0
+Version: 0.1
+Libs: -L${libdir} -lSLP-tapi
+Cflags: -I${includedir}/telephony-client
index 2ff5459578517c5d11a53cdc15b458601adfc49d..c488c70e93a7b824d00612bcc3ac617b09432439 100644 (file)
@@ -9,14 +9,14 @@ SET(tapitest
        sim.c
        sms.c
        sms_util.c
+       sms_util_cdma.c
        phonebook.c
        modem.c
        ss.c
        call.c
-       gps.c
 )
 
 ADD_EXECUTABLE(tapitest ${tapitest})
-TARGET_LINK_LIBRARIES(tapitest ${pkgs_LDFLAGS} "-L${CMAKE_BINARY_DIR} -ltapi-3.0")
+TARGET_LINK_LIBRARIES(tapitest ${pkgs_LDFLAGS} "-L${CMAKE_BINARY_DIR} -lSLP-tapi")
 INSTALL(TARGETS tapitest RUNTIME DESTINATION bin/)
-ADD_DEPENDENCIES(tapitest tapi-3.0)
+ADD_DEPENDENCIES(tapitest SLP-tapi)
old mode 100755 (executable)
new mode 100644 (file)
index 15acae6..ca35ec7
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <sys/time.h>
 #include <unistd.h>
 #include <glib.h>
-#include <glib-object.h>
-#include <tapi.h>
-#include <tapi_call.h>
-#include <tapi_events.h>
+
+#include <tapi_common.h>
+#include <TelCall.h>
+#include <ITapiCall.h>
+#include <TapiUtility.h>
+
 #include "menu.h"
 #include "call.h"
 
-#define CHECK_RESULT(result) \
-{\
-       if (result < TEL_CALL_RESULT_SUCCESS || result > TEL_CALL_RESULT_OPERATION_NOT_PERMITTED) { \
-               msg("API failed with result : %d", result); \
-               return; \
-       } else { \
-               msg("Result[%d] :[%s] ", result, dbg_call_result[result]); \
-       } \
-       if (result != TEL_CALL_RESULT_SUCCESS) \
-               return;\
-}
-
-static char* dbg_call_result[] = {
-       "TEL_CALL_RESULT_SUCCESS",
-       "TEL_CALL_RESULT_FAILURE",
-       "TEL_CALL_RESULT_INVALID_PARAMETER",
-       "TEL_CALL_RESULT_MEMORY_FAILURE",
-       "TEL_CALL_RESULT_OPERATION_NOT_SUPPORTED",
-       "TEL_CALL_RESULT_FDN_RESTRICTED",
-       "TEL_CALL_RESULT_NETWORK_BUSY",
-       "TEL_CALL_RESULT_SERVICE_NOT_ALLOWED",
-       "TEL_CALL_RESULT_OPERATION_NOT_PERMITTED"
-       };
-
+static char data_call_id[MENU_DATA_SIZE + 1] = "1";
+static char data_call_id2[MENU_DATA_SIZE + 1] = "2";
 static char data_call_type[MENU_DATA_SIZE + 1] = "0";
-static char data_call_ecc[MENU_DATA_SIZE + 1] = "0";
+static char data_dtmf_digit[MENU_DATA_SIZE + 1] = "1";
+static char data_dtmf_string[MENU_DATA_SIZE + 1] = "12345";
+static char data_dtmf_pulse_width[MENU_DATA_SIZE + 1] = "1";
+static char data_dtmf_inter_digit_interval[MENU_DATA_SIZE + 1] = "1";
 static char data_call_number[MENU_DATA_SIZE + 1] = "+821099777347";
-
 static char data_answer_type[MENU_DATA_SIZE + 1] = "1";
-
-static char data_call_id[MENU_DATA_SIZE + 1] = "1";
 static char data_end_type[MENU_DATA_SIZE + 1] = "1";
-
-static char data_dtmf_string[MENU_DATA_SIZE + 1] = "1";
-
-static char data_call_active_line_type[MENU_DATA_SIZE + 1] = "1";
-
+static char data_mute_path[MENU_DATA_SIZE + 1] = "0";
+static char data_mute_status[MENU_DATA_SIZE + 1] = "0";
 static char data_vol_device[MENU_DATA_SIZE + 1] = "0";
+static char data_vol_type[MENU_DATA_SIZE + 1] = "1";
 static char data_vol_level[MENU_DATA_SIZE + 1] = "1";
+static char data_sound_path[MENU_DATA_SIZE + 1] = "1";
+static char data_extra_volume_status[MENU_DATA_SIZE + 1] = "0";
+static char data_call_privacy_mode[MENU_DATA_SIZE + 1] = "0";
+static char data_preferred_voice_subscription[MENU_DATA_SIZE + 1] = "0";
 
-static char data_call_sound_path[MENU_DATA_SIZE + 1] = "0";
-static char data_sound_ex_volume[MENU_DATA_SIZE + 1] = "0";
+static void on_noti_call_status_idle(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       TelCallStatusIdleNoti_t *noti_data = (TelCallStatusIdleNoti_t*)data;
 
-static char data_mute_status[MENU_DATA_SIZE + 1] = "0";
+       msg("");
+       msgb("event(%s) receive !!", TAPI_NOTI_VOICE_CALL_STATUS_IDLE);
 
-static char data_sound_recording_status[MENU_DATA_SIZE + 1] = "0";
+       if (!noti_data)
+               return;
 
-static char data_sound_equalization_mode[MENU_DATA_SIZE + 1] = "0";
-static char data_sound_direction[MENU_DATA_SIZE + 1] = "0";
-/* To be implemented later
-static char data_sound_equalization_parameter[MENU_DATA_SIZE + 1] = "0";  */
+       msg(" - id = %d", noti_data->id);
+       msg(" - cause = 0x%x", noti_data->cause);
+}
 
-static void on_noti_call_status_idle(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+static void on_noti_call_status_active(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       TelCallStatusIdleNoti *noti_data = data;
+       TelCallStatusActiveNoti_t *noti_data = (TelCallStatusActiveNoti_t*)data;
 
-       if (g_strcmp0(noti_id, TEL_NOTI_VOICE_CALL_STATUS_IDLE) == 0) {
-               msg("Event (%s) received !!", TEL_NOTI_VOICE_CALL_STATUS_IDLE);
-       } else if (g_strcmp0(noti_id, TEL_NOTI_VIDEO_CALL_STATUS_IDLE) == 0) {
-               msg("Event (%s) received !!", TEL_NOTI_VIDEO_CALL_STATUS_IDLE);
-       } else {
-               msg("Unregistered Event recieved!!");
-               return;
-       }
-
-       if (noti_data) {
-               msg(" id = %d", noti_data->call_id);
-               msg(" cause = %d", noti_data->cause);
-       } else {
-               msg("Call Noti data is NULL.");
-       }
+       msg("");
+       msgb("event(%s) receive !!", TAPI_NOTI_VOICE_CALL_STATUS_ACTIVE);
 
+       if (!noti_data)
+               return;
 
+       msg(" - id = %d", noti_data->id);
 }
 
-static void on_noti_call_status(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+static void on_noti_call_status_held(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       int *call_id = data;
+       TelCallStatusHeldNoti_t *noti_data = (TelCallStatusHeldNoti_t*)data;
 
-       msg("Event (%s) recieved !!", noti_id);
+       msg("");
+       msgb("event(%s) receive !!", TAPI_NOTI_VOICE_CALL_STATUS_HELD);
 
-       if (call_id) {
-               msg("call id = %d", *call_id);
-       } else {
-               msg("Call Noti data is NULL.");
-       }
+       if (!noti_data)
+               return;
+
+       msg(" - id = %d", noti_data->id);
 }
 
-static void on_noti_call_sound_ringback_tone(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+static void on_noti_call_status_dialing(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       TelCallSoundRingbackToneNoti *noti_data = data;
+       TelCallStatusDialingNoti_t *noti_data = (TelCallStatusDialingNoti_t*)data;
+
+       msg("");
+       msgb("event(%s) receive !!", TAPI_NOTI_VOICE_CALL_STATUS_DIALING);
 
-       if (g_strcmp0(noti_id, TEL_NOTI_CALL_SOUND_RINGBACK_TONE) == 0) {
-               msg("Event (%s) received !!", TEL_NOTI_CALL_SOUND_RINGBACK_TONE);
-       } else {
-               msg("Unregistered Event recieved!!");
+       if (!noti_data)
                return;
-       }
 
-       if (noti_data) {
-               msg(" Sound Ring-Back Tone - %s", (*noti_data == TEL_CALL_SOUND_RINGBACK_TONE_START) ? "START" : "END");
-       } else {
-               msg("Call Sound Ringback Noti data is NULL");
-       }
+       msg(" - id = %d", noti_data->id);
 }
 
-static void on_noti_call_sound_wbamr(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+static void on_noti_call_status_alert(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       TelCallSoundWbamrNoti *noti_data = data;
+       TelCallStatusAlertNoti_t *noti_data = (TelCallStatusAlertNoti_t*)data;
 
-       if (g_strcmp0(noti_id, TEL_NOTI_CALL_SOUND_WBAMR) == 0) {
-               msg("Event (%s) received !!", TEL_NOTI_CALL_SOUND_WBAMR);
-       } else {
-               msg("Unregistered Event recieved!!");
+       msg("");
+       msgb("event(%s) receive !!", TAPI_NOTI_VOICE_CALL_STATUS_ALERT);
+
+       if (!noti_data)
                return;
-       }
 
-       if (noti_data) {
-               msg(" AMR-WB status - %s", (*noti_data == TEL_CALL_SOUND_WBAMR_STATUS_OFF) ? "OFF" : "ON");
-       } else {
-               msg("Call Sound AMR-WB Noti data is NULL");
-       }
+       msg(" - id = %d", noti_data->id);
 }
 
-static void on_noti_call_sound_equalization(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+static void on_noti_call_status_incoming(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       TelCallSoundEqualizationNoti *noti_data = data;
+       TelCallStatusIncomingNoti_t *noti_data = (TelCallStatusIncomingNoti_t*)data;
+
+       msg("");
+       msgb("event(%s) receive !!", TAPI_NOTI_VOICE_CALL_STATUS_INCOMING);
 
-       if (g_strcmp0(noti_id, TEL_NOTI_CALL_SOUND_EQUALIZATION) == 0) {
-               msg("Event (%s) received !!", TEL_NOTI_CALL_SOUND_EQUALIZATION);
-       } else {
-               msg("Unregistered Event recieved!!");
+       if (!noti_data)
                return;
-       }
 
-       if (noti_data) {
-               msg(" mode = %d", noti_data->mode);
-               msg(" direction = %d", noti_data->direction);
-       } else {
-               msg("Call Sound Equalization Noti data is NULL");
-       }
+       msg(" - id = %d", noti_data->id);
 }
 
-static void on_noti_call_sound_clock_status(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+static void on_noti_call_sound_ringback_tone(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       gboolean *clock_status = data;
+       TelCallSoundRingbackToneNoti_t *noti_data = (TelCallSoundRingbackToneNoti_t*)data;
 
-       if (g_strcmp0(noti_id, TEL_NOTI_CALL_SOUND_CLOCK_STATUS) == 0) {
-               msg("Event (%s) received !!", TEL_NOTI_CALL_SOUND_CLOCK_STATUS);
-       } else {
-               msg("Unregistered Event recieved!!");
+       msg("");
+       msgb("event(%s) receive !!", TAPI_NOTI_CALL_SOUND_RINGBACK_TONE);
+
+       if (!noti_data)
                return;
-       }
 
-       if (clock_status) {
-               msg("clock_status[%d]", *clock_status);
-       } else {
-               msg("Call Sound Clock Status notification data is null");
-       }
+       msg(" - Ringback tone status = 0x%x", *noti_data);
 }
 
-static void on_dial_call(TelHandle *handle, int result, void *data, void *user_data)
+static void on_noti_call_sound_wbamr(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       msg("on_dial_call :");
-       CHECK_RESULT(result);
+       gboolean *noti_data = (gboolean*)data;
+
+       msg("");
+       msgb("event(%s) receive !!", TAPI_NOTI_CALL_SOUND_WBAMR);
+
+       if (!noti_data)
+               return;
+
+       msg(" - status = 0x%x", *noti_data);
 }
 
-static int run_call_dial(MManager *mm, struct menu_data *menu)
+static void on_noti_call_preferred_voice_subscription(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelCallDial call_dial_info;
-       TelReturn result;
+       TelCallPreferredVoiceSubsNoti_t *noti_data = (TelCallPreferredVoiceSubsNoti_t *)data;
 
-       memset(&call_dial_info, '\0', sizeof(TelCallDial));
+       msg("");
+       msgb("event(%s) receive !!", TAPI_NOTI_CALL_PREFERRED_VOICE_SUBSCRIPTION);
 
-       call_dial_info.call_type = atoi(data_call_type);
-       call_dial_info.ecc = atoi(data_call_ecc);
-       memcpy(call_dial_info.number, data_call_number, TEL_CALL_CALLING_NUMBER_LEN_MAX + 1);
+       if (!noti_data)
+               return;
+
+       msg(" - preferred_subscription = 0x%x", noti_data->preferred_subs);
+}
+
+static void on_noti_call_sound_path(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       TelSoundPath_t *noti_data = (TelSoundPath_t *)data;
 
-       msg("call type : (%d)", call_dial_info.call_type);
-       msg("emergency call category : (%d)", call_dial_info.ecc);
-       msg("phone number : (%s)", call_dial_info.number);
+       msg("");
+       msgb("event(%s) receive !!", TAPI_NOTI_CALL_SOUND_PATH);
 
-       msg("call tapi_call_dial()");
+       if (!noti_data)
+               return;
 
-       result = tapi_call_dial(handle, &call_dial_info, on_dial_call, 0);
-       CHECK_RT(result);
-       return 0;
+       msg(" - Sound path = 0x%x", *noti_data);
 }
 
-static void on_answer_call(TelHandle *handle, int result, void *data, void *user_data)
+static void on_noti_call_on_hold(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       msg("on_answer_call :");
-       CHECK_RESULT(result);
+       unsigned int *noti_data = (unsigned int*)data;
+
+       msg("");
+       msgb("event(%s) receive !!", TAPI_NOTI_CALL_INFO_HELD);
+
+       if (!noti_data)
+               return;
+
+       msg(" - ID = %d", *noti_data);
 }
 
-static int run_call_answer(MManager *mm, struct menu_data *menu)
+static void on_noti_call_active(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result;
-       TelCallAnswerType ans_type;
-
-       ans_type = atoi(data_answer_type);
+       unsigned int *noti_data = (unsigned int*)data;
 
-       msg("answer type : (%d)", ans_type);
+       msg("");
+       msgb("event(%s) receive !!", TAPI_NOTI_CALL_INFO_ACTIVE);
 
-       msg("call tapi_call_answer()");
+       if (!noti_data)
+               return;
 
-       result = tapi_call_answer(handle, ans_type, on_answer_call, 0);
-       CHECK_RT(result);
-       return 0;
+       msg(" - ID = %d", *noti_data);
 }
 
-static void on_end_call(TelHandle *handle, int result, void *data, void *user_data)
+static void on_noti_call_joined(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       msg("on_end_call :");
-       CHECK_RESULT(result);
+       unsigned int *noti_data = (unsigned int*)data;
+
+       msg("");
+       msgb("event(%s) receive !!", TAPI_NOTI_CALL_INFO_JOINED);
+
+       if (!noti_data)
+               return;
+
+       msg(" - ID = %d", *noti_data);
 }
 
-static int run_call_end(MManager *mm, struct menu_data *menu)
+static void on_noti_call_privacy_mode(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result;
-       TelCallEnd call_end_info;
+       TelCallVoicePrivacyNoti_t *noti_data = (TelCallVoicePrivacyNoti_t*)data;
+
+       msg("");
+       msgb("event(%s) receive !!", TAPI_NOTI_CALL_PRIVACY_MODE);
+
+       if (!noti_data)
+               return;
 
-       memset(&call_end_info, '\0', sizeof(TelCallEnd));
+       msg(" Privacy Mode = %d", noti_data->privacy_mode);
+}
 
-       call_end_info.call_id = atoi(data_call_id);
-       call_end_info.end_type = atoi(data_end_type);
+static void on_noti_call_otasp_status(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       TelCallOtaspStatusNoti_t *noti_data = (TelCallOtaspStatusNoti_t*)data;
 
-       msg("call id : (%d)", call_end_info.call_id);
-       msg("call end type : (%d)", call_end_info.end_type);
+       msg("");
+       msgb("event(%s) receive !!", TAPI_NOTI_CALL_OTASP_STATUS);
 
-       msg("call tapi_call_end()");
+       if (!noti_data)
+               return;
 
-       result = tapi_call_end(handle, &call_end_info, on_end_call, 0);
-       CHECK_RT(result);
-       return 0;
+       msg(" OTASP Status = %d", noti_data->otasp_status);
 }
 
-static void on_send_dtmf_call(TelHandle *handle, int result, void *data, void *user_data)
+static void on_noti_call_signal_info(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       msg("on_send_DTMF_call :");
-       CHECK_RESULT(result);
+       TelCallSignalInfoNoti_t *noti_data = (TelCallSignalInfoNoti_t*)data;
+
+       msg("");
+       msgb("event(%s) receive !!", TAPI_NOTI_CALL_SIGNAL_INFO);
+
+       if (!noti_data)
+               return;
+       if (noti_data->signal_type == TAPI_CALL_SIGNAL_TYPE_TONE) {
+               msg(" Signal type = 0x%x, Pitch Type =0x%x, Signal = %d", noti_data->signal_type, noti_data->pitch_type, noti_data->signal.sig_tone_type);
+       } else if (noti_data->signal_type == TAPI_CALL_SIGNAL_TYPE_ISDN_ALERTING) {
+               msg(" Signal type = 0x%x, Pitch Type =0x%x, Signal = %d", noti_data->signal_type, noti_data->pitch_type, noti_data->signal.sig_isdn_alert_type);
+       } else if (noti_data->signal_type == TAPI_CALL_SIGNAL_TYPE_IS54B_ALERTING) {
+               msg(" Signal type = 0x%x, Pitch Type =0x%x, Signal = %d", noti_data->signal_type, noti_data->pitch_type, noti_data->signal.sig_is54b_alert_type);
+       }
 }
 
-static int run_call_send_dtmf(MManager *mm, struct menu_data *menu)
+static void on_noti_call_otapa_status(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result;
-       const char *str = data_dtmf_string;
+       TelCallOtapaStatusNoti_t *noti_data = (TelCallOtapaStatusNoti_t*)data;
 
-       msg("DTMF string : (%s)", str);
+       msg("");
+       msgb("event(%s) receive !!", TAPI_NOTI_CALL_OTAPA_STATUS);
 
-       msg("call tapi_call_send_dtmf()");
+       if (!noti_data)
+               return;
 
-       result = tapi_call_send_dtmf(handle, str, on_send_dtmf_call, 0);
-       CHECK_RT(result);
-       return 0;
+       msg(" OTAPA Status = %d", noti_data->otapa_status);
 }
 
-static void on_hold_call(TelHandle * handle, int result, void *data, void *user_data)
+static void on_dial_call(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       msg("on_hold_call :");
-       CHECK_RESULT(result);
+       msg("on_dial_call() - result : 0x%x", result);
 }
 
-static int run_call_hold(MManager * mm, struct menu_data * menu)
+static void on_answer_call(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result;
+       TelCallAnswerCnf_t *cnf_data = (TelCallAnswerCnf_t*)data;
 
-       msg("call tapi_call_hold()");
+       msg("on_answer_call() - cnf_data->id : %d", cnf_data->id);
+}
+
+static void on_end_call(TapiHandle *handle, int result, void *data, void *user_data)
+{
+       TelCallEndCnf_t *cnf_data = (TelCallEndCnf_t*)data;
 
-       result = tapi_call_hold(handle, on_hold_call, 0);
-       CHECK_RT(result);
-       return 0;
+       msg("on_end_call() - cnf_data->id : %d result : 0x%x", cnf_data->id, result);
 }
 
-static void on_active_call(TelHandle * handle, int result, void *data, void *user_data)
+static void on_hold_call(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       msg("on_active_call :");
-       CHECK_RESULT(result);
+       TelCallHoldCnf_t *cnf_data = (TelCallHoldCnf_t*)data;
+
+       msg("on_hold_call() - cnf_data->id : %d result : 0x%x", cnf_data->id, result);
 }
 
-static int run_call_active(MManager * mm, struct menu_data * menu)
+static void on_active_call(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result;
+       TelCallActiveCnf_t *cnf_data = (TelCallActiveCnf_t*)data;
 
-       msg("call tapi_call_active()");
+       msg("on_active_call() - cnf_data->id : %d result : 0x%x", cnf_data->id, result);
+}
+
+static void on_swap_call(TapiHandle *handle, int result, void *data, void *user_data)
+{
+       TelCallSwapCnf_t *cnf_data = (TelCallSwapCnf_t*)data;
 
-       result = tapi_call_active(handle, on_active_call, 0);
-       CHECK_RT(result);
-       return 0;
+       msg("on_swap_call() - cnf_data->id : %d result : 0x%x", cnf_data->id, result);
 }
 
-static void on_swap_call(TelHandle * handle, int result, void *data, void *user_data)
+static void on_join_call(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       msg("on_swap_call :");
-       CHECK_RESULT(result);
+       TelCallJoinCnf_t *cnf_data = (TelCallJoinCnf_t*)data;
+
+       msg("on_join_call() - cnf_data->id : %d result : 0x%x", cnf_data->id, result);
 }
 
-static int run_call_swap(MManager * mm, struct menu_data * menu)
+static void on_split_call(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result;
+       TelCallSplitCnf_t *cnf_data = (TelCallSplitCnf_t*)data;
 
-       msg("call tapi_call_swap()");
+       msg("on_split_call() - cnf_data->id : %d result : 0x%x", cnf_data->id, result);
+}
+
+static void on_transfer_call(TapiHandle *handle, int result, void *data, void *user_data)
+{
+       TelCallTransferCnf_t *cnf_data = (TelCallTransferCnf_t*)data;
 
-       result = tapi_call_swap(handle, on_swap_call, 0);
-       CHECK_RT(result);
-       return 0;
+       msg("on_transfer_call() - cnf_data->id : %d result : 0x%x", cnf_data->id, result);
 }
 
-static void on_join_call(TelHandle * handle, int result, void *data, void *user_data)
+static void on_start_cont_dtmf_call(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       msg("on_join_call :");
-       CHECK_RESULT(result);
+       msg("on_start_cont_dtmf_call() result : 0x%x", result);
 }
 
-static int run_call_join(MManager * mm, struct menu_data * menu)
+static void on_stop_cont_dtmf_call(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result;
+       msg("on_stop_cont_dtmf_call() result : 0x%x", result);
+}
 
-       msg("call tapi_call_join()");
+static void on_send_burst_dtmf_call(TapiHandle *handle, int result, void *data, void *user_data)
+{
+       msg("on_send_burst_dtmf_call() result : 0x%x", result);
+}
 
-       result = tapi_call_join(handle, on_join_call, 0);
-       CHECK_RT(result);
-       return 0;
+static void on_call_set_mute_status(TapiHandle *handle, int result, void *data, void *user_data)
+{
+       msg("on_call_set_mute_status() - result : 0x%x", result);
 }
 
-static void on_split_call(TelHandle * handle, int result, void *data, void *user_data)
+static void on_call_get_mute_status(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       msg("on_split_call :");
-       CHECK_RESULT(result);
+       TelCallGetMuteStatusResp_t *resp = (TelCallGetMuteStatusResp_t *)data;
+
+       msg("on_call_get_mute_status() - result : 0x%x", result);
+       msg("on_call_get_mute_status() - path : 0x%x", resp->path);
+       msg("on_call_get_mute_status() - status : 0x%x", resp->status);
 }
 
-static int run_call_split(MManager *mm, struct menu_data *menu)
+static void on_call_set_volume_info(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result;
-       int call_id;
+       msg("on_call_set_volume_info() - result : 0x%x", result);
+}
 
-       call_id = atoi(data_call_id);
+static void on_call_get_volume_info(TapiHandle *handle, int result, void *data, void *user_data)
+{
+       unsigned int i = 0;
+       TelCallGetVolumeInfoResp_t *resp = (TelCallGetVolumeInfoResp_t *)data;
 
-       msg("split call Id : (%d)", call_id);
+       msg("on_call_get_volume_info() - result : 0x%x", result);
+       msg("on_call_get_volume_info() - record_num : 0x%x", resp->record_num);
 
-       msg("call tapi_call_split()");
+       for ( i=0; i<resp->record_num; i++ ) {
+               msg("on_call_get_volume_info() - record[%d].device : 0x%x", (i+1), resp->record[i].device);
+               msg("on_call_get_volume_info() - record[%d].type : 0x%x", (i+1), resp->record[i].device);
+               msg("on_call_get_volume_info() - record[%d].volume : 0x%x", (i+1), resp->record[i].volume);
 
-       result = tapi_call_split(handle, call_id, on_split_call, 0);
-       CHECK_RT(result);
-       return 0;
+       }
 }
 
-static void on_transfer_call(TelHandle * handle, int result, void *data, void *user_data)
+static void on_call_set_sound_path(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       msg("on_transfer_call :");
-       CHECK_RESULT(result);
+       msg("on_call_set_sound_path() - result : 0x%x", result);
 }
 
-static int run_call_transfer(MManager * mm, struct menu_data * menu)
+static void on_call_set_preferred_voice_subscription(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result;
+       msg("on_call_set_preferred_voice_subscription() - result : 0x%x", result);
+}
 
-       msg("call tapi_call_transfer()");
+static void on_call_get_privacy_mode(TapiHandle *handle, int result, void *data, void *user_data)
+{
+       TelCallGetPrivacyModeResp_t *resp_data = (TelCallGetPrivacyModeResp_t *) data;
+       msg("on_call_get_privacy_mode() result : 0x%x, mode 0x%x", result, resp_data->mode);
+}
 
-       result = tapi_call_transfer(handle, on_transfer_call, 0);
-       CHECK_RT(result);
-       return 0;
+static void on_call_set_privacy_mode(TapiHandle *handle, int result, void *data, void *user_data)
+{
+       msg("on_call_set_privacy_mode() result : 0x%x", result);
 }
 
-static void on_deflect_call(TelHandle * handle, int result, void *data, void *user_data)
+static int run_call_dial(MManager *mm, struct menu_data *menu)
 {
-       msg("on_deflect_call :");
-       CHECK_RESULT(result);
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       TelCallDial_t data;
+       int result;
+       int len;
+
+       memset(&data, 0, sizeof(TelCallDial_t));
+
+       data.CallType = atoi(data_call_type);
+       len = strlen(data_call_number);
+       if (len > TAPI_CALL_DIALDIGIT_LEN_MAX) {
+               msg("number too long");
+               return 0;
+       }
+
+       memcpy(data.szNumber, data_call_number, len);
+
+       msg("call tel_dail_call()");
+
+       result = tel_dial_call(handle, &data, on_dial_call, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
+
+       return result;
 }
 
-static int run_call_deflect(MManager * mm, struct menu_data * menu)
+static int run_call_answer(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result;
-       const char *number = data_call_number;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+       unsigned int call_id;
+       TelCallAnswerType_t answer_type;
+
 
-       msg("call deflect number : (%s)", number);
+       msg("call tel_answer_call()");
+
+       call_id = atoi(data_call_id);
+       answer_type = atoi(data_answer_type);
 
-       msg("call tapi_call_deflect()");
+       result = tel_answer_call(handle, call_id, answer_type, on_answer_call, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
 
-       result = tapi_call_deflect(handle, number, on_deflect_call, 0);
-       CHECK_RT(result);
-       return 0;
+       return result;
 }
 
-static void on_set_active_line_call(TelHandle * handle, int result, void *data, void *user_data)
+static int run_call_end(MManager *mm, struct menu_data *menu)
 {
-       msg("on_set_active_line_call :");
-       CHECK_RESULT(result);
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+       unsigned int call_id;
+       TelCallEndType_t end_type;
+
+       msg("call tel_end_call()");
+
+       call_id = atoi(data_call_id);
+       end_type = atoi(data_end_type);
+
+       result = tel_end_call(handle, call_id, end_type, on_end_call, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
+
+       return result;
 }
 
-static int run_call_set_active_line(MManager *mm, struct menu_data *menu)
+static int run_call_hold(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result;
-       TelCallActiveLine active_line;
+        TapiHandle *handle = menu_manager_ref_user_data(mm);
+        int result;
+        unsigned int call_id;
 
-       active_line = atoi(data_call_active_line_type);
+        msg("call tel_hold_call()");
 
-       msg("active line type : (%d)", active_line);
+        call_id = atoi(data_call_id);
+        result = tel_hold_call(handle, call_id, on_hold_call, NULL);
 
-       msg("call tapi_call_set_active_line()");
+        if (result != TAPI_API_SUCCESS) {
+                msg("failed. (result = %d)", result);
+        }
 
-       result = tapi_call_set_active_line(handle, active_line, on_set_active_line_call, 0);
-       CHECK_RT(result);
-       return 0;
+        return result;
 }
 
-static void on_get_active_line_call(TelHandle * handle, int result, void *data, void *user_data)
+static int run_call_join(MManager *mm, struct menu_data *menu)
 {
-       if (result < TEL_CALL_RESULT_SUCCESS || result > TEL_CALL_RESULT_OPERATION_NOT_PERMITTED) {
-               msg("Unidentified Result : %d", result);
-       } else {
-               msg("on_get_active_line_call() - result[%d] :[%s] ", result, dbg_call_result[result]);
-               if (result == TEL_CALL_RESULT_SUCCESS){
-                       TelCallActiveLine *act = data;
-                       msg("on_get_active_line_call() - active_line : %d", *act);
-               }
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+       unsigned int call_id;
+
+       msg("call tel_join_call()");
+
+       call_id = atoi(data_call_id);
+
+       result = tel_join_call(handle, call_id, 0, on_join_call, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
        }
+
+       return result;
 }
 
-static int run_call_get_active_line(MManager * mm, struct menu_data * menu)
+static int run_call_active(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result;
+        TapiHandle *handle = menu_manager_ref_user_data(mm);
+        int result;
+        unsigned int call_id;
+
+        msg("call tel_active_call()");
 
-       msg("call tapi_call_get_active_line()");
+        call_id = atoi(data_call_id);
+        result = tel_active_call(handle, call_id, on_active_call, NULL);
+        if (result != TAPI_API_SUCCESS) {
+                msg("failed. (result = %d)", result);
+        }
 
-       result = tapi_call_get_active_line(handle, on_get_active_line_call, 0);
-       CHECK_RT(result);
-       return 0;
+        return result;
 }
 
-static int run_call_get_status(MManager *mm, struct menu_data *menu)
+
+static int run_call_split(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result;
-       unsigned int call_id = 0;
-       TelCallStatus info;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+       unsigned int call_id;
 
-       memset(&info, '\0', sizeof(TelCallStatus));
+       msg("call tel_split_call()");
 
        call_id = atoi(data_call_id);
 
-       msg("call id : (%d)", call_id);
+       result = tel_split_call(handle, call_id, on_split_call, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
+
+       return result;
+}
+
+static int run_call_swap(MManager *mm, struct menu_data *menu)
+{
+        TapiHandle *handle = menu_manager_ref_user_data(mm);
+        int result;
+        unsigned int call_id;
+        unsigned int call_id2;
 
-       msg("call tapi_call_get_status()");
+        msg("call tel_swap_call()");
 
-       result = tapi_call_get_status(handle, call_id, &info);
-       CHECK_RT(result);
+        call_id = atoi(data_call_id);
+        call_id2 = atoi(data_call_id2);
+        result = tel_swap_call(handle, call_id, call_id2, on_swap_call, NULL);
 
-       msg("id = %d", info.call_id);
-       msg("type = %d", info.call_type);
-       msg("state = %d", info.call_state);
-       msg("mo_call = %d", info.mo_call);
-       msg("multiparty = %d", info.mpty);
-       msg("cli_validity = %d", info.cli_validity);
-       msg("number = %s", info.number);
-       msg("cni_validity= %d", info.cni_validity);
-       msg("forward = %d", info.forward);
-       msg("active_line = %d", info.active_line);
+        if (result != TAPI_API_SUCCESS) {
+                msg("failed. (result = %d)", result);
+        }
 
-       return 0;
+        return result;
 }
 
 
-static int run_call_get_status_all(MManager *mm, struct menu_data *menu)
+static int run_call_transfer(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result = 0;
-       unsigned int iter;
-       TelCallStatusList call_status_list;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+       unsigned int call_id;
 
-       memset(&call_status_list, '\0', sizeof(TelCallStatusList));
 
-       msg("call tapi_call_get_status_all()");
+       msg("call tel_transfer_call()");
 
-       result = tapi_call_get_status_all(handle, &call_status_list);
-       CHECK_RT(result);
-       msg("Total Call Results are [%d]", call_status_list.count);
+       call_id = atoi(data_call_id);
 
-       if (call_status_list.count<= TEL_CALL_MAX_CALLS_COUNT) {
-               for (iter = 0; iter < call_status_list.count; iter++) {
-                       msg("Call No. = %d", iter+1);
-                       msg("id = %d", call_status_list.status[iter].call_id);
-                       msg("type = %d", call_status_list.status[iter].call_type);
-                       msg("state = %d", call_status_list.status[iter].call_state);
-                       msg("mo_call = %d", call_status_list.status[iter].mo_call);
-                       msg("multiparty = %d", call_status_list.status[iter].mpty);
-                       msg("cli_validity = %d", call_status_list.status[iter].cli_validity);
-                       msg("number = %s", call_status_list.status[iter].number);
-                       msg("cni_validity= %d", call_status_list.status[iter].cni_validity);
-                       msg("name = %s", call_status_list.status[iter].name);
-                       msg("forward = %d", call_status_list.status[iter].forward);
-                       msg("active_line = %d", call_status_list.status[iter].active_line);
-                       msg("");
-               }
-       } else {
-                       msg("Call status list count exceeded max count : [%d]", call_status_list.count);
+       result = tel_transfer_call(handle, call_id, on_transfer_call, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
        }
-       return 0;
+
+       return result;
 }
 
-static void on_set_volume_info_call(TelHandle *handle, int result, void *data, void *user_data)
+static int run_call_start_cont_dtmf(MManager *mm, struct menu_data *menu)
 {
-       msg("on_set_volume_info_call :");
-       CHECK_RESULT(result);
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+
+       msg("call tel_start_call_cont_dtmf()");
+
+       result = tel_start_call_cont_dtmf(handle, data_dtmf_digit[0], on_start_cont_dtmf_call, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
+
+       return result;
 }
 
-static int run_call_set_volume_info(MManager *mm, struct menu_data *menu)
+static int run_call_stop_cont_dtmf(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result = 0;
-       TelCallVolumeInfo data;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
 
-       memset(&data, '\0', sizeof(TelCallVolumeInfo));
+       msg("call tel_stop_call_cont_dtmf()");
 
-       data.device = atoi(data_vol_device);
-       data.volume = atoi(data_vol_level);
+       result = tel_stop_call_cont_dtmf(handle, on_stop_cont_dtmf_call, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
 
-       msg("device : (%d)", data.device);
-       msg("volume : (%d)", data.volume);
+       return result;
+}
 
-       msg("call tapi_call_set_volume_info()");
+static int run_call_send_burst_dtmf(MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+       TelCallBurstDtmf_t info;
+       memset(&info, 0x0, sizeof(info));
+       g_strlcpy(info.dtmf_string, data_dtmf_string, TAPI_CALL_BURST_DTMF_STRING_MAX + 1);
+       info.pulse_width = data_dtmf_pulse_width[0];
+       info.inter_digit_interval = data_dtmf_inter_digit_interval[0];
+
+       msg("call tel_send_call_burst_dtmf()");
+
+       result = tel_send_call_burst_dtmf(handle, &info,on_send_burst_dtmf_call, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
 
-       result = tapi_call_set_volume_info(handle, &data, on_set_volume_info_call, 0);
-       CHECK_RT(result);
-       return 0;
+       return result;
 }
 
-static void on_get_volume_info_call(TelHandle *handle, int result, void *data, void *user_data)
+
+static void call_status_callback( TelCallStatus_t *status, void *user_data )
 {
-       if (result < TEL_CALL_RESULT_SUCCESS || result > TEL_CALL_RESULT_OPERATION_NOT_PERMITTED) {
-               msg("Unidentified Result : %d", result);
-       } else {
-               msg("on_get_volume_info_call() - result[%d] :[%s] ", result, dbg_call_result[result]);
-               if (result == TEL_CALL_RESULT_SUCCESS){
-                       int *volume = data;
-                       msg("on_get_volume_info_call() - volume : %d", *volume);
-               }
-       }
+
+       msg(" - id = %d", status->CallHandle);
+       msg(" - direction = %d", status->bMoCall);
+       msg(" - number = %s", status->pNumber);
+       msg(" - type = %d", status->CallType);
+       msg(" - state = %d", status->CallState);
+       msg(" - multiparty = %d", status->bConferenceState);
+
 }
 
-static int run_call_get_volume_info(MManager *mm, struct menu_data *menu)
+static int run_call_get_status(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result = 0;
-       TelCallSoundDevice device;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+       unsigned int call_id = 0;
+       TelCallStatus_t info;
+
+       msg("call tel_get_call_status()");
 
-       device = atoi(data_vol_device);
+       call_id = atoi(data_call_id);
 
-       msg("call sound device : (%d)", device);
+       result = tel_get_call_status(handle, call_id, &info);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+               return result ;
+       }
 
-       msg("call tapi_call_get_volume_info()");
+       msg(" - id = %d", info.CallHandle);
+       msg(" - direction = %d", info.bMoCall);
+       msg(" - number = %s", info.pNumber);
+       msg(" - type = %d", info.CallType);
+       msg(" - state = %d", info.CallState);
+       msg(" - multiparty = %d", info.bConferenceState);
 
-       result = tapi_call_get_volume_info(handle, device, on_get_volume_info_call, 0);
-       CHECK_RT(result);
-       return 0;
+       return result;
 }
 
-static void on_set_sound_path_call(TelHandle * handle, int result, void *data, void *user_data)
+static int run_call_get_status_all(MManager *mm, struct menu_data *menu)
 {
-       msg("on_set_sound_path_call :");
-       CHECK_RESULT(result);
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result = 0;
+
+       msg("call tel_get_call_status_all()");
+
+       result = tel_get_call_status_all(handle, call_status_callback, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
+
+       return result;
 }
 
-static int run_call_set_sound_path(MManager *mm, struct menu_data *menu)
+static int run_call_set_mute_status(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result = 0;
-       TelCallSoundPathInfo sound_path_info;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result = 0;
+       TelSoundMutePath_t path = 0;
+       TelSoundMuteStatus_t status = 0;
 
-       memset(&sound_path_info, '\0', sizeof(TelCallSoundPathInfo));
+       msg("call tel_set_call_mute_status()");
 
-       sound_path_info.path = atoi(data_call_sound_path);
-       sound_path_info.ex_volume = atoi(data_sound_ex_volume);
+       path = (TelSoundMutePath_t)atoi(data_mute_path);
+       status = (TelSoundMuteStatus_t)atoi(data_mute_status);
 
-       msg("sound path : (%d)", sound_path_info.path);
-       msg("sound ex-volume : (%d)", sound_path_info.ex_volume);
+       msg("path : (%d)", path);
+       msg("status : (%d)", status);
 
-       msg("call tapi_call_set_sound_path()");
+       result = tel_set_call_mute_status(handle, status, path, on_call_set_mute_status, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
 
-       result = tapi_call_set_sound_path(handle, &sound_path_info, on_set_sound_path_call, 0);
-       CHECK_RT(result);
-       return 0;
+       return result;
 }
 
-static void on_set_mute_call(TelHandle *handle, int result, void *data, void *user_data)
+static int run_call_get_mute_status(MManager *mm, struct menu_data *menu)
 {
-       msg("on_set_mute_call :");
-       CHECK_RESULT(result);
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result = 0;
+
+       msg("call tel_get_call_mute_status()");
+
+       result = tel_get_call_mute_status(handle, on_call_get_mute_status, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
+
+       return result;
 }
 
-static int run_call_set_mute(MManager *mm, struct menu_data *menu)
+static int run_call_set_volume_info(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result = 0;
-       gboolean status = 0;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result = 0;
+       TelCallVolumeInfo_t data;
+
+       msg("call tel_set_call_volume_info()");
 
-       status = atoi(data_mute_status);
+       data.device = (TelSoundDevice_t)atoi(data_vol_device);
+       data.type = (TelSoundType_t)atoi(data_vol_type);
+       data.volume = (TelSoundVolume_t)atoi(data_vol_level);
 
-       msg("mute status : (%d)", status);
+       msg("device : (%d)", data.device);
+       msg("type : (%d)", data.type);
+       msg("volume : (%d)", data.volume);
 
-       msg("call tapi_call_set_mute()");
+       result = tel_set_call_volume_info(handle, &data, on_call_set_volume_info, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
 
-       result = tapi_call_set_mute(handle, status, on_set_mute_call, 0);
-       CHECK_RT(result);
-       return 0;
+       return result;
 }
 
-static void on_get_mute_status_call(TelHandle *handle, int result, void *data, void *user_data)
+static int run_call_get_volume_info(MManager *mm, struct menu_data *menu)
 {
-       if (result < TEL_CALL_RESULT_SUCCESS || result > TEL_CALL_RESULT_OPERATION_NOT_PERMITTED) {
-               msg("Unidentified Result : %d", result);
-       } else {
-               msg("on_get_mute_status_call() - result[%d] :[%s] ", result, dbg_call_result[result]);
-               if(result == TEL_CALL_RESULT_SUCCESS) {
-                       gboolean *mute = data;
-                       msg("on_get_mute_status_call() - status : %d", *mute);
-               }
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result = 0;
+       TelSoundDevice_t device;
+       TelSoundType_t type;
+
+       msg("call tel_get_call_volume_info()");
+
+       device = (TelSoundDevice_t)atoi(data_vol_device);
+       type = (TelSoundType_t)atoi(data_vol_type);
+
+       msg("device : (%d)", device);
+       msg("type : (%d)", type);
+
+       result = tel_get_call_volume_info(handle, device, type, on_call_get_volume_info, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
        }
+
+       return result;
 }
 
-static int run_call_get_mute_status(MManager *mm, struct menu_data *menu)
+static int run_call_set_sound_path(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result = 0;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result = 0;
+       TelCallSoundPathInfo_t sound_path ;
 
-       msg("call tapi_call_get_mute_status()");
+       msg("call tel_set_sound_path()");
 
-       result = tapi_call_get_mute_status(handle, on_get_mute_status_call, 0);
-       CHECK_RT(result);
-       return 0;
-}
+       sound_path.path = (TelSoundPath_t)atoi(data_sound_path);
+       sound_path.ex_volume = atoi(data_extra_volume_status);
 
-static void on_set_sound_recording_call(TelHandle * handle, int result, void *data, void *user_data)
-{
-       msg("on_set_sound_recording_call :");
-       CHECK_RESULT(result);
+       msg("sound_path.path : (0x%x)", sound_path.path);
+       msg("sound_path.ex_volume : (0x%x)", sound_path.ex_volume);
+
+       result = tel_set_call_sound_path(handle, &sound_path, on_call_set_sound_path, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
+
+       return result;
 }
 
-static int run_call_set_sound_recording(MManager *mm, struct menu_data *menu)
+static int run_call_set_preferred_voice_subscription(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result = 0;
-       TelCallSoundRecording sound_rec;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result = 0;
+       TelCallPreferredVoiceSubs_t preferred_subscription;
 
-       sound_rec = atoi(data_sound_recording_status);
+       msg("call run_call_set_preferred_voice_subscription()");
 
-       msg("sound_recording_status : (%d)", sound_rec);
+       preferred_subscription = (TelCallPreferredVoiceSubs_t)atoi(data_preferred_voice_subscription);
 
-       msg("call tapi_call_set_sound_recording()");
+       msg("preferred_subscription : (%d)", preferred_subscription);
 
-       result = tapi_call_set_sound_recording(handle, sound_rec, on_set_sound_recording_call, 0);
-       CHECK_RT(result);
-       return 0;
+       result = tel_set_call_preferred_voice_subscription(handle, preferred_subscription, on_call_set_preferred_voice_subscription, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
+
+       return result;
 }
 
-static void on_set_sound_equalization_call(TelHandle * handle, int result, void *data, void *user_data)
+static int run_call_get_preferred_voice_subscription(MManager *mm, struct menu_data *menu)
 {
-       msg("on_set_sound_equalization_call :");
-       CHECK_RESULT(result);
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result = 0;
+       TelCallPreferredVoiceSubs_t preferred_subscription = TAPI_CALL_PREFERRED_VOICE_SUBS_UNKNOWN;
+
+       msg("call tel_get_call_preferred_voice_subscription()");
+
+       result = tel_get_call_preferred_voice_subscription(handle, &preferred_subscription);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
+       else {
+               msg("'preferred' Voice call subscription = (%d)", preferred_subscription);
+       }
+
+       return result;
 }
 
-static int run_call_set_sound_equalization(MManager *mm, struct menu_data *menu)
+static int run_call_get_call_privacy_mode(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelCallSoundEqualization sound_eq;
-       TelReturn result;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+
+       msg("call tel_get_call_privacy_mode()");
 
-       memset(&sound_eq, '\0', sizeof(TelCallSoundEqualization));
 
-       sound_eq.mode = atoi(data_sound_equalization_mode);
-       sound_eq.direction = atoi(data_sound_direction);
-/*  To be implemented later
-       memcpy(sound_eq.parameter, data_sound_equalization_parameter, strlen(data_sound_equalization_parameter)); */
+       result = tel_get_call_privacy_mode(handle, on_call_get_privacy_mode, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+               return result ;
+       }
+       return result;
+}
+
+static int run_call_set_call_privacy_mode(MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+       TelCallPrivacyMode_t privacy_mode;
 
-       msg("sound eq mode : (%d)", sound_eq.mode);
-       msg("sound eq direction : (%d)", sound_eq.direction);
+       msg("call tel_set_call_privacy_mode()");
 
-       msg("call tapi_call_set_sound_equalization()");
+       privacy_mode = atoi(data_call_privacy_mode);
+       msg("privacy_mode : (0x%x)", privacy_mode);
 
-       result = tapi_call_set_sound_equalization(handle, &sound_eq, on_set_sound_equalization_call, 0);
-       CHECK_RT(result);
-       return 0;
+       result = tel_set_call_privacy_mode(handle, privacy_mode, on_call_set_privacy_mode, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+               return result ;
+       }
+
+       return result;
 }
 
 
 static struct menu_data menu_call_dial[] = {
-       { "1", "type (0=VOICE, 1=DATA, 2=Emergency)", NULL, NULL, data_call_type},
-       { "2", "type (0=DEFAULT, 1=POLICE, 2=AMBULANCE, 4=FIREBRIGADE, 8=MARINEGUARD, 16=MOUNTAINRESCUE, 32=MANUAL_ECALL, 64=AUTO_ECALL)", NULL, NULL, data_call_ecc} ,
-       { "3", "number", NULL, NULL, data_call_number},
-       { "4", "run", 0, run_call_dial, 0},
+       { "1", "type (0=VOICE, 1=VIDEO, 2=Emergency)", NULL, NULL, data_call_type},
+       { "2", "number", NULL, NULL, data_call_number},
+       { "3", "run", NULL, run_call_dial, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_call_answer_3gpp[] = {
+       { "1", "id", NULL, NULL, data_call_id},
+       { "2", "type (0=ACCEPT, 1=REJECT, 2=REPLACE, 3=HOLD&ACCEPT)", NULL, NULL, data_answer_type},
+       { "3", "run", NULL, run_call_answer, NULL},
        { NULL, NULL, },
 };
 
-static struct menu_data menu_call_answer[] = {
-       { "1", "type (0=ACCEPT, 1=REJECT, 2=REPLACE, 3=HOLD&ACCEPT)", NULL, NULL, data_answer_type},
-       { "2", "run", NULL, run_call_answer, NULL},
+static struct menu_data menu_call_answer_3gpp2[] = {
+       { "1", "id", NULL, NULL, data_call_id},
+       { "2", "type (0=ACCEPT, 1=REJECT, 3=HOLD&ACCEPT)", NULL, NULL, data_answer_type},
+       { "3", "run", NULL, run_call_answer, NULL},
        { NULL, NULL, },
 };
 
-static struct menu_data menu_call_end[] = {
+static struct menu_data menu_call_end_3gpp[] = {
        { "1", "id", NULL, NULL, data_call_id},
        { "2", "type (0=END, 1=END ALL, 2=END ACTIVE ALL, 3=END HOLD ALL)", NULL, NULL, data_end_type},
        { "3", "run", NULL, run_call_end, NULL},
        { NULL, NULL, },
 };
 
-static struct menu_data menu_call_send_dtmf[] = {
-       { "1", "Dtmf Character (0-9, A-D, '*', and '#')", NULL, NULL, data_dtmf_string},
-       { "2", "run", NULL, run_call_send_dtmf, NULL},
+static struct menu_data menu_call_end_3gpp2[] = {
+       { "1", "id", NULL, NULL, data_call_id},
+       { "2", "type (1=END ALL)", NULL, NULL, data_end_type},
+       { "3", "run", NULL, run_call_end, NULL},
        { NULL, NULL, },
 };
 
 static struct menu_data menu_call_hold[] = {
-       { "1", "run", NULL, run_call_hold, NULL},
+       { "1", "id", NULL, NULL, data_call_id},
+       { "2", "run", NULL, run_call_hold, NULL},
        { NULL, NULL, },
 };
 
 static struct menu_data menu_call_active[] = {
-       { "1", "run", NULL, run_call_active, NULL},
+       { "1", "id", NULL, NULL, data_call_id},
+       { "2", "run", NULL, run_call_active, NULL},
        { NULL, NULL, },
 };
 
 static struct menu_data menu_call_swap[] = {
-       { "1", "run", NULL, run_call_swap, NULL},
-       { NULL, NULL, },
+       { "1", "id", NULL, NULL, data_call_id},
+       { "2", "id2", NULL, NULL, data_call_id2},
+       { "3", "run", NULL, run_call_swap, NULL},
 };
 
 static struct menu_data menu_call_join[] = {
-       { "1", "run", NULL, run_call_join, NULL},
+       { "1", "id", NULL, NULL, data_call_id},
+       { "2", "run", NULL, run_call_join, NULL},
        { NULL, NULL, },
 };
 
@@ -782,24 +947,27 @@ static struct menu_data menu_call_split[] = {
 };
 
 static struct menu_data menu_call_transfer[] = {
-       { "1", "run", 0, run_call_transfer, 0},
-       { 0, 0, },
+       { "1", "id", NULL, NULL, data_call_id},
+       { "2", "run", NULL, run_call_transfer, NULL},
+       { NULL, NULL, },
 };
 
-static struct menu_data menu_call_deflect[] = {
-       { "1", "deflect number", NULL, NULL, data_call_number},
-       { "2", "run", NULL, run_call_deflect, NULL},
+static struct menu_data menu_call_start_cont_dtmf[] = {
+       { "1", "Dtmf Charater(0-9, A-D, ' * ' and ' # ') one character at a time ", NULL, NULL, data_dtmf_digit},
+       { "2", "run", NULL, run_call_start_cont_dtmf, NULL},
        { NULL, NULL, },
 };
 
-static struct menu_data menu_call_set_active_line[] = {
-       { "1", "type (0=LINE1, 1=LINE2 )", NULL, NULL, data_call_active_line_type},
-       { "2", "run", NULL, run_call_set_active_line, NULL},
+static struct menu_data menu_call_stop_cont_dtmf[] = {
+       { "1", "run", NULL, run_call_stop_cont_dtmf, NULL},
        { NULL, NULL, },
 };
 
-static struct menu_data menu_call_get_active_line[] = {
-       { "1", "run", NULL, run_call_get_active_line, NULL},
+static struct menu_data menu_call_send_burst_dtmf[] = {
+       { "1", "Dtmf String(0-9, A-D, ' * ' and ' # ') one character or a string of characters ", NULL, NULL, data_dtmf_string},
+       { "2", "DTMF pulse width (ONLENGTH_95MS=0x0, ONLENGTH_150MS=0x1, ONLENGTH_200MS=0x2, ONLENGTH_250MS=0x3, ONLENGTH_300MS=0x4, ONLENGTH_350MS=0x5, ONLENGTH_SMS=0x6)", NULL, NULL, data_dtmf_pulse_width},
+       { "3", "DTMF inter digit interval (OFFLENGTH_60MS=0x0, OFFLENGTH_100MS=0x1, OFFLENGTH_150MS=0x2, OFFLENGTH_200MS=0x3)", NULL, NULL, data_dtmf_inter_digit_interval},
+       { "4", "run", NULL, run_call_send_burst_dtmf, NULL},
        { NULL, NULL, },
 };
 
@@ -810,196 +978,206 @@ static struct menu_data menu_call_get_status[] = {
 };
 
 static struct menu_data menu_call_get_status_all[] = {
-       { "1", "run", NULL, run_call_get_status_all, NULL},
+       { "1", "id", NULL, NULL, data_call_id},
+       { "2", "run", NULL, run_call_get_status_all, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_call_set_mute_status[] = {
+       { "1", "status", NULL, NULL, data_mute_status},
+       { "2", "path", NULL, NULL, data_mute_path},
+       { "3", "run", NULL, run_call_set_mute_status, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_call_get_mute_status[] = {
+       { "1", "run", NULL, run_call_get_mute_status, NULL},
        { NULL, NULL, },
 };
 
 static struct menu_data menu_call_set_volume_info[] = {
-       { "1", "device (0=RECIEVER, 16=SPEAKER PHONE, 32=HFK, 48=HEADSET, 64=BLUETOOTH, 160=EC)", NULL, NULL, data_vol_device},
-       { "2", "volume(1 - 100) ", NULL, NULL, data_vol_level},
-       { "3", "run", NULL, run_call_set_volume_info, NULL},
+       { "1", "device", NULL, NULL, data_vol_device},
+       { "2", "type", NULL, NULL, data_vol_type},
+       { "3", "volume", NULL, NULL, data_vol_level},
+       { "4", "run", NULL, run_call_set_volume_info, NULL},
        { NULL, NULL, },
 };
 
 static struct menu_data menu_call_get_volume_info[] = {
-       { "1", "device (0=RECIEVER, 16=SPEAKER PHONE, 32=HFK, 48=HEADSET, 64=BLUETOOTH, 160=EC)", NULL, NULL, data_vol_device},
-       { "2", "run", NULL, run_call_get_volume_info, NULL},
+       { "1", "device", NULL, NULL, data_vol_device},
+       { "2", "type", NULL, NULL, data_vol_type},
+       { "3", "run", NULL, run_call_get_volume_info, NULL},
        { NULL, NULL, },
 };
 
 static struct menu_data menu_call_set_sound_path[] = {
-       { "1", "path (0=HANDSET, 1=HEADSET, 2=HANDSFREE, 3=BLUETOOTH, 4=STEREO_BLUETOOTH, 5=SPEAKER_PHONE, 6=HEADSET_3_5PI, 7=BLUETOOTH_NSEC_OFF, 8=MIC2, 9=MIC1, 10=HEADSET_HAC)", NULL, NULL, data_call_sound_path},
-       { "2", "ex_volume (0=OFF 1=ON)", NULL, NULL, data_sound_ex_volume},
+       { "1", "Sound path(1= HANDSET, 2= HEADSET, 3= HANDSFREE, 4=BUETOOTH, 5=STEREO_BLUETOOTH, 6=SPK_PHONE, 7=HEADSET_5_PI, 8=BT_NSCE_OFF, 9=MIC1, 10=MIC2, 11=HEADSET_HAC)", NULL, NULL, data_sound_path},
+       { "2", "Extra Volume Status( 0=OFF, 1=ON)", NULL, NULL, data_extra_volume_status},
        { "3", "run", NULL, run_call_set_sound_path, NULL},
        { NULL, NULL, },
 };
 
-static struct menu_data menu_call_set_mute[] = {
-       { "1", "status (0=MUTE_OFF, 1=MUTE_ON)", NULL, NULL, data_mute_status},
-       { "2", "run", NULL, run_call_set_mute, NULL},
+static struct menu_data menu_call_set_preferred_voice_subscription[] = {
+       { "1", "Preferred Voice call Subcription (0=Current network, 1=ASK Always, 2=SIM 1, 3=SIM 2)", 0, 0, data_preferred_voice_subscription},
+       { "2", "run", 0, run_call_set_preferred_voice_subscription, 0},
+       { 0, 0, },
+};
+
+static struct menu_data menu_call_get_preferred_voice_subscription[] = {
+       { "1", "run", 0, run_call_get_preferred_voice_subscription, 0},
+       { 0, 0, },
+};
+
+static struct menu_data menu_call_get_call_privacy_mode[] = {
+       { "1", "run", NULL, run_call_get_call_privacy_mode, NULL},
        { NULL, NULL, },
 };
 
-static struct menu_data menu_call_get_mute_status[] = {
-       { "1", "run", NULL, run_call_get_mute_status, NULL},
+static struct menu_data menu_call_set_call_privacy_mode[] = {
+       { "1", "Call Privacy Mode(0=STANDARD, 1=ENHANCED)", NULL, NULL, data_call_privacy_mode},
+       { "2", "run", NULL, run_call_set_call_privacy_mode, NULL},
        { NULL, NULL, },
 };
 
-static struct menu_data menu_call_set_sound_recording[] = {
-       { "1", "recording (0=STOP, 1=START, 2=PAUSE)", NULL, NULL, data_sound_recording_status},
-       { "2", "run", NULL, run_call_set_sound_recording, NULL},
+struct menu_data menu_call_3gpp[] = {
+       { "1", "tel_dial_call", menu_call_dial, NULL, NULL},
+       { "2", "tel_answer_call", menu_call_answer_3gpp, NULL, NULL},
+       { "3", "tel_end_call", menu_call_end_3gpp, NULL, NULL},
+       { "4", "tel_hold_call", menu_call_hold, NULL, NULL},
+       { "5", "tel_active_call", menu_call_active, NULL, NULL},
+       { "6", "tel_swap_call", menu_call_swap, NULL, NULL},
+       { "7", "tel_join_call", menu_call_join, NULL, NULL},
+       { "8", "tel_split_call", menu_call_split, NULL, NULL},
+       { "9", "tel_transfer_call", menu_call_transfer, NULL, NULL},
+       { "10", "tel_start_call_cont_dtmf_call", menu_call_start_cont_dtmf, NULL, NULL},
+       { "11", "tel_stop_call_cont_dtmf_call", menu_call_stop_cont_dtmf, NULL, NULL},
+       { "12", "tel_send_call_burst_dtmf", menu_call_send_burst_dtmf, NULL, NULL},
+       { "13", "tel_get_call_status", menu_call_get_status, NULL, NULL},
+       { "14", "tel_get_call_status_all", menu_call_get_status_all, NULL, NULL},
+       { "15", "tel_set_call_mute_status", menu_call_set_mute_status, NULL, NULL},
+       { "16", "tel_get_call_mute_status", menu_call_get_mute_status, NULL, NULL},
+       { "17", "tel_set_call_volume_info", menu_call_set_volume_info, NULL, NULL},
+       { "18", "tel_get_call_volume_info", menu_call_get_volume_info, NULL, NULL},
+       { "19", "tel_set_call_sound_path", menu_call_set_sound_path, NULL, NULL},
+       { "20", "tel_set_call_preferred_voice_subscription", menu_call_set_preferred_voice_subscription, 0, 0},
+       { "21", "tel_get_call_preferred_voice_subscription", menu_call_get_preferred_voice_subscription, 0, 0},
        { NULL, NULL, },
 };
 
-static struct menu_data menu_call_set_sound_equalization[] = {
-       { "1", "mode (0=OFF, 1=ON, 2=FLAG_OFF, 3=FLAG_ON, 4=SOFT1, 5=SOFT2)", NULL, NULL, data_sound_equalization_mode},
-       { "2", "direction (0=LEFT, 1=RIGHT)", NULL, NULL, data_sound_direction} ,
-/* To be implemented Later
-       { "3", "parameter enter max six values", 0, 0, data_sound_equalization_parameter},*/
-       { "3", "run", NULL, run_call_set_sound_equalization, NULL},
+struct menu_data menu_call_3gpp2[] = {
+       { "1", "tel_dial_call", menu_call_dial, NULL, NULL},
+       { "2", "tel_answer_call", menu_call_answer_3gpp2, NULL, NULL},
+       { "3", "tel_end_call", menu_call_end_3gpp2, NULL, NULL},
+       { "4", "tel_swap_call", menu_call_swap, NULL, NULL},
+       { "5", "tel_join_call", menu_call_join, NULL, NULL},
+       { "6", "tel_get_call_status", menu_call_get_status, NULL, NULL},
+       { "7", "tel_start_call_cont_dtmf", menu_call_start_cont_dtmf, NULL, NULL},
+       { "8", "tel_stop_call_cont_dtmf", menu_call_stop_cont_dtmf, NULL, NULL},
+       { "9", "tel_send_call_burst_dtmf", menu_call_send_burst_dtmf, NULL, NULL},
+       { "10", "tel_get_call_status_all", menu_call_get_status_all, NULL, NULL},
+       { "11", "tel_get_call_privacy_mode", menu_call_get_call_privacy_mode, NULL, NULL},
+       { "12", "tel_set_call_privacy_mode", menu_call_set_call_privacy_mode, NULL, NULL},
+       { "13", "tel_set_call_mute_status", menu_call_set_mute_status, NULL, NULL},
+       { "14", "tel_get_call_mute_status", menu_call_get_mute_status, NULL, NULL},
+       { "15", "tel_set_call_volume_info", menu_call_set_volume_info, NULL, NULL},
+       { "16", "tel_get_call_volume_info", menu_call_get_volume_info, NULL, NULL},
+       { "17", "tel_set_call_sound_path", menu_call_set_sound_path, NULL, NULL},
        { NULL, NULL, },
 };
 
 struct menu_data menu_call[] = {
-       { "1", "tapi_call_dial", menu_call_dial, NULL, NULL},
-       { "2", "tapi_call_answer", menu_call_answer, NULL, NULL},
-       { "3", "tapi_call_end", menu_call_end, NULL, NULL},
-       { "4", "tapi_call_send_dtmf", menu_call_send_dtmf, NULL, NULL},
-       { "5", "tapi_call_hold", menu_call_hold, NULL, NULL},
-       { "6", "tapi_call_active", menu_call_active, NULL, NULL},
-       { "7", "tapi_call_swap", menu_call_swap, NULL, NULL},
-       { "8", "tapi_call_join", menu_call_join, NULL, NULL},
-       { "9", "tapi_call_split", menu_call_split, NULL, NULL},
-       { "10", "tapi_call_transfer", menu_call_transfer, NULL, NULL},
-       { "11", "tapi_call_deflect", menu_call_deflect, NULL, NULL},
-       { "12s", "tapi_call_set_active_line", menu_call_set_active_line, NULL, NULL},
-       { "12g", "tapi_call_get_active_line", menu_call_get_active_line, NULL, NULL},
-       { "13", "tapi_call_get_status", menu_call_get_status, NULL, NULL},
-       { "14", "tapi_call_get_status_all", menu_call_get_status_all, NULL, NULL},
-       { "15s", "tapi_call_set_volume_info", menu_call_set_volume_info, NULL, NULL},
-       { "15g", "tapi_call_get_volume_info", menu_call_get_volume_info, NULL, NULL},
-       { "16", "tapi_call_set_sound_path", menu_call_set_sound_path, NULL, NULL},
-       { "17s", "tapi_call_set_mute", menu_call_set_mute, NULL, NULL},
-       { "17g", "tapi_call_get_mute_status", menu_call_get_mute_status, NULL, NULL},
-       { "18", "tapi_call_set_sound_recording", menu_call_set_sound_recording, NULL, NULL},
-       { "19", "tapi_call_set_sound_equalization", menu_call_set_sound_equalization, NULL, NULL},
+       { "1", "3GPP(GSM/WCDMA/LTE)", menu_call_3gpp, NULL, NULL},
+       { "2", "3GPP2(CDMA)", menu_call_3gpp2, NULL, NULL},
        { NULL, NULL, },
 };
 
-void register_call_event(TelHandle *handle)
+void register_call_event(TapiHandle *handle)
 {
-       TelReturn ret;
-
-       ret = tapi_register_event_id(handle, TEL_NOTI_VOICE_CALL_STATUS_IDLE, on_noti_call_status_idle, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_VOICE_CALL_STATUS_IDLE - register event failed: [%d]", ret);
-
-       ret = tapi_register_event_id(handle, TEL_NOTI_VIDEO_CALL_STATUS_IDLE, on_noti_call_status_idle, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_VIDEO_CALL_STATUS_IDLE - register event failed: [%d]", ret);
-
-       ret = tapi_register_event_id(handle, TEL_NOTI_VOICE_CALL_STATUS_ACTIVE, on_noti_call_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_VOICE_CALL_STATUS_ACTIVE - register event failed: [%d]", ret);
-
-       ret = tapi_register_event_id(handle, TEL_NOTI_VOICE_CALL_STATUS_HELD, on_noti_call_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_VOICE_CALL_STATUS_HELD - register event failed: [%d]", ret);
-
-       ret = tapi_register_event_id(handle, TEL_NOTI_VOICE_CALL_STATUS_DIALING, on_noti_call_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_VOICE_CALL_STATUS_DIALING - register event failed: [%d]", ret);
-
-       ret = tapi_register_event_id(handle, TEL_NOTI_VOICE_CALL_STATUS_ALERT, on_noti_call_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_VOICE_CALL_STATUS_ALERT - register event failed: [%d]", ret);
+       int ret;
 
-       ret = tapi_register_event_id(handle, TEL_NOTI_VOICE_CALL_STATUS_INCOMING, on_noti_call_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_VOICE_CALL_STATUS_INCOMING - register event failed: [%d]", ret);
-
-       ret = tapi_register_event_id(handle, TEL_NOTI_VIDEO_CALL_STATUS_ACTIVE, on_noti_call_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_VIDEO_CALL_STATUS_ACTIVE - register event failed: [%d]", ret);
-
-       ret = tapi_register_event_id(handle, TEL_NOTI_VIDEO_CALL_STATUS_DIALING, on_noti_call_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_VIDEO_CALL_STATUS_DIALING - register event failed: [%d]", ret);
-
-       ret = tapi_register_event_id(handle, TEL_NOTI_VIDEO_CALL_STATUS_ALERT, on_noti_call_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_VIDEO_CALL_STATUS_ALERT - register event failed: [%d]", ret);
-
-       ret = tapi_register_event_id(handle, TEL_NOTI_VIDEO_CALL_STATUS_INCOMING, on_noti_call_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_VIDEO_CALL_STATUS_INCOMING - register event failed: [%d]", ret);
-
-       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_INFO_MO_WAITING, on_noti_call_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_CALL_INFO_MO_WAITING - register event failed: [%d]", ret);
-
-       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_INFO_HELD, on_noti_call_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_CALL_INFO_HELD - register event failed: [%d]", ret);
+       ret = tel_register_noti_event(handle, TAPI_NOTI_VOICE_CALL_STATUS_IDLE, on_noti_call_status_idle, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 
-       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_INFO_ACTIVE, on_noti_call_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_CALL_INFO_ACTIVE - register event failed: [%d]", ret);
+       ret = tel_register_noti_event(handle, TAPI_NOTI_VOICE_CALL_STATUS_ACTIVE, on_noti_call_status_active, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 
-       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_INFO_JOINED, on_noti_call_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_CALL_INFO_JOINED - register event failed: [%d]", ret);
+       ret = tel_register_noti_event(handle, TAPI_NOTI_VOICE_CALL_STATUS_HELD, on_noti_call_status_held, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 
-       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_INFO_MO_FORWARDED, on_noti_call_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_CALL_INFO_MO_FORWARDED - register event failed: [%d]", ret);
+       ret = tel_register_noti_event(handle, TAPI_NOTI_VOICE_CALL_STATUS_DIALING, on_noti_call_status_dialing, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 
-       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_INFO_MO_BARRED_INCOMING, on_noti_call_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_CALL_INFO_MO_BARRED_INCOMING - register event failed: [%d]", ret);
+       ret = tel_register_noti_event(handle, TAPI_NOTI_VOICE_CALL_STATUS_ALERT, on_noti_call_status_alert, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 
-       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_INFO_MO_BARRED_OUTGOING, on_noti_call_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_CALL_INFO_MO_BARRED_OUTGOING - register event failed: [%d]", ret);
+       ret = tel_register_noti_event(handle, TAPI_NOTI_VOICE_CALL_STATUS_INCOMING, on_noti_call_status_incoming, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 
-       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_INFO_MO_FORWARD_UNCONDITIONAL, on_noti_call_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_CALL_INFO_MO_FORWARD_UNCONDITIONAL - register event failed: [%d]", ret);
+       ret = tel_register_noti_event(handle, TAPI_NOTI_CALL_INFO_HELD, on_noti_call_on_hold, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 
-       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_INFO_MO_FORWARD_CONDITIONAL, on_noti_call_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_CALL_INFO_MO_FORWARD_CONDITIONAL - register event failed: [%d]", ret);
+       ret = tel_register_noti_event(handle, TAPI_NOTI_CALL_INFO_ACTIVE, on_noti_call_active, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 
-       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_INFO_MT_FORWARDED, on_noti_call_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_CALL_INFO_MT_FORWARDED - register event failed: [%d]", ret);
+       ret = tel_register_noti_event(handle, TAPI_NOTI_CALL_INFO_JOINED, on_noti_call_joined, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 
-       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_INFO_MT_DEFLECTED, on_noti_call_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_CALL_INFO_MT_DEFLECTED - register event failed: [%d]", ret);
+       ret = tel_register_noti_event(handle, TAPI_NOTI_CALL_PRIVACY_MODE, on_noti_call_privacy_mode, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 
-       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_INFO_MO_DEFLECTED, on_noti_call_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_CALL_INFO_MO_DEFLECTED - register event failed: [%d]", ret);
+       ret = tel_register_noti_event(handle, TAPI_NOTI_CALL_OTASP_STATUS, on_noti_call_otasp_status, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 
-       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_INFO_TRANSFERED, on_noti_call_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_CALL_INFO_TRANSFERED - register event failed: [%d]", ret);
+       ret = tel_register_noti_event(handle, TAPI_NOTI_CALL_OTAPA_STATUS, on_noti_call_otapa_status, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 
-       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_SOUND_RINGBACK_TONE, on_noti_call_sound_ringback_tone, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_CALL_SOUND_RINGBACK_TONE - register event failed: [%d]", ret);
+       ret = tel_register_noti_event(handle, TAPI_NOTI_CALL_SIGNAL_INFO, on_noti_call_signal_info, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 
-       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_SOUND_WBAMR, on_noti_call_sound_wbamr, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_CALL_SOUND_WBAMR - register event failed: [%d]", ret);
+       ret = tel_register_noti_event(handle, TAPI_NOTI_CALL_SOUND_RINGBACK_TONE, on_noti_call_sound_ringback_tone, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 
-       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_SOUND_EQUALIZATION, on_noti_call_sound_equalization, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_CALL_SOUND_EQUALIZATION - register event failed: [%d]", ret);
+       ret = tel_register_noti_event(handle, TAPI_NOTI_CALL_SOUND_WBAMR, on_noti_call_sound_wbamr, 0);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 
-       ret = tapi_register_event_id(handle, TEL_NOTI_CALL_SOUND_CLOCK_STATUS, on_noti_call_sound_clock_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_CALL_SOUND_CLOCK_STATUS - register event failed: [%d]", ret);
+       ret = tel_register_noti_event(handle, TAPI_NOTI_CALL_SOUND_PATH, on_noti_call_sound_path, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 
+       ret = tel_register_noti_event(handle, TAPI_NOTI_CALL_PREFERRED_VOICE_SUBSCRIPTION, on_noti_call_preferred_voice_subscription, 0);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 }
+
index 4745afb4f23000ecfd950b2ab80b3814f9ec497a..56561fffbeccadbae8f436b847513cfceb0d6610 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,6 +22,6 @@
 #define __CALL_H__
 
 
-void register_call_event(TelHandle *handle);
+void register_call_event(TapiHandle *handle);
 
 #endif
diff --git a/test_src/gps.c b/test_src/gps.c
deleted file mode 100644 (file)
index 78404ad..0000000
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * libtapi
- *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/time.h>
-#include <unistd.h>
-#include <glib.h>
-#include <glib-object.h>
-
-#include <tapi.h>
-#include <tapi_gps.h>
-#include <tapi_events.h>
-
-#include "menu.h"
-#include "gps.h"
-
-static char *dbg_gps_result[] = {
-       "TEL_GPS_RESULT_SUCCESS",
-       "TEL_GPS_RESULT_FAILURE",
-       "TEL_GPS_RESULT_INVALID_PARAMETER",
-       "TEL_GPS_RESULT_MEMORY_FAILURE",
-       "TEL_GPS_RESULT_OPERATION_NOT_SUPPORTED",
-       "TEL_GPS_RESULT_OPERATION_NOT_PERMITTED",
-       "TEL_GPS_RESULT_UNKNOWN_FAILURE",
-};
-
-static char data_gps_set_frequency_aiding[MENU_DATA_SIZE + 1] = "1";
-
-/* Utilities */
-static void _gps_hex_dump(char *pad, int size, const void *data)
-{
-       char buf[255] = {0, };
-       char hex[4] = {0, };
-       int i;
-       unsigned char *p;
-
-       if (size <= 0) {
-               msg("%sno data", pad);
-               return;
-       }
-       p = (unsigned char *)data;
-
-       snprintf(buf, 255, "%s%04X: ", pad, 0);
-       for (i = 0; i<size; i++) {
-               snprintf(hex, 4, "%02X ", p[i]);
-               strcat(buf, hex);
-
-               if ((i + 1) % 8 == 0) {
-                       if ((i + 1) % 16 == 0) {
-                               msg("%s", buf);
-                               memset(buf, 0, 255);
-                               snprintf(buf, 255, "%s%04X: ", pad, i + 1);
-                       }
-                       else {
-                               strcat(buf, "  ");
-                       }
-               }
-       }
-
-       msg("%s", buf);
-}
-
-static void _gps_print_dump(int data_len, void *data)
-{
-       if(!data)
-               return;
-
-       msg("");
-       msg("  \tlen=%d", data_len);
-       _gps_hex_dump("        ", data_len, data);
-
-       msg("");
-}
-
-/* Event Callback */
-static void on_noti_gps(TelHandle *handle, const char *noti_id, void *data, void *user_data)
-{
-       msg("");
-       msgb("event(%s) received !!", noti_id);
-
-       if (!g_strcmp0(noti_id, TEL_NOTI_GPS_ASSIST_DATA)
-               || !g_strcmp0(noti_id, TEL_NOTI_GPS_MEASURE_POSITION)) {
-               TelGpsDataInfo *gps_data = NULL;
-
-               if(!data) {
-                       msg("Gps event data received is null");
-                       return;
-               }
-
-               gps_data = (TelGpsDataInfo *)data;
-               _gps_print_dump(gps_data->data_len, gps_data->data);
-       } else if (!g_strcmp0(noti_id, TEL_NOTI_GPS_RESET_ASSIST_DATA)) {
-               /* Reset Assist Data */
-       } else {
-               msg("Unhandled event received");
-       }
-}
-
-/* Requests and Responses */
-static void on_gps_set_frequency_aiding(TelHandle *handle, int result, void *data, void *user_data)
-{
-       msg("");
-       msgb("tapi_gps_set_frequency_aiding() response received");
-
-       if (result >= TEL_GPS_RESULT_SUCCESS && result <= TEL_GPS_RESULT_UNKNOWN_FAILURE) {
-               msg("result[%d][%s]", result, dbg_gps_result[result]);
-       } else {
-               msg("Api failed with result[%d]", result);
-       }
-}
-
-static int run_gps_set_frequency_aiding(MManager *mm, struct menu_data *menu)
-{
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt;
-       gboolean state;
-
-       msg("call tapi_gps_set_frequency_aiding()");
-
-       state = atoi(data_gps_set_frequency_aiding);
-       msg("state[%s]", (state == 1) ? "Enable" : "Disable");
-
-       rt = tapi_gps_set_frequency_aiding(handle, state, on_gps_set_frequency_aiding, NULL);
-       CHECK_RT(rt);
-
-       return 0;
-}
-
-static int run_gps_confirm_measure_position(MManager *mm, struct menu_data *menu)
-{
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt;
-       TelGpsDataInfo gps_data;
-
-       msg("call tapi_gps_confirm_measure_pos()");
-
-       memset(&gps_data, 0, sizeof(TelGpsDataInfo));
-
-       rt = tapi_gps_confirm_measure_pos(handle, &gps_data);
-       CHECK_RT(rt);
-
-       _gps_print_dump(gps_data.data_len, gps_data.data);
-
-       g_free(gps_data.data);
-       return 0;
-}
-
-/* Sub-Menu */
-static struct menu_data menu_gps_set_frequency_aiding[] = {
-       { "1", "state (0=Disable, 1=Enable)", NULL, NULL, data_gps_set_frequency_aiding},
-       { "2", "run", NULL, run_gps_set_frequency_aiding, NULL},
-       { NULL, NULL, },
-};
-
-static struct menu_data menu_gps_confirm_measure_position[] = {
-       { "1", "run", NULL, run_gps_confirm_measure_position, NULL},
-       { NULL, NULL, },
-};
-
-/* Menu */
-struct menu_data menu_gps[] = {
-       { "1", "Set Frequency Aiding", menu_gps_set_frequency_aiding, NULL, NULL},
-       { "2", "Confirm Measure Position", menu_gps_confirm_measure_position, NULL, NULL},
-       { NULL, NULL, },
-};
-
-/* Register Events */
-void register_gps_event(TelHandle *handle)
-{
-       TelReturn ret;
-
-       ret = tapi_register_event_id(handle, TEL_NOTI_GPS_ASSIST_DATA, on_noti_gps, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_GPS_ASSIST_DATA - Event register failed: [%d]", ret);
-
-       ret = tapi_register_event_id(handle, TEL_NOTI_GPS_MEASURE_POSITION, on_noti_gps, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_GPS_MEASURE_POSITION - Event register failed: [%d]", ret);
-
-       ret = tapi_register_event_id(handle, TEL_NOTI_GPS_RESET_ASSIST_DATA, on_noti_gps, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_GPS_RESET_ASSIST_DATA - Event register failed: [%d]", ret);
-}
diff --git a/test_src/gps.h b/test_src/gps.h
deleted file mode 100644 (file)
index 5a747a7..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * libtapi
- *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __GPS_H__
-#define __GPS_H__
-
-
-void register_gps_event(TelHandle *handle);
-
-#endif
index 30409d2573b34e5d5e7b310e81f08e9e54c899e4..a11fff5decdfc7d364d7d5de121101dc1c7dd051 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <sys/time.h>
 #include <unistd.h>
 #include <glib.h>
-#include <glib-object.h>
 #include <gio/gio.h>
 
-#include <tapi.h>
+#include <tapi_common.h>
+#include <TapiUtility.h>
 
 #include "menu.h"
 #include "network.h"
@@ -37,7 +38,6 @@
 #include "modem.h"
 #include "call.h"
 #include "ss.h"
-#include "gps.h"
 
 #define SIM_SEL_MENU_KEY_COUNT 2
 
@@ -49,18 +49,16 @@ extern struct menu_data menu_sim[];
 extern struct menu_data menu_phonebook[];
 extern struct menu_data menu_ss[];
 extern struct menu_data menu_call[];
-extern struct menu_data menu_gps[];
 
-TelHandle *handle = NULL;
+TapiHandle *handle = NULL;
 char **cp_list = NULL;
 int cp_count = 0;
 
-
 static char data_subscription_type[MENU_DATA_SIZE + 1] = "";
-/* TODO
 static char data_property_int[MENU_DATA_SIZE + 1] = "org.tizen.telephony.Modem:power";
 static char data_property_string[MENU_DATA_SIZE + 1] = "org.tizen.telephony.Network:network_name";
-*/
+static char data_convert_string[MENU_DATA_SIZE + 1] = "";
+static char data_convert_dcs[MENU_DATA_SIZE + 1] = "1";
 
 static int get_modem_info(MManager *mm, struct menu_data *menu)
 {
@@ -79,15 +77,13 @@ static int init(MManager *mm, struct menu_data *menu)
        int subs_type = atoi(data_subscription_type);
 
        if (handle) {
-               msg("handle already exists");
+               msg("already handle exist");
                return 0;
        }
-
        if (cp_list[subs_type-1]) {
-               msg("call tapi_init(%s)", cp_list[subs_type-1]);
-               handle = tapi_init(cp_list[subs_type-1]);
+               msg("call tel_init(%s)", cp_list[subs_type-1]);
+               handle = tel_init(cp_list[subs_type-1]);
        }
-
        if (!handle)
                msg("handle is null");
 
@@ -98,15 +94,13 @@ static int init(MManager *mm, struct menu_data *menu)
 
 static int deinit(MManager *mm, struct menu_data *menu)
 {
-       TelReturn ret;
        if (!handle) {
                msg("handle is null");
                return 0;
        }
 
-       msg("call tapi_deinit()");
-       ret = tapi_deinit(handle);
-       if (ret != TEL_RETURN_SUCCESS)
+       msg("call tel_deinit()");
+       tel_deinit(handle);
        handle = NULL;
 
        menu_manager_set_user_data(mm, handle);
@@ -114,16 +108,15 @@ static int deinit(MManager *mm, struct menu_data *menu)
        return 0;
 }
 
-#if 0
 static int get_property_int(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TapiHandle *local_handle = menu_manager_ref_user_data(mm);
        int result_int = -1;
        int ret;
 
-       msg("call tapi_get_property_int()");
+       msg("call tel_get_property_int()");
 
-       ret = tapi_get_property_int(handle, data_property_int, &result_int);
+       ret = tel_get_property_int(local_handle, data_property_int, &result_int);
        if (ret != TAPI_API_SUCCESS) {
                msg("failed. (return = %d)", ret);
        }
@@ -135,13 +128,13 @@ static int get_property_int(MManager *mm, struct menu_data *menu)
 
 static int get_property_string(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
+       TapiHandle *local_handle = menu_manager_ref_user_data(mm);
        char *result_str = NULL;
        int ret;
 
-       msg("call tapi_get_property_string()");
+       msg("call tel_get_property_string()");
 
-       ret = tapi_get_property_string (handle, data_property_string, &result_str);
+       ret = tel_get_property_string (local_handle, data_property_string, &result_str);
        if (ret != TAPI_API_SUCCESS) {
                msg("failed. (return = %d)", ret);
        }
@@ -153,35 +146,52 @@ static int get_property_string(MManager *mm, struct menu_data *menu)
 
        return 0;
 }
-#endif
 
-static struct menu_data menu_common[] = {
-       { "1", "get modem info", NULL, get_modem_info, NULL},
-       { "2", "tapi_init", NULL, init, NULL},
-       { "3", "tapi_deinit", NULL, deinit, NULL},
+static int convert_string(MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *local_handle = menu_manager_ref_user_data(mm);
+       char *result_str = NULL;
+       int ret;
 
+       msg("call tel_get_property_string()");
 
-/*Todo */
-#if 0
-       { "4", "tapi_get_property_int",         NULL,   get_property_int,       NULL},
-       { "4s", " - property",  NULL,   NULL,   data_property_int},
-       { "5", "tapi_get_property_string",              NULL,   get_property_string,    NULL},
-       { "5s", " - property",  NULL,   NULL,   data_property_string},
-#endif
+       ret = tel_get_property_string (local_handle, data_property_string, &result_str);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("failed. (return = %d)", ret);
+       }
+
+       msg(" - result = %s", result_str);
+
+       if (result_str)
+               free (result_str);
+
+       return 0;
+}
+
+static struct menu_data menu_common[] = {
+       { "1", "tel_get_modem_info", NULL, get_modem_info, NULL},
+       { "2", "tel_init", NULL, init, NULL},
+       { "3", "tel_deinit", NULL,      deinit, NULL},
+       { "4", "tel_get_property_int",  NULL, get_property_int, NULL},
+       { "4s", " - property", NULL, NULL, data_property_int},
+       { "5", "tel_get_property_string", NULL, get_property_string, NULL},
+       { "5s", " - property", NULL, NULL, data_property_string},
+       { "6", "tcore_util_convert_string_to_utf8", NULL, convert_string, NULL},
+       { "6d", " - dcs", NULL, NULL, data_convert_dcs},
+       { "6s", " - string", NULL, NULL, data_convert_string},
        { NULL, NULL, },
 };
 
 static struct menu_data menu_main[] = {
-       { "1", "Common", menu_common, NULL, NULL},
-       { "2", "Modem", menu_modem, NULL, NULL},
-       { "3", "Network", menu_net, NULL, NULL},
-       { "4", "SIM", menu_sim, NULL, NULL},
-       { "5", "CALL", menu_call, NULL, NULL},
-       { "6", "SMS", menu_sms, NULL, NULL},
-       { "7", "SS", menu_ss, NULL, NULL},
-       { "8", "Phonebook", menu_phonebook, NULL, NULL},
-       { "9", "SAT", menu_sat, NULL, NULL},
-       { "a", "GPS", menu_gps, NULL, NULL},
+       { "1", "Common",        menu_common,NULL,               NULL},
+       { "2", "Modem",         menu_modem,     NULL,           NULL},
+       { "3", "Network",       menu_net,       NULL,           NULL},
+       { "4", "SIM",           menu_sim,       NULL,           NULL},
+       { "5", "Phonebook",     menu_phonebook, NULL,   NULL},
+       { "6", "SMS",           menu_sms,       NULL,           NULL},
+       { "7", "SS",            menu_ss,        NULL,           NULL},
+       { "8", "SAT",           menu_sat,       NULL,           NULL},
+       { "9", "Call",          menu_call,      NULL,           NULL},
        { NULL, NULL, },
 };
 
@@ -195,35 +205,35 @@ static int __select_handle_register_event (MManager *mm, struct menu_data *menu)
        }
 
        if (handle) {
-               tapi_deinit(handle);
+               tel_deinit(handle);
                handle = NULL;
        }
 
-       handle = tapi_init(cp_list[subs_type-1]);
+       handle = tel_init(cp_list[subs_type-1]);
+
+       msg("");
 
        if (!handle) {
-               msg("[SIM%d] tapi_init(%s) - FAILED!!!.", subs_type, cp_list[subs_type-1]);
+               msg("[SIM%d] tel_init(%s) - FAILED!!!.", subs_type, cp_list[subs_type-1]);
                return RET_FAILURE;
        } else {
-               msg("[SIM%d] tapi_init(%s) - SUCCESS!!!.", subs_type, cp_list[subs_type-1]);
+               msg("[SIM%d] tel_init(%s) - SUCCESS!!!.", subs_type, cp_list[subs_type-1]);
        }
 
        menu_manager_set_user_data(mm, handle);
 
        register_network_event(handle);
        register_modem_event(handle);
-       register_sim_event(handle);
        register_sat_event(handle);
-       register_sms_event(handle);
+       register_sim_event(handle);
        register_phonebook_event(handle);
+       register_sms_event(handle);
        register_call_event(handle);
        register_ss_event(handle);
-       register_gps_event(handle);
 
        return RET_SUCCESS;
 }
 
-
 static gboolean __create_sim_selection_menu(struct menu_data sim_selection_menu[SIM_SEL_MENU_KEY_COUNT+1])
 {
        unsigned int total_cp_len = 0;
@@ -231,11 +241,7 @@ static gboolean __create_sim_selection_menu(struct menu_data sim_selection_menu[
        unsigned int index_count = 0;
        unsigned int i = 0;
 
-       if( tapi_get_cp_name_list(&cp_list) != TEL_RETURN_SUCCESS) {
-               msg("tapi_get_cp_name_list() failed. Exiting!");
-               return FALSE;
-       }
-
+       cp_list = tel_get_cp_name_list();
        if (!cp_list) {
                msg("cp_list is null");
                return FALSE;
@@ -249,34 +255,36 @@ static gboolean __create_sim_selection_menu(struct menu_data sim_selection_menu[
 
        /**
         * Available CPs are displayed as below (in UI) -
-        *         Modems(1=Modem0,2=Modem1,3=Modem2)
+        *     Modems(1=Modem0,2=Modem1,3=Modem2)
         *
         * Title length is calculated as,
-        *         title_len = total_cp_len + (2*cp_count) + (cp_count-1) + 8 + 1;
+        *     title_len = total_cp_len + (2*cp_count) + (cp_count-1) + 8 + 1;
         * where,
-        *         total_cp_len = strlen(Modem0)+strlen(Modem1)+ strlen(Modem2)
-        *         (2*cp_count) = To print "1="  "2="  "3="
-        *         cp_count-1   = Number of commas
-        *         8 = Modems()
-        *         1 = NULL termination
+        *     total_cp_len = strlen(Modem0)+strlen(Modem1)+ strlen(Modem2)
+        *     (2*cp_count) = To print "1="  "2="  "3="
+        *     cp_count-1   = Number of commas
+        *     8 = Modems()
+        *     1 = NULL termination
         */
        title_len = total_cp_len + (2*cp_count) + (cp_count-1) + 8 + 1;
        sim_selection_menu[0].title = (char *)g_try_malloc0(title_len);
-       index_count += sprintf(&sim_selection_menu[0].title[index_count], "Modems(");
+       index_count += sprintf((char *)&sim_selection_menu[0].title[index_count], "Modems(");
 
        i=0;
        while (cp_list[i]) {
                if (i != 0)
-                       sim_selection_menu[0].title[index_count++] = ',';
+//                     sim_selection_menu[0].title[index_count++] = ',';
+                       strncat((char *)&sim_selection_menu[0].title[index_count++], ",", sizeof(char));
+
 
-               index_count += sprintf(&sim_selection_menu[0].title[index_count], "%d=", (i+1));
-               index_count += sprintf(&sim_selection_menu[0].title[index_count], "%s", cp_list[i]);
+               index_count += sprintf((char *)&sim_selection_menu[0].title[index_count], "%d=", (i+1));
+               index_count += sprintf((char *)&sim_selection_menu[0].title[index_count], "%s", cp_list[i]);
                i++;
        }
 
        if (index_count <= title_len - 2) {
-               sim_selection_menu[0].title[index_count++] = ')';
-               sim_selection_menu[0].title[index_count] = '\0';
+               strncat((char *)&sim_selection_menu[0].title[index_count++], ")", sizeof(char));
+               strncat((char *)&sim_selection_menu[0].title[index_count], "\0", sizeof(char));
        } else {
                msg("Invalid count");
                return FALSE;
@@ -296,7 +304,6 @@ static gboolean __create_sim_selection_menu(struct menu_data sim_selection_menu[
        return TRUE;
 }
 
-
 int main(int arg, char **argv)
 {
        GMainLoop *mainloop;
@@ -304,7 +311,9 @@ int main(int arg, char **argv)
        MManager *manager;
        struct menu_data sim_selection_menu[SIM_SEL_MENU_KEY_COUNT+1] = { {NULL, NULL, }, };
 
+#if !GLIB_CHECK_VERSION(2,35,0)
        g_type_init();
+#endif
        mainloop = g_main_loop_new(NULL, FALSE);
 
        msg("");
@@ -317,17 +326,16 @@ int main(int arg, char **argv)
        manager = menu_manager_new(sim_selection_menu, mainloop);
        menu_manager_run(manager);
 
-       g_io_add_watch(channel, (G_IO_IN | G_IO_ERR | G_IO_HUP | G_IO_NVAL), on_menu_manager_keyboard, manager);
-
+       g_io_add_watch(channel, (G_IO_IN | G_IO_ERR | G_IO_HUP | G_IO_NVAL),
+                               on_menu_manager_keyboard, manager);
        g_main_loop_run(mainloop);
 
 OUT:
        g_strfreev(cp_list);
-       g_free(sim_selection_menu[0].title);
+       g_free((gpointer *)sim_selection_menu[0].title);
        g_main_loop_unref(mainloop);
        msg("******* Bye bye *******");
 
        return 0;
 }
 
-
index 00619aad9989ae26cc261940103bf5770b66f564..ef058d60caac7e68b5d15e4771520868d4da837b 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
+#define _GNU_SOURCE
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <sys/types.h>
 #include <glib.h>
-#include <glib-object.h>
+#include <asm/unistd.h>
+#include <unistd.h>
+#include <sys/syscall.h>
 
 #include "menu.h"
 
@@ -30,7 +35,6 @@
 #define DEFAULT_MENU_QUIT      "q"
 #define DEFAULT_MENU_NONE      "-"
 
-
 struct menu_manager {
        GQueue *stack;
        GQueue *title_stack;
@@ -45,88 +49,133 @@ struct menu_manager {
 
 
 char key_buffer[MENU_DATA_SIZE];
+int flag_pid_display = 1;
 
-static void _show_prompt()
+
+static void _show_prompt (void)
 {
-       msgn(" >> ");
+       msgn ("(%5d) >> ", get_tid ());
 }
 
-static void _show_reserved_menu()
+static void _show_reserved_menu (void)
 {
-       msg(ANSI_COLOR_DARKGRAY "--------------------------------------------" ANSI_COLOR_NORMAL);
-       msg(ANSI_COLOR_DARKGRAY " [ " ANSI_COLOR_NORMAL "%s" ANSI_COLOR_DARKGRAY " ] " ANSI_COLOR_NORMAL "Previous menu " , DEFAULT_MENU_PREV);
-       msg(ANSI_COLOR_DARKGRAY " [ " ANSI_COLOR_NORMAL "%s" ANSI_COLOR_DARKGRAY " ] " ANSI_COLOR_NORMAL "Show Menu " , DEFAULT_MENU_MENU);
-       msg(ANSI_COLOR_DARKGRAY " [ " ANSI_COLOR_NORMAL "%s" ANSI_COLOR_DARKGRAY " ] " ANSI_COLOR_NORMAL "Quit " , DEFAULT_MENU_QUIT);
+       msg (ANSI_COLOR_DARKGRAY HR_SINGLE2 ANSI_COLOR_NORMAL);
+       msg (ANSI_COLOR_DARKGRAY " [ " ANSI_COLOR_NORMAL "%s" ANSI_COLOR_DARKGRAY
+                       " ] " ANSI_COLOR_NORMAL "Previous menu " , DEFAULT_MENU_PREV);
+       msg (ANSI_COLOR_DARKGRAY " [ " ANSI_COLOR_NORMAL "%s" ANSI_COLOR_DARKGRAY
+                       " ] " ANSI_COLOR_NORMAL "Show Menu " , DEFAULT_MENU_MENU);
+       msg (ANSI_COLOR_DARKGRAY " [ " ANSI_COLOR_NORMAL "%s" ANSI_COLOR_DARKGRAY
+                       " ] " ANSI_COLOR_NORMAL "Quit " , DEFAULT_MENU_QUIT);
 }
 
-static void _show_input_ok()
+static void _show_input_ok (void)
 {
-       msg("OK.");
+       msg ("OK.");
 }
 
-static void _show_menu(MManager *m, struct menu_data menu[])
+static void _show_menu (MManager *m, struct menu_data menu[])
 {
        int i = 0;
        int len = 0;
        struct menu_data *item;
+       char title_buf[256] = { 0, };
 
        if (!menu)
                return;
 
-       msg("");
-       msg("============================================");
-       len = g_queue_get_length(m->title_stack);
-       msgn(ANSI_COLOR_YELLOW " Main");
+       msg ("");
+       msg (HR_DOUBLE);
+
+       len = g_queue_get_length (m->title_stack);
+       msgn (ANSI_COLOR_YELLOW " Main");
        if (len > 0) {
                for (i = 0; i < len; i++) {
-                       msgn(ANSI_COLOR_NORMAL " >> " ANSI_COLOR_YELLOW "%s", (char *)g_queue_peek_nth(m->title_stack, i));
+                       msgn (ANSI_COLOR_NORMAL " >> " ANSI_COLOR_YELLOW "%s",
+                                       (char *) g_queue_peek_nth (m->title_stack, i));
                }
        }
-       msg(ANSI_COLOR_NORMAL);
-       msg("--------------------------------------------");
+       msg (ANSI_COLOR_NORMAL);
+       msg (HR_SINGLE);
 
+       hide_pid();
        i = 0;
+
        while (1) {
                item = menu + i;
                if (item->key == NULL)
                        break;
 
-               if (!g_strcmp0(item->key, "-")) {
-                       msgn("       ");
+               if (!g_strcmp0 (item->key, "-")) {
+                       msgn ("       ");
+               }
+               else if (!g_strcmp0 (item->key, "_")) {
+                       msg (ANSI_COLOR_DARKGRAY HR_SINGLE2 ANSI_COLOR_NORMAL);
+
+                       if (item->callback)
+                               item->callback (m, item);
+
+                       i++;
+
+                       continue;
+               }
+               else if (!g_strcmp0 (item->key, "*")) {
+                       msg (" %s", item->title);
+                       if (item->callback)
+                               item->callback (m, item);
                }
                else {
-                       msgn(ANSI_COLOR_DARKGRAY " [" ANSI_COLOR_NORMAL "%3s" ANSI_COLOR_DARKGRAY "] " ANSI_COLOR_NORMAL,
-                                       item->key);
+                       msgn (ANSI_COLOR_DARKGRAY " [" ANSI_COLOR_NORMAL "%3s"
+                                       ANSI_COLOR_DARKGRAY "] " ANSI_COLOR_NORMAL,     item->key);
+               }
+
+               memset (title_buf, 0, 256);
+               if (item->title) {
+                       snprintf (title_buf, MAX_TITLE, "%s", item->title);
+
+                       if (strlen (item->title) >= MAX_TITLE) {
+                               title_buf[MAX_TITLE - 2] = '.';
+                               title_buf[MAX_TITLE - 1] = '.';
+                       }
                }
 
                if (item->data) {
-                       msg("%s " ANSI_COLOR_LIGHTBLUE "(%s)" ANSI_COLOR_NORMAL, item->title, item->data);
+                       msg ("%s " ANSI_COLOR_LIGHTBLUE "(%s)" ANSI_COLOR_NORMAL,
+                                       title_buf, item->data);
+               }
+               else if (!g_strcmp0 (item->key, "*")) {
+                       /* none */
                }
                else {
-                       msg("%s", item->title);
+                       msg ("%s", title_buf);
+               }
+
+               if (item->sub_menu) {
+                       msg ("\e[1A\e[%dC >", POS_MORE);
                }
 
                i++;
        }
 
+       show_pid();
+
        _show_reserved_menu();
 
-       msg("============================================");
+       msg (HR_DOUBLE);
 
        _show_prompt();
 }
 
-static void _show_item_data_input_msg(struct menu_data *item)
+static void _show_item_data_input_msg (struct menu_data *item)
 {
-       msg("");
-       msg("============================================");
-       msg(" Input [%s] data ", item->title);
-       msg("--------------------------------------------");
-       msg(" current = [%s]", item->data);
-       msgn(" new >> ");
+       msg ("");
+       msg (HR_DOUBLE);
+       msg (" Input [%s] data ", item->title);
+       msg (HR_SINGLE);
+       msg (" current = [%s]", item->data);
+       msgn (" new >> ");
 }
 
-static void _move_menu(MManager *mm, struct menu_data menu[], char *key)
+static void _move_menu (MManager *mm, struct menu_data menu[], char *key)
 {
        struct menu_data *item;
        int i = 0;
@@ -134,24 +183,26 @@ static void _move_menu(MManager *mm, struct menu_data menu[], char *key)
        if (!mm->menu)
                return;
 
-       if (!g_strcmp0(DEFAULT_MENU_PREV, key)) {
-               if (g_queue_get_length(mm->stack) > 0) {
-                       mm->menu = g_queue_pop_tail(mm->stack);
-                       g_queue_pop_tail(mm->title_stack);
+       if (!g_strcmp0 (DEFAULT_MENU_PREV, key)) {
+               if (g_queue_get_length (mm->stack) > 0) {
+                       mm->menu = g_queue_pop_tail (mm->stack);
+                       g_queue_pop_tail (mm->title_stack);
                }
-               _show_menu(mm, mm->menu);
+
+               _show_menu (mm, mm->menu);
                mm->buf = key_buffer;
+
                return;
        }
-       else if (!g_strcmp0(DEFAULT_MENU_MENU, key)) {
-               _show_menu(mm, mm->menu);
+       else if (!g_strcmp0 (DEFAULT_MENU_MENU, key)) {
+               _show_menu (mm, mm->menu);
                return;
        }
-       else if (!g_strcmp0(DEFAULT_MENU_QUIT, key)) {
-               g_main_loop_quit(mm->mainloop);
+       else if (!g_strcmp0 (DEFAULT_MENU_QUIT, key)) {
+               g_main_loop_quit (mm->mainloop);
                return;
        }
-       else if (!g_strcmp0(DEFAULT_MENU_NONE, key)) {
+       else if (!g_strcmp0 (DEFAULT_MENU_NONE, key)) {
                _show_prompt();
                return;
        }
@@ -162,23 +213,24 @@ static void _move_menu(MManager *mm, struct menu_data menu[], char *key)
                if (item->key == NULL)
                        break;
 
-               if (!g_strcmp0(item->key, key)) {
+               if (!g_strcmp0 (item->key, key)) {
                        if (item->callback) {
-                               ret = item->callback(mm, item);
+                               ret = item->callback (mm, item);
                                _show_prompt();
                        }
-                       if (ret == RET_SUCCESS) {
+
+                       if(RET_SUCCESS == ret) {
                                if (item->sub_menu) {
-                                       g_queue_push_tail(mm->stack, mm->menu);
-                                       g_queue_push_tail(mm->title_stack, item->title);
+                                       g_queue_push_tail (mm->stack, mm->menu);
+                                       g_queue_push_tail (mm->title_stack, (gpointer *)item->title);
 
                                        mm->menu = item->sub_menu;
-                                       _show_menu(mm, mm->menu);
+                                       _show_menu (mm, mm->menu);
                                        mm->buf = key_buffer;
                                }
 
                                if (item->data) {
-                                       _show_item_data_input_msg(item);
+                                       _show_item_data_input_msg (item);
                                        mm->buf = item->data;
                                }
                        }
@@ -192,11 +244,14 @@ static void _move_menu(MManager *mm, struct menu_data menu[], char *key)
        _show_prompt();
 }
 
-MManager *menu_manager_new(struct menu_data items[], GMainLoop *mainloop)
+MManager *menu_manager_new (struct menu_data items[], GMainLoop *mainloop)
 {
        MManager *mm;
 
-       mm = calloc(sizeof(struct menu_manager), 1);
+       mm = calloc (sizeof (struct menu_manager), 1);
+       if (!mm)
+               return NULL;
+
        mm->stack = g_queue_new();
        mm->title_stack = g_queue_new();
        mm->menu = items;
@@ -205,16 +260,16 @@ MManager *menu_manager_new(struct menu_data items[], GMainLoop *mainloop)
        return mm;
 }
 
-int menu_manager_run(MManager *mm)
+int menu_manager_run (MManager *mm)
 {
-       _show_menu(mm, mm->menu);
+       _show_menu (mm, mm->menu);
 
        mm->buf = key_buffer;
 
        return 0;
 }
 
-int menu_manager_set_user_data(MManager *mm, void *user_data)
+int menu_manager_set_user_data (MManager *mm, void *user_data)
 {
        if (!mm)
                return -1;
@@ -224,7 +279,7 @@ int menu_manager_set_user_data(MManager *mm, void *user_data)
        return 0;
 }
 
-void *menu_manager_ref_user_data(MManager *mm)
+void *menu_manager_ref_user_data (MManager *mm)
 {
        if (!mm)
                return NULL;
@@ -232,36 +287,103 @@ void *menu_manager_ref_user_data(MManager *mm)
        return mm->user_data;
 }
 
-gboolean on_menu_manager_keyboard(GIOChannel *src, GIOCondition con, gpointer data)
+gboolean on_menu_manager_keyboard (GIOChannel *src, GIOCondition con,
+               gpointer data)
 {
        MManager *mm = data;
        char local_buf[MENU_DATA_SIZE + 1] = { 0, };
 
-       if (fgets(local_buf, MENU_DATA_SIZE, stdin) == NULL)
+       if (fgets (local_buf, MENU_DATA_SIZE, stdin) == NULL)
                return TRUE;
 
-       if (strlen(local_buf) > 0) {
-               if (local_buf[strlen(local_buf) - 1] == '\n')
-                       local_buf[strlen(local_buf) - 1] = '\0';
+       if (strlen (local_buf) > 0) {
+               if (local_buf[strlen (local_buf) - 1] == '\n')
+                       local_buf[strlen (local_buf) - 1] = '\0';
        }
 
        if (mm->buf == key_buffer) {
-               if (strlen(local_buf) < 1) {
+               if (strlen (local_buf) < 1) {
                        _show_prompt();
                        return TRUE;
                }
 
-               _move_menu(mm, mm->menu, local_buf);
+               _move_menu (mm, mm->menu, local_buf);
        }
        else {
                if (mm->buf) {
-                       memset(mm->buf, 0, MENU_DATA_SIZE);
-                       memcpy(mm->buf, local_buf, MENU_DATA_SIZE);
+                       memset (mm->buf, 0, MENU_DATA_SIZE);
+                       memcpy (mm->buf, local_buf, MENU_DATA_SIZE);
                        _show_input_ok();
                }
                mm->buf = key_buffer;
-               _move_menu(mm, mm->menu, DEFAULT_MENU_MENU);
+               _move_menu (mm, mm->menu, (char *)DEFAULT_MENU_MENU);
        }
 
        return TRUE;
 }
+
+pid_t get_tid ()
+{
+       return syscall (__NR_gettid);
+}
+
+void hide_pid ()
+{
+       flag_pid_display = 0;
+}
+
+void show_pid ()
+{
+       flag_pid_display = 1;
+}
+
+int is_pid_show ()
+{
+       return flag_pid_display;
+}
+
+static void _hex_dump(const char *pad, int size, const void *data)
+{
+       char buf[255] = {0, };
+       char hex[4] = {0, };
+       int i;
+       unsigned char *p;
+
+       if (size <= 0) {
+               msg("%sno data", pad);
+               return;
+       }
+       p = (unsigned char *)data;
+
+       snprintf(buf, 255, "%s%04X: ", pad, 0);
+       for (i = 0; i<size; i++) {
+               snprintf(hex, 4, "%02X ", p[i]);
+               strcat(buf, hex);
+
+               if ((i + 1) % 8 == 0) {
+                       if ((i + 1) % 16 == 0) {
+                               msg("%s", buf);
+                               memset(buf, 0, 255);
+                               snprintf(buf, 255, "%s%04X: ", pad, i + 1);
+                       }
+                       else {
+                               strcat(buf, "  ");
+                       }
+               }
+       }
+
+       msg("%s", buf);
+}
+
+void menu_print_dump(int data_len, void *data)
+{
+       if(!data)
+               return;
+
+       msg("");
+       msg("  \tlen=%d", data_len);
+       _hex_dump("        ", data_len, data);
+
+       msg("");
+}
+
index 60a9a09688f3ca677552e97c3b797c84ed7ed370..f92d6117b966f0c2ad5434a58ff6e6864621c302 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 __BEGIN_DECLS
 
-#define ANSI_COLOR_NORMAL "\e[0m"
-
-#define ANSI_COLOR_BLACK "\e[0;30m"
-#define ANSI_COLOR_RED "\e[0;31m"
-#define ANSI_COLOR_GREEN "\e[0;32m"
-#define ANSI_COLOR_BROWN "\e[0;33m"
-#define ANSI_COLOR_BLUE "\e[0;34m"
-#define ANSI_COLOR_MAGENTA "\e[0;35m"
-#define ANSI_COLOR_CYAN "\e[0;36m"
-#define ANSI_COLOR_LIGHTGRAY "\e[0;37m"
-
-#define ANSI_COLOR_DARKGRAY "\e[1;30m"
-#define ANSI_COLOR_LIGHTRED "\e[1;31m"
-#define ANSI_COLOR_LIGHTGREEN "\e[1;32m"
-#define ANSI_COLOR_YELLOW "\e[1;33m"
-#define ANSI_COLOR_LIGHTBLUE "\e[1;34m"
+#define ANSI_COLOR_NORMAL              "\e[0m"
+
+#define ANSI_COLOR_BLACK               "\e[0;30m"
+#define ANSI_COLOR_RED                 "\e[0;31m"
+#define ANSI_COLOR_GREEN               "\e[0;32m"
+#define ANSI_COLOR_BROWN               "\e[0;33m"
+#define ANSI_COLOR_BLUE                        "\e[0;34m"
+#define ANSI_COLOR_MAGENTA             "\e[0;35m"
+#define ANSI_COLOR_CYAN                        "\e[0;36m"
+#define ANSI_COLOR_LIGHTGRAY   "\e[0;37m"
+
+#define ANSI_COLOR_DARKGRAY            "\e[1;30m"
+#define ANSI_COLOR_LIGHTRED            "\e[1;31m"
+#define ANSI_COLOR_LIGHTGREEN  "\e[1;32m"
+#define ANSI_COLOR_YELLOW              "\e[1;33m"
+#define ANSI_COLOR_LIGHTBLUE   "\e[1;34m"
 #define ANSI_COLOR_LIGHTMAGENTA "\e[1;35m"
-#define ANSI_COLOR_LIGHTCYAN "\e[1;36m"
-#define ANSI_COLOR_WHITE "\e[1;37m"
+#define ANSI_COLOR_LIGHTCYAN   "\e[1;36m"
+#define ANSI_COLOR_WHITE               "\e[1;37m"
+
+
+#define msg(fmt,args...)       { fprintf(stdout, fmt "\n", ##args); \
+               fflush(stdout); }
+
+#define msgn(fmt,args...)      { fprintf(stdout, fmt, ##args); \
+               fflush(stdout); }
+
+/* Bold (green) */
+#define msgb(fmt,args...)  { fprintf(stdout, ANSI_COLOR_LIGHTGREEN fmt \
+               ANSI_COLOR_NORMAL "\n", ##args); fflush(stdout); }
+
+/* Property message */
+#define msgp(fmt,args...)  { fprintf(stdout, ANSI_COLOR_LIGHTMAGENTA fmt \
+               ANSI_COLOR_NORMAL "\n", ##args); fflush(stdout); }
 
-#define msg(fmt,args...) do { fprintf(stdout, fmt "\n", ##args); fflush(stdout); } while (0)
-#define msgn(fmt,args...) do { fprintf(stdout, fmt, ##args); fflush(stdout); } while (0)
-#define msgb(fmt,args...) do { fprintf(stdout, ANSI_COLOR_LIGHTGREEN fmt ANSI_COLOR_NORMAL "\n", ##args); fflush(stdout); } while (0)
+#define msgt(n,fmt,args...)    { fprintf(stdout, "\e[%dC" fmt "\n", \
+               3 + ((n) * 2), ##args); fflush(stdout); }
 
-#define MENU_DATA_SIZE         255
+#define pmsg(fmt,args...)      { \
+       if (is_pid_show()) { fprintf(stdout, "(%5d) ", get_tid()); } \
+       fprintf(stdout, fmt "\n", ##args); fflush(stdout); }
 
-#define CHECK_RT(x) \
-{ \
-       if (x != TEL_RETURN_SUCCESS) { \
-               msg("api call failed with [%d]", x); \
-               return 0; \
-       } \
-}
+#define pmsgb(fmt,args...)     { \
+       if (is_pid_show()) { fprintf(stdout, "(%5d) ", get_tid()); } \
+       fprintf(stdout, ANSI_COLOR_LIGHTGREEN fmt \
+                       ANSI_COLOR_NORMAL "\n", ##args); fflush(stdout); }
 
+#define pmsgt(n,fmt,args...) { \
+       if (is_pid_show()) { fprintf(stdout, "(%5d) ", get_tid()); } \
+       fprintf(stdout, "\e[%dC" fmt "\n", \
+                       3 + ((n) * 2), ##args); fflush(stdout); }
+
+#define MENU_DATA_SIZE 255
+
+
+
+/*
+ * Horizontal Line - width: 65
+ *                                     .12345678901234567890123456789012345678901234567890.
+ */
+#define HR_SINGLE      "----------------------------------------" \
+                                       "-------------------------"
+#define HR_DOUBLE      "========================================" \
+                                       "========================="
+#define HR_SINGLE2     " ---------------------------------------" \
+                                       "------------------------ "
+
+#define MAX_WIDTH      strlen (HR_SINGLE)
+#define MAX_TITLE      ((MAX_WIDTH) - 10)
+#define POS_MORE       ((MAX_WIDTH) - 3)
 #define RET_SUCCESS 0
 #define RET_FAILURE -1
 
 typedef struct menu_manager MManager;
 
 struct menu_data {
-       char *key;
-       char *title;
+       const char *key;
+       const char *title;
        struct menu_data *sub_menu;
        int (*callback)(MManager *mm, struct menu_data *menu);
        char *data;
@@ -74,7 +111,14 @@ int       menu_manager_run(MManager *mm);
 int       menu_manager_set_user_data(MManager *mm, void *user_data);
 void*     menu_manager_ref_user_data(MManager *mm);
 
-gboolean  on_menu_manager_keyboard(GIOChannel *src, GIOCondition con, gpointer data);
+gboolean  on_menu_manager_keyboard(GIOChannel *src, GIOCondition con,
+               gpointer data);
+
+pid_t     get_tid ();
+void      hide_pid ();
+void      show_pid ();
+int       is_pid_show ();
+void      menu_print_dump(int data_len, void *data);
 
 __END_DECLS
 
old mode 100755 (executable)
new mode 100644 (file)
index c28a561..4effd3c
@@ -1,9 +1,9 @@
 /*
- * libtapi
- * Telephony test application
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <sys/time.h>
 #include <unistd.h>
 #include <glib.h>
-#include <glib-object.h>
 
-#include <tapi.h>
-#include <tapi_modem.h>
-#include <tapi_events.h>
+#include <tapi_common.h>
+#include <ITapiModem.h>
+#include <TapiUtility.h>
 
 #include "menu.h"
 #include "modem.h"
 
-static char *dbg_modem_power_status[] = {"OFF", "ON", "RESET", };
+static char data_modem_set_flight_mode_mode[MENU_DATA_SIZE + 1] = "1";
+static char data_modem_set_power_mode[MENU_DATA_SIZE + 1] = "1";
 
-static char *dbg_modem_status[] = {"TEL_MODEM_POWER_OFF", "TEL_MODEM_POWER_ON",
-               "TEL_MODEM_POWER_ERROR", };
+static void on_noti_modem_power(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       int *status = data;
 
-static char *dbg_modem_result[] = {"TEL_MODEM_RESULT_SUCCESS", "TEL_MODEM_RESULT_FAILURE",
-               "TEL_MODEM_RESULT_INVALID_PARAMETER", "TEL_MODEM_RESULT_MEMORY_FAILURE",
-               "TEL_MODEM_RESULT_OPERATION_NOT_SUPPORTED", "TEL_MODEM_RESULT_OPERATION_NOT_PERMITTED",
-               "TEL_MODEM_RESULT_UNKNOWN_FAILURE", };
+       msg("");
+       msgb("event(%s) receive !!", TAPI_NOTI_MODEM_POWER);
 
-static char data_modem_set_flight_mode[MENU_DATA_SIZE + 1] = "1";
-static char data_modem_set_power_mode[MENU_DATA_SIZE + 1] = "1";
+       if (!status)
+               return;
+
+       msg(" - status = 0x%x", *status);
+}
 
-static void on_noti_modem_power_status(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+static void on_modem_get_version(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       gboolean *status = data;
+       TelMiscVersionInformation *info = data;
 
        msg("");
-       msgb("event(%s) received !!", TEL_NOTI_MODEM_POWER_STATUS);
+       msgb("tel_get_misc_me_version() response receive");
+       msg(" - result = 0x%x", result);
 
-       if (!status)
+       if (!info)
                return;
 
-       msg("modem power status[%s]", (*status == TRUE) ? "ON" : "OFF");
+       msg(" - sw version = %s", info->szSwVersion);
+       msg(" - hw version = %s", info->szHwVersion);
+       msg(" - RfCal Date = %s", info->szRfCalDate);
+       msg(" - Product Code = %s", info->szProductCode);
+       msg(" - Model ID = %s", info->szModelId);
+       msg(" - Prl Version = %s", info->szPrlVersion);
+       msg(" - ERI Version = %s", info->szEriVersion);
 }
 
-static void on_noti_modem_flight_mode_status(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+static void on_modem_get_serial_number(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       gboolean *status = data;
+       TelMiscSNInformation *sn = data;
 
        msg("");
-       msgb("event(%s) received !!", TEL_NOTI_MODEM_FLIGHT_MODE_STATUS);
+       msgb("tel_get_misc_me_sn() response receive");
+       msg(" - result = 0x%x", result);
 
-       if (!status)
+       if (!sn)
                return;
 
-       msg("modem flight mode status[%s]", (*status == TRUE) ? "ON" : "OFF");
+       msg(" - esn number = %s", sn->szEsn);
+       msg(" - meid number = %s", sn->szMeid);
+       msg(" - imei number = %s", sn->szImei);
+       msg(" - imeisv number = %s", sn->szImeiSv);
+
 }
 
-static int run_modem_get_version(MManager *mm, struct menu_data *menu)
+static void on_modem_get_imei(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelModemVersion version;
-       TelReturn rt = 0;
+       char *imei = data;
 
-       msg("call tapi_modem_get_version()");
+       msg("");
+       msgb("tel_get_misc_me_imei() response receive");
+       msg(" - result = 0x%x", result);
 
-       memset(&version, 0, sizeof(TelModemVersion));
+       if (!imei)
+               return;
 
-       rt = tapi_modem_get_version(handle, &version);
-       CHECK_RT(rt);
+       msg(" - IMEI = %s", imei);
+}
 
-       msg("sw version: [%s]", version.software_version);
-       msg("hw version: [%s]", version.hardware_version);
-       msg("RfCal Date: [%s]", version.calibration_date);
-       msg("Product Code: [%s]", version.product_code);
+static void on_modem_get_flight_mode(TapiHandle *handle, int result, void *data, void *user_data)
+{
+       gboolean *mode = data;
 
-       return 0;
+       msg("");
+       msgb("tel_get_flight_mode() response receive");
+       msg(" - result = 0x%x", result);
+
+       if (data)
+               msg(" - mode = %d", *mode);
 }
 
-static int run_modem_get_imei(MManager *mm, struct menu_data *menu)
+static void on_modem_set_flight_mode(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       char imei[TEL_MODEM_IMEI_LENGTH_MAX + 1] = {};
-       TelReturn rt = 0;
+       msg("");
+       msgb("tel_set_flight_mode() response receive");
+       msg(" - result = 0x%x", result);
+}
 
-       msg("call tapi_modem_get_imei()");
+static void on_modem_set_power(TapiHandle *handle, int result, void *data, void *user_data)
+{
+       msg("");
+       msgb("tel_process_power_command() response receive");
+       msg(" - result = 0x%x", result);
+}
 
-       rt = tapi_modem_get_imei(handle, imei);
-       CHECK_RT(rt);
+static int run_modem_get_version(MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
 
-       msg("imei: [%s]", imei);
+       msg("call tel_get_misc_me_version()");
+
+       result = tel_get_misc_me_version(handle, on_modem_get_version, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
 
        return 0;
 }
 
-static void on_modem_set_power_status(TelHandle *handle, int result, void *data, void *user_data)
+static int run_modem_get_version_sync(MManager *mm, struct menu_data *menu)
 {
-       msgb("tapi_modem_set_power_status() response received");
-       if (result >= TEL_MODEM_RESULT_SUCCESS && result <= TEL_MODEM_RESULT_UNKNOWN_FAILURE) {
-               msg("access_rt[%d][%s]", result, dbg_modem_result[result]);
-       } else {
-               msg("access_rt[%d]", result);
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       TelMiscVersionInformation *info;
+
+       msg("call tel_get_misc_me_version_sync()");
+
+       info = tel_get_misc_me_version_sync(handle);
+       if (!info) {
+               msg("failed.");
+               return 0;
        }
+
+       msg(" - sw version = %s", info->szSwVersion);
+       msg(" - hw version = %s", info->szHwVersion);
+       msg(" - RfCal Date = %s", info->szRfCalDate);
+       msg(" - Product Code = %s", info->szProductCode);
+       msg(" - Model ID = %s", info->szModelId);
+       msg(" - Prl Version = %s", info->szPrlVersion);
+       msg(" - ERI Version = %s", info->szEriVersion);
+
+       free(info);
+
+       return 0;
 }
 
-static int run_modem_set_power_status(MManager *mm, struct menu_data *menu)
+static int run_modem_get_serial_number(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelModemPowerStatus mode;
-       TelReturn rt = 0;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
 
-       msg("call tapi_modem_set_power_status()");
+       msg("call tel_get_misc_me_sn()");
 
-       mode = atoi(data_modem_set_power_mode);
+       result = tel_get_misc_me_sn(handle, on_modem_get_serial_number, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
 
-       if (mode <= TEL_MODEM_POWER_ERROR) {
-               msg("Requested power mode: [%d][%s]", mode, dbg_modem_power_status[mode]);
-       } else {
-               msg("Requested power mode: [%d]", mode);
+       return 0;
+}
+
+static int run_modem_get_serial_number_sync(MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       TelMiscSNInformation *sn;
+
+       msg("call tel_get_misc_me_sn_sync()");
+
+       sn = tel_get_misc_me_sn_sync(handle);
+       if (!sn) {
+               msg("failed.");
+               return 0;
        }
 
-       rt = tapi_modem_set_power_status(handle, mode, on_modem_set_power_status, NULL);
-       CHECK_RT(rt);
+       msg(" - esn number = [%s]", sn->szEsn);
+       msg(" - meid number = [%s]", sn->szMeid);
+       msg(" - imei number = [%s]", sn->szImei);
+       msg(" - imeisv number = [%s]", sn->szImeiSv);
+
+       free(sn);
 
        return 0;
 }
 
-static int run_modem_get_power_status(MManager *mm, struct menu_data *menu)
+static int run_modem_get_imei(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelModemPowerStatus status;
-       TelReturn rt = 0;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+
+       msg("call tel_get_misc_me_imei()");
 
-       msg("call tapi_modem_get_power_status()");
+       result = tel_get_misc_me_imei(handle, on_modem_get_imei, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
 
-       rt = tapi_modem_get_power_status(handle, &status);
-       CHECK_RT(rt);
+       return 0;
+}
 
-       if (status <= TEL_MODEM_POWER_ERROR) {
-               msg("status[%d][%s]", status, dbg_modem_status[status]);
-       } else {
-               msg("status[%d]", status);
+static int run_modem_get_imei_sync(MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       char *imei;
+
+       msg("call tel_get_misc_me_imei_sync()");
+
+       imei = tel_get_misc_me_imei_sync(handle);
+       if (!imei) {
+               msg("failed.");
+               return 0;
        }
 
+       msg(" - imei = [%s]", imei);
+
+       free(imei);
+
        return 0;
 }
 
-static void on_modem_set_flight_mode(TelHandle *handle, int result, void *data, void *user_data)
+static int run_modem_set_power(MManager *mm, struct menu_data *menu)
 {
-       msgb("tapi_modem_set_flight_mode() response received");
-       if (result >= TEL_MODEM_RESULT_SUCCESS && result <= TEL_MODEM_RESULT_UNKNOWN_FAILURE) {
-               msg("access_rt[%d][%s]", result, dbg_modem_result[result]);
-       } else {
-               msg("access_rt[%d]", result);
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+       int mode;
+
+       msg("call tel_process_power_command()");
+
+       mode = atoi(data_modem_set_power_mode);
+
+       result = tel_process_power_command(handle, mode, on_modem_set_power, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
        }
+
+       return 0;
 }
 
 static int run_modem_set_flight_mode(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       gboolean enable;
-       TelReturn rt = 0;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+       int mode;
 
-       msg("call tapi_modem_set_flight_mode()");
+       msg("call tel_set_flight_mode()");
 
-       enable = atoi(data_modem_set_flight_mode);
-       msg("Requested flight mode: [%s]", ((enable == 1) ? "ON" : "OFF"));
+       mode = atoi(data_modem_set_flight_mode_mode);
 
-       rt = tapi_modem_set_flight_mode(handle, enable, on_modem_set_flight_mode, NULL);
-       CHECK_RT(rt);
+       result = tel_set_flight_mode(handle, mode, on_modem_set_flight_mode, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
 
        return 0;
 }
 
 static int run_modem_get_flight_mode(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       gboolean enable;
-       TelReturn rt = 0;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+
+       msg("call tel_get_flight_mode()");
+
+       result = tel_get_flight_mode(handle, on_modem_get_flight_mode, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
+
+       return 0;
+}
+
+static int run_modem_check_power(MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+       int status = 0;
 
-       msg("call tapi_modem_get_flight_mode()");
+       msg("call tel_check_modem_power_status()");
 
-       rt = tapi_modem_get_flight_mode(handle, &enable);
-       CHECK_RT(rt);
+       result = tel_check_modem_power_status(handle, &status);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+               return 0;
+       }
 
-       msg("Flight mode status: [%s]", ((enable == 1) ? "ON" : "OFF"));
+       msg(" - status = %d", status);
 
        return 0;
 }
@@ -209,55 +315,74 @@ static struct menu_data menu_modem_get_version[] = {
        { NULL, NULL, },
 };
 
+static struct menu_data menu_modem_get_version_sync[] = {
+       { "1", "run", NULL, run_modem_get_version_sync, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_modem_get_serial_number[] = {
+       { "1", "run", NULL, run_modem_get_serial_number, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_modem_get_serial_number_sync[] = {
+       { "1", "run", NULL, run_modem_get_serial_number_sync, NULL},
+       { NULL, NULL, },
+};
+
 static struct menu_data menu_modem_get_imei[] = {
        { "1", "run", NULL, run_modem_get_imei, NULL},
        { NULL, NULL, },
 };
 
-static struct menu_data menu_modem_set_power_status[] = {
-       { "1", "mode (0=OFF, 1=ON, 2=RESET)", NULL, NULL, data_modem_set_power_mode},
-       { "2", "run", NULL, run_modem_set_power_status, NULL},
+static struct menu_data menu_modem_get_imei_sync[] = {
+       { "1", "run", NULL, run_modem_get_imei_sync, NULL},
        { NULL, NULL, },
 };
 
-static struct menu_data menu_modem_get_power_status[] = {
-       { "1", "run", NULL, run_modem_get_power_status, NULL},
+static struct menu_data menu_modem_get_flight_mode[] = {
+       { "1", "run", NULL, run_modem_get_flight_mode, NULL},
        { NULL, NULL, },
 };
 
 static struct menu_data menu_modem_set_flight_mode[] = {
-       { "1", "mode (0=OFF, 1=ON)", NULL, NULL, data_modem_set_flight_mode},
+       { "1", "mode (1=ON, 2=OFF)", NULL, NULL, data_modem_set_flight_mode_mode},
        { "2", "run", NULL, run_modem_set_flight_mode, NULL},
        { NULL, NULL, },
 };
 
-static struct menu_data menu_modem_get_flight_mode[] = {
-       { "1", "run", NULL, run_modem_get_flight_mode, NULL},
+static struct menu_data menu_modem_set_power[] = {
+       { "1", "mode (0=ON, 1=OFF, 2=RESET, 3=LOW)", NULL, NULL, data_modem_set_power_mode},
+       { "2", "run", NULL, run_modem_set_power, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_modem_check_power[] = {
+       { "1", "run (sync api)", NULL, run_modem_check_power, NULL},
+       { "-", "(-1=unknown, 0=on, 1=off, 2=rst, 3=low, 4=err)", NULL, NULL, NULL},
        { NULL, NULL, },
 };
 
 struct menu_data menu_modem[] = {
-       { "1g", "Get Modem Version", menu_modem_get_version, NULL, NULL},
-       { "2g", "Get IMEI", menu_modem_get_imei, NULL, NULL},
-       { "3s", "Set Modem Power Status", menu_modem_set_power_status, NULL, NULL},
-       { "3g", "Get Modem Status", menu_modem_get_power_status, NULL, NULL},
-       { "4s", "Set Flight Mode", menu_modem_set_flight_mode, NULL, NULL},
-       { "4g", "Get Flight Mode", menu_modem_get_flight_mode, NULL, NULL},
+       { "1", "tel_get_misc_me_version", menu_modem_get_version, NULL, NULL},
+       { "1s", "tel_get_misc_me_version_sync", menu_modem_get_version_sync, NULL, NULL},
+       { "2", "tel_get_misc_me_sn", menu_modem_get_serial_number, NULL, NULL},
+       { "2s", "tel_get_misc_me_sn_sync", menu_modem_get_serial_number_sync, NULL, NULL},
+       { "3", "tel_get_misc_me_imei", menu_modem_get_imei, NULL, NULL},
+       { "3s", "tel_get_misc_me_imei_sync", menu_modem_get_imei_sync, NULL, NULL},
+       { "4", "tel_get_flight_mode", menu_modem_get_flight_mode, NULL, NULL},
+       { "4s", "tel_set_flight_mode", menu_modem_set_flight_mode, NULL, NULL},
+       { "5", "tel_process_power_command", menu_modem_set_power, NULL, NULL},
+       { "6", "tel_check_modem_power_status", menu_modem_check_power, NULL, NULL},
        { NULL, NULL, },
 };
 
-void register_modem_event(TelHandle *handle)
+void register_modem_event(TapiHandle *handle)
 {
-       TelReturn ret;
-
-       /* Event register can fail only in Invalid input parameter case
-        * Assuming we pass valid input parameters
-        */
-       ret = tapi_register_event_id(handle, TEL_NOTI_MODEM_POWER_STATUS, on_noti_modem_power_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_MODEM_POWER_STATUS - register event failed: [%d]", ret);
-
-       ret = tapi_register_event_id(handle, TEL_NOTI_MODEM_FLIGHT_MODE_STATUS, on_noti_modem_flight_mode_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_MODEM_FLIGHT_MODE_STATUS - register event failed: [%d]", ret);
+       int ret;
+
+       ret = tel_register_noti_event(handle, TAPI_NOTI_MODEM_POWER, on_noti_modem_power, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 }
index 61c32c892a5d483baaea6574c89d77c67bdf1c0b..155d97f4aa03db414dad13bfc658ac19ad8b1777 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,6 +22,6 @@
 #define __MODEM_H__
 
 
-void register_modem_event(TelHandle *handle);
+void register_modem_event(TapiHandle *handle);
 
 #endif
index 5d9868ac6d95a666ad1df485967607338b7ee69c..7ea2c7abe5c537002880042af1cdd2f6443d7003 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <sys/time.h>
 #include <unistd.h>
 #include <glib.h>
-#include <glib-object.h>
 
-#include <tapi.h>
-#include <tapi_events.h>
-#include <tapi_network.h>
+#include <tapi_common.h>
+#include <ITapiNetwork.h>
+#include <TapiUtility.h>
 
 #include "menu.h"
 #include "network.h"
 
-#define CHECK_NETWORK_RESULT(x) \
-{ \
-       if (x >= TEL_NETWORK_RESULT_SUCCESS && x <= TEL_NETWORK_RESULT_OPERATION_NOT_SUPPORTED) { \
-               msg("result[%d][%s]", x, dbg_network_result[x]); \
-       } else { \
-               msg("API failed with result[%d]", x); \
-       } \
-       if (x != TEL_NETWORK_RESULT_SUCCESS) \
-               return; \
+static char data_net_set_plmn_mode_manual_act[MENU_DATA_SIZE + 1] = "4";
+static char data_net_set_plmn_mode_manual_plmn[MENU_DATA_SIZE + 1] = "45001";
+static char data_net_set_preferred_plmn_mode[MENU_DATA_SIZE + 1] = "1";
+static char data_net_set_preferred_plmn_plmn[MENU_DATA_SIZE + 1] = "45001";
+static char data_net_set_preferred_plmn_type[MENU_DATA_SIZE + 1] = "4";
+static char data_net_set_preferred_plmn_ef_index[MENU_DATA_SIZE + 1] = "0";
+
+static char data_net_set_mode_mode[MENU_DATA_SIZE + 1] = "8";
+static char data_net_set_emergency_callback_mode_mode[MENU_DATA_SIZE + 1] = "1";
+static char data_net_set_roaming_preference_roam_pref[MENU_DATA_SIZE + 1] = "1";
+
+static void on_prop_signal_dbm (TapiHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       int *sig_dbm = data;
+
+       msg ("");
+       msgp ("property(%s) receive !!", TAPI_PROP_NETWORK_SIGNALSTRENGTH_DBM);
+
+       msg (" - sig_dbm = %d", *sig_dbm);
 }
 
-static char *dbg_network_result[] = {"TEL_NETWORK_RESULT_SUCCESS", "TEL_NETWORK_RESULT_FAILURE",
-               "TEL_NETWORK_RESULT_INVALID_PARAMETER", "TEL_NETWORK_RESULT_MEMORY_FAILURE",
-               "TEL_NETWORK_RESULT_OPERATION_NOT_PERMITTED", "TEL_NETWORK_RESULT_OPERATION_NOT_SUPPORTED", };
+static void on_prop_signal_level (TapiHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       int *sig_level = data;
 
-static char data_network_act[MENU_DATA_SIZE + 1] = "";
-static char data_network_plmn[MENU_DATA_SIZE + 1] = "45001";
-static char data_network_plmn_index[MENU_DATA_SIZE + 1] = "1";
-static char data_network_mode[MENU_DATA_SIZE + 1] = "";
+       msg ("");
+       msgp ("property(%s) receive !!", TAPI_PROP_NETWORK_SIGNALSTRENGTH_LEVEL);
 
+       msg (" - sig_level = %d", *sig_level);
+}
 
-/* Notification Callbacks */
-static void on_noti_registration_status(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+static void on_prop_lac (TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       TelNetworkRegStatusInfo *reg_info = data;
+       int *lac = data;
 
-       msg("");
-       msgb("event(%s) received !!", TEL_NOTI_NETWORK_REGISTRATION_STATUS);
+       msg ("");
+       msgp ("property(%s) receive !!", TAPI_PROP_NETWORK_LAC);
 
-       if (!reg_info) {
-               msg("Network registration status noti data is null");
-               return;
-       }
+       msg (" - lac = %d", *lac);
+}
+
+static void on_prop_plmn (TapiHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       msg ("");
+       msgp ("property(%s) receive !!", TAPI_PROP_NETWORK_PLMN);
 
-       msg("circuit status[%d]", reg_info->cs_status);
-       msg("packet status[%d]", reg_info->ps_status);
-       msg("access technology[%d]", reg_info->act);
+       msg (" - plmn = %s", (char *)data);
 }
 
-static void on_noti_cell_info(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+static void on_prop_cellid (TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       TelNetworkCellInfo *cell_info = data;
+       int *cell_id = data;
 
-       msg("");
-       msgb("event(%s) received !!", TEL_NOTI_NETWORK_CELL_INFO);
+       msg ("");
+       msgp ("property(%s) receive !!", TAPI_PROP_NETWORK_CELLID);
 
-       if (!cell_info) {
-               msg("Network cell info noti data is null");
-               return;
-       }
+       msg (" - cell_id = %d", *cell_id);
+}
+
+static void on_prop_service_type (TapiHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       int *service_type = data;
+
+       msg ("");
+       msgp ("property(%s) receive !!", TAPI_PROP_NETWORK_SERVICE_TYPE);
 
-       msg("lac[%d]", cell_info->lac);
-       msg("cell_id[%d]", cell_info->cell_id);
-       msg("rac[%d]", cell_info->rac);
+       msg (" - service_type = %d", *service_type);
 }
 
-static void on_noti_identity(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+static void on_prop_act (TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       TelNetworkIdentityInfo *id_info = data;
+       int *act = data;
 
-       msg("");
-       msgb("event(%s) received !!", TEL_NOTI_NETWORK_IDENTITY);
+       msg ("");
+       msgp ("property(%s) receive !!", TAPI_PROP_NETWORK_ACT);
 
-       if (!id_info) {
-               msg("Network identity noti data is null");
-               return;
-       }
+       msg (" - access technology = %d", *act);
+}
 
-       msg("plmn[%s]", id_info->plmn);
-       msg("short_name[%s]", id_info->short_name);
-       msg("long_name[%s]", id_info->long_name);
+static void on_prop_ps_type (TapiHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       int *ps_type = data;
+
+       msg ("");
+       msgp ("property(%s) receive !!", TAPI_PROP_NETWORK_PS_TYPE);
+
+       msg (" - ps_type = %d", *ps_type);
 }
 
-static void on_noti_rssi(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+static void on_prop_circuit_status (TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       unsigned int *rssi = data;
+       int *circuit_status = data;
 
-       msg("");
-       msgb("event(%s) received !!", TEL_NOTI_NETWORK_RSSI);
+       msg ("");
+       msgp ("property(%s) receive !!", TAPI_PROP_NETWORK_CIRCUIT_STATUS);
 
-       if (!rssi) {
-               msg("Network Rssi noti data is null");
-               return;
-       }
+       msg (" - circuit_status = %d", *circuit_status);
+}
+
+static void on_prop_packet_status (TapiHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       int *packet_status = data;
 
-       msg("RSSI[%d]", *rssi);
+       msg ("");
+       msgp ("property(%s) receive !!", TAPI_PROP_NETWORK_PACKET_STATUS);
+
+       msg (" - packet_status = %d", *packet_status);
 }
 
-static void on_noti_time_info(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+static void on_prop_roaming_status (TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       TelNetworkNitzInfoNoti *time_info = data;
+       guchar *roaming_status = data;
 
-       msg("");
-       msgb("event(%s) received !!", TEL_NOTI_NETWORK_TIME_INFO);
+       msg ("");
+       msgp ("property(%s) receive !!", TAPI_PROP_NETWORK_ROAMING_STATUS);
 
-       if (!time_info) {
-               msg("Time info noti data is null");
-               return;
-       }
+       msg (" - roaming_status = %d", *roaming_status);
+}
 
-       msg("plmn[%s]", time_info->plmn);
-       msg("year[%d]", time_info->year);
-       msg("month[%d]", time_info->month);
-       msg("day[%d]", time_info->day);
-       msg("hour[%d]", time_info->hour);
-       msg("minute[%d]", time_info->minute);
-       msg("second[%d]", time_info->second);
-       msg("GMT offset[%d]", time_info->gmtoff);
-       msg("DST offset[%d]", time_info->dstoff);
-       msg("is DST[%d]", time_info->isdst);
+static void on_prop_name_option (TapiHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       int *option = data;
+
+       msg ("");
+       msgp ("property(%s) receive !!", TAPI_PROP_NETWORK_NAME_OPTION);
+
+       msg (" - name_option = %d", *option);
 }
 
-static int run_net_get_registration_info(MManager *mm, struct menu_data *menu)
+static void on_prop_network_name (TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelNetworkRegistrationInfo reg_info;
-       TelReturn rt = 0;
+       msg ("");
+       msgp ("property(%s) receive !!", TAPI_PROP_NETWORK_NETWORK_NAME);
 
-       msg("call tapi_network_get_registration_info()");
+       msg (" - network_name = %s", (char *)data);
+}
 
-       memset(&reg_info, 0, sizeof(TelNetworkRegistrationInfo));
+static void on_prop_spn_name (TapiHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       msg ("");
+       msgp ("property(%s) receive !!", TAPI_PROP_NETWORK_SPN_NAME);
 
-       rt = tapi_network_get_registration_info(handle, &reg_info);
-       CHECK_RT(rt);
+       msg (" - spn_name = %s", (char *)data);
+}
+
+static void on_prop_ims_voice_status (TapiHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       int *status = data;
 
-       msg("cs_status[%d]", reg_info.reg_status_info.cs_status);
-       msg("ps_status[%d]", reg_info.reg_status_info.ps_status);
-       msg("act[%d]", reg_info.reg_status_info.act);
-       msg("lac[%d]", reg_info.cell_info.lac);
-       msg("cell_id[%d]", reg_info.cell_info.cell_id);
-       msg("rac[%d]", reg_info.cell_info.rac);
+       msg ("");
+       msgp ("property(%s) receive !!", TAPI_PROP_NETWORK_IMS_VOICE_SUPPORT_STATUS);
 
-       return 0;
+       if (status != NULL)
+               msg (" - ims_voice_support_status = %d", *status);
+}
+
+static void on_noti_registration_status(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       TelNetworkRegistrationStatus_t *noti = data;
+
+       msg ("");
+       msgb ("event(%s) receive !!", TAPI_NOTI_NETWORK_REGISTRATION_STATUS);
+
+       msg (" - circuit status = %d", noti->cs);
+       msg (" - packet status = %d", noti->ps);
+       msg (" - service type = %d", noti->type);
+       msg (" - is roaming = %d", noti->is_roaming);
+}
+
+static void on_noti_cell_info(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       struct tel_noti_network_cell_info *noti = data;
+
+       msg ("");
+       msgb ("event(%s) receive !!", TAPI_NOTI_NETWORK_CELLINFO);
+
+       msg (" - lac = %d", noti->lac);
+       msg (" - cell_id = %d", noti->cell_id);
+}
+
+static void on_noti_change(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       struct tel_noti_network_change *noti = data;
+
+       msg ("");
+       msgb ("event(%s) receive !!", TAPI_NOTI_NETWORK_CHANGE);
+
+       msg (" - plmn = %s", noti->plmn);
+       msg (" - act = %d", noti->act);
+}
+
+static void on_noti_time_info(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       struct tel_noti_network_time_info *noti = data;
+
+       msg ("");
+       msgb ("event(%s) receive !!", TAPI_NOTI_NETWORK_TIMEINFO);
+
+       msg (" - plmn = %s", noti->plmn);
+       msg (" - year = %d", noti->year);
+       msg (" - month = %d", noti->month);
+       msg (" - day = %d", noti->day);
+       msg (" - hour = %d", noti->hour);
+       msg (" - minute = %d", noti->minute);
+       msg (" - second = %d", noti->second);
+       msg (" - wday = %d", noti->wday);
+       msg (" - gmtoff = %d", noti->gmtoff);
+       msg (" - dstoff = %d", noti->dstoff);
+       msg (" - isdst = %d", noti->isdst);
+}
+
+static void on_noti_identity(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       struct tel_noti_network_identity *noti = data;
+
+       msg ("");
+       msgb ("event(%s) receive !!", TAPI_NOTI_NETWORK_IDENTITY);
+
+       msg (" - plmn = %s", noti->plmn);
+       msg (" - short_name = %s", noti->short_name);
+       msg (" - full_name = %s", noti->full_name);
+}
+
+static void on_noti_signal_strength(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       struct tel_noti_network_signal_strength *noti = data;
+
+       msg ("");
+       msgb ("event(%s) receive !!", TAPI_NOTI_NETWORK_SIGNALSTRENGTH);
+
+       msg (" - dbm = %d", noti->dbm);
+}
+
+static void on_noti_default_data_subs(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       struct tel_noti_network_default_data_subs *noti = data;
+
+       msg ("");
+       msgb ("event(%s) receive !!", TAPI_NOTI_NETWORK_DEFAULT_DATA_SUBSCRIPTION);
+
+       if (noti)
+               msg (" - 'default' Data Subscription = %s",
+                       ((noti->default_subs == TAPI_NETWORK_DEFAULT_DATA_SUBS_SIM1) ? "SIM 1"
+                       : ((noti->default_subs == TAPI_NETWORK_DEFAULT_DATA_SUBS_SIM2) ? "SIM 2"
+                       : "Unknown")));
+}
+
+static void on_noti_default_subs(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       struct tel_noti_network_default_subs *noti = data;
+
+       msg ("");
+       msgb ("event(%s) receive !!", TAPI_NOTI_NETWORK_DEFAULT_SUBSCRIPTION);
+
+       if (noti)
+               msg (" - 'default' Subscription = %s",
+                       ((noti->default_subs == TAPI_NETWORK_DEFAULT_SUBS_SIM1) ? "SIM 1"
+                       : ((noti->default_subs == TAPI_NETWORK_DEFAULT_SUBS_SIM2) ? "SIM 2"
+                       : "Unknown")));
+}
+
+static void on_noti_emergency_callback_mode(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       struct tel_noti_network_emergency_callback_mode *noti = data;
+
+       msg ("");
+       msgb ("event(%s) receive !!", TAPI_NOTI_NETWORK_EMERGENCY_CALLBACK_MODE);
+
+       msg (" - mode = %d", noti->mode);
 }
 
-static void on_net_get_net_id_info(TelHandle *handle, int result, void *data, void *user_data)
+static void on_net_search(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       TelNetworkIdentityInfo *id_info = data;
+       TelNetworkPlmnList_t *list = data;
+       int i =0;
 
-       msg("tapi_network_get_identity_info() response received");
-       CHECK_NETWORK_RESULT(result);
+       msg ("");
+       msgb ("tel_search_network() response receive");
+       msg (" - result = 0x%x", result);
 
-       if (!id_info) {
-               msg("network identity info data is null");
+       if (!list) {
+               msg (" - failed");
                return;
        }
 
-       msg("plmn[%s]", id_info->plmn);
-       msg("short_name[%s]", id_info->short_name);
-       msg("long_name[%s]", id_info->long_name);
+       msg (" - count = %d", list->networks_count);
+
+       for (i = 0; i < list->networks_count; i++) {
+               msg (" - [%d] plmn=%s, act=%d, type=%d, name=%s",
+                               i,
+                               list->network_list[i].plmn,
+                               list->network_list[i].access_technology,
+                               list->network_list[i].type_of_plmn,
+                               list->network_list[i].network_name);
+       }
 }
 
-static int run_net_get_net_id_info(MManager *mm, struct menu_data *menu)
+static void on_net_set_plmn_mode_automatic(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
+       msg ("");
+       msgb ("tel_select_network_automatic() response receive");
+       msg (" - result = 0x%x", result);
+}
 
-       msg("call tapi_network_get_identity_info()");
+static void on_net_set_plmn_mode_manual(TapiHandle *handle, int result, void *data, void *user_data)
+{
+       msg ("");
+       msgb ("tel_select_network_manual() response receive");
+       msg (" - result = 0x%x", result);
+}
+
+static void on_net_get_plmn_mode(TapiHandle *handle, int result, void *data, void *user_data)
+{
+       int *mode = data;
 
-       rt = tapi_network_get_identity_info(handle, on_net_get_net_id_info, NULL);
-       CHECK_RT(rt);
+       msg ("");
+       msgb ("tel_get_network_selection_mode() response receive");
+       msg (" - result = 0x%x", result);
 
-       return 0;
+       if (data)
+               msg (" - mode = %d", *mode);
 }
 
-static void on_net_search(TelHandle *handle, int result, void *data, void *user_data)
+static void on_net_set_preferred_plmn(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       TelNetworkPlmnList *plmn_list = data;
+       msg ("");
+       msgb ("tel_set_preferred_plmn() response receive");
+       msg (" - result = 0x%x", result);
+}
+
+static void on_net_get_preferred_plmn(TapiHandle *handle, int result, void *data, void *user_data)
+{
+       TelNetworkPreferredPlmnList_t *info = data;
        unsigned int i = 0;
 
-       msgb("tapi_network_search() response received");
-       CHECK_NETWORK_RESULT(result);
+       msg ("");
+       msgb ("tel_get_preferred_plmn() response receive");
+       msg (" - result = 0x%x", result);
 
-       if (!plmn_list) {
-               msg("plmn list data is null");
+       if (!info) {
+               msg (" - failed");
                return;
        }
 
-       msg("plmn_list count[%d]", plmn_list->count);
+       msg (" - count = %d", info->NumOfPrefPlmns);
 
-       for (i = 0; i < plmn_list->count; i++) {
-               msg("[%d] plmn_status[%d] act[%d] plmn[%s] short_name[%s] long_name[%s]",
-                       i+1, plmn_list->network_list[i].plmn_status, plmn_list->network_list[i].act,
-                       plmn_list->network_list[i].network_identity.plmn,
-                       plmn_list->network_list[i].network_identity.short_name,
-                       plmn_list->network_list[i].network_identity.long_name);
+       for (i = 0; i < info->NumOfPrefPlmns; i++) {
+               msg (" - [%d] plmn=%s, type=%d, ef_index=%d, name=%s",
+                               i,
+                               info->PrefPlmnRecord[i].Plmn,
+                               info->PrefPlmnRecord[i].SystemType,
+                               info->PrefPlmnRecord[i].Index,
+                               info->PrefPlmnRecord[i].network_name);
        }
 }
 
-static int run_net_search(MManager *mm, struct menu_data *menu)
+static void on_net_set_cancel_manual_search(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
+       msg ("");
+       msgb ("tel_cancel_network_manual_search() response receive");
+       msg (" - result = 0x%x", result);
+}
 
-       msg("call tapi_network_search()");
+static void on_net_get_serving_network(TapiHandle *handle, int result, void *data, void *user_data)
+{
+       TelNetworkServing_t *serving_info = data;
 
-       rt = tapi_network_search(handle, on_net_search, NULL);
-       CHECK_RT(rt);
+       msg ("");
+       msgb ("tel_get_network_serving() response receive");
+       msg (" - result = 0x%x", result);
 
-       return 0;
+       if (!serving_info) {
+               msg (" - failed");
+               return;
+       }
+
+       msg (" - plmn = %s", serving_info->plmn);
+       msg (" - access technology = %d", serving_info->act);
+
+       if (serving_info->act >= TAPI_NETWORK_SYSTEM_IS95A && serving_info->act <= TAPI_NETWORK_SYSTEM_EHRPD) {
+               msg (" - carrier = %d", serving_info->info.cdma_info.carrier);
+               msg (" - system_id = %d", serving_info->info.cdma_info.system_id);
+               msg (" - network_id = %d", serving_info->info.cdma_info.network_id);
+               msg (" - base_station_id = %d", serving_info->info.cdma_info.base_station_id);
+               msg (" - base_station_latitude = %d", serving_info->info.cdma_info.base_station_latitude);
+               msg (" - base_station_longitude = %d", serving_info->info.cdma_info.base_station_longitude);
+               msg (" - registration_zone = %d", serving_info->info.cdma_info.registration_zone);
+               msg (" - pilot_offset = %d", serving_info->info.cdma_info.pilot_offset);
+       } else {
+               msg (" - lac = %d", serving_info->info.lac);
+       }
 }
 
-static void on_net_cancel_network_search(TelHandle *handle, int result, void *data, void *user_data)
+static void on_net_set_mode(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       msgb("tapi_network_cancel_search() response received");
-       CHECK_NETWORK_RESULT(result);
+       msg ("");
+       msgb ("tel_set_network_mode() response receive");
+       msg (" - result = 0x%x", result);
 }
 
-static int run_net_cancel_network_search(MManager *mm, struct menu_data *menu)
+static void on_net_get_mode(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
+       int *mode = data;
 
-       msg("call tapi_network_cancel_search()");
+       msg ("");
+       msgb ("tel_get_network_mode() response receive");
+       msg (" - result = 0x%x", result);
 
-       rt = tapi_network_cancel_search(handle, on_net_cancel_network_search, NULL);
-       CHECK_RT(rt);
+       if (data)
+               msg (" - mode = %d", *mode);
+}
 
-       return 0;
+static void on_net_get_neighboring_cell_info(TapiHandle *handle, int result, void *data, void *user_data)
+{
+       TelNetworkNeighboringCellInfo_t *info = data;
+       int i, j;
+
+       msg ("");
+       msgb ("tel_get_neighboring_cell_info() response receive");
+       msg (" - result = 0x%x", result);
+
+       if (!data)
+               return;
+
+       msg ("info=%p",info);
+
+       msg ("act=%d",info->serving.act);
+       msg ("mcc=%d",info->serving.mcc);
+       msg ("mnc=%d\n",info->serving.mnc);
+
+       if(info->serving.act <= TAPI_NETWORK_SYSTEM_EGPRS) {
+               msg ("geran.cell_id=%d",info->serving.cell.geran.cell_id);
+               msg ("geran.lac=%d",info->serving.cell.geran.lac);
+               msg ("geran.bcch=%d",info->serving.cell.geran.bcch);
+               msg ("geran.bsic=%d",info->serving.cell.geran.bsic);
+               msg ("geran.rxlev=%d\n",info->serving.cell.geran.rxlev);
+       }
+       else if(info->serving.act <= TAPI_NETWORK_SYSTEM_GSM_AND_UMTS) {
+               msg ("umts.cell_id=%d",info->serving.cell.umts.cell_id);
+               msg ("umts.lac=%d",info->serving.cell.umts.lac);
+               msg ("umts.arfcn=%d",info->serving.cell.umts.arfcn);
+               msg ("umts.psc=%d",info->serving.cell.umts.psc);
+               msg ("umts.rscp=%d\n",info->serving.cell.umts.rscp);
+       }
+       else if(info->serving.act == TAPI_NETWORK_SYSTEM_LTE) {
+               msg ("lte.cell_id=%d",info->serving.cell.lte.cell_id);
+               msg ("lte.lac=%d",info->serving.cell.lte.lac);
+               msg ("lte.earfcn=%d",info->serving.cell.lte.earfcn);
+               msg ("lte.tac=%d",info->serving.cell.lte.tac);
+               msg ("lte.rssi=%d\n",info->serving.cell.lte.rssi);
+       }
+       else if(info->serving.act >= TAPI_NETWORK_SYSTEM_IS95A && info->serving.act <= TAPI_NETWORK_SYSTEM_EHRPD) {
+               msg ("cdma.system_id=%d",info->serving.cell.cdma.system_id);
+               msg ("cdma.network_id=%d",info->serving.cell.cdma.network_id);
+               msg ("cdma.base_station_id=%d",info->serving.cell.cdma.base_station_id);
+               msg ("cdma.reference_pn=%d",info->serving.cell.cdma.reference_pn);
+               msg ("cdma.base_station_latitude=%d\n",info->serving.cell.cdma.base_station_latitude);
+               msg ("cdma.base_station_longitude=%d\n",info->serving.cell.cdma.base_station_longitude);
+       }
+       msg ("geran_list_count=%d",info->geran_list_count);
+       for(i=0; i<info->geran_list_count; i++) {
+               msg ("[%d] cell_id=%d, lac=%d, bcch=%d, bsic=%d, rxlev=%d,",i,
+                       info->geran_list[i].cell_id, info->geran_list[i].lac, info->geran_list[i].bcch,
+                       info->geran_list[i].bsic, info->geran_list[i].rxlev);
+       }
+
+       msg ("umts_list_count=%d",info->umts_list_count);
+       for(j=0; j<info->umts_list_count; j++) {
+               msg ("[%d] cell_id=%d, lac=%d, arfcn=%d, psc=%d, rscp=%d,",j,
+                       info->umts_list[j].cell_id, info->umts_list[j].lac, info->umts_list[j].arfcn,
+                       info->umts_list[j].psc, info->umts_list[j].rscp);
+       }
 }
 
-static void on_net_select_network_automatic(TelHandle *handle, int result, void *data, void *user_data)
+static void on_net_set_default_data_subscription(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       msgb("tapi_network_select_automatic() response received");
-       CHECK_NETWORK_RESULT(result);
+       msg ("");
+       msgb ("tel_set_network_default_data_subscription() response receive");
+       msg (" - result = 0x%x", result);
 }
 
-static int run_net_select_network_automatic(MManager *mm, struct menu_data *menu)
+static void on_net_set_default_subscription(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
+       msg("on_net_set_default_subscription() - result : 0x%x", result);
+}
 
-       msg("call tapi_network_select_automatic()");
+static void on_net_set_emergency_callback_mode(TapiHandle *handle, int result, void *data, void *user_data)
+{
+       msg ("");
+       msgb ("tel_set_network_emergency_callback_mode() response receive");
+       msg (" - result = 0x%x", result);
+}
 
-       rt = tapi_network_select_automatic(handle, on_net_select_network_automatic, NULL);
-       CHECK_RT(rt);
+static void on_net_set_roaming_preference(TapiHandle *handle, int result, void *data, void *user_data)
+{
+       msg ("");
+       msgb ("tel_set_network_roaming_preference() response receive");
+       msg (" - result = 0x%x", result);
+}
 
-       return 0;
+static void on_net_get_roaming_preference(TapiHandle *handle, int result, void *data, void *user_data)
+{
+       int *roam_pref = data;
+
+       msg ("");
+       msgb ("tel_get_network_roaming_preference() response receive");
+       msg (" - result = 0x%x", result);
+
+       if (data)
+               msg (" - roaming preference = %d", *roam_pref);
 }
 
-static void on_net_select_network_manual(TelHandle *handle, int result, void *data, void *user_data)
+static int run_net_search (MManager *mm, struct menu_data *menu)
 {
-       msgb("tapi_network_select_manual() response received");
-       CHECK_NETWORK_RESULT(result);
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+
+       msg ("call tel_search_network()");
+
+       result = tel_search_network (handle, on_net_search, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg ("failed. (result = %d)", result);
+       }
+
+       return 0;
 }
 
-static int run_net_select_network_manual(MManager *mm, struct menu_data *menu)
+static int run_net_set_plmn_mode_automatic (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelNetworkSelectManualInfo select_info;
-       TelReturn rt = 0;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+
+       msg ("call tel_select_network_automatic()");
+
+       result = tel_select_network_automatic (handle, on_net_set_plmn_mode_automatic, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg ("failed. (result = %d)", result);
+       }
 
-       msg("call tapi_network_select_manual()");
+       return 0;
+}
 
-       memset(&select_info, 0, sizeof(TelNetworkSelectManualInfo));
+static int run_net_set_plmn_mode_manual (MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+       const char *plmn;
+       int act;
 
-       select_info.act = atoi(data_network_act);
-       select_info.plmn = (char *)data_network_plmn;
+       msg ("call tel_select_network_manual()");
 
-       msg("act[%d]", select_info.act);
-       msg("plmn[%s]", select_info.plmn);
+       plmn = data_net_set_plmn_mode_manual_plmn;
+       act = atoi(data_net_set_plmn_mode_manual_act);
 
-       rt = tapi_network_select_manual(handle, &select_info, on_net_select_network_manual, NULL);
-       CHECK_RT(rt);
+       result = tel_select_network_manual (handle, plmn, act, on_net_set_plmn_mode_manual, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg ("failed. (result = %d)", result);
+       }
 
        return 0;
 }
 
-static void on_net_get_network_selection_mode(TelHandle *handle, int result, void *data, void *user_data)
+static int run_net_get_plmn_mode (MManager *mm, struct menu_data *menu)
 {
-       TelNetworkSelectionMode *mode = data;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
 
-       msgb("tapi_network_get_selection_mode() response received");
-       CHECK_NETWORK_RESULT(result);
+       msg ("call tel_get_network_selection_mode()");
 
-       if (!mode) {
-               msg("network selection mode data is null");
-               return;
+       result = tel_get_network_selection_mode (handle, on_net_get_plmn_mode, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg ("failed. (result = %d)", result);
        }
 
-       msg("network selection mode: [%d]", *mode);
+       return 0;
 }
 
-static int run_net_get_network_selection_mode(MManager *mm, struct menu_data *menu)
+static int run_net_set_preferred_plmn (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+       int operation;
+       TelNetworkPreferredPlmnInfo_t info;
 
-       msg("call tapi_network_get_selection_mode()");
+       msg ("call tel_set_network_preferred_plmn()");
 
-       rt = tapi_network_get_selection_mode(handle, on_net_get_network_selection_mode, NULL);
-       CHECK_RT(rt);
+       memset(&info, 0, sizeof(TelNetworkPreferredPlmnInfo_t));
+
+       operation = atoi(data_net_set_preferred_plmn_mode);
+       info.Index = atoi(data_net_set_preferred_plmn_ef_index);
+       info.SystemType = atoi(data_net_set_preferred_plmn_type);
+       strncpy(info.Plmn, data_net_set_preferred_plmn_plmn, 6);
+
+       result = tel_set_network_preferred_plmn (handle, operation, &info, on_net_set_preferred_plmn, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg ("failed. (result = %d)", result);
+       }
 
        return 0;
 }
 
-static void on_net_set_preferred_plmn(TelHandle *handle, int result, void *data, void *user_data)
+static int run_net_get_preferred_plmn (MManager *mm, struct menu_data *menu)
 {
-       msgb("tapi_network_set_preferred_plmn() response received");
-       CHECK_NETWORK_RESULT(result);
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+
+       msg ("call tel_get_network_preferred_plmn()");
+
+       result = tel_get_network_preferred_plmn (handle, on_net_get_preferred_plmn, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg ("failed. (result = %d)", result);
+       }
+
+       return 0;
 }
 
-static int run_net_set_preferred_plmn(MManager *mm, struct menu_data *menu)
+static int run_net_set_cancel_manual_search (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
-       TelNetworkPreferredPlmnInfo info;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
 
-       msg("call tapi_network_set_preferred_plmn()");
+       msg ("call tel_cancel_network_manual_search()");
+
+       result = tel_cancel_network_manual_search (handle, on_net_set_cancel_manual_search, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg ("failed. (result = %d)", result);
+       }
 
-       memset(&info, 0, sizeof(TelNetworkPreferredPlmnInfo));
+       return 0;
+}
 
-       info.index = atoi(data_network_plmn_index);
-       info.plmn = (char *)data_network_plmn;
-       info.act = atoi(data_network_act);
+static int run_net_get_serving_network (MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
 
-       msg("plmn_index[%d]", info.index);
-       msg("plmn[%s]", info.plmn);
-       msg("act[%d]", info.act);
+       msg ("call tel_get_network_serving()");
 
-       rt = tapi_network_set_preferred_plmn(handle, &info, on_net_set_preferred_plmn, NULL);
-       CHECK_RT(rt);
+       result = tel_get_network_serving (handle, on_net_get_serving_network, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg ("failed. (result = %d)", result);
+       }
 
        return 0;
 }
 
-static void on_net_get_preferred_plmn(TelHandle *handle, int result, void *data, void *user_data)
+static int run_net_set_mode (MManager *mm, struct menu_data *menu)
 {
-       TelNetworkPreferredPlmnList *plmn_list = data;
-       unsigned int i = 0;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+       int mode;
 
-       msgb("tapi_network_get_preferred_plmn() response received");
-       CHECK_NETWORK_RESULT(result);
+       msg ("call tel_set_network_mode()");
 
-       if (!plmn_list) {
-               msg("preferred plmn list data is null");
-               return;
+       mode = atoi(data_net_set_mode_mode);
+
+       result = tel_set_network_mode (handle, mode, on_net_set_mode, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg ("failed. (result = %d)", result);
        }
 
-       msg("preferred PLMN count[%d]", plmn_list->count);
+       return 0;
+}
 
-       for(i = 0; i < plmn_list->count; i++) {
-               msg("[%d] index[%d] plmn[%s] act[%d]", i+1, plmn_list->list[i].index,
-                       plmn_list->list[i].plmn, plmn_list->list[i].act);
+static int run_net_get_mode (MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+
+       msg ("call tel_get_network_mode()");
+
+       result = tel_get_network_mode (handle, on_net_get_mode, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg ("failed. (result = %d)", result);
        }
+
+       return 0;
 }
 
-static int run_net_get_preferred_plmn(MManager *mm, struct menu_data *menu)
+static int run_net_get_neighboring_cell_info (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
 
-       msg("call tapi_network_get_preferred_plmn()");
+       msg ("call tel_get_network_neighboring_cell_info()");
 
-       rt = tapi_network_get_preferred_plmn(handle, on_net_get_preferred_plmn, NULL);
-       CHECK_RT(rt);
+       result = tel_get_network_neighboring_cell_info (handle, on_net_get_neighboring_cell_info, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg ("failed. (result = %d)", result);
+       }
 
        return 0;
 }
 
-static void on_net_set_network_mode(TelHandle *handle, int result, void *data, void *user_data)
+static int run_net_set_default_data_subscription (MManager *mm, struct menu_data *menu)
 {
-       msgb("tapi_network_set_mode() response received");
-       CHECK_NETWORK_RESULT(result);
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+
+       msg ("call tel_set_network_default_data_subscription()");
+
+       result = tel_set_network_default_data_subscription (handle, on_net_set_default_data_subscription, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg ("failed. (result = %d)", result);
+       }
+
+       return 0;
 }
 
-static int run_net_set_network_mode(MManager *mm, struct menu_data *menu)
+static int run_net_get_default_data_subscription (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelNetworkMode mode;
-       TelReturn rt = 0;
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       TelNetworkDefaultDataSubs_t default_subs = TAPI_NETWORK_DEFAULT_DATA_SUBS_UNKNOWN;
+       int result = 0;
 
-       msg("call tapi_network_set_mode()");
+       msg ("call tel_get_network_default_data_subscription()");
 
-       mode = atoi(data_network_mode);
-       msg("requested mode[%d]", mode);
+       result = tel_get_network_default_data_subscription (handle, &default_subs);
+       if (result != TAPI_API_SUCCESS) {
+               msg("api call failed with[0x%x]", result);
+               return 0;
+       }
 
-       rt = tapi_network_set_mode(handle, mode, on_net_set_network_mode, NULL);
-       CHECK_RT(rt);
+       msg("'default' Data Subscription = %s",
+                       ((default_subs == TAPI_NETWORK_DEFAULT_DATA_SUBS_SIM1) ? "SIM 1"
+                       : ((default_subs == TAPI_NETWORK_DEFAULT_DATA_SUBS_SIM2) ? "SIM 2"
+                       : "Unknown")));
 
        return 0;
 }
 
-static void on_net_get_network_mode(TelHandle *handle, int result, void *data, void *user_data)
+
+static int run_net_set_default_subscription(MManager *mm, struct menu_data *menu)
 {
-       TelNetworkMode *mode = data;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result = 0;
 
-       msgb("tapi_network_get_mode() response received");
-       CHECK_NETWORK_RESULT(result);
+       msg("call tel_set_network_default_subscription()");
 
-       if (!mode) {
-               msg("network mode data is null");
-               return;
+       result = tel_set_network_default_subscription(handle, on_net_set_default_subscription, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
        }
 
-       msg("mode[%d]", *mode);
+       return result;
 }
 
-static int run_net_get_network_mode(MManager *mm, struct menu_data *menu)
+static int run_net_get_default_subscription(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result = 0;
+       TelNetworkDefaultSubs_t default_subs = TAPI_NETWORK_DEFAULT_SUBS_UNKNOWN;
+
+       msg("call tel_get_network_default_subscription()");
 
-       msg("call tapi_network_get_mode()");
+       result = tel_get_network_default_subscription(handle, &default_subs);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+               return 0;
+       }
 
-       rt = tapi_network_get_mode(handle, on_net_get_network_mode, NULL);
-       CHECK_RT(rt);
+       msg("'default' Subscription for CS (Voice) = %s",
+                       ((default_subs == TAPI_NETWORK_DEFAULT_SUBS_SIM1) ? "SIM 1"
+                       : ((default_subs == TAPI_NETWORK_DEFAULT_SUBS_SIM2) ? "SIM 2"
+                       : "Unknown")));
 
-       return 0;
+       return result;
 }
 
-static void on_net_get_neighboring_cell_info(TelHandle *handle, int result, void *data, void *user_data)
+static int run_net_set_emergency_callback_mode (MManager *mm, struct menu_data *menu)
 {
-       TelNetworkNeighbourCellInfo *cell_info = data;
-       unsigned int i = 0;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+       int mode;
 
-       msgb("tapi_network_get_neighboring_cell_info() response received");
-       CHECK_NETWORK_RESULT(result);
+       msg ("call tel_set_network_emergency_callback_mode()");
 
-       if (!cell_info) {
-               msg("neighbouring cell info data is null");
-               return;
+       mode = atoi(data_net_set_emergency_callback_mode_mode);
+
+       result = tel_set_network_emergency_callback_mode (handle, mode, on_net_set_emergency_callback_mode, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg ("failed. (result = %d)", result);
        }
 
-       msg("gsm_list_count[%d]", cell_info->gsm_list_count);
+       return 0;
+}
+
+static int run_net_set_roaming_preference (MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+       int domain;
 
-       for(i = 0; i < cell_info->gsm_list_count; i++) {
-               msg("[%d] cell_id[%d] lac[%d] bcch[%d] bsic[%d] rxlev[%d]",
-                       i+1, cell_info->gsm_list[i].cell_id, cell_info->gsm_list[i].lac,
-                       cell_info->gsm_list[i].bcch, cell_info->gsm_list[i].bsic,
-                       cell_info->gsm_list[i].rxlev);
-       }
+       msg ("call tel_set_network_roaming_preference()");
 
-       msg("umts_list_count[%d]", cell_info->umts_list_count);
+       domain = atoi(data_net_set_roaming_preference_roam_pref);
 
-       for(i = 0; i < cell_info->umts_list_count; i++) {
-               msg("[%d] cell_id[%d] lac[%d] arfcn[%d] psc[%d] rscp[%d]",
-                       i+1, cell_info->umts_list[i].cell_id, cell_info->umts_list[i].lac,
-                       cell_info->umts_list[i].arfcn, cell_info->umts_list[i].psc,
-                       cell_info->umts_list[i].rscp);
+       result = tel_set_network_roaming_preference (handle, domain, on_net_set_roaming_preference, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg ("failed. (result = %d)", result);
        }
+
+       return 0;
 }
 
-static int run_net_get_neighboring_cell_info(MManager *mm, struct menu_data *menu)
+static int run_net_get_roaming_preference (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
 
-       msg("call tapi_network_get_neighboring_cell_info()");
+       msg ("call tel_get_network_roaming_preference()");
 
-       rt = tapi_network_get_neighboring_cell_info(handle, on_net_get_neighboring_cell_info, NULL);
-       CHECK_RT(rt);
+       result = tel_get_network_roaming_preference (handle, on_net_get_roaming_preference, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg ("failed. (result = %d)", result);
+       }
 
        return 0;
 }
 
-static struct menu_data menu_net_get_registration_info[] = {
-       { "1", "run", NULL, run_net_get_registration_info, NULL},
+static int show_properties (MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int lac = -1,
+               cellid = -1,
+               svc_type = -1,
+               act = -1,
+               ps_type = -1,
+               cs = -1,
+               ps = -1,
+               roam = -1,
+               sig_dbm = -1,
+               sig_level = -1,
+               option = -1,
+               ims_voice_status = -1;
+       char *plmn = NULL,
+                *n_name = NULL,
+                *s_name = NULL;
+
+       tel_get_property_int (handle, TAPI_PROP_NETWORK_LAC     , &lac);
+       tel_get_property_int (handle, TAPI_PROP_NETWORK_CELLID, &cellid);
+       tel_get_property_int (handle, TAPI_PROP_NETWORK_SERVICE_TYPE, &svc_type);
+       tel_get_property_int (handle, TAPI_PROP_NETWORK_ACT, &act);
+       tel_get_property_string (handle, TAPI_PROP_NETWORK_PLMN, &plmn);
+       tel_get_property_int (handle, TAPI_PROP_NETWORK_PS_TYPE, &ps_type);
+       tel_get_property_int (handle, TAPI_PROP_NETWORK_CIRCUIT_STATUS, &cs);
+       tel_get_property_int (handle, TAPI_PROP_NETWORK_PACKET_STATUS, &ps);
+       tel_get_property_int (handle, TAPI_PROP_NETWORK_SIGNALSTRENGTH_DBM, &sig_dbm);
+       tel_get_property_int (handle, TAPI_PROP_NETWORK_SIGNALSTRENGTH_LEVEL, &sig_level);
+       tel_get_property_int (handle, TAPI_PROP_NETWORK_ROAMING_STATUS, &roam);
+       tel_get_property_int (handle, TAPI_PROP_NETWORK_NAME_OPTION, &option);
+       tel_get_property_string (handle, TAPI_PROP_NETWORK_NETWORK_NAME, &n_name);
+       tel_get_property_string (handle, TAPI_PROP_NETWORK_SPN_NAME, &s_name);
+       tel_get_property_int (handle, TAPI_PROP_NETWORK_IMS_VOICE_SUPPORT_STATUS, &ims_voice_status);
+
+       msg (
+                       "  [lac]: 0x%08X   [cellid]: 0x%08X\n"
+                       "  [service_type]: %d    [act]: %d            [plmn]: \"%s\"\n"
+                       "  [ps_type]: %d         [cs_status]: %d      [ps_status]: %d\n"
+                       "  [sig_dbm]: %d         [sig_level]: %d      [roaming_status]: %d\n"
+                       "  [option]: %d  [network_name]: \"%s\"    [spn_name]: \"%s\"\n"
+                       "  [ims_voice_status]: %d",
+                       lac, cellid,
+                       svc_type, act, plmn,
+                       ps_type, cs, ps,
+                       sig_dbm, sig_level, roam,
+                       option, n_name, s_name, ims_voice_status);
+
+       g_free (plmn);
+       g_free (n_name);
+       g_free (s_name);
+
+       return 0;
+}
+
+static struct menu_data menu_net_search[] = {
+       { "1", "run", NULL, run_net_search, NULL},
        { NULL, NULL, },
 };
 
-static struct menu_data menu_net_get_net_id_info[] = {
-       { "1", "run", NULL, run_net_get_net_id_info, NULL},
+static struct menu_data menu_net_set_plmn_mode_automatic[] = {
+       { "1", "run", NULL, run_net_set_plmn_mode_automatic, NULL},
        { NULL, NULL, },
 };
 
-static struct menu_data menu_net_search[] = {
-       { "1", "run", NULL, run_net_search, NULL},
+static struct menu_data menu_net_set_plmn_mode_manual[] = {
+       { "1", "act", NULL, NULL, data_net_set_plmn_mode_manual_act},
+       { "2", "plmn (45001)", NULL, NULL, data_net_set_plmn_mode_manual_plmn},
+       { "3", "run", NULL, run_net_set_plmn_mode_manual, NULL},
        { NULL, NULL, },
 };
 
-static struct menu_data menu_net_cancel_network_search[] = {
-       { "1", "run", NULL, run_net_cancel_network_search, NULL},
+static struct menu_data menu_net_get_plmn_mode[] = {
+       { "1", "run", NULL, run_net_get_plmn_mode, NULL},
        { NULL, NULL, },
 };
 
-static struct menu_data menu_net_select_network_automatic[] = {
-       { "1", "run", NULL, run_net_select_network_automatic, NULL},
+static struct menu_data menu_net_set_preferred_plmn[] = {
+       { "1", "mode (1=add, 2=edit, 3=delete)", NULL, NULL, data_net_set_preferred_plmn_mode},
+       { "2", "plmn (45001)", NULL, NULL, data_net_set_preferred_plmn_plmn},
+       { "3", "type (1=GSM, 2=GPRS, 3=EGPRS, 4=UMTS, ...)", NULL, NULL, data_net_set_preferred_plmn_type},
+       { "4", "ef_index (0,...)", NULL, NULL, data_net_set_preferred_plmn_ef_index},
+       { "5", "run", NULL, run_net_set_preferred_plmn, NULL},
        { NULL, NULL, },
 };
 
-static struct menu_data menu_net_select_network_manual[] = {
-       { "1", "act (0=UNKNOWN 1=GSM 2=GPRS 3=EGPRS 4=UMTS 5=GSM/UMTS 6=HSDPA 7=HSUPA 8=HSPA 9=LTE)",
-                       NULL, NULL, data_network_act},
-       { "2", "plmn (45001)", NULL, NULL, data_network_plmn},
-       { "3", "run", NULL, run_net_select_network_manual, NULL},
+static struct menu_data menu_net_get_preferred_plmn[] = {
+       { "1", "run", NULL, run_net_get_preferred_plmn, NULL},
        { NULL, NULL, },
 };
 
-static struct menu_data menu_net_get_network_selection_mode[] = {
-       { "1", "run", NULL, run_net_get_network_selection_mode, NULL},
+
+static struct menu_data menu_net_set_cancel_manual_search[] = {
+       { "1", "run", NULL, run_net_set_cancel_manual_search, NULL},
        { NULL, NULL, },
 };
 
-static struct menu_data menu_net_set_preferred_plmn[] = {
-       { "1", "index (starts from 1)", NULL, NULL, data_network_plmn_index},
-       { "2", "plmn (45001)", NULL, NULL, data_network_plmn},
-       { "3", "act (0=UNKNOWN 1=GSM 2=GPRS 3=EGPRS 4=UMTS 5=GSM/UMTS 6=HSDPA 7=HSUPA 8=HSPA 9=LTE)",
-                       NULL, NULL, data_network_act},
-       { "4", "run", NULL, run_net_set_preferred_plmn, NULL},
+
+static struct menu_data menu_net_get_serving_network[] = {
+       { "1", "run", NULL, run_net_get_serving_network, NULL},
        { NULL, NULL, },
 };
 
-static struct menu_data menu_net_get_preferred_plmn[] = {
-       { "1", "run", NULL, run_net_get_preferred_plmn, NULL},
+static struct menu_data menu_net_set_mode_3gpp[] = {
+       { "1", "mode (1=GSM, 2=WCDMA, 4=CDMA, 8=LTE)", NULL, NULL, data_net_set_mode_mode},
+       { "3", "run", NULL, run_net_set_mode, NULL},
        { NULL, NULL, },
 };
 
-static struct menu_data menu_net_set_network_mode[] = {
-       { "1", "network mode (0=AUTO 1=2G 2=3G 3=LTE)", NULL, NULL, data_network_mode},
-       { "2", "run", NULL, run_net_set_network_mode, NULL},
+static struct menu_data menu_net_set_mode_3gpp2[] = {
+       { "1", "mode (4=CDMA, 8=LTE)", NULL, NULL, data_net_set_mode_mode},
+       { "3", "run", NULL, run_net_set_mode, NULL},
        { NULL, NULL, },
 };
 
-static struct menu_data menu_net_get_network_mode[] = {
-       { "1", "run", NULL, run_net_get_network_mode, NULL},
+static struct menu_data menu_net_get_mode[] = {
+       { "1", "run", NULL, run_net_get_mode, NULL},
        { NULL, NULL, },
 };
 
@@ -556,44 +977,230 @@ static struct menu_data menu_net_get_neighboring_cell_info[] = {
        { NULL, NULL, },
 };
 
-struct menu_data menu_net[] = {
-       { "1g", "Get Network Registration Info", menu_net_get_registration_info, NULL, NULL},
-       { "2g", "Get Network Identity Info", menu_net_get_net_id_info, NULL, NULL},
-       { "3", "Network Search ", menu_net_search, NULL, NULL},
-       { "4", "Cancel Network Search", menu_net_cancel_network_search, NULL, NULL},
-       { "5", "Select Network Automatic", menu_net_select_network_automatic, NULL, NULL},
-       { "6", "Select Network Manual", menu_net_select_network_manual, NULL, NULL},
-       { "7g", "Get Network Selection mode", menu_net_get_network_selection_mode, NULL, NULL},
-       { "8s", "Set Preferred PLMN", menu_net_set_preferred_plmn, NULL, NULL},
-       { "8g", "Get Preferred PLMN", menu_net_get_preferred_plmn, NULL, NULL},
-       { "9s", "Set Network mode", menu_net_set_network_mode, NULL, NULL},
-       { "9g", "Get Network mode", menu_net_get_network_mode, NULL, NULL},
-       { "10g", "Get Neighboring Cell Info", menu_net_get_neighboring_cell_info, NULL, NULL},
+static struct menu_data menu_net_set_default_data_subscription[] = {
+       { "1", "run", NULL, run_net_set_default_data_subscription, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_net_get_default_data_subscription[] = {
+       { "1", "run", NULL, run_net_get_default_data_subscription, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_net_set_default_subscription[] = {
+       { "1", "run", 0, run_net_set_default_subscription, 0},
+       { 0, 0, },
+};
+
+static struct menu_data menu_net_get_default_subscription[] = {
+       { "1", "run", 0, run_net_get_default_subscription, 0},
+       { 0, 0, },
+};
+
+static struct menu_data menu_net_set_emergency_callback_mode[] = {
+       { "1", "mode (0=ENTER, 1=EXIT)", NULL, NULL, data_net_set_emergency_callback_mode_mode},
+       { "2", "run", NULL, run_net_set_emergency_callback_mode, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_net_set_roaming_preference[] = {
+       { "1", "roaming preference (1=AUTOMATIC, 2=AUTOMATIC_A, 3=AUTOMATIC_B, 4=HOME_ONLY, 5=ROAM_ONLY)", NULL, NULL, data_net_set_roaming_preference_roam_pref},
+       { "2", "run", NULL, run_net_set_roaming_preference, NULL},
+       { NULL, NULL, },
+};
+
+static struct menu_data menu_net_get_roaming_preference[] = {
+       { "1", "run", NULL, run_net_get_roaming_preference, NULL},
+       { NULL, NULL, },
+};
+
+struct menu_data menu_net_3gpp[] = {
+       { "1", "Search", menu_net_search, NULL, NULL},
+       { "2a", "SET PLMN Selection mode (Automatic)", menu_net_set_plmn_mode_automatic, NULL, NULL},
+       { "2s", "SET PLMN Selection mode (Manual)", menu_net_set_plmn_mode_manual, NULL, NULL},
+       { "2g", "GET PLMN Selection mode", menu_net_get_plmn_mode, NULL, NULL},
+       { "5s", "SET Preferred PLMN", menu_net_set_preferred_plmn, NULL, NULL},
+       { "5g", "GET Preferred PLMN", menu_net_get_preferred_plmn, NULL, NULL},
+       { "6", "SET Cancel manual search", menu_net_set_cancel_manual_search, NULL, NULL},
+       { "7", "GET Serving network", menu_net_get_serving_network, NULL, NULL},
+       { "8s", "SET Mode", menu_net_set_mode_3gpp, NULL, NULL},
+       { "8g", "GET Mode", menu_net_get_mode, NULL, NULL},
+       { "9g", "GET Neighboring Cell Info", menu_net_get_neighboring_cell_info, NULL, NULL},
+       { "10", "SET Default Data Subscription", menu_net_set_default_data_subscription, NULL, NULL},
+       { "11", "GET Default Data Subscription", menu_net_get_default_data_subscription, NULL, NULL},
+       { "12", "SET Default Subscription (for Voice)", menu_net_set_default_subscription, 0, 0},
+       { "13", "GET Default Subscription (for Voice)", menu_net_get_default_subscription, 0, 0},
+       { "*", "<Properties>", NULL, show_properties, NULL },
        { NULL, NULL, },
 };
 
-void register_network_event(TelHandle *handle)
+struct menu_data menu_net_3gpp2[] = {
+       { "1s", "SET PLMN Selection mode (Automatic)", menu_net_set_plmn_mode_automatic, NULL, NULL},
+       { "1g", "GET PLMN Selection mode", menu_net_get_plmn_mode, NULL, NULL},
+       { "4s", "SET Preferred PLMN", menu_net_set_preferred_plmn, NULL, NULL},
+       { "4g", "GET Preferred PLMN", menu_net_get_preferred_plmn, NULL, NULL},
+       { "5", "GET Serving network", menu_net_get_serving_network, NULL, NULL},
+       { "6s", "SET Mode", menu_net_set_mode_3gpp2, NULL, NULL},
+       { "6g", "GET Mode", menu_net_get_mode, NULL, NULL},
+       { "7g", "GET Neighboring Cell Info", menu_net_get_neighboring_cell_info, NULL, NULL},
+       { "8", "SET Emergency Callback Mode", menu_net_set_emergency_callback_mode, NULL, NULL},
+       { "9s", "SET Roaming Preference", menu_net_set_roaming_preference, NULL, NULL},
+       { "9g", "GET Roaming Preference", menu_net_get_roaming_preference, NULL, NULL},
+       { "*", "<Properties>", NULL, show_properties, NULL },
+       { NULL, NULL, },
+};
+
+struct menu_data menu_net[] = { { "1", "3GPP(GSM/WCDMA/LTE)", menu_net_3gpp, NULL, NULL }, {
+               "2", "3GPP2(CDMA)", menu_net_3gpp2, NULL, NULL }, { NULL, NULL , }, };
+
+void register_network_event (TapiHandle *handle)
 {
-       TelReturn ret;
+       int ret;
+
+       /* Signal */
+       ret = tel_register_noti_event (handle,
+                       TAPI_NOTI_NETWORK_REGISTRATION_STATUS,
+                       on_noti_registration_status, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
+
+       ret = tel_register_noti_event (handle,
+                       TAPI_NOTI_NETWORK_CELLINFO, on_noti_cell_info, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
+
+       ret = tel_register_noti_event (handle,
+                       TAPI_NOTI_NETWORK_CHANGE, on_noti_change, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
+
+       ret = tel_register_noti_event (handle,
+                       TAPI_NOTI_NETWORK_TIMEINFO, on_noti_time_info, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
+
+       ret = tel_register_noti_event (handle,
+                       TAPI_NOTI_NETWORK_IDENTITY, on_noti_identity, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
+
+       ret = tel_register_noti_event (handle,
+                       TAPI_NOTI_NETWORK_SIGNALSTRENGTH, on_noti_signal_strength, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
+
+       ret = tel_register_noti_event (handle,
+                       TAPI_NOTI_NETWORK_DEFAULT_DATA_SUBSCRIPTION, on_noti_default_data_subs, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
+
+       ret = tel_register_noti_event (handle,
+                       TAPI_NOTI_NETWORK_DEFAULT_SUBSCRIPTION, on_noti_default_subs, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
+
+       ret = tel_register_noti_event (handle,
+                       TAPI_NOTI_NETWORK_EMERGENCY_CALLBACK_MODE, on_noti_emergency_callback_mode, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
+
+       /* Property */
+       ret = tel_register_noti_event (handle,
+                       TAPI_PROP_NETWORK_SIGNALSTRENGTH_DBM, on_prop_signal_dbm, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
+
+       ret = tel_register_noti_event (handle,
+                       TAPI_PROP_NETWORK_SIGNALSTRENGTH_LEVEL, on_prop_signal_level, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
+
+       ret = tel_register_noti_event (handle,
+                       TAPI_PROP_NETWORK_LAC, on_prop_lac, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
+
+       ret = tel_register_noti_event (handle,
+                       TAPI_PROP_NETWORK_PLMN, on_prop_plmn, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 
-       /* Network */
-       ret = tapi_register_event_id(handle, TEL_NOTI_NETWORK_REGISTRATION_STATUS, on_noti_registration_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_NETWORK_REGISTRATION_STATUS - register event failed: [%d]", ret);
+       ret = tel_register_noti_event (handle,
+                       TAPI_PROP_NETWORK_CELLID, on_prop_cellid, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 
-       ret = tapi_register_event_id(handle, TEL_NOTI_NETWORK_CELL_INFO, on_noti_cell_info, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_NETWORK_CELL_INFO - register event failed: [%d]", ret);
+       ret = tel_register_noti_event (handle,
+                       TAPI_PROP_NETWORK_SERVICE_TYPE, on_prop_service_type, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 
-       ret = tapi_register_event_id(handle, TEL_NOTI_NETWORK_IDENTITY, on_noti_identity, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_NETWORK_IDENTITY - register event failed: [%d]", ret);
+       ret = tel_register_noti_event (handle,
+                       TAPI_PROP_NETWORK_ACT, on_prop_act, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 
-       ret = tapi_register_event_id(handle, TEL_NOTI_NETWORK_RSSI, on_noti_rssi, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_NETWORK_SIGNAL_STRENGTH - register event failed: [%d]", ret);
+       ret = tel_register_noti_event (handle,
+                       TAPI_PROP_NETWORK_PS_TYPE, on_prop_ps_type, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 
-       ret = tapi_register_event_id(handle, TEL_NOTI_NETWORK_TIME_INFO, on_noti_time_info, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_NETWORK_TIME_INFO - register event failed: [%d]", ret);
+       ret = tel_register_noti_event (handle,
+                       TAPI_PROP_NETWORK_CIRCUIT_STATUS, on_prop_circuit_status, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
+
+       ret = tel_register_noti_event (handle,
+                       TAPI_PROP_NETWORK_PACKET_STATUS, on_prop_packet_status, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
+
+       ret = tel_register_noti_event (handle,
+                       TAPI_PROP_NETWORK_ROAMING_STATUS, on_prop_roaming_status, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
+
+       ret = tel_register_noti_event (handle,
+                       TAPI_PROP_NETWORK_NAME_OPTION, on_prop_name_option, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
+
+       ret = tel_register_noti_event (handle,
+                       TAPI_PROP_NETWORK_NETWORK_NAME, on_prop_network_name, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
+
+       ret = tel_register_noti_event (handle,
+                       TAPI_PROP_NETWORK_SPN_NAME, on_prop_spn_name, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
+
+       ret = tel_register_noti_event (handle,
+                       TAPI_PROP_NETWORK_IMS_VOICE_SUPPORT_STATUS, on_prop_ims_voice_status, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 }
index 5b15b27deee0fec8a961b0321efefaf995359a74..4f749491923538fc7ca9ac58eb4f5d50f06cc260 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,6 +22,6 @@
 #define __NETWORK_H__
 
 
-void register_network_event(TelHandle *handle);
+void register_network_event(TapiHandle *handle);
 
 #endif
index 479c2b385e6abebc62ebd98b8d78af5792bde4b3..37c4d9f659421ae1d6d9bbd605bff25869daffef 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * libtapi
- * Telephony test application
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <sys/time.h>
 #include <unistd.h>
 #include <glib.h>
-#include <glib-object.h>
 
-#include <tapi.h>
-#include <tapi_events.h>
-#include <tapi_phonebook.h>
+#include <tapi_common.h>
+#include <ITapiPhonebook.h>
+#include <TapiUtility.h>
 
 #include "menu.h"
 #include "sim.h"
 #include "phonebook.h"
 
-#define CHECK_PB_RESULT(x) \
+#define CHECK_RT(x) \
 { \
-       if (x >= TEL_PB_RESULT_SUCCESS && x <= TEL_PB_RESULT_ACCESS_RESTRICTED) { \
-               msg("result[%d][%s]", x, dbg_pb_result[x]); \
-       } else { \
-               msg("Api failed with result: [%d]", x); \
-       } \
-       if (x != TEL_PB_RESULT_SUCCESS) \
-               return; \
+    if((x) != 0) { \
+               msg("api call failed with[%d]",x); \
+               return 0; \
+       }\
 }
 
-#define MSG_PB_TYPE(x) \
-{ \
-       if (x <= TEL_PB_USIM) { \
-               msg("pb_type[%d][%s]", x, dbg_pb_type_name[x]); \
-       } else { \
-               msg("pb_type[%d]", x); \
-       } \
-}
-
-static char *dbg_pb_type_name[] = { "TEL_PB_FDN", "TEL_PB_ADN", "TEL_PB_SDN",
-               "TEL_PB_USIM", };
-
-static char *dbg_pb_result[] = {"TEL_PB_RESULT_SUCCESS", "TEL_PB_RESULT_FAILURE",
-       "TEL_PB_RESULT_INVALID_PARAMETER", "TEL_PB_RESULT_MEMORY_FAILURE",
-       "TEL_PB_RESULT_OPERATION_NOT_SUPPORTED", "TEL_PB_RESULT_UNKNOWN_FAILURE",
-       "TEL_PB_RESULT_INVALID_INDEX", "TEL_PB_RESULT_NOT_INITIALIZED",
-       "TEL_PB_RESULT_PIN2_REQUIRED", "TEL_PB_RESULT_PUK2_REQUIRED",
-       "TEL_PB_RESULT_ACCESS_RESTRICTED", };
+static const char* dbg_pb_type_name[] = { "TAPI_SIM_PB_FDN", "TAPI_SIM_PB_ADN", "TAPI_SIM_PB_SDN",
+               "TAPI_SIM_PB_3GSIM", "TAPI_SIM_PB_AAS", "TAPI_SIM_PB_GAS", };
+static const char* dbg_pb_adf_field_name[] = { "NO VALUE 0", "TAPI_PB_3G_NAME", "TAPI_PB_3G_NUMBER",
+               "TAPI_PB_3G_ANR1", "TAPI_PB_3G_ANR2", "TAPI_PB_3G_ANR3", "TAPI_PB_3G_EMAIL1",
+               "TAPI_PB_3G_EMAIL2", "TAPI_PB_3G_EMAIL3", "TAPI_PB_3G_EMAIL4", "TAPI_PB_3G_SNE",
+               "TAPI_PB_3G_GRP", "TAPI_PB_3G_PBC" };
+static const char* dbg_pb_ton_name[] = { "TAPI_SIM_TON_UNKNOWN", "TAPI_SIM_TON_INTERNATIONAL",
+               "TAPI_SIM_TON_NATIONAL", "TAPI_SIM_TON_NETWORK_SPECIFIC", "TAPI_SIM_TON_DEDICATED_ACCESS",
+               "TAPI_SIM_TON_ALPHA_NUMERIC", "TAPI_SIM_TON_ABBREVIATED_NUMBER",
+               "TAPI_SIM_TON_RESERVED_FOR_EXT", };
+static const char* dbg_pb_dcs_name[] = { "TAPI_SIM_TEXT_ENC_ASCII", "TAPI_SIM_TEXT_ENC_GSM7BIT",
+               "TAPI_SIM_TEXT_ENC_UCS2", "TAPI_SIM_TEXT_ENC_HEX", };
 
 static char data_pb_type[MENU_DATA_SIZE + 1] = {};
 static char data_pb_index[MENU_DATA_SIZE + 1] = {};
 static char data_pb_name[MENU_DATA_SIZE + 1] = {};
+static char data_pb_dcs[MENU_DATA_SIZE + 1] = {};
 static char data_pb_number[MENU_DATA_SIZE + 1] = {};
-static char data_pb_sne[MENU_DATA_SIZE + 1] = {};
-static char data_pb_group_name[MENU_DATA_SIZE + 1] = {};
-static char data_pb_anr_count[MENU_DATA_SIZE + 1] = "0";
-static char data_pb_anr1_num[MENU_DATA_SIZE + 1] = {};
-static char data_pb_anr1_desc[MENU_DATA_SIZE + 1] = {};
-static char data_pb_anr1_aas[MENU_DATA_SIZE + 1] = {};
-static char data_pb_anr2_num[MENU_DATA_SIZE + 1] = {};
-static char data_pb_anr2_desc[MENU_DATA_SIZE + 1] = {};
-static char data_pb_anr2_aas[MENU_DATA_SIZE + 1] = {};
-static char data_pb_anr3_num[MENU_DATA_SIZE + 1] = {};
-static char data_pb_anr3_desc[MENU_DATA_SIZE + 1] = {};
-static char data_pb_anr3_aas[MENU_DATA_SIZE + 1] = {};
-static char data_pb_email_count[MENU_DATA_SIZE + 1] = "0";
+static char data_pb_ton[MENU_DATA_SIZE + 1] = {};
+static char data_pb_anr1[MENU_DATA_SIZE + 1] = {};
+static char data_pb_anr1_ton[MENU_DATA_SIZE + 1] = {};
+static char data_pb_anr2[MENU_DATA_SIZE + 1] = {};
+static char data_pb_anr2_ton[MENU_DATA_SIZE + 1] = {};
+static char data_pb_anr3[MENU_DATA_SIZE + 1] = {};
+static char data_pb_anr3_ton[MENU_DATA_SIZE + 1] = {};
 static char data_pb_email1[MENU_DATA_SIZE + 1] = {};
 static char data_pb_email2[MENU_DATA_SIZE + 1] = {};
 static char data_pb_email3[MENU_DATA_SIZE + 1] = {};
 static char data_pb_email4[MENU_DATA_SIZE + 1] = {};
-static char data_pb_hidden[MENU_DATA_SIZE + 1] = "0";
+static char data_pb_group_index[MENU_DATA_SIZE + 1] = {};
+static char data_pb_pb_control[MENU_DATA_SIZE + 1] = {};
 
-static void on_noti_pb_status(TelHandle *handle, const char *event_id, void *data, void *user_data)
+
+static void on_noti_pb_status(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       gboolean *status = data;
-       msgb("event(%s) received !!", TEL_NOTI_PB_STATUS);
-       if (!status) {
-               msg("Phonebook status notification data is null");
+       TelSimPbStatus_t *status = data;
+       msgb("event(%s) receive !!", TAPI_NOTI_PB_STATUS);
+       if (!status)
                return;
-       }
-       msg("pb_status[%s]", (*status == TRUE) ? "PB INIT DONE" : "PB INIT NOT DONE");
+
+       msg("init[%d] fdn[%d] adn[%d] sdn[%d] usim[%d] aas[%d] gas[%d]",
+               status->init_completed,
+               status->pb_list.b_fdn,
+               status->pb_list.b_adn,
+               status->pb_list.b_sdn,
+               status->pb_list.b_3g,
+               status->pb_list.b_aas,
+               status->pb_list.b_gas);
 }
 
 static int run_pb_get_sim_pb_init_info(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
-       gboolean init_completed = 0;
-       TelPbList list;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int rt = 0;
+       int o_status = 0;
+       TelSimPbList_t list;
 
-       msg("call tapi_pb_get_sim_pb_init_info()");
+       msg("run_pb_get_sim_pb_init_info service!");
+       memset(&list, 0, sizeof(TelSimPbList_t));
 
-       memset(&list, 0, sizeof(TelPbList));
-
-       rt = tapi_pb_get_sim_pb_init_info(handle, &init_completed, &list);
+       rt = tel_get_sim_pb_init_info(handle, &o_status, &list);
        CHECK_RT(rt);
 
-       msg("status[%d]", init_completed);
-       msg("fdn[%d]", list.fdn);
-       msg("adn[%d]", list.adn);
-       msg("sdn[%d]", list.sdn);
-       msg("3g usim[%d]", list.usim);
-
+       msg("status[%d]", o_status);
+       msg("fdn[%d]", list.b_fdn);
+       msg("adn[%d]", list.b_adn);
+       msg("sdn[%d]", list.b_sdn);
+       msg("3g usim[%d]", list.b_3g);
+       msg("aas[%d]", list.b_aas);
+       msg("gas[%d]", list.b_gas);
        return 0;
 }
 
-static void on_pb_get_sim_pb_info(TelHandle *handle, int result, void *data, void *user_data)
+static void on_pb_get_sim_pb_count(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       TelPbInfo *pb_info = data;
-
-       msg("tapi_pb_get_sim_pb_info() response received");
-       CHECK_PB_RESULT(result);
-
-       if (!pb_info) {
-               msg("sim pb info response data is null");
-               return;
+       TelSimPbAccessResult_t access_rt = result;
+       TelSimPbStorageInfo_t *ps = data;
+
+       msg("on_pb_get_sim_pb_count received");
+       msg("access_rt[%d]", access_rt);
+       if (access_rt == TAPI_SIM_PB_SUCCESS) {
+               if (ps->StorageFileType <= TAPI_SIM_PB_GAS) {
+                       msg("StorageFileType[%d][%s]",  ps->StorageFileType, dbg_pb_type_name[ps->StorageFileType]);
+               } else {
+                       msg("StorageFileType[%d]", ps->StorageFileType);
+               }
+               msg("TotalRecordCount[%d]", ps->TotalRecordCount);
+               msg("UsedRecordCount[%d]", ps->UsedRecordCount);
        }
+}
 
-       MSG_PB_TYPE(pb_info->pb_type);
-       if (pb_info->pb_type > TEL_PB_USIM) {
-               msg("Invalid pb type [%d]", pb_info->pb_type);
-               return;
-       }
+static int run_pb_get_sim_pb_count(MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       TelSimPbType_t pb_type = TAPI_SIM_PB_UNKNOWNN;
+       int rt = 0;
 
-       if (pb_info->pb_type == TEL_PB_USIM) {
-               msg("max_count[%d]", pb_info->info_u.usim.max_count);
-               msg("used_count[%d]", pb_info->info_u.usim.used_count);
-               msg("max_text_len[%d]", pb_info->info_u.usim.max_text_len);
-               msg("max_anr_count[%d]", pb_info->info_u.usim.max_anr_count);
-               msg("max_anr_len[%d]", pb_info->info_u.usim.max_anr_len);
-               msg("max_email_count[%d]", pb_info->info_u.usim.max_email_count);
-               msg("max_email_len[%d]", pb_info->info_u.usim.max_email_len);
-               msg("max_sne_len[%d]", pb_info->info_u.usim.max_sne_len);
-               msg("max_gas_len[%d]", pb_info->info_u.usim.max_gas_len);
-               msg("max_aas_len[%d]", pb_info->info_u.usim.max_aas_len);
-       } else {
-               msg("max_count[%d]", pb_info->info_u.sim.max_count);
-               msg("used_count[%d]", pb_info->info_u.sim.used_count);
-               msg("max_num_len[%d]", pb_info->info_u.sim.max_num_len);
-               msg("max_text_len[%d]", pb_info->info_u.sim.max_text_len);
-       }
+       pb_type = data_pb_type[0] - '0';
+       msg("request pb [%d]", pb_type);
+       rt = tel_get_sim_pb_count(handle, pb_type, on_pb_get_sim_pb_count, NULL);
+       CHECK_RT(rt);
+       return 0;
 }
 
-static int run_pb_get_sim_pb_info(MManager *mm, struct menu_data *menu)
+static void on_pb_get_sim_pb_meta_info(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelPbType pb_type = atoi(data_pb_type);
-       TelReturn rt = 0;
+       TelSimPbAccessResult_t access_rt = result;
+       TelSimPbEntryInfo_t *pe = data;
+
+       msg("on_pb_get_sim_pb_meta_info received");
+       msg("access_rt[%d]", access_rt);
+       if (access_rt == TAPI_SIM_PB_SUCCESS) {
+               if (pe->StorageFileType <= TAPI_SIM_PB_GAS) {
+                       msg("StorageFileType[%d][%s]",  pe->StorageFileType, dbg_pb_type_name[pe->StorageFileType]);
+               } else {
+                       msg("StorageFileType[%d]", pe->StorageFileType);
+               }
+               msg("PbIndexMin[%d]",pe->PbIndexMin);
+               msg("PbIndexMax[%d]",pe->PbIndexMax);
+               msg("PbNumLenMax[%d]",pe->PbNumLenMax);
+               msg("PbTextLenMax[%d]",pe->PbTextLenMax);
+               msg("PbUsedCount[%d]",pe->PbUsedCount);
+       }
 
-       msg("call tapi_pb_get_sim_pb_info()");
+}
 
-       MSG_PB_TYPE(pb_type);
+static int run_pb_get_sim_pb_meta_info(MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       TelSimPbType_t pb_type = TAPI_SIM_PB_UNKNOWNN;
+       int rt = 0;
 
-       rt = tapi_pb_get_sim_pb_info(handle, pb_type, on_pb_get_sim_pb_info, NULL);
+       pb_type = data_pb_type[0] - '0';
+       msg("request pb [%d]", pb_type);
+       rt = tel_get_sim_pb_meta_info(handle, pb_type, on_pb_get_sim_pb_meta_info, NULL);
        CHECK_RT(rt);
-
        return 0;
 }
 
-static void on_pb_read_sim_pb_record(TelHandle *handle, int result, void *data, void *user_data)
+static void on_pb_get_sim_pb_usim_meta_info(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       TelPbReadRecord *pb_rec = data;
-       unsigned char i;
-
-       msg("tapi_pb_read_sim_pb_record() response received");
-       CHECK_PB_RESULT(result);
-
-       if (!pb_rec) {
-               msg("pb read record response data is null");
-               return;
-       }
-
-       MSG_PB_TYPE(pb_rec->pb_type);
-       if (pb_rec->pb_type > TEL_PB_USIM) {
-               msg("Invalid pb type [%d]", pb_rec->pb_type);
-               return;
+       TelSimPbAccessResult_t access_rt = result;
+       TelSimPbCapabilityInfo_t *capa = data;
+       int i = 0;
+
+       msg("on_pb_get_sim_pb_3g_meta_info received");
+       msg("access_rt[%d]", access_rt);
+       if (access_rt == TAPI_SIM_PB_SUCCESS) {
+               for (i = 0; i < capa->FileTypeCount; i++) {
+                       if(capa->FileTypeInfo[i].field_type <=TAPI_PB_3G_PBC ) {
+                               msg("capa->FileTypeInfo[%d].field_type[%d][%s]", i, capa->FileTypeInfo[i].field_type, dbg_pb_adf_field_name[capa->FileTypeInfo[i].field_type]);
+                       } else {
+                               msg("capa->FileTypeInfo[%d].field_type[%d]", i, capa->FileTypeInfo[i].field_type);
+                       }
+                       msg("capa->FileTypeInfo[%d].index_max[%d]", i, capa->FileTypeInfo[i].index_max);
+                       msg("capa->FileTypeInfo[%d].text_max[%d]", i, capa->FileTypeInfo[i].text_max);
+                       msg("capa->FileTypeInfo[%d].used_count[%d]", i, capa->FileTypeInfo[i].used_count);
+               }
        }
+}
 
-       msg("index[%d]", pb_rec->index);
-       msg("next_index[%d]", pb_rec->next_index);
+static int run_pb_get_sim_pb_usim_meta_info(MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int rt = 0;
 
-       if (pb_rec->pb_type != TEL_PB_USIM) {
-               msg("name[%s]", pb_rec->rec_u.sim.name);
-               msg("number[%s]", pb_rec->rec_u.sim.number);
-               return;
-       }
+       msg("call 3g meta info");
+       rt = tel_get_sim_pb_usim_meta_info(handle, on_pb_get_sim_pb_usim_meta_info, NULL);
+       CHECK_RT(rt);
+       return 0;
+}
 
-       msg("name[%s]", pb_rec->rec_u.usim.name);
-       msg("number[%s]", pb_rec->rec_u.usim.number);
-       msg("sne[%s]", pb_rec->rec_u.usim.sne);
-       msg("grp_name[%s]", pb_rec->rec_u.usim.grp_name);
+static void on_pb_read_sim_pb_record(TapiHandle *handle, int result, void *data, void *user_data)
+{
+       TelSimPbAccessResult_t access_rt = result;
+       TelSimPbRecord_t *pr = data;
+
+       msg("on_pb_read_sim_pb_record received");
+       msg("access_rt[%d]", access_rt);
+       if(access_rt == TAPI_SIM_PB_SUCCESS) {
+               if( pr->phonebook_type <= TAPI_SIM_PB_GAS){
+                       msg("phonebook_type[%d][%s]", pr->phonebook_type, dbg_pb_type_name[pr->phonebook_type]);
+               } else {
+                       msg("phonebook_type[%d]", pr->phonebook_type);
+               }
+               msg("index[%d]", pr->index);
+               msg("next_index[%d]", pr->next_index);
+               msg("name[%s]", pr->name);
+               if(pr->dcs <= TAPI_SIM_TEXT_ENC_HEX) {
+                       msg("dcs[%d][%s]", pr->dcs, dbg_pb_dcs_name[pr->dcs]);
+               } else {
+                       msg("dcs[%d]", pr->dcs);
+               }
+               msg("number[%s]", pr->number);
 
-       msg("anr_count[%d]", pb_rec->rec_u.usim.anr_count);
-       for(i = 0; i < pb_rec->rec_u.usim.anr_count; i++)
-               msg("[%d]anr_num[%s] anr_desc[%d] anr_aas[%s]", i, pb_rec->rec_u.usim.anr[i].number,
-                       pb_rec->rec_u.usim.anr[i].description, pb_rec->rec_u.usim.anr[i].aas);
+               if(pr->ton <= TAPI_SIM_TON_RESERVED_FOR_EXT) {
+                       msg("ton[%d][%s]", pr->ton, dbg_pb_ton_name[pr->ton]);
+               } else {
+                       msg("ton[%d]", pr->ton);
+               }
 
-       msg("email_count[%d]", pb_rec->rec_u.usim.email_count);
-       for(i = 0; i < pb_rec->rec_u.usim.email_count; i++)
-               msg("email[%d][%s]", i, pb_rec->rec_u.usim.email[i]);
-       msg("hidden[%d]", pb_rec->rec_u.usim.hidden);
+               if (pr->phonebook_type == TAPI_SIM_PB_3GSIM) {
+                       msg("anr1[%s]", pr->anr1);
+                       if(pr->anr1_ton <= TAPI_SIM_TON_RESERVED_FOR_EXT) {
+                               msg("anr1_ton[%d][%s]", pr->anr1_ton, dbg_pb_ton_name[pr->anr1_ton]);
+                       } else {
+                               msg("anr1_ton[%d]", pr->anr1_ton);
+                       }
+                       msg("anr2[%s]", pr->anr2);
+                       if(pr->anr2_ton <= TAPI_SIM_TON_RESERVED_FOR_EXT) {
+                               msg("anr2_ton[%d][%s]", pr->anr2_ton, dbg_pb_ton_name[pr->anr2_ton]);
+                       } else {
+                               msg("anr2_ton[%d]", pr->anr2_ton);
+                       }
+                       msg("anr3[%s]", pr->anr3);
+                       if(pr->anr3_ton <= TAPI_SIM_TON_RESERVED_FOR_EXT) {
+                               msg("anr3_ton[%d][%s]", pr->anr3_ton, dbg_pb_ton_name[pr->anr3_ton]);
+                       } else {
+                               msg("anr3_ton[%d]", pr->anr3_ton);
+                       }
+                       msg("email1[%s]", pr->email1);
+                       msg("email2[%s]", pr->email2);
+                       msg("email3[%s]", pr->email3);
+                       msg("email4[%s]", pr->email4);
+                       msg("group_index[%d]", pr->group_index);
+                       msg("pb_control[%d]", pr->pb_control);
+               }
+       }
 }
 
 static int run_pb_read_sim_pb_record(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelPbRecordInfo record;
-       TelReturn rt = 0;
-
-       msg("call tapi_pb_read_sim_pb_record()");
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       TelSimPbType_t pb_type = TAPI_SIM_PB_UNKNOWNN;
+       int rt = 0;
+       int local_index = 0;
 
-       memset(&record, 0, sizeof(TelPbRecordInfo));
+       pb_type = atoi(data_pb_type);
+       local_index = atoi(data_pb_index);
 
-       record.pb_type = atoi(data_pb_type);
-       record.index = atoi(data_pb_index);
-
-       MSG_PB_TYPE(record.pb_type);
-       msg("pb_index[%d]", record.index);
-
-       rt = tapi_pb_read_sim_pb_record(handle, &record, on_pb_read_sim_pb_record, NULL);
+       msg("request pb [%d], local_index[%d]", pb_type, local_index);
+       rt = tel_read_sim_pb_record(handle, pb_type, local_index, on_pb_read_sim_pb_record, NULL);
        CHECK_RT(rt);
-
        return 0;
 }
 
-static void on_pb_update_sim_pb_record(TelHandle *handle, int result, void *data, void *user_data)
+static void on_pb_update_sim_pb_record(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       msg("tapi_pb_update_sim_pb_record() response received");
-       CHECK_PB_RESULT(result);
+       TelSimPbAccessResult_t access_rt = result;
+
+       msg("on_pb_update_sim_pb_record received");
+       msg("access_rt[%d]", access_rt);
 }
 
 static int run_pb_update_sim_pb_record(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelPbUpdateRecord record;
-       TelReturn rt = 0;
-
-       msg("call tapi_pb_update_sim_pb_record()");
-
-       memset(&record, 0, sizeof(TelPbUpdateRecord));
-
-       record.pb_type = atoi(data_pb_type);
-       record.index = atoi(data_pb_index);
-
-       MSG_PB_TYPE(record.pb_type);
-       if (record.pb_type > TEL_PB_USIM) {
-               msg("Invalid pb type [%d]", record.pb_type);
-               return 0;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int rt = 0;
+       TelSimPbRecord_t pb;
+
+       memset(&pb, 0, sizeof(TelSimPbRecord_t));
+
+       pb.phonebook_type = atoi(data_pb_type);
+       pb.index = atoi(data_pb_index);
+       snprintf((char*)pb.name, strlen(data_pb_name)+1, "%s", data_pb_name);
+       pb.dcs = atoi(data_pb_dcs);
+       snprintf((char*)pb.number, strlen(data_pb_number)+1, "%s", data_pb_number);
+       pb.ton = atoi(data_pb_ton);
+
+       if (pb.phonebook_type == TAPI_SIM_PB_3GSIM) {
+               snprintf((char*)pb.anr1, strlen(data_pb_anr1) + 1, "%s", data_pb_anr1);
+               pb.anr1_ton = data_pb_anr1_ton[0] - '0';
+               snprintf((char*)pb.anr2, strlen(data_pb_anr2) + 1, "%s", data_pb_anr2);
+               pb.anr2_ton = data_pb_anr2_ton[0] - '0';
+               snprintf((char*)pb.anr3, strlen(data_pb_anr3) + 1, "%s", data_pb_anr3);
+               pb.anr3_ton = data_pb_anr3_ton[0] - '0';
+               snprintf((char*)pb.email1, strlen(data_pb_email1) + 1, "%s", data_pb_email1);
+               snprintf((char*)pb.email2, strlen(data_pb_email2) + 1, "%s", data_pb_email2);
+               snprintf((char*)pb.email3, strlen(data_pb_email3) + 1, "%s", data_pb_email3);
+               snprintf((char*)pb.email4, strlen(data_pb_email4) + 1, "%s", data_pb_email4);
+               pb.group_index = data_pb_group_index[0] - '0';
+               pb.pb_control = data_pb_pb_control[0] - '0';
        }
 
-       msg("pb_index[%d]", record.index);
-
-       if (record.pb_type == TEL_PB_USIM) {
-               g_strlcpy(record.rec_u.usim.name, data_pb_name, TEL_PB_TEXT_MAX_LEN+1);
-               g_strlcpy(record.rec_u.usim.number, data_pb_number, TEL_PB_NUMBER_MAX_LEN+1);
-               g_strlcpy(record.rec_u.usim.sne, data_pb_sne, TEL_PB_TEXT_MAX_LEN+1);
-               g_strlcpy(record.rec_u.usim.grp_name, data_pb_group_name, TEL_PB_TEXT_MAX_LEN+1);
-
-               record.rec_u.usim.anr_count = data_pb_anr_count[0] - '0';
-               switch (record.rec_u.usim.anr_count) {
-               case 3:
-                       g_strlcpy(record.rec_u.usim.anr[2].number, data_pb_anr3_num, TEL_PB_NUMBER_MAX_LEN+1);
-                       record.rec_u.usim.anr[2].description = data_pb_anr3_desc[0] - '0';
-                       g_strlcpy(record.rec_u.usim.anr[2].aas, data_pb_anr3_aas, TEL_PB_TEXT_MAX_LEN+1);
-               case 2: /* FALL THROUGH */
-                       g_strlcpy(record.rec_u.usim.anr[1].number, data_pb_anr2_num, TEL_PB_NUMBER_MAX_LEN+1);
-                       record.rec_u.usim.anr[1].description = data_pb_anr1_desc[0] - '0';
-                       g_strlcpy(record.rec_u.usim.anr[1].aas, data_pb_anr2_aas, TEL_PB_TEXT_MAX_LEN+1);
-               case 1: /* FALL THROUGH */
-                       g_strlcpy(record.rec_u.usim.anr[0].number, data_pb_anr1_num, TEL_PB_NUMBER_MAX_LEN+1);
-                       record.rec_u.usim.anr[0].description= data_pb_anr1_desc[0] - '0';
-                       g_strlcpy(record.rec_u.usim.anr[0].aas, data_pb_anr1_aas, TEL_PB_TEXT_MAX_LEN+1);
-               default:
-               break;
-               }
-
-               record.rec_u.usim.email_count = data_pb_email_count[0] - '0';
-               switch (record.rec_u.usim.email_count) {
-               case 4:
-                       g_strlcpy((char*)&record.rec_u.usim.email[3], data_pb_email4, TEL_PB_TEXT_MAX_LEN+1);
-               case 3:
-                       g_strlcpy((char*)&record.rec_u.usim.email[2], data_pb_email3, TEL_PB_TEXT_MAX_LEN+1);
-               case 2:
-                       g_strlcpy((char*)&record.rec_u.usim.email[1], data_pb_email2, TEL_PB_TEXT_MAX_LEN+1);
-               case 1:
-                       g_strlcpy((char*)&record.rec_u.usim.email[0], data_pb_email1, TEL_PB_TEXT_MAX_LEN+1);
-               default:
-               break;
-               }
-
-               record.rec_u.usim.hidden = data_pb_hidden[0] - '0';
-       }
-       else {
-               g_strlcpy(record.rec_u.sim.name, data_pb_name, TEL_PB_TEXT_MAX_LEN+1);
-               g_strlcpy(record.rec_u.sim.number, data_pb_number, TEL_PB_NUMBER_MAX_LEN+1);
+       if( pb.phonebook_type <= TAPI_SIM_PB_GAS){
+               msg("phonebook_type[%d][%s]", pb.phonebook_type, dbg_pb_type_name[pb.phonebook_type]);
+       } else {
+               msg("phonebook_type[%d]", pb.phonebook_type);
        }
 
-       rt = tapi_pb_update_sim_pb_record(handle, &record, on_pb_update_sim_pb_record, NULL);
+       rt = tel_update_sim_pb_record(handle, &pb, on_pb_update_sim_pb_record, NULL);
        CHECK_RT(rt);
-
        return 0;
 }
 
-static void on_pb_delete_sim_pb_record(TelHandle *handle, int result, void *data, void *user_data)
+static void on_pb_delete_sim_pb_record(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       msg("tapi_pb_delete_sim_pb_record() response received");
-       CHECK_PB_RESULT(result);
+       TelSimPbAccessResult_t access_rt = result;
+
+       msg("on_pb_delete_sim_pb_record received");
+       msg("access_rt[%d]", access_rt);
 }
 
 static int run_pb_delete_sim_pb_record(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelPbRecordInfo record;
-       TelReturn rt = 0;
-
-       msg("call tapi_pb_delete_sim_pb_record()");
-
-       memset(&record, 0, sizeof(TelPbRecordInfo));
-
-       record.pb_type = atoi(data_pb_type);
-       record.index = atoi(data_pb_index);
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       TelSimPbType_t pb_type = TAPI_SIM_PB_UNKNOWNN;
+       int rt = 0;
+       int local_index = 0;
 
-       MSG_PB_TYPE(record.pb_type);
-       msg("pb_index[%d]", record.index);
+       pb_type = atoi(data_pb_type);
+       local_index = atoi(data_pb_index);
 
-       rt = tapi_pb_delete_sim_pb_record(handle, &record, on_pb_delete_sim_pb_record, NULL);
+       msg("request pb [%d], local_index[%d]", pb_type, local_index);
+       rt = tel_delete_sim_pb_record(handle, pb_type, local_index, on_pb_delete_sim_pb_record, NULL);
        CHECK_RT(rt);
-
        return 0;
 }
 
 static struct menu_data menu_pb_get_sim_pb_init_info[] = {
-       { "1", "run", NULL, run_pb_get_sim_pb_init_info, NULL },
-       { NULL, NULL, },
+               { "1", "run", NULL, run_pb_get_sim_pb_init_info, NULL },
+               { NULL, NULL, },
 };
 
-static struct menu_data menu_pb_get_sim_pb_info[] = {
-       { "1", "type- 0:fdn, 1:adn, 2:sdn, 3:usim", NULL, NULL, data_pb_type },
-       { "2", "run", NULL, run_pb_get_sim_pb_info,     NULL },
-       { NULL, NULL, },
+/*static struct menu_data menu_pb_select_sim_pb[] = {
+               { "1", "type- 0:fdn, 1:adn, 2:sdn, 3:usim, 4:aas, 5:gas", NULL, NULL, data_pb_type},
+               { "2", "run", NULL, run_pb_select_sim_pb, NULL },
+               { NULL, NULL, },
+};*/
+
+static struct menu_data menu_pb_get_sim_pb_count[] = {
+               { "1", "type- 0:fdn, 1:adn, 2:sdn, 3:usim, 4:aas, 5:gas", NULL, NULL, data_pb_type },
+               { "2", "run", NULL, run_pb_get_sim_pb_count, NULL },
+               { NULL, NULL, },
+};
+
+static struct menu_data menu_pb_get_sim_pb_meta_info[] = {
+               { "1", "type- 0:fdn, 1:adn, 2:sdn, 3:usim, 4:aas, 5:gas", NULL, NULL, data_pb_type },
+               { "2", "run", NULL, run_pb_get_sim_pb_meta_info,        NULL },
+               { NULL, NULL, },
+};
+
+static struct menu_data menu_pb_get_sim_pb_usim_meta_info[] = {
+               { "1", "run", NULL, run_pb_get_sim_pb_usim_meta_info, NULL },
+               { NULL, NULL, },
 };
 
 static struct menu_data menu_pb_read_sim_pb_record[] = {
-       { "1", "type- 0:fdn, 1:adn, 2:sdn, 3:usim", NULL, NULL, data_pb_type },
-       { "2", "index", NULL, NULL, data_pb_index },
-       { "3", "run", NULL, run_pb_read_sim_pb_record,  NULL },
-       { NULL, NULL, },
+               { "1", "type- 0:fdn, 1:adn, 2:sdn, 3:usim, 4:aas, 5:gas", NULL, NULL, data_pb_type },
+               { "2", "index", NULL, NULL, data_pb_index },
+               { "3", "run", NULL, run_pb_read_sim_pb_record,  NULL },
+               { NULL, NULL, },
 };
 
 static struct menu_data menu_pb_update_sim_pb_record[] = {
-       { "1", "type- 0:fdn, 1:adn, 2:sdn, 3:usim", NULL, NULL, data_pb_type },
-       { "2", "index", NULL, NULL, data_pb_index },
-       { "3", "name", NULL, NULL, data_pb_name },
-       { "4", "number", NULL, NULL, data_pb_number },
-       { "5", "sne", NULL, NULL, data_pb_sne },
-       { "6", "group_name", NULL, NULL, data_pb_group_name },
-       { "7", "anr_count", NULL, NULL, data_pb_anr_count },
-       { "8", "anr1_num", NULL, NULL, data_pb_anr1_num },
-       { "9", "anr1_desc", NULL, NULL, data_pb_anr1_desc },
-       { "10", "anr1_aas", NULL, NULL, data_pb_anr1_aas },
-       { "11", "anr2_num", NULL, NULL, data_pb_anr2_num },
-       { "12", "anr2_desc", NULL, NULL, data_pb_anr2_desc },
-       { "13", "anr2_aas", NULL, NULL, data_pb_anr2_aas },
-       { "14", "anr3_num", NULL, NULL, data_pb_anr3_num },
-       { "15", "anr3_desc", NULL, NULL, data_pb_anr3_desc },
-       { "16", "anr3_aas", NULL, NULL, data_pb_anr3_aas },
-       { "17", "email_count", NULL, NULL, data_pb_email_count },
-       { "18", "email1", NULL, NULL, data_pb_email1 },
-       { "19", "email2", NULL, NULL, data_pb_email2 },
-       { "20", "email3", NULL, NULL, data_pb_email3 },
-       { "21", "email4", NULL, NULL, data_pb_email4 },
-       { "22", "hidden", NULL, NULL, data_pb_hidden },
-       { "23", "run", NULL, run_pb_update_sim_pb_record, NULL },
-       { NULL, NULL, },
+               { "1", "type- 0:fdn, 1:adn, 2:sdn, 3:usim, 4:aas, 5:gas", NULL, NULL, data_pb_type },
+               { "2", "index", NULL, NULL, data_pb_index },
+               { "3", "name", NULL, NULL, data_pb_name },
+               { "4", "dcs", NULL, NULL, data_pb_dcs },
+               { "5", "number", NULL, NULL, data_pb_number },
+               { "6", "ton", NULL, NULL, data_pb_ton },
+               { "7", "anr1", NULL, NULL, data_pb_anr1 },
+               { "8", "anr1_ton", NULL, NULL, data_pb_anr1_ton },
+               { "9", "anr2", NULL, NULL, data_pb_anr2 },
+               { "10", "anr2_ton", NULL, NULL, data_pb_anr2_ton },
+               { "11", "anr3", NULL, NULL, data_pb_anr3 },
+               { "12", "anr3_ton", NULL, NULL, data_pb_anr3_ton },
+               { "13", "email1", NULL, NULL, data_pb_email1 },
+               { "14", "email2", NULL, NULL, data_pb_email2 },
+               { "15", "email3", NULL, NULL, data_pb_email3 },
+               { "16", "email4", NULL, NULL, data_pb_email4 },
+               { "17", "group_index", NULL, NULL, data_pb_group_index },
+               { "18", "pb_control", NULL, NULL, data_pb_pb_control },
+               { "19", "run", NULL, run_pb_update_sim_pb_record, NULL },
+               { NULL, NULL, },
 };
 
 static struct menu_data menu_pb_delete_sim_pb_record[] = {
-       { "1", "type- 0:fdn, 1:adn, 2:sdn, 3:usim", NULL, NULL, data_pb_type },
-       { "2", "index", NULL, NULL, data_pb_index },
-       { "3", "run", NULL, run_pb_delete_sim_pb_record, NULL },
-       { NULL, NULL, },
+               { "1", "type- 0:fdn, 1:adn, 2:sdn, 3:usim, 4:aas, 5:gas", NULL, NULL, data_pb_type },
+               { "2", "index", NULL, NULL, data_pb_index },
+               { "3", "run", NULL, run_pb_delete_sim_pb_record, NULL },
+               { NULL, NULL, },
+};
+
+struct menu_data menu_phonebook_common[] = {
+               { "1", "phonebook init info", menu_pb_get_sim_pb_init_info, NULL,       NULL },
+               { "2", "get pb count",  menu_pb_get_sim_pb_count, NULL, NULL },
+               { "3", "get pb meta info", menu_pb_get_sim_pb_meta_info, NULL, NULL },
+               { "4", "get usim pb meta info", menu_pb_get_sim_pb_usim_meta_info, NULL, NULL },
+               { "5", "read record", menu_pb_read_sim_pb_record, NULL, NULL },
+               { "6", "add/update record", menu_pb_update_sim_pb_record, NULL, NULL },
+               { "7", "delete record", menu_pb_delete_sim_pb_record, NULL, NULL },
+               { NULL, NULL, },
 };
 
 struct menu_data menu_phonebook[] = {
-       { "1", "phonebook init info", menu_pb_get_sim_pb_init_info, NULL, NULL },
-       { "2", "get pb info", menu_pb_get_sim_pb_info, NULL, NULL },
-       { "3", "read record", menu_pb_read_sim_pb_record, NULL, NULL },
-       { "4", "add/update record", menu_pb_update_sim_pb_record, NULL, NULL },
-       { "5", "delete record", menu_pb_delete_sim_pb_record, NULL, NULL },
-       { NULL, NULL, },
+               {"1", "3GPP(WCDMA/GSM/LTE)" , menu_phonebook_common, NULL, NULL},
+               {"2", "3GPP2(CDMA)" , menu_phonebook_common, NULL, NULL},
+               { NULL, NULL, },
 };
 
-void register_phonebook_event(TelHandle *handle)
+
+void register_phonebook_event(TapiHandle *handle)
 {
-       TelReturn ret;
+       int ret;
 
-       ret = tapi_register_event_id(handle, TEL_NOTI_PB_STATUS, on_noti_pb_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS) {
-               msg("TEL_NOTI_PB_STATUS - event register failed(%d)", ret);
+       /* PHONEBOOK */
+       ret = tel_register_noti_event(handle, TAPI_NOTI_PB_STATUS, on_noti_pb_status, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
        }
 }
index 60d007a9d995f40e4d4157bb85c76eae2f1b82cc..6ce59aa93adf37f48cefdaba1fca84b3700d4e62 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,6 +21,6 @@
 #ifndef _PHONEBOOK_H_
 #define _PHONEBOOK_H_
 
-void register_phonebook_event(TelHandle *handle);
+void register_phonebook_event(TapiHandle *handle);
 
 #endif /* _PHONEBOOK_H_ */
index 91c67e99b5dbfa5712029f0d5d53f6eb2184b0bb..a6165388e139a464f239f6f10662cc5cc0211cfe 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <sys/time.h>
 #include <unistd.h>
 #include <glib.h>
-#include <glib-object.h>
 
-#include <tapi.h>
-#include <tapi_sat.h>
-#include <tapi_events.h>
+#include <tapi_common.h>
+#include <ITapiSat.h>
+#include <TapiUtility.h>
 
 #include "menu.h"
 #include "sat.h"
 
-TelSatSetupMenuInfo main_menu;
+TelSatSetupMenuInfo_t main_menu;
 
-/* Event Callback */
-static void on_noti_sat_setup_menu(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+static void on_noti_setup_menu(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       int index;
-       TelSatSetupMenuInfo *setup_menu = NULL;
+       int local_index;
+       TelSatSetupMenuInfo_t *setup_menu = NULL;
 
        msg("noti id (%s)", noti_id);
 
@@ -47,21 +46,21 @@ static void on_noti_sat_setup_menu(TelHandle *handle, const char *noti_id, void
                return;
        }
 
-       setup_menu = (TelSatSetupMenuInfo *)data;
-       msg("command id (%d)", setup_menu->command_id);
-       msg("menu present (%d)", setup_menu->is_main_menu_present);
-       msg("menu title (%s)", setup_menu->sat_main_title);
-       msg("item cnt (%d)", setup_menu->sat_main_menu_item_count);
-       for(index=0;index < setup_menu->sat_main_menu_item_count; index++){
-               msg("item id(%d) (%s)", setup_menu->sat_main_menu_item[index].item_id, setup_menu->sat_main_menu_item[index].item_string);
+       setup_menu = (TelSatSetupMenuInfo_t *)data;
+       msg("command id (%d)", setup_menu->commandId);
+       msg("menu present (%d)", setup_menu->bIsMainMenuPresent);
+       msg("menu title (%s)", setup_menu->satMainTitle);
+       msg("item cnt (%d)", setup_menu->satMainMenuNum);
+       for(local_index=0;local_index < setup_menu->satMainMenuNum; local_index++){
+               msg("item id(%d) (%s)", setup_menu->satMainMenuItem[local_index].itemId, setup_menu->satMainMenuItem[local_index].itemString);
        }
-       msg("menu help info (%d)", setup_menu->is_sat_main_menu_help_info);
-       msg("menu updated (%d)", setup_menu->is_updated_sat_main_menu);
+       msg("menu help info (%d)", setup_menu->bIsSatMainMenuHelpInfo);
+       msg("menu updated (%d)", setup_menu->bIsUpdatedSatMainMenu);
 }
 
-static void on_noti_sat_display_text(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+static void on_noti_display_text(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       TelSatDisplayTextInd *display_text = NULL;
+       TelSatDisplayTextInd_t *display_text = NULL;
 
        msg("noti id (%s)", noti_id);
 
@@ -70,20 +69,20 @@ static void on_noti_sat_display_text(TelHandle *handle, const char *noti_id, voi
                return;
        }
 
-       display_text = (TelSatDisplayTextInd *)data;
+       display_text = (TelSatDisplayTextInd_t *)data;
 
-       msg("command id (%d)", display_text->command_id);
+       msg("command id (%d)", display_text->commandId);
        msg("display text (%s)", display_text->text.string);
-       msg("string len(%d)", display_text->text.string_len);
+       msg("string len(%d)", display_text->text.stringLen);
        msg("duration (%d)", display_text->duration);
-       msg("high priority (%d)", display_text->is_priority_high);
-       msg("user response required(%d)", display_text->is_user_resp_required);
+       msg("high priority (%d)", display_text->bIsPriorityHigh);
+       msg("user response required(%d)", display_text->bIsUserRespRequired);
 }
 
-static void on_noti_sat_select_item(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+static void on_noti_select_item(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       int index;
-       TelSatSelectItemInd *select_item = NULL;
+       int local_index;
+       TelSatSelectItemInd_t *select_item = NULL;
 
        msg("noti id (%s)", noti_id);
 
@@ -92,22 +91,21 @@ static void on_noti_sat_select_item(TelHandle *handle, const char *noti_id, void
                return;
        }
 
-       select_item = (TelSatSelectItemInd *)data;
+       select_item = (TelSatSelectItemInd_t *)data;
 
-       msg("command id (%d)", select_item->command_id);
-       msg("help info(%d)", select_item->is_help_info_available);
+       msg("command id (%d)", select_item->commandId);
+       msg("help info(%d)", select_item->bIsHelpInfoAvailable);
        msg("selected item string(%s)", select_item->text.string);
-       msg("string len(%d)", select_item->text.string_len);
-       msg("default item index(%d)", select_item->default_item_index);
-       msg("item count(%d)", select_item->menu_item_count);
-       for(index=0;index < select_item->menu_item_count; index++){
-               msg("item index(%d) id(%d) len(%d) str(%s)", index,
-                       select_item->menu_item[index].item_id, select_item->menu_item[index].text_len, select_item->menu_item[index].text);
+       msg("string len(%d)", select_item->text.stringLen);
+       msg("default item local_index(%d)", select_item->defaultItemIndex);
+       msg("item count(%d)", select_item->menuItemCount);
+       for(local_index=0;local_index < select_item->menuItemCount; local_index++){
+               msg("item local_index(%d) id(%d) len(%d) str(%s)", local_index,
+                       select_item->menuItem[local_index].itemId, select_item->menuItem[local_index].textLen, select_item->menuItem[local_index].text);
        }
 }
 
-/* Requests and Responses */
-static void on_sat_select_menu(TelHandle *handle, int result, void *data, void *user_data)
+static void on_resp_select_menu(TapiHandle *handle, int result, void *data, void *user_data)
 {
        msg("");
        msg("select menu item result(%d)", result);
@@ -115,13 +113,15 @@ static void on_sat_select_menu(TelHandle *handle, int result, void *data, void *
 
 static int run_sat_get_main_menu_info(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
 
-       msg("call tapi_sat_get_main_menu_info()");
+       msg("call get main menu info()");
 
-       result = tapi_sat_get_main_menu_info(handle, &main_menu);
-       CHECK_RT(result);
+       result = tel_get_sat_main_menu_info(handle, &main_menu);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
 
        msg("success to get main menu");
        return 0;
@@ -129,15 +129,15 @@ static int run_sat_get_main_menu_info(MManager *mm, struct menu_data *menu)
 
 static int run_sat_select_menu(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelSatMenuSelectionReqInfo selected_menu;
-       int index=0, item_id;
-       TelReturn result;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       TelSatMenuSelectionReqInfo_t selected_menu;
+       int result, local_index=0;
+       int item_id;
 
-       msg("call tapi_sat_select_menu()");
+       msg("call select menu()");
 
-       for(index=0;index < main_menu.sat_main_menu_item_count; index++){
-               msg("item id(%d) (%s)", main_menu.sat_main_menu_item[index].item_id, main_menu.sat_main_menu_item[index].item_string);
+       for(local_index=0;local_index < main_menu.satMainMenuNum; local_index++){
+               msg("item id(%d) (%s)", main_menu.satMainMenuItem[local_index].itemId, main_menu.satMainMenuItem[local_index].itemString);
        }
        msg("select item >>> ");
        if (scanf("%d", &item_id) < 0) {
@@ -145,35 +145,61 @@ static int run_sat_select_menu(MManager *mm, struct menu_data *menu)
                return 0;
        }
 
-       selected_menu.is_help_requested = 0;
-       selected_menu.item_identifier = item_id;
+       selected_menu.bIsHelpRequested = 0;
+       selected_menu.itemIdentifier = item_id;
 
-       msg("selected item id (%d)", selected_menu.item_identifier);
-       result = tapi_sat_select_menu(handle, &selected_menu, on_sat_select_menu, NULL);
-       CHECK_RT(result);
+       msg("selected item id (%d)", selected_menu.itemIdentifier);
+       result = tel_select_sat_menu(handle, &selected_menu, on_resp_select_menu, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
 
        return 0;
 }
 
-/* SAT Menu */
-struct menu_data menu_sat[] = {
+struct menu_data menu_sat_common[] = {
        { "1", "GET Main Menu Info", NULL, run_sat_get_main_menu_info, NULL},
        { "2", "SELECT Main Menu", NULL, run_sat_select_menu, NULL},
+/*     { "2a", "SET PLMN Selection mode (Automatic)", menu_net_set_plmn_mode_automatic, NULL, NULL},
+       { "2s", "SET PLMN Selection mode (Manual)", menu_net_set_plmn_mode_manual, NULL, NULL},
+       { "2g", "GET PLMN Selection mode", menu_net_get_plmn_mode, NULL, NULL},
+       { "3s", "SET Service Domain", menu_net_set_service_domain, NULL, NULL},
+       { "3g", "GET Service Domain", menu_net_get_service_domain, NULL, NULL},
+       { "4s", "SET Band", menu_net_set_band, NULL, NULL},
+       { "4g", "GET Band", menu_net_get_band, NULL, NULL},
+       { "5s", "SET Preferred PLMN", menu_net_set_preferred_plmn, NULL, NULL},
+       { "5g", "GET Preferred PLMN", menu_net_get_preferred_plmn, NULL, NULL},
+       { "6", "SET Cancel manual search", menu_net_set_cancel_manual_search, NULL, NULL},
+       { "7", "GET Serving network", menu_net_get_serving_network, NULL, NULL},*/
        { NULL, NULL, },
 };
 
-/* Register Events */
-void register_sat_event(TelHandle *handle)
+struct menu_data menu_sat[] = {
+               {"1", "3GPP(WCDMA/GSM/LTE)" , menu_sat_common, NULL, NULL},
+               {"2", "3GPP2(CDMA)" , menu_sat_common, NULL, NULL},
+               { NULL, NULL, },
+};
+
+void register_sat_event(TapiHandle *handle)
 {
-       TelReturn ret;
-
-       ret = tapi_register_event_id(handle, TEL_NOTI_SAT_SETUP_MENU, on_noti_sat_setup_menu, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TAPI_NOTI_SAT_SETUP_MENU - event register failed [%d]", ret);
-       ret = tapi_register_event_id(handle, TEL_NOTI_SAT_DISPLAY_TEXT, on_noti_sat_display_text, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TAPI_NOTI_SAT_DISPLAY_TEXT - event register failed [%d]", ret);
-       ret = tapi_register_event_id(handle, TEL_NOTI_SAT_SELECT_ITEM, on_noti_sat_select_item, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TAPI_NOTI_SAT_SELECT_ITEM - event register failed [%d]", ret);
+       int ret;
+
+       /* SAT */
+       ret = tel_register_noti_event(handle, TAPI_NOTI_SAT_SETUP_MENU, on_noti_setup_menu, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
+
+       ret = tel_register_noti_event(handle, TAPI_NOTI_SAT_DISPLAY_TEXT, on_noti_display_text, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
+
+       ret = tel_register_noti_event(handle, TAPI_NOTI_SAT_SELECT_ITEM, on_noti_select_item, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
+
+       /*      ret = tel_register_noti_event(handle, TAPI_NOTI_SAT_GET_INKEY, on_noti_get_inkey, NULL);
+       ret = tel_register_noti_event(handle, TAPI_NOTI_SAT_GET_INPUT, on_noti_get_input, NULL);*/
 }
index 762906dd3de8a7bca73ea62985b8a00a27ff001a..2cc1e97697f231ae0c49ad1c0515fa6a5f535025 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,6 +22,6 @@
 #define __SAT_H__
 
 
-void register_sat_event(TelHandle *handle);
+void register_sat_event(TapiHandle *handle);
 
 #endif
old mode 100755 (executable)
new mode 100644 (file)
index 96a349f..ad06d84
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <sys/time.h>
 #include <unistd.h>
 #include <glib.h>
-#include <glib-object.h>
 
-#include <tapi.h>
-#include <tapi_sim.h>
-#include <tapi_events.h>
+#include <tapi_common.h>
+#include <ITapiSim.h>
+#include <TapiUtility.h>
 
 #include "menu.h"
 #include "sim.h"
 
-#define CHECK_SIM_RESULT(x) \
+#define CHECK_RT(x) \
 { \
-       if (x >= TEL_SIM_RESULT_SUCCESS && x <= TEL_SIM_RESULT_OPERATION_NOT_PERMITTED) { \
-               msg("result[%d][%s]", x, dbg_sim_result[x]); \
-       } else { \
-               msg("API failed with result[%d]", x); \
+       if((x) != 0) { \
+               msg("api call failed with[%d]",x); \
+               return 0; \
        } \
-       if (x != TEL_SIM_RESULT_SUCCESS) \
-               return; \
-} \
-
-static char *dbg_sim_result[] = {
-       "TEL_SIM_RESULT_SUCCESS",
-       "TEL_SIM_RESULT_FAILURE",
-       "TEL_SIM_RESULT_INVALID_PARAMETER",
-       "TEL_SIM_RESULT_MEMORY_FAILURE",
-       "TEL_SIM_RESULT_OPERATION_NOT_SUPPORTED",
-       "TEL_SIM_RESULT_CARD_ERROR",
-       "TEL_SIM_RESULT_ACCESS_CONDITION_NOT_SATISFIED",
-       "TEL_SIM_RESULT_INCOMPATIBLE_PIN_OPERATION",
-       "TEL_SIM_RESULT_INCORRECT_PASSWORD",
-       "TEL_SIM_RESULT_PIN_REQUIRED",
-       "TEL_SIM_RESULT_PUK_REQUIRED",
-       "TEL_SIM_RESULT_PERM_BLOCKED",
-       "TEL_SIM_RESULT_SQN_FAILURE",
-       "TEL_SIM_RESULT_OPERATION_NOT_PERMITTED",
-};
-
-static char data_sim_set_language[MENU_DATA_SIZE + 1] = { 0x01,}; //0x01 = English
-
-static char data_sim_set_mw_profile_id[MENU_DATA_SIZE + 1] = {};
-static char data_sim_set_mw_indicator_status[MENU_DATA_SIZE + 1] = {};
-static char data_sim_set_mw_voice_cnt[MENU_DATA_SIZE + 1] = {};
-static char data_sim_set_mw_fax_cnt[MENU_DATA_SIZE + 1] = {};
-static char data_sim_set_mw_email_cnt[MENU_DATA_SIZE + 1] = {};
-static char data_sim_set_mw_other_cnt[MENU_DATA_SIZE + 1] = {};
-static char data_sim_set_mw_video_cnt[MENU_DATA_SIZE + 1] = {};
-
-static char data_sim_set_mb_profile_id[MENU_DATA_SIZE + 1] = {};
-static char data_sim_set_mb_type[MENU_DATA_SIZE + 1] = {};
-static char data_sim_set_mb_alpha_id[MENU_DATA_SIZE + 1] = {};
-static char data_sim_set_mb_number[MENU_DATA_SIZE + 1] = {};
-
-static char data_sim_req_authentication_type[MENU_DATA_SIZE + 1] = { 0x01,}; //SIM_AUTH_TYPE_GSM
-static char data_sim_req_authentication_autn_data[MENU_DATA_SIZE + 1] = { 200, 200, 200,
-       200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, };
-static char data_sim_req_authentication_rand_data[MENU_DATA_SIZE + 1] = { 200, 200, 200,
-       200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, };
-
-static char data_sim_verify_pins_type[MENU_DATA_SIZE + 1] = {};
-static char data_sim_verify_pins_pw[MENU_DATA_SIZE + 1] = {};
-
-static char data_sim_verify_puks_type[MENU_DATA_SIZE + 1] = {};
-static char data_sim_verify_puks_puk_pw[MENU_DATA_SIZE + 1] = {};
-static char data_sim_verify_puks_pin[MENU_DATA_SIZE + 1] = {};
-
-static char data_sim_change_pins_type[MENU_DATA_SIZE + 1] = {};
-static char data_sim_change_pins_old_pw[MENU_DATA_SIZE + 1] = {};
-static char data_sim_change_pins_new_pw[MENU_DATA_SIZE + 1] = {};
+}
 
-static char data_sim_facility_type[MENU_DATA_SIZE + 1] = {};
-static char data_sim_facility_pw[MENU_DATA_SIZE + 1] = {};
-static char data_sim_apdu[MENU_DATA_SIZE + 1] = {};
+#define CHECK_ACCESS_RT(x) \
+{ \
+       if((x) != 0) { \
+               msg("api call failed with[%d]",x); \
+               return; \
+       } \
+}
 
-static int _sim_str_to_hex(char a)
+static char data_sim_set_language[MENU_DATA_SIZE + 1] = { 0x01, };
+static char data_sim_set_state[MENU_DATA_SIZE + 1] = { 0x01, };
+
+
+static char data_sim_set_cf_b_cphs[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_cf_rec_index[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_cf_msp_num[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_cf_cfu_status[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_cf_ton[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_cf_npi[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_cf_number[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_cf_cc2_id[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_cf_ext7_id[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_cf_cphs_line1[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_cf_cphs_line2[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_cf_cphs_fax[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_cf_cphs_data[MENU_DATA_SIZE + 1] = { };
+
+static char data_sim_set_mw_b_cphs[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_mw_rec_index[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_mw_indicator_status[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_mw_voice_cnt[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_mw_fax_cnt[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_mw_email_cnt[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_mw_other_cnt[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_mw_video_cnt[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_mw_cphs_voice1[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_mw_cphs_voice2[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_mw_cphs_fax[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_mw_cphs_data[MENU_DATA_SIZE + 1] = { };
+
+static char data_sim_set_mb_b_cphs[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_mb_type[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_mb_rec_index[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_mb_profile_num[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_mb_alpha_id_max_len[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_mb_alpha_id[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_mb_ton[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_mb_npi[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_mb_number[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_mb_cc_id[MENU_DATA_SIZE + 1] = { };
+static char data_sim_set_mb_ext1_id[MENU_DATA_SIZE + 1] = { };
+
+static char data_sim_req_authentication_type[MENU_DATA_SIZE + 1] = { 0x01, }; //SIM_AUTH_TYPE_GSM
+static char data_sim_req_authentication_autn_data[MENU_DATA_SIZE + 1] = { 200,
+               200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
+               200, };
+static char data_sim_req_authentication_rand_data[MENU_DATA_SIZE + 1] = { 200,
+               200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
+               200, };
+
+static char data_sim_verify_pins_type[MENU_DATA_SIZE + 1] = "0";
+static char data_sim_verify_pins_pw[MENU_DATA_SIZE + 1] = { };
+
+static char data_sim_verify_puks_type[MENU_DATA_SIZE + 1] = "2";
+static char data_sim_verify_puks_puk[MENU_DATA_SIZE + 1] = { };
+static char data_sim_verify_puks_pin[MENU_DATA_SIZE + 1] = { };
+
+static char data_sim_change_pins_type[MENU_DATA_SIZE + 1] = "0";
+static char data_sim_change_pins_old_pw[MENU_DATA_SIZE + 1] = "";
+static char data_sim_change_pins_new_pw[MENU_DATA_SIZE + 1] = "";
+
+static char data_sim_disable_facility_type[MENU_DATA_SIZE + 1] = "1";
+static char data_sim_disable_facility_pw[MENU_DATA_SIZE + 1] = { };
+
+static char data_sim_enable_facility_type[MENU_DATA_SIZE + 1] = { };
+static char data_sim_enable_facility_pw[MENU_DATA_SIZE + 1] = { };
+
+static char data_sim_get_facility_type[MENU_DATA_SIZE + 1] = "1";
+
+static char data_sim_get_lock_type[MENU_DATA_SIZE + 1] = "1";
+
+static char data_sim_transmit_apdu_apdu[MENU_DATA_SIZE + 1] = "0070000000";
+
+static int _sim_str_to_hex (char a)
 {
-       int ret;
+       int ret = 0;
 
        if (a >= '0' && a <= '9')
                ret = a - '0';
        else if (a >= 'a' && a <= 'f')
                ret = a - 'a' + 10;
-       else if (a >= 'A' && a <= 'F')
-               ret = a - 'A' + 10;
-       else
-               ret = -1;
+       //printf("'%c' => %d(0x%x)\n", a, ret, ret);
        return ret;
 }
 
-/* Event Callback */
-static void on_noti_sim_status(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+static void on_noti_sim_status (TapiHandle *handle, const char *noti_id,
+               void *data, void *user_data)
 {
-       TelSimCardStatusInfo *status = data;
-
-       msgb("event(%s) received !!", TEL_NOTI_SIM_STATUS);
+       TelSimCardStatus_t *status = data;
 
-       if (!status) {
-               msg("sim card status notification data is null");
-               return;
-       }
-       msg("status[%d]", status->status);
-       msg("change_status[%d]", status->change_status);
+       msg("");
+       msgb("event(%s) receive !!", TAPI_NOTI_SIM_STATUS);
+       msg("status[%d]", *status);
 }
 
-/* Requests and Responses */
-static int run_sim_get_init_info(MManager *mm, struct menu_data *menu)
+static void on_noti_sim_cf_state(TapiHandle *handle, const char *noti_id,
+               void *data, void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
-       TelSimCardStatusInfo sim_status_info;
+       int *status = data;
+       msg("");
+       msgp ("property(%s) receive !!", TAPI_PROP_SIM_CALL_FORWARD_STATE);
+       if(status)
+               msg("status[%d]", *status);
+}
 
-       msg("call tapi_sim_get_init_info()");
+static int run_sim_get_init_info (MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
+       TelSimCardStatus_t o_status = 0;
+       gboolean o_new = FALSE;
 
-       memset(&sim_status_info, 0, sizeof(TelSimCardStatusInfo));
+       msg("call [%s] tapi service !!!", menu->title);
 
-       rt = tapi_sim_get_init_info(handle, &sim_status_info);
+       rt = tel_get_sim_init_info (handle, &o_status, &o_new);
        CHECK_RT(rt);
 
-       msg("status[%d]", sim_status_info.status);
-       msg("change_status[%d]", sim_status_info.change_status);
-
+       msg("status[%d]", o_status);
+       msg("new_sim[%d]", o_new);
        return 0;
 }
 
-static int run_sim_get_card_type(MManager *mm, struct menu_data *menu)
+static int run_sim_get_card_type (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
-       TelSimCardType sim_type = 0;
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
+       TelSimCardType_t o_type = 0;
 
-       msg("call tapi_sim_get_type()");
+       msg("call [%s] tapi service !!!", menu->title);
 
-       rt = tapi_sim_get_type(handle, &sim_type);
+       rt = tel_get_sim_type (handle, &o_type);
        CHECK_RT(rt);
 
-       msg("sim card type[%d]", sim_type);
-
+       msg("card type[%d]", o_type);
        return 0;
 }
 
-static int run_sim_get_imsi(MManager *mm, struct menu_data *menu)
+static int run_sim_get_imsi (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
-       TelSimImsiInfo imsi;
-
-       msg("call tapi_sim_get_imsi()");
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
+       TelSimImsiInfo_t imsi;
+       memset (&imsi, 0, sizeof(TelSimImsiInfo_t));
 
-       memset(&imsi, 0, sizeof(TelSimImsiInfo));
+       msg("call [%s] tapi service !!!", menu->title);
 
-       rt = tapi_sim_get_imsi(handle, &imsi);
+       rt = tel_get_sim_imsi (handle, &imsi);
        CHECK_RT(rt);
 
-       msg("mcc[%s]", imsi.mcc);
-       msg("mnc[%s]", imsi.mnc);
-       msg("msin[%s]", imsi.msin);
-
+       msg("mcc[%s]", imsi.szMcc);
+       msg("mnc[%s]", imsi.szMnc);
+       msg("msin[%s]", imsi.szMsin);
        return 0;
 }
 
-static int run_sim_get_ecc(MManager *mm, struct menu_data *menu)
+static int run_sim_get_ecc (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
-       TelSimEccList ecc_list;
-       unsigned int i =0;
-
-       msg("call tapi_sim_get_ecc()");
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
+       TelSimEccList_t ecc_list;
+       int i = 0;
+       memset (&ecc_list, 0, sizeof(TelSimEccList_t));
 
-       memset(&ecc_list, 0, sizeof(TelSimEccList));
+       msg("call [%s] tapi service !!!", menu->title);
 
-       rt = tapi_sim_get_ecc(handle, &ecc_list);
+       rt = tel_get_sim_ecc (handle, &ecc_list);
        CHECK_RT(rt);
 
-       msg("ecc_count[%d]",ecc_list.count);
+       msg("ecc_list.ecc_count[%d]", ecc_list.ecc_count);
 
-       for(i = 0; i < ecc_list.count; i++) {
-               msg("[%d].name[%s] number[%s] category[%d]", i+1, ecc_list.list[i].name,
-                       ecc_list.list[i].number, ecc_list.list[i].category);
+       for (i = 0; i < ecc_list.ecc_count; i++) {
+               msg("ecc_list.list[%d].name[%s]", i, ecc_list.list[i].name);
+               msg("ecc_list.list[%d].number[%s]", i, ecc_list.list[i].number);
+               msg("ecc_list.list[%d].category[%d]", i, ecc_list.list[i].category);
        }
-
        return 0;
 }
 
-static void on_sim_get_iccid(TelHandle *handle, int result, void *data, void *user_data)
+static void on_sim_get_iccid (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       gchar *iccid = data;
+       TelSimAccessResult_t access_rt = result;
+       TelSimIccIdInfo_t *iccid = data;
 
-       msg("tapi_sim_get_iccid() response received");
-       CHECK_SIM_RESULT(result);
+       msg("TAPI_SERVICE_SIM_GET_ICCID response received");
 
-       if (!iccid) {
-               msg("get sim iccid response data is null");
-               return;
-       }
+       CHECK_ACCESS_RT(access_rt);
 
-       msg("iccid[%s]", iccid);
+       msg("access_rt[%d]", access_rt);
+       msg("iccid length[%d]", iccid->icc_length);
+       msg("iccid[%s]", iccid->icc_num);
 }
 
-static int run_sim_get_iccid(MManager *mm, struct menu_data *menu)
+static int run_sim_get_iccid (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
 
-       msg("call tapi_sim_get_iccid()");
+       msg("call [%s] tapi service !!!", menu->title);
 
-       rt = tapi_sim_get_iccid(handle, on_sim_get_iccid, NULL);
+       rt = tel_get_sim_iccid (handle, on_sim_get_iccid, NULL );
        CHECK_RT(rt);
+       return 0;
+}
 
+static int run_sim_get_application_list(MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int rt = 0;
+       unsigned char app_list = 0;
+
+       msg("call [%s] tapi service !!!", menu->title);
+
+       rt = tel_get_sim_application_list(handle, &app_list);
+       CHECK_RT(rt);
+       msg("application list: [0x%02x]", app_list);
+       if (app_list & TAPI_SIM_APP_TYPE_SIM)
+               msg("[SIM]");
+       if (app_list & TAPI_SIM_APP_TYPE_USIM)
+               msg("[USIM]");
+       if (app_list & TAPI_SIM_APP_TYPE_CSIM)
+               msg("[CSIM]");
+       if (app_list & TAPI_SIM_APP_TYPE_ISIM)
+               msg("[ISIM]");
        return 0;
 }
 
-static void on_sim_get_language(TelHandle *handle, int result, void *data, void *user_data)
+static void on_sim_get_language (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       TelSimLanguagePreferenceCode *language = data;
+       TelSimLanguagePreferenceCode_t *language = data;
+       TelSimAccessResult_t access_rt = result;
 
-       msg("tapi_sim_get_language() response received");
-       CHECK_SIM_RESULT(result);
+       msg("TAPI_SERVICE_SIM_GET_LANGUAGE response received");
 
-       if (!language) {
-               msg("get sim language response data is null");
-               return;
-       }
+       CHECK_ACCESS_RT(access_rt);
 
+       msg("access rt[%d]", access_rt);
        msg("language[%d]", *language);
 }
 
-static int run_sim_get_language(MManager *mm, struct menu_data *menu)
+static int run_sim_get_language (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
 
-       msg("call tapi_sim_get_language()");
+       msg("call [%s] tapi service !!!", menu->title);
 
-       rt = tapi_sim_get_language(handle, on_sim_get_language, NULL);
+       rt = tel_get_sim_language (handle, on_sim_get_language, NULL );
        CHECK_RT(rt);
-
        return 0;
 }
 
-static void on_sim_set_language(TelHandle *handle, int result, void *data, void *user_data)
+static void on_sim_set_language (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       msg("tapi_sim_set_language() response received");
-       CHECK_SIM_RESULT(result);
-}
+       TelSimAccessResult_t access_rt = result;
 
-static int run_sim_set_language(MManager *mm, struct menu_data *menu)
-{
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelSimLanguagePreferenceCode language;
-       TelReturn rt = 0;
+       msg("TAPI_SERVICE_SIM_SET_LANGUAGE response received");
 
-       msg("call tapi_sim_set_language()");
+       CHECK_ACCESS_RT(access_rt);
 
-       language = atoi(data_sim_set_language);
-       msg("Language selected: [%d]", language);
+       msg("access_rt[%d]", access_rt);
+}
 
-       rt = tapi_sim_set_language(handle, language, on_sim_set_language, NULL);
-       CHECK_RT(rt);
+static int run_sim_set_language (MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
 
+       msg("call [%s] tapi service !!!", menu->title);
+       data_sim_set_language[0] = data_sim_set_language[0] - '0';
+       rt = tel_set_sim_language (handle, data_sim_set_language[0],
+                       on_sim_set_language, NULL );
+       CHECK_RT(rt);
        return 0;
 }
 
-static void on_sim_get_cf_info(TelHandle *handle, int result, void *data, void *user_data)
+static void on_sim_get_cf (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       TelSimCfisList *cf_info = data;
-       unsigned int i = 0;
+       TelSimAccessResult_t access_rt = result;
+       TelSimCallForwardingResp_t *cf = data;
+       int i = 0;
+       msg("TAPI_SERVICE_SIM_GET_CF response received");
 
-       msg("tapi_sim_get_callforwarding_info() response received");
-       CHECK_SIM_RESULT(result);
+       CHECK_ACCESS_RT(access_rt);
 
-       if (!cf_info) {
-               msg("get cf info response data is null");
-               return;
-       }
+       msg("access_rt[%d]", access_rt);
+       msg("cf->b_cphs[%d]", cf->b_cphs);
 
-       msg("cf_info.profile_count[%d]", cf_info->profile_count);
-
-       for(i = 0; i < cf_info->profile_count; i++) {
-               msg("[%d].profile_id[%d] ", i+1, cf_info->cf[i].profile_id);
-               if(cf_info->cf[i].indication[0])
-                       msg(" Voice type ");
-               if(cf_info->cf[i].indication[1])
-                       msg(" Fax type ");
-               if(cf_info->cf[i].indication[2])
-                       msg(" Email type ");
-               if(cf_info->cf[i].indication[3])
-                       msg(" Other type ");
-               if(cf_info->cf[i].indication[4])
-                       msg(" Video type ");
+       if (cf->b_cphs) {
+               msg("cf->cphs_cf.b_line1[%d]", cf->cphs_cf.b_line1);
+               msg("cf->cphs_cf.b_line2[%d]", cf->cphs_cf.b_line2);
+               msg("cf->cphs_cf.b_fax[%d]", cf->cphs_cf.b_fax);
+               msg("cf->cphs_cf.b_data[%d]", cf->cphs_cf.b_data);
+       }
+       else {
+               for (i = 0; i < cf->cf_list.profile_count; i++) {
+                       msg("cf->cf_list.cf[%d].rec_index[%d]", i,
+                                       cf->cf_list.cf[i].rec_index);
+                       msg("cf->cf_list.cf[%d].msp_num[%d]", i, cf->cf_list.cf[i].msp_num);
+                       msg("cf->cf_list.cf[%d].cfu_status[0x%x]", i,
+                                       cf->cf_list.cf[i].cfu_status);
+                       msg("cf->cf_list.cf[%d].cfu_num[%s]", i, cf->cf_list.cf[i].cfu_num);
+                       msg("cf->cf_list.cf[%d].ton[%d]", i, cf->cf_list.cf[i].ton);
+                       msg("cf->cf_list.cf[%d].npi[%d]", i, cf->cf_list.cf[i].npi);
+                       msg("cf->cf_list.cf[%d].cc2_id[0x%x]", i, cf->cf_list.cf[i].cc2_id);
+                       msg("cf->cf_list.cf[%d].ext7_id[0x%x]", i,
+                                       cf->cf_list.cf[i].ext7_id);
+               }
        }
 }
 
-static int run_sim_get_cf_info(MManager *mm, struct menu_data *menu)
+static int run_sim_get_cf (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
-
-       msg("call tapi_sim_get_callforwarding_info()");
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
 
-       rt = tapi_sim_get_callforwarding_info(handle, on_sim_get_cf_info, NULL);
+       msg("call [%s] tapi service !!!", menu->title);
+       rt = tel_get_sim_callforwarding_info (handle, on_sim_get_cf, NULL );
        CHECK_RT(rt);
-
        return 0;
 }
 
-static void on_sim_set_mw_info(TelHandle *handle, int result, void *data, void *user_data)
+static void on_sim_set_cf (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       msg("tapi_sim_set_messagewaiting_info() response received");
-       CHECK_SIM_RESULT(result);
+       TelSimAccessResult_t access_rt = result;
+
+       msg("response received");
+
+       CHECK_ACCESS_RT(access_rt);
+
+       msg("access_rt[%d]", access_rt);
 }
 
-static int run_sim_set_mw_info(MManager *mm, struct menu_data *menu)
+static int run_sim_set_cf (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
-       TelSimMwis mw_info;
-       unsigned char indicator_status = 0;
-       unsigned char voice_count, fax_count, email_count, other_count, video_count;
-       unsigned char mask = 0x01;
-       int i = 0;
-
-       msg("call tapi_sim_set_messagewaiting_info()");
-
-       memset(&mw_info, 0, sizeof(TelSimMwis));
-
-       mw_info.profile_id = atoi(data_sim_set_mw_profile_id);
-       indicator_status = atoi(data_sim_set_mw_indicator_status);
-       voice_count = atoi(data_sim_set_mw_voice_cnt);
-       fax_count = atoi(data_sim_set_mw_fax_cnt);
-       email_count = atoi(data_sim_set_mw_email_cnt);
-       other_count = atoi(data_sim_set_mw_other_cnt);
-       video_count = atoi(data_sim_set_mw_video_cnt);
-
-       msg("profile id[%d]", mw_info.profile_id);
-       msg("indicator status[%d]", indicator_status);
-       msg("voice count[%d]", voice_count);
-       msg("fax count[%d]", fax_count);
-       msg("email count[%d]", email_count);
-       msg("other count[%d]", other_count);
-       msg("video count[%d]", video_count);
-
-       mw_info.count_valid = TRUE;
-
-       if (indicator_status) {
-               for (i = 0; i < 5; i++) {
-                       switch (indicator_status & mask) {
-                       case TEL_SIM_MWIS_VOICE:
-                               mw_info.msg_waiting[0].indication = TRUE;
-                               mw_info.msg_waiting[0].count = voice_count;
-                       break;
-                       case TEL_SIM_MWIS_FAX:
-                               mw_info.msg_waiting[1].indication = TRUE;
-                               mw_info.msg_waiting[1].count = fax_count;
-                       break;
-                       case TEL_SIM_MWIS_EMAIL:
-                               mw_info.msg_waiting[2].indication = TRUE;
-                               mw_info.msg_waiting[2].count = email_count;
-                       break;
-                       case TEL_SIM_MWIS_OTHER:
-                               mw_info.msg_waiting[3].indication = TRUE;
-                               mw_info.msg_waiting[3].count = other_count;
-                       break;
-                       case TEL_SIM_MWIS_VIDEO:
-                               mw_info.msg_waiting[4].indication = TRUE;
-                               mw_info.msg_waiting[4].count = video_count;
-                       break;
-                       default:
-                               msg("MWIS is NONE");
-                       }
-                       mask = mask << 1;
-               }
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
+       TelSimCallForwardingReq_t cf;
+       memset (&cf, 0, sizeof(TelSimCallForwardingReq_t));
+
+       msg("call [%s] tapi service !!!", menu->title);
+
+       cf.b_cphs = data_sim_set_cf_b_cphs[0] - '0';
+       if (cf.b_cphs) {
+               cf.cf_data_u.cphs_cf.b_line1 = data_sim_set_cf_cphs_line1[0] - '0';
+               cf.cf_data_u.cphs_cf.b_line2 = data_sim_set_cf_cphs_line2[0] - '0';
+               cf.cf_data_u.cphs_cf.b_fax = data_sim_set_cf_cphs_fax[0] - '0';
+               cf.cf_data_u.cphs_cf.b_data = data_sim_set_cf_cphs_data[0] - '0';
+       }
+       else {
+               cf.cf_data_u.cf.rec_index = data_sim_set_cf_rec_index[0] - '0';
+               cf.cf_data_u.cf.msp_num = data_sim_set_cf_msp_num[0] - '0';
+               cf.cf_data_u.cf.cfu_status = data_sim_set_cf_cfu_status[0] - '0';
+               cf.cf_data_u.cf.ton = data_sim_set_cf_ton[0] - '0';
+               cf.cf_data_u.cf.npi = data_sim_set_cf_npi[0] - '0';
+               memcpy (&cf.cf_data_u.cf.cfu_num, data_sim_set_cf_number,
+                               sizeof (cf.cf_data_u.cf.cfu_num));
+               cf.cf_data_u.cf.cc2_id = data_sim_set_cf_cc2_id[0] - '0';
+               cf.cf_data_u.cf.ext7_id = data_sim_set_cf_ext7_id[0] - '0';
        }
 
-       rt = tapi_sim_set_messagewaiting_info(handle, &mw_info, on_sim_set_mw_info, NULL);
+       rt = tel_set_sim_callforwarding_info (handle, &cf, on_sim_set_cf, NULL );
        CHECK_RT(rt);
-
        return 0;
 }
 
-static void on_sim_get_mw_info(TelHandle *handle, int result, void *data, void *user_data)
+static void on_sim_get_mw (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       TelSimMwisList *mw_info = data;
-       unsigned int i = 0;
+       TelSimAccessResult_t access_rt = result;
+       TelSimMessageWaitingResp_t *mw = data;
+       int i = 0;
 
-       msg("tapi_sim_get_messagewaiting_info() response received");
-       CHECK_SIM_RESULT(result);
+       msg("TAPI_SERVICE_SIM_GET_MW response received");
 
-       if (!mw_info) {
-               msg("get msg waiting info response data is null");
-               return;
-       }
+       CHECK_ACCESS_RT(access_rt);
 
-       msg("mw_info.profile_count: [%d]", mw_info->profile_count);
-
-       for(i = 0; i < mw_info->profile_count; i++) {
-               msg("[%d].profile_id[%d] count_valid[%d] ", i+1, mw_info->mw[i].profile_id, mw_info->mw[i].count_valid);
-               if(mw_info->mw[i].msg_waiting[0].indication)
-                       msg(" Voice type and count:[%d]", mw_info->mw[i].msg_waiting[0].count);
-               if(mw_info->mw[i].msg_waiting[1].indication)
-                       msg(" Fax type and count:[%d]", mw_info->mw[i].msg_waiting[1].count);
-               if(mw_info->mw[i].msg_waiting[2].indication)
-                       msg(" Email type and count:[%d]", mw_info->mw[i].msg_waiting[2].count);
-               if(mw_info->mw[i].msg_waiting[3].indication)
-                       msg(" Other type and count:[%d]", mw_info->mw[i].msg_waiting[3].count);
-               if(mw_info->mw[i].msg_waiting[4].indication)
-                       msg(" Video type and count:[%d]", mw_info->mw[i].msg_waiting[4].count);
+       msg("access_rt[%d]", access_rt);
+       msg("mw->b_cphs[%d]", mw->b_cphs);
+
+       if (mw->b_cphs) {
+               msg("mw->cphs_mw.b_voice1[%d]", mw->cphs_mw.b_voice1);
+               msg("mw->cphs_mw.b_voice2[%d]", mw->cphs_mw.b_voice2);
+               msg("mw->cphs_mw.b_fax[%d]", mw->cphs_mw.b_fax);
+               msg("mw->cphs_mw.b_data[%d]", mw->cphs_mw.b_data);
+       }
+       else {
+               for (i = 0; i < mw->mw_list.profile_count; i++) {
+                       msg("mw->mw_list.mw[%d].rec_index[%d]", i,
+                                       mw->mw_list.mw[i].rec_index);
+                       msg("mw->mw_list.mw[%d].indicator_status[0x%x]", i,
+                                       mw->mw_list.mw[i].indicator_status);
+                       msg("mw->mw_list.mw[%d].voice_count[%d]", i,
+                                       mw->mw_list.mw[i].voice_count);
+                       msg("mw->mw_list.mw[%d].fax_count[%d]", i,
+                                       mw->mw_list.mw[i].fax_count);
+                       msg("mw->mw_list.mw[%d].email_count[%d]", i,
+                                       mw->mw_list.mw[i].email_count);
+                       msg("mw->mw_list.mw[%d].other_count[%d]", i,
+                                       mw->mw_list.mw[i].other_count);
+                       msg("mw->mw_list.mw[%d].video_count[%d]", i,
+                                       mw->mw_list.mw[i].video_count);
+               }
        }
 }
 
-static int run_sim_get_mw_info(MManager *mm, struct menu_data *menu)
+static int run_sim_get_mw (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
-
-       msg("call tapi_sim_get_messagewaiting_info()");
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
 
-       rt = tapi_sim_get_messagewaiting_info(handle, on_sim_get_mw_info, NULL);
+       msg("call [%s] tapi service !!!", menu->title);
+       rt = tel_get_sim_messagewaiting_info (handle, on_sim_get_mw, NULL );
        CHECK_RT(rt);
-
        return 0;
 }
 
-static void on_sim_set_mb_info(TelHandle *handle, int result, void *data, void *user_data)
+static void on_sim_set_mw (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       msg("tapi_sim_set_mailbox_info() response received");
-       CHECK_SIM_RESULT(result);
+       TelSimAccessResult_t access_rt = result;
+
+       msg("response received");
+
+       CHECK_ACCESS_RT(access_rt);
+
+       msg("access_rt[%d]", access_rt);
 }
 
-static int run_sim_set_mb_info(MManager *mm, struct menu_data *menu)
+static int run_sim_set_m(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
-       TelSimMailBoxNumber mb_info;
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
+       TelSimMessageWaitingReq_t mw;
 
-       msg("call tapi_sim_set_mailbox_info()");
+       memset (&mw, 0, sizeof(TelSimMessageWaitingReq_t));
 
-       memset(&mb_info, 0, sizeof(TelSimMailBoxNumber));
+       msg("call [%s] tapi service !!!", menu->title);
 
-       mb_info.profile_id = atoi(data_sim_set_mb_profile_id);
-       mb_info.mb_type = atoi(data_sim_set_mb_type);
-       mb_info.alpha_id_len = strlen(data_sim_set_mb_alpha_id);
-       if (mb_info.alpha_id_len > TEL_SIM_ALPHA_ID_LEN_MAX) {
-               msg("Alpha id input too long");
-               return 0;
-       }
-       memcpy(mb_info.alpha_id, data_sim_set_mb_alpha_id, mb_info.alpha_id_len);
+       mw.b_cphs = data_sim_set_mw_b_cphs[0] - '0';
 
-       if (strlen(data_sim_set_mb_number) > TEL_SIM_MBDN_NUM_LEN_MAX) {
-               msg("Mail box number input too long");
-               return 0;
+       if (mw.b_cphs) {
+               mw.mw_data_u.cphs_mw.b_voice1 = data_sim_set_mw_cphs_voice1[0] - '0';
+               mw.mw_data_u.cphs_mw.b_voice2 = data_sim_set_mw_cphs_voice2[0] - '0';
+               mw.mw_data_u.cphs_mw.b_fax = data_sim_set_mw_cphs_fax[0] - '0';
+               mw.mw_data_u.cphs_mw.b_data = data_sim_set_mw_cphs_data[0] - '0';
+       }
+       else {
+               mw.mw_data_u.mw.rec_index = data_sim_set_mw_rec_index[0] - '0';
+               mw.mw_data_u.mw.indicator_status = data_sim_set_mw_indicator_status[0]
+                               - '0';
+               mw.mw_data_u.mw.voice_count = data_sim_set_mw_voice_cnt[0] - '0';
+               mw.mw_data_u.mw.fax_count = data_sim_set_mw_fax_cnt[0] - '0';
+               mw.mw_data_u.mw.email_count = data_sim_set_mw_email_cnt[0] - '0';
+               mw.mw_data_u.mw.other_count = data_sim_set_mw_other_cnt[0] - '0';
+               mw.mw_data_u.mw.video_count = data_sim_set_mw_video_cnt[0] - '0';
        }
-       memcpy(mb_info.number, data_sim_set_mb_number, TEL_SIM_MBDN_NUM_LEN_MAX);
-
-       msg("profile id[%d]", mb_info.profile_id);
-       msg("mb type[%d]", mb_info.mb_type);
-       msg("alpha id[%s]", mb_info.alpha_id);
-       msg("number[%s]", mb_info.number);
 
-       rt = tapi_sim_set_mailbox_info(handle, &mb_info, on_sim_set_mb_info, NULL);
+       rt = tel_set_sim_messagewaiting_info (handle, &mw, on_sim_set_mw, NULL );
        CHECK_RT(rt);
-
        return 0;
 }
 
-static void on_sim_get_mb_info(TelHandle *handle, int result, void *data, void *user_data)
+static void on_sim_get_mb (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       TelSimMailboxList *mb_list = data;
-       unsigned int i = 0;
-
-       msg("tapi_sim_get_mailbox_info() response received");
-       CHECK_SIM_RESULT(result);
-
-       if (!mb_list) {
-               msg("get mailbox info response data is null");
-               return;
-       }
-
-       msg("alpha id max len: [%d]", mb_list->alpha_id_max_len);
-       msg("mb list count: [%d]", mb_list->count);
+       TelSimAccessResult_t access_rt = result;
+       TelSimMailboxList_t *list = data;
+       int i = 0;
 
-       for (i = 0; i < mb_list->count; i++) {
-               msg("[%d].profile_id[%d] mb_type[%d] alpha_id length[%d] alpha_id[%s] number[%s]", i+1,
-                       mb_list->list[i].profile_id, mb_list->list[i].mb_type, mb_list->list[i].alpha_id_len,
-                       mb_list->list[i].alpha_id, mb_list->list[i].number);
+       msg("TAPI_SERVICE_SIM_GET_MB response received");
+
+       CHECK_ACCESS_RT(access_rt);
+
+       msg("access_rt[%d]", access_rt);
+       msg("count[%d]", list->count);
+
+       for (i = 0; i < list->count; i++) {
+               msg("list->list[%d].b_cphs[%d]", i, list->list[i].b_cphs);
+               msg("list->list[%d].rec_index[%d]", i, list->list[i].rec_index);
+               msg("list->list[%d].profile_num[%d]", i, list->list[i].profile_num);
+               msg("list->list[%d].mb_type[%d]", i, list->list[i].mb_type);
+               msg("list->list[%d].alpha_id_max_len[%d]", i,
+                               list->list[i].alpha_id_max_len);
+               msg("list->list[%d].alpha_id[%s]", i, list->list[i].alpha_id);
+               msg("list->list[%d].ton[0x%x]", i, list->list[i].ton);
+               msg("list->list[%d].npi[0x%x]", i, list->list[i].npi);
+               msg("list->list[%d].num[%s]", i, list->list[i].num);
+               msg("list->list[%d].cc_id[0x%x]", i, list->list[i].cc_id);
+               msg("list->list[%d].ext1_id[0x%x]", i, list->list[i].ext1_id);
        }
 }
 
-static int run_sim_get_mb_info(MManager *mm, struct menu_data *menu)
+static int run_sim_get_mb (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
 
-       msg("call tapi_sim_get_mailbox_info()");
-
-       rt = tapi_sim_get_mailbox_info(handle, on_sim_get_mb_info, NULL);
+       msg("call [%s] tapi service !!!", menu->title);
+       rt = tel_get_sim_mailbox_info (handle, on_sim_get_mb, NULL );
        CHECK_RT(rt);
-
        return 0;
 }
 
-static void on_sim_get_msisdn(TelHandle *handle, int result, void *data, void *user_data)
+static void on_sim_set_mb (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       TelSimMsisdnList *msisdn_list = data;
-       unsigned int i =0;
+       TelSimAccessResult_t access_rt = result;
 
-       msg("tapi_sim_get_msisdn() response received");
-       CHECK_SIM_RESULT(result);
+       msg("response received");
 
-       if (!msisdn_list) {
-               msg("get msisdn response data is null");
-               return;
-       }
-
-       msg("msisdn list count[%d]", msisdn_list->count);
+       CHECK_ACCESS_RT(access_rt);
 
-       for (i = 0; i < msisdn_list->count; i++)
-               msg("[%d].alpha_id[%s] number[%s]", i+1, msisdn_list->list[i].alpha_id, msisdn_list->list[i].num);
+       msg("access_rt[%d]", access_rt);
 }
 
-static int run_sim_get_msisdn(MManager *mm, struct menu_data *menu)
+static int run_sim_set_mb (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
-
-       msg("call tapi_sim_get_msisdn()");
-
-       rt = tapi_sim_get_msisdn(handle, on_sim_get_msisdn, NULL);
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
+       TelSimMailBoxNumber_t mb;
+
+       msg("call [%s] tapi service !!!", menu->title);
+
+       memset (&mb, 0, sizeof(TelSimMailBoxNumber_t));
+
+       mb.b_cphs = data_sim_set_mb_b_cphs[0] - '0';
+       mb.mb_type = data_sim_set_mb_type[0] - '0';
+       mb.rec_index = data_sim_set_mb_rec_index[0] - '0';
+       mb.profile_num = data_sim_set_mb_profile_num[0] - '0';
+       mb.alpha_id_max_len = data_sim_set_mb_alpha_id_max_len[0] - '0';
+       memcpy (&mb.alpha_id, data_sim_set_mb_alpha_id,
+                       TAPI_SIM_XDN_ALPHA_ID_MAX_LEN);
+       mb.ton = data_sim_set_mb_ton[0] - '0';
+       mb.npi = data_sim_set_mb_npi[0] - '0';
+       memcpy (&mb.num, data_sim_set_mb_number, sizeof (mb.num));
+       mb.cc_id = data_sim_set_mb_cc_id[0] - '0';
+       mb.ext1_id = data_sim_set_mb_ext1_id[0] - '0';
+
+       rt = tel_set_sim_mailbox_info (handle, &mb, on_sim_set_mb, NULL );
        CHECK_RT(rt);
-
        return 0;
 }
 
-static void on_sim_get_spn(TelHandle *handle, int result, void *data, void *user_data)
+static void on_sim_get_cphs_info (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       TelSimSpn *spn_info = data;
-
-       msg("tapi_sim_get_spn() response received");
-       CHECK_SIM_RESULT(result);
-
-       if (!spn_info) {
-               msg("get spn response data is null");
-               return;
-       }
-
-       msg("spn display condition[%d]", spn_info->display_condition);
-       msg("spn[%s]", spn_info->spn);
+       TelSimAccessResult_t access_rt = result;
+       TelSimCphsInfo_t *cphs = data;
+
+       msg("TAPI_SERVICE_SIM_GET_CPHSINFO response received");
+
+       CHECK_ACCESS_RT(access_rt);
+
+       msg("access_rt[%d]", access_rt);
+       msg("cphs->CphsPhase[%d]", cphs->CphsPhase);
+       msg("cphs->CphsServiceTable.bOperatorNameShortForm[%d]",
+                       cphs->CphsServiceTable.bOperatorNameShortForm);
+       msg("cphs->CphsServiceTable.bMailBoxNumbers[%d]",
+                       cphs->CphsServiceTable.bMailBoxNumbers);
+       msg("cphs->CphsServiceTable.bServiceStringTable[%d]",
+                       cphs->CphsServiceTable.bServiceStringTable);
+       msg("cphs->CphsServiceTable.bCustomerServiceProfile[%d]",
+                       cphs->CphsServiceTable.bCustomerServiceProfile);
+       msg("cphs->CphsServiceTable.bInformationNumbers[%d]",
+                       cphs->CphsServiceTable.bInformationNumbers);
 }
 
-static int run_sim_get_spn(MManager *mm, struct menu_data *menu)
+static void on_sim_get_service_table (TapiHandle *handle, int result,
+               void *data, void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
+       TelSimAccessResult_t access_rt = result;
+       TelSimServiceTable_t *svct = (TelSimServiceTable_t *) data;
 
-       msg("call tapi_sim_get_spn()");
+       msg("TAPI_SERVICE_SIM_GET_SERVICE_TABLE response received");
 
-       rt = tapi_sim_get_spn(handle, on_sim_get_spn, NULL);
-       CHECK_RT(rt);
+       CHECK_ACCESS_RT(access_rt);
 
-       return 0;
+       msg("access_rt[%d]", access_rt);
+
+       if (svct->sim_type == TAPI_SIM_CARD_TYPE_GSM) {
+               int i = 0, size = sizeof(TelSimSST_t);
+               char *temp = NULL;
+               if ( (temp = (char *) calloc (size + 1, 1)) != NULL ) {
+                       memcpy (temp, &svct->table.sst, size);
+                       for (i = 0; i < size; i++) {
+                               if (temp[i] == 1)
+                                       temp[i] = '1';
+                               else
+                                       temp[i] = '0';
+                       }
+                       msg("svct->table.sst=[%s]", temp);
+                       free (temp);
+               }
+       }
+       else if (svct->sim_type == TAPI_SIM_CARD_TYPE_USIM) {
+               int i = 0, size = sizeof(TelSimUST_t);
+               char *temp = NULL;
+               if ( (temp = (char *) calloc (size + 1, 1)) != NULL ) {
+                       memcpy (temp, &svct->table.ust, size);
+                       for (i = 0; i < size; i++) {
+                               if (temp[i] == 1)
+                                       temp[i] = '1';
+                               else
+                                       temp[i] = '0';
+                       }
+                       msg("svct->table.ust=[%s]", temp);
+                       free (temp);
+               }
+       }
+       else {
+               msg("Unknown sim type");
+       }
 }
 
-static void on_sim_get_cphs_netname(TelHandle *handle, int result, void *data, void *user_data)
+static int run_sim_get_cphs_info (MManager *mm, struct menu_data *menu)
 {
-       TelSimCphsNetName *cphs_net = data;
-
-       msg("tapi_sim_get_cphs_netname() response received");
-       CHECK_SIM_RESULT(result);
-
-       if (!cphs_net) {
-               msg("sim get cphs netname response data is null");
-               return;
-       }
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
 
-       msg("cphs full name[%s]", cphs_net->full_name);
-       msg("cphs short name[%s]", cphs_net->short_name);
+       msg("call [%s] tapi service !!!", menu->title);
+       rt = tel_get_sim_cphs_info (handle, on_sim_get_cphs_info, NULL );
+       CHECK_RT(rt);
+       return 0;
 }
 
-static int run_sim_get_cphs_netname(MManager *mm, struct menu_data *menu)
+static int run_sim_get_service_table (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
 
-       msg("call tapi_sim_get_cphs_netname()");
-
-       rt = tapi_sim_get_cphs_netname(handle, on_sim_get_cphs_netname, NULL);
+       msg("call [%s] tapi service !!!", menu->title);
+       rt = tel_get_sim_service_table (handle, on_sim_get_service_table, NULL );
        CHECK_RT(rt);
-
        return 0;
 }
 
-static void on_sim_get_sp_display_info(TelHandle *handle, int result, void *data, void *user_data)
+static void on_sim_get_msisdn (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       TelSimSpPlmnList *sp_info = data;
-       unsigned int i = 0;
+       TelSimAccessResult_t access_rt = result;
+       TelSimMsisdnList_t *list = data;
+       int i = 0;
+       msg("TAPI_SERVICE_SIM_GET_MSISDN response received");
 
-       msg("tapi_sim_get_sp_display_info() response received");
-       CHECK_SIM_RESULT(result);
+       CHECK_ACCESS_RT(access_rt);
 
-       if (!sp_info) {
-               msg("sim get sp display info response data is null");
-               return;
-       }
+       msg("access_rt[%d]", access_rt);
 
-       msg("sp info count[%d]", sp_info->count);
+       msg("list->count[%d]", list->count);
 
-       for(i = 0; i < sp_info->count; i++)
-               msg("[%d].index[%d] plmn[%s]", i+1, sp_info->list[i].index, sp_info->list[i].plmn);
+       for (i = 0; i < list->count; i++)
+               msg("index[%d] - name[%s], num[%s]", i, list->list[i].name,
+                               list->list[i].num);
 }
 
-static int run_sim_get_sp_display_info(MManager *mm, struct menu_data *menu)
+static int run_sim_get_msisdn (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
 
-       msg("call tapi_sim_get_sp_display_info()");
-
-       rt = tapi_sim_get_sp_display_info(handle, on_sim_get_sp_display_info, NULL);
+       msg("call [%s] tapi service !!!", menu->title);
+       rt = tel_get_sim_msisdn (handle, on_sim_get_msisdn, NULL );
        CHECK_RT(rt);
-
        return 0;
 }
 
-static void on_sim_req_authentication(TelHandle *handle, int result, void *data, void *user_data)
+static void on_sim_get_oplmnwact (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       TelSimAuthenticationResponse *auth_resp = data;
-       unsigned int i = 0;
+       TelSimAccessResult_t access_rt = result;
+       TelSimOplmnwactList_t *list = data;
+       int i = 0;
 
-       msg("tapi_sim_req_authentication() response received");
-       CHECK_SIM_RESULT(result);
+       msg("TAPI_SERVICE_SIM_GET_OPLMNWACT response received");
 
-       if (!auth_resp) {
-               msg("sim authentication response data is null");
-               return;
-       }
+       CHECK_ACCESS_RT(access_rt);
 
-       msg("auth_type[%d]", auth_resp->auth_type);
-       msg("auth_result[%d]", auth_resp->detailed_result);
+       msg("access_rt[%d]", access_rt);
+       msg("list->count[%d]", list->count);
 
-       msg("resp_length[%d]", auth_resp->resp_length);
-       for( i = 0; i < auth_resp->resp_length; i++)
-               msg("[%d].resp_data[0x%2x]", i+1, auth_resp->resp_data[i]);
-
-       msg("authentication_key_length[%d]", auth_resp->authentication_key_length);
-       for( i = 0; i < auth_resp->authentication_key_length; i++)
-               msg("[%d].authentication_key[0x%2x]", i+1, auth_resp->authentication_key[i]);
+       for (i = 0; i < list->count; i++) {
+               msg("index[%d] - plmn[%s], b_umts[%d], b_gsm[%d]", i,
+                               list->list[i].plmn, list->list[i].b_umts, list->list[i].b_gsm);
+       }
+}
 
-       msg("cipher_length[%d]", auth_resp->cipher_length);
-       for( i = 0; i < auth_resp->cipher_length; i++)
-               msg("[%d].cipher_data[0x%2x]", i+1, auth_resp->cipher_data[i]);
+static int run_sim_get_oplmnwact (MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
 
-       msg("integrity_length[%d]", auth_resp->integrity_length);
-       for( i = 0; i < auth_resp->integrity_length; i++)
-               msg("[%d].integrity_data[0x%2x]", i+1, auth_resp->integrity_data[i]);
+       msg("call [%s] tapi service !!!", menu->title);
+       rt = tel_get_sim_oplmnwact (handle, on_sim_get_oplmnwact, NULL );
+       CHECK_RT(rt);
+       return 0;
 }
 
-static int run_sim_req_authentication(MManager *mm, struct menu_data *menu)
+static void on_sim_get_spn (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
-       TelSimAuthenticationData auth_data;
+       TelSimAccessResult_t access_rt = result;
+       TelSimSpn_t *spn_info = data;
 
-       msg("call tapi_sim_req_authentication()");
+       msg("TAPI_SERVICE_SIM_GET_SPN response received");
 
-       memset(&auth_data, 0, sizeof(TelSimAuthenticationData));
+       CHECK_ACCESS_RT(access_rt);
 
-       auth_data.auth_type = atoi(data_sim_req_authentication_type);
-       auth_data.autn_length = strlen(data_sim_req_authentication_autn_data);
-       memcpy(auth_data.autn_data, data_sim_req_authentication_autn_data, auth_data.autn_length);
-       auth_data.rand_length = strlen(data_sim_req_authentication_rand_data);
-       memcpy(auth_data.rand_data, data_sim_req_authentication_rand_data, auth_data.rand_length);
+       msg("access_rt[%d]", access_rt);
+       msg("spn name[%s]", spn_info->spn);
+       msg("spn condition[0x%x]", spn_info->display_condition);
+}
 
-       msg("auth_type[%d]", auth_data.auth_type);
-       msg("autn_data[%s] autn_length[%d]", auth_data.autn_data, auth_data.autn_length);
-       msg("rand_data[%s] rand_length[%d]", auth_data.rand_data, auth_data.rand_length);
+static int run_sim_get_spn (MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
 
-       rt = tapi_sim_req_authentication(handle, &auth_data, on_sim_req_authentication, NULL);
+       msg("call [%s] tapi service !!!", menu->title);
+       rt = tel_get_sim_spn (handle, on_sim_get_spn, NULL );
        CHECK_RT(rt);
-
        return 0;
 }
 
-static void on_sim_verify_pins(TelHandle *handle, int result, void *data, void *user_data)
+static void on_sim_get_cphs_netname (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       TelSimSecPinResult *verify_pin_resp = data;
+       TelSimAccessResult_t access_rt = result;
+       TelSimCphsNetName_t *cphs_net = data;
 
-       msg("tapi_sim_verify_pins() response received");
-       CHECK_SIM_RESULT(result);
+       msg("TAPI_SERVICE_SIM_GET_CPHS_NETNAME response received");
 
-       if (!verify_pin_resp) {
-               msg("sim verify pins response data is null");
-               return;
-       }
+       CHECK_ACCESS_RT(access_rt);
 
-       msg("pin type[%d]", verify_pin_resp->pin_type);
-       msg("No of tries left[%d]", verify_pin_resp->retry_count);
+       msg("access_rt[%d]", access_rt);
+       msg("cphs full name[%s]", cphs_net->full_name);
+       msg("cphs short name[%s]", cphs_net->short_name);
 }
 
-static int run_sim_verify_pins(MManager *mm, struct menu_data *menu)
+static int run_sim_get_cphs_netname (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
-       TelSimSecPinPw pin_data;
-
-       msg("call tapi_sim_verify_pins()");
-
-       memset(&pin_data, 0, sizeof(TelSimSecPinPw));
-
-       pin_data.pin_type = atoi(data_sim_verify_pins_type);
-       pin_data.pw = (char *)data_sim_verify_pins_pw;
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
 
-       msg("pin type[%d]", pin_data.pin_type);
-       msg("password[%s]", pin_data.pw);
-
-       rt = tapi_sim_verify_pins(handle, &pin_data, on_sim_verify_pins, NULL);
+       msg("call [%s] tapi service !!!", menu->title);
+       rt = tel_get_sim_cphs_netname (handle, on_sim_get_cphs_netname, NULL );
        CHECK_RT(rt);
-
        return 0;
 }
 
-static void on_sim_verify_puks(TelHandle *handle, int result, void *data, void *user_data)
+static void on_sim_req_authentication (TapiHandle *handle, int result,
+               void *data, void *user_data)
 {
-       TelSimSecPukResult *verify_puk_resp = data;
+       TelSimAccessResult_t access_rt = result;
+       TelSimAuthenticationResponse_t *auth_resp = data;
+       int i = 0;
 
-       msg("tapi_sim_verify_puks() response received");
-       CHECK_SIM_RESULT(result);
+       msg("TAPI_SERVICE_SIM_AUTHENTICATION response received");
 
-       if (!verify_puk_resp) {
-               msg("sim verify puks response data is null");
-               return;
-       }
+       CHECK_ACCESS_RT(access_rt);
 
-       msg("puk type[%d]", verify_puk_resp->puk_type);
-       msg("No of tries left[%d]", verify_puk_resp->retry_count);
-}
+       msg("access_rt[%d]", access_rt);
+       msg("auth_resp->auth_type[%d]", auth_resp->auth_type);
+       msg("auth_resp->auth_result[%d]", auth_resp->auth_result);
 
-static int run_sim_verify_puks(MManager *mm, struct menu_data *menu)
-{
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
-       TelSimSecPukPw puk_data;
+       msg("auth_resp->authentication_key_length[%d]",
+                       auth_resp->authentication_key_length);
+       if (auth_resp->authentication_key_length) {
+               for (i = 0; i < auth_resp->authentication_key_length; i++)
+                       msg("auth_resp->authentication_key[%d][0x%2x]", i,
+                                       auth_resp->authentication_key[i]);
+       }
 
-       msg("call tapi_sim_verify_puks()");
+       msg("auth_resp->cipher_length[%d]", auth_resp->cipher_length);
+       if (auth_resp->cipher_length) {
+               for (i = 0; i < auth_resp->cipher_length; i++)
+                       msg("auth_resp->cipher_data[%d][0x%2x]", i,
+                                       auth_resp->cipher_data[i]);
+       }
 
-       memset(&puk_data, 0, sizeof(TelSimSecPukPw));
+       msg("auth_resp->integrity_length[%d]", auth_resp->integrity_length);
+       if (auth_resp->integrity_length) {
+               for (i = 0; i < auth_resp->integrity_length; i++)
+                       msg("auth_resp->integrity_data[%d][0x%2x]", i,
+                                       auth_resp->integrity_data[i]);
+       }
 
-       puk_data.puk_type = atoi(data_sim_verify_puks_type);
-       puk_data.puk_pw = (char *)data_sim_verify_puks_puk_pw;
-       puk_data.new_pin_pw = (char *)data_sim_verify_puks_pin;
+       msg("auth_resp->resp_length[%d]", auth_resp->resp_length);
+       if (auth_resp->resp_length) {
+               for (i = 0; i < auth_resp->resp_length; i++)
+                       msg("auth_resp->resp_data[%d][0x%2x]", i, auth_resp->resp_data[i]);
+       }
 
-       msg("puk_type[%d]", puk_data.puk_type);
-       msg("puk password[%s]", puk_data.puk_pw);
-       msg("new pin password[%s]", puk_data.new_pin_pw);
+}
 
-       rt = tapi_sim_verify_puks(handle, &puk_data, on_sim_verify_puks, NULL);
+static int run_sim_req_authentication (MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
+       TelSimAuthenticationData_t auth;
+       memset (&auth, 0, sizeof(TelSimAuthenticationData_t));
+
+       msg("call [%s] tapi service !!!", menu->title);
+
+       data_sim_req_authentication_type[0] = data_sim_req_authentication_type[0]
+                       - '0';
+
+       auth.auth_type = data_sim_req_authentication_type[0];
+       auth.autn_length = strlen (data_sim_req_authentication_autn_data);
+       memcpy (&auth.autn_data, data_sim_req_authentication_autn_data,
+                       auth.autn_length);
+       auth.rand_length = strlen (data_sim_req_authentication_rand_data);
+       memcpy (&auth.rand_data, data_sim_req_authentication_rand_data,
+                       auth.rand_length);
+
+       rt = tel_req_sim_authentication (handle, &auth, on_sim_req_authentication,
+                       NULL );
        CHECK_RT(rt);
-
        return 0;
 }
 
-static void on_sim_change_pins(TelHandle *handle, int result, void *data, void *user_data)
+static void on_sim_security_op_resp (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       TelSimSecPinResult *change_pin_resp = data;
+       TelSimPinOperationResult_t sec_rt = result;
+       TelSimSecResult_t *rt = data;
 
-       msg("tapi_sim_change_pins() response received");
-       CHECK_SIM_RESULT(result);
+       msg("TAPI_SERVICE_SIM security response received");
 
-       if (!change_pin_resp) {
-               msg("sim change pins response data is null");
-               return;
+       if (sec_rt == TAPI_SIM_PIN_INCORRECT_PASSWORD ||
+               sec_rt == TAPI_SIM_PUK_INCORRECT_PASSWORD) {
+               msg("SIM operation: Password Incorrect[%d]",sec_rt);
+       } else {
+               CHECK_ACCESS_RT(sec_rt);
        }
 
-       msg("pin type[%d]", change_pin_resp->pin_type);
-       msg("No of tries left[%d]", change_pin_resp->retry_count);
+       msg("sec_rt[%d]", sec_rt);
+       msg("rt->type[%d]", rt->type);
+       msg("rt->retry_count[%d]", rt->retry_count);
 }
 
-static int run_sim_change_pins(MManager *mm, struct menu_data *menu)
+static int run_sim_verify_pins (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
-       TelSimSecChangePinPw pin_data;
-
-       msg("call tapi_sim_change_pins()");
-
-       memset(&pin_data, 0, sizeof(TelSimSecChangePinPw));
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
+       TelSimSecPw_t pwt;
+       memset (&pwt, 0, sizeof(TelSimSecPw_t));
 
-       pin_data.pin_type = atoi(data_sim_change_pins_type);
-       pin_data.old_pw = (char *)data_sim_change_pins_old_pw;
-       pin_data.new_pw = (char *)data_sim_change_pins_new_pw;
+       msg("call [%s] tapi service !!!", menu->title);
 
-       msg("pin type[%d]", pin_data.pin_type);
-       msg("old password[%s]", pin_data.old_pw);
-       msg("new password[%s]", pin_data.new_pw);
+       data_sim_verify_pins_type[0] = data_sim_verify_pins_type[0] - '0';
+       data_sim_verify_pins_pw[MENU_DATA_SIZE] = '\0';
+       pwt.type = data_sim_verify_pins_type[0];
+       pwt.pw_len = strlen (data_sim_verify_pins_pw);
+       pwt.pw = (unsigned char *) data_sim_verify_pins_pw;
 
-       rt = tapi_sim_change_pins(handle, &pin_data, on_sim_change_pins, NULL);
+       rt = tel_verifiy_sim_pins (handle, &pwt, on_sim_security_op_resp, NULL );
        CHECK_RT(rt);
-
        return 0;
 }
 
-static void on_sim_enable_or_disable_facility(TelHandle *handle, int result, void *data, void *user_data)
+static int run_sim_verify_puks (MManager *mm, struct menu_data *menu)
 {
-       TelSimFacilityResult *sim_facility_resp = data;
-
-       msg("tapi_sim_enable/disable_facility() response received");
-       CHECK_SIM_RESULT(result);
-
-       if (!sim_facility_resp) {
-               msg("sim enable/disable facility response data is null");
-               return;
-       }
-
-       msg("lock_type[%d]", sim_facility_resp->type);
-       msg("No of tries left[%d]", sim_facility_resp->retry_count);
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
+       TelSimSecPw_t puk_t;
+       TelSimSecPw_t new_pin_t;
+       memset (&puk_t, 0, sizeof(TelSimSecPw_t));
+       memset (&new_pin_t, 0, sizeof(TelSimSecPw_t));
+       msg("call [%s] tapi service !!!", menu->title);
+
+       data_sim_verify_puks_type[0] = data_sim_verify_puks_type[0] - '0';
+       data_sim_verify_puks_puk[MENU_DATA_SIZE] = '\0';
+       puk_t.type = data_sim_verify_puks_type[0];
+       puk_t.pw_len = strlen (data_sim_verify_puks_puk);
+       puk_t.pw = (unsigned char*) data_sim_verify_puks_puk;
+
+       if (puk_t.type == TAPI_SIM_PTYPE_PUK1)
+               new_pin_t.type = TAPI_SIM_PTYPE_PIN1;
+       if (puk_t.type == TAPI_SIM_PTYPE_PUK2)
+               new_pin_t.type = TAPI_SIM_PTYPE_PIN2;
+
+       data_sim_verify_puks_pin[MENU_DATA_SIZE] = '\0';
+       new_pin_t.pw_len = strlen (data_sim_verify_puks_pin);
+       new_pin_t.pw = (unsigned char*) data_sim_verify_puks_pin;
+
+       rt = tel_verify_sim_puks (handle, &puk_t, &new_pin_t,
+                       on_sim_security_op_resp, NULL );
+       CHECK_RT(rt);
+       return 0;
 }
 
-static int run_sim_enable_facility(MManager *mm, struct menu_data *menu)
+static int run_sim_change_pins (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
-       TelSimFacilityPw pw;
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
+       TelSimSecPw_t old;
+       TelSimSecPw_t new;
+       memset (&old, 0, sizeof(TelSimSecPw_t));
+       memset (&new, 0, sizeof(TelSimSecPw_t));
 
-       msg("call tel_%s()", menu->title);
+       msg("call [%s] tapi service !!!", menu->title);
 
-       memset(&pw, 0, sizeof(TelSimFacilityPw));
+       data_sim_change_pins_type[0] = data_sim_change_pins_type[0] - '0';
 
-       pw.lock_type = atoi(data_sim_facility_type);
-       pw.pw = (char *)data_sim_facility_pw;
+       data_sim_change_pins_old_pw[MENU_DATA_SIZE] = '\0';
+       old.type = data_sim_change_pins_type[0];
+       old.pw_len = strlen (data_sim_change_pins_old_pw);
+       old.pw = (unsigned char*) data_sim_change_pins_old_pw;
 
-       msg("lock_type[%d]", pw.lock_type);
-       msg("password[%s]", pw.pw);
-
-       rt = tapi_sim_enable_facility(handle, &pw, on_sim_enable_or_disable_facility, NULL);
+       data_sim_change_pins_new_pw[MENU_DATA_SIZE] = '\0';
+       new.type = data_sim_change_pins_type[0];
+       new.pw_len = strlen (data_sim_change_pins_new_pw);
+       new.pw = (unsigned char*) data_sim_change_pins_new_pw;
 
+       rt = tel_change_sim_pins (handle, &old, &new, on_sim_security_op_resp,
+                       NULL );
        CHECK_RT(rt);
-
        return 0;
 }
 
-static int run_sim_disable_facility(MManager *mm, struct menu_data *menu)
+static void on_sim_facility_op_resp (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
-       TelSimFacilityPw pw;
-
-       msg("call tel_%s()", menu->title);
-
-       memset(&pw, 0, sizeof(TelSimFacilityPw));
+       TelSimPinOperationResult_t sec_rt = result;
+       TelSimFacilityResult_t *f_rt = data;
 
-       pw.lock_type = atoi(data_sim_facility_type);
-       pw.pw = (char *)data_sim_facility_pw;
+       msg("TAPI_SERVICE_SIM facility response received");
 
-       msg("lock_type[%d]", pw.lock_type);
-       msg("password[%s]", pw.pw);
+       if (sec_rt == TAPI_SIM_PIN_INCORRECT_PASSWORD ||
+               sec_rt == TAPI_SIM_PUK_INCORRECT_PASSWORD) {
+               msg("SIM operation: Password Incorrect[%d]",sec_rt);
+       } else {
+               CHECK_ACCESS_RT(sec_rt);
+       }
 
-       rt = tapi_sim_disable_facility(handle, &pw, on_sim_enable_or_disable_facility, NULL);
+       msg("sec_rt[%d]", sec_rt);
+       msg("f_rt->type[%d]", f_rt->type);
+       msg("f_rt->retry_count[%d]", f_rt->retry_count);
+}
 
+static int run_sim_disable_facility (MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
+       TelSimFacilityPw_t fpw;
+       msg("call [%s] tapi service !!!", menu->title);
+
+       memset (&fpw, 0, sizeof (fpw));
+
+       data_sim_disable_facility_type[0] = data_sim_disable_facility_type[0] - '0';
+       data_sim_disable_facility_pw[MENU_DATA_SIZE] = '\0';
+       fpw.lock_type = data_sim_disable_facility_type[0];
+       fpw.pw_len = strlen (data_sim_disable_facility_pw);
+       fpw.pw = (unsigned char*) data_sim_disable_facility_pw;
+
+       msg("fpw.lock_type[%d], fpw.pw_len[%d], fpw.pw[%s]", fpw.lock_type,
+                       fpw.pw_len, fpw.pw);
+       rt = tel_disable_sim_facility (handle, &fpw, on_sim_facility_op_resp,
+                       NULL );
        CHECK_RT(rt);
+       return 0;
+}
 
+static int run_sim_enable_facility (MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
+       TelSimFacilityPw_t fpw;
+       msg("call [%s] tapi service !!!", menu->title);
+
+       memset (&fpw, 0, sizeof (fpw));
+
+       data_sim_enable_facility_type[0] = data_sim_enable_facility_type[0] - '0';
+       data_sim_enable_facility_pw[MENU_DATA_SIZE] = '\0';
+       fpw.lock_type = data_sim_enable_facility_type[0];
+       fpw.pw_len = strlen (data_sim_enable_facility_pw);
+       fpw.pw = (unsigned char*) data_sim_enable_facility_pw;
+
+       msg("fpw.lock_type[%d], fpw.pw_len[%d], fpw.pw[%s]", fpw.lock_type,
+                       fpw.pw_len, fpw.pw);
+       rt = tel_enable_sim_facility (handle, &fpw, on_sim_facility_op_resp, NULL );
+       CHECK_RT(rt);
        return 0;
 }
 
-static void on_sim_get_facility(TelHandle *handle, int result, void *data, void *user_data)
+static void on_sim_get_facility (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       TelSimFacilityInfo *facility_info = data;
+       TelSimPinOperationResult_t sec_rt = result;
+       TelSimFacilityInfo_t *fi = data;
 
-       msg("tapi_sim_get_facility() response received");
-       CHECK_SIM_RESULT(result);
+       msg("TAPI_SERVICE_SIM facility response received");
 
-       if (!facility_info) {
-               msg("get sim facility response data is null");
-               return;
-       }
+       CHECK_ACCESS_RT(sec_rt);
 
-       msg("lock_type[%d]", facility_info->type);
-       msg("sim facility status[%d]", facility_info->f_status);
+       msg("sec_rt[%d]", sec_rt);
+       msg("fi->type[%d]", fi->type);
+       msg("fi->f_status[%d]", fi->f_status);
 }
 
-static int run_sim_get_facility(MManager *mm, struct menu_data *menu)
+static int run_sim_get_facility (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
-       TelSimLockType lock_type;
-
-       msg("call tapi_sim_get_facility()");
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
+       TelSimLockType_t t = 0;
+       msg("call [%s] tapi service !!!", menu->title);
 
-       lock_type = atoi(data_sim_facility_type);
-       msg("lock_type[%d]", lock_type);
+       data_sim_get_facility_type[0] = data_sim_get_facility_type[0] - '0';
 
-       rt = tapi_sim_get_facility(handle, lock_type, on_sim_get_facility, NULL);
+       switch (data_sim_get_facility_type[0]) {
+               case 1:
+                       t = TAPI_SIM_LOCK_PS;
+                       break;
+               case 2:
+                       t = TAPI_SIM_LOCK_PF;
+                       break;
+               case 3:
+                       t = TAPI_SIM_LOCK_SC;
+                       break;
+               case 4:
+                       t = TAPI_SIM_LOCK_FD;
+                       break;
+               case 5:
+                       t = TAPI_SIM_LOCK_PN;
+                       break;
+               case 6:
+                       t = TAPI_SIM_LOCK_PU;
+                       break;
+               case 7:
+                       t = TAPI_SIM_LOCK_PP;
+                       break;
+               case 8:
+                       t = TAPI_SIM_LOCK_PC;
+                       break;
+               default:
+                       msg("not handled type[%d]", data_sim_get_facility_type[0])
+                       ;
+                       break;
+       }
+       rt = tel_get_sim_facility (handle, t, on_sim_get_facility, NULL );
        CHECK_RT(rt);
-
        return 0;
 }
 
-static void on_sim_get_lock_info(TelHandle *handle, int result, void *data, void *user_data)
+static void on_sim_get_lock_info (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       TelSimLockInfo *lock_info = data;
+       TelSimPinOperationResult_t sec_rt = result;
+       TelSimLockInfo_t *lock = data;
 
-       msg("tapi_sim_get_lock_info() response received");
-       CHECK_SIM_RESULT(result);
+       msg("TAPI_SERVICE_SIM lock info response received");
 
-       if (!lock_info) {
-               msg("lock info response data is null");
-               return;
-       }
+       CHECK_ACCESS_RT(sec_rt);
 
-       msg("lock_type[%d]", lock_info->lock_type);
-       msg("lock_status[%d]", lock_info->lock_status);
-       msg("No of tries left[%d]", lock_info->retry_count);
+       msg("sec_rt[%d]", sec_rt);
+       msg("lock->lock_type[%d]", lock->lock_type);
+       msg(
+                       "lock->lock_status[%d]-0:not need, 1:pin, 2:puk, 3:pin2, 4:puk2, 5:blocked",
+                       lock->lock_status);
+       msg("lock->retry_count[%d]", lock->retry_count);
 }
 
-static int run_sim_get_lock_info(MManager *mm, struct menu_data *menu)
+static int run_sim_get_lock_info (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
-       TelSimLockType lock_type;
-
-       msg("call tapi_sim_get_lock_info()");
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
+       TelSimLockType_t t = 0;
+       msg("call [%s] tapi service !!!", menu->title);
 
-       lock_type = atoi(data_sim_facility_type);
-       msg("lock_type[%d]", lock_type);
+       data_sim_get_lock_type[0] = data_sim_get_lock_type[0] - '0';
 
-       rt = tapi_sim_get_lock_info(handle, lock_type, on_sim_get_lock_info, NULL);
+       switch (data_sim_get_lock_type[0]) {
+               case 1:
+                       t = TAPI_SIM_LOCK_PS;
+                       break;
+               case 2:
+                       t = TAPI_SIM_LOCK_PF;
+                       break;
+               case 3:
+                       t = TAPI_SIM_LOCK_SC;
+                       break;
+               case 4:
+                       t = TAPI_SIM_LOCK_FD;
+                       break;
+               case 5:
+                       t = TAPI_SIM_LOCK_PN;
+                       break;
+               case 6:
+                       t = TAPI_SIM_LOCK_PU;
+                       break;
+               case 7:
+                       t = TAPI_SIM_LOCK_PP;
+                       break;
+               case 8:
+                       t = TAPI_SIM_LOCK_PC;
+                       break;
+               default:
+                       msg("not handled type[%d]", data_sim_get_lock_type[0])
+                       ;
+                       break;
+       }
+       rt = tel_get_sim_lock_info (handle, t, on_sim_get_lock_info, NULL );
        CHECK_RT(rt);
-
        return 0;
 }
 
-static void on_sim_request_apdu(TelHandle *handle, int result, void *data, void *user_data)
+static void on_sim_transmit_apdu (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       TelSimApduResp *apdu_resp = data;
-       unsigned int i = 0;
-
-       msg("tapi_sim_req_apdu() response received");
-       CHECK_SIM_RESULT(result);
+       TelSimAccessResult_t access_rt = result;
+       TelSimApduResp_t *r_apdu = data;
+       int i = 0;
 
-       if (!apdu_resp) {
-               msg("apdu response data is null");
-               return;
-       }
+       msg("TAPI_SERVICE_SIM_APDU response received");
 
-       msg("apdu_len[%d]", apdu_resp->apdu_resp_len);
+       CHECK_ACCESS_RT(access_rt);
 
-       for(i = 0; i < apdu_resp->apdu_resp_len; i++)
-               msg("[%d]`s byte is [0x%x]",i, apdu_resp->apdu_resp[i]);
+       msg("access_rt[%d]", access_rt);
+       msg("r_apdu->apdu_resp_len[%d]", r_apdu->apdu_resp_len);
+       if (r_apdu->apdu_resp_len) {
+               for (i = 0; i < r_apdu->apdu_resp_len; i++)
+                       msg("[%d]`s byte is [0x%x]", i, r_apdu->apdu_resp[i]);
+       }
 }
 
-static int run_sim_request_apdu(MManager *mm, struct menu_data *menu)
+static int run_sim_transmit_apdu (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
-       TelSimApdu apdu_data;
-       char result_apdu[TEL_SIM_APDU_LEN_MAX +1] = {0,};
-       unsigned int i, j;
-       unsigned int len;
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
+       TelSimApdu_t t_apdu;
+       unsigned char result_apdu[MENU_DATA_SIZE + 1] = { 0, };
+       int i = 0, j = 0, len = 0, hex = 0;
 
-       memset(&apdu_data, 0, sizeof(TelSimApdu));
+       memset (&t_apdu, 0, sizeof(TelSimApdu_t));
 
-       msg("call tapi_sim_req_apdu()");
+       msg("call [%s] tapi service !!!", menu->title);
 
-       len = strlen(data_sim_apdu);
+       len = strlen (data_sim_transmit_apdu_apdu);
 
-       for (i = 0, j = 0; i < len; i += 2, j++)
-               result_apdu[j] = (_sim_str_to_hex(data_sim_apdu[i]) << 4) | (_sim_str_to_hex(data_sim_apdu[i+1]));
+       for (i = 0, j = 0; i < len; i += 2, j++) {
+               hex = (_sim_str_to_hex (data_sim_transmit_apdu_apdu[i]) << 4)
+                               | (_sim_str_to_hex (data_sim_transmit_apdu_apdu[i + 1]));
+               printf ("0x%x\n", hex);
 
-       apdu_data.apdu_len = len/2;
-       if (apdu_data.apdu_len > TEL_SIM_APDU_LEN_MAX) {
-               msg("Input too long");
-               return 0;
+               result_apdu[j] = hex;
        }
-       memcpy(apdu_data.apdu, result_apdu, apdu_data.apdu_len);
 
-       for (i = 0; i < apdu_data.apdu_len; i++)
-               msg("[%02d] = 0x%02x\n", i, apdu_data.apdu[i]);
+       for (i = 0; i < len / 2; i++) {
+               printf ("[%02d] = 0x%02x\n", i, result_apdu[i]);
+       }
 
-       rt = tapi_sim_req_apdu(handle, &apdu_data, on_sim_request_apdu, NULL);
-       CHECK_RT(rt);
+       t_apdu.apdu_len = len / 2;
+       t_apdu.apdu = (unsigned char*) malloc (t_apdu.apdu_len);
+       memcpy (t_apdu.apdu, result_apdu, t_apdu.apdu_len);
 
+       rt = tel_req_sim_apdu (handle, &t_apdu, on_sim_transmit_apdu, NULL );
+       if (t_apdu.apdu)
+               free(t_apdu.apdu);
+       CHECK_RT(rt);
        return 0;
 }
 
-static void on_sim_request_atr(TelHandle *handle, int result, void *data, void *user_data)
+static void on_sim_get_atr (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       TelSimAtr *atr_resp = data;
-       unsigned int i = 0;
+       TelSimAccessResult_t access_rt = result;
+       TelSimAtrResp_t *r_atr = data;
+       int i = 0;
+       msg("TAPI_SERVICE_SIM_APDU response received");
 
-       msg("tapi_sim_req_atr() response received");
-       CHECK_SIM_RESULT(result);
+       CHECK_ACCESS_RT(access_rt);
 
-       if (!atr_resp) {
-               msg("atr response data is null");
-               return;
+       msg("access_rt[%d]", access_rt);
+       msg("r_atr->atr_resp_len[%d]", r_atr->atr_resp_len);
+       if (r_atr->atr_resp_len) {
+               for (i = 0; i < r_atr->atr_resp_len; i++)
+                       msg("[%d]`s byte is [0x%x]", i, r_atr->atr_resp[i]);
        }
+}
+
+static int run_sim_get_atr(MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int rt = 0;
 
-       msg("atr_len[%d]", atr_resp->atr_len);
+       msg("call [%s] tapi service !!!", menu->title);
 
-       for(i = 0; i < atr_resp->atr_len; i++)
-               msg("[%d]`s byte is [0x%x]", i, atr_resp->atr[i]);
+       rt = tel_req_sim_atr(handle, on_sim_get_atr, NULL);
+       CHECK_RT(rt);
+       return 0;
 }
 
-static int run_sim_request_atr(MManager *mm, struct menu_data *menu)
+static void on_sim_set_power_state (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
+       TelSimPowerSetResult_t access_rt = result;
 
-       msg("call tapi_sim_req_atr()");
+       msg("TAPI_SERVICE_SIM_SET_POWER_STATE response received");
 
-       rt = tapi_sim_req_atr(handle, on_sim_request_atr, NULL);
-       CHECK_RT(rt);
+       CHECK_ACCESS_RT(access_rt);
+
+       msg("access_rt[%d]", access_rt);
+}
 
+static int run_sim_set_power_state(MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int rt = 0;
+
+       msg("call [%s] tapi service !!!", menu->title);
+       data_sim_set_state[0] = data_sim_set_state[0] - '0';
+       rt = tel_set_sim_power_state (handle, data_sim_set_state[0],
+                       on_sim_set_power_state, NULL );
+       CHECK_RT(rt);
        return 0;
 }
 
-/* SIM SubMenu */
+
 static struct menu_data menu_sim_get_init_info[] = {
        { "1", "run", NULL, run_sim_get_init_info, NULL},
        { NULL, NULL, },
@@ -1062,185 +1297,265 @@ static struct menu_data menu_sim_get_iccid[] = {
        { NULL, NULL, },
 };
 
+static struct menu_data menu_sim_get_language[] = {
+               {"1", "run", NULL, run_sim_get_language, NULL},
+               {NULL, NULL},
+};
+
 static struct menu_data menu_sim_set_language[] = {
-       {"1", "select language (0=GERMAN 1=ENGLISH 2=ITALIAN 3=FRENCH 4=SPANISH 5=DUTCH 6=SWEDISH" \
-               "7=DANISH 8=PORTUGUESE 9=FINNISH 10=NORWEGIAN 11=GREEK 12=TURKISH 13=HUNGARIAN 14=POLISH" \
-               "15=KOREAN 16=CHINESE 17=RUSSIAN 18=JAPANESE 255=LANG_UNSPECIFIED)", NULL, NULL, data_sim_set_language},
-       {"2", "run", NULL, run_sim_set_language, NULL},
-       {NULL, NULL},
+               {"1", "select language", NULL, NULL, (char*)data_sim_set_language},
+               {"2", "run", NULL, run_sim_set_language, NULL},
+               {NULL, NULL},
 };
 
-static struct menu_data menu_sim_get_language[] = {
-       {"1", "run", NULL, run_sim_get_language, NULL},
-       {NULL, NULL},
+static struct menu_data menu_sim_change_state[] = {
+               {"1", "change state(0:OFF, 1:ON)", NULL, NULL, (char*)data_sim_set_state},
+               {"2", "run", NULL, run_sim_set_power_state, NULL},
+               {NULL, NULL},
+};
+
+static struct menu_data menu_sim_get_application_list[] = {
+               {"1", "run", NULL, run_sim_get_application_list, NULL},
+               {NULL, NULL},
 };
 
-static struct menu_data menu_sim_get_cf_info[] = {
-       {"1", "run", NULL, run_sim_get_cf_info, NULL},
-       {NULL, NULL},
+static struct menu_data menu_sim_get_cf[] = {
+               {"1", "run", NULL, run_sim_get_cf, NULL},
+               {NULL, NULL},
 };
 
-static struct menu_data menu_sim_set_mw_info[] = {
-       {"1", "profile id", NULL, NULL, data_sim_set_mw_profile_id},
-       {"2", "Indicator status", NULL, NULL, data_sim_set_mw_indicator_status},
-       {"3", "voice count", NULL, NULL, data_sim_set_mw_voice_cnt},
-       {"4", "fax count", NULL, NULL, data_sim_set_mw_fax_cnt},
-       {"6", "email count", NULL, NULL, data_sim_set_mw_email_cnt},
-       {"7", "other count", NULL, NULL, data_sim_set_mw_other_cnt},
-       {"8", "video count", NULL, NULL, data_sim_set_mw_video_cnt},
-       {"9", "run", NULL, run_sim_set_mw_info, NULL},
-       {NULL, NULL},
+static struct menu_data menu_sim_set_cf[] = {
+               {"1", "b_cphs no/yes => 0/1", NULL, NULL, data_sim_set_cf_b_cphs},
+               {"2", "rec_index int", NULL, NULL, data_sim_set_cf_rec_index},
+               {"3", "msp_num int", NULL, NULL, data_sim_set_cf_msp_num},
+               {"4", "cfu_status int", NULL, NULL, data_sim_set_cf_cfu_status},
+               {"5", "ton int", NULL, NULL, data_sim_set_cf_ton},
+               {"6", "npi int", NULL, NULL, data_sim_set_cf_npi},
+               {"7", "number string", NULL, NULL, data_sim_set_cf_number},
+               {"8", "cc2_id int", NULL, NULL, data_sim_set_cf_cc2_id},
+               {"9", "ext7_id int", NULL, NULL, data_sim_set_cf_ext7_id},
+               {"10", "cphs_line1 no/yes => 0/1", NULL, NULL, data_sim_set_cf_cphs_line1},
+               {"11", "cphs_line2 no/yes => 0/1", NULL, NULL, data_sim_set_cf_cphs_line2},
+               {"12", "cphs_fax no/yes => 0/1", NULL, NULL, data_sim_set_cf_cphs_fax},
+               {"13", "cphs_data no/yes => 0/1", NULL, NULL, data_sim_set_cf_cphs_data},
+               {"14", "run", NULL, run_sim_set_cf, NULL},
+               {NULL, NULL},
 };
 
-static struct menu_data menu_sim_get_mw_info[] = {
-       {"1", "run", NULL, run_sim_get_mw_info, NULL},
-       {NULL, NULL},
+static struct menu_data menu_sim_get_mw[] = {
+               {"1", "run", NULL, run_sim_get_mw, NULL},
+               {NULL, NULL},
 };
 
-static struct menu_data menu_sim_set_mb_info[] = {
-       {"1", "profile id", NULL, NULL, data_sim_set_mb_profile_id},
-       {"2", "mailbox type (0=VOICE 1=FAX 2=EMAIL 3=OTHER 4=VIDEO)", NULL, NULL, data_sim_set_mb_type},
-       {"3", "alpha id", NULL, NULL, data_sim_set_mb_alpha_id},
-       {"4", "number", NULL, NULL, data_sim_set_mb_number},
-       {"5", "run", NULL, run_sim_set_mb_info, NULL},
-       {NULL, NULL},
+static struct menu_data menu_sim_set_mw[] = {
+               {"1", "b_cphs no/yes => 0/1", NULL, NULL, data_sim_set_mw_b_cphs},
+               {"2", "rec_index int", NULL, NULL, data_sim_set_mw_rec_index},
+               {"3", "indicator_status int", NULL, NULL, data_sim_set_mw_indicator_status},
+               {"4", "voice_cnt int", NULL, NULL, data_sim_set_mw_voice_cnt},
+               {"5", "fax_cnt int", NULL, NULL, data_sim_set_mw_fax_cnt},
+               {"6", "email_cnt int", NULL, NULL, data_sim_set_mw_email_cnt},
+               {"7", "other_cnt int", NULL, NULL, data_sim_set_mw_other_cnt},
+               {"8", "video_cnt int", NULL, NULL, data_sim_set_mw_video_cnt},
+               {"9", "cphs_voice1 no/yes => 0/1", NULL, NULL, data_sim_set_mw_cphs_voice1},
+               {"10", "cphs_voice2 no/yes => 0/1", NULL, NULL, data_sim_set_mw_cphs_voice2},
+               {"11", "cphs_fax no/yes => 0/1", NULL, NULL, data_sim_set_mw_cphs_fax},
+               {"12", "cphs_data no/yes => 0/1", NULL, NULL, data_sim_set_mw_cphs_data},
+               {"13", "run", NULL, run_sim_set_mw, NULL},
+               {NULL, NULL},
 };
 
-static struct menu_data menu_sim_get_mb_info[] = {
-       {"1", "run", NULL, run_sim_get_mb_info, NULL},
-       {NULL, NULL},
+static struct menu_data menu_sim_get_mb[] = {
+               {"1", "run", NULL, run_sim_get_mb, NULL},
+               {NULL, NULL},
+};
+
+static struct menu_data menu_sim_set_mb[] = {
+               {"1", "b_cphs no/yes => 0/1", NULL, NULL, data_sim_set_mb_b_cphs},
+               {"2", "type 1voice 2voice2 3fax 4data 5email 6other  int", NULL, NULL, data_sim_set_mb_type},
+               {"3", "rec_index int", NULL, NULL, data_sim_set_mb_rec_index},
+               {"4", "profile_num int", NULL, NULL, data_sim_set_mb_profile_num},
+               {"5", "alpha_id_max_len int", NULL, NULL, data_sim_set_mb_alpha_id_max_len},
+               {"6", "alpha_id string", NULL, NULL, data_sim_set_mb_alpha_id},
+               {"7", "ton int", NULL, NULL, data_sim_set_mb_ton},
+               {"8", "npi int", NULL, NULL, data_sim_set_mb_npi},
+               {"9", "number string", NULL, NULL, data_sim_set_mb_number},
+               {"10", "cc_id int", NULL, NULL, data_sim_set_mb_cc_id},
+               {"11", "ext1_id int", NULL, NULL, data_sim_set_mb_ext1_id},
+               {"12", "run", NULL, run_sim_set_mb, NULL},
+               {NULL, NULL},
+};
+
+static struct menu_data menu_sim_get_cphs_info[] = {
+               {"1", "run", NULL, run_sim_get_cphs_info, NULL},
+               {NULL, NULL},
+};
+
+static struct menu_data menu_sim_get_service_table[] = {
+               {"1", "run", NULL, run_sim_get_service_table, NULL},
+               {NULL, NULL},
 };
 
 static struct menu_data menu_sim_get_msisdn[] = {
-       {"1", "run", NULL, run_sim_get_msisdn, NULL},
-       {NULL, NULL},
+               {"1", "run", NULL, run_sim_get_msisdn, NULL},
+               {NULL, NULL},
 };
 
-static struct menu_data menu_sim_get_spn[] = {
-       {"1", "run", NULL, run_sim_get_spn, NULL},
-       {NULL, NULL},
+static struct menu_data menu_sim_get_oplmnwact[] = {
+               {"1", "run", NULL, run_sim_get_oplmnwact, NULL},
+               {NULL, NULL},
 };
 
-static struct menu_data menu_sim_get_cphs_netname[] = {
-       {"1", "run", NULL, run_sim_get_cphs_netname, NULL},
-       {NULL, NULL},
+static struct menu_data menu_sim_get_spn[] = {
+               {"1", "run", NULL, run_sim_get_spn, NULL},
+               {NULL, NULL},
 };
 
-static struct menu_data menu_sim_get_sp_display_info[] = {
-       {"1", "run", NULL, run_sim_get_sp_display_info, NULL},
-       {NULL, NULL},
+static struct menu_data menu_sim_get_cphs_netname[] = {
+               {"1", "run", NULL, run_sim_get_cphs_netname, NULL},
+               {NULL, NULL},
 };
 
 static struct menu_data menu_sim_req_authentication[] = {
-       {"1", "sim auth type (0=GSM 1=GSM_CTX 2=3G_CTX 3=GBA 4=GBA_NAF 5=IMS_AKA)",
-               NULL, NULL, data_sim_req_authentication_type},
-       {"2", "autn_data", NULL, NULL, data_sim_req_authentication_autn_data},
-       {"3", "rand_data", NULL, NULL, data_sim_req_authentication_rand_data},
-       {"4", "run", NULL, run_sim_req_authentication, NULL},
-       {NULL, NULL},
+               {"1", "type", NULL, NULL, data_sim_req_authentication_type},
+               {"2", "autn_data", NULL, NULL, data_sim_req_authentication_autn_data},
+               {"3", "rand_data", NULL, NULL, data_sim_req_authentication_rand_data},
+               {"4", "run", NULL, run_sim_req_authentication, NULL},
+               {NULL, NULL},
 };
 
 static struct menu_data menu_sim_verify_pins[] = {
-       {"1", "pin type(0=PIN1, 1=PIN2)", NULL, NULL, data_sim_verify_pins_type},
-       {"2", "password", NULL, NULL, data_sim_verify_pins_pw},
-       {"3", "run", NULL, run_sim_verify_pins, NULL},
-       {NULL, NULL},
+               {"1", "type(0:pin1, 1:pin2, 6:sim)", NULL, NULL, data_sim_verify_pins_type},
+               {"2", "pw", NULL, NULL, data_sim_verify_pins_pw},
+               {"3", "run", NULL, run_sim_verify_pins, NULL},
+               {NULL, NULL},
 };
 
 static struct menu_data menu_sim_verify_puks[] = {
-       {"1", "puk type(0=PUK1, 1=PUK2)", NULL, NULL, data_sim_verify_puks_type},
-       {"2", "puk password", NULL, NULL, data_sim_verify_puks_puk_pw},
-       {"3", "pin", NULL, NULL, data_sim_verify_puks_pin},
-       {"4", "run", NULL, run_sim_verify_puks, NULL},
-       {NULL, NULL},
+               {"1", "type(2:puk1, 3:puk2)", NULL, NULL, data_sim_verify_puks_type},
+               {"2", "puk", NULL, NULL, data_sim_verify_puks_puk},
+               {"3", "pin", NULL, NULL, data_sim_verify_puks_pin},
+               {"4", "run", NULL, run_sim_verify_puks, NULL},
+               {NULL, NULL},
 };
 
 static struct menu_data menu_sim_change_pins[] = {
-       {"1", "pin type(0=PIN1, 1=PIN2)", NULL, NULL, data_sim_change_pins_type},
-       {"2", "old_pw", NULL, NULL, data_sim_change_pins_old_pw},
-       {"3", "new_pw", NULL, NULL, data_sim_change_pins_new_pw},
-       {"4", "run", NULL, run_sim_change_pins, NULL},
-       {NULL, NULL},
+               {"1", "type(0:pin1, 1:pin2)", NULL, NULL, data_sim_change_pins_type},
+               {"2", "old_pw", NULL, NULL, data_sim_change_pins_old_pw},
+               {"3", "new_pw", NULL, NULL, data_sim_change_pins_new_pw},
+               {"4", "run", NULL, run_sim_change_pins, NULL},
+               {NULL, NULL},
 };
 
-static struct menu_data menu_sim_enable_facility[] = {
-       {"1", "lock type(0=Phone-Sim, 1=Phone-First-Sim, 2=simlock, 3=fdnlock, 4=network, 5=network subset," \
-               "6=service provider 7=corporate", NULL, NULL, data_sim_facility_type},
-       {"2", "password", NULL, NULL, data_sim_facility_pw},
-       {"3", "run", NULL, run_sim_enable_facility, NULL},
-       {NULL, NULL},
+static struct menu_data menu_sim_disable_facility[] = {
+               {"1", "type(1:simlock, 3:pinlock., 4:fdnlock, 5:net, 6:netsub, 7:sp, 8:cp)", NULL, NULL, data_sim_disable_facility_type},
+               {"2", "pw", NULL, NULL, data_sim_disable_facility_pw},
+               {"3", "run", NULL, run_sim_disable_facility, NULL},
+               {NULL, NULL},
 };
 
-static struct menu_data menu_sim_disable_facility[] = {
-       {"1", "lock type(0=Phone-Sim, 1=Phone-First-Sim, 2=simlock, 3=fdnlock, 4=network, 5=network subset," \
-               "6=service provider 7=corporate", NULL, NULL, data_sim_facility_type},
-       {"2", "password", NULL, NULL, data_sim_facility_pw},
-       {"3", "run", NULL, run_sim_disable_facility, NULL},
-       {NULL, NULL},
+static struct menu_data menu_sim_enable_facility[] = {
+               {"1", "type(1:simlock, 3:pinlock., 4:fdnlock, 5:net, 6:netsub, 7:sp, 8:cp)", NULL, NULL, data_sim_enable_facility_type},
+               {"2", "pw", NULL, NULL, data_sim_enable_facility_pw},
+               {"3", "run", NULL, run_sim_enable_facility, NULL},
+               {NULL, NULL},
 };
 
 static struct menu_data menu_sim_get_facility[] = {
-       {"1", "lock type(0=Phone-Sim, 1=Phone-First-Sim, 2=simlock, 3=fdnlock, 4=network, 5=network subset," \
-               "6=service provider 7=corporate", NULL, NULL, data_sim_facility_type},
-       {"2", "run", NULL, run_sim_get_facility, NULL},
-       {NULL, NULL},
+               {"1", "type(1:simlock, 3:pinlock., 4:fdnlock, 5:net, 6:netsub, 7:sp, 8:cp)", NULL, NULL, data_sim_get_facility_type},
+               {"2", "run", NULL, run_sim_get_facility, NULL},
+               {NULL, NULL},
 };
 
 static struct menu_data menu_sim_get_lock_info[] = {
-       {"1", "lock type(0=Phone-Sim, 1=Phone-First-Sim, 2=simlock, 3=fdnlock, 4=network, 5=network subset," \
-               "6=service provider 7=corporate", NULL, NULL, data_sim_facility_type},
-       {"2", "run", NULL, run_sim_get_lock_info, NULL},
-       {NULL, NULL},
+               {"1", "type(1:simlock, 3:pinlock., 4:fdnlock, 5:net, 6:netsub, 7:sp, 8:cp)", NULL, NULL, data_sim_get_lock_type},
+               {"2", "run", NULL, run_sim_get_lock_info, NULL},
+               {NULL, NULL},
 };
 
-static struct menu_data menu_sim_request_apdu[] = {
-       {"1", "apdu", NULL, NULL, data_sim_apdu},
-       {"2", "run", NULL, run_sim_request_apdu, NULL},
-       {NULL, NULL},
+static struct menu_data menu_sim_transmit_apdu[] = {
+               {"1", "apdu", NULL, NULL, data_sim_transmit_apdu_apdu},
+               {"2", "run", NULL, run_sim_transmit_apdu, NULL},
+               {NULL, NULL},
 };
 
-static struct menu_data menu_sim_request_atr[] = {
-       {"1", "run", NULL, run_sim_request_atr, NULL},
-       {NULL, NULL},
+static struct menu_data menu_sim_get_atr[] = {
+               {"1", "run", NULL, run_sim_get_atr, NULL},
+               {NULL, NULL},
 };
 
-/* SIM Menu */
-struct menu_data menu_sim[] = {
-       {"1g", "Get sim init info", menu_sim_get_init_info, NULL, NULL},
-       {"2g", "Get sim card type", menu_sim_get_card_type, NULL, NULL},
-       {"3g", "Get imsi", menu_sim_get_imsi, NULL, NULL},
-       {"4g", "Get ecc", menu_sim_get_ecc, NULL, NULL},
-       {"5g", "Get iccid", menu_sim_get_iccid, NULL, NULL},
-       {"6s", "Set sim language", menu_sim_set_language, NULL, NULL},
-       {"6g", "Get sim language", menu_sim_get_language, NULL, NULL},
-       {"7g", "Get call forwarding info", menu_sim_get_cf_info, NULL, NULL},
-       {"8s", "Set msg waiting info", menu_sim_set_mw_info, NULL, NULL},
-       {"8g", "Get msg waiting info", menu_sim_get_mw_info, NULL, NULL},
-       {"9s", "Set mailbox info", menu_sim_set_mb_info, NULL, NULL},
-       {"9g", "Get mailbox info", menu_sim_get_mb_info, NULL, NULL},
-       {"10g", "Get msisdn", menu_sim_get_msisdn, NULL, NULL},
-       {"11g", "Get spn", menu_sim_get_spn, NULL, NULL},
-       {"12g", "Get cphs network name", menu_sim_get_cphs_netname, NULL, NULL},
-       {"13g", "Get sim service provider info", menu_sim_get_sp_display_info, NULL, NULL},
-       {"14", "sim authentication", menu_sim_req_authentication, NULL, NULL},
-       {"15", "verify pins", menu_sim_verify_pins, NULL, NULL},
-       {"16", "verify puks", menu_sim_verify_puks, NULL, NULL},
-       {"17", "change pins", menu_sim_change_pins, NULL, NULL},
-       {"18", "disable_sim_facility", menu_sim_disable_facility, NULL, NULL},
-       {"19", "enable_sim_facility", menu_sim_enable_facility, NULL, NULL},
-       {"20g", "Get sim facility info", menu_sim_get_facility, NULL, NULL},
-       {"21g", "Get sim lock info", menu_sim_get_lock_info, NULL, NULL},
-       {"22", "request sim apdu", menu_sim_request_apdu, NULL, NULL},
-       {"23", "request sim atr", menu_sim_request_atr, NULL, NULL},
+struct menu_data menu_sim_3gpp[] = {
+       {"1", "sim init info", menu_sim_get_init_info, NULL, NULL},
+       {"2", "card type", menu_sim_get_card_type, NULL, NULL},
+       {"3", "imsi", menu_sim_get_imsi, NULL, NULL},
+       {"4", "ecc", menu_sim_get_ecc, NULL, NULL},
+       {"5", "iccid", menu_sim_get_iccid, NULL, NULL},
+       {"6", "language", menu_sim_get_language, NULL, NULL},
+       {"7", "update language", menu_sim_set_language, NULL, NULL},
+       {"8", "cf info", menu_sim_get_cf, NULL, NULL},
+       {"9", "update cf info", menu_sim_set_cf, NULL, NULL},
+       {"10", "mw info", menu_sim_get_mw, NULL, NULL},
+       {"11", "update mw info", menu_sim_set_mw, NULL, NULL},
+       {"12", "mailbox info", menu_sim_get_mb, NULL, NULL},
+       {"13", "update mailbox info", menu_sim_set_mb, NULL, NULL},
+       {"14", "cphs info(svc table, phase)", menu_sim_get_cphs_info, NULL, NULL},
+       {"15", "msisdn", menu_sim_get_msisdn, NULL, NULL},
+       {"16", "oplmnwact", menu_sim_get_oplmnwact, NULL, NULL},
+       {"17", "spn", menu_sim_get_spn, NULL, NULL},
+       {"18", "cphs operator name info", menu_sim_get_cphs_netname, NULL, NULL},
+       {"19", "authentication", menu_sim_req_authentication, NULL, NULL},
+       {"20", "verify pins", menu_sim_verify_pins, NULL, NULL},
+       {"21", "verify puks", menu_sim_verify_puks, NULL, NULL},
+       {"22", "change pins", menu_sim_change_pins, NULL, NULL},
+       {"23", "disable facility", menu_sim_disable_facility, NULL, NULL},
+       {"24", "enable facility", menu_sim_enable_facility, NULL, NULL},
+       {"25", "facility(en/dis status) info", menu_sim_get_facility, NULL, NULL},
+       {"26", "lock status(status,retry count) info", menu_sim_get_lock_info, NULL, NULL},
+       {"27", "apdu", menu_sim_transmit_apdu, NULL, NULL},
+       {"28", "atr info", menu_sim_get_atr, NULL, NULL},
+       {"29", "service table", menu_sim_get_service_table, NULL, NULL},
+       {"30", "Change State", menu_sim_change_state, NULL, NULL},
+       {"31", "Get application list", menu_sim_get_application_list, NULL, NULL},
        { NULL, NULL, },
 };
 
-/* Register Events */
-void register_sim_event(TelHandle *handle)
+struct menu_data menu_sim_3gpp2[] = {
+       {"1", "sim init info", menu_sim_get_init_info, NULL, NULL},
+       {"2", "card type", menu_sim_get_card_type, NULL, NULL},
+       {"3", "imsi", menu_sim_get_imsi, NULL, NULL},
+       {"4", "ecc", menu_sim_get_ecc, NULL, NULL},
+       {"5", "iccid", menu_sim_get_iccid, NULL, NULL},
+       {"6", "msisdn", menu_sim_get_msisdn, NULL, NULL},
+       {"7", "spn", menu_sim_get_spn, NULL, NULL},
+       {"8", "authentication", menu_sim_req_authentication, NULL, NULL},
+       {"9", "verify pins", menu_sim_verify_pins, NULL, NULL},
+       {"10", "verify puks", menu_sim_verify_puks, NULL, NULL},
+       {"11", "change pins", menu_sim_change_pins, NULL, NULL},
+       {"12", "disable facility", menu_sim_disable_facility, NULL, NULL},
+       {"13", "enable facility", menu_sim_enable_facility, NULL, NULL},
+       {"14", "facility(en/dis status) info", menu_sim_get_facility, NULL, NULL},
+       {"15", "lock status(status,retry count) info", menu_sim_get_lock_info, NULL, NULL},
+       {"16", "apdu", menu_sim_transmit_apdu, NULL, NULL},
+       {"17", "atr info", menu_sim_get_atr, NULL, NULL},
+       {"18", "service table", menu_sim_get_service_table, NULL, NULL},
+       { NULL, NULL, },
+};
+
+struct menu_data menu_sim[] = {
+               {"1", "3GPP(WCDMA/GSM/LTE)" , menu_sim_3gpp, NULL, NULL},
+               {"2", "3GPP2(CDMA)" , menu_sim_3gpp2, NULL, NULL},
+               { NULL, NULL, },
+};
+
+void register_sim_event (TapiHandle *handle)
 {
-       TelReturn ret;
+       int ret;
 
-       ret = tapi_register_event_id(handle, TEL_NOTI_SIM_STATUS, on_noti_sim_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_SIM_STATUS - event register failed [%d]", ret);
+       /* SIM */
+       ret = tel_register_noti_event (handle, TAPI_NOTI_SIM_STATUS,
+                       on_noti_sim_status, NULL );
+       ret = tel_register_noti_event (handle, TAPI_PROP_SIM_CALL_FORWARD_STATE,
+                       on_noti_sim_cf_state, NULL );
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 }
index 7e23bcd02edcb652d398445aaa4ba7856ba9364a..7a808b08cde7614df098c2a156c19616baddd626 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,6 +21,6 @@
 #ifndef _SIM_H_
 #define _SIM_H_
 
-void register_sim_event(TelHandle *handle);
+void register_sim_event(TapiHandle *handle);
 
 #endif /* _SIM_H_ */
old mode 100755 (executable)
new mode 100644 (file)
index 0cf93f1..87301d8
@@ -1,9 +1,9 @@
-
 /*
- * libtapi
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <sys/time.h>
 #include <unistd.h>
 #include <glib.h>
-#include <glib-object.h>
 
-#include <tapi.h>
-#include <tapi_sms.h>
-#include <tapi_events.h>
+#include <arpa/inet.h>
+#include <tapi_common.h>
+#include <TelSms.h>
+#include <TapiUtility.h>
+#include <ITapiNetText.h>
 
 #include "menu.h"
 #include "sms.h"
 #include "sms_util.h"
+#include "sms_util_cdma.h"
+
+// Global Variabl
+int dcs_pos = 0;
+unsigned int SmsMsgId = 0;
+unsigned char tp_mr = 0x00;
+
+#define SMS_PTP_MSG 0x0
+
+#define DIGIT_MODE_BIT 0x80
+#define NUMBER_MODE_BIT 0x40
+#define DIGIT_MODE_OFFSET 7
+#define NUMBER_MODE_OFFSET 6
+#define NIBBLE_BIT_LENGTH 4
+#define SUBPARAM_LEN_VAL 0x03
+
+#define u16 uint16_t
+#define u8 uint8_t
+
+const char *cmdString[] = { "TAPI_SERVICE_SMS_SEND_UMTS_MSG",
+               "TAPI_SERVICE_SMS_READ_MSG", "TAPI_SERVICE_SMS_SAVE_MSG",
+               "TAPI_SERVICE_SMS_DELETE_MSG", "TAPI_SERVICE_SMS_GET_COUNT",
+               "TAPI_SERVICE_SMS_GET_SCA", "TAPI_SERVICE_SMS_SET_SCA",
+               "TAPI_SERVICE_SMS_GET_CB_CONFIG", "TAPI_SERVICE_SMS_SET_CB_CONFIG",
+               "TAPI_SERVICE_SMS_SET_MEM_STATUS", "TAPI_SERVICE_SMS_GET_PREF_BEARER",
+               "TAPI_SERVICE_SMS_SET_PREF_BEARER",
+               "TAPI_SERVICE_SMS_SET_DELIVERY_REPORT",
+               "TAPI_SERVICE_SMS_SET_MSG_STATUS", "TAPI_SERVICE_SMS_GET_PARAMS",
+               "TAPI_SERVICE_SMS_SET_PARAMS", "TAPI_SERVICE_SMS_GET_PARAMCNT",
+               "TAPI_SERVICE_SMS_SEND_CDMA_MSG" };
+
+static void on_resp_send_msg (TapiHandle *handle, int result, void *data,
+               void *user_data);
+static void on_resp_send_cdma_msg (TapiHandle *handle, int result, void *data,
+               void *user_data);
+static void on_resp_read_msg (TapiHandle *handle, int result, void *data,
+               void *user_data);
+static void on_resp_save_msg (TapiHandle *handle, int result, void *data,
+               void *user_data);
+static void on_resp_DeliverReport_msg (TapiHandle *handle, int result,
+               void *data, void *user_data);
+int  _util_hexstring_to_asciistring(const unsigned char *hex_string, unsigned char *ascii_string,int hex_len);
+
+unsigned int SmsUtilEncodeSca(TelSmsAddressInfo_t *sca, unsigned char *sca_num);
+
+static int CdmaCbSetting (MManager *mm, struct menu_data *menu);
+
+int  _util_hexstring_to_asciistring(const unsigned char *hex_string, unsigned char *ascii_string,int hex_len)
+{
+       int i,ascii_len;
+
+       if(hex_string[hex_len-1]>>4 == 0x0f ) {
+               ascii_len = (hex_len * 2 ) -1;
+       }else {
+               ascii_len = (hex_len * 2 );
+       }
+
+       for (i =0; i < ascii_len; i++ ) {
+               if (i % 2 == 0) {
+                       ascii_string[i]= (hex_string[i/2] & 0x0f)+ '0';
+               }else{
+                       ascii_string[i]=((hex_string[i/2]   >> 4 ))+ '0';
+               }
+       }
+       ascii_string[ascii_len]='\0';
+       return ascii_len;
+}
+
+unsigned int SmsUtilEncodeSca(TelSmsAddressInfo_t *sca, unsigned char *sca_num)
+{
+       unsigned int sca_length = 0;
+       unsigned int additional_len = 0;
+       unsigned local_index, j;
+
+       sca->Npi = TAPI_SIM_NPI_ISDN_TEL;
+       sca->Ton = TAPI_SIM_TON_UNKNOWN;
+       if (sca_num[0] == '+') {
+               sca->Ton = TAPI_SIM_TON_INTERNATIONAL;
+               additional_len = 1;
+       }
+       sca_length = strlen((char *)sca_num) - additional_len;
+       if (sca_length % 2 == 0) {
+               for (local_index = additional_len, j = 0; local_index < sca_length; local_index += 2, j++)
+                       sca->szDiallingNum[j] = ((sca_num[local_index+1] & 0X0F) << 4) | (sca_num[local_index] & 0x0F);
+       } else {
+               for (local_index = additional_len, j = 0; local_index < sca_length; local_index += 2, j++) {
+                       if (local_index == (sca_length - 1))
+                               sca->szDiallingNum[j] = ((0xF0) | (sca_num[local_index] & 0x0F));
+                       else
+                               sca->szDiallingNum[j] = ((sca_num[local_index+1] & 0X0F) << 4) | (sca_num[local_index] & 0x0F);
+               }
+       }
+       sca->szDiallingNum[(sca_length+1)/2] = '\0';
+       sca->DialNumLen = (sca_length+1)/2;
+
+       return sca->DialNumLen;
+}
+
+
+static BOOL EncodeCdmaSmsParamTeleservice(int teleservice_id ,ParamTeleserv_t *ParamTeleserv)
+{
+       BOOL ret = FALSE;
+
+       if(ParamTeleserv == NULL) {
+               printf("[EncodeCdmaSmsParamTeleservice] NULL pointer  \n");
+               return ret;
+       }
+
+       switch(teleservice_id) {
+               case SMS_3GPP2_TELESERVICE_ID_CPT:
+               case SMS_3GPP2_TELESERVICE_ID_CCMT:
+               case SMS_3GPP2_TELESERVICE_ID_VMN:
+               case SMS_3GPP2_TELESERVICE_ID_WAP:
+                       ret = TRUE;
+               break;
+               default:
+                       ret = FALSE;
+       }
+
+       if(ret == TRUE) {
+               ParamTeleserv->param_id = SMS_3GPP2_PARAM_ID_TELESERVICE_ID;
+               ParamTeleserv->param_len = 2;
+               //ParamTeleserv->teleserv_id = teleservice_id;
+               //memcpy((&ParamTeleserv->teleserv_id), &teleservice_id, sizeof(unsigned short));
+               ParamTeleserv->teleserv_id = teleservice_id;
+               printf("ParamTeleserv->teleserv_id[%d]\n", ParamTeleserv->teleserv_id);
+       }
+
+       return ret;
+}
+static BOOL EncodeCdmaSmsParamMsgId(int type, ParamMsgId_t *ParamMsg)
+{
+       BOOL ret = FALSE;
+
+       if(ParamMsg == NULL) {
+               printf("[EncodeCdmaSmsParamMsgId] NULL pointer  \n");
+               return ret;
+       }
+
+       ParamMsg->param_id = SMS_3GPP2_BSUB_ID_MESSAGE_IDENTIFIER;
+       ParamMsg->param_len =3;
+       ParamMsg->type = type;
+       ParamMsg->msg_id = SmsMsgId++;
+
+       ret = TRUE;
+
+       return ret;
+}
+
+static BOOL EncodeCdmaSmsParamUserData(char* SendTxt, ParamUserData_t *ParamUser)
+{
+       BOOL ret = FALSE;
+       int length = 0;
+
+       if(ParamUser == NULL || SendTxt == NULL) {
+               printf("[EncodeCdmaSmsParamUserData] NULL pointer  \n");
+               return ret;
+       }
+
+       length = strlen(SendTxt);
+
+       ParamUser->param_id = SMS_3GPP2_BSUB_ID_USER_DATA;
+       ParamUser->encoding = SMS_3GPP2_BSUB_UD_ASCII7BIT_ENCODING;
+       strncpy((char *)ParamUser->CHARi, SendTxt, length);
+
+       ParamUser->len = length;
+       length += 2;;
+       ParamUser->param_len = length;
+
+       ret = TRUE;
+
+       return ret;
+}
+
+static BOOL EncodeCdmaSmsSubmitTpdu (MManager *mm,
+       char* diallingNum, int dialNumLen, char *msgTxt, int msg_len)
+{
+       int ret, index = 0;
+       unsigned char *encoded_msg, digit_mode_val = 0, number_mode_val = 0;
+       unsigned char hex_string[SMS_ADDRESS_LEN_MAX + 1] = { 0, };
+       TapiHandle *handle;
+       TelSmsDatapackageInfo_t data_package;
+       u16 data;
+
+       ParamTeleserv_t param_teleservice = {0,};
+       ParamMsgId_t param_msg = {0,};
+       ParamUserData_t param_user = {0,};
+
+       msg("EncodeCdmaSmsSubmitTpdu:Enter");
+
+       handle = menu_manager_ref_user_data(mm);
+       encoded_msg = g_try_malloc0(sizeof(TelSmsDatapackageInfo_t));
+       if (NULL == encoded_msg) {
+               msg("Memory Allocation Failed for CDMA Data Package");
+               return FALSE;
+       }
+
+       /* Converting Destination number from ASCII to hex*/
+       if (__sms_asciistring_to_hex(diallingNum, hex_string, dialNumLen) == FALSE) {
+               msg("__sms_asciistring_to_hex() failed.");
+               return FALSE;
+       }
+
+       msg("Dump of hex string");
+       __util_hex_dump("    ", dialNumLen/2, hex_string);
+
+       /* First byte specifies Messaging Type*/
+       encoded_msg[index++] = SMS_PTP_MSG;
+
+       /* 3GPP2 C.S0015-A section:3.4.3.1 Teleservice Identifier*/
+       //1 TeleService Identifier
+       {
+               EncodeCdmaSmsParamTeleservice(SMS_3GPP2_TELESERVICE_ID_CCMT, &param_teleservice);
+               encoded_msg[index++] = param_teleservice.param_id;/*TeleService Identifier Tag e.g SMS_PARAMID_TELESERVICE_ID*/
+               encoded_msg[index++] = param_teleservice.param_len;/*TeleService Identifier Length*/
+               data=  htons(param_teleservice.teleserv_id);/*Conversion of Little Endian*/
+               memcpy(encoded_msg + index, &(data), sizeof(unsigned short));
+               index += sizeof(unsigned short);
+       }
+
+       /* 3GPP2 C.S0015-A section:3.4.3.3 Address Parameters*/
+       //1 Destination Address
+       {
+               int dest_addr_offset = 2, previous_addr_index;
+               unsigned char num_fields[SMS_ADDRESS_LEN_MAX + 1] = { 0, };
 
-static int dcs_pos = 0;
+               encoded_msg[index++] = SMS_3GPP2_PARAM_ID_DESTINATION_ADDRESS;
+               /* Fill the length value at the end */
+               unsigned char *addr_len = &encoded_msg[index++];// param length
+               previous_addr_index = index;
 
-#define NETTEXT_MSG_SIZE_MAX 918
+               encoded_msg[index]  = ((digit_mode_val << (DIGIT_MODE_OFFSET)) & DIGIT_MODE_BIT);
+               encoded_msg[index]  = ((number_mode_val << (NUMBER_MODE_OFFSET)) & NUMBER_MODE_BIT);
 
-#define CHECK_SMS_RESULT(x) \
-{ \
-       if (x >= TEL_SMS_RESULT_SUCCESS && x <= TEL_SMS_RESULT_OPERATION_NOT_PERMITTED) { \
-               msg("result[%d][%s]", x, dbg_sms_result[x]); \
-       } else { \
-               msg("API failed with result[%d]", x); \
-       } \
-       if (x != TEL_SMS_RESULT_SUCCESS) \
-               return ; \
+               bitarray_copy(num_fields, 0, dialNumLen * CHAR_BIT, &encoded_msg[index], dest_addr_offset);
+               index++;
+
+               bitarray_copy(hex_string, 0, dialNumLen * NIBBLE_BIT_LENGTH, &encoded_msg[index], dest_addr_offset);
+
+               index += (dest_addr_offset + dialNumLen * NIBBLE_BIT_LENGTH) / 8 +
+                                                       ((dest_addr_offset + dialNumLen * NIBBLE_BIT_LENGTH) % 8? 1: 0);
+
+               /*Updating the Address Length*/
+               *addr_len = index - previous_addr_index;
+
+               msg("Dest addr final Index[%d] ", index);
+               __util_hex_dump("    ", index, encoded_msg);
+       }
+
+       //Bearer Data Options:
+       int bearer_data_previous_index;
+       encoded_msg[index++] = SMS_3GPP2_PARAM_ID_BEARER_DATA;
+       unsigned char *bearer_data_length = &encoded_msg[index++];
+       bearer_data_previous_index = index;
+       {
+               //1  Message Identifier
+               {
+                       u8 offset = 4;
+                       EncodeCdmaSmsParamMsgId(SMS_3GPP2_BSUB_TELSERVICE_MSG_TYPE_SUBMIT, &param_msg);
+                       encoded_msg[index++] = param_msg.param_id;
+                       encoded_msg[index++] = SUBPARAM_LEN_VAL;
+
+
+                       /*Copying the Message ID*/
+                       bitarray_copy((&param_msg.type), offset, NIBBLE_BIT_LENGTH, &encoded_msg[index], 0);
+                       param_msg.msg_id = htons(param_msg.msg_id );
+
+                       bitarray_copy((unsigned char *)(&param_msg.msg_id), 0, sizeof(param_msg.msg_id)*CHAR_BIT, &encoded_msg[index], offset);
+                       param_msg.msg_id = ntohs(param_msg.msg_id );
+
+                       index += (offset + sizeof(param_msg.msg_id)*CHAR_BIT)/8 +
+                                                               (( (offset + sizeof(param_msg.msg_id)*CHAR_BIT)%8)?1:0);
+
+                       msg("Message Identifier final Index[%d] ", index);
+                       __util_hex_dump("    ", index, encoded_msg);
+               }
+
+               /*3GPP2 C.S0015-A section 4.5.2 User Data*/
+               //1 User Data
+               {
+                       int message_type = 0, offset =5, prev_userdata_index;
+                       int current_index, i, initial_offset, index_data;
+                       EncodeCdmaSmsParamUserData(msgTxt, &param_user);
+                       encoded_msg[index++] = param_user.param_id;
+
+                       unsigned char *user_data_len = &encoded_msg[index++];
+
+                       prev_userdata_index = index;
+
+                       if (param_user.encoding == 0x01) {
+                               encoded_msg[index] = param_user.encoding << 3;
+                               encoded_msg[index] = (encoded_msg[index]  & (0xF8)) | (message_type >> 5);
+                               index++;
+                               encoded_msg[index] = message_type << 3;
+                       }else {
+                               encoded_msg[index] = param_user.encoding << 3;
+                       }
+
+                       encoded_msg[index] = (encoded_msg[index] & 0xF8) | (param_user.len >> 5);
+                       index++;
+                       encoded_msg[index] = (param_user.len << 3);
+
+
+                       current_index = index;
+                       initial_offset = offset;
+                       index_data = 0;
+                       for (i= 1; i <= param_user.len; i++) {
+                               bitarray_copy((const unsigned char*)&param_user.CHARi[i-1], 1, 7, (unsigned char*)&encoded_msg[current_index+index_data], offset);
+                               offset = (offset + 7) % 8;
+                               index_data = (initial_offset + i * 7) / 8;
+                       }
+                       index = index_data + current_index;
+                       index++;
+
+                       msg("User Data Index[%d ]:", index);
+                       __util_hex_dump("    ", index, encoded_msg);
+
+                       *user_data_len = index - prev_userdata_index;
+               }
+               *bearer_data_length = index - bearer_data_previous_index;
+               __util_hex_dump("    ", index, encoded_msg);
+       }
+
+       memset(&data_package, 0x0, sizeof(TelSmsDatapackageInfo_t));
+
+       data_package.format = TAPI_NETTEXT_NETTYPE_3GPP2;
+       data_package.MsgLength = index;
+
+       data_package.szData[data_package.MsgLength +1] = '\0';
+
+       memcpy(&(data_package.szData), encoded_msg, data_package.MsgLength);
+
+       msg("Message Length[%d] ", data_package.MsgLength);
+
+       __util_hex_dump("    ", data_package.MsgLength, data_package.szData);
+
+       ret = tel_send_sms(handle, &data_package, 0x0, on_resp_send_cdma_msg, NULL);
+       msg("Return Status of CDMA tel_send_sms[%d]", ret);
+
+       free(encoded_msg);
+       return TRUE;
 }
 
-char *dbg_sms_result[] = {
-       "TEL_SMS_RESULT_SUCCESS",
-       "TEL_SMS_RESULT_FAILURE",
-       "TEL_SMS_RESULT_INVALID_PARAMETER",
-       "TEL_SMS_RESULT_MEMORY_FAILURE",
-       "TEL_SMS_RESULT_OPERATION_NOT_SUPPORTED",
-       "TEL_SMS_RESULT_UNKNOWN_FAILURE",
-       "TEL_SMS_RESULT_INVALID_MANDATORY_INFO",
-       "TEL_SMS_RESULT_NETWORK_CONGESTION",
-       "TEL_SMS_RESULT_SIM_FAILURE",
-       "TEL_SMS_RESULT_NETWORK_FAILURE",
-       "TEL_SMS_RESULT_OPERATION_NOT_PERMITTED",
-};
-
-static char data_sms_index[MENU_DATA_SIZE + 1] = {};
-static char data_sms_msg_status[MENU_DATA_SIZE + 1] = {};
-static char data_sms_memory_status[MENU_DATA_SIZE + 1] = {};
-static char data_sms_sca_ton[MENU_DATA_SIZE + 1] = {};
-static char data_sms_sca_npi[MENU_DATA_SIZE + 1] = {1, };
-static char data_sms_sca_number[MENU_DATA_SIZE + 1] = {};
-
-static char data_sms_set_params_index[MENU_DATA_SIZE + 1] = {};
-static char data_sms_set_params_vp[MENU_DATA_SIZE + 1] = {};
-
-static char data_sms_set_cb_status[MENU_DATA_SIZE + 1] = {};
-static char data_sms_set_cb_msg_id_rng_cnt[MENU_DATA_SIZE + 1] = {0, };
-static char data_sms_set_cb_from_msg_id[MENU_DATA_SIZE + 1] = {};
-static char data_sms_set_cb_to_msg_id[MENU_DATA_SIZE + 1] = {};
-static char data_sms_set_cb_msg_id_selected[MENU_DATA_SIZE + 1] = {};
-
-static char data_sms_send_more_msgs[MENU_DATA_SIZE + 1] = {};
-static char data_sms_send_msg[MENU_DATA_SIZE + 1] = {};
-static char data_sms_send_msg_dialling_num[MENU_DATA_SIZE + 1] = {};
-
-static void on_resp_write_sms_in_sim(TelHandle *handle, int result, void *data, void *user_data);
-static void on_resp_sms_delivery_report(TelHandle *handle, int result, void *data, void *user_data);
-static void on_send_sms(TelHandle *handle, int result, void *data, void *user_data);
-
-/* Utilities */
-static int __encode_and_send_sms_submit_tpdu (MManager *mm, char *dialling_num, unsigned int dial_num_len,
-               char *msg, unsigned int msg_len, TelSmsSendInfo *send_sms_info)
+static BOOL DecodeCellBroadcastMsg (int length, char * pPDU)
 {
-       TelHandle *handle = menu_manager_ref_user_data (mm);
-       TpduSmsSubmit tpdu_submit;
-       unsigned char packet[NETTEXT_MSG_SIZE_MAX] = {0, };
-       unsigned char tp_mr = 0;
+       int msgLength;
+       int sn = 0; //serial number
+       int msgID; //message identifier
+       Sms_coding_scheme dcs;
+
+       unsigned char page[2];
+       int contents_length;
+       char contents[SMS_CB_SIZE_MAX];
+
+       unsigned char gs;
+       unsigned char msgCode;
+       unsigned char updateNumber;
+
+       if (pPDU == NULL ) {
+               msg("pData is Null")
+               return FALSE;
+       }
+
+       msg("cb msg type is %x", pPDU[0]);
+       msg("cb msg len is %x", pPDU[1]);
+
+       msg("$$$$$$$$$$$$$$$length of cb msg is %d", length);
+       sn = (pPDU[2] << 8) | pPDU[1];
+
+       gs = (pPDU[2] & 0xC0) >> 6;  //bit 7, bit 6
+
+       msgCode = ( ( (pPDU[2] & 0x3F) << 4) | pPDU[3]) & 0xF0;
+
+       updateNumber = pPDU[3] & 0x0F;  //bit3, bit2, bit1, bit0
+
+       msgID = pPDU[4] << 4 | pPDU[3];
+
+       SmsUtilDecodeDCS (&dcs, pPDU[6]);
+
+       page[0] = pPDU[7] & 0x0F; //total page
+       page[1] = (pPDU[7] & 0xF0) >> 4; //current page
+
+       msgLength = length - 2;
+
+       contents_length = msgLength - 6;
+
+       if (dcs.alphabet_type == SMS_ALPHABET_DEFAULT) {
+               unsigned char inData[SMS_CB_SIZE_MAX + 1];
+
+               memset (inData, 0x00, SMS_CB_SIZE_MAX + 1);
+
+               memcpy ((void*) inData, (void*) &pPDU[8], contents_length);
+               SmsUtilUnpackGSMCode (contents, &pPDU[8], msgLength);
+       }
+       else {
+               memcpy (contents, &pPDU[8], msgLength);
+               contents[msgLength] = 0;
+       }
+
+       printf ("*************************************\n");
+       printf ("serical number : 0x%04x \n", sn);
+       printf ("Geographical Scope: 0x%x\n", gs);
+       printf ("message code : 0x%x\n", msgCode);
+       printf ("update Number : 0x%x\n", updateNumber);
+       printf ("message identifier :  0x%x\n", msgID);
+       printf ("DCS-Commpressed?: %d (1: true)\n", dcs.bCompressed);
+       printf ("DCS-coding_group_type:  %x\n", dcs.coding_group_type);
+       printf ("contents bytes size : %d\n", contents_length);
+       printf ("page : (%d /%d) (page /total ) \n", page[1], page[0]);
+       printf ("contents: %s\n", contents);
+       printf ("*************************************\n");
+
+       return TRUE;
+}
+
+static BOOL EncodeSmsSubmitTpdu (MManager *mm, char* diallingNum,
+               int dialNumLen, char* msg, int msg_len)
+{
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+
+       TPDU_SMS_SUBMIT tpdu_submit;
+
+       unsigned char packet[TAPI_NETTEXT_MSG_SIZE_MAX];
+
+       unsigned char SCA[TAPI_NETTEXT_ADDRESS_LEN_MAX + 1];
+       int ret = 0;
+
+       //      unsigned char tp_mr = 0x03;
+       tp_mr++;
        unsigned char tp_pid = 0; //reaplace type (65)
        unsigned char tp_dcs; //=17; //class_1(17),class_2(18)
        unsigned char tp_vp;
-       unsigned int index = 0;
-       unsigned int i;
-       TelReturn rt = 0;
 
-       tp_mr++; /* msg_ref */
+       int local_index = 0, ScIndex = 0;
+       int i;
+       int requestId = 0;
+       unsigned char sca_len = 0;
+       TapiResult_t returnStatus;
+
+       TelSmsDatapackageInfo_t *pDataPackage = NULL;
+
+       memset (packet, 0, TAPI_NETTEXT_MSG_SIZE_MAX);
+
+       /************SCA ADDRESS GET START**************/
+       /*
+        returnStatus = TelTapiSmsGetSCA(&sc_addr,0);
+        printf("Service center addr returned from TAPI SCA address %s returnStatus %d\n",sc_addr.szDiallingNum,returnStatus);
+        SmsUtilDecodeAddrField(decodeScaAddr, &sc_addr.szDiallingNum[0],&sc_addr.Ton, &sc_addr.Npi);
+        sca_len = strlen( decodeScaAddr );
+
+        memcpy( SCA, decodeScaAddr, sca_len);
+        SCA[sca_len] = '\0';
+        */
+       msg("Enter a Valid Service Centre Number  or Just Enter:");
+       memset (SCA, 0, sizeof (SCA));
+
+       ret = read (0, SCA, sizeof (SCA) - 1);
+       if (ret <= 0) {
+               msg(" NULL msg can NOT be sent ");
+               return -1;
+       }
+       SCA[ret] = '\0';
+
+       pDataPackage = malloc (sizeof(TelSmsDatapackageInfo_t));
+       memset (pDataPackage, 0, sizeof(TelSmsDatapackageInfo_t));
+
+       sca_len = strlen ((char *) SCA) - 1;
+
+       msg("Decode SCA Address =========");
+       msg("SCA Number :%s, SCA Length :%d ", SCA, sca_len);
+       msg("========================");
+
+       //SCA ADDRESS GET END
+
+       //SCA
+
+       //TODO : SCA
+
+       //      index +=SmsUtilEncodeAddrField(packet,SCA, strlen(SCA)  ,0x01,0x01);
+       ScIndex = SmsUtilEncodeAddrField ((unsigned char*) pDataPackage->Sca,
+                       (char *) SCA, sca_len, 0x00, 0x01);
+
+       msg("ScIndex is %d", ScIndex);
 
        // TP-MTI, TP-RD, TP-VPF, TP-SRR, TP_UDHI, TP-RP
        tpdu_submit.msg_type = SMS_TPDU_SUBMIT;
@@ -112,217 +526,178 @@ static int __encode_and_send_sms_submit_tpdu (MManager *mm, char *dialling_num,
        tpdu_submit.udhi = FALSE; //false: contains only the short message , true :a Header in addition to the short message
        tpdu_submit.rp = FALSE; //false :TP Reply Path parameter is not set in this SMS SUBMIT, true : TP Reply Path parameter is set in this SMS SUBMIT
 
-       packet[index] = tpdu_submit.msg_type; // SUBMIT: bits 0, 1
-       packet[index] |= tpdu_submit.rd ? 0x04 : 0; // bit 2
-       packet[index] |= tpdu_submit.vpf << 3; // bits 3, 4
-       packet[index] |= tpdu_submit.srr ? 0x20 : 0; // bit 5
-       packet[index] |= tpdu_submit.udhi ? 0x40 : 0; // bit 6
-       packet[index] |= tpdu_submit.rp ? 0x80 : 0; // bit 7
+       packet[local_index] = tpdu_submit.msg_type;                                     // SUBMIT: bits 0, 1
+       packet[local_index] |= tpdu_submit.rd ? 0x04 : 0;                                               // bit 2
+       packet[local_index] |= tpdu_submit.vpf << 3;    // bits 3, 4
+       packet[local_index] |= tpdu_submit.srr ? 0x20 : 0;                                              // bit 5
+       packet[local_index] |= tpdu_submit.udhi ? 0x40 : 0;                                             // bit 6
+       packet[local_index] |= tpdu_submit.rp ? 0x80 : 0;                                               // bit 7
 
-       index++;
-       msg("index of message ref is %d, msgref is %d", index, tp_mr);
+       local_index++;
+       msg("local_index of message ref is %d, msgref is %d", local_index, tp_mr);
        /* TP-MR */
-       packet[index++] = tp_mr;
+       packet[local_index++] = tp_mr;
 
        // TP-DA
-#if 1
-       index += sms_util_encode_addr_field (packet + index, dialling_num, dial_num_len,
-                       0x02, 0x01);
-#else
-       memcpy(&(packet[index]), dialling_num, dial_num_len);
-    index = index + dial_num_len;
-#endif
+       local_index += SmsUtilEncodeAddrField (packet + local_index, diallingNum, dialNumLen, 0x01, 0x01);
 
        //msg("DESTINATTION  ADDR Encoded =========");
 
        //TP-PID
-       packet[index++] = tp_pid;
+       packet[local_index++] = tp_pid;
 
        // TP_DCS (Data Coding Scheme)
 
-       tpdu_submit.dcs.compressed = FALSE;
-       tpdu_submit.dcs.bmsg_class_set = FALSE;
+       tpdu_submit.dcs.bCompressed = FALSE;
+       tpdu_submit.dcs.bmsg_class_set = TRUE;
        tpdu_submit.dcs.coding_group_type = SMS_CODGRP_SM_GENERAL_DCS;
        tpdu_submit.dcs.alphabet_type = SMS_ALPHABET_DEFAULT;
-       tpdu_submit.dcs.class_type = SMS_CLASS_2;
+       tpdu_submit.dcs.class_type = SMS_CLASS_1;
 
-       sms_util_encode_dcs (&tp_dcs, &tpdu_submit.dcs);
+       SmsUtilEncodeDCS (&tp_dcs, &tpdu_submit.dcs);
 
-       packet[index++] = tp_dcs;
+       packet[local_index++] = tp_dcs;
 
        //msg("DCS Encoded:tp_dcs =%d =========",tp_dcs);
 
        //TP-VP
+
        tpdu_submit.vp.vp_rel_type = SMS_VP_REL_6H;
        tpdu_submit.vp.vp_type = SMS_VP_RELATIVE;
-       tpdu_submit.vp.vp_value = 0x01;
+       tpdu_submit.vp.vpValue = 0xff;
 
-       sms_util_encode_validity (&tp_vp, &tpdu_submit.vp);
+       SmsUtilEncodeValidity (&tp_vp, &tpdu_submit.vp);
 
        //tp_vp =65;
-       packet[index++] = tp_vp;
+       packet[local_index++] = tp_vp;
        //msg("Validity Encoded :tp_vp =%d =========",tp_vp);
 
        // UDL
-       packet[index++] = msg_len;
+       packet[local_index++] = msg_len;
 
        // TP-UD
 
        if (tpdu_submit.dcs.alphabet_type == SMS_ALPHABET_DEFAULT) {
                int pos;
-               pos = sms_util_pack_gsm_code (packet + index, msg, msg_len);
-               index += pos;
+               pos = SmsUtilPackGSMCode (packet + local_index, msg, msg_len);
+               local_index += pos;
        }
 
-       for (i = 0; i < index; i++) {
+       msg("Send packet to phonseSever[%d] -----", local_index);
+
+       for (i = 0; i < local_index; i++) {
                msg("[%02x]", packet[i]);
                if (i % 10 == 9)
                        msg("\n");
        }
        msg("\n");
 
-       memcpy (send_sms_info->send_data.tpdu, packet, index);
-       send_sms_info->send_data.tpdu_length = index;
+       memcpy (pDataPackage->szData, packet, local_index);
+       pDataPackage->MsgLength = local_index;
 
-       msg("call tapi_sms_send()");
+       msg("***Sending the Message (Api:SendMsg)***");
 
-       msg("Length : %d", send_sms_info->send_data.tpdu_length);
+       msg("Length : %d", pDataPackage->MsgLength);
 
-       rt = tapi_sms_send (handle, send_sms_info, on_send_sms, NULL );
-       CHECK_RT(rt);
-       return 0;
-}
+       pDataPackage->format = TAPI_NETTEXT_NETTYPE_3GPP;
+       msg("Format : %d", pDataPackage->format);
 
-static gboolean __decode_cb_msg (unsigned int length, char *pdu)
-{
-       unsigned int msg_length;
-       int msg_id;
-       int serial_number = 0;
-       SmsCodingScheme dcs;
-       unsigned char page[2];
-       unsigned int contents_length;
-       char contents[TEL_SMS_CB_DATA_SIZE_MAX];
-       unsigned char gs;
-       unsigned char msg_code;
-       unsigned char update_number;
-
-       serial_number = (pdu[2] << 8) | pdu[1];
-
-       gs = (pdu[2] & 0xC0) >> 6;  //bit 7, bit 6
-
-       msg_code = ( ( (pdu[2] & 0x3F) << 4) | pdu[3]) & 0xF0;
-
-       update_number = pdu[3] & 0x0F; //bit3, bit2, bit1, bit0
-
-       msg_id = pdu[4] << 4 | pdu[3];
-
-       sms_util_decode_dcs(&dcs, pdu[6]);
+       returnStatus = tel_send_sms (handle, pDataPackage, 0, on_resp_send_msg, NULL );
 
-       page[0] = pdu[7] & 0x0F; //total page
-       page[1] = (pdu[7] & 0xF0) >> 4; //current page
+       msg("SendMsg : returnStatus=%d requestId=%d", returnStatus, requestId);
 
-       msg_length = length - 2;
-       contents_length = msg_length - 6;
-
-       if (dcs.alphabet_type == SMS_ALPHABET_DEFAULT) {
-               sms_util_unpack_gsm_code (contents, &pdu[8], msg_length);
-       } else {
-               memcpy (contents, &pdu[8], msg_length);
-               contents[msg_length] = 0;
-       }
-
-       msg("*************************************\n");
-       msg("serial number : 0x%04x \n" , serial_number);
-       msg("Geographical Scope: 0x%x\n" , gs);
-       msg("message code : 0x%x\n", msg_code);
-       msg("update Number : 0x%x\n",update_number);
-       msg("message identifier :  0x%x\n" , msg_id);
-       msg("DCS-Commpressed?: %d (1: true)\n" , dcs.compressed);
-       msg("DCS-coding_group_type:     %x\n" , dcs.coding_group_type);
-       msg("contents bytes size : %d\n", contents_length);
-       msg("page : (%d /%d) (page /total ) \n", page[1], page[0]);
-       msg("contents: %s\n", contents);
-       msg("*************************************\n");
+       free (pDataPackage);
 
        return TRUE;
+
 }
 
-static int __decode_sms_deliver_tpdu (unsigned int tpdu_len, char *tpdu)
+
+static int DecodeSmsDeliverTpdu (int tpdu_len, char* pTPDU)
 {
-       TpduSmsDeliver tpdu_deliver;
-       TmDateTime time_stamp;
-       unsigned int org_addr_len = 0;
-       char dialling_num[SMS_ADDRESS_LEN_MAX + 1];
-       char org_addr[SMS_ADDRESS_LEN_MAX + 1]; //originating number
+       TPDU_SMS_DELIVER tpdu_deliver;
+       TmDateTime SCTimeStamp;
+       int orgAddr_len = 0;
+       char diallingNum[SMS_ADDRESS_LEN_MAX + 1];
+       char orgAddr[SMS_ADDRESS_LEN_MAX + 1]; //originating number
        int org_ton, org_npi;
        int position = 0;
 
        /* TP-MTI, TP-MMS, TP-SRI, TP_UDHI, TP-RP */
        tpdu_deliver.msg_type = SMS_TPDU_DELIVER;
-       tpdu_deliver.mms = (tpdu[position] & 0x04) ? TRUE : FALSE; // bit 2 (Message Type Indicator)
-       tpdu_deliver.sri = (tpdu[position] & 0x20) ? TRUE : FALSE; // bit 5 (Status Report Indication)
-       tpdu_deliver.udhi = (tpdu[position] & 0x40) ? TRUE : FALSE;// bit 6 (User Data Header Indicator)
-       tpdu_deliver.rp = (tpdu[position] & 0x80) ? TRUE : FALSE;// bit 7 (Reply Path)
+       tpdu_deliver.mms = (pTPDU[position] & 0x04) ? TRUE : FALSE; // bit 2 (Message Type Indicator)
+       tpdu_deliver.sri = (pTPDU[position] & 0x20) ? TRUE : FALSE;     // bit 5 (Status Report Indication)
+       tpdu_deliver.udhi = (pTPDU[position] & 0x40) ? TRUE : FALSE;// bit 6 (User Data Header Indicator)
+       tpdu_deliver.rp = (pTPDU[position] & 0x80) ? TRUE : FALSE;// bit 7 (Reply Path)
 
        position++;
 
        /* TP-OA */
 
-       memset (dialling_num, 0, sizeof (dialling_num));
+       memset (diallingNum, 0, sizeof (diallingNum));
 
-       org_addr_len = sms_util_decode_addr_field (dialling_num, &tpdu[position],
+       orgAddr_len = SmsUtilDecodeAddrField (diallingNum, &pTPDU[position],
                        &org_ton, &org_npi);
-       if (org_addr_len > SMS_ADDRESS_LEN_MAX - 1)
-               org_addr_len = SMS_ADDRESS_LEN_MAX - 1;
+       if (orgAddr_len > SMS_ADDRESS_LEN_MAX - 1)
+               orgAddr_len = SMS_ADDRESS_LEN_MAX - 1;
 
        position += 2;
 
-       position += (org_addr_len + 1) / 2;
-       msg("pos = %d, length = %d", position, org_addr_len);
+       if (orgAddr_len % 2)
+               position += orgAddr_len / 2 + 1;
+       else
+               position += orgAddr_len / 2;
+
+       msg("pos = %d, length = %d", position, orgAddr_len);
 
        if (org_ton == SMS_TON_INTERNATIONAL) {
-               org_addr[0] = '+';
-               memcpy (&org_addr[1], dialling_num, org_addr_len - 1);
-               org_addr[org_addr_len + 1] = '\0';
-       } else {
-               memcpy (org_addr, dialling_num, org_addr_len);
-               org_addr[org_addr_len] = '\0';
+               orgAddr[0] = '+';
+               memcpy (&orgAddr[1], diallingNum, orgAddr_len - 1);
+               orgAddr[orgAddr_len + 1] = '\0';
+       }
+       else {
+               memcpy (orgAddr, diallingNum, orgAddr_len);
+               orgAddr[orgAddr_len] = '\0';
        }
 
        /* TP-PID */
-       tpdu_deliver.pid= tpdu[position];
+       tpdu_deliver.pId = pTPDU[position];
 
        position++;
 
        /* TP-DCS */
-       sms_util_decode_dcs(&tpdu_deliver.dcs, tpdu[position]);
+       SmsUtilDecodeDCS (&tpdu_deliver.dcs, pTPDU[position]);
        dcs_pos = position;
        position++;
 
        /* TP-SCTS */
-       sms_util_decode_time_stamp (&tpdu[position], &time_stamp);
+       SmsUtilDecodeTimeStamp (&pTPDU[position], &SCTimeStamp);
 
        position += 7;
 
        /* TP-UDL */
-       tpdu_deliver.udl = tpdu[position];
+       tpdu_deliver.udl = pTPDU[position];
 
-       if (tpdu_deliver.udl > TEL_SMS_SMDATA_SIZE_MAX)
-               tpdu_deliver.udl = TEL_SMS_SMDATA_SIZE_MAX;
+       if (tpdu_deliver.udl > SMS_SMDATA_SIZE_MAX)
+               tpdu_deliver.udl = SMS_SMDATA_SIZE_MAX;
 
        position++;
 
        /* TP-UD */
-       tpdu_deliver.user_data = g_try_malloc0(TEL_SMS_SMDATA_SIZE_MAX + 1);
+       tpdu_deliver.userData = malloc (
+                       sizeof(unsigned char) * (SMS_SMDATA_SIZE_MAX + 1));
+
+       memset (tpdu_deliver.userData, 0,
+                       sizeof(unsigned char) * (SMS_SMDATA_SIZE_MAX + 1));
 
        if (tpdu_deliver.dcs.alphabet_type == SMS_ALPHABET_DEFAULT) {
-               char in_data[TEL_SMS_SMDATA_SIZE_MAX + 1];
+               char inData[SMS_SMDATA_SIZE_MAX + 1];
 
-               memset (in_data, 0x00, TEL_SMS_SMDATA_SIZE_MAX + 1);
+               memset (inData, 0x00, SMS_SMDATA_SIZE_MAX + 1);
 
-               memcpy ((void*) in_data, (void*) &tpdu[position], tpdu_deliver.udl);
+               memcpy ((void*) inData, (void*) &pTPDU[position], tpdu_deliver.udl);
 
-               sms_util_unpack_gsm_code (tpdu_deliver.user_data, in_data,
+               SmsUtilUnpackGSMCode (tpdu_deliver.userData, inData,
                                (unsigned char) tpdu_deliver.udl);
        }
 
@@ -330,105 +705,118 @@ static int __decode_sms_deliver_tpdu (unsigned int tpdu_len, char *tpdu)
        msg("Msg Type: TPDU_DELIVER");
 
        if (tpdu_deliver.rp) {
-               msg("RP: Set Reply Path");
-       } else {
-               msg("RP: Not set Reply Path");
+               msg("RP: Set Reply Path")
+       }
+       else if (!tpdu_deliver.rp) {
+               msg("RP: Not set Reply Path")
        }
 
        if (tpdu_deliver.sri) {
-               msg("SRI: A status report shall be returned to the SME");
-       } else {
-               msg("SRI: A status report shall be not returned to the SME");
+               msg("SRI: A status report shall be returned to the SME")
+       }
+       else if (!tpdu_deliver.sri) {
+               msg("SRI: A status report shall be not returned to the SME")
        }
 
        if (tpdu_deliver.mms) {
-               msg("MMS: No more messages are waiting for the MS in this SC");
-       } else {
-               msg("MMS: More messages are waiting for the MS in this SC");
+               msg("MMS: No more messages are waiting for the MS in this SC")
+       }
+       else if (!tpdu_deliver.mms) {
+               msg("MMS: More messages are waiting for the MS in this SC")
        }
 
        if (tpdu_deliver.udhi) {
-               msg("UDHI: Contains a Header in addition to the short message.");
-       } else {
-               msg("UDHI: Only short message.");
+               msg("UDHI: Contains a Header in addition to the short message.")
+       }
+       else if (!tpdu_deliver.udhi) {
+               msg("UDHI: Only short message.")
        }
 
        msg("DcsClass : %x (4 means Class None) ", tpdu_deliver.dcs.class_type);
 
-       msg("From : %10s", org_addr);
-       msg("Time : %d-%d-%d  , %d:%d:%d", time_stamp.year, time_stamp.month,
-                       time_stamp.day, time_stamp.hour, time_stamp.minute,
-                       time_stamp.second);
-       msg("Message : %s ", tpdu_deliver.user_data);
+       msg("From : %10s", orgAddr);
+       msg("Time : %d-%d-%d  , %d:%d:%d", SCTimeStamp.year, SCTimeStamp.month,
+                       SCTimeStamp.day, SCTimeStamp.hour, SCTimeStamp.minute,
+                       SCTimeStamp.second);
+       msg("Message : %s ", tpdu_deliver.userData);
        msg("*************************************");
 
-       g_free(tpdu_deliver.user_data);
-
        return dcs_pos;
 }
 
-static void __decode_sms_status_report_tpdu(unsigned int tpdu_len, char *tpdu)
+static int DecodeSmsStatusReportTpdu (int tpdu_len, char* pTPDU)
 {
-       TpduSmsStatusReport status_report;
-       TmDateTime time_stamp;
-       TmDateTime discharge_time;
-       unsigned int rcp_addr_len = 0;
-       char dialling_num[SMS_ADDRESS_LEN_MAX];
-       char rcp_addr[SMS_ADDRESS_LEN_MAX]; //recipient number
+       TPDU_SMS_STATUS_REPORT status_report;
+
+       TmDateTime SCTimeStamp;
+       TmDateTime DischargeTime;
+
+       int rcpAddr_len = 0;
+       char diallingNum[SMS_ADDRESS_LEN_MAX];
+
+       char rcpAddr[SMS_ADDRESS_LEN_MAX]; //recipient number
        int rcp_ton, rcp_npi;
        int position = 0;
        unsigned int mask;
 
        /* TP-MTI, TP MMS, TP SRQ, TP_UDHI */
-       status_report.msg_type = tpdu[position] & 0x03; // bit 0,1
-       status_report.mms = tpdu[position] & 0x04 ? TRUE : FALSE; // bit 2
-       status_report.srq = tpdu[position] & 0x20 ? TRUE : FALSE; //bit 5
-       status_report.udhi = tpdu[position] & 0x40 ? TRUE : FALSE;       //bit 6
+
+       status_report.msg_type = pTPDU[position] & 0x03; // bit 0,1
+       status_report.mms = pTPDU[position] & 0x04 ? TRUE : FALSE; // bit 2
+       status_report.srq = pTPDU[position] & 0x20 ? TRUE : FALSE; //bit 5
+       status_report.udhi = pTPDU[position] & 0x40 ? TRUE : FALSE;      //bit 6
 
        position++;
 
        /* TP-MR */
-       status_report.mr = tpdu[position];
+       status_report.mr = pTPDU[position];
        position++;
 
        /* TP-RA */
-       memset (dialling_num, 0, sizeof (dialling_num));
-       sms_util_decode_addr_field(dialling_num, &tpdu[position], &rcp_ton, &rcp_npi);
+
+       memset (diallingNum, 0, sizeof (diallingNum));
+
+       SmsUtilDecodeAddrField (diallingNum, &pTPDU[position], &rcp_ton, &rcp_npi);
+
        position += 2;
 
-       rcp_addr_len = strlen ((char*) dialling_num);
-       position += (rcp_addr_len + 1) / 2;
+       rcpAddr_len = strlen ((char*) diallingNum);
+       if (rcpAddr_len % 2)
+               position += rcpAddr_len / 2 + 1;
+       else
+               position += rcpAddr_len / 2;
 
        if (rcp_ton == SMS_TON_INTERNATIONAL) {
-               rcp_addr[0] = '+';
-               memcpy (&rcp_addr[1], dialling_num, rcp_addr_len);
-               rcp_addr[rcp_addr_len + 1] = '\0';
-       } else {
-               memcpy (rcp_addr, dialling_num, rcp_addr_len);
-               rcp_addr[rcp_addr_len] = '\0';
+               rcpAddr[0] = '+';
+               memcpy (&rcpAddr[1], diallingNum, rcpAddr_len);
+               rcpAddr[rcpAddr_len + 1] = '\0';
+       }
+       else {
+               memcpy (rcpAddr, diallingNum, rcpAddr_len);
+               rcpAddr[rcpAddr_len] = '\0';
        }
 
-       status_report.rcp_addr.dial_num_len = rcp_addr_len + 1;
-       memcpy (status_report.rcp_addr.dialling_num, rcp_addr, rcp_addr_len + 1);
-       status_report.rcp_addr.npi = rcp_npi;
-       status_report.rcp_addr.ton = rcp_ton;
+       status_report.rcpAddr.DialNumLen = rcpAddr_len;
+       memcpy (status_report.rcpAddr.szDiallingNum, rcpAddr, rcpAddr_len);
+       status_report.rcpAddr.Npi = rcp_npi;
+       status_report.rcpAddr.Ton = rcp_ton;
 
        /* TP-SCTS */
-       sms_util_decode_time_stamp(&tpdu[position], &time_stamp);
+       SmsUtilDecodeTimeStamp (&pTPDU[position], &SCTimeStamp);
        position += 7;
 
        /* TP-DT */
-       sms_util_decode_time_stamp (&tpdu[position], &discharge_time);
+       SmsUtilDecodeTimeStamp (&pTPDU[position], &DischargeTime);
        position += 7;
 
        /* TP-ST */
-       status_report.status = tpdu[position];
+       status_report.status = pTPDU[position];
        position++;
 
        /* TP-PI */
-       status_report.para_ind = tpdu[position];
+       status_report.paraInd = pTPDU[position];
 
-       mask = status_report.para_ind;
+       mask = status_report.paraInd;
 
        if ( (mask != 0xFF) && (mask != 0)) {
                /* Increment only if mask is valid */
@@ -436,31 +824,36 @@ static void __decode_sms_status_report_tpdu(unsigned int tpdu_len, char *tpdu)
 
                /* TP-PID */
                if (mask & 0x01) {
-                       status_report.pid = tpdu[position];
+                       status_report.pId = pTPDU[position];
                        position++;
                }
                /* TP-DCS */
                if (mask & 0x02) {
-                       sms_util_decode_dcs(&status_report.dcs, tpdu[position]);
+                       SmsUtilDecodeDCS (&status_report.dcs, pTPDU[position]);
                        position++;
                }
                if (mask & 0x04) {
                        /* TP-UDL */
-                       status_report.udl = tpdu[position];
+                       status_report.udl = pTPDU[position];
                        position++;
 
                        /* TP-UD */
-                       status_report.user_data = g_try_malloc0(TEL_SMS_SMDATA_SIZE_MAX + 1);
+
+                       status_report.userData = malloc (
+                                       sizeof(unsigned char) * (SMS_SMDATA_SIZE_MAX + 1));
+
+                       memset (status_report.userData, 0,
+                                       sizeof(unsigned char) * (SMS_SMDATA_SIZE_MAX + 1));
 
                        if (status_report.dcs.alphabet_type == SMS_ALPHABET_DEFAULT) {
-                               char in_data[TEL_SMS_SMDATA_SIZE_MAX + 1];
+                               char inData[SMS_SMDATA_SIZE_MAX + 1];
 
-                               memset (in_data, 0x00, TEL_SMS_SMDATA_SIZE_MAX + 1);
+                               memset (inData, 0x00, SMS_SMDATA_SIZE_MAX + 1);
 
-                               memcpy ((void*) in_data, (void*) &tpdu[position],
+                               memcpy ((void*) inData, (void*) &pTPDU[position],
                                                status_report.udl);
 
-                               sms_util_unpack_gsm_code (status_report.user_data, in_data,
+                               SmsUtilUnpackGSMCode (status_report.userData, inData,
                                                (unsigned char) status_report.udl);
                        }
 
@@ -470,77 +863,120 @@ static void __decode_sms_status_report_tpdu(unsigned int tpdu_len, char *tpdu)
        msg("*************************************");
        msg("Msg Type: STATUS_REPORT");
        if (status_report.mms) {
-               msg("MMS: No more messages are waiting for the MS in this SC");
-       } else {
-               msg("MMS: More messages are waiting for the MS in this SC");
+               msg("MMS: No more messages are waiting for the MS in this SC")
+       }
+       else if (!status_report.mms) {
+               msg("MMS: More messages are waiting for the MS in this SC")
        }
 
        if (status_report.srq) {
-               msg("SRQ: the result of an SMS COMMAND ");
-       } else {
-               msg("SRQ: the result of a SMS SUBMIT.");
+               msg("SRQ: the result of an SMS COMMAND ")
+       }
+       else if (!status_report.srq) {
+               msg("SRQ: the result of a SMS SUBMIT.")
        }
 
        if (status_report.udhi) {
-               msg("UDHI: Contains a Header in addition to the short message.");
-       } else {
-               msg("UDHI: Only Short Message");
+               msg("UDHI: Contains a Header in addition to the short message.")
+       }
+       else if (!status_report.udhi) {
+               msg("UDHI: Only Short Message")
        }
 
        msg("STATUS:%x", status_report.status);
        if (status_report.status == 0x00) {
-               msg("STATUS : Short message received by the SME");
-       } else if (status_report.status == 0x01) {
-               msg("STATUS : Short message forwarded by the SC to the SMEbut the SC is unable to confirm delivery");
-       } else {
-               msg("STATUS : Short message replaced by the SC");
+               msg("STATUS : Short message received by the SME")
+       }
+       else if (status_report.status == 0x01) {
+               msg(
+                               "STATUS : Short message forwarded by the SC to the SMEbut the SC is unable to confirm delivery")
+       }
+       else if (status_report.status == 0x02) {
+               msg("STATUS : Short message replaced by the SC")
        }
 
-       msg("Recipient Number : %s", rcp_addr);
-       msg("SC Time Stamp : %d-%d-%d  , %d:%d:%d", time_stamp.year,
-                       time_stamp.month, time_stamp.day, time_stamp.hour,
-                       time_stamp.minute, time_stamp.second);
-       msg("Discharge Time : %d-%d-%d  , %d:%d:%d", discharge_time.year,
-                       discharge_time.month, discharge_time.day, discharge_time.hour,
-                       discharge_time.minute, discharge_time.second);
+       msg("Recipient Number : %s", rcpAddr);
+       msg("SC Time Stamp : %d-%d-%d  , %d:%d:%d", SCTimeStamp.year,
+                       SCTimeStamp.month, SCTimeStamp.day, SCTimeStamp.hour,
+                       SCTimeStamp.minute, SCTimeStamp.second);
+       msg("Discharge Time : %d-%d-%d  , %d:%d:%d", DischargeTime.year,
+                       DischargeTime.month, DischargeTime.day, DischargeTime.hour,
+                       DischargeTime.minute, DischargeTime.second);
 
        if (mask & 0x04)
-               msg("Message : %s ", status_report.user_data);
+               msg("Message : %s ", status_report.userData);
 
        msg("*************************************");
-       g_free (status_report.user_data);
+
+       return 1;
 }
 
-/* Event Callbacks */
-static void on_noti_sms_incom_msg (TelHandle *handle, const char *noti_id,
-               void *data, void *user_data)
+static void __on_noti_3gpp_sms_incoming_msg
+(
+       TapiHandle *handle,
+       TelSmsDatapackageInfo_t *datapackage,
+       void *user_data
+)
 {
-       TelSmsDatapackageInfo *datapackage = NULL;
-       char *temp_tpdu;
-       unsigned int tpdu_len = 0;
+       int scaAddr_len = 0;
+       char * pTPDU;
+       int tpdu_len = 0;
+       unsigned char diallingNum[TAPI_NETTEXT_ADDRESS_LEN_MAX + 1] = { 0, };
+       unsigned char scaAddr[TAPI_NETTEXT_SCADDRESS_LEN_MAX + 2] = { 0, }; //service center address
+       int sca_ton, sca_npi;
+       int position;
+       int offset = 0;
+
        unsigned char MTI = 0;
        unsigned char MMS = 0;
        unsigned char SRI = 0;
        unsigned char UDHI = 0;
        unsigned char RP = 0;
-       int position = 0;
-       TelReturn return_status;
-       SmsCodingScheme dcs;
 
-       msgb("event(%s) received !!", TEL_NOTI_SMS_INCOM_MSG);
+       Sms_coding_scheme dcs;
+       TapiResult_t returnStatus;
+       int sca_length;
+       TelSmsDatapackageInfo_t * del_report = NULL;
 
-       if (data == NULL ) {
-               msg("TEL_NOTI_SMS_INCOM_MSG data is Null");
-               return;
+       position = 0;
+
+       msg("");
+       msgb("event(%s) receive !!", TAPI_NOTI_SMS_INCOM_MSG);
+
+       memset (diallingNum, 0, sizeof (diallingNum));
+
+       sca_length = datapackage->Sca[0];
+
+       sca_ton = (datapackage->Sca[offset +1] & 0x70) >> 4;
+       sca_npi = datapackage->Sca[offset +1] & 0x0F;
+
+       msg("TON %d", sca_ton);
+       msg("NPI %d", sca_npi);
+
+       /* Modem Send the hex encoded SCA Service center digits*/
+       scaAddr_len = _util_hexstring_to_asciistring(&datapackage->Sca[2], (unsigned char *) diallingNum, sca_length-1);
+
+       msg("SCA ascii length%d", scaAddr_len);
+       msg("SCA Number:[%s]", diallingNum);
+
+       if (scaAddr_len > TAPI_NETTEXT_SCADDRESS_LEN_MAX)
+               scaAddr_len = TAPI_NETTEXT_SCADDRESS_LEN_MAX;
+
+       if (sca_ton == SMS_TON_INTERNATIONAL) {
+               scaAddr[0] = '+';
+               memcpy (&scaAddr[1], diallingNum, scaAddr_len);
+       }
+       else {
+               memcpy (scaAddr, diallingNum, scaAddr_len);
        }
 
-       datapackage = (TelSmsDatapackageInfo *)data;
+       msg("Sc address in test app is %s", scaAddr);
 
-       RP = datapackage->tpdu[position] & 0x80;
-       UDHI = datapackage->tpdu[position] & 0x40;
-       SRI = datapackage->tpdu[position] & 0x20;
-       MMS = datapackage->tpdu[position] & 0x04;
-       MTI = datapackage->tpdu[position] & 0x03;
+       RP = datapackage->szData[position] & 0x80;
+       UDHI = datapackage->szData[position] & 0x40;
+       SRI = datapackage->szData[position] & 0x20;
+       MMS = datapackage->szData[position] & 0x04;
+       MTI = datapackage->szData[position] & 0x03;
 
        msg("RP [%x]", RP);
        msg("UDHI [%x]", UDHI);
@@ -548,756 +984,1211 @@ static void on_noti_sms_incom_msg (TelHandle *handle, const char *noti_id,
        msg("MMS [%x]", MMS);
        msg("MTI [%02x]", MTI);
 
-       tpdu_len = datapackage->tpdu_length;
-       temp_tpdu = malloc (sizeof(unsigned char) * tpdu_len);
-       memcpy (temp_tpdu, &datapackage->tpdu[position], tpdu_len);
+       tpdu_len = datapackage->MsgLength;
+
+       pTPDU = malloc (sizeof(unsigned char) * tpdu_len);
+
+       memcpy (pTPDU, &datapackage->szData[position], tpdu_len);
 
        if (MTI == SMS_TPDU_DELIVER) {
-               __decode_sms_deliver_tpdu (tpdu_len, (char *)temp_tpdu);
+               DecodeSmsDeliverTpdu (tpdu_len, pTPDU);
 
                msg("dcs_pos : %d", dcs_pos);
 
-               sms_util_decode_dcs(&dcs, datapackage->tpdu[position + dcs_pos]);
+               SmsUtilDecodeDCS (&dcs, datapackage->szData[position + dcs_pos]);
 
+               /* Simulating the behaviour of MSG_SERVICE:
+                 * Storing only the Class two sms
+                 *     @todo:refactoring
+                 */
+               if(dcs.class_type == SMS_CLASS_2)
                {
-                       TelSmsSimDataInfo wdata;
+                       TelSmsData_t WriteData;
+
+                       msg("dcs type is of class2");
 
-                       memset (&wdata, 0, sizeof(TelSmsSimDataInfo));
-                       memcpy (&(wdata.data.sca), &(datapackage->sca),
-                                       sizeof(TelSmsSca));
+                       memset (&WriteData, 0, sizeof(TelSmsData_t));
 
-                       wdata.data.tpdu_length = datapackage->tpdu_length;
-                       memcpy (wdata.data.tpdu, datapackage->tpdu, datapackage->tpdu_length);
+                       memcpy (WriteData.SmsData.Sca, datapackage->Sca, sca_length+1);
 
-                       wdata.status= TEL_SMS_STATUS_MT_READ;
+                       WriteData.SmsData.MsgLength = datapackage->MsgLength;
 
-                       return_status = tapi_sms_write_sms_in_sim (handle, &wdata,
-                                       on_resp_write_sms_in_sim, NULL );
-                       msg("return_status for tapi_sms_write_sms_in_sim(): [%d]", return_status);
+                       memcpy (WriteData.SmsData.szData, datapackage->szData, datapackage->MsgLength);
+
+                       WriteData.MsgStatus = TAPI_NETTEXT_STATUS_READ;
+
+                       returnStatus = tel_write_sms_in_sim (handle, &WriteData, on_resp_save_msg, NULL );
+
+                       msg("returnStatus for tel_write_sms_in_sim(): 0x%x", returnStatus);
                }
-       } else if (MTI == SMS_TPDU_STATUS_REPORT) {
-               __decode_sms_status_report_tpdu(tpdu_len, temp_tpdu);
-       }
 
-       TelSmsDeliverReportInfo *del_report = NULL;
+       }
+       else if (MTI == SMS_TPDU_STATUS_REPORT) {
+               DecodeSmsStatusReportTpdu (tpdu_len, pTPDU);
+       }
 
-       del_report = malloc (sizeof(TelSmsDeliverReportInfo));
+       del_report = malloc (sizeof(TelSmsDatapackageInfo_t));
 
-       memset (del_report, 0, sizeof(TelSmsDeliverReportInfo));
+       memset (del_report, 0, sizeof(TelSmsDatapackageInfo_t));
 
-       memcpy(&(del_report->data.sca), &(datapackage->sca), sizeof(TelSmsSca));
+       memcpy (del_report->Sca, datapackage->Sca, TAPI_SIM_SMSP_ADDRESS_LEN);
 
-       del_report->data.tpdu[0] = SMS_TPDU_DELIVER_REPORT;     //TP-UDHI[bit6] : 0
-       del_report->data.tpdu[1] = 0;// TP-PI = 0; bit2: TP-UDL bit1: TP-DCS bit0: TP-PID (No option field)
-       del_report->data.tpdu_length = 2;
-       del_report->report = TEL_SMS_DELIVERY_REPORT_SUCCESS;
+       del_report->szData[0] = SMS_TPDU_DELIVER_REPORT;        //TP-UDHI[bit6] : 0
+       del_report->szData[1] = 0;// TP-PI = 0; bit2: TP-UDL bit1: TP-DCS bit0: TP-PID (No option field)
+       del_report->MsgLength = 2;
+       del_report->format = TAPI_NETTEXT_NETTYPE_3GPP;
 
        msg("***receive message (Api:SendDeliverreport)****");
 
-       return_status = tapi_sms_send_deliver_report (handle, del_report, on_resp_sms_delivery_report, NULL );
-       msg("return_status for tapi_sms_send_deliver_report(): [%d]", return_status);
+       returnStatus = tel_send_sms_deliver_report (handle, del_report,
+                       TAPI_NETTEXT_SENDSMS_SUCCESS, on_resp_DeliverReport_msg, NULL );
+
+       msg("returnStatus for tel_send_sms_deliver_report(): 0x%x", returnStatus);
 
        free (del_report);
-       free (temp_tpdu);
+
+       free (pTPDU);
 }
 
-static void on_noti_sms_cb_incom_msg (TelHandle *handle, const char *noti_id,
-               void *data, void *user_data)
+static void __on_noti_3gpp2_sms_incoming_msg
+(
+       TapiHandle *handle,
+       TelSmsDatapackageInfo_t *datapackage,
+       void *user_data
+)
 {
-       TelSmsCbMsgInfo *cb_msg;
-       char pdu[TEL_SMS_CB_DATA_SIZE_MAX + 3] = {0, };
+       TelSmsDatapackageInfo_t del_report;
+       TapiResult_t returnStatus;
 
-       msg("");
-       msgb("event(%s) received !!", TEL_NOTI_SMS_CB_INCOM_MSG);
+       sms_util_decode_3gpp2(datapackage->MsgLength, datapackage->szData);
 
-       if (!data) {
-               msg("TEL_NOTI_SMS_CB_INCOM_MSG data is null");
-               return;
-       }
-       cb_msg = (TelSmsCbMsgInfo *)data;
+       memset(&del_report, 0x00, sizeof(del_report));
+       del_report.format = TAPI_NETTEXT_NETTYPE_3GPP2;
+       returnStatus = tel_send_sms_deliver_report (handle, &del_report,
+                       TAPI_NETTEXT_SENDSMS_SUCCESS, on_resp_DeliverReport_msg, NULL );
 
-       msg("cb_type[%d]", cb_msg->cb_type);
-       msg("cb_msg_length[%d]", cb_msg->length);
+       msg("returnStatus for tel_send_sms_deliver_report(): 0x%x", returnStatus);
+}
 
-       pdu[0] = cb_msg->cb_type;
-       pdu[1] = cb_msg->length;
-       memcpy(&(pdu[2]), cb_msg->cb_data, TEL_SMS_CB_DATA_SIZE_MAX + 1);
+static void on_noti_sms_incom_msg (TapiHandle *handle, const char *noti_id,
+               void *data, void *user_data)
+{
+       TelSmsDatapackageInfo_t *datapackage = data;
+       if (datapackage == NULL)
+               return;
 
-       __decode_cb_msg(cb_msg->length, pdu);
+       if (datapackage->format == TAPI_NETTEXT_NETTYPE_3GPP)
+               __on_noti_3gpp_sms_incoming_msg(handle, datapackage, user_data);
+       else if (datapackage->format == TAPI_NETTEXT_NETTYPE_3GPP2)
+               __on_noti_3gpp2_sms_incoming_msg(handle, datapackage, user_data);
+       else
+               msg("Invalid msg format: %d", datapackage->format);
 }
 
-static void on_noti_sms_etws_incom_msg (TelHandle *handle, const char *noti_id,
+static void on_noti_sms_cb_incom_msg (TapiHandle *handle, const char *noti_id,
                void *data, void *user_data)
 {
-       TelSmsEtwsMsgInfo *etws_msg;
-
-       msg("event [%s] received !!!", TEL_NOTI_SMS_ETWS_INCOM_MSG);
+       TelSmsCbMsg_t *cbMsg = data;
+       int length = 0;
+       char pPDU[SMS_CB_SIZE_MAX + 3] = { 0, };
 
-       if (!data) {
-               msg("TEL_NOTI_SMS_ETWS_INCOM_MSG data is null");
-               return;
-       }
+       msg("");
+       msgb("event(%s) receive !!", TAPI_NOTI_SMS_CB_INCOM_MSG);
 
-       etws_msg = (TelSmsEtwsMsgInfo *)data;
+       length = cbMsg->Length;
+       pPDU[0] = cbMsg->CbMsgType;
+       pPDU[1] = length;
+       memcpy (& (pPDU[2]), cbMsg->szMsgData, SMS_CB_SIZE_MAX + 1);
 
-       msg("etws_type[%d]", etws_msg->etws_type);
-       msg("etws_length[%d]", etws_msg->length);
-       /* TODO */
+       DecodeCellBroadcastMsg (length, pPDU);
 }
 
-static void on_noti_sms_memory_status (TelHandle *handle, const char *noti_id,
+static void on_noti_sms_etws_incom_msg (TapiHandle *handle, const char *noti_id,
                void *data, void *user_data)
 {
-       gboolean *mem_status;
-       msg("event [%s] received !!!", TEL_NOTI_SMS_SIM_MEMORY_STATUS);
+       TelSmsEtwsMsg_t *etwsMsg = data;
+       int length = 0;
+       char pPDU[TAPI_NETTEXT_ETWS_SIZE_MAX + 3] = { 0, };
 
-       if (!data) {
-               msg("TEL_NOTI_SMS_SIM_MEMORY_STATUS data is null");
-               return;
-       }
+       msg("");
+       msgb("event(%s) receive !!", TAPI_NOTI_SMS_ETWS_INCOM_MSG);
 
-       mem_status = (gboolean *)data;
-       msg("sms memory status[%s]", (*mem_status == TRUE) ? "Available" : "Not Available");
+       length = etwsMsg->Length;
+       pPDU[0] = etwsMsg->EtwsMsgType;
+       pPDU[1] = length;
+       memcpy (& (pPDU[2]), etwsMsg->szMsgData, TAPI_NETTEXT_ETWS_SIZE_MAX + 1);
 }
 
-static void on_noti_sms_init_status (TelHandle *handle, const char *noti_id,
+static void on_noti_sms_memory_status (TapiHandle *handle, const char *noti_id,
                void *data, void *user_data)
 {
-       gboolean *ready_status;
-
-       msg("event [%s] received !!!", TEL_NOTI_SMS_INIT_STATUS);
-
-       if (!data) {
-               msg("TEL_NOTI_SMS_INIT_STATUS data is null");
-               return;
-       }
+       int *memory_status = data;
 
-       ready_status = (gboolean *)data;
-       msg("[%s]", (*ready_status == TRUE) ? "Device Ready" : "Device Not Ready");
+       msg("");
+       msgb("event(%s) receive !!", TAPI_NOTI_SMS_MEMORY_STATUS);
+       msg(" - memory_status = 0x%x", *memory_status);
 }
 
-/* Requests and Responses */
-static void on_resp_write_sms_in_sim(TelHandle *handle, int result, void *data, void *user_data)
+static void on_noti_sms_ready_status (TapiHandle *handle, const char *noti_id,
+               void *data, void *user_data)
 {
-       unsigned int *index;
-       msg("tapi_sms_write_sms_in_sim() response received");
-       CHECK_SMS_RESULT(result);
+       int *device_ready = data;
 
-       if (!data) {
-               msg("data is null");
-               return;
+       msg("");
+       msgb("event(%s) receive !!", TAPI_NOTI_SMS_DEVICE_READY);
+       msg(" - device_ready = %d", *device_ready);
+
+       if (TAPI_NETTEXT_READY_STATUS_3GPP == *device_ready) {
+               msg("TAPI_NETTEXT_READY_STATUS_3GPP");
+       } else if (TAPI_NETTEXT_READY_STATUS_3GPP2 == *device_ready) {
+               msg("TAPI_NETTEXT_READY_STATUS_3GPP");
+       } else if (TAPI_NETTEXT_READY_STATUS_3GPP_AND_3GPP2 == *device_ready) {
+               msg("TAPI_NETTEXT_READY_STATUS_3GPP_AND_3GPP2");
+       } else {
+               msg("TAPI_NETTEXT_READY_STATUS_NONE")
        }
+}
 
-       index = (unsigned int *)data;
-       msg("index[%d]", *index);
+static void on_resp_send_msg (TapiHandle *handle, int result, void *data,
+               void *user_data)
+{
+       msg("");
+       msgb("tel_send_sms() response receive");
+       msg(" - result = 0x%x", result);
 }
 
-static void on_resp_sms_delivery_report(TelHandle *handle, int result, void *data, void *user_data)
+static void on_resp_send_cdma_msg (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       msg("tapi_sms_send_deliver_report() response received");
-       CHECK_SMS_RESULT(result);
+       msg("");
+       msgb("CDMA tel_send_sms() response received");
+       msg(" - result = 0x%x", result);
 }
 
-static int run_get_msg_sim_memory_status(MManager *mm, struct menu_data *menu)
+static void on_resp_read_msg (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       gboolean memory_full;
-       TelReturn rt = 0;
+       TelSmsData_t * sim_data;
+       int scaAddr_len = 0;
+       char * pTPDU;
+       int tpdu_len = 0;
+       char diallingNum[TAPI_NETTEXT_ADDRESS_LEN_MAX + 1] = { 0, };
+       char scaAddr[TAPI_NETTEXT_SCADDRESS_LEN_MAX + 2] = { 0, }; //service center address
+       int sca_ton, sca_npi;
+       int position;
 
-       msg("call tapi_sms_get_sim_memory_status()");
+       if (data == NULL ) {
+               msg("data is Null");
+               return;
+       }
 
-       rt = tapi_sms_get_sim_memory_status(handle, &memory_full);
-       CHECK_RT(rt);
+       sim_data = (TelSmsData_t *) data;
 
-       msg("SMS SIM memory status: [%s]", ((memory_full == TRUE) ? "FULL" : "NOT FULL"));
+       if (sim_data->MsgStatus == TAPI_NETTEXT_STATUS_UNREAD)
+               msg("Msg Staus : received unread msg")
+       else if (sim_data->MsgStatus == TAPI_NETTEXT_STATUS_READ)
+               msg("Msg Staus : received read msg")
+       else if (sim_data->MsgStatus == TAPI_NETTEXT_STATUS_UNSENT)
+               msg("Msg Staus : unsent msg")
+       else
+               msg("Msg Staus : [%d]", sim_data->MsgStatus)
 
-       return 0;
-}
+       msg("First Data [%x]", sim_data->SmsData.szData[0]);
+       msg("Second Data [%x]", sim_data->SmsData.szData[1]);
+       msg("Third Data [%x]", sim_data->SmsData.szData[2]);
+       msg("Fourth Data [%x]", sim_data->SmsData.szData[3]);
 
-static int run_get_init_status(MManager *mm, struct menu_data *menu)
-{
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       gboolean init_status;
-       TelReturn rt = 0;
+       position = 0;
+       // SCA_ADDR
+       memset (diallingNum, 0, sizeof (diallingNum));
+
+       SmsUtilDecodeAddrField (diallingNum, (char *) sim_data->SmsData.Sca,
+                       &sca_ton, &sca_npi);
+
+       position += 2;  //include Address-Length, Type of Address
+
+       scaAddr_len = strlen ((char *) diallingNum);
+       if (scaAddr_len > TAPI_NETTEXT_SCADDRESS_LEN_MAX - 1)
+               scaAddr_len = TAPI_NETTEXT_SCADDRESS_LEN_MAX - 1;
 
-       msg("call tapi_sms_get_init_status()");
+       if (scaAddr_len % 2)
+               position += scaAddr_len / 2 + 1;
+       else
+               position += scaAddr_len / 2;
+
+       if (sca_ton == SMS_TON_INTERNATIONAL) {
+               scaAddr[0] = '+';
+               memcpy (&scaAddr[1], diallingNum, scaAddr_len);
+       }
+       else {
+               memcpy (scaAddr, diallingNum, scaAddr_len);
+       }
 
-       rt = tapi_sms_get_init_status(handle, &init_status);
-       CHECK_RT(rt);
+       tpdu_len = sim_data->SmsData.MsgLength;
 
-       msg("init status: [%s]", ((init_status == TRUE) ? "INITIALIZED" : "NOT INITIALIZED"));
+       msg("SCA Number : %s tpdu_len is %d", scaAddr, tpdu_len);
 
-       return 0;
+       pTPDU = malloc (sizeof(unsigned char) * tpdu_len);
+       if (!pTPDU)
+               return;
+
+       msg("bfor memcopy position is %d", position);
+       memcpy (pTPDU, & (sim_data->SmsData.szData[0]), tpdu_len);
+       msg("after memcpy");
+
+       DecodeSmsDeliverTpdu (tpdu_len, pTPDU);
+
+       free (pTPDU);
 }
 
-static void on_set_msg_status(TelHandle *handle, int result, void *data, void *user_data)
+static void on_resp_save_msg (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       msg("tapi_sms_set_message_status() response received");
-       CHECK_SMS_RESULT(result);
+       int *local_index = data;
+
+       msg("");
+       msgb("tel_write_sms_in_sim() response receive");
+       msg(" - result = 0x%x", result);
+       msg(" - local_index = %d", *local_index);
 }
 
-static int run_set_msg_status(MManager *mm, struct menu_data *menu)
+static void on_resp_delete_msg (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelSmsStatusInfo sms_status_info;
-       TelReturn rt = 0;
+       int *local_index = data;
 
-       msg("call tapi_sms_set_message_status()");
+       msg("");
+       msgb("tel_delete_sms_in_sim() response receive");
+       msg(" - result = 0x%x", result);
+       msg(" - local_index = %d", *local_index);
+}
 
-       memset(&sms_status_info, 0, sizeof(TelSmsStatusInfo));
+static void on_resp_DeliverReport_msg (TapiHandle *handle, int result,
+               void *data, void *user_data)
+{
+       int *local_index = data;
 
-       sms_status_info.index = atoi(data_sms_index);
-       sms_status_info.status = atoi(data_sms_msg_status);
+       msg("");
+       msgb("tel_send_sms_deliver_report() response receive");
+       msg(" - result = 0x%x", result);
+       msg(" - local_index = %d", *local_index);
+}
 
-       msg("index[%d]", sms_status_info.index);
-       msg("msg status[%d]", sms_status_info.status);
+static void on_resp_set_sms_sca (TapiHandle *handle, int result, void *data,
+               void *user_data)
+{
+       msg("");
+       msgb("tel_set_sms_sca() response receive");
+       msg(" - result = 0x%x", result);
+}
+
+static void on_resp_set_sms_cb_config (TapiHandle *handle, int result,
+               void *data, void *user_data)
+{
+       msg("");
+       msgb("tel_set_sms_cb_config() response receive");
+       msg(" - result = 0x%x", result);
+}
 
-       rt = tapi_sms_set_message_status(handle, &sms_status_info, on_set_msg_status, NULL);
-       CHECK_RT(rt);
+static void on_resp_set_sms_params (TapiHandle *handle, int result, void *data,
+               void *user_data)
+{
+       msg("");
+       msgb("tel_set_sms_params() response receive");
+       msg(" - result = 0x%x", result);
+}
 
-       return 0;
+static void on_resp_set_mem_status (TapiHandle *handle, int result, void *data,
+               void *user_data)
+{
+       msg("");
+       msgb("tel_set_sms_mem_status() response receive");
+       msg(" - result = 0x%x", result);
 }
 
-static void on_set_memory_status(TelHandle *handle, int result, void *data, void *user_data)
+static void on_resp_get_sms_sca (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       msg("tapi_sms_set_memory_status() response received");
-       CHECK_SMS_RESULT(result);
+       TelSmsAddressInfo_t *scaInfo = data;
+       unsigned int i = 0;
+
+       msg("");
+       msgb("tel_get_sms_sca() response receive");
+       msg(" - result = 0x%x", result);
+       msg(" - TON = %d", scaInfo->Ton);
+       msg(" - NPI = %d", scaInfo->Npi);
+       msg(" - DialNumLen = %d", scaInfo->DialNumLen);
+       msg(" - SCA Num");
+
+       for (i = 0; i < scaInfo->DialNumLen; i++) {
+               msg("[%02x]", scaInfo->szDiallingNum[i]);
+               if (i % 10 == 9)
+                       msg("\n");
+       }
 }
 
-static int run_set_memory_status(MManager *mm, struct menu_data *menu)
+static void on_resp_get_cb_config (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       gboolean mem_status;
-       TelReturn rt = 0;
+       TelSmsCbConfig_t * CBConfig;
+       int i = 0;
 
-       msg("call tapi_sms_set_memory_status()");
+       if (data == NULL ) {
+               msg("pData is Null")
+               return;
+       }
 
-       mem_status = atoi(data_sms_memory_status);
-       msg("mem_status: [%s]", (mem_status == TRUE) ? "AVAILABLE" : "NOT AVAILABLE");
+       CBConfig = (TelSmsCbConfig_t *) data;
 
-       rt = tapi_sms_set_memory_status(handle, mem_status, on_set_memory_status, NULL);
-       CHECK_RT(rt);
+       msg("");
+       msgb("tel_get_sms_cb_config() response receive");
+       msg(" - result = 0x%x", result);
+
+       msg("=========CB Configuration=========");
+
+       /*** CB Enable/Diable ***/
+       if (CBConfig->CBEnabled == TRUE)
+               msg("Cell Broadcast Msg Enabled...")
+       else
+               msg("Cell Broadcast Msg Disabled...")
+
+       /*** CBMI  Count ***/
+       msg("CBMI Range Count: %d", CBConfig->MsgIdRangeCount);
+
+       /*** CBMI  List ***/
+       if (CBConfig->Net3gppType == 0x01) {
+               msg("Network type is 3gpp\n");
+               if (CBConfig->MsgIdRangeCount != 0) {
+                       msg("----- CBMI List -----");
+                       for (i = 0; i < CBConfig->MsgIdRangeCount; i++) {
+                               msg("From No.%d - [0x%04x]", i,
+                                       CBConfig->MsgIDs[i].Net3gpp.FromMsgId);
+                               msg("To No.%d - [0x%04x]", i, CBConfig->MsgIDs[i].Net3gpp.ToMsgId);
+                       }
+               }
+       } else if (CBConfig->Net3gppType == 0x02) {
+               msg("Network type is CDMA\n");
+               if (CBConfig->MsgIdRangeCount != 0) {
+                       msg("----- CBMI List -----");
+                       for (i = 0; i < CBConfig->MsgIdRangeCount; i++) {
+                               msg("No.%d Service Category - [0x%04x]", i, CBConfig->MsgIDs[i].Net3gpp2.CBCategory);
+                               msg("No.%d Language - [0x%02x]", i, CBConfig->MsgIDs[i].Net3gpp2.CBLanguage);
+                               msg("No.%d Selected - [0x%02x]", i, CBConfig->MsgIDs[i].Net3gpp2.Selected);
+                       }
+               }
+       }
 
-       return 0;
+       msg("==================================");
 }
 
-static void on_get_sca(TelHandle *handle, int result, void *data, void *user_data)
+static void on_resp_get_sms_parameters (TapiHandle *handle, int result,
+               void *data, void *user_data)
 {
-       TelSmsSca *sca;
-
-       msg("tapi_sms_get_sca() response received");
-       CHECK_SMS_RESULT(result);
+       TelSmsParams_t *smsp_param;
+       int i = 0;
 
-       if(!data) {
-               msg("get sca data is null");
+       if (data == NULL ) {
+               msg("data is Null")
                return;
        }
+       smsp_param = (TelSmsParams_t *) data;
+
+       msg("");
+       msgb("tel_get_sms_parameters() response receive");
+       msg(" - result = 0x%x", result);
+
+       msg("record index is 0x%x", smsp_param->RecordIndex);
+       msg("record len  is 0x%x", smsp_param->RecordLen);
+       msg("alpha_id len  is 0x%x ", (int )smsp_param->AlphaIdLen);
+       msg("alpha_id is %s ", smsp_param->szAlphaId);
+       msg("param indicator is  0x%x", smsp_param->ParamIndicator);
 
-       sca = (TelSmsSca *)data;
+       for (i = 0; i < (int) smsp_param->TpDestAddr.DialNumLen; i++)
+               msg("DestAddr = %d [%02x]", i, smsp_param->TpDestAddr.szDiallingNum[i]);
 
-       msg("sca_ton[%d]", sca->ton);
-       msg("sca_npi[%d]", sca->npi);
-       msg("sca_number[%s]", sca->number);
+       for (i = 0; i < (int) smsp_param->TpSvcCntrAddr.DialNumLen; i++)
+               msg("SCAddr = %d [%02x]", i, smsp_param->TpSvcCntrAddr.szDiallingNum[i]);
+
+       msg("pid 0x%x", smsp_param->TpProtocolId);
+       msg("dcs is 0x%x", smsp_param->TpDataCodingScheme);
+       msg("validity is 0x%x", smsp_param->TpValidityPeriod);
 }
 
-static int run_get_sca(MManager *mm, struct menu_data *menu)
+static void on_resp_get_paramcnt (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
+       int * RecordCount;
 
-       msg("call tapi_sms_get_sca()");
+       if (data == NULL ) {
+               msg("data is Null")
+               return;
+       }
 
-       rt = tapi_sms_get_sca(handle, on_get_sca, NULL);
-       CHECK_RT(rt);
+       RecordCount = (int *) data;
 
-       return 0;
+       msg("");
+       msgb("tel_get_sms_parameter_count() response receive");
+       msg(" - result = 0x%x", result);
+       msg(" - In param_count_noti the record count is %d", *RecordCount);
 }
 
-static void on_set_sca(TelHandle *handle, int result, void *data, void *user_data)
+static void on_resp_get_sms_count (TapiHandle *handle, int result, void *data,
+               void *user_data)
 {
-       msg("tapi_sms_set_sca() response received");
-       CHECK_SMS_RESULT(result);
-}
+       static TelSmsStoredMsgCountInfo_t *countInfo;
+       int loop_counter = 0;
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+
+       if (data == NULL ) {
+               msg("data is Null")
+               return;
+       }
+
+       countInfo = (TelSmsStoredMsgCountInfo_t*) data;
+
+       msg("");
+       msgb("tel_get_sms_count() response receive");
+       msg(" - result = 0x%x", result);
+
+       if (countInfo->UsedCount != 0x00)       //if used count is not zero
+                       {
+               msg("Index LIST..........");
+               for (loop_counter = 0; loop_counter < countInfo->UsedCount;
+                               loop_counter++) {
+                       msg("[%02x]", countInfo->IndexList[loop_counter]);
+                       returnStatus = tel_read_sms_in_sim (handle,
+                                       countInfo->IndexList[loop_counter], on_resp_read_msg,
+                                       NULL );
+                       msg("After read msg: returnstatus %d", returnStatus);
+               }
+               msg("In MsgCountNotification total cnt is %d, usedcnt is %dapi_err %d",
+                               countInfo->TotalCount, countInfo->UsedCount, returnStatus);
+       }
+
+       msg("In MsgCountNotification total cnt is %d, usedcnt is %d",
+                       countInfo->TotalCount, countInfo->UsedCount);
+
+}      //Madhavi
 
-static int run_set_sca(MManager *mm, struct menu_data *menu)
+static int SendMessage (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelSmsSca sca;
-       TelReturn rt = 0;
+       int ret;
+       int msg_len = 0;
+       char buf[SMS_ADDRESS_LEN_MAX];
+       char message[512];
+       char diallingNum[SMS_ADDRESS_LEN_MAX];
+       int diallingNum_len = 0;
+
+       memset (buf, 0, sizeof (buf));
+       memset (diallingNum, 0, sizeof (diallingNum));
+       diallingNum_len = 0;
 
-       msg("call tapi_sms_set_sca()");
+       msg("Enter destination Number: ");
 
-       memset(&sca, 0, sizeof(TelSmsSca));
+       ret = read (0, buf, sizeof (buf));
+       if (ret < 0) {
+               if (errno == EINTR)
+                       perror ("read(1)");
+               return -1;
+       }
+       else if (ret == 0)
+               return ret;
+
+       buf[SMS_ADDRESS_LEN_MAX - 1] = '\0';
+       diallingNum_len = strlen (diallingNum);
+       memcpy (&diallingNum[diallingNum_len], buf, strlen (buf));
+
+       diallingNum_len = strlen (diallingNum); //recalculate
+       msg("dialling num %s and dialling num len is %d", diallingNum,
+                       diallingNum_len);
+       diallingNum[diallingNum_len] = 0;
+       diallingNum_len = diallingNum_len - 1;
+
+       msg("Enter Message: ");
+       memset (message, 0, sizeof (message));
+
+       ret = read (0, message, sizeof (message) - 1);
+
+       if (ret <= 0) {
+               msg(" NULL msg can NOT be sent ");
+               return -1;
+       }
+       message[sizeof (message) - 1] = '\0';
 
-       sca.ton = atoi(data_sms_sca_ton);
-       sca.npi = atoi(data_sms_sca_npi);
-       g_strlcpy(sca.number, data_sms_sca_number, TEL_SMS_SCA_LEN_MAX + 1);
+       msg_len = strlen (message);
+       message[--msg_len] = 0;
 
-       msg("sca_ton[%d]", sca.ton);
-       msg("sca_npi[%d]", sca.npi);
-       msg("sca_number[%s]", sca.number);
+       msg("==========================");
+       msg("To :%s", diallingNum);
+       msg("Message: %sMsg Length:%d", message, msg_len);
+       msg("Dialling number Length : %d", diallingNum_len);
+       msg("==========================\n");
 
-       rt = tapi_sms_set_sca(handle, &sca, on_set_sca, NULL);
-       CHECK_RT(rt);
+       EncodeSmsSubmitTpdu (mm, diallingNum, diallingNum_len, message, msg_len);
+       return 1;
 
-       return 0;
 }
 
-static void on_get_parameters(TelHandle *handle, int result, void *data, void *user_data)
+static int SendMessageCDMA(MManager *mm, struct menu_data *menu)
 {
-       TelSmsParamsInfoList *param_list;
-       unsigned int i = 0;
+       int ret;
+       int msg_len = 0;
+       char buf[512] ;
+       char message[512];
+       char diallingNum[SMS_ADDRESS_LEN_MAX + 1] = { 0, };
+       int diallingNum_len = 0;
+
+       printf ("\n");
+       printf ("Enter destination Number:\n>> ");
+       fflush (stdout);
+
+       memset(buf, 0x0, sizeof(buf));
+       ret = read (0, buf, sizeof (buf));
+       if (ret < 0) {
+               if (errno == EINTR)
+                       perror ("read(1)");
+               return -1;
+       }
+       else if (ret == 0)
+               return ret;
 
-       msg("tapi_sms_get_parameters() response received");
-       CHECK_SMS_RESULT(result);
 
-       if (!data) {
-               msg("get parameters data is null");
-               return;
+       buf[strlen(buf)] = '\0';
+       memcpy (diallingNum, buf, strlen (buf)+1);
+       diallingNum_len = strlen (diallingNum);
+
+       printf ("dialling num [%s], dialling num len [%d]\n", diallingNum, diallingNum_len);
+       printf ("Enter Message\n>> ");
+       fflush (stdout);
+
+       memset(message, 0x0, sizeof(message));
+       ret = read (0, message, sizeof (message) - 1);
+       if (ret <= 0) {
+               printf (" NULL msg can NOT be sent \n");
+               return -1;
        }
+       message[strlen (message) - 1] = '\0';
 
-       param_list = (TelSmsParamsInfoList *)data;
+       msg_len = strlen (message);
 
-       msg("count[%d]", param_list->count);
+       printf ("===========================\n");
+       printf ("To: [%s] (len: %d)\n", diallingNum, diallingNum_len);
+       printf ("Message: [%s]\nMsg Length: [%d]\n", message, msg_len);
+       printf ("===========================\n\n");
 
-       for(i = 0; i < param_list->count; i++) {
-               msg("index[%d]", param_list->params[i].index);
-               msg("sca_ton[%d]", param_list->params[i].sca.ton);
-               msg("sca_npi[%d]", param_list->params[i].sca.npi);
-               msg("sca_number[%s]", param_list->params[i].sca.number);
-               msg("validity period[%d]", param_list->params[i].vp);
+       if (EncodeCdmaSmsSubmitTpdu (mm, diallingNum, diallingNum_len, message, msg_len) == FALSE) {
+               msg("EncodeCdmaSmsSubmitTpdu() failed.");
        }
+
+       return 1;
 }
 
-static int run_get_parameters(MManager *mm, struct menu_data *menu)
+static int ReadMessage (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int selectedNo;
+       int ret;
+       char buf[100];
+       int returnStatus = 0;
 
-       msg("call tapi_sms_get_parameters()");
+       memset (buf, 0, sizeof (buf));
 
-       rt = tapi_sms_get_parameters(handle, on_get_parameters, NULL);
-       CHECK_RT(rt);
+       msg("*************************************");
+       msg("1. SIM Message/RUIM Message");
 
-       return 0;
-}
+       msg("Select Number:");
 
-static void on_set_parameters(TelHandle *handle, int result, void *data, void *user_data)
-{
-       msg("tapi_sms_set_parameters() response received");
-       CHECK_SMS_RESULT(result);
+       ret = read (0, buf, sizeof (buf));
+
+       if (ret < 0) {
+               if (errno == EINTR)
+                       perror ("read(1)");
+               return -1;
+       }
+       else if (ret == 0)
+               return ret;
+
+       selectedNo = atoi (buf);
+       msg("Selected Num in read message(value is 1) is %d ", selectedNo);
+       switch (selectedNo) {
+               case 1:
+                       msg("***Reading the message in SIM***");
+                       returnStatus = tel_get_sms_count (handle, on_resp_get_sms_count, NULL );
+                       msg("tel_get_sms_count():  0x%x", returnStatus);
+
+                       break;
+               default:
+                       msg("Not supported Menu(%d) !!!", selectedNo);
+                       break;
+       }
+
+       return 1;
 }
 
-static int run_set_parameters(MManager *mm, struct menu_data *menu)
+static int DeleteMessage (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelSmsParamsInfo params;
-       TelReturn rt = 0;
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
 
-       msg("call tapi_sms_set_parameters()");
+       int ret, selected_num, index;
+       char buf[100];
 
-       memset(&params, 0, sizeof(TelSmsParamsInfo));
+       TapiResult_t returnStatus;
 
-       params.index = atoi(data_sms_set_params_index);
-       params.sca.ton = atoi(data_sms_sca_ton);
-       params.sca.npi = atoi(data_sms_sca_npi);
-       g_strlcpy(params.sca.number, data_sms_sca_number, TEL_SMS_SCA_LEN_MAX+1);
-       params.vp = atoi(data_sms_set_params_vp);
+       memset (buf, 0, sizeof (buf));
 
-       msg("index[%d]", params.index);
-       msg("sca_ton[%d]", params.sca.ton);
-       msg("sca_npi[%d]", params.sca.npi);
-       msg("sca_num[%s]", params.sca.number);
-       msg("validity period[%d]", params.vp);
+       msg("***Deleting the message(Api:DeleteMsg,GetMsgCount)***");
 
-       rt = tapi_sms_set_parameters(handle, &params, on_set_parameters, NULL);
-       CHECK_RT(rt);
+       msg("Select Number:");
+       msg("1. Delete message at a particular index");
+       msg("2. Delete all messages");
 
-       return 0;
-}
+       msg("Select Number:");
 
-static void on_get_cb_config(TelHandle *handle, int result, void *data, void *user_data)
-{
-       TelSmsCbConfigInfo *config;
-       unsigned int i = 0;
+       ret = read (0, buf, sizeof (buf));
 
-       msg("tapi_sms_get_cb_config() response received");
-       CHECK_SMS_RESULT(result);
+       selected_num = atoi (buf);
+       switch(selected_num) {
+               case 1:
+               {
+                       msg("Enter delete index >>");
+                       ret = read (0, buf, sizeof (buf));
+                       if (ret < 0) {
+                               if (errno == EINTR)
+                                       perror ("read(1)");
+                               return -1;
+                       }
+                       else if (ret == 0)
+                               return ret;
+                       index = atoi (buf);
+                       break;
+               }
+               case 2:
+               {
+                       index = -1;
+                       break;
+               }
+               default:
+                       msg("Invalid Number Selected");
+                       return -1;
+               }
+       msg("index value :%d", index);
 
-       if (!data) {
-               msg("get cb config data is null");
-               return;
-       }
+       returnStatus = tel_delete_sms_in_sim (handle, index, on_resp_delete_msg, NULL );
+       msg("returnstatus  tel_delete_sms_in_sim()  is for delete%d ", returnStatus);
 
-       config = (TelSmsCbConfigInfo *)data;
+       msg("Getting SMS Count after Deleting SMS");
+       returnStatus = tel_get_sms_count (handle, on_resp_get_sms_count, NULL );
+       msg("returnStatus for tel_get_sms_count()  %d", returnStatus);
 
-       msg("ebabled[%s]", (config->cb_enabled) ? "cb enabled" : "cb disabled");
-       msg("msg_id range count[%d]", config->msg_id_range_cnt);
+       return 1;
 
-       for(i = 0; i < config->msg_id_range_cnt; i++)
-               msg("[%d].from msg_id[%d] to msg_id[%d] selected[%s]", i+1,
-               config->msg_ids[i].from_msg_id, config->msg_ids[i].to_msg_id,
-               (config->msg_ids[i].selected) ? "YES" : "NO");
 }
 
-static int run_get_cb_config(MManager *mm, struct menu_data *menu)
+static int CdmaGetting (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int selectedNo;
+       int returnStatus = 0;
+       int ready_status = 0;
+
+       selectedNo = atoi (menu->key);
+       switch (selectedNo) {
+               case 1:
+                       msg("***Getting the CB Configuration(Api: GetCBConfig)***");
+                       returnStatus = tel_get_sms_cb_config (handle, on_resp_get_cb_config, NULL );
+                       msg("ReturnStatus[%d] ", returnStatus);
+
+                       break;
+               case 3:
+                       msg("***Getting the SmsCount(Api:GetSmsCount)***");
+                       returnStatus = tel_get_sms_count (handle, on_resp_get_sms_count, NULL );
+                       msg("ReturnStatus[%d]", returnStatus);
+
+                       break;
+               case 4:
+                       msg("***Getting the Sms Ready status(Api:Check_sms_device_status)***");
+                       returnStatus = tel_check_sms_device_status (handle, &ready_status);
+                       msg("API ReturnStatus[%d]", returnStatus);
+                       msg("Ready status = %d", ready_status);
+                       if (TAPI_NETTEXT_READY_STATUS_3GPP == ready_status) {
+                               msg("TAPI_NETTEXT_READY_STATUS_3GPP");
+                       } else if (TAPI_NETTEXT_READY_STATUS_3GPP2 == ready_status) {
+                               msg("TAPI_NETTEXT_READY_STATUS_3GPP");
+                       } else if (TAPI_NETTEXT_READY_STATUS_3GPP_AND_3GPP2 == ready_status) {
+                               msg("TAPI_NETTEXT_READY_STATUS_3GPP_AND_3GPP2");
+                       } else {
+                               msg("TAPI_NETTEXT_READY_STATUS_NONE")
+                       }
+                       break;
+               default:
+                       return -1;
+
+       }
 
-       msg("call tapi_sms_get_cb_config()");
+       return 1;
+}
 
-       rt = tapi_sms_get_cb_config(handle, on_get_cb_config, NULL);
-       CHECK_RT(rt);
+static int Getting (MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       int selectedNo;
+       int returnStatus = 0;
+       int ready_status = 0;
+
+       selectedNo = atoi (menu->key);
+
+       switch (selectedNo) {
+               case 1:
+                       msg("***Getting the SCA(Api: GetSCA)****");
+                       returnStatus = tel_get_sms_sca (handle, 0, on_resp_get_sms_sca, NULL );
+                       msg("returnstatus for tel_get_sms_sca(): 0x %x", returnStatus);
+
+                       break;
+
+               case 2:
+                       msg("***Getting the CB Configuration(Api: GetCBConfig)***");
+                       returnStatus = tel_get_sms_cb_config (handle, on_resp_get_cb_config, NULL );
+                       msg("ReturnStatus[%d] ", returnStatus);
+
+                       break;
+
+               case 3:
+                       msg("****Getting the parameter(Api:GetParameter)****");
+                       returnStatus = tel_get_sms_parameters (handle, 0, on_resp_get_sms_parameters, NULL );
+                       msg("ReturnStatus[%d]]", returnStatus);
+
+                       break;
+
+                       break;
+
+               case 5:
+                       msg("***Getting the parameterCount(Api:GetParameterCount)***");
+                       returnStatus = tel_get_sms_parameter_count (handle, on_resp_get_paramcnt, NULL );
+                       msg("ReturnStatus[%d]", returnStatus);
+
+                       break;
+
+               case 6:
+                       msg("***Getting the SmsCount(Api:GetSmsCount)***");
+                       returnStatus = tel_get_sms_count (handle, on_resp_get_sms_count, NULL );
+                       msg("ReturnStatus[%d]", returnStatus);
+
+                       break;
+
+               case 7:
+                       msg("***Getting the Sms Ready status(Api:Check_sms_device_status)***");
+                       returnStatus = tel_check_sms_device_status (handle, &ready_status);
+                       msg("ReturnStatus[%d]", returnStatus);
+                       msg("Ready status = %d", ready_status);
+                       if (TAPI_NETTEXT_READY_STATUS_3GPP == ready_status) {
+                               msg("TAPI_NETTEXT_READY_STATUS_3GPP");
+                       } else if (TAPI_NETTEXT_READY_STATUS_3GPP2 == ready_status) {
+                               msg("TAPI_NETTEXT_READY_STATUS_3GPP");
+                       } else if (TAPI_NETTEXT_READY_STATUS_3GPP_AND_3GPP2 == ready_status) {
+                               msg("TAPI_NETTEXT_READY_STATUS_3GPP_AND_3GPP2");
+                       } else {
+                               msg("TAPI_NETTEXT_READY_STATUS_NONE")
+                       }
+                       break;
+               default:
+                       return -1;
 
-       return 0;
+       }
+
+       return 1;
 }
 
-static void on_set_cb_config(TelHandle *handle, int result, void *data, void *user_data)
+static int _get_int()
 {
-       msg("tapi_sms_set_cb_config() response received");
-       CHECK_SMS_RESULT(result);
+       char buf[255];
+       int ret;
+
+       memset (buf, 0, 255);
+       ret = read (0, buf, 254);
+       if (ret <= 0)
+               return 0;
+
+       return atoi(buf);
 }
 
-static int run_set_cb_config(MManager *mm, struct menu_data *menu)
+static int CdmaSetting (MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelSmsCbConfigInfo cb_config;
-       TelReturn rt = 0;
-       int ret = 0;
-       unsigned int i = 0;
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
 
-       msg("call tapi_sms_set_cb_config()");
+       int settingMenu;
+       int ret;
 
-       memset(&cb_config, 0, sizeof(TelSmsCbConfigInfo));
+       char MemoryStatus[255] = { 0, }; //2006/8/8
 
-       cb_config.cb_enabled = atoi(data_sms_set_cb_status);
-       cb_config.msg_id_range_cnt = atoi(data_sms_set_cb_msg_id_rng_cnt);
+       TapiResult_t returnStatus;
 
-       for(i = 0; i < cb_config.msg_id_range_cnt; i++) {
-               msg("[%d].Enter from_msg_id", i+1);
-               ret = read(0, data_sms_set_cb_from_msg_id, sizeof(data_sms_set_cb_from_msg_id));
-               if (ret <= 0) {
-                       msg("read 'from_msg_id' returned error: [%d]", ret);
-                       return -1;
-               }
-               cb_config.msg_ids[i].from_msg_id = atoi(data_sms_set_cb_from_msg_id);
+       settingMenu = atoi (menu->key);
 
-               msg("[%d].Enter to_msg_id", i+1);
-               ret = read(0, data_sms_set_cb_to_msg_id, sizeof(data_sms_set_cb_to_msg_id));
-               if (ret <= 0) {
-                       msg("read 'to_msg_id' returned error: [%d]", ret);
-                       return -1;
+       switch (settingMenu) {
+               case 2: //Set CB Enable/Disable
+               {
+                       msg("****Setting the CB configuration(Api:SetCbConfig)****");
+                       CdmaCbSetting (mm, menu);
+
+                       break;
                }
-               cb_config.msg_ids[i].to_msg_id = atoi(data_sms_set_cb_to_msg_id);
+               case 3: //Set Memory Full Notification
+               {
+                       msg("Enter Memory Status to be set(1:Memory Available, 2:Memory Full)");
+                       memset (MemoryStatus, 0, sizeof (MemoryStatus));
+                       ret = read (0, MemoryStatus, sizeof (MemoryStatus));
+                       if (ret <= 0) {
+                               msg(" NULL msg can NOT be sent ");
+                               return -1;
+                       }
+                       msg("Memory Status type is %d ", atoi (MemoryStatus));
+                       returnStatus = tel_set_sms_memory_status (handle,
+                                       atoi (MemoryStatus), on_resp_set_mem_status, NULL ); //Set to full 0x02-Full, 0x01-available
+                       msg("api err after memstatus set is is %d", returnStatus);
 
-               msg("[%d].Enter msg_id selected", i+1);
-               ret = read(0, data_sms_set_cb_msg_id_selected, sizeof(data_sms_set_cb_msg_id_selected));
-               if (ret <= 0) {
-                       msg("read 'selected' returned error: [%d]", ret);
-                       return -1;
+                       break;
+               }
+               case 4: //Set Stored MsgStaus
+               {
+                       msg("Not suppored in this Test App !!!");
+                       break;
                }
-               cb_config.msg_ids[i].selected = atoi(data_sms_set_cb_msg_id_selected);
+               default:
+                       return -1;
        }
+       return 1;
+}
 
-       msg("cb_status[%s]", (cb_config.cb_enabled) ? "cb enabled" : "cb disabled");
-       msg("msg_id range count[%d]", cb_config.msg_id_range_cnt);
+static int Setting (MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
 
-       for(i = 0; i < cb_config.msg_id_range_cnt; i++)
-               msg("[%d].from msg_id[%d] to msg_id[%d] selected[%s]", i+1,
-               cb_config.msg_ids[i].from_msg_id, cb_config.msg_ids[i].to_msg_id,
-               (cb_config.msg_ids[i].selected) ? "YES" : "NO");
+       int settingMenu;
+       int ret;
+       int i;
 
-       rt = tapi_sms_set_cb_config(handle, &cb_config, on_set_cb_config, NULL);
-       CHECK_RT(rt);
+       char MemoryStatus[255] = { 0, }; //2006/8/8
 
-       return 0;
-}
+       TelSmsCbConfig_t *pCBConfig;
 
-static void on_get_msg_count(TelHandle *handle, int result, void *data, void *user_data)
-{
-       TelSmsStoredMsgCountInfo *sms_count_info;
-       unsigned int i = 0;
+       TelSmsParams_t smsParameters = { 0, };
+       TapiResult_t returnStatus;
 
-       msg("tapi_sms_get_count() response received");
-       CHECK_SMS_RESULT(result);
+       settingMenu = atoi (menu->key);
 
-       if (!data) {
-               msg("get msg count data is null");
-               return;
-       }
+       switch (settingMenu) {
+               case 1:  //Set Service Center Number
+               {
+                       TelSmsAddressInfo_t sca = {0, };
+                       unsigned char sca_num[TAPI_SIM_SMSP_ADDRESS_LEN + 1];
+                       unsigned int sca_length = 0;
+                       unsigned int additional_len = 0;
+                       unsigned local_index, j;
+
+                       msg("*** Setting SCA (API: tel_set_sms_sca()) ****");
+
+                       RETRY:
+                       msg("Enter the SCA NUMBER:");
+                       ret = scanf("%s", sca_num);
+                       if (ret > TAPI_SIM_SMSP_ADDRESS_LEN) {
+                               msg("Entered SCA is INVALID - SCA length cannot be greater than %d", TAPI_SIM_SMSP_ADDRESS_LEN);
+                               goto RETRY;
+                       }
+                       sca.Npi = TAPI_SIM_NPI_ISDN_TEL;
+                       sca.Ton = TAPI_SIM_TON_UNKNOWN;
+                       if (sca_num[0] == '+') {
+                               sca.Ton = TAPI_SIM_TON_INTERNATIONAL;
+                               additional_len = 1;
+                       }
+                       sca_length = strlen((char *)sca_num) - additional_len;
+                       msg("Sca Length:[%d]", sca_length);
+
+                       if (sca_length % 2 == 0) {
+                               for (local_index = additional_len, j = 0; local_index < sca_length; local_index += 2, j++)
+                                       sca.szDiallingNum[j] = ((sca_num[local_index+1] & 0X0F) << 4) | (sca_num[local_index] & 0x0F);
+                               sca.szDiallingNum[(sca_length/2)] = '\0';
+                               sca.DialNumLen = (sca_length/2);
+                       } else {
+                               for (local_index = additional_len, j = 0; local_index < sca_length+1; local_index += 2, j++) {
+                                       if (local_index == (sca_length - 1))
+                                               sca.szDiallingNum[j] = ((0xF0) | (sca_num[local_index] & 0x0F));
+                                       else
+                                               sca.szDiallingNum[j] = ((sca_num[local_index+1] & 0X0F) << 4) | (sca_num[local_index] & 0x0F);
+                               }
+                               sca.szDiallingNum[(sca_length/2)] = sca.szDiallingNum[(sca_length/2)] | 0xF0;
+                               sca.DialNumLen = (sca_length/2)+1;
+                       }
+                       msg("%d", sca.DialNumLen);
+                       returnStatus = tel_set_sms_sca (handle, &sca, 0, on_resp_set_sms_sca, NULL);
+                       msg("Return status: [%d]", returnStatus);
+               break;
+               }
 
-       sms_count_info = (TelSmsStoredMsgCountInfo *)data;
+               case 3: //Set Deliver Report
+               {
+                       msg("****Setting  Deliver Report(Api:SetDeliverReport)****");
+                       //EncodeSmsDeliverReportTpdu();
+                       break;
+               }
 
-       msg("total count[%d]", sms_count_info->total_count);
-       msg("used count [%d]", sms_count_info->used_count);
+               case 4: //Set CB Enable/Disable
+               {
+                       msg("****Setting the CB configuration(Api:SetCbConfig)****");
 
-       msg("Index List :");
-       for(i = 0; i < sms_count_info->used_count; i++)
-               msg("[%d]", sms_count_info->index_list[i]);
+                       pCBConfig = calloc (1, sizeof(TelSmsCbConfig_t));
+                       if (!pCBConfig)
+                               return -1;
 
-}
+                       msg("Enter CB ON/OFF (1: Enable, 0:Disable): ");
+                       pCBConfig->CBEnabled = _get_int();
 
-static int run_get_msg_count(MManager *mm, struct menu_data *menu)
-{
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn rt = 0;
+                       msg("Enter Max ID Count: ");
+                       pCBConfig->MsgIdMaxCount = _get_int();
 
-       msg("call tapi_sms_get_count()");
+                       msg("Enter MsgIdRangeCount ( < 10 ): ");
+                       pCBConfig->MsgIdRangeCount = _get_int();
 
-       rt = tapi_sms_get_count(handle, on_get_msg_count, NULL);
-       CHECK_RT(rt);
+                       if (pCBConfig->MsgIdRangeCount <= 0
+                                       || pCBConfig->MsgIdRangeCount >= TAPI_NETTEXT_SMS_CBMI_LIST_SIZE_MAX) {
+                               msg("Bad Range value");
+                               free (pCBConfig);
+                               return -1;
+                       }
 
-       return 0;
-}
+                       for (i = 0; i < pCBConfig->MsgIdRangeCount; i++) {
+                               msg("Enter %d FromMsgId : ", i + 1);
+                               pCBConfig->MsgIDs[i].Net3gpp.FromMsgId = _get_int();
 
-static void on_delete_sms(TelHandle *handle, int result, void *data, void *user_data)
-{
-       msg("tapi_sms_delete_in_sim() response received");
-       CHECK_SMS_RESULT(result);
-}
+                               msg("Enter %d ToMsgId : ", i + 1);
+                               pCBConfig->MsgIDs[i].Net3gpp.ToMsgId = _get_int();
 
-static int run_delete_sms(MManager *mm, struct menu_data *menu)
-{
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       unsigned int index;
-       TelReturn rt = 0;
+                               msg("Enter %d Selected : ", i + 1);
+                               pCBConfig->MsgIDs[i].Net3gpp.Selected = _get_int();
+                       }
 
-       msg("call tapi_sms_delete_sms_in_sim()");
+                       pCBConfig->Net3gppType = 0x01;
 
-       index = atoi(data_sms_index);
-       msg("index[%d]", index);
+                       msg(
+                                       "from sms test setting the cb configuration:CBEnabled:%d,Net3gppType:%d,msgIdRangeCount:%d,From: %d\t To: %d\t Selected: %d",
+                                       pCBConfig->CBEnabled, pCBConfig->Net3gppType,
+                                       pCBConfig->MsgIdRangeCount,
+                                       pCBConfig->MsgIDs[0].Net3gpp.FromMsgId,
+                                       pCBConfig->MsgIDs[0].Net3gpp.ToMsgId,
+                                       pCBConfig->MsgIDs[0].Net3gpp.Selected);
 
-       rt = tapi_sms_delete_sms_in_sim(handle, index, on_delete_sms, NULL);
-       CHECK_RT(rt);
+                       returnStatus = tel_set_sms_cb_config (handle, pCBConfig,
+                                       on_resp_set_sms_cb_config, NULL );
+                       msg("returnStatus after cbconfig set is is [%d]", returnStatus);
 
-       return 0;
-}
+                       free (pCBConfig);
 
-static void on_read_msg_in_sim(TelHandle *handle, int result, void *data, void *user_data)
-{
-       TelSmsSimDataInfo *read_sms_data;
+                       break;
+               }
+               case 5: {
+                       unsigned int sca_length;
+                       unsigned char sca_num[TAPI_SIM_SMSP_ADDRESS_LEN + 1];
+                       const char* name = "AlphaID";
 
-       msg("tapi_sms_read_sms_in_sim() response received");
-       CHECK_SMS_RESULT(result);
+                       smsParameters.RecordIndex = 0x00;
 
-       if (!data) {
-               msg("read sms in sim data is null");
-               return;
-       }
+                       /* Alpha Id */
+                       smsParameters.AlphaIdLen = strlen(name);
+                       memcpy(&smsParameters.szAlphaId, name, strlen(name));
 
-       read_sms_data = (TelSmsSimDataInfo *)data;
+                       /* Param Indicator*/
+                       smsParameters.ParamIndicator = 0xe1;
 
-       msg("status[%d]", read_sms_data->status);
-       msg("sca_ton[%d]", read_sms_data->data.sca.ton);
-       msg("sca_npi[%d]", read_sms_data->data.sca.npi);
-       msg("sca_number[%s]", read_sms_data->data.sca.number);
+                       /* Destination Number */
+                       memset(&smsParameters.TpDestAddr, 0x0, sizeof(TelSmsAddressInfo_t));
 
-       __decode_sms_deliver_tpdu(read_sms_data->data.tpdu_length, (char *)read_sms_data->data.tpdu);
-}
+                       smsParameters.TpProtocolId = 3;/* PID */
+                       smsParameters.TpDataCodingScheme = 2;/* DCS */
+                       smsParameters.TpValidityPeriod = 1;/* VP */
 
-static int run_read_msg_in_sim(MManager *mm, struct menu_data *menu)
-{
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       unsigned int index;
-       TelReturn rt = 0;
+                       do {
+                               msg("Enter the SCA NUMBER:");
+                               ret = scanf("%s", sca_num);
+                               if (ret > TAPI_SIM_SMSP_ADDRESS_LEN)
+                                       msg("Entered SCA is INVALID - SCA length cannot be greater than %d", TAPI_SIM_SMSP_ADDRESS_LEN);
+                       } while(ret > TAPI_SIM_SMSP_ADDRESS_LEN);
 
-       msg("call tapi_sms_read_sms_in_sim()");
+                       sca_length = SmsUtilEncodeSca(&(smsParameters.TpSvcCntrAddr), sca_num);
+                       msg("Encoded SCA Address Length[%d]", sca_length);
 
-       index = atoi(data_sms_index);
-       msg("index[%d]", index);
+                       returnStatus = tel_set_sms_parameters (handle, &smsParameters, on_resp_set_sms_params, NULL );
+                       msg("returnstatus after sparam set  is %d", returnStatus);
 
-       rt = tapi_sms_read_sms_in_sim(handle, index, on_read_msg_in_sim, NULL);
-       CHECK_RT(rt);
+                       break;
+               }
+               case 6: //Set Memory Full Notification
+               {
+                       msg(
+                                       "Enter Memory Status to be set(1:Memory Available, 2:Memory Full)");
+                       memset (MemoryStatus, 0, sizeof (MemoryStatus));
+                       ret = read (0, MemoryStatus, sizeof (MemoryStatus));
+                       if (ret <= 0) {
+                               msg(" NULL msg can NOT be sent ");
+                               return -1;
+                       }
+                       msg("Memory Status type is %d ", atoi (MemoryStatus));
+                       returnStatus = tel_set_sms_memory_status (handle,
+                                       atoi (MemoryStatus), on_resp_set_mem_status, NULL ); //Set to full 0x02-Full, 0x01-available
+                       msg("api err after memstatus set is is %d", returnStatus);
 
-       return 0;
+                       break;
+               }
+               case 7: //Set Stored MsgStaus
+               {
+                       msg("Not suppored in this Test App !!!");
+                       break;
+               }
+               case 8: {
+// JYGU                                returnStatus =tel_set_sms_device_status();
+                       msg("Not suppored in this Test App !!!");
+                       break;
+               }
+               case 9: {
+                       msg("Not suppored in this Test App !!!");
+                       break;
+               }
+               default:
+                       return -1;
+       }
+       return 1;
 }
 
-static void on_send_sms(TelHandle *handle, int result, void *data, void *user_data)
+static int CdmaCbSetting (MManager *mm, struct menu_data *menu)
 {
-       msg("tapi_sms_send() response received");
-       CHECK_SMS_RESULT(result);
-}
+       TapiHandle *handle = menu_manager_ref_user_data (mm);
+       TelSmsCbConfig_t *cb_config;
+       int i;
+       int return_status = 0;
 
-static int run_send_sms(MManager *mm, struct menu_data *menu)
-{
-       TelSmsSendInfo send_sms_info;
-       char dialling_num[SMS_ADDRESS_LEN_MAX + 1];
-       char message[512];
-       unsigned int dial_num_len = 0, msg_len = 0;
+       msg("****Setting the CB configuration(Api:SetCbConfig)****");
 
-       msg("call tapi_sms_send()");
+       cb_config = calloc (1, sizeof(TelSmsCbConfig_t));
+       if (!cb_config)
+               return -1;
 
-       memset(&send_sms_info, 0, sizeof(TelSmsSendInfo));
+       msg("Enter CB ON/OFF (1: Enable, 0:Disable): ");
+       cb_config->CBEnabled = _get_int();
 
-       send_sms_info.more_msgs = atoi(data_sms_send_more_msgs);
-       msg("more msgs: [%s]", (send_sms_info.more_msgs == TRUE)? "Yes" : "No");
+       msg("Enter Max ID Count: ");
+       cb_config->MsgIdMaxCount = _get_int();
 
-       /* sca */
-       send_sms_info.send_data.sca.ton = atoi(data_sms_sca_ton);
-       send_sms_info.send_data.sca.npi = atoi(data_sms_sca_npi);
-       if (g_strlcpy(send_sms_info.send_data.sca.number, data_sms_sca_number,
-                       TEL_SMS_SCA_LEN_MAX + 1) > TEL_SMS_SCA_LEN_MAX) {
-               msg("Invalid sca number length entered");
-               return 0;
+       msg("Enter MsgIdRangeCount ( < 10 ): ");
+       cb_config->MsgIdRangeCount = _get_int();
+
+       if (cb_config->MsgIdRangeCount <= 0 || cb_config->MsgIdRangeCount >= TAPI_NETTEXT_SMS_CBMI_LIST_SIZE_MAX) {
+               msg("Bad Range value");
+               free (cb_config);
+               return -1;
        }
-       msg("sca_ton[%d] sca_npi[%d] sca_num[%s]", send_sms_info.send_data.sca.ton,
-               send_sms_info.send_data.sca.npi, send_sms_info.send_data.sca.number);
 
-       /* dialling number */
-       if (g_strlcpy(dialling_num, data_sms_send_msg_dialling_num,
-                       SMS_ADDRESS_LEN_MAX + 1) > SMS_ADDRESS_LEN_MAX) {
-               msg("Invalid dialling num length entered");
-               return 0;
+       for (i = 0; i < cb_config->MsgIdRangeCount; i++) {
+               msg("Enter %d Service Category : ", i + 1);
+               cb_config->MsgIDs[i].Net3gpp2.CBCategory = _get_int();/*3GPP2 C.R1001-D v1.0 section 9.3 Service Category Assignments*/
+
+               msg("Enter %d Language : ", i + 1);
+               cb_config->MsgIDs[i].Net3gpp2.CBLanguage = _get_int();
+
+               msg("Enter %d Selected : ", i + 1);
+               cb_config->MsgIDs[i].Net3gpp2.Selected = _get_int();
        }
-       dial_num_len = strlen(dialling_num);
 
-       /* message */
-       g_strlcpy(message, data_sms_send_msg, strlen(data_sms_send_msg)+1);
-       msg_len = strlen(message);
+       cb_config->Net3gppType= 0x02;/* CDMA */
 
-       msg("To: [%s]", dialling_num);
-       msg("Message: [%s]", message);
-       msg("dial num length[%d] msg_len[%d]", dial_num_len, msg_len);
+       msg("CBEnabled:%d,Net3gppType:%d,msgIdRangeCount:%d",
+                       cb_config->CBEnabled, cb_config->Net3gppType, cb_config->MsgIdRangeCount);
 
-       __encode_and_send_sms_submit_tpdu (mm, dialling_num, dial_num_len, message, msg_len, &send_sms_info);
+       return_status = tel_set_sms_cb_config (handle, cb_config, on_resp_set_sms_cb_config, NULL );
+       msg("returnStatus after cbconfig set is [%d]", return_status);
 
-       return 0;
+       free (cb_config);
+       return 1;
 }
 
-/* SubMenu */
-static struct menu_data menu_sms_send_sms[] = {
-       { "1", "more messages (0=No 1=Yes)", NULL, NULL, data_sms_send_more_msgs },
-       { "2", "sca ton (0=Unknown 1=International 2=National)", NULL, NULL, data_sms_sca_ton },
-       { "3", "sca npi (0=Unknown 1=Telephony)", NULL, NULL, data_sms_sca_npi },
-       { "4", "sca number", NULL, NULL, data_sms_sca_number },
-       { "5", "message", NULL, NULL, data_sms_send_msg},
-       { "6", "dialling number (<= 20)", NULL, NULL, data_sms_send_msg_dialling_num},
-       { "7", "run", NULL, run_send_sms, NULL },
-       { NULL, NULL, },
-};
-
-static struct menu_data menu_sms_read_msg_in_sim[] = {
-       { "1", "index", NULL, NULL, data_sms_index },
-       { "2", "run", NULL, run_read_msg_in_sim, NULL },
-       { NULL, NULL, },
-};
-
-static struct menu_data menu_sms_delete_msg_in_sim[] = {
-       { "1", "index", NULL, NULL, data_sms_index },
-       { "2", "run", NULL, run_delete_sms, NULL },
-       { NULL, NULL, },
-};
-
-static struct menu_data menu_sms_get_msg_count[] = {
-       { "1", "run", NULL, run_get_msg_count, NULL },
-       { NULL, NULL, },
-};
-
-static struct menu_data menu_sms_set_cb_config[] = {
-       { "1", "cb status (0=disabled 1=enabled)", NULL, NULL, data_sms_set_cb_status },
-       { "2", "msg id range count ( < 50)", NULL, NULL, data_sms_set_cb_msg_id_rng_cnt },
-       { "3", "run", NULL, run_set_cb_config, NULL },
-       { NULL, NULL, },
-};
-
-static struct menu_data menu_sms_get_cb_config[] = {
-       { "1", "run", NULL, run_get_cb_config, NULL },
-       { NULL, NULL, },
-};
-
-static struct menu_data menu_sms_set_parameters[] = {
-       { "1", "index", NULL, NULL, data_sms_set_params_index },
-       { "2", "sca ton(0=Unknown 1=International 2=National)", NULL, NULL, data_sms_sca_ton },
-       { "3", "sca npi (0=Unknown 1=Telephony)", NULL, NULL, data_sms_sca_npi },
-       { "4", "sca number", NULL, NULL, data_sms_sca_number },
-       { "5", "validity period", NULL, NULL, data_sms_set_params_vp },
-       { "6", "run", NULL, run_set_parameters, NULL },
-       { NULL, NULL, },
-};
-
-static struct menu_data menu_sms_get_parameters[] = {
-       { "1", "run", NULL, run_get_parameters, NULL },
-       { NULL, NULL, },
-};
-
-static struct menu_data menu_sms_set_sca[] = {
-       { "1", "sca ton(0=Unknown 1=International 2=National)", NULL, NULL, data_sms_sca_ton },
-       { "2", "sca npi (0=Unknown 1=Telephony)", NULL, NULL, data_sms_sca_npi },
-       { "3", "sca number", NULL, NULL, data_sms_sca_number },
-       { "4", "run", NULL, run_set_sca, NULL },
-       { NULL, NULL, },
-};
-
-static struct menu_data menu_sms_get_sca[] = {
-       { "1", "run", NULL, run_get_sca, NULL },
-       { NULL, NULL, },
-};
-
-static struct menu_data menu_sms_set_memory_status[] = {
-       { "1", "status (0=not available, 1=available)", NULL, NULL, data_sms_memory_status },
-       { "2", "run", NULL, run_set_memory_status, NULL },
-       { NULL, NULL, },
-};
-
-static struct menu_data menu_sms_set_msg_status[] = {
-       { "1", "index", NULL, NULL, data_sms_index },
-       { "2", "status (0=MT_READ 1=MT_UNREAD 2=MO_SENT 3=MO_NOT_SENT 4=MO_DELIVERED" \
-               "5=MO_DELIVERY_NOT_CONFIRMED 6=REPLACED )", NULL, NULL, data_sms_msg_status },
-       { "3", "run", NULL, run_set_msg_status, NULL },
-       { NULL, NULL, },
-};
-
-static struct menu_data menu_sms_get_init_status[] = {
-       { "1", "run", NULL, run_get_init_status, NULL },
-       { NULL, NULL, },
-};
-
-static struct menu_data menu_sms_get_msg_sim_memory_status[] = {
-       { "1", "run", NULL, run_get_msg_sim_memory_status, NULL },
-       { NULL, NULL, },
-};
-
-/* Menu */
-struct menu_data menu_sms[] = {
-       { "1", "Send SMS", menu_sms_send_sms, NULL, NULL},
-       { "2", "Read SMS in SIM", menu_sms_read_msg_in_sim, NULL, NULL},
-       { "3", "Delete SMS in SIM", menu_sms_delete_msg_in_sim, NULL, NULL},
-       { "4", "Get SMS count", menu_sms_get_msg_count, NULL, NULL},
-       { "5", "Set SMS cell broadcast configuration", menu_sms_set_cb_config, NULL, NULL},
-       { "6", "Get SMS cell broadcast configuration", menu_sms_get_cb_config, NULL, NULL},
-       { "7", "Set SMS parameters", menu_sms_set_parameters, NULL, NULL},
-       { "8", "Get SMS parameters", menu_sms_get_parameters, NULL, NULL},
-       { "9", "Set SCA", menu_sms_set_sca, NULL, NULL},
-       { "10", "Get SCA", menu_sms_get_sca, NULL, NULL},
-       { "11", "Set SMS memory status", menu_sms_set_memory_status, NULL, NULL},
-       { "12", "Set SMS msg status", menu_sms_set_msg_status, NULL, NULL},
-       { "13", "Get SMS init status", menu_sms_get_init_status, NULL, NULL},
-       { "14", "Get SMS SIM memory status", menu_sms_get_msg_sim_memory_status, NULL, NULL},
-       { NULL, NULL, },
-};
-
-void register_sms_event(TelHandle *handle)
+static struct menu_data menu_sms_getting[] = {
+               { "1", "Get Service Center Number", NULL, Getting, NULL },
+               { "2", "Get CB Setting Information", NULL, Getting, NULL },
+               { "3", "Get SMS Parameters", NULL, Getting, NULL },
+               { "4", "Get SMS PreferredBearer Information", NULL, Getting, NULL },
+               { "5", "Get SMS Parameter Count", NULL, Getting, NULL },
+               { "6", "Get Message Count", NULL, Getting, NULL },
+               { "7", "Get SMS ready status", NULL, Getting, NULL }, { NULL, NULL , }, };
+
+static struct menu_data menu_cdma_sms_getting[] = {
+               { "1", "Get CB Setting Information", NULL, CdmaGetting, NULL },
+               { "2", "Get SMS PreferredBearer Information", NULL, CdmaGetting, NULL },
+               { "3", "Get Message Count in RUIM", NULL, CdmaGetting, NULL },
+               { "4", "Get SMS ready status", NULL, CdmaGetting, NULL }, { NULL, NULL , }, };
+
+static struct menu_data menu_sms_setting[] = {
+               { "1", "Set Service Center Number", NULL, Setting, NULL},
+               { "2", "Set Preferred Bearer Type", NULL, Setting, NULL},
+               { "3", "Set CB Enable/Disable", NULL, Setting, NULL},
+               { "4", "Set SMS Parameters", NULL, Setting, NULL},
+               { "5", "Set Memory Status", NULL, Setting, NULL},
+               { "6", "Set Message Status", NULL, Setting, NULL}, { NULL, NULL , }, };
+
+static struct menu_data menu_cdma_sms_setting[] = {
+               { "1", "Set PreferredBearer Type", NULL, CdmaSetting, NULL },
+               { "2", "Set CB Enable/Disable", NULL, CdmaSetting, NULL },
+               { "3", "Set Memory Status", NULL, CdmaSetting, NULL },
+               { "4", "Set Stored MsgStaus", NULL, CdmaSetting, NULL },
+               { NULL, NULL , }, };
+
+static struct menu_data menu_sms_wcdma[] = {
+               { "1", "Send Message", NULL, SendMessage, NULL},
+               { "2", "Read Message", NULL, ReadMessage, NULL},
+               { "3", "Delete Message", NULL, DeleteMessage, NULL},
+               { "4", "Setting", menu_sms_setting, NULL, NULL },
+               { "5", "Getting SMS Information", menu_sms_getting, NULL, NULL },
+               { NULL, NULL , }, };
+
+static struct menu_data menu_sms_cdma[] = {
+               { "1", "Send CDMA Message", NULL, SendMessageCDMA, NULL },
+               { "2", "Read CDMA Message in RUIM", NULL, ReadMessage, NULL },
+               { "3", "Delete CDMA Message in RUIM", NULL, DeleteMessage, NULL },
+               { "4", "Getting CDMA SMS Information", menu_cdma_sms_getting, NULL, NULL },
+               { "5", "Setting CDMA SMS Information", menu_cdma_sms_setting, NULL, NULL },
+               { NULL, NULL , }, };
+
+struct menu_data menu_sms[] = { { "1", "3GPP[GSM/WCDMA]", menu_sms_wcdma, NULL, NULL }, {
+               "2", "3GPP2[CDMA/1xEV-DO]", menu_sms_cdma, NULL, NULL }, { NULL, NULL , }, };
+
+void register_sms_event (TapiHandle *handle)
 {
-       TelReturn ret;
+       int ret;
 
-    ret = tapi_register_event_id(handle, TEL_NOTI_SMS_INCOM_MSG, on_noti_sms_incom_msg, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_SMS_INCOM_MSG - Event register failed: [%d]", ret);
+       /* SMS */
+       ret = tel_register_noti_event (handle, TAPI_NOTI_SMS_INCOM_MSG,
+                       on_noti_sms_incom_msg, NULL );
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 
-    ret = tapi_register_event_id(handle, TEL_NOTI_SMS_CB_INCOM_MSG, on_noti_sms_cb_incom_msg, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_SMS_CB_INCOM_MSG - Event register failed: [%d]", ret);
+       ret = tel_register_noti_event (handle, TAPI_NOTI_SMS_CB_INCOM_MSG,
+                       on_noti_sms_cb_incom_msg, NULL );
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 
-    ret = tapi_register_event_id(handle, TEL_NOTI_SMS_ETWS_INCOM_MSG, on_noti_sms_etws_incom_msg, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_SMS_ETWS_INCOM_MSG - Event register failed: [%d]", ret);
+       ret = tel_register_noti_event (handle, TAPI_NOTI_SMS_ETWS_INCOM_MSG,
+                       on_noti_sms_etws_incom_msg, NULL );
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 
-    ret = tapi_register_event_id(handle, TEL_NOTI_SMS_SIM_MEMORY_STATUS, on_noti_sms_memory_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_SMS_SIM_MEMORY_STATUS - Event register failed: [%d]", ret);
+       ret = tel_register_noti_event (handle, TAPI_NOTI_SMS_MEMORY_STATUS,
+                       on_noti_sms_memory_status, NULL );
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 
-    ret = tapi_register_event_id(handle, TEL_NOTI_SMS_INIT_STATUS, on_noti_sms_init_status, NULL);
-       if (ret != TEL_RETURN_SUCCESS)
-               msg("TEL_NOTI_SMS_INIT_STATUS - Event register failed: [%d]", ret);
+       ret = tel_register_noti_event (handle, TAPI_NOTI_SMS_DEVICE_READY,
+                       on_noti_sms_ready_status, NULL );
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 }
index 3cefc01685592a87976d76c324ae0a9f9a57e018..aa5243b35a6a03a2dcbfcb5256ef73ad97344f3c 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #ifndef TAPI_SMS_CDMA_H
 #define TAPI_SMS_CDMA_H
 
-/*
-   typedef unsigned char       INT8;
-   typedef unsigned short      INT16;
-   typedef unsigned int        INT;
-   typedef unsigned long       INT32;
-
-   typedef unsigned char       BYTE;
-   */
-
 typedef int BOOL;
 
 #ifndef packed__
@@ -642,7 +634,7 @@ typedef struct{
        unsigned char                   data[255];
 } packed__ Message_t;
 
-void register_sms_event(TelHandle*handle);
+void register_sms_event(TapiHandle*handle);
 
 #endif //TAPI_SMS_CDMA_H
 // EOF
index 51f9130872f25c38a148e5e0484382998bd9ad50..7dc07a9985c8294c718fdebb24a49a6495f43769 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <stdio.h>
 #include <string.h>
 #include "sms_util.h"
+#include "menu.h"
+
+void  reverse(char* x, int len)
+{
+       int i, j = len - 1;
 
-/* Utilites */
+       for (i = 0; i < j; i++)
+       {
+               int t = x[i];
+               x[i] = x[j];
+               x[j--] = t;
+       }
+}
 
-static char *__AcItoa(int n, char* str, int b)
+char*  AcItoa(int n, char* str, int b)
 {
        int i = 0;
 
@@ -32,536 +44,1054 @@ static char *__AcItoa(int n, char* str, int b)
                str[i++] = "0123456789ABCDEF"[n%b];
 
        while ((n /= b) > 0);
+       reverse(str, i);
        str[i] = '\0';
-       g_strreverse(str);
 
        return str;
 }
 
-void sms_util_decode_dcs(SmsCodingScheme *coding_scheme, unsigned char dcs)
+int  AcToupper(int ch)
 {
-       memset(coding_scheme, 0, sizeof(SmsCodingScheme));
+       return (('a' <= (ch) && (ch) <= 'z')? ((ch) - ('a'-'A')) : (ch));
+}
 
-       /* bits 7..4 = 00xx : general data coding indication */
-       if ( dcs < 0x40 ) {
-               coding_scheme->coding_group_type = SMS_CODGRP_SM_GENERAL_DCS;
+char* SmsUtilUnpackGSMCode(char* szData, const char* pIn, int in_len )
+{
+       int i;
+       int pos = 0;
+       int shift = 0;
 
-               /* bit 5 = 1 : indicates the text is compressed */
-               if ( dcs & 0x20 )
-                       coding_scheme->compressed = TRUE;
+       /* If the number of fill bits != 0, then it would cause an additional shift */
+       /*
+       if ( shift != 0 )
+               pos = pos + 1;
 
-               /* bit 4 = 1 : indicates that bits  1 to 0 have a message class meaning */
-               if ( dcs & 0x10 ) {
-                       coding_scheme->bmsg_class_set = TRUE;
+       if ( shift ==7 )
+               shift = 0;
+       */
 
-                       switch ( dcs & 0x03 )  { /* bits 1 to 0 : message class */
-                       case 0x00:
-                               coding_scheme->class_type = SMS_CLASS_0;
-                               break;
-                       case 0x01:
-                               coding_scheme->class_type = SMS_CLASS_1;
-                               break;
-                       case 0x02:
-                               coding_scheme->class_type = SMS_CLASS_2;
-                               break;
-                       case 0x03:
-                               coding_scheme->class_type = SMS_CLASS_3;
-                       }
-               }
-               else /* bit 4 = 0 : indicates that bits 1 to 0 are reserved and have no message class meaning */
-                       coding_scheme->class_type = SMS_CLASS_NONE;
+       for ( i = 0; i < in_len; i++, pos++ )
+       {
+               szData[i] = ( pIn[pos] << shift ) & 0x7F;
 
-               switch ( dcs & 0x0C ) { /* bits 4 to 3 : character set */
-               case 0x00:
-                       coding_scheme->alphabet_type = SMS_ALPHABET_DEFAULT;
-                       break;
-               case 0x04:
-                       coding_scheme->alphabet_type = SMS_ALPHABET_8BIT;
-                       break;
-               case 0x08:
-                       coding_scheme->alphabet_type = SMS_ALPHABET_UCS2;
-                       break;
-               case 0x0C:
-                       coding_scheme->alphabet_type = SMS_ALPHABET_MAX;
+               if ( pos != 0 )
+               {
+                       /* except the first byte, a character contains some bits
+                       ** from the previous byte.
+                       */
+                       szData[i] |= pIn[pos-1] >> (8-shift);
                }
-       } else if ( dcs >= 0x40 && dcs < 0x80 ) {
-               /* bits 7..4 = 01xx : message marked for automatic deletion group. bits 5..0
-               are coded exactly the same as group 00xx */
 
-               coding_scheme->coding_group_type = SMS_CODGRP_SM_AUTO_DELETION;
+               shift ++;
 
-               /* bit 5 = 1 : indicates the text is compressed */
-               if ( dcs & 0x20 )
-                       coding_scheme->compressed = TRUE;
+               if ( shift == 7 )
+               {
+                       shift = 0;
 
-               /* bit 4 = 1 : indicates that bits  1 to 0 have a message class meaning */
-               if ( dcs & 0x10 ) {
-                       coding_scheme->bmsg_class_set = TRUE;
+                       /* a possible extra complete character is available */
+                       i++;
+                       szData[i] = pIn[pos] >> 1;
 
-                       switch ( dcs & 0x03 ) { /* bits 1 to 0 : message class */
-                       case 0x00:
-                               coding_scheme->class_type = SMS_CLASS_0;
-                               break;
-                       case 0x01:
-                               coding_scheme->class_type = SMS_CLASS_1;
-                               break;
-                       case 0x02:
-                               coding_scheme->class_type = SMS_CLASS_2;
+                       if( szData[i] == 0 )
+                       {
+                               /* this is the end of the input, quit */
                                break;
-                       case 0x03:
-                               coding_scheme->class_type = SMS_CLASS_3;
                        }
                }
-               else /* bit 4 = 0 : indicates that bits 1 to 0 are reserved and have no message class meaning */
-                       coding_scheme->class_type = SMS_CLASS_NONE;
-
-               switch ( dcs & 0x0C ) { /* bits 4 to 3 : character set */
-               case 0x00:
-                       coding_scheme->alphabet_type = SMS_ALPHABET_DEFAULT;
-                       break;
-               case 0x04:
-                       coding_scheme->alphabet_type = SMS_ALPHABET_8BIT;
-                       break;
-               case 0x08:
-                       coding_scheme->alphabet_type = SMS_ALPHABET_UCS2;
-                       break;
-               case 0x0C:
-                       coding_scheme->alphabet_type = SMS_ALPHABET_MAX;
-               }
-       }
-       /* bits 7..4 = 1000 ~ 1011 : reserved */
-       /* bits 7..4 = 1100 : message waiting indication group, discard message */
-       else if ( dcs == 0xC0 ) {
-               coding_scheme->coding_group_type = SMS_CODGRP_SM_WAITING_DISCARD;
        }
-       else if ( dcs < 0xE0 ) {
-               coding_scheme->coding_group_type = SMS_CODGRP_SM_WAITING_STORE;
 
-               if ( dcs & 0x08 )
-                       coding_scheme->bmsg_ind_active = TRUE;
+       return szData;
+}
 
-               switch ( dcs & 0x03 ) {
-               case 0x00:
-                       coding_scheme->waiting_type = SMS_WAITING_VOICE_MSG;
-                       break;
-               case 0x01:
-                       coding_scheme->waiting_type = SMS_WAITING_FAX_MSG;
-                       break;
-               case 0x02:
-                       coding_scheme->waiting_type = SMS_WAITING_EMAIL_MSG;
-                       break;
-               case 0x03:
-                       coding_scheme->waiting_type = SMS_WAITING_OTHER_MSG;
-               }
-       }
-       else if ( dcs < 0xF0 ) {
-               coding_scheme->coding_group_type = SMS_CODGRP_SM_WAITING_STORE_UCS2;
+int SmsUtilPackGSMCode( unsigned char *pOut, const char* szData, int in_len )
+{
+       int i;
+       int pos;
+       int shift = 0;
+       //shift = fill_bits;
 
-               if ( dcs & 0x08 )
-                       coding_scheme->bmsg_ind_active = TRUE;
+       //  memset( out, 0, out_len_max );
 
-               switch ( dcs & 0x03 ) {
-               case 0x00:
-                       coding_scheme->waiting_type = SMS_WAITING_VOICE_MSG;
-                       break;
-               case 0x01:
-                       coding_scheme->waiting_type = SMS_WAITING_FAX_MSG;
-                       break;
-               case 0x02:
-                       coding_scheme->waiting_type = SMS_WAITING_EMAIL_MSG;
-                       break;
-               case 0x03:
-                       coding_scheme->waiting_type = SMS_WAITING_OTHER_MSG;
-               }
-       }
-       else {
-               coding_scheme->coding_group_type = SMS_CODGRP_SM_CLASS_CODING;
+       /* pack the ASCII characters
+       */
+       /*
+       if ( shift == 7 )
+               shift = 0;
+       */
 
-               if ( dcs & 0x04 )
-                       coding_scheme->alphabet_type = SMS_ALPHABET_8BIT;
+       for( pos = 0, i = 0; /*pos < out_len_max &&*/ i < in_len; pos++, i++ )
+       {
+               /* pack the low bits */
+               pOut[pos] = szData[i] >> shift;
 
-               switch ( dcs & 0x03 ) {
-                       case 0x00:
-                               coding_scheme->class_type = SMS_CLASS_0;
-                               break;
-                       case 0x01:
-                               coding_scheme->class_type = SMS_CLASS_1;
-                               break;
-                       case 0x02:
-                               coding_scheme->class_type = SMS_CLASS_2;
-                               break;
-                       case 0x03:
-                               coding_scheme->class_type = SMS_CLASS_3;
+               if ( i + 1 < in_len )
+               {
+                       /* pack the high bits using the low bits of the next character */
+                       pOut[pos] |= szData[i+1] << ( 7 - shift );
+
+                       shift++;
+
+                       if( shift == 7 )
+                       {
+                               shift = 0;
+                               i++;
+                       }
                }
        }
+
+       /* done */
+       return pos;
 }
 
-void sms_util_convert_bcd_2_digit( char* digits, char* bcd, int digit_len )
+
+void SmsUtilConvertBCD2Digit( char* pDigits, char* pBCD, int digitLen )
 {
-       int i, bcd_len;
-       char c[2];
-       unsigned char higher, lower;
+       int             i, bcdLen;
+       char    c[2];
+       unsigned char   higher, lower;
 
-       if ( bcd == NULL || digits == NULL ) {
-               msg( " sms_util_convert_bcd_2_digit: bcd == NULL || digits == NULL. return.\n " );
+       if ( pBCD == NULL || pDigits == NULL )
+       {
+               printf("__SmsConvertBCD2Digit: pBCD == NULL || pDigits == NULL. return.\n"  );
                return;
        }
 
-       if ( digit_len == 0 ) {
-               //printf("__SmsConvertBCD2Digit: digit_len == 0. return.\n" );
-               digits[0] = 0x00;
+       if ( digitLen == 0 )
+       {
+               //printf("__SmsConvertBCD2Digit: digitLen == 0. return.\n" );
+
+               pDigits[0] = 0x00;
+
                return;
        }
 
-       bcd_len = (digit_len + 1) / 2;
+       if ( digitLen % 2 )
+               bcdLen = digitLen / 2 + 1;
+       else
+               bcdLen = digitLen / 2;
 
-       memset( digits, 0, bcd_len * 2 );
+       memset( pDigits, 0, bcdLen * 2 );
 
-       for ( i = 0; i < bcd_len; i++ ) {
-               lower = bcd[i] & 0x0F; // get low nibble
+       for ( i = 0; i < bcdLen; i++ )
+       {
+               lower = pBCD[i] & 0x0F;                                 // get low nibble
 
                if ( lower == 0x0A )
                        lower = '*';
                else if ( lower == 0x0B )
                        lower = '#';
                else if ( lower == 0x0C )
-                       lower = 'p'; //DTMF Control digits seperator
+                       lower = 'p';                    //DTMF Control pDigits seperator
                else if ( lower == 0x0F )
                        lower = 0;
-               else {
-                       __AcItoa( lower, c, 16 );
-                       lower = g_ascii_toupper(c[0]);
+               else
+               {
+                       AcItoa( lower, c, 16 );
+                       lower = (char) AcToupper(c[0]);
                }
 
-               higher = ( bcd[i] >> 4 ) & 0x0F; // get high nibble
+               higher = ( pBCD[i] >> 4 ) & 0x0F;                       // get high nibble
 
                if ( higher == 0x0A )
-                       higher = '*'; // =0x2A
+                       higher = '*';           // =0x2A
                else if ( higher == 0x0B )
-                       higher = '#'; // =0x23
+                       higher = '#';           // =0x23
                else if ( higher == 0x0C )
-                       higher = 'p'; // =0x70, DTMF Control digits seperator
-               else if ( higher == 0x0F ) { // if higher semi-octet is 0x0F, filled bits.
+                       higher = 'p';           // =0x70, DTMF Control pDigits seperator
+               else if ( higher == 0x0F ) // if higher semi-octet is 0x0F, filled bits.
+               {
                        //higher = 0;
-                       sprintf(digits + strlen(digits), "%c", lower);
-                       digits[/*digit_len-1*/bcd_len*2-1] = '\0';
+                       sprintf(pDigits + strlen(pDigits), "%c", lower);
+                       pDigits[/*digitLen-1*/bcdLen*2-1] = '\0';
 
-                       //printf("__SmsConvertBCD2Digit: digits [%s].\n", digits        );
+                       //printf("__SmsConvertBCD2Digit: pDigits [%s].\n", pDigits  );
 
                        return;
                }
-               else {
-                       __AcItoa(higher, c, 16);
-                       higher = g_ascii_toupper(c[0]);
+               else
+               {
+                       AcItoa(higher, c, 16);
+                       higher = (char) AcToupper(c[0]);
                }
 
-               //sprintf(digits, "%s%c%c", digits, lower, higher);
-               sprintf(digits + strlen(digits), "%c%c", lower, higher);
+               //sprintf(pDigits, "%s%c%c", pDigits, lower, higher);
+               sprintf(pDigits + strlen(pDigits), "%c%c", lower, higher);
        }
 
-       digits[digit_len] = '\0';
+       pDigits[digitLen] = '\0';
 
-       //printf("__SmsConvertBCD2Digit: digits [%s].\n", digits        );
+       //printf("__SmsConvertBCD2Digit: pDigits [%s].\n", pDigits  );
 }
 
-char *sms_util_unpack_gsm_code(char *sz_data, const char *in, int in_len )
+
+void SmsUtilConvertDigit2BCD( char* pBCD, char* pDigits, int digitLen )
 {
-       int i;
-       int pos = 0;
-       int shift = 0;
+       int     i, j, digit;
 
-       for ( i = 0; i < in_len; i++, pos++ ) {
-               sz_data[i] = ( in[pos] << shift ) & 0x7F;
+       unsigned char   higher, lower;
 
-               if ( pos != 0 ) {
-                       /* except the first byte, a character contains some bits
-                       ** from the previous byte.
-                       */
-                       sz_data[i] |= in[pos-1] >> (8-shift);
-               }
-               shift ++;
+       if ( pBCD == NULL || pDigits == NULL )
+               return;
 
-               if ( shift == 7 ) {
-                       shift = 0;
+       // 0123456789 -> 1032547698
+       for ( i = 0, j = 0; i < digitLen; i = i + 2, j++ )
+       {
+               if ( pDigits[i] == '*' )
+                       digit = 0x0A;
+               else if ( pDigits[i] == '#' )
+                       digit = 0x0B;
+               else if ( AcToupper( pDigits[i] ) == 'P' )
+                       digit = 0x0C;
+               else
+                       digit = (int) ( pDigits[i] - '0' );
 
-                       /* a possible extra complete character is available */
-                       i++;
-                       sz_data[i] = in[pos] >> 1;
+               lower = digit & 0x0F;
 
-                       if( sz_data[i] == 0 ) {
-                               /* this is the end of the input, quit */
-                               break;
-                       }
+               if ( digitLen != i + 1 )
+               {
+                       if ( pDigits[i+1] == '*' )
+                               digit = 0x0A;
+                       else if ( pDigits[i+1] == '#' )
+                               digit = 0x0B;
+                       else if ( AcToupper( pDigits[i+1] ) == 'P' )
+                               digit = 0x0C;
+                       else
+                               digit = (int) ( pDigits[i+1] - '0' );
+
+                       higher = digit & 0x0F;
+               }
+               else
+               {
+                       higher = 0xFF;
                }
+
+               pBCD[j] = ( higher << 4 ) | lower;
        }
-       return sz_data;
 }
 
-int sms_util_decode_addr_field(char *dialling_num, char* addr_field, int *result_ton, int *result_npi)
+
+TmDateTime* SmsUtilDecodeTimeStamp(char * pTimeStamp, TmDateTime *tmDateTime )
 {
-       int index = 0;
-       int ton, npi;
-       int dial_num_len = 0;
+       //TmDateTime tmDateTime;
+       char szBuf[3];
+       //TS_UINT32     time;
+
+       if ( pTimeStamp == NULL )
+               return NULL;
 
-       ton = ( addr_field[index+1] & 0x70 ) >> 4;
-       npi = addr_field[index+1] & 0x0F;
+       SmsUtilConvertBCD2Digit( szBuf, (char*) &pTimeStamp[0], 2 );
+       tmDateTime->year = atoi( szBuf ) + 2000;
+       if ( ( tmDateTime->year >= 1900 + MAX_YEAR )/* && ( tmDateTime->year < 2000 + BASE_YEAR )*/ )
+               tmDateTime->year -= 100;
+       SmsUtilConvertBCD2Digit( szBuf, (char*) &pTimeStamp[1], 2 );
+       tmDateTime->month = atoi( szBuf );
+       SmsUtilConvertBCD2Digit( szBuf, (char*) &pTimeStamp[2], 2 );
+       tmDateTime->day = atoi( szBuf );
+       SmsUtilConvertBCD2Digit( szBuf, (char*) &pTimeStamp[3], 2 );
+       tmDateTime->hour = atoi( szBuf );
+       SmsUtilConvertBCD2Digit( szBuf, (char*) &pTimeStamp[4], 2 );
+       tmDateTime->minute = atoi( szBuf );
+       SmsUtilConvertBCD2Digit( szBuf, (char*) &pTimeStamp[5], 2 );
+       tmDateTime->second = atoi( szBuf );
+
+       if ( ( tmDateTime->year < 1900 + BASE_YEAR ) || ( tmDateTime->year > 1900 + MAX_YEAR ) )
+               tmDateTime->year = 1900 + BASE_YEAR;
+
+       /*
+       time = TmDateTimeToSeconds( &tmDateTime );
+       if ( time > MAX_SECONDS )
+               time = MAX_SECONDS;
+
+       */
+
+       return tmDateTime;
+}
 
-       if ( ton != SMS_TON_ALPHA_NUMERIC ) {
-               dial_num_len = addr_field[index++];
-       } else {
-               dial_num_len = ( ( ( addr_field[index++] + 1 ) / 2 ) * 8 ) / 7;
+unsigned char* SmsUtilEncodeTimeStamp( TmDateTime* tmDateTime, unsigned char* pTimeStamp )
+{
+       //TmDateTime tmDateTime;
+       char szBuf[3];
+       int     year;
+
+       if ( pTimeStamp == NULL )
+               return NULL;
+
+       memset( (void*) pTimeStamp, 0x00, sizeof ( unsigned char ) * 7 );
+
+       //TmSecondsToDateTime( timeStamp, &tmDateTime );
+
+       year = tmDateTime->year - 2000;
+       if ( year < 0 )
+               year += 100;
+       sprintf( szBuf, "%02d", year );
+       SmsUtilConvertDigit2BCD( (char*) &pTimeStamp[0], szBuf, 2 );
+       sprintf( szBuf, "%02d", tmDateTime->month );
+       SmsUtilConvertDigit2BCD( (char*) &pTimeStamp[1], szBuf, 2 );
+       sprintf( szBuf, "%02d", tmDateTime->day );
+       SmsUtilConvertDigit2BCD( (char*) &pTimeStamp[2], szBuf, 2 );
+       sprintf( szBuf, "%02d", tmDateTime->hour );
+       SmsUtilConvertDigit2BCD( (char*) &pTimeStamp[3], szBuf, 2 );
+       sprintf( szBuf, "%02d", tmDateTime->minute );
+       SmsUtilConvertDigit2BCD( (char*) &pTimeStamp[4], szBuf, 2 );
+       sprintf( szBuf, "%02d", tmDateTime->second );
+       SmsUtilConvertDigit2BCD( (char*) &pTimeStamp[5], szBuf, 2 );
+
+
+       /*      ignore Time zone (assume it is using 0x00 as default)
+       timeZone = TmGetTimeZoneOffset() /15;
+       if ( timeZone < 0 )
+               absTimeZone = -timeZone;
+       else
+               absTimeZone = timeZone;
+       */
+
+       sprintf( szBuf, "%02d", 0);
+       SmsUtilConvertDigit2BCD( (char*) &pTimeStamp[6], szBuf, 2 );
+
+       //if ( timeZone < 0 )
+       //      pTimeStamp[6] |= 0x80;
+
+       return pTimeStamp;
+}
+
+
+
+int  SmsUtilDecodeAddrField(char *diallingNum, char* pAddrField, int *result_ton, int *result_npi )
+{
+       int local_index = 0;
+       int  ton,npi;
+       int DialNumLen=0;
+
+       ton = ( pAddrField[local_index+1] & 0x70 ) >> 4;
+       npi = pAddrField[local_index+1] & 0x0F;
+
+       if ( ton != SMS_TON_ALPHA_NUMERIC )
+       {
+               // Origination/Destination address ï¿½Êµå¿¡ï¿½ï¿½ï¿½ï¿½ length�� ï¿½ï¿½ï¿½ï¿½ address length
+               // origination/destination address ï¿½Êµï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ length�� 0 ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ number type/plan ï¿½Êµï¿½ï¿½ 0xFF ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½Â´ï¿½.
+               DialNumLen = pAddrField[local_index++];
        }
+       else
+       {
+               DialNumLen = ( ( ( pAddrField[local_index++] + 1 ) / 2 ) * 8 ) / 7;
+       }
+
+
+
+
+       // SIM_SMSP_ADDRESS_LEN ï¿½ï¿½ï¿½ï¿½ address length ï¿½ï¿½ Å©ï¿½ï¿½ SIM_SMSP_ADDRESS_LEN ï¿½ï¿½Å­ï¿½ï¿½ ï¿½ï¿½È¯ï¿½ï¿½ ï¿½Ñ´ï¿½.
 
-       if ( dial_num_len > SMS_ADDRESS_LEN_MAX ) {
-               dial_num_len = SMS_ADDRESS_LEN_MAX;
+       if ( DialNumLen > SMS_ADDRESS_LEN_MAX )
+       {
+               DialNumLen = SMS_ADDRESS_LEN_MAX;
        }
 
-       msg(" dial_num_len = %d\n", dial_num_len );
+       printf(" DialNumLen = %d\n", DialNumLen  );
 
-       index++; /* ignore Type of Address field */
+       local_index++; /* ignore Type of Address field */
 
-       if (ton != SMS_TON_ALPHA_NUMERIC ) {
-               sms_util_convert_bcd_2_digit( dialling_num, (char*) &addr_field[index], dial_num_len );
-       } else {
-               sms_util_unpack_gsm_code( dialling_num, &addr_field[index], dial_num_len );
+       if (ton != SMS_TON_ALPHA_NUMERIC )
+       {
+               SmsUtilConvertBCD2Digit( diallingNum, (char*) &pAddrField[local_index],DialNumLen );
+       }
+       else
+       {
+               SmsUtilUnpackGSMCode( diallingNum, &pAddrField[local_index],DialNumLen );
        }
 
-       msg(  "sms_util_decode_addr_field: dialling_num [%s].\n", (char*) dialling_num  );
+       printf(  "__SmsDecodeAddrField: diallingNum [%s].\n", (char*) diallingNum  );
 
        *result_ton=ton;
        *result_npi=npi;
 
-       msg("ton %d npi %d\n", ton, npi);
+       printf("ton %d npi %d\n",ton,npi);
+
+       return DialNumLen;
+
 
-       return dial_num_len;
 }
 
-TmDateTime *sms_util_decode_time_stamp(char *time_stamp, TmDateTime *tm_date_time )
+int  SmsUtilEncodeAddrField(unsigned char* pAddrField, char* diallingNum, int DialNumLen, int ton, int npi )
 {
-       char buf[3];
+       int local_index = 0;
 
-       if ( time_stamp == NULL )
-               return NULL;
+       if ( diallingNum == NULL || pAddrField == NULL )
+               return -1;
 
-       sms_util_convert_bcd_2_digit( buf, (char*) &time_stamp[0], 2 );
-       tm_date_time->year = atoi( buf ) + 2000;
-       if ( ( tm_date_time->year >= 1900 + MAX_YEAR )/* && ( tm_date_time->year < 2000 + BASE_YEAR )*/ )
-               tm_date_time->year -= 100;
-       sms_util_convert_bcd_2_digit( buf, (char*) &time_stamp[1], 2 );
-       tm_date_time->month = atoi( buf );
-       sms_util_convert_bcd_2_digit( buf, (char*) &time_stamp[2], 2 );
-       tm_date_time->day = atoi( buf );
-       sms_util_convert_bcd_2_digit( buf, (char*) &time_stamp[3], 2 );
-       tm_date_time->hour = atoi( buf );
-       sms_util_convert_bcd_2_digit( buf, (char*) &time_stamp[4], 2 );
-       tm_date_time->minute = atoi( buf );
-       sms_util_convert_bcd_2_digit( buf, (char*) &time_stamp[5], 2 );
-       tm_date_time->second = atoi( buf );
-
-       if ( ( tm_date_time->year < 1900 + BASE_YEAR ) || ( tm_date_time->year > 1900 + MAX_YEAR ) )
-               tm_date_time->year = 1900 + BASE_YEAR;
-
-       return tm_date_time;
-}
+       if ( diallingNum[0] == '+' )
+       {
+               diallingNum++;
+               DialNumLen--;
+               ton = SMS_TON_INTERNATIONAL;
+       }
 
-void sms_util_convert_digit_2_bcd( char *bcd, char *digits, int digit_len )
-{
-       int i, j, digit;
-       unsigned char higher, lower;
+       if ( ton != SMS_TON_ALPHA_NUMERIC )
+       {
+               // Origination/Destination address ï¿½Êµå¿¡ï¿½ï¿½ï¿½ï¿½ length�� ï¿½ï¿½ï¿½ï¿½ address length
+               pAddrField[local_index++] = (unsigned char)DialNumLen;
+               //printf(" addr len packet: %d\n", pAddrField[local_index]);
+       }
+       else
+       {
+               pAddrField[local_index] = (unsigned char) ( ( ( DialNumLen * 7 + 7 ) / 8 ) * 2 );
 
-       if ( bcd == NULL || digits == NULL )
-               return;
+               // ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½Æ®ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ 4��Ʈ�� ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ length ï¿½Êµå°ªï¿½ï¿½ -1�� ï¿½Ñ´ï¿½.
+               if ( ( ( DialNumLen * 7 ) % 8 ) <= 4 )
+                       pAddrField[local_index]--;
 
-       // 0123456789 -> 1032547698
-       for ( i = 0, j = 0; i < digit_len; i = i + 2, j++ )
+               printf(" addr len packet: %d out of SMS_TON_ALPAHA\n", pAddrField[local_index]);
+
+               local_index++;
+       }
+
+       SET_TON_NPI( pAddrField[local_index], ton, npi );
+
+       local_index++; // SET_TON_NPI ï¿½ï¿½ MACRO ï¿½Ì¹Ç·ï¿½ ï¿½ï¿½ï¿½Î¿ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Å°ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½
+
+       if ( ton != SMS_TON_ALPHA_NUMERIC )
        {
-               if ( digits[i] == '*' )
-                       digit = 0x0A;
-               else if ( digits[i] == '#' )
-                       digit = 0x0B;
-               else if (g_ascii_toupper(digits[i]) == 'P' )
-                       digit = 0x0C;
+               SmsUtilConvertDigit2BCD( (char*) &pAddrField[local_index], (char*) diallingNum, DialNumLen );
+
+               if ( DialNumLen % 2 )
+                       local_index += DialNumLen / 2 + 1;
                else
-                       digit = (int) ( digits[i] - '0' );
+                       local_index += DialNumLen / 2;
+       }
+       else
+       {
+               local_index += SmsUtilPackGSMCode( &pAddrField[local_index], diallingNum, (int) DialNumLen );
+       }
 
-               lower = digit & 0x0F;
+       return local_index;
+}
+int SmsUtilDecodeScAddrField( SmsAddressInfo_t* pSmsAddrField, unsigned char* pAddrField )
+{
+       int local_index = 0;
+       int length = 0;
 
-               if ( digit_len != i + 1 ) {
-                       if ( digits[i+1] == '*' )
-                               digit = 0x0A;
-                       else if ( digits[i+1] == '#' )
-                               digit = 0x0B;
-                       else if (g_ascii_toupper(digits[i+1]) == 'P' )
-                               digit = 0x0C;
-                       else
-                               digit = (int) ( digits[i+1] - '0' );
+       printf("SmsUtilDecodeScAddrField\n");
 
-                       higher = digit & 0x0F;
-               } else {
-                       higher = 0xFF;
+       if ( pSmsAddrField == NULL || pAddrField == NULL )
+       {
+               printf( "SmsUtilDecodeScAddrField: pSimAddrField or pAddrField is NULL.\n"  );
+
+               return 0;
+       }
+
+       // Service Center address ï¿½Êµå¿¡ï¿½ï¿½ï¿½ï¿½ length�� ï¿½Ú¿ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ byte�� ï¿½ï¿½
+       // -> ï¿½ï¿½ï¿½ï¿½ address ï¿½ï¿½ï¿½Ì´ï¿½ TON/API ï¿½ï¿½ï¿½ï¿½Æ®ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½Ï°ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½Æ®ï¿½ï¿½ 2�� or 2�� - 1(���� ï¿½ï¿½ï¿½Ì°ï¿½ È¦ï¿½ï¿½ï¿½Î°ï¿½ï¿½)
+       length = pAddrField[local_index];
+       // ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ ï¿½Þ½ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ì¿¡ï¿½ï¿½ service center address�� ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ ï¿½Ö´ï¿½.
+       // ï¿½ï¿½ ï¿½ï¿½ì¿¡ length ï¿½ï¿½ 0 ï¿½Ì¸ï¿½ number type, plan ï¿½ï¿½ ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½
+       // length ï¿½ï¿½ 1 ï¿½Ì¸ï¿½ type, plan ï¿½ï¿½ ï¿½Ö´ï¿½ ï¿½ï¿½ï¿½
+       if ( length > 1 )
+       {
+               pSmsAddrField->DialNumLen = ( pAddrField[local_index++] - 1 ) * 2; // -1�� TON/API ï¿½Êµï¿½
+
+               // SMS_SMSP_ADDRESS_LEN ï¿½ï¿½ï¿½ï¿½ address length ï¿½ï¿½ Å©ï¿½ï¿½ SMS_SMSP_ADDRESS_LEN ï¿½ï¿½Å­ï¿½ï¿½ ï¿½ï¿½È¯ï¿½ï¿½ ï¿½Ñ´ï¿½.
+               if ( pSmsAddrField->DialNumLen > SMS_ADDRESS_LEN_MAX )
+               {
+                       pSmsAddrField->DialNumLen = SMS_ADDRESS_LEN_MAX;
                }
 
-               bcd[j] = ( higher << 4 ) | lower;
+               pSmsAddrField->Ton = ( pAddrField[local_index] & 0x70 ) >> 4;
+               pSmsAddrField->Npi = pAddrField[local_index] & 0x0F;
+
+               local_index++; /* ignore Type of Address field */
+
+               SmsUtilConvertBCD2Digit( (char*) pSmsAddrField->DialNumLen, (char*) &pAddrField[local_index], pSmsAddrField->DialNumLen );
+
+               printf( "SmsUtilDecodeScAddrField: diallingNum [%s].\n", (char*) pSmsAddrField->DialNumLen  );
+
+               printf( "length=%d , ton %d, npi =%d\n",pSmsAddrField->DialNumLen, pSmsAddrField->Ton,pSmsAddrField->Npi );
        }
+
+       return ++length;
 }
 
-int sms_util_pack_gsm_code( unsigned char *out, const char *data, int in_len )
+ int  SmsUtilEncodeScAddrField( unsigned char* pAddrField, SmsAddressInfo_t * pSmsAddrField )
 {
-       int i;
-       int pos;
-       int shift = 0;
+       int local_index = 0;
 
-       for( pos = 0, i = 0; i < in_len; pos++, i++ ) {
-               /* pack the low bits */
-               out[pos] = data[i] >> shift;
+       if ( pSmsAddrField == NULL || pAddrField == NULL )
+               return -1;
 
-               if ( i + 1 < in_len ) {
-                       /* pack the high bits using the low bits of the next character */
-                       out[pos] |= data[i+1] << ( 7 - shift );
-                       shift++;
-                       if( shift == 7 ) {
-                               shift = 0;
-                               i++;
-                       }
-               }
+       // Service Center address ï¿½Êµå¿¡ï¿½ï¿½ï¿½ï¿½ length�� ï¿½Ú¿ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ byte�� ï¿½ï¿½
+       // -> ï¿½ï¿½ï¿½ï¿½ address ï¿½ï¿½ï¿½Ì´ï¿½ TON/API ï¿½ï¿½ï¿½ï¿½Æ®ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½Ï°ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½Æ®ï¿½ï¿½ 2�� or 2�� - 1(���� ï¿½ï¿½ï¿½Ì°ï¿½ È¦ï¿½ï¿½ï¿½Î°ï¿½ï¿½)
+       if ( pSmsAddrField->DialNumLen % 2 )
+       {
+               pAddrField[local_index++] = pSmsAddrField->DialNumLen / 2 + 1 + 1; // +1 ï¿½ï¿½ TON/NPI ï¿½Êµï¿½, È¦ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ß±ï¿½ ï¿½ï¿½ï¿½ï¿½ ï¿½Ñ¹ï¿½ ï¿½ï¿½ +1
+       }
+       else
+       {
+               pAddrField[local_index++] = pSmsAddrField->DialNumLen / 2 + 1; // +1 ï¿½ï¿½ TON/NPI ï¿½Êµï¿½
        }
 
-       /* done */
-       return pos;
+       SET_TON_NPI( pAddrField[local_index], pSmsAddrField->Ton, pSmsAddrField->Npi );
+
+       local_index++; // SET_TON_NPI ï¿½ï¿½ MACRO ï¿½Ì¹Ç·ï¿½ ï¿½ï¿½ï¿½Î¿ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Å°ï¿½ï¿½ ï¿½ï¿½ï¿½×¹ß»ï¿½
+
+       SmsUtilConvertDigit2BCD( (char*) &pAddrField[local_index], (char*) pSmsAddrField->DialNumLen, pSmsAddrField->DialNumLen );
+
+       if ( pSmsAddrField->DialNumLen % 2 )
+               local_index += pSmsAddrField->DialNumLen / 2 + 1;
+       else
+               local_index += pSmsAddrField->DialNumLen / 2;
+
+       return local_index;
 }
 
-int sms_util_encode_addr_field(unsigned char *addr_field, char* dialling_num,
-       int dial_num_len, int ton, int npi)
+void SmsUtilDecodeDCS( Sms_coding_scheme* pCodingScheme,   unsigned char dcs )
 {
-       int index = 0;
+       assert( pCodingScheme != NULL );
 
-       if ( dialling_num == NULL || addr_field == NULL )
-               return -1;
+       memset( pCodingScheme, 0, sizeof ( Sms_coding_scheme ) );
 
-       if ( dialling_num[0] == '+' ) {
-               dialling_num++;
-               dial_num_len--;
-               ton = SMS_TON_INTERNATIONAL;
-       }
+       if ( dcs < 0x40 ) // bits 7..4 = 00xx : general data coding indication
+       {
+               pCodingScheme->coding_group_type = SMS_CODGRP_SM_GENERAL_DCS;
+
+               if ( dcs & 0x20 ) // bit 5 = 1 : indicates the text is compressed
+                       pCodingScheme->bCompressed = TRUE;
+
+               if ( dcs & 0x10 ) // bit 4 = 1 : indicates that bits  1 to 0 have a message class meaning
+               {
+                       pCodingScheme->bmsg_class_set = TRUE;
+
+                       switch ( dcs & 0x03 ) // bits 1 to 0 : message class
+                       {
+                               case 0x00:
+                                       pCodingScheme->class_type = SMS_CLASS_0;
+                                       break;
+                               case 0x01:
+                                       pCodingScheme->class_type = SMS_CLASS_1;
+                                       break;
+                               case 0x02:
+                                       pCodingScheme->class_type = SMS_CLASS_2;
+                                       break;
+                               case 0x03:
+                                       pCodingScheme->class_type = SMS_CLASS_3;
+                                       break;
+                               default :
+                                       /*Do Nothing*/
+                                       msg("Default case executed. Invalid option.");
+                                       break;
+                       }
+               }
+               else // bit 4 = 0 : indicates that bits 1 to 0 are reserved and have no message class meaning
+                       pCodingScheme->class_type = SMS_CLASS_NONE;
 
-       if ( ton != SMS_TON_ALPHA_NUMERIC ) {
-               addr_field[index++] = (unsigned char)dial_num_len;
-       } else {
-               addr_field[index] = (unsigned char) ( ( ( dial_num_len * 7 + 7 ) / 8 ) * 2 );
-               if ( ( ( dial_num_len * 7 ) % 8 ) <= 4 )
-                       addr_field[index]--;
+               switch ( dcs & 0x0C ) // bits 4 to 3 : character set
+               {
+                       case 0x00:
+                               pCodingScheme->alphabet_type = SMS_ALPHABET_DEFAULT;
+                               break;
+                       case 0x04:
+                               pCodingScheme->alphabet_type = SMS_ALPHABET_8BIT;
+                               break;
+                       case 0x08:
+                               pCodingScheme->alphabet_type = SMS_ALPHABET_UCS2;
+                               break;
+                       case 0x0C:
+                               pCodingScheme->alphabet_type = SMS_ALPHABET_MAX;
+                               break;
+                       default :
+                               /*Do Nothing*/
+                               msg("Default case executed. Invalid option.");
+                               break;
+               }
+       }
+       else if ( dcs >= 0x40 && dcs < 0x80 ) // bits 7..4 = 01xx : message marked for automatic deletion group. bits 5..0 are coded exactly the same as group 00xx
+       {
+               pCodingScheme->coding_group_type = SMS_CODGRP_SM_AUTO_DELETION;
+
+               if ( dcs & 0x20 ) // bit 5 = 1 : indicates the text is compressed
+                       pCodingScheme->bCompressed = TRUE;
+
+               if ( dcs & 0x10 ) // bit 4 = 1 : indicates that bits  1 to 0 have a message class meaning
+               {
+                       pCodingScheme->bmsg_class_set = TRUE;
+
+                       switch ( dcs & 0x03 ) // bits 1 to 0 : message class
+                       {
+                               case 0x00:
+                                       pCodingScheme->class_type = SMS_CLASS_0;
+                                       break;
+                               case 0x01:
+                                       pCodingScheme->class_type = SMS_CLASS_1;
+                                       break;
+                               case 0x02:
+                                       pCodingScheme->class_type = SMS_CLASS_2;
+                                       break;
+                               case 0x03:
+                                       pCodingScheme->class_type = SMS_CLASS_3;
+                                       break;
+                               default :
+                                       /*Do Nothing*/
+                                       msg("Default case executed. Invalid option.");
+                                       break;
+                       }
+               }
+               else // bit 4 = 0 : indicates that bits 1 to 0 are reserved and have no message class meaning
+                       pCodingScheme->class_type = SMS_CLASS_NONE;
 
-               msg(" addr len packet: %d out of SMS_TON_ALPAHA\n", addr_field[index]);
-               index++;
+               switch ( dcs & 0x0C ) // bits 4 to 3 : character set
+               {
+                       case 0x00:
+                               pCodingScheme->alphabet_type = SMS_ALPHABET_DEFAULT;
+                               break;
+                       case 0x04:
+                               pCodingScheme->alphabet_type = SMS_ALPHABET_8BIT;
+                               break;
+                       case 0x08:
+                               pCodingScheme->alphabet_type = SMS_ALPHABET_UCS2;
+                               break;
+                       case 0x0C:
+                               pCodingScheme->alphabet_type = SMS_ALPHABET_MAX;
+                               break;
+                       default :
+                               /*Do Nothing*/
+                               msg("Default case executed. Invalid option.");
+                               break;
+               }
+       }
+       // bits 7..4 = 1000 ~ 1011 : reserved
+       else if ( dcs == 0xC0 ) // bits 7..4 = 1100 : message waiting indication group, discard message
+       {
+               pCodingScheme->coding_group_type = SMS_CODGRP_SM_WAITING_DISCARD;
        }
+       else if ( dcs < 0xE0 )
+       {
+               pCodingScheme->coding_group_type = SMS_CODGRP_SM_WAITING_STORE;
+
+               if ( dcs & 0x08 )
+                       pCodingScheme->bmsg_ind_active = TRUE;
 
-       SET_TON_NPI(addr_field[index], ton, npi);
+               switch ( dcs & 0x03 )
+               {
+                       case 0x00:
+                               pCodingScheme->waiting_type = SMS_WAITING_VOICE_MSG;
+                               break;
+                       case 0x01:
+                               pCodingScheme->waiting_type = SMS_WAITING_FAX_MSG;
+                               break;
+                       case 0x02:
+                               pCodingScheme->waiting_type = SMS_WAITING_EMAIL_MSG;
+                               break;
+                       case 0x03:
+                               pCodingScheme->waiting_type = SMS_WAITING_OTHER_MSG;
+                               break;
+                       default :
+                               /*Do Nothing*/
+                               msg("Default case executed. Invalid option.");
+                               break;
+               }
+       }
+       else if ( dcs < 0xF0 )
+       {
+               pCodingScheme->coding_group_type = SMS_CODGRP_SM_WAITING_STORE_UCS2;
 
-       index++;
+               if ( dcs & 0x08 )
+                       pCodingScheme->bmsg_ind_active = TRUE;
 
-       if ( ton != SMS_TON_ALPHA_NUMERIC ) {
-               sms_util_convert_digit_2_bcd( (char*) &addr_field[index], (char*) dialling_num, dial_num_len );
-               index += (dial_num_len + 1) / 2;
-       } else {
-               index += sms_util_pack_gsm_code( &addr_field[index], dialling_num, (int) dial_num_len );
+               switch ( dcs & 0x03 )
+               {
+                       case 0x00:
+                               pCodingScheme->waiting_type = SMS_WAITING_VOICE_MSG;
+                               break;
+                       case 0x01:
+                               pCodingScheme->waiting_type = SMS_WAITING_FAX_MSG;
+                               break;
+                       case 0x02:
+                               pCodingScheme->waiting_type = SMS_WAITING_EMAIL_MSG;
+                               break;
+                       case 0x03:
+                               pCodingScheme->waiting_type = SMS_WAITING_OTHER_MSG;
+                               break;
+                       default :
+                               /*Do Nothing*/
+                               msg("Default case executed. Invalid option.");
+                               break;
+               }
        }
+       else
+       {
+               pCodingScheme->coding_group_type = SMS_CODGRP_SM_CLASS_CODING;
+
+               if ( dcs & 0x04 )
+                       pCodingScheme->alphabet_type = SMS_ALPHABET_8BIT;
 
-       return index;
+               switch ( dcs & 0x03 )
+               {
+                       case 0x00:
+                               pCodingScheme->class_type = SMS_CLASS_0;
+                               break;
+                       case 0x01:
+                               pCodingScheme->class_type = SMS_CLASS_1;
+                               break;
+                       case 0x02:
+                               pCodingScheme->class_type = SMS_CLASS_2;
+                               break;
+                       case 0x03:
+                               pCodingScheme->class_type = SMS_CLASS_3;
+                               break;
+                       default :
+                               /*Do Nothing*/
+                               msg("Default case executed. Invalid option.");
+                               break;
+               }
+       }
 }
 
-void sms_util_encode_dcs( unsigned char *result_dcs, SmsCodingScheme *coding_scheme )
+void SmsUtilEncodeDCS( unsigned char* pDCS, Sms_coding_scheme* pCodingScheme )
 {
        unsigned char dcs = 0x00;
 
-       if( coding_scheme->coding_group_type == SMS_CODGRP_SM_GENERAL_DCS ) { // bit 7..4 is 00xx
-               if ( coding_scheme->compressed )
-                       dcs |= 0x20; // bit 5 is 1
-               if ( coding_scheme->bmsg_class_set ) {
-                       dcs |= 0x10; // bit 4 is 1
-                       if( coding_scheme->class_type== SMS_CLASS_0 )
-                               dcs |= 0x00;
-                       else if ( coding_scheme->class_type == SMS_CLASS_1 )
-                               dcs |= 0x01;
-                       else if ( coding_scheme->class_type == SMS_CLASS_2 )
-                               dcs |= 0x02;
-                       else if ( coding_scheme->class_type == SMS_CLASS_3 )
-                               dcs |= 0x03;
-               }
+       printf("SmsUtilEncodeDCS Start\n");
 
-               switch ( coding_scheme->alphabet_type ) {
-               case SMS_ALPHABET_DEFAULT: // bit 3..2 is 00
-                       dcs |= 0x00;
-                       break;
-               case SMS_ALPHABET_8BIT: // bit 3..2 is 01
-                       dcs |= 0x04;
-                       break;
-               case SMS_ALPHABET_UCS2: // bit 3..2 is 10
-                       dcs |= 0x08;
-                       break;
-               default: // bit 3..2 is 11
-                       dcs |= 0x0C;
-               }
-       } else if ( coding_scheme->coding_group_type == SMS_CODGRP_SM_WAITING_DISCARD ) { // bit 7..4 is 1100
+       assert( pCodingScheme != NULL );
+
+       if( pCodingScheme->coding_group_type == SMS_CODGRP_SM_GENERAL_DCS ) // bit 7..4 is 00xx
+       {
+               if ( pCodingScheme->bCompressed )
+                               dcs |= 0x20; // bit 5 is 1
+
+                       if ( pCodingScheme->bmsg_class_set )
+                       {
+                               dcs |= 0x10; // bit 4 is 1
+
+                               if( pCodingScheme->class_type== SMS_CLASS_0 )
+                                       dcs |= 0x00;
+
+                               else if ( pCodingScheme->class_type == SMS_CLASS_1 )
+                                       dcs |= 0x01;
+
+                               else if ( pCodingScheme->class_type == SMS_CLASS_2 )
+                                       dcs |= 0x02;
+
+                               else if ( pCodingScheme->class_type == SMS_CLASS_3 )
+                                       dcs |= 0x03;
+                       }
+
+                       switch ( pCodingScheme->alphabet_type )
+                       {
+                               case SMS_ALPHABET_DEFAULT: // bit 3..2 is 00
+                               {
+                                       dcs |= 0x00;
+                                       break;
+                               }
+                               case SMS_ALPHABET_8BIT: // bit 3..2 is 01
+                               {
+                                       dcs |= 0x04;
+                                       break;
+                               }
+                               case SMS_ALPHABET_UCS2: // bit 3..2 is 10
+                               {
+                                       dcs |= 0x08;
+                                       break;
+                               }
+                               default: // bit 3..2 is 11
+                               {
+                                       dcs |= 0x0C;
+                                       break;
+                               }
+                       }
+       }
+       else if ( pCodingScheme->coding_group_type == SMS_CODGRP_SM_WAITING_DISCARD ) // bit 7..4 is 1100
+       {
                dcs |= 0xC0;
-       } else if ( coding_scheme->coding_group_type == SMS_CODGRP_SM_WAITING_STORE ) { // bit 7..4 is 1101
+       }
+       else if ( pCodingScheme->coding_group_type == SMS_CODGRP_SM_WAITING_STORE ) // bit 7..4 is 1101
+       {
                dcs |= 0xD0;
-               if ( coding_scheme->bmsg_ind_active ) // bit 3..2 is 10
+
+               if ( pCodingScheme->bmsg_ind_active ) // bit 3..2 is 10
                        dcs |= 0x08;
-               else if( coding_scheme->waiting_type == SMS_WAITING_VOICE_MSG)
+
+               else if( pCodingScheme->waiting_type == SMS_WAITING_VOICE_MSG)
                        dcs |= 0x00;
-               else if( coding_scheme->waiting_type == SMS_WAITING_FAX_MSG)
+
+               else if( pCodingScheme->waiting_type == SMS_WAITING_FAX_MSG)
                        dcs |= 0x01;
-               else if( coding_scheme->waiting_type == SMS_WAITING_EMAIL_MSG) // bit 1..0 is 10
+
+               else if( pCodingScheme->waiting_type == SMS_WAITING_EMAIL_MSG)  // bit 1..0 is 10
                        dcs |= 0x02;
-               else if( coding_scheme->waiting_type == SMS_WAITING_OTHER_MSG) // bit 1..0 is 11
+
+               else if( pCodingScheme->waiting_type == SMS_WAITING_OTHER_MSG)  // bit 1..0 is 11
                        dcs |= 0x03;
-       } else if ( coding_scheme->coding_group_type == SMS_CODGRP_SM_WAITING_STORE_UCS2 ) { // bit 7..4 is 1110
+
+       }
+       else if ( pCodingScheme->coding_group_type == SMS_CODGRP_SM_WAITING_STORE_UCS2 ) // bit 7..4 is 1110
+       {
                dcs |= 0xE0;
-               if ( coding_scheme->bmsg_ind_active ) // bit 3..2 is 10
+
+               if ( pCodingScheme->bmsg_ind_active ) // bit 3..2 is 10
                        dcs |= 0x08;
-               if( coding_scheme->waiting_type == SMS_WAITING_VOICE_MSG ) // bit 1..0 is 00
+
+               if( pCodingScheme->waiting_type == SMS_WAITING_VOICE_MSG ) // bit 1..0 is 00
                        dcs |= 0x00;
-               else if( coding_scheme->waiting_type == SMS_WAITING_FAX_MSG )
+
+               else if( pCodingScheme->waiting_type == SMS_WAITING_FAX_MSG )
                        dcs |= 0x01;
-               else if( coding_scheme->waiting_type == SMS_WAITING_EMAIL_MSG )
+
+               else if( pCodingScheme->waiting_type == SMS_WAITING_EMAIL_MSG )
                        dcs |= 0x02;
-               else if( coding_scheme->waiting_type == SMS_WAITING_OTHER_MSG )
+
+               else if( pCodingScheme->waiting_type == SMS_WAITING_OTHER_MSG )
                        dcs |= 0x03;
-       } else if ( coding_scheme->coding_group_type == SMS_CODGRP_SM_CLASS_CODING ) { // bit 7..4 is 1111
+       }
+       else if ( pCodingScheme->coding_group_type == SMS_CODGRP_SM_CLASS_CODING )      // bit 7..4 is 1111
+       {
                dcs |= 0xF0;
-               if( coding_scheme->alphabet_type == SMS_ALPHABET_DEFAULT ) // bit 2 is 0
+
+               if( pCodingScheme->alphabet_type == SMS_ALPHABET_DEFAULT )      // bit 2 is 0
                        dcs |= 0x00;
-               else if( coding_scheme->alphabet_type == SMS_ALPHABET_8BIT ) // bit 2 is 1
+               else if( pCodingScheme->alphabet_type == SMS_ALPHABET_8BIT ) // bit 2 is 1
                        dcs |= 0x04;
-               if( coding_scheme->class_type == SMS_CLASS_0) // bit 1..0 is 00
-                       dcs |= 0x00;
-               else if( coding_scheme->class_type == SMS_CLASS_1) // bit 1..0 is 01
+
+               if( pCodingScheme->class_type == SMS_CLASS_0) // bit 1..0 is 00
+                       ;
+
+               else if( pCodingScheme->class_type == SMS_CLASS_1) // bit 1..0 is 01
                        dcs |= 0x01;
-               else if( coding_scheme->class_type == SMS_CLASS_2) // bit 1..0 is 10
+
+               else if( pCodingScheme->class_type == SMS_CLASS_2) // bit 1..0 is 10
                        dcs |= 0x02;
-               else if( coding_scheme->class_type == SMS_CLASS_3) // bit 1..0 is 11
+
+               else if( pCodingScheme->class_type == SMS_CLASS_3) // bit 1..0 is 11
                        dcs |= 0x03;
        }
-       memcpy( result_dcs, &dcs, sizeof ( unsigned char ) );
+
+       memcpy( pDCS, &dcs, sizeof ( unsigned char ) );
+
+       printf("SmsUtilEncodeDCS End\n");
 }
 
-unsigned char sms_util_encode_validity( unsigned char *validity, SmsVp *vp )
+unsigned char SmsUtilEncodeValidity( unsigned char* pValidity, Sms_vp* pVP )
 {
        unsigned char pos = 0;
 
-       switch( vp->vp_type ) {
-       case SMS_VP_NOT_USED:
-       case SMS_VP_ENHANCED:
-               break;
-       case SMS_VP_RELATIVE:
-               validity[pos] = (unsigned char) vp->vp_value;
-               pos ++;
-               break;
-       case SMS_VP_ABSOLUTE:
-               //TO DO
-               //SmsUtilEncodeTimeStamp( validity, vp->vpValue );
-               pos += 7;
+       switch( pVP->vp_type )
+       {
+               case SMS_VP_NOT_USED:
+                       break;
+
+               case SMS_VP_RELATIVE:
+                       pValidity[pos] = (unsigned char) pVP->vpValue;
+                       pos ++;
+                       break;
+
+               case SMS_VP_ABSOLUTE:
+                       //TO DO
+                       //SmsUtilEncodeTimeStamp( pValidity, pVP->vpValue );
+                       pos += 7;
+                       break;
+
+               case SMS_VP_ENHANCED:
+                       break;
+
+               default :
+                       /*Do Nothing*/
+                       msg("Default Case executed. Invalid Option.");
+                       break;
        }
+
        return pos;
 }
 
+void __util_hex_dump(const char *pad, int size, const void *data)
+{
+       char buf[255] = {0, };
+       char hex[4] = {0, };
+       int i = 0;
+       unsigned char *p = NULL;
+
+       if (0 >= size) {
+               msg("%sno data", pad);
+               return;
+       }
+
+       p = (unsigned char *)data;
+
+       g_snprintf(buf, 255, "%s%04X: ", pad, 0);
+       for (i = 0; i<size; i++) {
+               g_snprintf(hex, 4, "%02X ", p[i]);
+               memcpy(buf+strlen(buf), hex, 4);
+
+               if ((i + 1) % 8 == 0) {
+                       if ((i + 1) % 16 == 0) {
+                               msg("%s", buf);
+                               memset(buf, 0, 255);
+                               snprintf(buf, 255, "%s%04X: ", pad, i + 1);
+                       }
+                       else {
+                               strcat(buf, "  ");
+                       }
+               }
+       }
+
+       msg("%s", buf);
+}
+
+unsigned char __sms_hexchar_to_int(char ch)
+{
+       msg("Entered with character [%c]", ch);
+
+       if (ch >= '0' && ch <= '9')
+               return (ch - '0');
+       else if (ch >= 'A' && ch <= 'F')
+               return (ch - 'A' + 10);
+       else if (ch >= 'a' && ch <= 'f')
+               return (ch - 'a' + 10);
+       else {
+               msg("Invalid Charater");
+               return -1;
+       }
+}
+gboolean __sms_asciistring_to_hex(const char *ascii_string,
+                                       unsigned char *hex_string,
+                                       int ascii_len)
+{
+       int i;
+       if (ascii_string == NULL || hex_string == NULL) {
+               msg("Empty strings");
+               return FALSE;
+       }
+       msg("Convert ASCII String to Hex");
+
+       /* Make sure ASCII len is even */
+       if (ascii_len % 2 == 0) {
+               for (i = 0; i < ascii_len;  i += 2) {
+                       hex_string[i / 2] =
+                               (char)(((__sms_hexchar_to_int(ascii_string[i]) << 4) |
+                                   __sms_hexchar_to_int(ascii_string[i+1])));
+                                       msg("[%02x]", hex_string[i / 2]);
+
+               }
+       } else {                /* Odd ASCII len */
+               for (i = 0; i < ascii_len; i += 2) {
+                       if (i == ascii_len - 1) {
+                               hex_string[i/2 ] =
+                                   (char)((__sms_hexchar_to_int(ascii_string[i]) << 4) | 0x0F);
+                                               msg("[%02x]", hex_string[i/2]);
+                       } else {
+                               hex_string[i/2] =
+                                   (char)(((__sms_hexchar_to_int(ascii_string[i]) << 4) |
+                                           __sms_hexchar_to_int(ascii_string[i+1])));
+                                               msg("[%02x]", hex_string[i/2 ]);
+                       }
+               }
+       }
+       return TRUE;
+}
+
+/*Bit Array Copy for Cdma Encoding*/
+#define PREPARE_FIRST_COPY()                                      \
+    do {                                                          \
+    if (src_len >= (CHAR_BIT - dst_offset_modulo)) {              \
+        *dst     &= reverse_mask[dst_offset_modulo];              \
+        src_len -= CHAR_BIT - dst_offset_modulo;                  \
+    } else {                                                      \
+        *dst     &= reverse_mask[dst_offset_modulo]               \
+              | reverse_mask_xor[dst_offset_modulo + src_len + 1];\
+         c       &= reverse_mask[dst_offset_modulo + src_len    ];\
+        src_len = 0;                                              \
+    } } while (0)
+
+void bitarray_copy(const unsigned char *src_org, int src_offset, int src_len,  unsigned char *dst_org, unsigned int dst_offset)
+{
+    //static const unsigned char mask[] =
+        //{ 0x55, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff };
+    static const unsigned char reverse_mask[] =
+        { 0x55, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff };
+    static const unsigned char reverse_mask_xor[] =
+        { 0xff, 0x7f, 0x3f, 0x1f, 0x0f, 0x07, 0x03, 0x01, 0x00 };
+
+    if (src_len) {
+        const unsigned char *src;
+              unsigned char *dst;
+        int                  src_offset_modulo,
+                             dst_offset_modulo;
+
+        src = src_org + (src_offset / CHAR_BIT);
+        dst = dst_org + (dst_offset / CHAR_BIT);
+
+        src_offset_modulo = src_offset % CHAR_BIT;
+        dst_offset_modulo = dst_offset % CHAR_BIT;
+
+        if (src_offset_modulo == dst_offset_modulo) {
+            int              byte_len;
+            int              src_len_modulo;
+            if (src_offset_modulo) {
+                unsigned char   c;
+
+                c = reverse_mask_xor[dst_offset_modulo]     & *src++;
+
+                PREPARE_FIRST_COPY();
+                *dst++ |= c;
+            }
+
+            byte_len = src_len / CHAR_BIT;
+            src_len_modulo = src_len % CHAR_BIT;
+
+            if (byte_len) {
+                memcpy(dst, src, byte_len);
+                src += byte_len;
+                dst += byte_len;
+            }
+            if (src_len_modulo) {
+                *dst     &= reverse_mask_xor[src_len_modulo];
+                *dst |= reverse_mask[src_len_modulo]     & *src;
+            }
+        } else {
+            int             bit_diff_ls,
+                            bit_diff_rs;
+            int             byte_len;
+            int             src_len_modulo;
+            unsigned char   c;
+            /*
+             * Begin: Line things up on destination.
+             */
+            if (src_offset_modulo > dst_offset_modulo) {
+                bit_diff_ls = src_offset_modulo - dst_offset_modulo;
+                bit_diff_rs = CHAR_BIT - bit_diff_ls;
+
+                c = *src++ << bit_diff_ls;
+                c |= *src >> bit_diff_rs;
+                c     &= reverse_mask_xor[dst_offset_modulo];
+            } else {
+                bit_diff_rs = dst_offset_modulo - src_offset_modulo;
+                bit_diff_ls = CHAR_BIT - bit_diff_rs;
+
+                c = *src >> bit_diff_rs     &
+                    reverse_mask_xor[dst_offset_modulo];
+            }
+            PREPARE_FIRST_COPY();
+            *dst++ |= c;
+
+            /*
+             * Middle: copy with only shifting the source.
+             */
+            byte_len = src_len / CHAR_BIT;
+
+            while (--byte_len >= 0) {
+                c = *src++ << bit_diff_ls;
+                c |= *src >> bit_diff_rs;
+                *dst++ = c;
+            }
+
+            /*
+             * End: copy the remaing bits;
+             */
+            src_len_modulo = src_len % CHAR_BIT;
+            if (src_len_modulo) {
+                c = *src++ << bit_diff_ls;
+                c |= *src >> bit_diff_rs;
+                c     &= reverse_mask[src_len_modulo];
+
+                *dst     &= reverse_mask_xor[src_len_modulo];
+                *dst |= c;
+            }
+        }
+    }
+}
index ca369b8d93d47dbf38884daa99cbb9664e4e11e6..23b0b86275205178428b4596459ce533bd2f7924 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <errno.h>
 #include "assert.h"
 #include "glib.h"
-#include "menu.h"
 
-#define SMS_ADDRESS_LEN_MAX 20
+#define MAX_UDH_LEN                    137
+#define UDH_MAX                                        7
 
-#define BASE_YEAR 70L /* 1970 is the base year */
-#define MAX_YEAR 130L /* 2030 is the max year */
+#define SMS_SMSP_ALPHA_ID_LEN_MAX                      128             /* EF-SMSP alpha id length */
 
-#define SET_TON_NPI(dest, ton, npi) { \
-       dest = 0x80; \
-       dest |= (ton & 0x07) << 4; \
-       dest |= npi & 0x0F; \
-}
+#define SMS_MSG_SIZE_MAX                               918
+#define SMS_CB_SIZE_MAX                                93
+#define SMS_ADDRESS_LEN_MAX                    20
+#define SMS_SCADDRESS_LEN_MAX          18
+
+#define SMS_CB_PAGE_SIZE_MAX                           9               /**< CB maximum page size*/
+#define SMS_GSM_SMS_MSG_NUM_MAX                        255             /**< Maximum GSM SMS message number*/
+#define SMS_GSM_SMS_CBMI_LIST_SIZE_MAX         50              /**< Maximum GSM SMS CBMI list size*/
+#define SMS_SMDATA_SIZE_MAX                                    255             /**< Maximum SMS data size that can be stored*/
+#define SMS_MAX_SMS_SERVICE_CENTER_ADDR                12              /**<Maximum SMS service center address*/
+#define SMS_MAX_INDEX                                          25              /**< Maximum index value for SMS */
+
+#define FAIL                   0x00
+#define SUCCESS                0x01
 
 typedef enum
 {
-       SMS_CODGRP_SM_GENERAL_DCS,
-       SMS_CODGRP_CB_GENERAL_LANG,
-       SMS_CODGRP_CB_ALPHA,
-       SMS_CODGRP_CB_RES1,
-       SMS_CODGRP_CB_RES2,
-       SMS_CODGRP_SM_AUTO_DELETION, /* 01xx Bits 5..0 are coded the same as SM_GENERAL_DCS */
-       SMS_CODGRP_CB_GENERAL_DCS, /* 01xx behavior is as SM_GENERAL_DCS */
-       SMS_CODGRP_SM_WAITING_DISCARD,
-       SMS_CODGRP_SM_WAITING_STORE,
-       SMS_CODGRP_SM_WAITING_STORE_UCS2,
-       SMS_CODGRP_CB_WAP,
-       SMS_CODGRP_SM_CLASS_CODING,
-       SMS_CODGRP_CB_CLASS_CODING,
-       SMS_CODGRP_MAX
-} SmsCodingGroupType;
+       SMS_STATUS_READ,                                                /**< MT message, stored and read */
+       SMS_STATUS_UNREAD,                                      /**< MT message, stored and unread */
+       SMS_STATUS_SENT,                                                /**< MO message, stored and  sent */
+       SMS_STATUS_UNSENT,                                      /**< MO message, stored but not sent */
+       SMS_STATUS_DELIVERED,                                   /**< delivered destination */
+       SMS_STATUS_DELIVERY_UNCONFIRMED,        /**< Service centre forwarded message but is unable to confirm delivery*/
+       SMS_STATUS_MESSAGE_REPLACED,            /**< Message has been replaced*/
+       SMS_STATUS_RESERVED                                     /**< Reserved for future use*/
+} SMS_MsgStatus;
 
 typedef enum
 {
-        SMS_WAITING_VOICE_MSG, /* voice message waiting */
-        SMS_WAITING_FAX_MSG, /* FAX message waiting */
-        SMS_WAITING_EMAIL_MSG, /* E-mail waiting */
-        SMS_WAITING_OTHER_MSG, /* Other message waiting */
-        SMS_WAITING_MAX
-} SmsWaitingType;
+       SMS_SENDSMS_SUCCESS = 0x00,                                     /**<Message send success*/
+       SMS_ROUTING_NOT_AVAILABLE,                                      /**< Message routing not available*/
+       SMS_INVALID_PARAMETER,                                          /**< Invalid parameter present in TPDU*/
+       SMS_DEVICE_FAILURE,                                                     /**< Device failure*/
+       SMS_SERVICE_RESERVED,                                                   /**< Reserved Service*/
+       SMS_INVALID_LOCATION,                                                   /**< Invalid location*/
+       SMS_NO_SIM,                                                             /**< No SIM error*/
+       SMS_SIM_NOT_READY,                                                      /**< SIM not ready error*/
+       SMS_NO_NETWORK_RESP,                                                    /**< No response from network*/
+       SMS_DEST_ADDRESS_FDN_RESTRICTED,                        /**< Destination address restricted*/
+       SMS_SCADDRESS_FDN_RESTRICTED,                           /**< Service center address restricted*/
+       SMS_RESEND_ALREADY_DONE,                                        /**< Resend a operation already done*/
+       SMS_SCADDRESS_NOT_AVAILABLE,                            /**< SCA address not available*/
+       SMS_UNASSIGNED_NUMBER = 0x8001,                         /**< Unassigned number*/
+       SMS_OPERATOR_DETERMINED_BARRING = 0x8008,       /**< Operator determined barring*/
+       SMS_CALL_BARRED = 0x800A,                                               /**< Call barred*/
+       SMS_MESSAGE_TRANSFER_REJECTED = 0x8015,         /**< Message transfer rejected*/
+       SMS_MEMORY_CAPACITY_EXCEEDED = 0x8016,          /**< Memory capacity exceeded/memory full*/
+       SMS_DESTINAITION_OUTOFSERVICE = 0x801B,         /**< Destination number/address out of service*/
+       SMS_UNSPECIFIED_SUBSCRIBER = 0x801C,                    /**< Unspecified subscriber*/
+       SMS_FACILITY_REJECTED = 0x801D,                         /**< Facility rejected*/
+       SMS_UNKNOWN_SUBSCRIBER = 0x801E,                                /**< Unknown subscriber*/
+       SMS_NETWORK_OUTOFORDER = 0x8026,                        /**< Network out of order*/
+       SMS_TEMPORARY_FAILURE = 0x8029,                         /**< Temporary failure*/
+       SMS_CONGESTION = 0x802A,                                                /**< Congestion happened*/
+       SMS_RESOURCES_UNAVAILABLE = 0x802F,                     /**< Resource unavailable*/
+       SMS_FACILITY_NOT_SUBSCRIBED = 0x8032,                   /**< Facility not subscribed by the user*/
+       SMS_FACILITY_NOT_IMPLEMENTED = 0x8045,          /**< Facility not implemented*/
+       SMS_INVALID_REF_VALUE = 0x8051,                         /**< Invalid reference value*/
+       SMS_INVALID_MSG = 0x805F,                                               /**< Invalid message*/
+       SMS_INVALID_MANDATORY_INFO = 0x8060,                    /**< Invalid Mandatory information*/
+       SMS_MESSAGE_TYPE_NOT_IMPLEMENTED = 0x8061,      /**< Message type not implemented*/
+       SMS_MESSAGE_NOT_COMPAT_PROTOCOL = 0x8062,       /**< Message not compact protocol*/
+       SMS_IE_NOT_IMPLEMENTED = 0x8063,                         /**< Information element not implemented*/
+       SMS_PROTOCOL_ERROR = 0x806F,                                    /**< Protocol error*/
+       SMS_INTERWORKING = 0x807F,                                      /**< Networking error*/
+       SMS_ME_FULL = 0x8080,                                                   /**< SMS ME FULL */
+       SMS_SIM_FULL = 0x8081,                                                  /**< SMS SIM FULL */
+       SMS_TIMEOUT                                                                     /**< Timeout error */
+} Sms_Response;
 
+//////////////////////////////////TPDU type////////////////////////////////
 typedef enum
 {
-       SMS_ALPHABET_DEFAULT, /* GSM alphabet default 7bit */
-       SMS_ALPHABET_8BIT, /* 8bit */
-       SMS_ALPHABET_UCS2, /* 16bit ucs2 */
-       SMS_ALPHABET_KSC5601, /* for Korean */
-       SMS_ALPHABET_MAX
-} SmsAlphabetType;
+       SMS_TPDU_DELIVER                                = 0x00, // sc -> ms
+       SMS_TPDU_DELIVER_REPORT         = 0x00, // ms -> sc
+       SMS_TPDU_SUBMIT                         = 0x01, // ms -> sc
+       SMS_TPDU_SUBMIT_REPORT          = 0x01, // sc -> ms
+       SMS_TPDU_STATUS_REPORT          = 0x02, // sc -> ms
+       SMS_TPDU_COMMAND                                = 0x02, // ms -> sc
+       SMS_PDU_INVALID_TYPE
+
+} SmsTPDUType;
 
 typedef enum
 {
-       SMS_CLASS_0, /* display immediately */
-       SMS_CLASS_1, /* may be stored */
-       SMS_CLASS_2, /* store in SIM */
-       SMS_CLASS_3, /* transfer to TE */
-       SMS_CLASS_NONE,
-       SMS_CLASS_MAX
-} SmsClassType;
+       SMS_DAEMON_UNKNOWN_MESSAGE,
+       SMS_DAEMON_RECEIVED_UNREAD_MESSAGE,
+       SMS_DAEMON_RECEIVED_READ_MESSAGE,
+       SMS_DAEMON_UNSENT_MESSAGE,
+       SMS_DAEMON_STORED_SENT_MESSAGE,
+
+} sd_message_status;
 
 typedef enum
 {
@@ -95,18 +136,7 @@ typedef enum
        SMS_TON_ALPHA_NUMERIC = 5, /**< alphanumeric, GSM 7-bit default alphabet) */
        SMS_TON_ABBREVIATED_NUMBER = 6, /**< abbreviated number */
        SMS_TON_RESERVED_FOR_EXT = 7 /**< reserved for extension */
-} SimTon;
-
-typedef enum
-{
-       SMS_TPDU_DELIVER = 0x00, // sc -> ms
-       SMS_TPDU_DELIVER_REPORT = 0x00, // ms -> sc
-       SMS_TPDU_SUBMIT = 0x01, // ms -> sc
-       SMS_TPDU_SUBMIT_REPORT = 0x01, // sc -> ms
-       SMS_TPDU_STATUS_REPORT = 0x02, // sc -> ms
-       SMS_TPDU_COMMAND = 0x02, // ms -> sc
-       SMS_PDU_INVALID_TYPE
-} SmsTpduType;
+} SimTypeOfNum_t;
 
 typedef enum
 {
@@ -120,17 +150,112 @@ typedef enum
        SMS_NPI_PRIVATE = 9, /**< Private numbering plan */
        SMS_NPI_ERMES_NUMBERING_PLAN = 10, /**< ERMES numbering plan */
        SMS_NPI_RESERVED_FOR_EXT = 0xF /**< Reserved for extension */
-} SimNumberingPlanIdentity;
+} SimNumberingPlanIdentity_t;
+
+typedef struct {
+       unsigned int DialNumLen; /**< length of address. If Service center address is not set, then this will be zero */
+       SimTypeOfNum_t Ton; /**< Type of number*/
+       SimNumberingPlanIdentity_t Npi; /**<Numbering plan identification*/
+       unsigned char szDiallingNum[SMS_ADDRESS_LEN_MAX + 1]; /**< destination address. If Address not set, then set to 0xFF */
+} SmsAddressInfo_t;
 
+/*
+ * Sms_vp_type
+ * This enumeration defines the validity period type.
+ */
 typedef enum
 {
-       SMS_VP_NOT_USED = 0, /**< validity period not used */
-       SMS_VP_RELATIVE = 2, /**< after a predetermined time period after the service center has received the message */
+       SMS_VP_NOT_USED = 0,            /**< validity period not used */
+       SMS_VP_RELATIVE = 2,            /**< after a predetermined time period after the service center has received the message */
        SMS_VP_ABSOLUTE = 3,
        SMS_VP_ENHANCED = 1,
+
        SMS_VP_MAX
-} SmsVpType;
+} Sms_vp_type;
+/*
+ * Sms_coding_group_type
+ This enum defined the different sms coding group types
+ */
+typedef enum
+{
+       SMS_CODGRP_SM_GENERAL_DCS,                      /**< Bits 7..4 00xx */
+       SMS_CODGRP_CB_GENERAL_LANG,             /**< 0000 */
+       SMS_CODGRP_CB_ALPHA,                            /**< 0001 */
+       SMS_CODGRP_CB_RES1,                             /**< 0010 */
+       SMS_CODGRP_CB_RES2,                             /**< 0011 */
+       SMS_CODGRP_SM_AUTO_DELETION,            /**< 01xx Bits 5..0 are coded the same as SM_GENERAL_DCS */
+       SMS_CODGRP_CB_GENERAL_DCS,                      /**< 01xx behavior is as SM_GENERAL_DCS */
+       SMS_CODGRP_SM_WAITING_DISCARD,          /**< 1100 */
+       SMS_CODGRP_SM_WAITING_STORE,            /**< 1101 */
+       SMS_CODGRP_SM_WAITING_STORE_UCS2,       /**< 1110 */
+       SMS_CODGRP_CB_WAP,                                      /**< 1110 Cell Broadcast */
+       SMS_CODGRP_SM_CLASS_CODING,             /**< 1111 */
+       SMS_CODGRP_CB_CLASS_CODING,             /**< 1111 Cell Broadcast */
+
+       SMS_CODGRP_MAX
+} Sms_coding_group_type;
+/*
+ *  Sms_waiting_type
+ Defines different types of waiting indicators
+ */
+typedef enum
+{
+       SMS_WAITING_VOICE_MSG,          /**< voice message waiting */
+       SMS_WAITING_FAX_MSG,            /**< FAX message waiting */
+       SMS_WAITING_EMAIL_MSG,          /**< E-mail waiting */
+       SMS_WAITING_OTHER_MSG,          /**< Other message waiting */
+
+       SMS_WAITING_MAX
+} Sms_waiting_type;
+/*
+ * Sms_alphabet_type
+ Defines different alphabet types of an sms
+ */
+typedef enum
+{
+       SMS_ALPHABET_DEFAULT,   /**< GSM alphabet default 7bit */
+       SMS_ALPHABET_8BIT,              /**< 8bit */
+       SMS_ALPHABET_UCS2,              /**< 16bit ucs2 */
+
+       SMS_ALPHABET_KSC5601,   /**< for Korean */
+
+       SMS_ALPHABET_MAX
+} Sms_alphabet_type;
+/*
+ * Sms_class_type
+ This enum defines the different classes of SMS which indicates the
+ type of storage of the sms.
+ */
+typedef enum
+{
+       SMS_CLASS_0,    /**< display immediately */
+       SMS_CLASS_1,    /**< may be stored */
+       SMS_CLASS_2,    /**< store in SIM */
+       SMS_CLASS_3,    /**< transfer to TE */
+       SMS_CLASS_NONE,
+
+       SMS_CLASS_MAX
+} Sms_class_type;
+
+/*
+This structure contains the information related to sms coding schemes
+
+*/
+typedef struct
+{
+       int                                                     bCompressed;            /**< if text is compressed this is TRUE */
+       int                                                     bmsg_class_set;         /**< message class indication. if TRUE = bits 1..0, if FALSE = reserved */
+       int                                                     bmsg_ind_active;                /**< message indication group. if TRUE = on, FALSE = off */
+       Sms_coding_group_type           coding_group_type;      /**< Coding group, GSM 03.38 */
+       Sms_waiting_type                        waiting_type;           /**< Type of message waiting */
+       Sms_alphabet_type                       alphabet_type;          /**< How to encode a message. */
+       Sms_class_type                  class_type;                     /**< The message class */
+} Sms_coding_scheme;
 
+/*
+ *  Sms_vp_rel_Value
+ * This structure defines the validity period types.
+ */
 typedef enum
 {
        SMS_VP_REL_1H,          /**< One hour */
@@ -141,118 +266,297 @@ typedef enum
        SMS_VP_REL_1W,          /**< One week */
        SMS_VP_REL_1M,          /**< One Month */
        SMS_VP_REL_MAX          /**< Max = 63 weeks */
-} SmsVpRelValue;
+} Sms_vp_rel_Value;
+/*
+This structure contains all the information
+related to validity period of a message.
 
+*/
 typedef struct
 {
-       gboolean compressed; /* if text is compressed this is TRUE */
-       gboolean bmsg_class_set; /* message class indication. if TRUE = bits 1..0, if FALSE = reserved */
-       gboolean bmsg_ind_active; /* message indication group. if TRUE = on, FALSE = off */
-       SmsCodingGroupType coding_group_type; /* Coding group, GSM 03.38 */
-       SmsWaitingType waiting_type; /* Type of message waiting */
-       SmsAlphabetType alphabet_type; /* How to encode a message. */
-       SmsClassType class_type; /* The message class */
-} SmsCodingScheme;
+       Sms_vp_type vp_type;                      /**< Validity period format */
+       Sms_vp_rel_Value vp_rel_type; /**< Validity period value duration the message must retain in the service center while application attempts delivery */
+       unsigned long vpValue;                                            /** Validity period value */
+} Sms_vp;
+
+
+/* This structure contains the details of delete status notification, which comes after calling
+TelTapiSmsDeleteMsg*/
+typedef struct
+{
+       unsigned short result;
+       unsigned char index;
+}TelTapiSmsDeleteMsg_status_ind;
 
-typedef struct {
-       unsigned int dial_num_len; /**< length of address. If Service center address is not set, then this will be zero */
-       SimTon ton; /**< Type of number*/
-       SimNumberingPlanIdentity npi; /**<Numbering plan identification*/
-       unsigned char sz_dialling_num[SMS_ADDRESS_LEN_MAX + 1]; /**< destination address. If Address not set, then set to 0xFF */
-} SmsAddrInfo;
+
+/* This structure contains the details of save status notification, which comes after calling
+TelTapiSmsWriteMsg*/
 
 typedef struct
 {
-       int year;
-       int month;
-       int day;
-       int hour;
-       int minute;
-       int second;
+       unsigned short result;
+       unsigned char index;
+}Sms_save_status_ind;
+
+
+typedef struct
+{
+       int             year;
+       int             month;
+       int             day;
+       int             hour;
+       int             minute;
+       int             second;
+
 } TmDateTime;
 
+
+#define BASE_YEAR              70L                                     /* 1970 is the base year */
+#define MAX_YEAR                       130L                                    /* 2030 is the max year */
+
+
+#define        SIM_SMSP_ADDRESS_LEN                                    20      // digit length
+
+#define SET_TON_NPI(dest, ton, npi) {  \
+       dest = 0x80;                                            \
+       dest |= (ton & 0x07) << 4;                      \
+       dest |= npi & 0x0F;                                     \
+}
+
+
+
+
+typedef struct
+{
+       /************HEADER************/
+
+       // message type [M]
+       SmsTPDUType  msg_type ;   //bit 0 ,1
+
+       // reject duplicates [M]
+       int rd ;  // bit 2
+
+       // validity period format [M]
+       Sms_vp_type vpf ; //  bits 3, 4
+
+       // reply path [M]
+       int rp ; //bit 7
+
+       // user data header indication
+       int udhi ;   //bit 6
+
+       // status report request
+       int  srr ;  // bit 5
+
+       /************BODY************/
+       //message reference [M]
+       unsigned int mr;
+
+       // destination address [M]
+       SmsAddressInfo_t desAddr;
+
+       // protocol identifier [M]
+       unsigned char pId;
+
+       // data coding scheme [M]
+       Sms_coding_scheme dcs;
+
+       // validity period
+       Sms_vp vp;
+
+       // user data length [M]
+       unsigned int udl;
+
+       // user data
+       char *userData;
+
+
+}TPDU_SMS_SUBMIT;
+
+typedef struct
+{
+       /************HEADER************/
+
+       // message type [M]
+       SmsTPDUType  msg_type;  //bit 0 ,1
+
+       // user data header indication
+       int udhi ;   //bit 6
+
+       /************BODY************/
+
+       // failure Cause [M]
+        unsigned int   fcs;
+
+       // parameter indicator [M]
+       unsigned char paraInd;
+
+       // service centre time stamp [M]
+       TmDateTime scts;
+
+       // protocol identifier [M]
+       unsigned char pId;
+
+       // data coding scheme
+       Sms_coding_scheme dcs;
+
+       // user data length [M]
+       unsigned int udl;
+
+       // user data
+       char*  userData;
+
+}TPDU_SMS_SUBMIT_REPORT;
+
+
 typedef struct
 {
        /************HEADER************/
-       SmsTpduType msg_type;   //bit 0 ,1
+       SmsTPDUType msg_type;   //bit 0 ,1
+
        int mms; // bit 2
+
        int rp; // bit 7
+
        int udhi;  //bit 6
+
        int sri; // bit , 5status_report_indication
 
        /************BODY************/
-       SmsAddrInfo org_addr;
-       unsigned char  pid;
+
+       SmsAddressInfo_t orgAddr;
+
+       unsigned char  pId;
+
        TmDateTime scts;
-       SmsCodingScheme dcs;
+
+       Sms_coding_scheme dcs;
+
        unsigned int udl;
-       char  *user_data;
-} TpduSmsDeliver;
 
-typedef struct {
-       unsigned int dial_num_len; /**< length of address. If Service center address is not set, then this will be zero */
-       SimTon ton; /**< Type of number*/
-       SimNumberingPlanIdentity npi; /**<Numbering plan identification*/
-       unsigned char dialling_num[SMS_ADDRESS_LEN_MAX + 1]; /**< destination address. If Address not set, then set to 0xFF */
-} SmsAddressInfo;
+       char  * userData;
+
+}TPDU_SMS_DELIVER;
 
 typedef struct
 {
-       SmsVpType vp_type; /**< Validity period format */
-       SmsVpRelValue vp_rel_type; /**< Validity period value duration the message must retain in the service center while application attempts delivery */
-       unsigned long vp_value; /** Validity period value */
-} SmsVp;
+       /************HEADER************/
+       SmsTPDUType msg_type ;   //bit 0 ,1
+
+       int udhi ;  //bit 6
+
+       /************BODY************/
+
+       unsigned int fcs;
+
+       unsigned char paraInd;
+
+       unsigned char pId;
+
+       Sms_coding_scheme dcs;
+
+       unsigned int udl;
+
+       unsigned char * userData;
+
+}TPDU_SMS_DELIVER_REPORT;
+
 
 typedef struct
 {
        /************HEADER************/
-       SmsTpduType  msg_type; /* bit 0 ,1 (message type) */
-       int rd; /* bit 2 (reject duplicates) */
-       SmsVpType vpf; /* bits 3, 4 (validity period format) */
-       int rp; /* bit 7 (reply path) */
-       int udhi; /* bit 6 (user data header indication) */
-       int  srr; /* bit 5 (status report request) */
+       SmsTPDUType msg_type ;   //bit 0 ,1
+
+       int udhi ; //bit 6
+
+       int srr; //bit 5, status_report_request
 
        /************BODY************/
-       unsigned int mr; /* (message reference) */
-       SmsAddressInfo dest_addr; /*(destination address) */
-       unsigned char pid; /* (protocol identifier) */
-       SmsCodingScheme dcs; /* (data coding scheme) */
-       SmsVp vp; /* (validity period) */
-       unsigned int udl; /* (user data length) */
-       char *user_data; /* (user data) */
-} TpduSmsSubmit;
+
+       unsigned int  mr; //message_ref
+
+       unsigned char pId;
+
+       unsigned char cmdType;
+
+       unsigned char msgNum;
+
+       SmsAddressInfo_t destAddr;
+
+       unsigned int udl;
+
+       unsigned char * userData;
+
+}TPDU_SMS_COMMAND;
+
 
 typedef struct
 {
        /************HEADER************/
-       SmsTpduType msg_type; //bit 0 ,1
-       int udhi; //bit 6
-       int mms; //bit 2
+
+       SmsTPDUType msg_type ;   //bit 0 ,1
+
+       int  udhi ; //bit 6
+
+       int mms ; //bit 2
+
        int srq; //bit 5, status_report_qualifier
 
        /************BODY************/
-       unsigned int mr;
-       SmsAddressInfo rcp_addr; //recipient_addr
+
+       unsigned int  mr;
+
+       SmsAddressInfo_t rcpAddr; //recipient_addr
+
        TmDateTime scts;
+
        TmDateTime dt; //discharge_time
-       unsigned char status;
-       unsigned char para_ind;
-       unsigned char pid;
-       SmsCodingScheme dcs;
+
+        unsigned char  status;
+
+        unsigned char paraInd;
+
+       unsigned char pId;
+
+       Sms_coding_scheme dcs;
+
        unsigned int udl;
-       char * user_data;
-}TpduSmsStatusReport;
-
-void sms_util_decode_dcs(SmsCodingScheme *coding_scheme, unsigned char dcs);
-void sms_util_convert_bcd_2_digit( char* digits, char* bcd, int digit_len );
-char *sms_util_unpack_gsm_code(char *sz_data, const char *in, int in_len );
-int sms_util_decode_addr_field(char *dialling_num, char* addr_field, int *result_ton, int *result_npi);
-TmDateTime *sms_util_decode_time_stamp(char *time_stamp, TmDateTime *tm_date_time );
-void sms_util_convert_digit_2_bcd( char *bcd, char *digits, int digit_len );
-int sms_util_pack_gsm_code( unsigned char *out, const char *data, int in_len );
-int sms_util_encode_addr_field(unsigned char *addr_field, char* dialling_num,
-       int dial_num_len, int ton, int npi);
-void sms_util_encode_dcs( unsigned char *result_dcs, SmsCodingScheme *coding_scheme );
-unsigned char sms_util_encode_validity( unsigned char *validity, SmsVp *vp );
+
+       char * userData;
+
+}TPDU_SMS_STATUS_REPORT;
+
+/***************************************************************************************/
+void reverse(char* x, int len);
+char* AcItoa(int n, char* str, int b) ;
+int AcToupper(int ch);
+
+char* SmsUtilUnpackGSMCode(char* szData, const char* pIn, int in_len );
+int SmsUtilPackGSMCode( unsigned char* pOut, const char* szData, int in_len );
+
+void SmsUtilConvertBCD2Digit( char* pDigits, char* pBCD, int digitLen );
+void SmsUtilConvertDigit2BCD( char* pBCD, char* pDigits, int digitLen );
+
+TmDateTime* SmsUtilDecodeTimeStamp(char* pTimeStamp, TmDateTime *tmDateTime );
+unsigned char* SmsUtilEncodeTimeStamp( TmDateTime* tmDateTime, unsigned char* pTimeStamp );
+
+
+int  SmsUtilDecodeAddrField(char *diallingNum, char * pAddrField, int *result_ton, int *result_npi );
+int SmsUtilEncodeAddrField( unsigned char* pAddrField, char* diallingNum, int dialnumLen, int ton, int npi );
+
+int SmsUtilDecodeScAddrField( SmsAddressInfo_t* pSmsAddrField, unsigned char* pAddrField );
+ int  SmsUtilEncodeScAddrField( unsigned char* pAddrField, SmsAddressInfo_t * pSmsAddrField );
+
+void SmsUtilDecodeDCS( Sms_coding_scheme* pCodingScheme,   unsigned char dcs );
+void SmsUtilEncodeDCS( unsigned char* pDCS, Sms_coding_scheme* pCodingScheme);
+
+ unsigned char SmsUtilEncodeValidity( unsigned char* pValidity, Sms_vp* pVP );
+
+ void __util_hex_dump(const char *pad, int size, const void *data);
+ unsigned char __sms_hexchar_to_int(char ch);
+ gboolean __sms_asciistring_to_hex(const char *ascii_string,
+                                       unsigned char *hex_string,
+                                       int ascii_len);
+ void bitarray_copy(const unsigned char *src_org, int src_offset,
+                               int src_len,  unsigned char *dst_org, unsigned int dst_offset);
 
diff --git a/test_src/sms_util_cdma.c b/test_src/sms_util_cdma.c
new file mode 100644 (file)
index 0000000..3139bb8
--- /dev/null
@@ -0,0 +1,737 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
+
+#include "menu.h"
+#include "sms_util_cdma.h"
+
+struct sms_3gpp2_parameter {
+       unsigned char id;       /* Parameter ID */
+       unsigned char len; /* Parameter Length */
+       unsigned char val[0]; /* Parameter Value */
+} __attribute__((packed));
+
+/* Read len bits from start of bytes */
+static unsigned char __read_bits(const unsigned char *bytes, unsigned short start, unsigned short len)
+{
+       unsigned char first, second;
+
+       /* Read only from the first byte */
+       if (start + len <= 8)
+               return (bytes[0] >> (8 - start - len)) & ((1 << len) -1);
+
+       /* Read (8 - start) from the first byte, (len - (8 - start)) from the second */
+       first = 8 - start;
+       second = len - first;
+       return (__read_bits(&bytes[0], start, first) << second) | (__read_bits(&bytes[1], 0, second));
+}
+
+static void __log_teleservice_id(const struct sms_3gpp2_parameter *param)
+{
+       unsigned short id;
+       if (param->len != 2)
+               return;
+
+       memcpy(&id, &param->val[0], 2);
+       id = GUINT16_FROM_BE(id);
+
+       switch (id) {
+       case SMS_3GPP2_TELESERVICE_ID_EPES:
+               msg("--Teleservice ID: AMPS Extended Protocol Enhanced Services");
+               break;
+       case SMS_3GPP2_TELESERVICE_ID_CPT:
+               msg("--Teleservice ID: CDMA Cellular Paging Teleservice");
+               break;
+       case SMS_3GPP2_TELESERVICE_ID_CCMT:
+               msg("--Teleservice ID: CDMA Cellular Messaging Teleservice");
+               break;
+       case SMS_3GPP2_TELESERVICE_ID_VMN:
+               msg("--Teleservice ID: CDMA Voice Mail Notification");
+               break;
+       case SMS_3GPP2_TELESERVICE_ID_TCMT:
+               msg("--Teleservice ID: TDMA Cellular Messaging Teleservice");
+               break;
+       default:
+               msg("--Teleservice ID: Unknown (%u)", id);
+               break;
+       } /* End Switch */
+}
+
+static void __log_service_category(const struct sms_3gpp2_parameter *param)
+{
+       unsigned short cat;
+
+       if (param->len != 2)
+               return;
+
+       memcpy(&cat, &param->val[0], 2);
+       cat = GUINT16_FROM_BE(cat);
+
+       switch (cat) {
+       case SMS_3GPP2_SERVICE_CAT_UNKNOWN:
+               msg("--Service Category: Unknown or unspecified");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_EMERGENCY_BROADCAST:
+               msg("--Service Category: Emergency Broadcasts");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_ADMINISTRATIVE:
+               msg("--Service Category: Administrative");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_MAINTENANCE:
+               msg("--Service Category: Maintenance");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_GENERAL_NEWS_LOCAL:
+               msg("--Service Category: General News - Local");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_GENERAL_NEWS_REGIONAL:
+               msg("--Service Category: General News - Regional");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_GENERAL_NEWS_NATIONAL:
+               msg("--Service Category: General News - National");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_GENERAL_NEWS_INTERNATIONAL:
+               msg("--Service Category: General News - International");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_BUSINESS_NEWS_LOCAL:
+               msg("--Service Category: Business/Financial News - Local");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_BUSINESS_NEWS_REGIONAL:
+               msg("--Service Category: Business/Financial News - Regional");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_BUSINESS_NEWS_NATIONAL:
+               msg("--Service Category: Business/Financial News - National");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_BUSINESS_NEWS_INTERNATIONAL:
+               msg("--Service Category: Business/Financial News - International");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_SPORTS_NEWS_LOCAL:
+               msg("--Service Category: Sports News - Local");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_SPORTS_NEWS_REGIONAL:
+               msg("--Service Category: Sports News - Regional");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_SPORTS_NEWS_NATIONAL:
+               msg("--Service Category: Sports News - National");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_SPORTS_NEWS_INTERNATIONAL:
+               msg("--Service Category: Sports News - International");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_ENT_NEWS_LOCAL:
+               msg("--Service Category: Entertainment News - Local");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_ENT_NEWS_REGIONAL:
+               msg("--Service Category: Entertainment News - Regional");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_ENT_NEWS_NATIONAL:
+               msg("--Service Category: Entertainment News - National");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_ENT_NEWS_INTERNATIONAL:
+               msg("--Service Category: Entertainment News - International");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_LOCAL_WEATHER:
+               msg("--Service Category: Local Weather");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_AREA_TRAFFIC_REPORTS:
+               msg("--Service Category: Area Traffic Reports");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_FLIGHT_SCHEDULES:
+               msg("--Service Category: Local Airport Flight Schedules");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_RESTAURANTS:
+               msg("--Service Category: Restaurants");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_LODGINGS:
+               msg("--Service Category: Lodgings");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_RETAIL_DIRECTORY:
+               msg("--Service Category: Retail Directory");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_ADVERTISEMENTS:
+               msg("--Service Category: Advertisements");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_STOCK_QUOTES:
+               msg("--Service Category: Stock Quotes");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_EMP_OPPORTUNITIES:
+               msg("--Service Category: Employment Opportunities");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_HEALTH:
+               msg("--Service Category: Medical/Health/Hospitals");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_TECH_NEWS:
+               msg("--Service Category: Technology News");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_MULTI_CATEGORY:
+               msg("--Service Category: Multi-category");
+               break;
+       case SMS_3GPP2_SERVICE_CAT_CATPT:
+               msg("--Service Category: Card Application Toolkit Protocol Teleservice (CATPT)");
+               break;
+       default:
+               msg("--Service Category: Unknown (%u)", cat);
+               break;
+       } /* End Switch */
+}
+
+static void __log_bearer_reply_option(const struct sms_3gpp2_parameter *param)
+{
+       unsigned char rep_seq;
+
+       if (param->len != 1)
+               return;
+
+       /*
+        * 6 bits: Value identifying the SMS message for which acknowledgment is requested
+        * 2 bits: Always set to 00
+       */
+       rep_seq = __read_bits(&param->val[0], 0, 6);
+       msg("--Bearer Reply Option: (%u)", rep_seq);
+}
+
+static void __log_cause_codes(const struct sms_3gpp2_parameter *param)
+{
+       unsigned char rep_seq;
+       unsigned char err_class;
+
+       if (param->len != 1 && param->len != 2)
+               return;
+
+       /*
+        * 6 bits: Value identifying the SMS message for which acknowledgment was requested
+        * 2 bits: No Error / Temporary Error / Permanent Error; 01 is reserved
+        * 8 bits: If No Error, field is absent
+       */
+
+       rep_seq = __read_bits(&param->val[0], 0, 6);
+       msg("--Reply Sequence: (%u)", rep_seq);
+
+       err_class = __read_bits(&param->val[0], 6, 2);
+       msg("--Error Class: (%u)", err_class);
+
+       if (err_class != SMS_3GPP2_ERR_CLASS_NO_ERR) {
+               unsigned char cause_code;
+
+               if (param->len != 2)
+                       return;
+
+               cause_code = param->val[1];
+               msg("--Cause Code: (%u)", cause_code);
+       }
+}
+
+static void __log_address(const struct sms_3gpp2_parameter *param)
+{
+       unsigned char digit_mode;
+       unsigned char number_mode;
+       unsigned char num_fields;
+       unsigned char number_type;
+
+       unsigned int byte_offset = 0;
+       unsigned int bit_offset = 0;
+
+       char *number = NULL;
+       unsigned int iter;
+
+#define UPDATE_OFFSETS(num_bits)       \
+       do {                                                            \
+               bit_offset += num_bits;         \
+               if (bit_offset >= 8) {                  \
+                       bit_offset -= 8;                        \
+                       byte_offset += 1;                       \
+               }                                                       \
+       } while(0)                                              \
+
+#define SIZE_CHECK(req_size)                   \
+       if (param->len < req_size) {            \
+               msg("Unable to read Address");  \
+               return;                                         \
+       }                                                               \
+
+       /*
+        * 1 bit: Digit Mode
+        * 1 bits: Number Mode
+        * 3 bits: Number Type - If Digit Mode is DTMF, field is omitted
+        * 4 bits: Number Plan - If Digit Mode is DTMF OR Number Mode is DNA, field is omitted
+        * 8 bits: Num Fields
+       */
+
+       SIZE_CHECK(1);
+
+       digit_mode = __read_bits(&param->val[byte_offset], bit_offset, 1);
+       UPDATE_OFFSETS(1);
+       switch (digit_mode) {
+       case SMS_3GPP2_DIGIT_MODE_DTMF:
+               msg("--Digit Mode: 4-bit DTMF code");
+               break;
+       case SMS_3GPP2_DIGIT_MODE_ASCII:
+               msg("--Digit Mode: 8-bit DTMF code");
+               break;
+       default:
+               msg("--Digit Mode: Unknown (%u)", digit_mode);
+               return;
+       }
+
+       number_mode = __read_bits(&param->val[byte_offset], bit_offset, 1);
+       UPDATE_OFFSETS(1);
+       switch (number_mode) {
+       case SMS_3GPP2_NUMBER_MODE_ANSI:
+               msg("--Number Mode: ANSI T1.607-1990");
+               break;
+       case SMS_3GPP2_NUMBER_MODE_DNA:
+               msg("--Number Mode: Data Network Address");
+               break;
+       default:
+               msg("--Number Mode: Unknown (%u)", number_mode);
+               return;
+       }
+
+       if (digit_mode == SMS_3GPP2_DIGIT_MODE_ASCII) {
+               number_type = __read_bits(&param->val[byte_offset], bit_offset, 3);
+               UPDATE_OFFSETS(3);
+               msg("--Number Type: (%u)", number_type); /* TODO: print string */
+       }
+
+       if (digit_mode == SMS_3GPP2_DIGIT_MODE_ASCII
+               && number_mode == SMS_3GPP2_NUMBER_MODE_ANSI) {
+               unsigned char number_plan;
+               SIZE_CHECK(byte_offset + 1 + ((bit_offset + 4) / 8));
+
+               number_plan = __read_bits(&param->val[byte_offset], bit_offset, 4);
+               UPDATE_OFFSETS(4);
+               msg("--Number Plan: (%u)", number_plan); /* TODO: print string */
+       }
+
+       SIZE_CHECK(byte_offset + 2);
+       num_fields = __read_bits(&param->val[byte_offset], bit_offset, 8);
+       UPDATE_OFFSETS(8);
+       msg("--Num Fields: (%u)", num_fields);
+
+       if (digit_mode == SMS_3GPP2_DIGIT_MODE_DTMF) {
+               /*
+                * TODO:
+                * each occurrence of this field shall be set to the code value
+                * shown in Table 2.7.1.3.2.4-4 of [10] corresponding to the address digit.
+               */
+       } else if (number_mode == SMS_3GPP2_NUMBER_MODE_ANSI) {
+               /*
+                * Each occurrence of this field shall be set to the ASCII representation
+                * corresponding to the address digit or character, as specified in [7],
+                * with the most significant bit set to '0'.
+               */
+               SIZE_CHECK(byte_offset + 1 + ((bit_offset + (num_fields * 8)) / 8));
+               number = malloc(num_fields + 1);
+               if (number == NULL)
+                       return;
+
+               for (iter = 0; iter < num_fields; iter++) {
+                       number[iter] = __read_bits(&param->val[byte_offset], bit_offset, 8);
+                       UPDATE_OFFSETS(8);
+               }
+               number[iter] = '\0';
+
+               msg("--Number: (%s)", number);
+       } else if (number_type == 0x02) {
+               /*
+                * TODO:
+                * each occurrence of this field shall be set to an 8-bit ASCII character
+                * of the Internet e-mail address. The CHARi fields may include more than
+                * one e-mail address, with a comma separating each address.
+               */
+       } else if (number_type == 0x01) {
+               /*
+                * TODO:
+                * each occurrence of this field shall be set to the binary value of an octet
+                * of the data network address, with the most significant octet first.
+               */
+       }
+
+       if (number != NULL) free(number);
+
+#undef UPDATE_OFFSETS
+#undef SIZE_CHECK
+}
+
+static void __log_bearer_data_message_identifier
+(const struct sms_3gpp2_parameter *subparam)
+{
+       unsigned char msg_type;
+       unsigned short msg_id;
+       unsigned char header_id;
+
+       if (subparam->len !=3)
+               return;
+
+       msg_type = __read_bits(&subparam->val[0], 0, 4);
+       switch (msg_type) {
+       case SMS_3GPP2_BSUB_TELSERVICE_MSG_TYPE_DELIVER:
+               msg("      Deliver (mobile-terminated only)");
+               break;
+       case SMS_3GPP2_BSUB_TELSERVICE_MSG_TYPE_SUBMIT:
+               msg("      Submit (mobile-originated only)");
+               break;
+       case SMS_3GPP2_BSUB_TELSERVICE_MSG_TYPE_CANCEL:
+               msg("      Cancellation (mobile-originated only)");
+               break;
+       case SMS_3GPP2_BSUB_TELSERVICE_MSG_TYPE_DACK:
+               msg("      Delivery Acknowledgment (mobile-terminated only)");
+               break;
+       case SMS_3GPP2_BSUB_TELSERVICE_MSG_TYPE_UACK:
+               msg("      User Acknowledgment (either direction)");
+               break;
+       case SMS_3GPP2_BSUB_TELSERVICE_MSG_TYPE_RACK:
+               msg("      Read Acknowledgment (either direction)");
+               break;
+       default:
+               msg("      Unknown msg_type (%u)", msg_type);
+               break;
+       } /* End Switch */
+
+       msg_id = ((__read_bits(&subparam->val[0], 4, 8) << 8) | (__read_bits(&subparam->val[1], 4, 8)));
+       msg_id = GUINT16_FROM_BE(msg_id);
+       msg("      message ID (%u)", msg_id);
+
+       header_id = __read_bits(&subparam->val[2], 4, 1);
+       msg("      Header ID (%u)", header_id);
+}
+
+static void __log_bearer_data_user_data
+(const struct sms_3gpp2_parameter *subparam)
+{
+       unsigned char msg_encoding;
+       unsigned char num_fields;
+
+       unsigned int byte_offset = 0;
+       unsigned int bit_offset = 0;
+
+#define UPDATE_OFFSETS(num_bits)       \
+       do {                                                            \
+               bit_offset += num_bits;         \
+               if (bit_offset >= 8) {                  \
+                       bit_offset -= 8;                        \
+                       byte_offset += 1;                       \
+               }                                                       \
+       } while(0)                                              \
+
+#define SIZE_CHECK(req_size)                   \
+       if (subparam->len < req_size) {         \
+               msg("Unable to read Address");  \
+               return;                                         \
+       }                                                               \
+
+       SIZE_CHECK(1);
+       msg_encoding = __read_bits(&subparam->val[byte_offset], bit_offset, 5);
+       UPDATE_OFFSETS(5);
+       switch (msg_encoding) {
+       case SMS_3GPP2_BSUB_UD_OCTET_ENCODING:
+               msg("      Encoding: Octet, unspecified");
+               break;
+       case SMS_3GPP2_BSUB_UD_EPM_ENCODING:
+               msg("      Encoding: Extended Protocol Message");
+               break;
+       case SMS_3GPP2_BSUB_UD_ASCII7BIT_ENCODING:
+               msg("      Encoding: 7-bit ASCII");
+               break;
+       case SMS_3GPP2_BSUB_UD_IA5_ENCODING:
+               msg("      Encoding: IA5");
+               break;
+       case SMS_3GPP2_BSUB_UD_UNICODE_ENCODING:
+               msg("      Encoding: UNICODE");
+               break;
+       case SMS_3GPP2_BSUB_UD_SHIFTJIS_ENCODING:
+               msg("      Encoding: Shift-JIS");
+               break;
+       case SMS_3GPP2_BSUB_UD_KOREAN_ENCODING:
+               msg("      Encoding: Korean");
+               break;
+       case SMS_3GPP2_BSUB_UD_HEBREW_ENCODING:
+               msg("      Encoding: Latin/Hebrew");
+               break;
+       case SMS_3GPP2_BSUB_UD_LATIN_ENCODING:
+               msg("      Encoding: Latin");
+               break;
+       case SMS_3GPP2_BSUB_UD_GSM7BIT_ENCODING:
+               msg("      Encoding: GSM 7-bit default alphabet");
+               break;
+       case SMS_3GPP2_BSUB_UD_GSMDCS_ENCODING:
+               msg("      Encoding: GSM Data-Coding-Scheme");
+               break;
+       default:
+               msg("      Unknown msg_encoding (%u)", msg_encoding);
+               break;
+       } /* End Switch */
+
+       if (msg_encoding == SMS_3GPP2_BSUB_UD_EPM_ENCODING) {
+               unsigned char msg_type;
+               SIZE_CHECK(2);
+               msg_type = __read_bits(&subparam->val[byte_offset], bit_offset, 8);
+               UPDATE_OFFSETS(8);
+               msg("      Message Type (%u)", msg_type);
+       }
+
+       SIZE_CHECK(byte_offset + 1 + ((bit_offset + 8) / 8));
+       num_fields = __read_bits(&subparam->val[byte_offset], bit_offset, 8);
+       UPDATE_OFFSETS(8);
+       msg("      Num Fields (%u)", num_fields);
+
+       if (msg_encoding == SMS_3GPP2_BSUB_UD_OCTET_ENCODING) {
+               //TODO
+       }
+       else if (msg_encoding == SMS_3GPP2_BSUB_UD_EPM_ENCODING) {
+               //TODO
+       }
+       else if (msg_encoding == SMS_3GPP2_BSUB_UD_ASCII7BIT_ENCODING) {
+               char *message;
+               unsigned int iter;
+
+               SIZE_CHECK(byte_offset + 1 + ((bit_offset + (num_fields * 7)) / 8));
+
+               message = malloc(num_fields + 1);
+               if (message != NULL) {
+                       for (iter = 0; iter < num_fields; iter++) {
+                               message[iter] = __read_bits(&subparam->val[byte_offset], bit_offset, 7);
+                               UPDATE_OFFSETS(7);
+                       }
+                       message[iter] = '\0';
+                       msg("      Message (%s)", message);
+                       free(message);
+               }
+       }
+       else if (msg_encoding == SMS_3GPP2_BSUB_UD_IA5_ENCODING) {
+               //TODO
+       }
+       else if (msg_encoding == SMS_3GPP2_BSUB_UD_UNICODE_ENCODING) {
+               //TODO
+       }
+       else if (msg_encoding == SMS_3GPP2_BSUB_UD_SHIFTJIS_ENCODING) {
+               //TODO
+       }
+       else if (msg_encoding == SMS_3GPP2_BSUB_UD_KOREAN_ENCODING) {
+               //TODO
+       }
+       else if (msg_encoding == SMS_3GPP2_BSUB_UD_HEBREW_ENCODING) {
+               //TODO
+       }
+       else if (msg_encoding == SMS_3GPP2_BSUB_UD_LATIN_ENCODING) {
+               //TODO
+       }
+       else if (msg_encoding == SMS_3GPP2_BSUB_UD_GSM7BIT_ENCODING) {
+               //TODO
+       }
+       else if (msg_encoding == SMS_3GPP2_BSUB_UD_GSMDCS_ENCODING) {
+               //TODO
+       }
+
+#undef UPDATE_OFFSETS
+#undef SIZE_CHECK
+}
+
+static void __log_bearer_data(const struct sms_3gpp2_parameter *param)
+{
+       unsigned int offset = 0;
+
+#define SIZE_CHECK(req_size)                   \
+       if (param->len < req_size) {            \
+               msg("Unable to read Address");  \
+               return;                                         \
+       }                                                               \
+
+       while (offset < param->len) {
+               const struct sms_3gpp2_parameter *subparam;
+
+               SIZE_CHECK(offset + 2);
+               subparam = (const struct sms_3gpp2_parameter *)(&param->val[offset]);
+               offset += 2;
+
+               SIZE_CHECK(offset + subparam->len);
+               offset += subparam->len;
+
+               switch (subparam->id) {
+               case SMS_3GPP2_BSUB_ID_MESSAGE_IDENTIFIER:
+                       msg("--Bearer Data: Message Identifier");
+                       __log_bearer_data_message_identifier(subparam);
+                       break;
+               case SMS_3GPP2_BSUB_ID_USER_DATA:
+                       msg("--Bearer Data: User Data");
+                       __log_bearer_data_user_data(subparam);
+                       break;
+               case SMS_3GPP2_BSUB_ID_USER_RESPONSE_CODE:
+                       msg("--(TODO)Bearer Data: User Response Code");
+                       break;
+               case SMS_3GPP2_BSUB_ID_MESSAGE_CENTER_TIMESTAMP:
+                       msg("--(TODO)Bearer Data: Message Center Time Stamp");
+                       break;
+               case SMS_3GPP2_BSUB_ID_VP_ABSOLUTE:
+                       msg("--(TODO)Bearer Data: Validity Period - Absolute");
+                       break;
+               case SMS_3GPP2_BSUB_ID_VP_RELATIVE:
+                       msg("--(TODO)Bearer Data: Validity Period - Relative");
+                       break;
+               case SMS_3GPP2_BSUB_ID_DDT_ABSOLUTE:
+                       msg("--(TODO)Bearer Data: Deferred Delivery Time - Absolute");
+                       break;
+               case SMS_3GPP2_BSUB_ID_DDT_RELATIVE:
+                       msg("--(TODO)Bearer Data: Deferred Delivery Time - Relative");
+                       break;
+               case SMS_3GPP2_BSUB_ID_PRIORITY_INDICATOR:
+                       msg("--(TODO)Bearer Data: Priority Indicator");
+                       break;
+               case SMS_3GPP2_BSUB_ID_PRIVACY_INDICATOR:
+                       msg("--(TODO)Bearer Data: Privacy Indicator");
+                       break;
+               case SMS_3GPP2_BSUB_ID_REPLY_OPTION:
+                       msg("--(TODO)Bearer Data: Reply Option");
+                       break;
+               case SMS_3GPP2_BSUB_ID_MESSAGES_NUMBER:
+                       msg("--(TODO)Bearer Data: Number of Messages");
+                       break;
+               case SMS_3GPP2_BSUB_ID_MESSAGE_DELIVERY_ALERT:
+                       msg("--(TODO)Bearer Data: Alert on Message Delivery");
+                       break;
+               case SMS_3GPP2_BSUB_ID_LANGUAGE_INDICATOR:
+                       msg("--(TODO)Bearer Data: Language Indicator");
+                       break;
+               case SMS_3GPP2_BSUB_ID_CALLBACK_NUMBER:
+                       msg("--(TODO)Bearer Data: Call-Back Number");
+                       break;
+               case SMS_3GPP2_BSUB_ID_MESSAGE_DISPLAY_MODE:
+                       msg("--(TODO)Bearer Data: Message Display Mode");
+                       break;
+               case SMS_3GPP2_BSUB_ID_MULTI_ENCODING_UD:
+                       msg("--(TODO)Bearer Data: Multiple Encoding User Data");
+                       break;
+               case SMS_3GPP2_BSUB_ID_DEPOSIT_INDEX:
+                       msg("--(TODO)Bearer Data: Message Deposit Index");
+                       break;
+               case SMS_3GPP2_BSUB_ID_SERVICE_PROGRAM_DATA:
+                       msg("--(TODO)Bearer Data: Service Category Program Data");
+                       break;
+               case SMS_3GPP2_BSUB_ID_SERVICE_PROGRAM_RESULTS:
+                       msg("--(TODO)Bearer Data: Service Category Program Results");
+                       break;
+               case SMS_3GPP2_BSUB_ID_MESSAGE_STATUS:
+                       msg("--(TODO)Bearer Data: Message Status");
+                       break;
+               default:
+                       msg("--Bearer Data: Unknown (%u)", subparam->id);
+                       break;
+               } /* End Switch */
+       }
+
+#undef SIZE_CHECK
+}
+
+void sms_util_decode_3gpp2(unsigned int pdu_len, unsigned char *pdu)
+{
+       unsigned int offset = 0;
+       unsigned int msg_type;
+
+#define SIZE_CHECK(req_size, err_log)  \
+       if (pdu_len < req_size) {                       \
+               msg("%s", #err_log);                    \
+               return;                                         \
+       }
+
+       /* Message Type */
+       SIZE_CHECK(offset + 1, "Unbale to read Message Type");
+       msg_type = pdu[offset++];
+       switch (msg_type) {
+       case SMS_3GPP2_POINT_TO_POINT:
+               msg("--new 3GPP2 Point to Point message");
+               break;
+       case SMS_3GPP2_ACKNOWLEDGE:
+               msg("--new 3GPP2 ACK message");
+               break;
+       case SMS_3GPP2_BROADCAST:
+               msg("--new 3GPP2 Broadcast message");
+               break;
+       default:
+               msg("Unknown Message Type");
+               return;
+       }
+
+       /* Rest all are sms_3gpp2_parameter */
+       while (offset < pdu_len) {
+               const struct sms_3gpp2_parameter *param;
+
+               SIZE_CHECK(offset + 2, "Unable to read Parameter ID/LEN");
+               param = (const struct sms_3gpp2_parameter *)(&pdu[offset]);
+               offset += 2;
+
+               SIZE_CHECK(offset + param->len, "Unable to read Parameter Value");
+               offset += param->len;
+
+               switch(param->id) {
+               case SMS_3GPP2_PARAM_ID_TELESERVICE_ID:
+               {
+                       __log_teleservice_id(param);
+               } break;
+
+               case SMS_3GPP2_PARAM_ID_SERVICE_CATEGORY:
+               {
+                       __log_service_category(param);
+               } break;
+
+               case SMS_3GPP2_PARAM_ID_ORIGINATING_ADDRESS:
+               {
+                       __log_address(param);
+               } break;
+
+               case SMS_3GPP2_PARAM_ID_ORIGINATING_SUBADDRESS:
+               {
+                       msg("TODO: Originating Sub-Address");
+               } break;
+
+               case SMS_3GPP2_PARAM_ID_DESTINATION_ADDRESS:
+               {
+                       __log_address(param);
+               } break;
+
+               case SMS_3GPP2_PARAM_ID_DESTINATION_SUBADDRESS:
+               {
+                       msg("TODO: Originating Sub-Address");
+               } break;
+
+               case SMS_3GPP2_PARAM_ID_BEARER_REPLY_OPTION:
+               {
+                       __log_bearer_reply_option(param);
+               } break;
+
+               case SMS_3GPP2_PARAM_ID_CAUSE_CODES:
+               {
+                       __log_cause_codes(param);
+               } break;
+
+               case SMS_3GPP2_PARAM_ID_BEARER_DATA:
+               {
+                       __log_bearer_data(param);
+               } break;
+
+               default:
+                       msg("Unhandled Parameter ID 0x%x", param->id);
+                       break;
+               } /* End Switch */
+       }
+
+#undef SIZE_CHECK
+}
diff --git a/test_src/sms_util_cdma.h b/test_src/sms_util_cdma.h
new file mode 100644 (file)
index 0000000..56fa340
--- /dev/null
@@ -0,0 +1,133 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+typedef enum {
+       SMS_3GPP2_POINT_TO_POINT        = 0,
+       SMS_3GPP2_BROADCAST                     = 1,
+       SMS_3GPP2_ACKNOWLEDGE           = 2
+} sms_3gpp2_type;
+
+typedef enum {
+       SMS_3GPP2_PARAM_ID_TELESERVICE_ID                               = 0,
+       SMS_3GPP2_PARAM_ID_SERVICE_CATEGORY                     = 1,
+       SMS_3GPP2_PARAM_ID_ORIGINATING_ADDRESS          = 2,
+       SMS_3GPP2_PARAM_ID_ORIGINATING_SUBADDRESS       = 3,
+       SMS_3GPP2_PARAM_ID_DESTINATION_ADDRESS          = 4,
+       SMS_3GPP2_PARAM_ID_DESTINATION_SUBADDRESS       = 5,
+       SMS_3GPP2_PARAM_ID_BEARER_REPLY_OPTION          = 6,
+       SMS_3GPP2_PARAM_ID_CAUSE_CODES                          = 7,
+       SMS_3GPP2_PARAM_ID_BEARER_DATA                          = 8
+} sms_3gpp2_param_id_type;
+
+#define SMS_3GPP2_TELESERVICE_ID_EPES 0x1000 /* 4096: AMPS Extended Protocol Enhanced Services */
+#define SMS_3GPP2_TELESERVICE_ID_CPT 0x1001 /* 4097: CDMA Cellular Paging Teleservice */
+#define SMS_3GPP2_TELESERVICE_ID_CCMT 0x1002 /* 4098: CDMA Cellular Messaging Teleservice */
+#define SMS_3GPP2_TELESERVICE_ID_VMN 0x1003 /* 4099: CDMA Voice Mail Notification */
+#define SMS_3GPP2_TELESERVICE_ID_WAP 0x1004 /* 4100: CDMA WAP Message */
+#define SMS_3GPP2_TELESERVICE_ID_TCMT 0x7F01 /* 32513: TDMA Cellular Messaging Teleservice */
+
+#define SMS_3GPP2_SERVICE_CAT_UNKNOWN 0x0000 /* Unknown or unspecified */
+#define SMS_3GPP2_SERVICE_CAT_EMERGENCY_BROADCAST 0x0001 /* Emergency Broadcasts */
+#define SMS_3GPP2_SERVICE_CAT_ADMINISTRATIVE 0x0002 /* Administrative */
+#define SMS_3GPP2_SERVICE_CAT_MAINTENANCE 0x0003 /* Maintenance */
+#define SMS_3GPP2_SERVICE_CAT_GENERAL_NEWS_LOCAL 0x0004 /* General News - Local */
+#define SMS_3GPP2_SERVICE_CAT_GENERAL_NEWS_REGIONAL 0x0005 /* General News - Regional */
+#define SMS_3GPP2_SERVICE_CAT_GENERAL_NEWS_NATIONAL 0x0006 /* General News - National */
+#define SMS_3GPP2_SERVICE_CAT_GENERAL_NEWS_INTERNATIONAL 0x0007 /* General News - International */
+#define SMS_3GPP2_SERVICE_CAT_BUSINESS_NEWS_LOCAL 0x0008 /* Business/Financial News - Local */
+#define SMS_3GPP2_SERVICE_CAT_BUSINESS_NEWS_REGIONAL 0x0009 /* Business/Financial News - Regional */
+#define SMS_3GPP2_SERVICE_CAT_BUSINESS_NEWS_NATIONAL 0x000A /* Business/Financial News - National */
+#define SMS_3GPP2_SERVICE_CAT_BUSINESS_NEWS_INTERNATIONAL 0x000B /* Business/Financial News - International */
+#define SMS_3GPP2_SERVICE_CAT_SPORTS_NEWS_LOCAL 0x000C /* Sports News - Local */
+#define SMS_3GPP2_SERVICE_CAT_SPORTS_NEWS_REGIONAL 0x000D /* Sports News - Regional */
+#define SMS_3GPP2_SERVICE_CAT_SPORTS_NEWS_NATIONAL 0x000E /* Sports News - National */
+#define SMS_3GPP2_SERVICE_CAT_SPORTS_NEWS_INTERNATIONAL 0x000F /* Sports News - International */
+#define SMS_3GPP2_SERVICE_CAT_ENT_NEWS_LOCAL 0x0010 /* Entertainment News - Local */
+#define SMS_3GPP2_SERVICE_CAT_ENT_NEWS_REGIONAL 0x0011 /* Entertainment News - Regional */
+#define SMS_3GPP2_SERVICE_CAT_ENT_NEWS_NATIONAL 0x0012 /* Entertainment News - National */
+#define SMS_3GPP2_SERVICE_CAT_ENT_NEWS_INTERNATIONAL 0x0013 /* Entertainment News - International */
+#define SMS_3GPP2_SERVICE_CAT_LOCAL_WEATHER 0x0014 /* Local Weather */
+#define SMS_3GPP2_SERVICE_CAT_AREA_TRAFFIC_REPORTS 0x0015 /* Area Traffic Reports */
+#define SMS_3GPP2_SERVICE_CAT_FLIGHT_SCHEDULES 0x0016 /* Local Airport Flight Schedules */
+#define SMS_3GPP2_SERVICE_CAT_RESTAURANTS 0x0017 /* Restaurants */
+#define SMS_3GPP2_SERVICE_CAT_LODGINGS 0x0018 /* Lodgings */
+#define SMS_3GPP2_SERVICE_CAT_RETAIL_DIRECTORY 0x0019 /* Retail Directory */
+#define SMS_3GPP2_SERVICE_CAT_ADVERTISEMENTS 0x001A /* Advertisements */
+#define SMS_3GPP2_SERVICE_CAT_STOCK_QUOTES 0x001B /* Stock Quotes */
+#define SMS_3GPP2_SERVICE_CAT_EMP_OPPORTUNITIES 0x001C /* Employment Opportunities */
+#define SMS_3GPP2_SERVICE_CAT_HEALTH 0x001D /* Medical/Health/Hospitals */
+#define SMS_3GPP2_SERVICE_CAT_TECH_NEWS 0x001E /* Technology News */
+#define SMS_3GPP2_SERVICE_CAT_MULTI_CATEGORY 0x001F /* Multi-category */
+#define SMS_3GPP2_SERVICE_CAT_CATPT 0x0020 /* Card Application Toolkit Protocol Teleservice (CATPT) */
+
+#define SMS_3GPP2_ERR_CLASS_NO_ERR 0x00 /* No Error: 00 bits */
+#define SMS_3GPP2_ERR_CLASS_TEMPORARY 0x10 /* Temporary Error Condition: 10 bits */
+#define SMS_3GPP2_ERR_CLASS_PERMANENT 0x11 /* Permanent Error Condition: 11 bits */
+
+#define SMS_3GPP2_DIGIT_MODE_DTMF 0x00 /* 4-bit DTMF code: 0 bits */
+#define SMS_3GPP2_DIGIT_MODE_ASCII 0x01 /* 8-bit DTMF code: 1 bits */
+
+#define SMS_3GPP2_NUMBER_MODE_ANSI 0x00 /* ANSI T1.607-1990: 0 bits */
+#define SMS_3GPP2_NUMBER_MODE_DNA 0x01 /* Data Network Address: 1 bits */
+
+#define SMS_3GPP2_BSUB_ID_MESSAGE_IDENTIFIER                   0x00 /* Message Identifier */
+#define SMS_3GPP2_BSUB_ID_USER_DATA                                            0x01 /* User Data */
+#define SMS_3GPP2_BSUB_ID_USER_RESPONSE_CODE                   0x02 /* User Response Code */
+#define SMS_3GPP2_BSUB_ID_MESSAGE_CENTER_TIMESTAMP     0x03 /* Message Center Time Stamp */
+#define SMS_3GPP2_BSUB_ID_VP_ABSOLUTE                                  0x04 /* Validity Period - Absolute */
+#define SMS_3GPP2_BSUB_ID_VP_RELATIVE                                  0x05 /* Validity Period - Relative */
+#define SMS_3GPP2_BSUB_ID_DDT_ABSOLUTE                                 0x06 /* Deferred Delivery Time - Absolute */
+#define SMS_3GPP2_BSUB_ID_DDT_RELATIVE                                 0x07 /* Deferred Delivery Time - Relative */
+#define SMS_3GPP2_BSUB_ID_PRIORITY_INDICATOR                   0x08 /* Priority Indicator */
+#define SMS_3GPP2_BSUB_ID_PRIVACY_INDICATOR                            0x09 /* Privacy Indicator */
+#define SMS_3GPP2_BSUB_ID_REPLY_OPTION                                 0x0A /* Reply Option */
+#define SMS_3GPP2_BSUB_ID_MESSAGES_NUMBER                              0x0B /* Number of Messages */
+#define SMS_3GPP2_BSUB_ID_MESSAGE_DELIVERY_ALERT               0x0C /* Alert on Message Delivery */
+#define SMS_3GPP2_BSUB_ID_LANGUAGE_INDICATOR                   0x0D /* Language Indicator */
+#define SMS_3GPP2_BSUB_ID_CALLBACK_NUMBER                              0x0E /* Call-Back Number */
+#define SMS_3GPP2_BSUB_ID_MESSAGE_DISPLAY_MODE                 0x0F /* Message Display Mode */
+#define SMS_3GPP2_BSUB_ID_MULTI_ENCODING_UD                    0x10 /* Multiple Encoding User Data */
+#define SMS_3GPP2_BSUB_ID_DEPOSIT_INDEX                                        0x11 /* Message Deposit Index */
+#define SMS_3GPP2_BSUB_ID_SERVICE_PROGRAM_DATA         0x12 /* Service Category Program Data */
+#define SMS_3GPP2_BSUB_ID_SERVICE_PROGRAM_RESULTS              0x13 /* Service Category Program Results */
+#define SMS_3GPP2_BSUB_ID_MESSAGE_STATUS                               0x14 /* Message Status */
+
+#define SMS_3GPP2_BSUB_TELSERVICE_MSG_TYPE_DELIVER             0x01 /* Deliver (MT) */
+#define SMS_3GPP2_BSUB_TELSERVICE_MSG_TYPE_SUBMIT              0x02 /* Submit (MO) */
+#define SMS_3GPP2_BSUB_TELSERVICE_MSG_TYPE_CANCEL              0x03 /* Cancellation (MO) */
+#define SMS_3GPP2_BSUB_TELSERVICE_MSG_TYPE_DACK                0x04 /* Delivery Acknowledgment (MT) */
+#define SMS_3GPP2_BSUB_TELSERVICE_MSG_TYPE_UACK                0x05 /* User Acknowledgment (MO/MT) */
+#define SMS_3GPP2_BSUB_TELSERVICE_MSG_TYPE_RACK                0x06 /* Read Acknowledgment (MO/MT) */
+
+#define SMS_3GPP2_BSUB_UD_OCTET_ENCODING               0x00 /* Octet, unspecified */
+#define SMS_3GPP2_BSUB_UD_EPM_ENCODING                 0x01 /* Extended Protocol Message */
+#define SMS_3GPP2_BSUB_UD_ASCII7BIT_ENCODING   0x02 /* 7-bit ASCII */
+#define SMS_3GPP2_BSUB_UD_IA5_ENCODING                 0x03 /* IA5 */
+#define SMS_3GPP2_BSUB_UD_UNICODE_ENCODING             0x04 /* UNICODE */
+#define SMS_3GPP2_BSUB_UD_SHIFTJIS_ENCODING            0x05 /* Shift-JIS */
+#define SMS_3GPP2_BSUB_UD_KOREAN_ENCODING              0x06 /* Korean */
+#define SMS_3GPP2_BSUB_UD_HEBREW_ENCODING              0x07 /* Latin/Hebrew */
+#define SMS_3GPP2_BSUB_UD_LATIN_ENCODING               0x08 /* Latin */
+#define SMS_3GPP2_BSUB_UD_GSM7BIT_ENCODING             0x09 /* GSM 7-bit default alphabet */
+#define SMS_3GPP2_BSUB_UD_GSMDCS_ENCODING              0x0A /* GSM Data-Coding-Scheme */
+
+void sms_util_decode_3gpp2(unsigned int pdu_len, unsigned char *pdu);
index e4b6a2a98f23719d18f7bd16d0130d74cee7a344..90723fb4a7feeefb659e9ff16029a18eae0ea4bc 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <sys/time.h>
 #include <unistd.h>
 #include <glib.h>
-#include <glib-object.h>
 
-#include <tapi.h>
-#include <tapi_ss.h>
-#include <tapi_events.h>
+#include <tapi_common.h>
+#include <ITapiSs.h>
+#include <TapiUtility.h>
 
 #include "menu.h"
 #include "ss.h"
 
-#define CHECK_RESULT(result) \
-{\
-       if (result < TEL_SS_RESULT_SUCCESS || result > TEL_SS_RESULT_OPERATION_NOT_PERMITTED) { \
-               msg("API failed with result : %d", result); \
-               return; \
-       } else { \
-               msg("Result[%d] :[%s] ", result, dbg_ss_result[result]); \
-       } \
-       if (result != TEL_SS_RESULT_SUCCESS) \
-               return; \
-}
-
-static char* dbg_ss_result[] = {
-       "TEL_SS_RESULT_SUCCESS",
-       "TEL_SS_RESULT_FAILURE",
-       "TEL_SS_RESULT_INVALID_PARAMETER",
-       "TEL_SS_RESULT_MEMORY_FAILURE",
-       "TEL_SS_RESULT_OPERATION_NOT_SUPPORTED",
-       "TEL_SS_RESULT_SERVICE_NOT_AVAILABLE",
-       "TEL_SS_RESULT_OPERATION_NOT_ALLOWED",
-       "TEL_SS_RESULT_INCORRECT_OPERATION",
-       "TEL_SS_RESULT_INVALID_PASSWORD",
-       "TEL_SS_RESULT_PASSWORD_BLOCKED",
-       "TEL_SS_RESULT_OPERATION_NOT_PERMITTED"
-};
-
-static char data_ss_set_barring_class[MENU_DATA_SIZE + 1] = "10";
-static char data_ss_set_barring_enable[MENU_DATA_SIZE + 1] = "0";
+static char data_ss_set_barring_class[MENU_DATA_SIZE + 1] = "16";
+static char data_ss_set_barring_mode[MENU_DATA_SIZE + 1] = "0";
 static char data_ss_set_barring_type[MENU_DATA_SIZE + 1] = "1";
 static char data_ss_set_barring_password[MENU_DATA_SIZE + 1] = "1111";
 
@@ -79,466 +53,469 @@ static char data_ss_get_forward_status_class[MENU_DATA_SIZE + 1] = "16";
 static char data_ss_get_forward_status_condition[MENU_DATA_SIZE + 1] = "1";
 
 static char data_ss_set_waiting_class[MENU_DATA_SIZE + 1] = "16";
-static char data_ss_set_waiting_enable[MENU_DATA_SIZE + 1] = "0";
+static char data_ss_set_waiting_mode[MENU_DATA_SIZE + 1] = "0";
 
 static char data_ss_get_waiting_status_class[MENU_DATA_SIZE + 1] = "16";
 
+static char data_ss_get_cli_status_type[MENU_DATA_SIZE + 1] = "1";
 static char data_ss_set_cli_status_type[MENU_DATA_SIZE + 1] = "1";
-static char data_ss_set_cli_device_status[MENU_DATA_SIZE + 1] = "0";
-
-static char data_ss_get_cli_status_type[MENU_DATA_SIZE + 1] = "0";
+static char data_ss_set_cli_status[MENU_DATA_SIZE + 1] = "1";
 
 static char data_ss_ussd_request_type[MENU_DATA_SIZE + 1] = "1";
 static char data_ss_ussd_request_string[MENU_DATA_SIZE + 1] = "";
 
-static void on_noti_ss_ussd(TelHandle *handle, const char *noti_id, void *data, void *user_data)
+static void on_noti_ss_ussd(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       TelSsUssdNoti *noti = data;
+       TelSsUssdMsgInfo_t *noti = data;
 
-       if (g_strcmp0(noti_id, TEL_NOTI_SS_USSD) == 0) {
-               msg("Event (%s) received !!", TEL_NOTI_SS_USSD);
-       } else {
-               msg("Wrong Event Recieved : (%s)", noti_id);
+       msg("");
+       msgb("event(%s) receive !!", TAPI_NOTI_SS_USSD);
+
+       if (!noti)
                return;
-       }
 
-       if (noti) {
-               msg(" USSD Noti Response - Status : [%d],  String : [%s]", noti->status, noti->str);
-       } else {
-               msg("USSD Noti data is NULL.");
-       }
+       msg(" - Type = 0x%x", noti->Type);
+       msg(" - Length = 0x%x", noti->Length);
+       msg(" - szString = %s", noti->szString);
 }
 
-static void on_response_ss_set_barring(TelHandle *handle, int result, void *data, void *user_data)
+static void on_noti_ss_release_complete(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       msg("on_response_ss_set_barring :");
-       CHECK_RESULT(result);
-}
+       TelSsRelCompMsgInfo_t *info = data;
+       int i = 0;
 
-static int run_ss_set_barring(MManager *mm, struct menu_data *menu)
-{
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result;
-       TelSsBarringInfo info;
+       msg("");
+       msgb("event(%s) receive !!", TAPI_NOTI_SS_RELEASE_COMPLETE);
 
-       msg("call tapi_ss_set_barring()");
 
-       memset(&info, 0, sizeof(TelSsBarringInfo));
+       msg(" - info->RelCompMsgLen = 0x%x", info->RelCompMsgLen);
+       msg(" - info->szRelCompMsg = ");
+       for ( i=0; i<info->RelCompMsgLen; i++ ) {
+               msg("%d : [%x]", i, info->szRelCompMsg[i]);
+       }
+}
 
-       info.class = atoi(data_ss_set_barring_class);
-       info.type = atoi(data_ss_set_barring_type);
-       info.enable = atoi(data_ss_set_barring_enable);
-       if ( g_strlcpy(info.pwd, data_ss_set_barring_password, TEL_SS_BARRING_PASSWORD_LEN_MAX + 1) > TEL_SS_BARRING_PASSWORD_LEN_MAX) {
-               msg ("Entered Password exceeds maximum permissible length(4). Exiting!");
-               return 0;
+static void on_noti_ss_forwarding_status(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       TelSsForwardNoti_t *noti = data;
+       int i =0;
+
+       msg("SS Forwarding Status Noti");
+
+       for ( i=0; i<noti->record_num; i++ ) {
+               msg("class : %d", noti->record[i].Class);
+               msg("status : %d", noti->record[i].Status);
+               msg("condition : %d", noti->record[i].ForwardCondition);
+               msg("number present : %d", noti->record[i].bCallForwardingNumberPresent);
+               msg("no reply time : %d", noti->record[i].NoReplyWaitTime);
+               msg("ton : %d", noti->record[i].Ton);
+               msg("npi : %d", noti->record[i].Npi);
+               msg("number : %s", noti->record[i].szCallForwardingNumber);
+               msg("");
        }
 
-       msg("barring class : (%d)", info.class);
-       msg("barring type : (%d)", info.type);
-       msg("barring enable : (%d)", info.enable);
-       msg("barring password : (%s)", info.pwd);
+}
+
+static void on_noti_ss_barring_status(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
+{
+       TelSsBarringNoti_t *noti = data;
+       int i =0;
 
-       result = tapi_ss_set_barring(handle, &info, on_response_ss_set_barring, NULL);
-       CHECK_RT(result);
+       msg("SS Barring Status Noti");
+
+       for ( i=0; i<noti->record_num; i++ ) {
+               msg("class : %d", noti->record[i].Class);
+               msg("status : %d", noti->record[i].Status);
+               msg("type : %d", noti->record[i].Flavour);
+               msg("");
+       }
 
-       return 0;
 }
 
-static void on_response_ss_get_barring_status(TelHandle *handle, int result, void *data, void *user_data)
+static void on_noti_ss_waiting_status(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       TelSsBarringResp *resp = data;
-       unsigned int iter;
-
-       msg("on_response_ss_get_barring_status :");
-       CHECK_RESULT(result);
-
-       if (resp) {
-               msg(" No. of records = %u", resp->record_num);
-               for (iter = 0; iter < resp->record_num; ++iter) {
-                       msg("Record : [%d] - Class : [%d], Enable : [%d], Type : [%d]",
-                               iter,
-                               resp->records[iter].class,
-                               resp->records[iter].enable,
-                               resp->records[iter].type);
-               }
-       }
-       else {
-               msg("Response data is NULL");
+       TelSsWaitingNoti_t *noti = data;
+       int i =0;
+
+       msg("SS Waiting Status Noti");
+
+       for ( i=0; i<noti->record_num; i++ ) {
+               msg("class : %d", noti->record[i].Class);
+               msg("status : %d", noti->record[i].Status);
+               msg("");
        }
 }
 
-static int run_ss_get_barring_status(MManager *mm, struct menu_data *menu)
+static void on_noti_ss_sups_info(TapiHandle *handle, const char *noti_id, void *data, void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result;
-       TelSsBarringGetInfo info;
+       TelSsInfo_t *noti = data;
 
-       msg("call tapi_ss_get_barring_status()");
+       msg("SS SUPS Info Noti");
 
-       memset(&info, 0, sizeof(TelSsBarringGetInfo));
+       msg("SS error : %d", noti->Cause);
+       msg("status : %d", noti->SsType);
+       msg("");
+}
 
-       info.class = atoi(data_ss_get_barring_status_class);
-       info.type = atoi(data_ss_get_barring_status_type);
+static void on_ss_barring(TapiHandle *handle, int result, void *data, void *user_data)
+{
+       TelSsBarringResp_t *resp = data;
+       int i = 0;
 
-       msg("barring class : (%d)", info.class);
-       msg("barring type : (%d)", info.type);
+       msg("");
+       msgb("tel_set_ss_barring() or tel_get_ss_barring_status() response receive");
+       msg(" - result = 0x%x", result);
 
-       result = tapi_ss_get_barring_status(handle, &info, on_response_ss_get_barring_status, NULL);
-       CHECK_RT(result);
+       if (!resp)
+               return;
 
-       return 0;
+       msg(" - record_num = %d", resp->record_num);
+
+       for (i = 0; i < resp->record_num; i++) {
+               msg(" - [%d] Class=%d, Status=%d, Flavour=%d",
+                               i,
+                               resp->record[i].Class,
+                               resp->record[i].Status,
+                               resp->record[i].Flavour);
+       }
 }
 
-static void on_response_ss_change_barring_password(TelHandle *handle, int result, void *data, void *user_data)
+static void on_ss_change_barring_password(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       msg("on_response_ss_change_barring_password :");
-       CHECK_RESULT(result);
+       msg("");
+       msgb("tel_change_ss_barring_password() response receive");
+       msg(" - result = 0x%x", result);
 }
 
-static int run_ss_change_barring_password(MManager *mm, struct menu_data *menu)
+static void on_ss_forward(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result;
-       TelSsBarringPwdInfo info;
+       TelSsForwardResp_t *resp = data;
+       int i;
 
-       msg("call tapi_ss_change_barring_password()");
+       msg("");
+       msgb("tel_set_ss_forward() or tel_get_ss_forward_status() response receive");
+       msg(" - result = 0x%x", result);
 
-       if ( g_strlcpy(info.old_pwd, data_ss_change_barring_password_old, TEL_SS_BARRING_PASSWORD_LEN_MAX + 1) > TEL_SS_BARRING_PASSWORD_LEN_MAX) {
-               msg ("Entered Password exceeds maximum permissible length(4). Exiting!");
-               return 0;
-       }
-       if ( g_strlcpy(info.new_pwd, data_ss_change_barring_password_new, TEL_SS_BARRING_PASSWORD_LEN_MAX + 1) > TEL_SS_BARRING_PASSWORD_LEN_MAX) {
-               msg ("Entered Password exceeds maximum permissible length(4). Exiting!");
-               return 0;
+       if (!resp)
+               return;
+
+       msg(" - record_num = %d", resp->record_num);
+
+       for (i = 0; i < resp->record_num; i++) {
+               msg(" - [%d] Class=%d, Status=%d, ForwardCondition=%d, NoReplyWaitTime=%d, bCallForwardingNumberPresend=%d, szCallForwardingNumber=[%s]",
+                               i,
+                               resp->record[i].Class,
+                               resp->record[i].Status,
+                               resp->record[i].ForwardCondition,
+                               resp->record[i].NoReplyWaitTime,
+                               resp->record[i].bCallForwardingNumberPresent,
+                               resp->record[i].szCallForwardingNumber);
        }
+}
 
-       msg("old barring password : (%s)", info.old_pwd);
-       msg("new barring password : (%s)", info.new_pwd);
+static void on_ss_waiting(TapiHandle *handle, int result, void *data, void *user_data)
+{
+       TelSsWaitingResp_t *resp = data;
+       int i;
 
-       result = tapi_ss_change_barring_password(handle, &info, on_response_ss_change_barring_password, NULL);
-       CHECK_RT(result);
+       msg("");
+       msgb("tel_set_ss_waiting() or tel_get_ss_waiting_status() response receive");
+       msg(" - result = 0x%x", result);
 
-       return 0;
+       if (!resp)
+               return;
+
+       msg(" - record_num = %d", resp->record_num);
+
+       for (i = 0; i < resp->record_num; i++) {
+               msg(" - [%d] Class=%d, Status=%d",
+                               i,
+                               resp->record[i].Class,
+                               resp->record[i].Status);
+       }
 }
 
-static void on_response_ss_set_forward(TelHandle *handle, int result, void *data, void *user_data)
+static void on_ss_set_cli_status(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       msg("on_response_ss_set_forward :");
-       CHECK_RESULT(result);
+       msg("");
+       msgb("tel_set_ss_cli_status() response receive");
+       msg(" - result = 0x%x", result);
+       return;
 }
 
-static int run_ss_set_forward(MManager *mm, struct menu_data *menu)
+static void on_ss_get_cli_status(TapiHandle *handle, int result, void *data, void *user_data)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result;
-       TelSsForwardInfo info;
+       TelSsCliResp_t *resp = data;
 
-       msg("call tapi_ss_set_forwarding()");
+       msg("");
+       msgb("tel_get_ss_cli_status() response receive");
+       msg(" - result = 0x%x", result);
 
-       memset(&info, 0, sizeof(TelSsForwardInfo));
+       if (!resp)
+               return;
 
-       info.class = atoi(data_ss_set_forward_class);
-       info.mode = atoi(data_ss_set_forward_mode);
-       info.condition = atoi(data_ss_set_forward_condition);
-       if (g_strlcpy(info.number, data_ss_set_forward_number, TEL_SS_NUMBER_LEN_MAX + 1) > TEL_SS_NUMBER_LEN_MAX) {
-               msg("Entered Number exceeds maximum permissible length (82). Exiting!");
-               return 0;
-       }
-       info.wait_time = atoi(data_ss_set_forward_timer);
+       msg(" - type = %d", resp->Type);
+       msg(" - status = %d", resp->Status);
+}
+
+static void on_ss_send_ussd_request(TapiHandle *handle, int result, void *data, void *user_data)
+{
+       TelSsUssdResp_t *resp = data;
 
-       msg("forward class : (%d)", info.class);
-       msg("forward mode : (%d)", info.mode);
-       msg("forward condition : (%d)", info.condition);
-       msg("forward number : (%s)", info.number);
-       msg("forward wait_time : (%u)", info.wait_time);
+       msg("");
+       msgb("tel_send_ss_ussd_request() response receive");
+       msg(" - result = 0x%x", result);
 
-       result = tapi_ss_set_forwarding(handle, &info, on_response_ss_set_forward, NULL);
-       CHECK_RT(result);
+       if (!resp)
+               return;
 
-       return 0;
+       msg(" - type = %d", resp->Type);
+       msg(" - status = %d", resp->Status);
+       msg(" - length = %d", resp->Length);
+       msg(" - string = [%s]", resp->szString);
 }
 
-static void on_response_ss_get_forward_status(TelHandle *handle, int result, void *data, void *user_data)
+static int run_ss_set_barring(MManager *mm, struct menu_data *menu)
 {
-       TelSsForwardingResp *resp = data;
-       unsigned int iter;
-
-       msg("on_response_ss_get_forward_status :");
-       CHECK_RESULT(result);
-
-       if (resp) {
-               msg(" No. of records = %u", resp->record_num);
-               for (iter = 0; iter < resp->record_num; ++iter) {
-                       msg(" Record : [%u] - Class : [%d], Enable : [%d], Condition : [%d], Number : [%s], Wait_Time : [%d]",
-                                       iter,
-                                       resp->records[iter].class,
-                                       resp->records[iter].enable,
-                                       resp->records[iter].condition,
-                                       resp->records[iter].number,
-                                       resp->records[iter].wait_time);
-                       msg("");
-               }
-       } else {
-               msg("Response data is NULL");
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+       TelSsBarringInfo_t info;
+
+       msg("call tel_set_ss_barring()");
+
+       memset(&info, 0, sizeof(TelSsBarringInfo_t));
+       info.Class = atoi(data_ss_set_barring_class);
+       info.Mode = atoi(data_ss_set_barring_mode);
+       info.Type = atoi(data_ss_set_barring_type);
+       g_strlcpy(info.szPassword, data_ss_set_barring_password, TAPI_SS_GSM_BARR_PW_LEN_MAX+1);
+
+       msg("info.szPassword - %s data_ss_set_barring_password- %s\n", info.szPassword, data_ss_set_barring_password);
+       msg("Call barring Mode [%d]\n", info.Mode);
+
+       result = tel_set_ss_barring(handle, &info, on_ss_barring, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
        }
+
+       return 0;
 }
 
-static int run_ss_get_forward_status(MManager *mm, struct menu_data *menu)
+static int run_ss_get_barring_status(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result;
-       TelSsForwardGetInfo info;
-
-       msg("call tapi_ss_get_forwarding_status()");
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+       TelSsClass_t class;
+       TelSsBarringType_t type;
 
-       info.class = atoi(data_ss_get_forward_status_class);
-       info.condition = atoi(data_ss_get_forward_status_condition);
+       msg("call tel_get_ss_barring_status()");
 
-       msg("forward class : (%d)", info.class);
-       msg("forward condition : (%d)", info.condition);
+       class = atoi(data_ss_get_barring_status_class);
+       type = atoi(data_ss_get_barring_status_type);
 
-       result = tapi_ss_get_forwarding_status(handle, &info, on_response_ss_get_forward_status, NULL);
-       CHECK_RT(result);
+       result = tel_get_ss_barring_status(handle, class, type, on_ss_barring, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
 
        return 0;
 }
 
-static void on_response_ss_set_waiting(TelHandle *handle, int result, void *data, void *user_data)
+static int run_ss_change_barring_password(MManager *mm, struct menu_data *menu)
 {
-       msg("on_response_ss_set_waiting :");
-       CHECK_RESULT(result);
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+
+       msg("call tel_change_ss_barring_password()");
+
+       result = tel_change_ss_barring_password(handle,
+                       data_ss_change_barring_password_old,
+                       data_ss_change_barring_password_new,
+                       data_ss_change_barring_password_new,
+                       on_ss_change_barring_password, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
+
+       return 0;
 }
 
-static int run_ss_set_waiting(MManager *mm, struct menu_data *menu)
+static int run_ss_set_forward(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result;
-       TelSsWaitingInfo info;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+       TelSsForwardInfo_t info;
+       int len;
 
-       msg("call tapi_ss_set_waiting()");
+       msg("call tel_set_ss_forward()");
 
-       memset(&info, 0, sizeof(TelSsWaitingInfo));
+       len = strlen(data_ss_set_forward_number);
+       if (len >= TAPI_CALL_DIALDIGIT_LEN_MAX - 1) {
+               msg("failed. forward_number too long");
+               return 0;
+       }
 
-       info.class = atoi(data_ss_set_waiting_class);
-       info.enable= atoi(data_ss_set_waiting_enable);
+       memset(&info, 0, sizeof(TelSsForwardInfo_t));
+       info.Class = atoi(data_ss_set_forward_class);
+       info.Condition = atoi(data_ss_set_forward_condition);
+       info.NoReplyConditionTimer = atoi(data_ss_set_forward_timer);
+       info.Mode = atoi(data_ss_set_forward_mode);
+       info.Ton = 0x01;
+       info.Npi = 0x01;
+       strncpy((char*)info.szPhoneNumber, data_ss_set_forward_number, len);
+       info.szPhoneNumber[len] = '\0';
+
+       result = tel_set_ss_forward(handle, &info, on_ss_forward, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
 
-       msg("waiting class : (%d)", info.class);
-       msg("waiting enable : (%d)", info.enable);
+       return 0;
+}
 
-       result = tapi_ss_set_waiting(handle, &info, on_response_ss_set_waiting, NULL);
-       CHECK_RT(result);
+static int run_ss_get_forward_status(MManager *mm, struct menu_data *menu)
+{
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+       TelSsClass_t class;
+       TelSsForwardWhen_t condition;
+
+       msg("call tel_get_ss_forward_status()");
+
+       class = atoi(data_ss_get_forward_status_class);
+       condition = atoi(data_ss_get_forward_status_condition);
+
+       result = tel_get_ss_forward_status(handle, class, condition, on_ss_forward, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
 
        return 0;
 }
 
-static void on_response_ss_get_waiting_status(TelHandle *handle, int result, void *data, void *user_data)
+static int run_ss_set_waiting(MManager *mm, struct menu_data *menu)
 {
-       TelSsWaitingResp *resp = data;
-       unsigned int iter;
-
-       msg("on_response_ss_get_waiting_status :");
-       CHECK_RESULT(result);
-
-       if (resp) {
-               msg(" No. of records = %d", resp->record_num);
-               for (iter = 0; iter < resp->record_num; ++iter) {
-                       msg(" Record : [%u] - Class : [%d], Enable : [%d]",
-                               iter,
-                               resp->records[iter].class,
-                               resp->records[iter].enable);
-               }
-       } else {
-               msg("Response data is NULL");
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+       TelSsWaitingInfo_t info;
+
+       msg("call tel_set_ss_waiting()");
+
+       memset(&info, 0, sizeof(TelSsWaitingInfo_t));
+       info.Class = atoi(data_ss_set_waiting_class);
+       info.Mode = atoi(data_ss_set_waiting_mode);
+
+       result = tel_set_ss_waiting(handle, &info, on_ss_waiting, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
        }
+
+       return 0;
 }
 
 static int run_ss_get_waiting_status(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result;
-       TelSsClass class;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+       TelSsClass_t class;
 
-       msg("call tapi_ss_get_waiting_status()");
+       msg("call tel_get_ss_waiting_status()");
 
        class = atoi(data_ss_get_waiting_status_class);
 
-       msg("waiting class : (%d)", class);
-
-       result = tapi_ss_get_waiting_status(handle, class, on_response_ss_get_waiting_status, NULL);
-       CHECK_RT(result);
+       result = tel_get_ss_waiting_status(handle, class, on_ss_waiting, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
 
        return 0;
 }
 
-static void on_response_ss_set_cli(TelHandle *handle, int result, void *data, void *user_data)
+static int run_ss_set_cli_status(MManager *mm, struct menu_data *menu)
 {
-       msg("on_response_ss_set_cli :");
-       CHECK_RESULT(result);
-}
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+       TelSsCliType_t type;
+       TelSsCliStatus_t status;
 
-static int run_ss_set_cli(MManager *mm, struct menu_data *menu)
-{
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result;
-       TelSsCliInfo info;
-
-       msg("call tapi_ss_set_cli()");
-
-       info.type= atoi(data_ss_set_cli_status_type);
-
-       msg("cli type : (%d)", info.type);
-
-       switch (info.type) {
-               case TEL_SS_CLI_CLIP:
-                       info.status.clip = atoi(data_ss_set_cli_device_status);
-                       msg("CLIP status : (%d)", info.status.clip);
-                       break;
-               case TEL_SS_CLI_CLIR:
-                       info.status.clir = atoi(data_ss_set_cli_device_status);
-                       msg("CLIR status : (%d)", info.status.clir);
-                       break;
-               case TEL_SS_CLI_COLP:
-                       info.status.colp = atoi(data_ss_set_cli_device_status);
-                       msg("COLP status : (%d)", info.status.colp);
-                       break;
-               case TEL_SS_CLI_COLR:
-                       info.status.colr = atoi(data_ss_set_cli_device_status);
-                       msg("COLR status : (%d)", info.status.colr);
-                       break;
-               case TEL_SS_CLI_CDIP:
-                       info.status.cdip = atoi(data_ss_set_cli_device_status);
-                       msg("CDIP status : (%d)", info.status.cdip);
-                       break;
-               case TEL_SS_CLI_CNAP:
-                       info.status.cnap = atoi(data_ss_set_cli_device_status);
-                       msg("CNAP status : (%d)", info.status.cnap);
-       }
+       msg("call tel_set_ss_cli_status()");
 
-       result = tapi_ss_set_cli(handle, &info, on_response_ss_set_cli, NULL);
-       CHECK_RT(result);
+       type = atoi(data_ss_set_cli_status_type);
+       status  = atoi(data_ss_set_cli_status);
+
+       result = tel_set_ss_cli_status(handle, type, status, on_ss_set_cli_status, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
 
        return 0;
 }
 
-static void on_response_ss_get_cli_status(TelHandle *handle, int result, void *data, void *user_data)
-{
-       TelSsCliResp *resp = data;
-
-       msg("on_response_ss_get_cli_status :");
-       CHECK_RESULT(result);
-
-       if (resp) {
-               switch (resp->type) {
-                       case TEL_SS_CLI_CLIP:
-                               msg(" CLIP Response - Device : (%d), Network : (%d)",
-                                       resp->status.clip.dev_status,
-                                       resp->status.clip.net_status);
-                               break;
-                       case TEL_SS_CLI_CLIR:
-                               msg(" CLIR Response - Device : (%d), Network : (%d)",
-                               resp->status.clir.dev_status,
-                               resp->status.clir.net_status);
-                               break;
-                       case TEL_SS_CLI_COLP:
-                               msg(" COLP Response - Device : (%d), Network : (%d)",
-                                       resp->status.colp.dev_status,
-                                       resp->status.colp.net_status);
-                               break;
-                       case TEL_SS_CLI_COLR:
-                               msg(" COLR Response - Device : (%d), Network : (%d)",
-                                       resp->status.colr.dev_status,
-                                       resp->status.colr.net_status);
-                               break;
-                       case TEL_SS_CLI_CDIP:
-                               msg(" CDIP Response - Device : (%d), Network : (%d)",
-                                       resp->status.cdip.dev_status,
-                                       resp->status.cdip.net_status);
-                               break;
-                       case TEL_SS_CLI_CNAP:
-                               msg(" CNAP Response - Device : (%d), Network : (%d)",
-                                       resp->status.cnap.dev_status,
-                                       resp->status.cnap.net_status);
-               }
-       } else {
-               msg("Response data is NULL");
-       }
-}
 
 static int run_ss_get_cli_status(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result;
-       TelSsCliType type;
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+       TelSsCliType_t type;
 
-       msg("call tapi_ss_get_cli_status()");
+       msg("call tel_get_ss_cli_status()");
 
        type = atoi(data_ss_get_cli_status_type);
 
-       msg("cli type : (%d)", type);
-
-       result = tapi_ss_get_cli_status(handle, type, on_response_ss_get_cli_status, NULL);
-       CHECK_RT(result);
+       result = tel_get_ss_cli_status(handle, type, on_ss_get_cli_status, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
 
        return 0;
 }
 
-static void on_response_ss_send_ussd_request(TelHandle *handle, int result, void *data, void *user_data)
-{
-       TelSsUssdResp *resp = data;
-
-       msg("on_response_ss_send_ussd_request :");
-       CHECK_RESULT(result);
-
-       if (resp) {
-               msg(" Type : [%d] Status : [%d], String : [%s]",
-                               resp->type,
-                               resp->status,
-                               resp->str);
-       } else {
-               msg("No Callback data present.");
-       }
-}
-
 static int run_ss_send_ussd_request(MManager *mm, struct menu_data *menu)
 {
-       TelHandle *handle = menu_manager_ref_user_data(mm);
-       TelReturn result;
-       TelSsUssdInfo info;
-
-       msg("call tapi_ss_send_ussd_request()");
-
-       memset(&info, 0, sizeof(TelSsUssdInfo));
-
-       info.type = atoi(data_ss_ussd_request_type);
-       info.str = (unsigned char *) &data_ss_ussd_request_string;
-
-       msg("ussd type : (%d)", info.type);
-       msg("ussd string : (%s)", info.str);
+       TapiHandle *handle = menu_manager_ref_user_data(mm);
+       int result;
+       TelSsUssdMsgInfo_t info;
+
+       msg("call tel_send_ss_ussd_request()");
+
+       memset(&info, 0, sizeof(TelSsUssdMsgInfo_t));
+       info.Type = atoi(data_ss_ussd_request_type);
+       info.Dcs = 0x0f;
+       info.Length = strlen(data_ss_ussd_request_string);
+       if (info.Length > TAPI_SS_USSD_DATA_SIZE_MAX - 1) {
+               msg("failed. string is too long.");
+               return 0;
+       }
+       strncpy(info.szString, data_ss_ussd_request_string, TAPI_SS_USSD_DATA_SIZE_MAX - 1);
 
-       result = tapi_ss_send_ussd_request(handle, &info, on_response_ss_send_ussd_request, NULL);
-       CHECK_RT(result);
+       result = tel_send_ss_ussd_request(handle, &info, on_ss_send_ussd_request, NULL);
+       if (result != TAPI_API_SUCCESS) {
+               msg("failed. (result = %d)", result);
+       }
 
        return 0;
 }
 
 static struct menu_data menu_ss_set_barring[] = {
-       { "1", "class (0=All Teleservices bearer, \n" \
-                       "\t 10=All Teleservices, 11=Voice, 12=All Data Teleservices, 13=Fax, 16=SMS, 17=VGCS, 18=VBS, 19=All Tele except SMS \n" \
-                       "\t 20=All Bearer, 21=All async, 22=All sync, 24=All CS sync, 25=All CS async, 26=All DEDI PS, 27=All DEDI PAD, 28=All Data CDA\n" \
-                       "\t 89=Aux voice, 99=All GPRS bearer", NULL, NULL, data_ss_set_barring_class},
-       { "2", "enable (0=No, 1=Yes)", NULL, NULL, data_ss_set_barring_enable},
-       { "3", "type (0=BOAC, 1=BOIC, 2=BOIC Not HC 3=BAIC, 4=BIC Roam, 5=NS, 6=AB, 7=AOB, 8=AIB)", NULL, NULL, data_ss_set_barring_type},
+       { "1", "class", NULL, NULL, data_ss_set_barring_class},
+       { "-", "(16=All teleservices, 17=All voice, 18=All data teleservices", NULL, NULL, NULL},
+       { "-", " 19=FAX, 22=SMS, 23=VGCS, 24=VBS, 25=ALL_TELE_EXPT_SMS, ...)", NULL, NULL, NULL},
+       { "2", "mode", NULL, NULL, data_ss_set_barring_mode},
+       { "-", "(0=Activate, 1=Deactivate)", NULL, NULL, NULL},
+       { "3", "type", NULL, NULL, data_ss_set_barring_type},
+       { "-", "(1=All outgoing calls, 2=Outgoing international calls, 3=BOIC_NOT_HC", NULL, NULL, NULL},
+       { "-", " 4=All incoming calls, 5=BIC_ROAM, 6=AB, 7=AOB, 8=AIB, 9=BIC_NOT_SIM)", NULL, NULL, NULL},
        { "4", "password", NULL, NULL, data_ss_set_barring_password},
        { "5", "run", NULL, run_ss_set_barring, NULL},
        { NULL, NULL, },
 };
 
 static struct menu_data menu_ss_get_barring_status[] = {
-       { "1", "class (0=All Teleservices bearer, \n" \
-                       "\t 10=All Teleservices, 11=Voice, 12=All Data Teleservices, 13=Fax, 16=SMS, 17=VGCS, 18=VBS, 19=All Tele except SMS \n" \
-                       "\t 20=All Bearer, 21=All async, 22=All sync, 24=All CS sync, 25=All CS async, 26=All DEDI PS, 27=All DEDI PAD, 28=All Data CDA\n" \
-                       "\t 89=Aux voice, 99=All GPRS bearer", NULL, NULL, data_ss_get_barring_status_class},
-       { "2", "type (0=BOAC, 1=BOIC, 2=BOIC Not HC 3=BAIC, 4=BIC Roam, 5=NS, 6=AB, 7=AOB, 8=AIB)", NULL, NULL, data_ss_get_barring_status_type},
+       { "1", "class", NULL, NULL, data_ss_get_barring_status_class},
+       { "-", "(16=All teleservices, 17=All voice, 18=All data teleservices", NULL, NULL, NULL},
+       { "-", " 19=FAX, 22=SMS, 23=VGCS, 24=VBS, 25=ALL_TELE_EXPT_SMS, ...)", NULL, NULL, NULL},
+       { "2", "type", NULL, NULL, data_ss_get_barring_status_type},
+       { "-", "(1=All outgoing calls, 2=Outgoing international calls, 3=BOIC_NOT_HC", NULL, NULL, NULL},
+       { "-", " 4=All incoming calls, 5=BIC_ROAM, 6=AB, 7=AOB, 8=AIB, 9=BIC_NOT_SIM)", NULL, NULL, NULL},
        { "3", "run", NULL, run_ss_get_barring_status, NULL},
        { NULL, NULL, },
 };
@@ -551,89 +528,126 @@ static struct menu_data menu_ss_change_barring_password[] = {
 };
 
 static struct menu_data menu_ss_set_forward[] = {
-       { "1", "class (0=All Teleservices bearer, \n" \
-                       "\t 10=All Teleservices, 11=Voice, 12=All Data Teleservices, 13=Fax, 16=SMS, 17=VGCS, 18=VBS, 19=All Tele except SMS \n" \
-                       "\t 20=All Bearer, 21=All async, 22=All sync, 24=All CS sync, 25=All CS async, 26=All DEDI PS, 27=All DEDI PAD, 28=All Data CDA\n" \
-                       "\t 89=Aux voice, 99=All GPRS bearer", NULL, NULL, data_ss_set_forward_class},
-       { "2", "mode (0=Disable, 1=Enable, 2=Register, 3=Deregister)", NULL, NULL, data_ss_set_forward_mode},
-       { "3", "condition (0=CFU, 1=CFB, 2=CFNRY, 3=CFNRC, 4=ALL, 5=ALL_CFC)", NULL, NULL, data_ss_set_forward_condition},
-       { "4", "number", NULL, NULL, data_ss_set_forward_number},
-       { "5", "wait time (1-30 seconds)", NULL, NULL, data_ss_set_forward_timer},
+       { "1", "class", NULL, NULL, data_ss_set_forward_class},
+       { "-", "(16=All teleservices, 17=All voice, 18=All data teleservices", NULL, NULL, NULL},
+       { "-", " 19=FAX, 22=SMS, 23=VGCS, 24=VBS, 25=ALL_TELE_EXPT_SMS, ...)", NULL, NULL, NULL},
+       { "2", "mode", NULL, NULL, data_ss_set_forward_mode},
+       { "-", "(0=Deactivate, 1=Activate, 2=Register, 3=Deregister)", NULL, NULL, NULL},
+       { "3", "condition", NULL, NULL, data_ss_set_forward_condition},
+       { "-", "(1=CFU, 2=CFB, 3=CFNRy, 4=CFNRc, 5=CF_ALL, 6=CFC)", NULL, NULL, NULL},
+       { "4", "timer", NULL, NULL, data_ss_set_forward_timer},
+       { "-", "(5/10/15/20/25/30 secs)", NULL, NULL, NULL},
+       { "5", "number", NULL, NULL, data_ss_set_forward_number},
        { "6", "run", NULL, run_ss_set_forward, NULL},
 
        { NULL, NULL, },
 };
 
 static struct menu_data menu_ss_get_forward_status[] = {
-       { "1", "class (0=All Teleservices bearer, \n" \
-                       "\t 10=All Teleservices, 11=Voice, 12=All Data Teleservices, 13=Fax, 16=SMS, 17=VGCS, 18=VBS, 19=All Tele except SMS \n" \
-                       "\t 20=All Bearer, 21=All async, 22=All sync, 24=All CS sync, 25=All CS async, 26=All DEDI PS, 27=All DEDI PAD, 28=All Data CDA\n" \
-                       "\t 89=Aux voice, 99=All GPRS bearer", NULL, NULL, data_ss_get_forward_status_class},
-       { "2", "condition (0=CFU, 1=CFB, 2=CFNRY, 3=CFNRC, 4=ALL, 5=ALL_CFC)", NULL, NULL, data_ss_get_forward_status_condition},
+       { "1", "class", NULL, NULL, data_ss_get_forward_status_class},
+       { "-", "(16=All teleservices, 17=All voice, 18=All data teleservices", NULL, NULL, NULL},
+       { "-", " 19=FAX, 22=SMS, 23=VGCS, 24=VBS, 25=ALL_TELE_EXPT_SMS, ...)", NULL, NULL, NULL},
+       { "2", "condition", NULL, NULL, data_ss_get_forward_status_condition},
+       { "-", "(1=CFU, 2=CFB, 3=CFNRy, 4=CFNRc, 5=CF_ALL, 6=CFC)", NULL, NULL, NULL},
        { "3", "run", NULL, run_ss_get_forward_status, NULL},
        { NULL, NULL, },
 };
 
 static struct menu_data menu_ss_set_waiting[] = {
-       { "1", "class (0=All Teleservices bearer, \n" \
-                       "\t 10=All Teleservices, 11=Voice, 12=All Data Teleservices, 13=Fax, 16=SMS, 17=VGCS, 18=VBS, 19=All Tele except SMS \n" \
-                       "\t 20=All Bearer, 21=All async, 22=All sync, 24=All CS sync, 25=All CS async, 26=All DEDI PS, 27=All DEDI PAD, 28=All Data CDA\n" \
-                       "\t 89=Aux voice, 99=All GPRS bearer", NULL, NULL, data_ss_set_waiting_class},
-       { "2", "enable (0=Deactivate, 1=Activate)", NULL, NULL, data_ss_set_waiting_enable},
+       { "1", "class", NULL, NULL, data_ss_set_waiting_class},
+       { "-", "(16=All teleservices, 17=All voice, 18=All data teleservices", NULL, NULL, NULL},
+       { "-", " 19=FAX, 22=SMS, 23=VGCS, 24=VBS, 25=ALL_TELE_EXPT_SMS, ...)", NULL, NULL, NULL},
+       { "2", "mode", NULL, NULL, data_ss_set_waiting_mode},
+       { "-", "(0=Activate, 1=Deactivate)", NULL, NULL, NULL},
        { "3", "run", NULL, run_ss_set_waiting, NULL},
        { NULL, NULL, },
 };
 
 static struct menu_data menu_ss_get_waiting_status[] = {
-       { "1", "class (0=All Teleservices bearer, \n" \
-                       "\t 10=All Teleservices, 11=Voice, 12=All Data Teleservices, 13=Fax, 16=SMS, 17=VGCS, 18=VBS, 19=All Tele except SMS \n" \
-                       "\t 20=All Bearer, 21=All async, 22=All sync, 24=All CS sync, 25=All CS async, 26=All DEDI PS, 27=All DEDI PAD, 28=All Data CDA\n" \
-                       "\t 89=Aux voice, 99=All GPRS bearer", NULL, NULL, data_ss_get_waiting_status_class},
+       { "1", "class", NULL, NULL, data_ss_get_waiting_status_class},
+       { "-", "(16=All teleservices, 17=All voice, 18=All data teleservices", NULL, NULL, NULL},
+       { "-", " 19=FAX, 22=SMS, 23=VGCS, 24=VBS, 25=ALL_TELE_EXPT_SMS, ...)", NULL, NULL, NULL},
        { "2", "run", NULL, run_ss_get_waiting_status, NULL},
        { NULL, NULL, },
 };
 
-static struct menu_data menu_ss_set_cli[] = {
-       { "1", "type (0=clir, 1=clip, 2=colp, 3=colr, 4=cdip, 5=cnap)", NULL, NULL, data_ss_set_cli_status_type},
-       { "2", "device status ( CLIR : 0=Default, 1=Invocation, 2=Suppression, \n" \
-                       "\t Others : 0=Disable, 1=Enable)", NULL, NULL, data_ss_set_cli_device_status},
-       { "3", "run", NULL, run_ss_set_cli, NULL},
+static struct menu_data menu_ss_set_cli_status[] = {
+       { "1", "type", NULL, NULL, data_ss_set_cli_status_type},
+       { "-", "(1=CLIP, 2=CLIR, 3=COLP, 4=COLR, 5=CDIP, 6=CNAP)", NULL, NULL, NULL},
+       { "2", "mode", NULL, NULL, data_ss_set_cli_status},
+       { "-", "(1=SS_CLI_STATUS_NOT_PROVISONED, 2=SS_CLI_STATUS_PROVISIONED ,)", NULL, NULL, NULL},
+       { "-", "(3=SS_CLI_STATUS_ACTIVATED, 4=SS_CLI_STATUS_UNKOWN ,)", NULL, NULL, NULL},
+       { "-", "(5 =SS_CLI_STATUS_TEMP_RESTRICTED (Only for CLIR) , 6=SS_CLI_STATUS_TEMP_ALLOWED (Only for CLIR) ,)", NULL, NULL, NULL},
+       { "3", "run", NULL, run_ss_set_cli_status, NULL},
        { NULL, NULL, },
 };
 
 static struct menu_data menu_ss_get_cli_status[] = {
-       { "1", "type (0=CLIP, 1=CLIR, 2=COLP, 3=COLR, 4=CDIP, 5=CNAP)", NULL, NULL, data_ss_get_cli_status_type},
+       { "1", "type", NULL, NULL, data_ss_get_cli_status_type},
+       { "-", "(1=CLIP, 2=CLIR, 3=COLP, 4=COLR, 5=CDIP, 6=CNAP)", NULL, NULL, NULL},
        { "2", "run", NULL, run_ss_get_cli_status, NULL},
        { NULL, NULL, },
 };
 
 static struct menu_data menu_ss_send_ussd_request[] = {
-       { "1", "type (0=INIT, 1=RSP, 2=REL)", NULL, NULL, data_ss_ussd_request_type},
-       { "2", "ussd string", NULL, NULL, data_ss_ussd_request_string},
+       { "1", "type", NULL, NULL, data_ss_ussd_request_type},
+       { "-", "(1=INIT, 2=RSP, 3=REL)", NULL, NULL, NULL},
+       { "2", "string", NULL, NULL, data_ss_ussd_request_string},
        { "3", "run", NULL, run_ss_send_ussd_request, NULL},
        { NULL, NULL, },
 };
 
+struct menu_data menu_ss_3gpp[] = {
+       { "1", "tel_set_ss_barring", menu_ss_set_barring, NULL, NULL},
+       { "2", "tel_get_ss_barring_status", menu_ss_get_barring_status, NULL, NULL},
+       { "3", "tel_change_ss_barring_password", menu_ss_change_barring_password, NULL, NULL},
+       { "4", "tel_set_ss_forward", menu_ss_set_forward, NULL, NULL},
+       { "5", "tel_get_ss_forward_status", menu_ss_get_forward_status, NULL, NULL},
+       { "6", "tel_set_ss_waiting", menu_ss_set_waiting, NULL, NULL},
+       { "7", "tel_get_ss_waiting_status", menu_ss_get_waiting_status, NULL, NULL},
+       { "8", "tel_set__cli_status", menu_ss_set_cli_status, NULL, NULL},
+       { "9", "tel_get_ss_cli_status", menu_ss_get_cli_status, NULL, NULL},
+       { "10", "tel_send_ss_ussd_request", menu_ss_send_ussd_request, NULL, NULL},
+       { NULL, NULL, },
+};
+
 struct menu_data menu_ss[] = {
-       { "1", "tapi_ss_set_barring", menu_ss_set_barring, NULL, NULL},
-       { "2", "tapi_ss_get_barring_status", menu_ss_get_barring_status, NULL, NULL},
-       { "3", "tapi_ss_change_barring_password", menu_ss_change_barring_password, NULL, NULL},
-       { "4", "tapi_ss_set_forwarding", menu_ss_set_forward, NULL, NULL},
-       { "5", "tapi_ss_get_forwarding_status", menu_ss_get_forward_status, NULL, NULL},
-       { "6", "tapi_ss_set_waiting", menu_ss_set_waiting, NULL, NULL},
-       { "7", "tapi_ss_get_waiting_status", menu_ss_get_waiting_status, NULL, NULL},
-       { "8", "tapi_ss_set_cli", menu_ss_set_cli, NULL, NULL},
-       { "9", "tapi_ss_get_cli_status", menu_ss_get_cli_status, NULL, NULL},
-       { "10", "tapi_ss_send_ussd_request", menu_ss_send_ussd_request, NULL, NULL},
+       { "1", "3GPP(GSM/WCDMA/LTE)", menu_ss_3gpp, NULL, NULL},
+       { "2", "3GPP2(CDMA) Not Supported", NULL, NULL, NULL},
        { NULL, NULL, },
 };
 
-void register_ss_event(TelHandle *handle)
+void register_ss_event(TapiHandle *handle)
 {
-       TelReturn ret;
+       int ret;
+
+       ret = tel_register_noti_event(handle, TAPI_NOTI_SS_USSD, on_noti_ss_ussd, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
+
+       ret = tel_register_noti_event(handle, TAPI_NOTI_SS_RELEASE_COMPLETE, on_noti_ss_release_complete, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
+
+       ret = tel_register_noti_event(handle, TAPI_NOTI_SS_FORWARD_STATUS, on_noti_ss_forwarding_status, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
+
+       ret = tel_register_noti_event(handle, TAPI_NOTI_SS_BARRING_STATUS, on_noti_ss_barring_status, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
+
+       ret = tel_register_noti_event(handle, TAPI_NOTI_SS_WAITING_STATUS, on_noti_ss_waiting_status, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
+       }
 
-       ret = tapi_register_event_id (handle, TEL_NOTI_SS_USSD, on_noti_ss_ussd, NULL);
-       if (ret != TEL_RETURN_SUCCESS) {
-               msg("TEL_NOTI_SS_USSD - register event failed: [%d]", ret);
+       ret = tel_register_noti_event(handle, TAPI_NOTI_SS_INFO, on_noti_ss_sups_info, NULL);
+       if (ret != TAPI_API_SUCCESS) {
+               msg("event register failed(%d)", ret);
        }
 }
index 4b3175dea9c7e163f24ce31f3897bdfa0ac63839..47a9082393306360763ba07daca4949f34cf11b9 100644 (file)
@@ -1,8 +1,9 @@
 /*
- * libtapi
+ * libslp-tapi
  *
- * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.
- * Copyright (c) 2013 Intel Corporation. All rights reserved.
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Ja-young Gu <jygu@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,6 +22,6 @@
 #define __SS_H__
 
 
-void register_ss_event(TelHandle *handle);
+void register_ss_event(TapiHandle *handle);
 
 #endif