Tizen 2.1 base
authorJinkun Jang <jinkun.jang@samsung.com>
Tue, 12 Mar 2013 16:52:05 +0000 (01:52 +0900)
committerJinkun Jang <jinkun.jang@samsung.com>
Tue, 12 Mar 2013 16:52:05 +0000 (01:52 +0900)
62 files changed:
AUTHORS [new file with mode: 0644]
CMakeLists.txt [new file with mode: 0644]
LICENSE [new file with mode: 0644]
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/dirs [new file with mode: 0644]
debian/docs [new file with mode: 0644]
debian/libslp-tapi-0.install.in [new file with mode: 0644]
debian/libslp-tapi-dev.install.in [new file with mode: 0644]
debian/rules [new file with mode: 0755]
image/SLP_TelephonyFW_PG_image001.png [new file with mode: 0644]
image/SLP_TelephonyFW_PG_image002.png [new file with mode: 0644]
image/SLP_TelephonyFW_PG_image003.png [new file with mode: 0644]
image/SLP_TelephonyFW_PG_image004.png [new file with mode: 0644]
include/ITapiCall.h [new file with mode: 0644]
include/ITapiGps.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/ITapiPS.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/SLP_TelephonyFW_PG.h [new file with mode: 0644]
include/TapiUtility.h [new file with mode: 0644]
include/TelCall.h [new file with mode: 0644]
include/TelDefines.h [new file with mode: 0644]
include/TelDisplay.h [new file with mode: 0644]
include/TelErr.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/tapi_common.h [new file with mode: 0644]
include/tapi_event.h [new file with mode: 0644]
include/tapi_sat.h [new file with mode: 0644]
include/tapi_type.h [new file with mode: 0644]
libslp-tapi.manifest [new file with mode: 0644]
packaging/libslp-tapi.spec [new file with mode: 0644]
src/common.h [new file with mode: 0644]
src/tapi_call.c [new file with mode: 0644]
src/tapi_common.c [new file with mode: 0644]
src/tapi_gps.c [new file with mode: 0644]
src/tapi_log.h [new file with mode: 0644]
src/tapi_modem.c [new file with mode: 0644]
src/tapi_network.c [new file with mode: 0644]
src/tapi_phonebook.c [new file with mode: 0644]
src/tapi_sap.c [new file with mode: 0644]
src/tapi_sat.c [new file with mode: 0644]
src/tapi_sim.c [new file with mode: 0644]
src/tapi_sms.c [new file with mode: 0644]
src/tapi_ss.c [new file with mode: 0644]
tapi.pc.in [new file with mode: 0644]

diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..b9eed62
--- /dev/null
+++ 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>
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..e3cc7e2
--- /dev/null
@@ -0,0 +1,58 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(SLP-tapi C)
+
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+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-2.0 gthread-2.0 dlog security-server)
+
+FOREACH(flag ${pkgs_CFLAGS})
+       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(EXTRA_CFLAGS "${EXTRA_CFLAGS}  -Wl,-zdefs -fvisibility=hidden ")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Werror -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wmissing-declarations -Wredundant-decls -Wcast-align")
+#SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+SET(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=\"TAPI\"")
+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_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
+               src/tapi_gps.c
+   )
+
+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
+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)
diff --git a/LICENSE b/LICENSE
new file mode 100644 (file)
index 0000000..9c13a9b
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,204 @@
+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/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..4a51001
--- /dev/null
@@ -0,0 +1,1812 @@
+libslp-tapi (0.5.89) unstable; urgency=low
+
+  * Sync Version with OBS
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.89
+
+ -- Youngman Park <youngman.park@samsung.com>  Fri, 25 May 2012 14:40:21 +0900
+
+libslp-tapi (0.5.88) unstable; urgency=low
+
+  * Sync Header File with Public GIT
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.88
+
+ -- Youngman Park <youngman.park@samsung.com>  Thu, 24 May 2012 22:30:21 +0900
+
+libslp-tapi (0.5.87) unstable; urgency=low
+
+  * add new feature for call, factory & phonebook select function
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.87
+
+ -- Youngman Park <youngman.park@samsung.com>  Mon, 21 May 2012 17:50:21 +0900
+
+libslp-tapi (0.5.86) unstable; urgency=low
+
+  * add sim api - get lock info and update phonebook data
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.86
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Thu, 17 May 2012 17:32:21 +0900
+
+libslp-tapi (0.5.86) unstable; urgency=low
+
+  * add sim api - get lock info and update phonebook data
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.86
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Thu, 17 May 2012 17:32:21 +0900
+
+libslp-tapi (0.5.85) unstable; urgency=low
+
+  * glib include into Sound Header to use gboolean type
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.85
+
+ -- Youngman Park <youngman.park@samsung.com>  Tue, 08 May 2012 14:20:33 +0900
+
+libslp-tapi (0.5.84) unstable; urgency=low
+
+  * Add Call New API ( call custom service )
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.84
+
+ -- Youngman Park <youngman.park@samsung.com>  Mon, 07 May 2012 16:05:33 +0900
+
+libslp-tapi (0.5.83) unstable; urgency=low
+
+  * Fix dbus bug
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.83
+
+ -- DongHoo Park <donghoo.park@samsung.com>  Tue, 10 Apr 2012 15:13:33 +0900
+
+libslp-tapi (0.5.82) unstable; urgency=low
+
+  * version up for code sync with public binary
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.82
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Mon, 02 Apr 2012 12:00:29 +0900
+
+libslp-tapi (0.5.81) unstable; urgency=low
+
+  * add defence code in case of api return error
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.81
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Wed, 21 Mar 2012 21:52:04 +0900
+
+libslp-tapi (0.5.80) unstable; urgency=low
+
+  * Update phonebook record struct
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.80
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Mon, 19 Mar 2012 22:54:30 +0900
+
+libslp-tapi (0.5.79) unstable; urgency=low
+
+  * disable SAT functionality temporary
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.79
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Mon, 19 Mar 2012 14:52:45 +0900
+
+libslp-tapi (0.5.78) unstable; urgency=low
+
+  * code clean up
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.78
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Thu, 16 Feb 2012 21:00:36 +0900
+
+libslp-tapi (0.5.77) unstable; urgency=low
+
+  * SIM auth API and Doxygen comments are updated
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.77
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Wed, 01 Feb 2012 16:51:05 +0900
+
+libslp-tapi (0.5.76) unstable; urgency=low
+
+  * Factory Omission Avoidance Bug Fix ( Confirm Message Broadcasting Problem )
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.76
+
+ -- Youngman Park <youngman.park@samsung.com>  Fri, 09 Dec 2011 19:19:47 +0900
+
+libslp-tapi (0.5.75) unstable; urgency=low
+
+  * TIZEN initial version
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.75
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Wed, 07 Dec 2011 20:19:47 +0900
+
+libslp-tapi (0.5.74) unstable; urgency=low
+
+  * Modify Code for Factory Sound Loopback
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.74
+
+ -- Youngman Park <youngman.park@samsung.com>  Wed, 23 Nov 2011 19:41:55 +0900
+
+libslp-tapi (0.5.73) unstable; urgency=low
+
+  * remove duplicated api with capi
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.73
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Tue, 08 Nov 2011 21:12:55 +0900
+
+libslp-tapi (0.5.72) unstable; urgency=low
+
+  * add sync APIs to get vconf values(network, sim)
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.72
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Tue, 08 Nov 2011 09:40:55 +0900
+
+libslp-tapi (0.5.71) unstable; urgency=low
+
+  * add emergency mode feature(MDM requirement)
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.71
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Fri, 04 Nov 2011 16:56:43 +0900
+
+libslp-tapi (0.5.70) unstable; urgency=low
+
+  * clean up TC code
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.70
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Thu, 06 Oct 2011 18:02:49 +0900
+
+libslp-tapi (0.5.69) unstable; urgency=low
+
+  * Merged with tapi-priv
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.69
+
+ -- Inho Oh <inho48.oh@samsung.com>  Thu, 29 Sep 2011 14:53:38 +0900
+
+libslp-tapi (0.5.68) unstable; urgency=low
+
+  * Added msisdn api, extended language enum, fixed TC issue.
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.68
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Wed, 21 Sep 2011 13:52:47 +0900
+
+libslp-tapi (0.5.67) unstable; urgency=low
+
+  * Removed unused API and added new APIs(cf,mw,cphs)
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.67
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Wed, 31 Aug 2011 16:09:35 +0900
+
+libslp-tapi (0.5.66) unstable; urgency=low
+
+  * Fixed boilerplate, AUTHORS and COPYING. SAT-setup menu seq change 
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.66
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Sat, 23 Jul 2011 13:34:56 +0900
+
+libslp-tapi (0.5.65) unstable; urgency=low
+
+  * Add feature for getting ICCID and prevent bug fix
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.65
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Thu, 26 May 2011 20:22:27 +0900
+
+libslp-tapi (0.5.64) unstable; urgency=low
+
+  * Factory code is added & SS CQ is fixed
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.64
+
+ -- Youngman Park <youngman.park@samsung.com>  Wed, 16 Mar 2011 10:53:49 +0900
+
+libslp-tapi (0.5.63) unstable; urgency=low
+
+  * Fixed prevent bugs
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.63
+
+ -- Inho Oh <inho48.oh@samsung.com>  Thu, 17 Feb 2011 13:53:49 +0900
+
+libslp-tapi (0.5.62) unstable; urgency=low
+
+  * TC code clean
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.62
+
+ -- Youngman Park <youngman.park@samsung.com>  Wen, 9 Feb 2011 20:50:12 +0900
+
+libslp-tapi (0.5.61) unstable; urgency=low
+
+  * fix TC & add SAT event
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.61
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Mon, 31 Jan 2011 20:57:12 +0900
+
+libslp-tapi (0.5.60) unstable; urgency=low
+
+  * The parameter in S.S ussd tapi is changed.
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.60
+
+ -- Youngman Park <youngman.park@samsung.com>  Fri, 14 Jan 2011 21:18:21 +0900
+
+libslp-tapi (0.5.59) unstable; urgency=low
+
+  * Dbus output param sync with telephony server
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.59
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Mon, 10 Jan 2011 21:03:21 +0900
+
+libslp-tapi (0.5.58) unstable; urgency=low
+
+  * Added security cookie feature
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.58
+
+ -- Inho Oh <inho48.oh@samsung.com>  Thu, 06 Jan 2011 12:31:04 +0900
+
+libslp-tapi (0.5.57) unstable; urgency=low
+
+  * Add SIM, ME SMS memory full enum
+  * Git: slp/pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.57
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Mon, 06 Dec 2010 15:02:03 +0900
+
+libslp-tapi (0.5.56) unstable; urgency=low
+
+  * Fix the wrong event data length bug
+  * Git: slp/pkgs/libslp-tapi
+  * Tag: libslp-tapi_0.5.56
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Wed, 24 Nov 2010 18:42:10 +0900
+
+libslp-tapi (0.5.55) unstable; urgency=low
+
+  * package name is changed com.samsung... -> deb.com.samsung...
+  * Git: slp/pkgs/libslp-tapi
+  * Tag: libslp-tapi_0.5.55
+
+ -- Youngman Park <youngman.park@samsung.com>  Mon, 22 Nov 2010 16:31:28 +0900
+
+libslp-tapi (0.5.54) unstable; urgency=low
+
+  * Add TAPI_EVENT_SS_USSD_RSP_CNF and re-define TAPI_CS_SS_USSDRSP
+  * Git: slp/pkgs/libslp-tapi
+  * Tag: libslp-tapi_0.5.54
+
+ -- Sunghyuk Leee <sunghyuk.lee@samsung.com>  Fri, 12 Nov 2010 18:28:28 +0900
+
+libslp-tapi (0.5.53) unstable; urgency=low
+
+  * add image file
+  * Git: slp/pkgs/libslp-tapi
+  * Tag: libslp-tapi_0.5.53
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Mon, 08 Nov 2010 14:32:31 +0900
+
+libslp-tapi (0.5.52) unstable; urgency=low
+
+  * add la file
+  * Git: slp/pkgs/libslp-tapi
+  * Tag: libslp-tapi_0.5.52
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Wed, 03 Nov 2010 19:16:31 +0900
+
+libslp-tapi (0.5.51) unstable; urgency=low
+
+  * version update
+  * Git: slp/pkgs/libslp-tapi
+  * Tag: libslp-tapi_0.5.51
+
+ -- Youngman Park <youngman.park@samsung.com>  Tue, 02 Nov 2010 20:00:35 +0900
+
+libslp-tapi (0.5.50) unstable; urgency=low
+
+  * Removed libSLP-tapi.la
+  * Git: slp/pkgs/libslp-tapi
+  * Tag: libslp-tapi_0.5.50
+
+ -- Inho Oh <inho48.oh@samsung.com>  Tue, 02 Nov 2010 15:30:35 +0900
+
+libslp-tapi (0.5.49) unstable; urgency=low
+
+  * separated source repository
+  * Git: slp/pkgs/libslp-tapi
+  * Tag: libslp-tapi_0.5.49
+
+ -- Inho Oh <inho48.oh@samsung.com>  Tue, 2 Nov 2010 11:09:15 +0900
+
+telephony-fwk (0.5.48) unstable; urgency=low
+
+  * Update PG and sim,gprs code
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.48
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Sun, 31 Oct 2010 16:50:12 +0900
+
+telephony-fwk (0.5.47) unstable; urgency=low
+
+  * GPS TIS work
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.47
+
+ -- Youngman Park <youngman.park@samsung.com>  Tue, 19 Oct 2010 19:43:44 +0900
+
+telephony-fwk (0.5.46) unstable; urgency=low
+
+  * Launch voicecall ui with AUL upon SAT SETUP CALL IND
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.46
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Mon, 18 Oct 2010 20:54:44 +0900
+
+telephony-fwk (0.5.45) unstable; urgency=low
+
+  * Fixed GPRS requestid mismatch problem
+  * Removed wrong binary file (TC file)
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.45
+
+ -- Inho Oh <inho48.oh@samsung.com>  Mon, 18 Oct 2010 20:03:18 +0900
+
+telephony-fwk (0.5.44) unstable; urgency=low
+
+  * Telephony SAT sends the SAT USSD message by itself
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.44
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Mon, 18 Oct 2010 18:28:17 +0900
+
+telephony-fwk (0.5.43) unstable; urgency=low
+
+  * wrong code is fixed in debian/rules
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.43
+
+ -- Youngman Park <youngman.park@samsung.com>  Tue, 12 Oct 2010 20:10:33 +0900
+
+telephony-fwk (0.5.42) unstable; urgency=low
+
+  * debian/rule script is changed for hib
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.42
+
+ -- Youngman Park <youngman.park@samsung.com>  Tue, 12 Oct 2010 19:43:33 +0900
+
+telephony-fwk (0.5.41) unstable; urgency=low
+
+  * Add Device Node for DFT Rev0.9
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.41
+
+ -- Youngman Park <youngman.park@samsung.com>  Tue, 12 Oct 2010 11:10:33 +0900
+
+telephony-fwk (0.5.40) unstable; urgency=low
+
+  * HIB path is changed
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.40
+
+ -- Youngman Park <youngman.park@samsung.com>  Mon, 11 Oct 2010 13:33:33 +0900
+
+telephony-fwk (0.5.39) unstable; urgency=low
+
+  * Do not launch CISS upon SAT event  
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.39
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Mon, 11 Oct 2010 10:33:33 +0900
+
+telephony-fwk (0.5.38) unstable; urgency=low
+
+  * Add nvdata file create code
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.38
+
+ -- Youngman Park <youngman.park@samsung.com>  Fri, 01 Oct 2010 21:58:01 +0900
+
+telephony-fwk (0.5.37) unstable; urgency=low
+
+  * Inform flightmode state to kernel
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.37
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Fri, 01 Oct 2010 21:07:40 +0900
+
+telephony-fwk (0.5.36) unstable; urgency=low
+
+  * telephony PG is added
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.36
+
+ -- Youngman Park <youngman.park@samsung.com>  Fri, 01 Oct 2010 19:40:01 +0900
+
+telephony-fwk (0.5.35) unstable; urgency=low
+
+  * Add code to creat NV Data file (oem_init)
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.35
+
+ -- Youngman Park <youngman.park@samsung.com>  Fri, 01 Oct 2010 14:56:01 +0900
+
+telephony-fwk (0.5.34) unstable; urgency=low
+
+  * Stop launching CISS-MMI upon USSD CNF
+  * Remove binary files which were gernerated by TET-WARE
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.34
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Fri, 01 Oct 2010 14:20:01 +0900
+
+telephony-fwk (0.5.33) unstable; urgency=low
+
+  * Change a dependat svn package name
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.33
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Thu, 30 Sep 2010 19:16:19 +0900
+
+telephony-fwk (0.5.32) unstable; urgency=low
+
+  * Modify the Misc IPC header file 
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.32
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Mon, 27 Sep 2010 15:53:15 +0900
+
+telephony-fwk (0.5.31) unstable; urgency=low
+
+  * Remove GPL licensed codes 
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.31
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Mon, 27 Sep 2010 10:09:37 +0900
+
+telephony-fwk (0.5.30) unstable; urgency=low
+
+  * Add tet_scen and tslist.txt for SE team 
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.30
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Mon, 27 Sep 2010 09:54:42 +0900
+
+telephony-fwk (0.5.29) unstable; urgency=low
+
+  * Update the telephony test cases
+  * Fix some tapi proxy errors
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.29
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Mon, 20 Sep 2010 18:38:11 +0900
+
+telephony-fwk (0.5.28) unstable; urgency=low
+
+  * Add Uploader 
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.28
+
+ -- Youngman Park <youngman.park@samsung.com>  Fri, 17 Sep 2010 11:38:12 +0900
+
+telephony-fwk (0.5.27) unstable; urgency=low
+
+  * Modify Time value for Power OFF ( 30Sec -> 10Sec)
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.27
+
+ -- Youngman Park <youngman.park@samsung.com>  Thu, 16 Sep 2010 21:52:42 +0900
+
+telephony-fwk (0.5.26) unstable; urgency=low
+
+  * Fix the SIM Tapi returning value garray index mismatch
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.26
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Thu, 16 Sep 2010 13:16:12 +0900
+
+telephony-fwk (0.5.25) unstable; urgency=low
+
+  * Add AUL interface for incoming call event
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.25
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Wed, 15 Sep 2010 09:14:27 +0900
+
+telephony-fwk (0.5.24) unstable; urgency=low
+
+  * Make the test apps compilable and upload test cases
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.24
+
+ -- Sunghyuk <sunghyuk.lee@samsung.com>  Mon, 13 Sep 2010 15:16:36 +0900
+
+telephony-fwk (0.5.23) unstable; urgency=low
+
+  * repackaging for EFL upgrade
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.23
+
+ -- Hyeongbae Park <jupio.park@samsung.com>  Fri, 10 Sep 2010 21:58:32 +0900
+
+telephony-fwk (0.5.22) unstable; urgency=low
+
+  * Fix the pdp deactivating signal
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.22
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Thu, 09 Sep 2010 22:34:32 +0900
+
+telephony-fwk (0.5.21) unstable; urgency=low
+
+  * Deny the pdp request if the dpd status is wrong
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.21
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Thu, 09 Sep 2010 15:05:01 +0900
+
+telephony-fwk (0.5.20) unstable; urgency=low
+
+  * Fix typo of pdp deactivating path
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.20
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Thu, 09 Sep 2010 13:47:12 +0900
+
+telephony-fwk (0.5.19) unstable; urgency=low
+
+  * remove system power off command
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.19
+
+ -- Hyeongbae Park <jupio.park@samsung.com>  Wed, 08 Sep 2010 14:12:43 +0900
+
+telephony-fwk (0.5.18) unstable; urgency=low
+
+  * bug fix
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.18
+
+ -- Hyeongbae Park <jupio.park@samsung.com>  Mon, 06 Sep 2010 10:59:43 +0900
+
+telephony-fwk (0.5.17) unstable; urgency=low
+
+  * add Tunnel API and fix bug in gprs suspend/resume
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.17
+
+ -- Hyeongbae Park <jupio.park@samsung.com>  Fri, 03 Sep 2010 21:24:43 +0900
+
+telephony-fwk (0.5.16) unstable; urgency=low
+
+  * Exclude TelUtility_ext.h from dev installation
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.16
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Fri, 03 Sep 2010 09:52:43 +0900
+
+telephony-fwk (0.5.15) unstable; urgency=low
+
+  * Rename the SAT server function 
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.15
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Wed, 01 Sep 2010 16:31:00 +0900
+
+telephony-fwk (0.5.14) unstable; urgency=low
+
+  * Revise TapiCommon.h doxygen comments
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.14
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Tue, 31 Aug 2010 10:56:26 +0900
+
+telephony-fwk (0.5.13) unstable; urgency=low
+
+  * Revise TAPI doxygen 
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.13
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Mon, 30 Aug 2010 21:27:03 +0900
+
+telephony-fwk (0.5.12) unstable; urgency=low
+
+  * Fix dlog string error in oem_init 
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.12
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Fri, 27 Aug 2010 17:41:04 +0900
+
+telephony-fwk (0.5.11) unstable; urgency=low
+
+  * Kernel boots the CP instead of Telephony Server
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.11
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Thu, 26 Aug 2010 13:01:12 +0900
+
+telephony-fwk (0.5.10) unstable; urgency=low
+
+  * Add images and PG doxygen
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.10
+
+ -- Hyeongbae Park <jupio.park@samsung.com>  Thu, 26 Aug 2010 11:10:28 +0900
+
+telephony-fwk (0.5.9) unstable; urgency=low
+
+  * add sleep during modem bootin 
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.9
+
+ -- Hyeongbae Park <jupio.park@samsung.com>  Wed, 25 Aug 2010 11:58:10 +0900
+
+elephony-fwk (0.5.8) unstable; urgency=low
+
+  * Change the swap confirmation to fix timeout issue at call swap 
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.8
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Tue, 24 Aug 2010 19:35:10 +0900
+
+telephony-fwk (0.5.7) unstable; urgency=low
+
+  * Publish SAT event with Dbus
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.7
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Fri, 20 Aug 2010 21:58:36 +0900
+
+telephony-fwk (0.5.6) unstable; urgency=low
+
+  * Fix CiSS AUL key string 
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.6
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Fri, 20 Aug 2010 14:47:21 +0900
+
+telephony-fwk (0.5.5) unstable; urgency=low
+
+  * Fix timing issue with nitz_updater on booting time 
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.5
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Wed, 18 Aug 2010 17:13:09 +0900
+
+telephony-fwk (0.5.4) unstable; urgency=low
+
+  * Fix a bug regarding response upon SAT envelope commands
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.4
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Fri, 13 Aug 2010 22:26:59 +0900
+
+telephony-fwk (0.5.3) unstable; urgency=low
+
+  * Fix the memory corruption issue at OEM request list operation
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.3
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Wed, 11 Aug 2010 10:52:02 +0900
+
+telephony-fwk (0.5.2) unstable; urgency=low
+
+  * Disable event downloading feature temporarily
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.2
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Mon, 09 Aug 2010 11:06:44 +0900
+
+telephony-fwk (0.5.1) unstable; urgency=low
+
+  * Log to dlog
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.1
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Mon, 09 Aug 2010 09:16:57 +0900
+
+telephony-fwk (0.5.0) unstable; urgency=low
+
+  * Apply phonet socket interface
+  * Change OEM callback scheme
+  * Imporve GPRS OEM interface
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.5.0
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Fri, 06 Aug 2010 17:04:27 +0900
+
+telephony-fwk (0.4.22) unstable; urgency=low
+
+  * Disable the modem boot option
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.4.22
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Fri, 06 Aug 2010 09:27:34 +0900
+
+telephony-fwk (0.4.21) unstable; urgency=low
+
+  * Config git user setting
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.4.21
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Thu, 05 Aug 2010 21:09:25 +0900
+
+telephony-fwk (0.4.20) unstable; urgency=low
+
+  * Apply new AUL api 
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.4.20
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Thu, 05 Aug 2010 20:01:08 +0900
+
+telephony-fwk (0.4.19) unstable; urgency=low
+
+  * bug fix in factory
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.4.19
+
+ -- Hyeongbae Park <jupio.park@samsung.com>  Thu, 29 Jul 2010 16:51:04 +0900
+
+telephony-fwk (0.4.18) unstable; urgency=low
+
+  * Add g_type_init
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.4.18
+
+ -- Hyeongbae Park <jupio.park@samsung.com>  Wed, 28 Jul 2010 20:33:04 +0900
+
+telephony-fwk (0.4.17) unstable; urgency=low
+
+  * Move the TelPower.h and TelDisplay.h to internal common header folder
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.4.17
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Wed, 21 Jul 2010 13:47:04 +0900
+
+telephony-fwk (0.4.16) unstable; urgency=low
+
+  * Modify doxygen tag of misc, event_internal
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.4.16
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Tue, 20 Jul 2010 19:16:15 +0900
+
+telephony-fwk (0.4.15) unstable; urgency=low
+
+  * Modify doxygen tag of display, power headers
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.4.15
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Tue, 20 Jul 2010 19:05:09 +0900
+
+telephony-fwk (0.4.14) unstable; urgency=low
+
+  * Fix the VT event mismatch issue
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.4.14
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Tue, 20 Jul 2010 16:09:26 +0900
+
+telephony-fwk (0.4.13) unstable; urgency=low
+
+  * Fix some doxygen warnings and missing symbol issues
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.4.13
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Mon, 19 Jul 2010 18:04:41 +0900
+
+telephony-fwk (0.4.12) unstable; urgency=low
+
+  * Fix the event string for ts_delivery_initcomplete_event
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.4.12
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Mon, 19 Jul 2010 08:44:16 +0900
+
+telephony-fwk (0.4.11) unstable; urgency=low
+
+  * Add the debug package rule
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.4.11
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Fri, 16 Jul 2010 11:50:31 +0900
+
+telephony-fwk (0.4.10) unstable; urgency=low
+
+  * Correct some doxygen typo and missing symbol problem
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.4.10
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Thu, 15 Jul 2010 20:49:34 +0900
+
+telephony-fwk (0.4.9) unstable; urgency=low
+
+  * Fix the internal function which determine whether the request is
+    synchronous or not
+  * Git: slp/pkgs/telephony-fwk
+  * Tag: telephony-fwk_0.4.9
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Thu, 15 Jul 2010 11:57:01 +0900
+
+telephony-fwk (0.4.8) unstable; urgency=low
+
+  * Add io channel watch to g_main_loop for User actvity event 
+  * Remove g_source which g_io_channel_watch has added
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.4.8
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Sat, 10 Jul 2010 15:06:49 +0900
+
+telephony-fwk (0.4.7) unstable; urgency=low
+
+  * Hide unwanted functions from being visible in the library
+  * Generate the debug packages
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.4.7
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Fri, 09 Jul 2010 20:57:23 +0900
+
+telephony-fwk (0.4.6) unstable; urgency=low
+
+  * Serarate telephony server main loop and rfs loop
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.4.6
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Fri, 09 Jul 2010 11:54:48 +0900
+
+telephony-fwk (0.4.5) unstable; urgency=low
+
+  * Separate internal server features from the telephony server
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.4.5
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Thu, 08 Jul 2010 17:26:15 +0900
+
+telephony-fwk (0.4.4) unstable; urgency=low
+
+  * Update the boiler plate
+  * Remove 'LIMO' from some definitions
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.4.4
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Wed, 07 Jul 2010 10:11:58 +0900
+
+telephony-fwk (0.4.3) unstable; urgency=low
+
+  * Fix SAT bug which was caused by garray index mismatch of the userdata
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.4.3
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Tue, 06 Jul 2010 21:10:57 +0900
+
+telephony-fwk (0.4.2) unstable; urgency=low
+
+  * Change to Single Thread
+  * Fix a bug on the simulator
+  * Add doxygen flag which exclude the private package from the document
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.4.2
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Mon, 05 Jul 2010 13:37:36 +0900
+
+telephony-fwk (0.4.1) unstable; urgency=low
+
+  * Fix the event string mismatch bug for power, svcmode, display
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.4.1
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Thu, 01 Jul 2010 20:35:13 +0900
+
+telephony-fwk (0.4.0) unstable; urgency=low
+
+  * Change the telephony event definition
+  * Point-to-point event delivery
+  * Add a user data parameter at the tel_register_event API
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.4.0
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Thu, 01 Jul 2010 14:03:57 +0900
+
+telephony-fwk (0.3.17) unstable; urgency=low
+
+  * request id modification 
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.3.17
+
+ -- SungEun Lee <selee@samsung.com>  Fri, 25 Jun 2010 14:01:25 +0900
+
+telephony-fwk (0.3.16) unstable; urgency=low
+
+  * dlog modification
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.3.16
+
+ -- SungEun Lee <selee@samsung.com>  Thu, 17 Jun 2010 11:01:25 +0900
+
+telephony-fwk (0.3.15) unstable; urgency=low
+
+  * dlog modification
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.3.15
+
+ -- SungEun Lee <selee@samsung.com>  Wed, 16 Jun 2010 09:27:25 +0900
+
+telephony-fwk (0.3.14) unstable; urgency=low
+
+  * version up for EFL upgrade
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.3.14
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Fri, 11 Jun 2010 11:14:25 +0900
+
+telephony-fwk (0.3.13) unstable; urgency=low
+
+  * noti modification for vt
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.3.13
+
+ -- SungEun Lee <selee@samsung.com>  Wend, 08 Jun 2010 23:15:01 +0900
+
+telephony-fwk (0.3.12) unstable; urgency=low
+
+  * noti modification
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.3.12
+
+ -- SungEun Lee <selee@samsung.com>  Wend, 08 Jun 2010 17:25:01 +0900
+
+telephony-fwk (0.3.11) unstable; urgency=low
+
+  * gprs modification for dormant
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.3.11
+
+ -- SungEun Lee <selee@samsung.com>  Mon, 07 Jun 2010 17:25:01 +0900
+
+telephony-fwk (0.3.10) unstable; urgency=low
+
+  * Support the AUL for SAT and CiSS
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.3.10
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Mon, 07 Jun 2010 10:53:01 +0900
+
+telephony-fwk (0.3.9) unstable; urgency=low
+   
+  * resolve build break due to utilcore dependency
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.3.9
+ -- Hyeongbae Park <jupio.park@samsung.com>  Fri, 04 Jun 2010 15:55:28 +0900
+
+telephony-fwk (0.3.8) unstable; urgency=low
+   
+  * fixed rsim access operation 
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.3.8
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Thu, 03 Jun 2010 22:01:28 +0900
+
+telephony-fwk (0.3.7) unstable; urgency=low
+   
+  * the old API is removed 
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.3.7
+ -- selee <selee@samsung.com>  Thu, 03 Jun 2010 13:50:01 +0900
+
+telephony-fwk (0.3.6) unstable; urgency=low
+
+  * bug fix in sms read message and change bs, vt launch ways 
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.3.6
+
+ -- hyeongbae park <jupio.park@samsung.com>  Tue, 1 Jun 2010 17:00:34 +0900
+
+telephony-fwk (0.3.5) unstable; urgency=low
+
+  * rollback previous work(aul)
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.3.5
+
+ -- sungeun lee <selee@samsung.com>  Sun, 30 May 2010 16:30:34 +0900
+
+telephony-fwk (0.3.4) unstable; urgency=low
+
+  * change vt launching method from fork to aul
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.3.4
+
+ -- sungeun lee <selee@samsung.com>  Sun, 30 May 2010 15:12:34 +0900
+
+telephony-fwk (0.3.3) unstable; urgency=low
+
+  * Fix pin check procedure for getting valid retry count
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.3.3
+
+ -- kyeongchul kim <kyeongchul.kim@samsung.com>  Sun, 30 May 2010 13:37:34 +0900
+
+telephony-fwk (0.3.2) unstable; urgency=low
+
+  * Fix debug print statement in tel_get_sim_init_info
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.3.2
+
+ -- kyeongchul kim <kyeongchul.kim@samsung.com>  Sat, 29 May 2010 17:30:12 +0900
+
+telephony-fwk (0.3.1) unstable; urgency=low
+
+  * Fix the typo, tel_prcoess_power_command
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.3.1
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Sat, 29 May 2010 13:58:59 +0900
+
+telephony-fwk (0.3.0) unstable; urgency=low
+
+  * Telephony API Enhancement
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.3.0
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Sat, 29 May 2010 13:28:50 +0900
+
+telephony-fwk (0.2.27) unstable; urgency=low
+
+  * Disable dbus auto-activation according to the DAC policy 
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.2.27
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Fri, 28 May 2010 16:23:04 +0900
+
+telephony-fwk (0.2.26) unstable; urgency=low
+
+  * Change the package maintainer 
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.2.26
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Mon, 24 May 2010 09:37:01 +0900
+
+telephony-fwk (0.2.25) unstable; urgency=low
+   * Change boot script for hibernation capturing
+   * Git: slp2.0/slp2.0-pkgs/telephony-0
+   * Tag: telephony-fwk_0.2.25
+ -- Hyeongbae Park <jupio.park@samsung.com>  Mon, 17 May 2010 11:29:15 +0900
+
+telephony-fwk (0.2.24) unstable; urgency=low
+   * Change the file permission and owner according to the new security
+   * Git: slp2.0/slp2.0-pkgs/telephony-0
+   * Tag: telephony-fwk_0.2.24
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Fri, 14 May 2010 14:31:15
+telephony-fwk (0.2.23) unstable; urgency=low
+   * [Build] Remove Dependency Problem of util-core
+   * Git: slp2.0/slp2.0-pkgs/telephony-0
+   * Tag: telephony-fwk_0.2.23
+ -- Youngman Park <youngman.park@samsung.com>  Wen, 12 May 2010 13:00:56
+
+telephony-fwk (0.2.22) unstable; urgency=low
+   * [MISC] Fix the OEM callback fucntion upon the version info response
+   * Git: slp2.0/slp2.0-pkgs/telephony-0
+   * Tag: telephony-fwk_0.2.22
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Tue, 04 May 2010 16:59:56
+telephony-fwk (0.2.21) unstable; urgency=low
+   * fix the idle text function's parameter data type to support long text
+     string
+   * Git: slp2.0/slp2.0-pkgs/telephony-0
+   * Tag: telephony-fwk_0.2.21
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Mon, 26 Apr 2010 19:54:35
+
+telephony-fwk (0.2.20) unstable; urgency=low
+
+  * Add option for fastboot 
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.2.20
+
+ -- Hyeongbae Park <jupio.park@samsung.com>  Mon, 26 Apr 2010 17:39:54 +0900
+
+telephony-fwk (0.2.19) unstable; urgency=low
+
+  * Support the long SAT text 
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.2.19
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Fri, 23 Apr 2010 20:11:54 +0900
+
+telephony-fwk (0.2.18) unstable; urgency=low
+
+  * Fix a bug (Add the event string of SimReadFileRaw)
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.2.18
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Fri, 23 Apr 2010 11:59:58 +0900
+
+telephony-fwk (0.2.17) unstable; urgency=low
+
+  * Adjust timeout value for SMS API related to SIM
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.2.17
+
+ -- Hyeongbae Park <jupio.park@samsung.com>  Thu, 22 Apr 2010 22:08:57 +0900
+
+telephony-fwk (0.2.16) unstable; urgency=low
+
+  * Fix a raw RSIM bug
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.2.16
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Wed, 21 Apr 2010 20:34:57 +0900
+
+telephony-fwk (0.2.15) unstable; urgency=low
+
+  * Change condition check routine for getting security state
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.2.15
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Tue, 20 Apr 2010 22:41:12 +0900
+
+telephony-fwk (0.2.14) unstable; urgency=low
+
+  * Add postinst for security
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.2.14
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Mon, 19 Apr 2010 17:59:26 +0900
+
+telephony-fwk (0.2.13) unstable; urgency=low
+
+  * Fix the SAT command queuing problem
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Mon, 19 Apr 2010 17:35:47 +0900
+
+telephony-fwk (0.2.12) unstable; urgency=low
+
+  * change internal gconf key to vconf value 
+  * Git: slp2.0/slp2.0-pkgs/telephony-0
+  * Tag: telephony-fwk_0.2.12
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Fri, 16 Apr 2010 23:17:30 +0900
+
+telephony-fwk (0.2.11) unstable; urgency=low
+
+  * Change SIM Ecc Value
+
+ -- Youngman Park <youngman.park@samsung.com>  Fri, 09 Apr 2010 15:44:44 +0900
+
+telephony-fwk (0.2.10) unstable; urgency=low
+
+  * add audio loobpack and rc.d
+
+ -- Hyeongbae Park <jupio.park@samsung.com>  Thu, 08 Apr 2010 19:10:53 +0900
+
+telephony-fwk (0.2.9) unstable; urgency=low
+
+  * Fix a bug to print out all debug message upon publishing dbus events
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Thu, 08 Apr 2010 16:45:53 +0900
+
+telephony-fwk (0.2.8) unstable; urgency=low
+
+  * File format chagne DOS -> UNIX
+
+ -- youngman park <youngman.park@samsung.com>  Tue, 8 Apr 2010 13:31:14 +0900
+
+telephony-fwk (0.2.7) unstable; urgency=low
+
+  * Add ecc category for emergency call
+
+ -- youngman park <youngman.park@samsung.com>  Mon, 5 Apr 2010 21:12:14 +0900
+
+telephony-fwk (0.2.6) unstable; urgency=low
+
+  * Adjust ramdump for test mode
+
+ -- hyeongbae park <jupio.park@samsung.com>  Tue, 1 Apr 2010 11:20:54 +0900
+
+telephony-fwk (0.2.5) unstable; urgency=low
+
+  * Add timeprint to check main() timing issue
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Wed, 31 Mar 2010 18:03:54 +0900
+
+telephony-fwk (0.2.4) unstable; urgency=low
+
+  * Apply network band value re-arrangement from modem
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Wed, 31 Mar 2010 17:30:38 +0900
+
+
+telephony-fwk (0.2.4) unstable; urgency=low
+
+  * Apply network band value re-arrangement from modem
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Wed, 31 Mar 2010 17:30:38 +0900
+
+telephony-fwk (0.2.3) unstable; urgency=low
+
+  * re-arrange telephony headers
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Tue, 30 Mar 2010 19:31:19 +0900
+
+telephony-fwk (0.2.2) unstable; urgency=low
+
+  * Add Emergency Call Event
+
+ -- Youngman Park <youngman.park@samsung.com>  Fri, 26 Mar 2010 16:44:22 +0900
+
+telephony-fwk (0.2.1) unstable; urgency=low
+
+  * Bug Fix E911 Call
+
+ -- Youngman Park <youngman.park@samsung.com>  Thu, 25 Mar 2010 21:25:22 +0900
+
+telephony-fwk (0.2.0) unstable; urgency=low
+
+  * Reupload dpkg upon request from SCM (toolchain upgrade)
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Thu, 25 Mar 2010 13:58:42 +0900
+
+telephony-fwk (0.1.63) unstable; urgency=low
+
+  * [SAT] Seperate the autoactivating sat event from normal event
+
+ -- Sunghyuk Lee <sunghyuk.lee@samsung.com>  Wed, 24 Mar 2010 17:09:22 +0900
+
+telephony-fwk (0.1.62) unstable; urgency=low
+
+  * Fix E911 Call Bug
+
+ -- youngman.park <youngman.park@samsung.com>  Wed, 24 Mar 2010 10:19:34 +0900
+
+telephony-fwk (0.1.61) unstable; urgency=low
+
+  * Fix DFT KeySend Bug
+
+ -- youngman.park <youngman.park@samsung.com>  Tues, 23 Mar 2010 19:17:14 +0900
+
+telephony-fwk (0.1.60) unstable; urgency=low
+
+  * Change debug level from  LEVEL_EMERG to LEVEL_DEBUG
+
+ -- sungeun.lee <selee@samsung.com>  Tues, 23 Mar 2010 09:20:41 +0900
+
+telephony-fwk (0.1.59) unstable; urgency=low
+
+  * Fix bug : bIsMainMenuPresent flag issue
+
+ -- sunghyuk.lee <sunghyuk.lee@samsung.com>  Mon, 22 Mar 2010 21:51:41 +0900
+
+telephony-fwk (0.1.58) unstable; urgency=low
+
+  * Change KeyCode Data in Factory DFT
+
+ -- youngman.park <youngman.park@samsung.com>  Mon, 22 Mar 2010 17:37:33 +0900
+
+telephony-fwk (0.1.57) unstable; urgency=low
+
+  * Bug Fix for Factory DFT 
+
+ -- youngman.park <youngman.park@samsung.com>  Thu, 19 Mar 2010 23:23:11 +0900
+
+telephony-fwk (0.1.56) unstable; urgency=low
+
+  * add clock ipc at sound module
+
+ -- hyeongbae.park <jupio.park@samsung.com>  Thu, 17 Mar 2010 20:23:31 +0900
+
+telephony-fwk (0.1.55) unstable; urgency=low
+
+  * [SAT] Fix a bug. Stop to activate satui upon
+    Telephony.Sat.EventDownloadCnf event
+
+ -- sunghyuk.lee <sunghyuk.lee@samsung.com>  Tue, 16 Mar 2010 16:17:19 +0900
+
+telephony-fwk (0.1.54) unstable; urgency=low
+
+  * [SAT] Fix a bug. It has made the satui activated abnormally
+
+ -- sunghyuk.lee <sunghyuk.lee@samsung.com>  Tue, 16 Mar 2010 15:11:31 +0900
+
+telephony-fwk (0.1.53) unstable; urgency=low
+
+  * change CP RAMDUMP size from 36M to 37M due to Onedram partition
+
+ -- hyeongbae.park <jupio.park@samsung.com>  Mon, 15 Mar 2010 16:40:33 +0900
+
+telephony-fwk (0.1.52) unstable; urgency=low
+
+  * [SAT] Support USER_ACTIVITY event downloading feature
+
+ -- sunghyuk.lee <sunghyuk.lee@samsung.com>  Fri, 12 Mar 2010 22:25:33 +0900
+
+telephony-fwk (0.1.51) unstable; urgency=low
+
+  * replace sync into close in RFS
+    Fix C++ guard and empty parameter problem upon SDK request
+
+ -- hyeongbae.park <jupio.park@samsung.com>  Fri, 12 Mar 2010 16:05:44 +0900
+
+telephony-fwk (0.1.50) unstable; urgency=low
+
+  * remove phone off and increase timeout for PSI CRC checking
+
+ -- hyeongbae.park <jupio.park@samsung.com>  Thu, 11 Mar 2010 23:20:44 +0900
+
+telephony-fwk (0.1.49) unstable; urgency=low
+
+  * comment dlog_init and dlog_deinit for child process
+
+ -- hyeongbae.park <jupio.park@samsung.com>  Wed, 10 Mar 2010 19:50:44 +0900
+
+telephony-fwk (0.1.48) unstable; urgency=low
+
+  * Remove sleep(1) from TelServerSatProactiveSelectItemInd
+
+ -- sunghyuk.lee <sunghyuk.lee@samsung.com>  Wed, 10 Mar 2010 16:04:44 +0900
+
+telephony-fwk (0.1.47) unstable; urgency=low
+
+  * Do not activate the sat-ui automatically upon TAPI_EVENT_SAT_PROVIDE_LOCAL_INFO_IND event
+
+ -- sunghyuk.lee <sunghyuk.lee@samsung.com>  Wed, 10 Mar 2010 10:42:44 +0900
+
+telephony-fwk (0.1.46) unstable; urgency=low
+
+  * change psi download sequnce and adjust modem partition from raw to mtd/ubi
+
+ -- hyeongbae.park <jupio.park@samsung.com>  Mon, 08 Mar 2010 17:05:00 +0900
+
+telephony-fwk (0.1.45) unstable; urgency=low
+
+  * [SAT] Define BROWSER_DBUS_CONN_NAME to launch browser automatically upon SAT event
+
+ -- sunghyuk.lee <sunghyuk.lee@samsung.com>  Fri, 05 Mar 2010 10:32:00 +0900
+
+telephony-fwk (0.1.44) unstable; urgency=low
+
+  * Define CISS_DBUS_CONN_NAME to launch ciss automatically upon SAT events
+
+ -- sunghyuk.lee <sunghyuk.lee@samsung.com>  Tue, 02 Mar 2010 19:27:09 +0900
+
+telephony-fwk (0.1.43) unstable; urgency=low
+
+  * [SAT] Fix bugs to send dbus signals to other modules normally
+
+ -- sunghyuk.lee <sunghyuk.lee@samsung.com>  Fri, 26 Feb 2010 10:11:30 +0900
+
+telephony-fwk (0.1.42) unstable; urgency=low
+
+  * Add new RFS & common boot
+
+ -- hyeongbae.park <jupio.park@samsung.com>  Thu, 25 Feb 2010 21:00:01 +0900
+
+telephony-fwk (0.1.41) unstable; urgency=low
+
+  * ADD FACTORT DFT CODE (KEY, TOUCH)
+
+ -- youngman.park <youngman.park@samsung.com>  Thu, 25 Feb 2010 17:00:01 +0900
+
+telephony-fwk (0.1.40) unstable; urgency=low
+
+  * ADD FACTORT DFT HEADER
+
+ -- youngman.park <youngman.park@samsung.com>  Tue, 23 Feb 2010 23:10:04 +0900
+
+telephony-fwk (0.1.39) unstable; urgency=low
+
+  * FIX GPRS SIGSEGV ERROR by Wrong IPC Message (IPC_GPRS_CALL_STATUS)
+
+ -- youngman.park <youngman.park@samsung.com>  Tue, 23 Feb 2010 23:00:10 +0900
+
+telephony-fwk (0.1.38) unstable; urgency=low
+
+  * FIX GPRS PORT LIST ERROR
+
+ -- youngman.park <youngman.park@samsung.com>  Tue, 23 Feb 2010 22:55:12 +0900
+
+telephony-fwk (0.1.37) unstable; urgency=low
+
+  * modify tapi_misc_timezone_setinfo()'s doxygen tag
+
+ -- sungeun.lee <selee@samsung.com>  Tue, 23 Feb 2010 13:21:30 +0900
+
+telephony-fwk (0.1.36) unstable; urgency=low
+
+  * change CS/PS vconf init value OFF to UNKNOWN, add plmn handling code in
+    NITZ noti case
+
+ -- kyeongchul.kim <kyeongchul.kim@samsung.com>  Mon, 22 Feb 2010 15:32:19 +0900
+
+telephony-fwk (0.1.35) unstable; urgency=low
+
+  * Add vconf key, VCONFKEY_TELEPHONY_SAT_STATE on request from VoiceCall app
+
+ -- sunghyuk.lee <sunghyuk.lee@samsung.com>  Sat, 20 Feb 2010 11:35:30 +0900
+
+telephony-fwk (0.1.34) unstable; urgency=low
+
+  * [SAT] Support large icons and color icons (with -DLARGE_ICON option)
+
+ -- sunghyuk.lee <sunghyuk.lee@samsung.com>  Fri, 19 Feb 2010 17:33:57 +0900
+
+telephony-fwk (0.1.33) unstable; urgency=low
+
+  * add noti publish code when card type is changed on boot time
+
+ -- kyeongchul.kim <kyeongchul.kim@samsung.com>  Thu, 18 Feb 2010 16:53:46 +0900
+
+telephony-fwk (0.1.32) unstable; urgency=low
+
+  * Modify factory module for MM
+ -- youngman.park <youngman.park@samsung.com>  Wed, 10 Feb 2010 11:18:23 +0900
+
+telephony-fwk (0.1.31) unstable; urgency=low
+
+  * re-arrange internal header including,apply network ipc change, separate oem
+    callback function description from OemTapiCommon.h to OemTapiCommon_ext.h
+
+ -- kyeongchul.kim <kyeongchul.kim@samsung.com>  Wed, 10 Feb 2010 22:17:38 +0900
+
+telephony-fwk (0.1.30) unstable; urgency=low
+
+  * psi size from 15K to 20K
+
+ -- hyoengbae.park <jupio.park@samsung.com>  Wed, 10 Feb 2010 11:50:00 +0900
+
+telephony-fwk (0.1.29) unstable; urgency=low
+
+  * error handling for NV processing
+
+ -- hyoengbae.park <jupio.park@samsung.com>  Tue, 9 Feb 2010 14:07:00 +0900
+
+telephony-fwk (0.1.28) unstable; urgency=low
+
+  * Add ramdump and fatal error
+
+ -- hyoengbae.park <jupio.park@samsung.com>  Tue, 9 Feb 2010 00:10:00 +0900
+
+telephony-fwk (0.1.27) unstable; urgency=low
+
+  * Fix gprs port list Error
+
+ -- youngman.park <youngman.park@samsung.com>  Mon, 8 Feb 2010 21:25:48 +0900
+
+telephony-fwk (0.1.26) unstable; urgency=low
+
+  * Add gprs port list
+
+ -- youngman.park <youngman.park@samsung.com>  Mon, 8 Feb 2010 17:14:48 +0900
+
+telephony-fwk (0.1.25) unstable; urgency=low
+
+  * block RAMDUMP temporarily
+
+ -- hyeongbae.park <jupio.park@samsung.com>  Fri, 5 Feb 2010 12:21:28 +0900
+
+telephony-fwk (0.1.24) unstable; urgency=low
+
+  * bug fix at RAMDUMP and add sim init crash case for SMC lab requirement
+
+ -- kyeongchul.kim <kyeongchul.kim@samsung.com>  Wed, 3 Feb 2010 23:07:28 +0900
+
+telephony-fwk (0.1.23) unstable; urgency=low
+
+  * change modem device from mtd3 to mtd6
+
+ -- hyeongbae.park <jupio.park@samsung.com>  Tue, 2 Feb 2010 21:31:28 +0900
+
+telephony-fwk (0.1.22) unstable; urgency=low
+
+  * add SIM exception handling code and fixed Doxygen tag(COMMON part)
+
+ -- kyeongchul.kim <kyeongchul.kim@samsung.com>  Tue, 2 Feb 2010 20:56:28 +0900
+
+telephony-fwk (0.1.21) unstable; urgency=low
+
+  * changed pb last index recognization(0x00 to 0xFFFF), PLMN handling code for
+    Infineon(6 digit to 5 digit)
+
+ -- kyeongchul.kim <kyeongchul.kim@samsung.com>  Mon, 1 Feb 2010 20:11:29 +0900
+
+telephony-fwk (0.1.20) unstable; urgency=low
+
+  * fixed Doxygen tag and move TelSatUtil.h to server layer
+
+ -- kyeongchul.kim <kyeongchul.kim@samsung.com>  Fri, 29 Jan 2010 19:40:41 +0900
+
+telephony-fwk (0.1.19) unstable; urgency=low
+
+  * remove doxygen comment in 'tapi-lib-common.h' and add vconf value(MSISDN)
+
+ -- kyeongchul.kim <kyeongchul.kim@samsung.com>  Thu, 28 Jan 2010 22:34:27 +0900
+
+telephony-fwk (0.1.18) unstable; urgency=low
+
+  * remove status lib dependency in case of telephony v2.0
+
+ -- kyeongchul.kim <kyeongchul.kim@samsung.com>  Wed, 27 Jan 2010 22:53:14 +0900
+
+telephony-fwk (0.1.17) unstable; urgency=low
+
+  * change SLP prefix
+
+ -- kyeongchul.kim <kyeongchul.kim@samsung.com>  Tue, 26 Jan 2010 18:49:09 +0900
+
+telephony-fwk (0.1.16) unstable; urgency=low
+
+  * change Doxygen comment and sim test app
+
+ -- kyeongchul.kim <kyeongchul.kim@samsung.com>  Sat, 23 Jan 2010 19:30:12 +0900
+
+telephony-fwk (0.1.15) unstable; urgency=low
+
+  * tempraty time updated code deleted
+
+ -- jooseok.park <jooseok.park@samsung.com>  Thu, 21 Jan 2010 21:20:03 +0900
+
+telephony-fwk (0.1.14) unstable; urgency=low
+
+  * Fix 3G PB field length check process and add network init in modem reset
+    func
+
+ -- kyeongchul.kim <kyeongchul.kim@samsung.com>  Wed, 20 Jan 2010 22:36:02 +0900
+
+telephony-fwk (0.1.13) unstable; urgency=low
+
+  * Bug fix in deleting SMS in the SIM
+
+ -- hyeongbae.park <jupio.park@samsung.com>  Mon, 18 Jan 2010 17:00:00 +0900
+
+telephony-fwk (0.1.12) unstable; urgency=low
+
+  * Change FDN en/disable procedure in OEM layer
+
+ -- kyeongchul.kim <kyeongchul.kim@samsung.com>  Thu, 14 Jan 2010 21:22:16 +0900
+
+telephony-fwk (0.1.11) unstable; urgency=low
+
+  * add reset, shutdown and sms save handling
+
+ -- hyeongbae.park <jupio.park@samsung.com>  Wed, 14 Jan 2010 13:00:03 +0900
+
+telephony-fwk (0.1.10) unstable; urgency=low
+
+  * video call release all cnf event string added
+
+ -- jooseok.park <jooseok.park@samsung.com>  Wed, 13 Jan 2010 21:21:03 +0900
+
+telephony-fwk (0.1.9) unstable; urgency=low
+
+  * change Flight Mode value in the slp-setting
+
+ -- hyeongbae.park <jupio.park@samsung.com>  The, 12 JAN 2010 23:56:06 +0900
+
+telephony-fwk (0.1.8) unstable; urgency=low
+
+  * change NV offset
+
+ -- hyeongbae.park <jupio.park@samsung.com>  The, 12 JAN 2010 23:55:06 +0900
+
+telephony-fwk (0.1.7) unstable; urgency=low
+
+  * Bug fix in the deleting the sms in the sim
+
+ -- hyeongbae.park <jupio.park@samsung.com>  The, 12 JAN 2010 20:10:06 +0900
+
+telephony-fwk (0.1.6) unstable; urgency=low
+
+  * Add SLP_SETTING_TELEPHONY_SIM_SLOT init process in boot time
+
+ -- kyeongchul.kim <kyeongchul.kim@samsung.com>  The, 12 JAN 2010 19:10:06 +0900
+
+telephony-fwk (0.1.5) unstable; urgency=low
+
+  * SIM ipc data packed, fixed SLP-setting return check statement, NV EFS PATH
+
+ -- kyeongchul.kim <kyeongchul.kim@samsung.com>  Thu, 7 JAN 2010 18:24:10 +0900
+
+telephony-fwk (0.1.4) unstable; urgency=low
+
+  * Enabling dlog messages, adding 2 TAPI for SAT
+
+ -- sunghyuk.lee <sunghyuk.lee@samsung.com>  Wed, 6 JAN 2010 23:04:10 +0900
+
+telephony-fwk (0.1.3) unstable; urgency=low
+
+  * SIM,NETWORK - Code enhancement,Remove status lib usage,etc
+
+ -- kyeongchul.kim <kyeongchul.kim@samsung.com>  Tue, 5 JAN 2010 18:02:10 +0900
+
+telephony-fwk (0.1.2) unstable; urgency=low
+
+  * fixed SLP-setting check condition in tapi_common_check_status()
+
+ -- kyeongchul.kim <kyeongchul.kim@samsung.com>  Mon, 28 Dec 2009 17:12:20 +0900
+
+telephony-fwk (0.1.1) unstable; urgency=low
+
+  * [SAT] Stop checking the alarm boot feature which is no longer available
+
+ -- sunghyuk.lee <sunghyuk.lee@samsung.com>  Mon, 28 Dec 2009 14:21:46 +0900
+
+telephony-fwk (0.1.0-24) unstable; urgency=low
+
+  * change parameter position of general response
+
+ -- kyeongchul.kim <kyeongchul.kim@samsung.com>  Thu, 24 Dec 2009 19:22:24 +0900
+
+telephony-fwk (0.1.0-23) unstable; urgency=low
+
+  * support SLP-setting;
+
+ -- kyeongchul.kim <kyeongchul.kim@samsung.com>  Wed, 23 Dec 2009 14:56:46 +0900
+
+telephony-fwk (0.1.0-22msm6290) unstable; urgency=low
+
+  * support UBI, RFS for qualcomm;
+
+ -- hyeongbae.park <jupio.park@samsung.com>  Tue, 22 Dec 2009 22:27:46 +0900
+
+telephony-fwk (0.1.0-22) unstable; urgency=low
+
+  * support UBI, RFS for infineon modem:
+
+ -- hyeongbae.park <jupio.park@samsung.com>  Tue, 22 Dec 2009 11:34:24 +0900
+
+telephony-fwk (0.1.0-21) unstable; urgency=low
+
+  * change nv,efs directory from /root to /csa
+
+ -- hyeongbae.park <jupio.park@samsung.com>  Sat, 19 Dec 2009 16:02:48 +0900
+
+telephony-fwk (0.1.0-21msm6290) unstable; urgency=low
+
+  * change nv,efs directory from /root to /csa
+
+ -- hyeongbae.park <jupio.park@samsung.com>  Sat, 19 Dec 2009 15:39:53 +0900
+
+telephony-fwk (0.1.0-20) unstable; urgency=low
+
+  * telephony dynamic logging adopted
+
+ -- jooseok.park <jooseok.park@samsung.com>  Fri, 18 Dec 2009 10:04:20 +0900
+
+telephony-fwk (0.1.0-19msm6290) unstable; urgency=low
+
+  * release for msm6290 oem. same bin with 0.1.0-18
+  * i
+
+ -- kyeongchul.kim <kyeongchul.kim@samsung.com>  Fri, 18 Dec 2009 10:04:00 +0900
+
+telephony-fwk (0.1.0-19) unstable; urgency=low
+
+  * Recovering the broken i386 packages 
+
+ -- sunghyuk.lee <sunghyuk.lee@samsung.com>  Thu, 17 Dec 2009 12:14:30 +0900
+
+telephony-fwk (0.1.0-18) unstable; urgency=low
+
+  * Dpkg 0.1.0-17 has been failed to be imported. So upload the packages again
+
+ -- sunghyuk.lee <sunghyuk.lee@samsung.com>  Thu, 17 Dec 2009 12:04:30 +0900
+
+telephony-fwk (0.1.0-17) unstable; urgency=low
+
+  * fixed uncorrect debian package(0.1.0-16-msm6290)
+
+ -- kyeongchul.kim <kyeongchul.kim@samsung.com>  Wed, 16 Dec 2009 21:30:30 +0900
+telephony-fwk (0.1.0-16) unstable; urgency=low
+
+  * i686 telephony-fwk dpkg release
+
+ -- sunghyuk.lee <sunghyuk.lee@samsung.com>  Tue, 15 Dec 2009 17:11:28 +0900
+
+telephony-fwk (0.1.0-15) unstable; urgency=low
+
+  * gps update
+
+ -- soyoun2.kim <soyoun2.kim@samsung.com>  Mon, 14 Dec 2009 12:45:28 +0900
+
+telephony-fwk (0.1.0-14) unstable; urgency=low
+
+  * Support RFS Filesystem
+
+ -- hyeongbae.park <jupio.park@samsung.com>  Mon, 14 Dec 2009 12:12:03 +0900
+
+telephony-fwk (0.1.0-13) unstable; urgency=low
+
+  * Add Telepony.Servie.Ready Event
+
+ -- youngman.park <youngman.park@samsung.com>  Sat, 12 Dec 2009 15:14:44 +0900
+
+telephony-fwk (0.1.0-12) unstable; urgency=low
+
+  * oem callback and SLP1.0 feature adopted 
+
+ -- jooseok.park <jooseok.park@samsung.com>  Thu, 10 Dec 2009 17:32:15 +0900
+
+telephony-fwk (0.1.0-11) unstable; urgency=low
+
+  * add null check statement in TelOemNwGetNetworkInfo()
+
+ -- kyeongchul.kim <kyeongchul.kim@samsung.com>  Tue, 01 Dec 2009 19:25:02 +0900
+
+telephony-fwk (0.1.0-10) unstable; urgency=low
+
+  * slp2.0 code merge
+
+ -- jooseok.park <jooseok.park@samsung.com>  Mon, 30 Nov 2009 17:53:50 +0900
+
+telephony-fwk (0.1.0-9) unstable; urgency=low
+
+  * Stop to remove NV binary.
+
+ -- wonguk.jeong <wonguk.jeong@samsung.com>  Wed, 25 Nov 2009 17:12:00 +0900
+
+telephony-fwk (0.1.0-8) unstable; urgency=low
+
+  * remove unnecessary files
+
+ -- wonguk.jeong <wonguk.jeong@samsung.com>  Fri, 20 Nov 2009 17:19:20 +0900
+
+telephony-fwk (0.1.0-6) unstable; urgency=low
+
+  * library prefix changed (X1 --> SLP)
+
+ -- wonguk.jeong <wonguk.jeong@samsung.com>  Fri, 20 Nov 2009 16:04:50 +0900
+
+telephony-fwk (0.1.0-5) unstable; urgency=low
+
+  * copyright added, as-needed option enabled
+
+ -- wonguk.jeong <wonguk.jeong@samsung.com>  Fri, 20 Nov 2009 10:38:45 +0900
+
+telephony-fwk (0.1.0-4) unstable; urgency=low
+
+  * remove debug message
+
+ -- wonguk.jeong <wonguk.jeong@samsung.com>  Thu, 19 Nov 2009 15:43:08 +0900
+
+telephony-fwk (0.1.0-3) unstable; urgency=low
+
+  * add arch environment variable
+
+ -- wonguk.jeong <wonguk.jeong@samsung.com>  Thu, 19 Nov 2009 15:30:39 +0900
+
+telephony-fwk (0.1.0-2) unstable; urgency=low
+
+  * add dependencies of telephony-server (temporary)
+
+ -- wonguk.jeong <wonguk.jeong@samsung.com>  Mon, 16 Nov 2009 11:23:43 +0900
+
+telephony-fwk (0.1.0-1) unstable; urgency=low
+
+  * Initial Release. (SLP source + SLP-lite patch)
+
+ -- wonguk.jeong <wonguk.jeong@samsung.com>  Sun, 15 Nov 2009 00:42:02 +0900
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..7ed6ff8
--- /dev/null
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..0cdd735
--- /dev/null
@@ -0,0 +1,28 @@
+Source: libslp-tapi
+Section: libs
+Priority: extra
+Maintainer: Ja-young Gu <jygu@samsung.com>
+Uploaders: Ja-young Gu <jygu@samsung.com>, kyeongchul.kim <kyeongchul.kim@samsung.com>, Youngman Park <youngman.park@samsung.com>, Inho Oh <inho48.oh@samsung.com>, DongHoo Park <donghoo.park@samsung.com>
+Build-Depends: debhelper (>= 5),
+               libglib2.0-dev, dlog-dev, libsecurity-server-client-dev
+Standards-Version: 0.0.0
+
+Package: libslp-tapi-dev
+Section: libs
+Architecture: any
+Depends: libslp-tapi-0 (= ${Source-Version}),
+         libglib2.0-dev, dlog-dev, libsecurity-server-client-dev
+Description: telephony client API library (Development)
+
+Package: libslp-tapi-0
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends},
+Description: telephony client API library (Shared Object)
+
+Package: libslp-tapi-0-dbg
+Section: debug
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, libslp-tapi-0 (= ${Source-Version})
+Description: telephony client API library (dbg package)
+
diff --git a/debian/dirs b/debian/dirs
new file mode 100644 (file)
index 0000000..ca882bb
--- /dev/null
@@ -0,0 +1,2 @@
+usr/bin
+usr/sbin
diff --git a/debian/docs b/debian/docs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/debian/libslp-tapi-0.install.in b/debian/libslp-tapi-0.install.in
new file mode 100644 (file)
index 0000000..c3f5486
--- /dev/null
@@ -0,0 +1 @@
+@PREFIX@/lib/lib*
diff --git a/debian/libslp-tapi-dev.install.in b/debian/libslp-tapi-dev.install.in
new file mode 100644 (file)
index 0000000..61f30f2
--- /dev/null
@@ -0,0 +1,2 @@
+@PREFIX@/include/telephony-client/*
+@PREFIX@/lib/pkgconfig/tapi-lib.pc
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..0ca9918
--- /dev/null
@@ -0,0 +1,117 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+CFLAGS ?= -Wall -g
+CXXFLAGS ?=  -Wall -g
+LDFLAGS ?=
+PREFIX ?= /usr
+DATADIR ?= /opt
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+       CFLAGS += -O0
+       CXXFLAGS += -O0
+else
+       CFLAGS += -O2
+       CXXFLAGS += -O2
+endif
+
+CFLAGS += -fvisibility=hidden -fpic
+LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--as-needed
+LDFLAGS += -Wl,--unresolved-symbols=ignore-in-shared-libs,--as-needed
+
+CMAKE_TMP_DIR = $(CURDIR)/cmake_tmp
+
+configure: configure-stamp
+configure-stamp:
+       dh_testdir
+       # Add here commands to configure the package.
+       mkdir -p $(CMAKE_TMP_DIR);
+       cd $(CMAKE_TMP_DIR); CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" cmake .. -DCMAKE_INSTALL_PREFIX=$(PREFIX)
+
+       touch configure-stamp
+
+build: build-stamp
+
+build-stamp: configure-stamp
+       dh_testdir
+
+       # Add here commands to compile the package.
+       cd $(CMAKE_TMP_DIR) && $(MAKE) all
+
+       for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
+               cat $$f > $${f%.in}; \
+               sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
+               sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
+       done
+
+       touch $@
+
+clean:
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp configure-stamp
+
+       # Add here commands to clean up after the build process.
+       rm -rf $(CMAKE_TMP_DIR)
+
+       for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
+               rm -f $${f%.in}; \
+       done
+
+       dh_clean
+
+install: build
+       dh_testdir
+       dh_testroot
+       dh_clean -k
+       dh_installdirs
+
+       # Add here commands to install the package into debian/wavplayer.
+       cd $(CMAKE_TMP_DIR) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+       dh_testdir
+       dh_testroot
+       dh_installchangelogs
+       dh_installdocs
+       dh_installexamples
+       dh_install --sourcedir=debian/tmp
+#      dh_installmenu
+#      dh_installdebconf
+#      dh_installlogrotate
+#      dh_installemacsen
+#      dh_installpam
+#      dh_installmime
+#      dh_python
+#      dh_installinit
+#      dh_installcron
+#      dh_installinfo
+       dh_installman
+       dh_link
+       dh_strip --dbg-package=libslp-tapi-0-dbg
+       dh_compress
+       dh_fixperms
+#      dh_perl
+       dh_makeshlibs
+       dh_installdeb
+       dh_shlibdeps
+       dh_gencontrol
+       dh_md5sums
+       dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/image/SLP_TelephonyFW_PG_image001.png b/image/SLP_TelephonyFW_PG_image001.png
new file mode 100644 (file)
index 0000000..af8da9e
Binary files /dev/null and b/image/SLP_TelephonyFW_PG_image001.png differ
diff --git a/image/SLP_TelephonyFW_PG_image002.png b/image/SLP_TelephonyFW_PG_image002.png
new file mode 100644 (file)
index 0000000..fa22ee2
Binary files /dev/null and b/image/SLP_TelephonyFW_PG_image002.png differ
diff --git a/image/SLP_TelephonyFW_PG_image003.png b/image/SLP_TelephonyFW_PG_image003.png
new file mode 100644 (file)
index 0000000..c518ec7
Binary files /dev/null and b/image/SLP_TelephonyFW_PG_image003.png differ
diff --git a/image/SLP_TelephonyFW_PG_image004.png b/image/SLP_TelephonyFW_PG_image004.png
new file mode 100644 (file)
index 0000000..96f5184
Binary files /dev/null and b/image/SLP_TelephonyFW_PG_image004.png differ
diff --git a/include/ITapiCall.h b/include/ITapiCall.h
new file mode 100644 (file)
index 0000000..701e4cb
--- /dev/null
@@ -0,0 +1,2256 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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.
+ */
+
+/**
+ * @open
+ * @ingroup            TelephonyAPI
+ * @addtogroup TAPI_CALL       CALL
+ * @{
+ *
+ * @file ITapiCall.h
+ *
+ * Call APIs allow an application to accomplish the following services: @n
+ * - Make a mobile originated Emergency call, Voice call, or Video call. @n
+ * - Accept or Reject incoming calls. @n
+ * - Release Calls. @n
+ * - Call dependent supplementary services such as call hold, retrieve, DTMF. @n
+ * - Multi -party call management, setup conference call, split conference call. @n
+ * - Call information such as get call information, get line identification number. @n
+ * - To verify whether a call (TapiHandle *handle, voice / video ) is possible at any given time. @n
+ */
+
+#ifndef _ITAPI_CALL_H_
+#define _ITAPI_CALL_H_
+
+#include <tapi_common.h>
+#include <TelCall.h>
+#include <TelDefines.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /**
+ * @brief This function originates MO call setup. This is an asynchronous function. The function completes immediately and
+ * call setup proceeds in background.
+ *
+ * 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 being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - If call to tel_exe_call_mo(TapiHandle *handle, ) is successful, call handle and request ID are assigned by Telephony Server
+ *   and returned to client by given Call Handle and Request Id parameters. MO call setup continues in
+ *   background. There are multiple states involved in the call setup procedure. Upon request completion
+ *   successful or not, various event notifications are sent to client along with data associated with event
+ *   (TapiHandle *handle, Successful data or error information) based on the indication or response received at the Telephony Server.
+ * - Setting up Emergency call
+ *   - when #TelCallType_t is voice_call, voice call is setup unless dial_number parameter is an
+ *   emergency number known to telephony FW (TapiHandle *handle, like 112 for all 2G and above, other numbers may operator
+ *   specific or device configuration specific, so Telephony FW will read relevant SIM files and refer to internal
+ *   configuration records). If an emergency number is passed and #TelCallType_t is voice_call, Telephony
+ *   FW shall setup emergency phone call.
+ *   - When #TelCallType_t is emergency call, emergency call is always set up.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param[in] pParams
+ * - #TelCallSetupParams_t contains the CallType(TapiHandle *handle, whether it is a voice call or data call etc) and number.
+ *
+ * @param[out] pCallHandle
+ * - Unique handle for referring the call
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * TAPI_EVENT_CALL_SETUP_CNF is sent to the application when the lower layers get the call originate response.
+ * Asynchronous return status is indicated by #TelCallCause_t and call handle is sent in the event data.
+ * Various asynchronous indications are described in the unsolicited notifications section . [Refer, \ref page8]
+ *
+ * @pre
+ * - Initialize Dbus connection with #tel_init
+ * - Register caller's application name with #tel_register_app_name
+ * - Register telephony events to listen
+ * - A event loop is running to listen events
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see tel_exe_call_mo tel_answer_call tel_release_call
+ * \image html CallSetup.jpg
+ * \image latex CallSetup.jpg
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status =0;
+ * unsigned int pCallHandle;
+ * int pRequestID=0;
+ * TelCallSetupParams_t pParams;
+ *
+ * char normal[16] = "1234";//Called party number
+ * memset(TapiHandle *handle, &pParams, 0, sizeof(TapiHandle *handle, TelCallSetupParams_t), tapi_response_cb callback, void *user_data);
+ * pParams.CallType = TAPI_CALL_TYPE_VOICE;
+ * strcpy(TapiHandle *handle, pParams.szNumber,normal, tapi_response_cb callback, void *user_data);
+ *
+ * ret_status = tel_exe_call_mo (TapiHandle *handle, &pParams,&pCallHandle,&pRequestID, tapi_response_cb callback, void *user_data); // outgoing call
+ * @endcode
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+int tel_dial_call(TapiHandle *handle, const TelCallDial_t *pParams, tapi_response_cb callback, void *user_data);
+
+ /**
+ * @brief This function is used to answer the incoming call by accepting or rejecting the call.
+ *
+ * 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 being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param[in] CallHandle
+ * - This is the unique handle for referring the call. This call handle is available to Application through incoming call
+ *  (TapiHandle *handle, TAPI_EVENT_CALL_INCOM_IND) event.
+ *
+ * @param[in] AnsType
+ * - Answer type - accept / reject / replace / hold and accept. but, for CDMA, only accept is allowed.
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_ANSWER_CNF. Asynchronous return status is
+ *  indicated by #TelCallCause_t and call handle is sent in the event data.
+ * - TAPI_EVENT_CALL_CONNECTED_IND / TAPI_EVENT_CALL_END_IND event will be notified in case of call is accepted/rejected.
+ *
+ * @pre
+ * - Initialize Dbus connection with #tel_init
+ * - Register caller's application name with #tel_register_app_name
+ * - Register telephony events to listen
+ * - A event loop is running to listen events
+ * - Call associated with call handle should be TAPI_CALL_STATE_INCOM state otherwise the API fails and there can be a
+ *   maximum of 1 existing call.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see tel_exe_call_mo tel_release_call
+ *
+ * \image html CallIncoming.jpg
+ * \image latex CallIncoming.jpg
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status ;
+ * unsigned int pCallHandle;
+ * int pRequestID=0;
+ *
+ * ret_status = tel_answer_call (TapiHandle *handle, pCallHandle,&pRequestID, tapi_response_cb callback, void *user_data); // call answer
+ * @endcode
+ *
+ * @remarks
+ * - None
+ *
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+int tel_answer_call(TapiHandle *handle, unsigned int CallHandle, TelCallAnswerType_t AnsType, tapi_response_cb callback, void *user_data);
+
+ /**
+ *
+ * @brief This function releases the call identified by Call Handle irrespective of call is hold or active state.
+ * It is used when releasing specific active call in multiparty call.
+ *
+ * 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 being delivered in the corresponding event asynchronously.
+ *
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - In case of MPTY Call handle, Call end event is returned for each call in MPTY.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param[in] CallHandle
+ * - Unique handle for referring the call.
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_RELEASE_CNF and Asynchronous return status
+ *  is indicated by #TelCallCause_t and call handle for the released call is sent in the event data..
+ *
+ * - The event TAPI_EVENT_CALL_END_IND_IND is received as final asynchronous response and the associated data is #TelCallEndInfo_t.
+ *  Asynchronous return status is indicated by #TelCallCause_t.
+ *
+ * @pre
+ * - Initialize Dbus connection with #tel_init
+ * - Register caller's application name with #tel_register_app_name
+ * - Register telephony events to listen
+ * - A event loop is running to listen events
+ * - Call handle should be valid and there should be an existing call in Active/hold state.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see tel_exe_call_mo tel_answer_call tel_release_call_all tel_release_call_all_active
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status ;
+ * unsigned int pCallHandle;
+ * int pRequestID=0;
+ *
+ * ret_status = tel_release_call(TapiHandle *handle, pCallHandle,&pRequestID, tapi_response_cb callback, void *user_data); // call release
+ * @endcode
+ *
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+int tel_end_call(TapiHandle *handle, unsigned int CallHandle, TelCallEndType_t EndType, tapi_response_cb callback, void *user_data);
+
+
+ /**
+ *
+ * @brief This function puts the given call on hold. The call identified by Call Handle should be in active state.
+ *
+ * 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 being delivered in the corresponding event asynchronously.
+ *
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - Call duration for the call will be calculated from the time call has been connected until call is released,
+ *  i.e. Time duration during the call on hold will also be counted.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param[in] CallHandle
+ * - Unique handle for referring the call.
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_HOLD_CNF. Asynchronous return status is
+ *  indicated by #TelCallCause_t and call handle is sent in the event data.
+ *
+ * @pre
+ * - Initialize Dbus connection with #tel_init
+ * - Register caller's application name with #tel_register_app_name
+ * - Register telephony events to listen
+ * - A event loop is running to listen events
+ * - The call identified by the Call Handle should be in active state.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status ;
+ * unsigned int pCallHandle;//HANDLE OF AN ACTIVE CALL
+ * int pRequestID=0;
+ *
+ * ret_status = tel_hold_call(TapiHandle *handle, pCallHandle,&pRequestID, tapi_response_cb callback, void *user_data); // hold call
+ * @endcode
+ *
+ *
+ * @see tel_retrieve_call
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+ int tel_hold_call(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data);
+
+ /**
+ *
+ * @brief This function retrieves the held call. The call identified by Call Handle must be in held state.
+ *
+ * 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 being delivered in the corresponding event asynchronously.
+ *
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - Call duration for the call will be calculated from the moment call has been connected until call is released.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ * - None.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param[in] CallHandle
+ * - Unique handle for referring the call.
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_RETRIEVE_CNF. Asynchronous return status is indicated
+ *  by #TelCallCause_t and call handle is sent in the event data.
+ *
+ * @pre
+ * - Initialize Dbus connection with #tel_init
+ * - Register caller's application name with #tel_register_app_name
+ * - Register telephony events to listen
+ * - A event loop is running to listen events
+ * - Call should be in held state in order to retrieve into active state and no active call present.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see tel_retrieve_call
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status ;
+ * unsigned int pCallHandle;//held call handle
+ * int pRequestID=0;
+ *
+ * ret_status = tel_retrieve_call(TapiHandle *handle, pCallHandle,&pRequestID, tapi_response_cb callback, void *user_data); // retrieve call
+ * @endcode
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+int tel_active_call(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data);
+
+ /**
+ *
+ * @brief Swap calls. This is only for calls you dialed or answered with Telephony.
+ * Swap is only available for the voice calls.
+ *
+ * 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 being delivered in the corresponding event asynchronously.
+ *
+ * @par Notes:
+ * During a call, user can place all active calls and accepts the other held call with this function.
+ * If the terminal is not within a call, it will fail.
+ *
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ *  - None.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param[in] CallHandle1
+ * - This is active call
+ *
+ * @param[in] CallHandle2
+ * - This is Held call
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * -
+ *
+ * @pre
+ * - Initialize Dbus connection with #tel_init
+ * - Register caller's application name with #tel_register_app_name
+ * - Register telephony events to listen
+ * - A event loop is running to listen events
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status ;
+ * unsigned int pCallHandle1;
+ * unsigned int pCallHandle2;
+ * int pRequestID=0;
+ *
+ * ret_status = tel_swap_call(TapiHandle *handle, pCallHandle1, pCallHandle2,&pRequestID, tapi_response_cb callback, void *user_data); // swap call
+ * @endcode
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+ int tel_swap_call(TapiHandle *handle, unsigned int CallHandle1, unsigned int CallHandle2, tapi_response_cb callback, void *user_data);
+
+ /**
+ *
+ * @brief This function sends one or more DTMF digits during the call.
+ *
+ * @par Notes:
+ * DTMF is abbreviation of Dual-tone-multi-frequency. It is used for telecommunication signaling
+ * over telephone lines in the voice-frequency band between UE and other communications devices.
+ * For example UE send DTMF tone to a server to choose options which the server provides.
+ * If the UE is not within a call, this function will fail with error code. *
+ *
+ * This function 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 being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * -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 User has to call this API multiple times passing each single DTMF digit in pDtmfString.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param[in] pDtmfString
+ * - A Null terminated DTMF string to be sent from MS.
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_SEND_DTMF_CNF. Asynchronous return status
+ *  is indicated by #TelCallCause_t and call handle is sent in the event data.
+ *
+ * @pre
+ * - Initialize Dbus connection with #tel_init
+ * - Register caller's application name with #tel_register_app_name
+ * - Register telephony events to listen
+ * - A event loop is running to listen events
+ * - Active call should be present.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ *
+ * \image html CallDtmf.jpg
+ * \image latex CallDtmf.jpg
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status ;
+ * unsigned int pCallHandle;
+ * int pRequestID=0;
+ * char DtmfString[10] = {0, };
+ * strcpy(TapiHandle *handle, DtmfString, "123456789", tapi_response_cb callback, void *user_data);//Sample DTMF digits that need to be sent
+ * ret_status= tel_send_call_dtmf(TapiHandle *handle, DtmfString,&pRequestID, tapi_response_cb callback, void *user_data);
+ * @endcode
+ *
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+ int tel_call_dtmf(TapiHandle *handle, const char *pDtmfString, tapi_response_cb callback, void *user_data);
+
+ /**
+ *
+ * @brief This function joins the given two calls (TapiHandle *handle, one call in active conversation state and other call in held state) into conference.
+ *
+ * This function 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 being delivered in the corresponding event asynchronously.
+ *
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - 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).
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param[in] CallHandle1
+ * - The unique handle can be either an active call or held call.
+ *
+ * @param[in] CallHandle2
+ * - Unique call handle.
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_SETUPCONFERENCE_CNF. Asynchronous return
+ *  status is indicated by #TelCallCause_t and call handle of the MPTY call is sent in the event data.
+ *
+ * @pre
+ * - Initialize Dbus connection with #tel_init
+ * - Register caller's application name with #tel_register_app_name
+ * - Register telephony events to listen
+ * - A event loop is running to listen events
+ * - For a Multiparty call or for joining two calls into conference, there should be one call in active state and another call
+ *  in held state.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see tel_split_call
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status ;
+ * unsigned int pCallHandle1;
+ * unsigned int pCallHandle2;
+ * int pRequestID=0;
+ *
+ * ret_status= tel_join_call(TapiHandle *handle, pCallHandle1, pCallHandle2,&pRequestID, tapi_response_cb callback, void *user_data); // call join
+ * @endcode
+ *
+ * @remarks
+ * - None
+ *
+ *
+ *
+ *
+ */
+ int tel_join_call(TapiHandle *handle, unsigned int CallHandle1, unsigned int CallHandle2, tapi_response_cb callback, void *user_data);
+
+ /**
+ *
+ * @brief This function triggers to splits a private call from multiparty call. This API allows creating a private communication
+ *     with one of remote parties in a multiparty session. TAPI client application has to pass the call handle which needs
+ *     to split from the multiparty call.
+ *
+ * This function 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 being delivered in the corresponding event asynchronously.
+ *
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - The list of call handles present in the conference call is retrieved using #tel_get_call_conf_list API
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param[in] CallHandle
+ * - Handle of call to be made private. Call handle referring to the call that is to be split from the conference
+ *   (TapiHandle *handle, call to be made private).
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_SPLITCONFERENCE_CNF. Asynchronous return status
+ *  is indicated by #TelCallCause_t and call handle for the split call is sent in the event data.
+ *
+ * @pre
+ * - Initialize Dbus connection with #tel_init
+ * - Register caller's application name with #tel_register_app_name
+ * - Register telephony events to listen
+ * - A event loop is running to listen events
+ * - Call should be in multiparty conference call.
+ *
+ * @post
+ * - Split call will be the active call and the conference will be held call.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see tel_join _call
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status ;
+ * unsigned int pCallHandle;
+ * int pRequestID=0;
+ *
+ * ret_status= tel_split_call(TapiHandle *handle, pCallHandle,&pRequestID, tapi_response_cb callback, void *user_data); // call split
+ * @endcode
+ *
+ * @remarks
+ * - None
+ *
+ *
+ *
+ *
+ */
+ int tel_split_call(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data);
+
+ /**
+ *
+ * @brief Get the current calling line identification number.
+ *
+ * This function 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 being delivered in the corresponding event asynchronously.
+ *
+ * @par Notes:
+ * If the USIM card has multiple number, an user can choose which number he use.
+ * For example, a line is for private, the other line is for business.
+ * Using this function, user can get information about which line is currently active.
+ *
+ * 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 being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * NONE
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ * @param [out] ptr_active_line
+ *  current active line id.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @pre
+ * - Initialize Dbus connection with #tel_init
+ * - Register caller's application name with #tel_register_app_name
+ * - Register telephony events to listen
+ * - A event loop is running to listen events
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see tel_set_call_act_line
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int pRequestID=0;
+ * ret_status= tel_get_call_act_line(TapiHandle *handle, &pRequestID, tapi_response_cb callback, void *user_data); // get call active line
+ * @endcode
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+ int tel_get_call_act_line(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+ /**
+ *
+ * @brief Set the current calling line identification number.
+ *
+ * This function 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 being delivered in the corresponding event asynchronously.
+ *
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * NONE
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param[in] active_line
+ * - calling line identification
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @pre
+ * - Initialize Dbus connection with #tel_init
+ * - Register caller's application name with #tel_register_app_name
+ * - Register telephony events to listen
+ * - A event loop is running to listen events
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see tel_get_call_act_line
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status ;
+ * TelCallActiveLine_t g_curLine =TAPI_CALL_ACTIVE_LINE1;
+ * TelCallActiveLine_t active_line ;
+ * int pRequestID=0;
+ *
+ * ret_status = tel_set_call_act_line (TapiHandle *handle, g_curLine,&pRequestID, tapi_response_cb callback, void *user_data); // set call active line
+ * @endcode
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+ int tel_set_call_act_line(TapiHandle *handle, TelCallActiveLine_t active_line, tapi_response_cb callback, void *user_data);
+
+ /**
+ *
+ * @brief This function triggers to do an explicit call transfer by connecting the two parties where in one party being
+ *     active (TapiHandle *handle, active state) and another party being held (TapiHandle *handle, held state).
+ *
+ * This function 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 being delivered in the corresponding event asynchronously.
+ *
+ * @par Notes:
+ * The ECT supplementary service enables the served mobile subscriber (TapiHandle *handle, 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 subscribers 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,
+ * transfer can occur while subscriber C is being informed of the call
+ * (TapiHandle *handle, i.e. the connection has not yet been established.)
+ *
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param[in] CallHandle
+ * - Call handle of an active call.
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_TRANSFER_CNF. Asynchronous return status is
+ *  indicated by #TelCallCause_t and call handle is sent in the event data. Call handle in event data is active
+ *  call handle which is used in the #tel_exe_call_explicit_transfer request.
+ *
+ * @pre
+ * - In order to call transfer, Served mobile subscriber should have 2 calls in one in active state and another one Call
+ *  in Held state.
+ *
+ * @post
+ * - When the request has been completed successfully, Call end indication will be sent to both the calls (TapiHandle *handle, active and held).
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see None.
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status ;
+ * unsigned int pCallHandle;//active call
+ * int pRequestID=0;
+ *
+ * ret_status= tel_exe_call_explicit_transfer (TapiHandle *handle, pCallHandle,&pRequestID, tapi_response_cb callback, void *user_data); // explicit transfer
+ * @endcode
+ *
+ * @remarks
+ * -None
+ *
+ *
+ */
+ int tel_transfer_call(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data);
+
+
+/**
+ *
+ * @brief This function gets status for the current call identified by Call Handle whenever application wants the call status. Call handle must be valid.
+ *
+ * This function 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 being delivered in the corresponding event asynchronously.
+ *
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is a Synchronous API.
+ *
+ * @par Important Notes:
+ *  - None.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param[in] CallHandle
+ * - Unique handle for referring the call.
+ *
+ * @param [out] pCallStatus
+ *  - Call status information like destination number, call direction (TapiHandle *handle, MO or MT), call type (TapiHandle *handle, voice or data etc), whether
+ *   the call is in conference state or not, present call state etc are returned through this parameter.
+ *
+ * @par Async Response Message:
+ *  - None.
+ *
+ * @pre
+ * - Initialize Dbus connection with #tel_init
+ * - Register caller's application name with #tel_register_app_name
+ * - Register telephony events to listen
+ * - A event loop is running to listen events
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ *
+ *
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status ;
+ * unsigned int CallHandle;
+ * TelCallStatus_t     callStatus;
+ *
+ * ret_status= tel_get_call_status(TapiHandle *handle, CallHandle,&callStatus, tapi_response_cb callback, void *user_data); // get call status info
+ * @endcode
+ *
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+int tel_get_call_status(TapiHandle *handle, int call_id, TelCallStatus_t *out );
+
+
+int tel_get_call_status_all(TapiHandle *handle, TelCallStatusCallback cb, void *user_data) ;
+
+
+ /**
+ *
+ * @brief This function gets duration of the given call. This is a synchronous function. Duration is accounted from the moment
+ *     the connection is established, i.e. call goes into active state for first time.
+ *
+ * This function 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 being delivered in the corresponding event asynchronously.
+ *
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is a Synchronous API.
+ *
+ * @par Important Notes:
+ *  - None.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param[in] CallHandle
+ * - Unique handle for referring the call.
+ *
+ * @param [out] pDurationInSecs
+ *  - The total call duration in seconds from the call connecting time to the present time is returned through this parameter.
+ *
+ * @par Async Response Message:
+ * - None.
+ *
+ * @pre
+ * - Initialize Dbus connection with #tel_init
+ * - Register caller's application name with #tel_register_app_name
+ * - Register telephony events to listen
+ * - A event loop is running to listen events
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status ;
+ * unsigned int CallHandle;
+ * unsigned int duration;
+ *
+ * ret_status= tel_get_call_duration(TapiHandle *handle, CallHandle,&duration, tapi_response_cb callback, void *user_data); // get call duration
+ * @endcode
+ *
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+ int tel_get_call_duration(TapiHandle *handle, unsigned int CallHandle, unsigned int * pDurationInSecs) ;
+
+ /**
+ *@brief Deflect the incoming call to other subscriber
+ *
+ * If informed about an incoming call this call may be redirected to an another destination by
+ * entering the destination Number. The cleint spcifies the dstiantion number to which the current
+ * incoming call needs to be redirected is specifed via info argument.
+ *
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param[in] CallHandle
+ * - This is incoming call handle
+ *
+ * @param[out] deflect_info
+ * - Destination Number
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * -
+ *
+ * @pre
+ * - Initialize Dbus connection with #tel_init
+ * - Register caller's application name with #tel_register_app_name
+ * - Register telephony events to listen
+ * - A event loop is running to listen events
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @remarks
+ * - None
+ *
+ * @code
+ * #include <ITapiCall.h>
+ * #include <TelCall.h>
+ *
+ * unsigned int call_handle;
+ * TelCallDeflectDstInfo_t deflect_info;
+ * int req_id;
+ *
+ * tel_deflect_call(TapiHandle *handle, call_handel, &deflect_info, req_id, tapi_response_cb callback, void *user_data); // call deflect
+ *
+ * @endcode
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ */
+ int tel_deflect_call(TapiHandle *handle, unsigned int CallHandle, const TelCallDeflectDstInfo_t *deflect_info, tapi_response_cb callback, void *user_data);
+
+
+ /**
+ *
+ * @brief Activate Call Completion to a Busy Subscriber.
+ *
+ * @par Notes:
+ * When subscriber A encounters a Network Determined User Busy (TapiHandle *handle, NDUB) destination B,
+ * subscriber A can request the CCBS supplementary service (TapiHandle *handle, i.e. activate a CCBS Request against destination B).
+ * The network will then monitor the wanted destination B for becoming idle.
+ * When the wanted destination B becomes idle, then the network will wait a short time
+ * in order to allow destination B to make an outgoing call.
+ * If destination B does not make any outgoing call within this time,
+ * then the network shall automatically recall subscriber A.
+ * When subscriber A accepts the CCBS recall, within a defined time, then the network will automatically
+ * generate a CCBS call to destination B.
+ *
+ * This function 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 being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ *  - None.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] CallHandle
+ * - Handle of the call.
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * -
+ *
+ * @pre
+ * - Initialize Dbus connection with #tel_init
+ * - Register caller's application name with #tel_register_app_name
+ * - Register telephony events to listen
+ * - A event loop is running to listen events
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret;
+ * unsigned int call_handle;
+ * int req_id;
+ *
+ * ret = tel_activate_call_ccbs(TapiHandle *handle, call_handle, &req_id, tapi_response_cb callback, void *user_data); // ccbs activate
+ * @endcode
+ *
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ */
+ int tel_activate_call_ccbs(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data);
+
+
+ /**
+ * @brief This is a synchronous function returns all call handles within the given conference call.
+ *
+ * This function 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 being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is a Synchronous API.
+ *
+ * @par Important Notes:
+ * - Call should be a Multi-party conference call in order to return actual no of calls and call handles in the conference calls.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param[in] CallHandle
+ * - Handle of call which is associated with the conference.
+ *
+ * @param [out] pCallList
+ *  - list of call joined in the conference call. In case there is no active conference. The list will be zero and
+ *   number of calls parameter value will also be zero. Maximum number of calls in a conference can be up to 5
+ *   (TapiHandle *handle, Based on 3GPP TS 22.084). Memory allocation for call list is integer array of size 5.
+ *
+ * @param [out] pNoOfCalls
+ *  - Number of the calls present in conference.
+ *
+ * @par Async Response Message:
+ * -None.
+ *
+ * @pre
+ * - Initialize Dbus connection with #tel_init
+ * - Register caller's application name with #tel_register_app_name
+ * - Register telephony events to listen
+ * - A event loop is running to listen events
+ *
+ * @post
+ * -None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status ;
+ * unsigned int CallHandle;
+ * unsigned int callList[5];
+ * int noOfCalls;
+ *
+ * ret_status= tel_get_call_conf_list(TapiHandle *handle, CallHandle, callList, &noOfCalls, tapi_response_cb callback, void *user_data); // get conference call list
+ * @endcode
+ *
+ * @see tel_join_call
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+int tel_get_call_conf_list(TapiHandle *handle, unsigned int CallHandle, unsigned int *pCallList, int *pNoOfCalls);
+
+
+ /**
+ *
+ * @brief This function gets voice privacy option mode in phone(TapiHandle *handle, CDMA only).
+ *
+ * This function 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 being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *  - None.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param[in] PrivacyType
+ * - Privacy Type.
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_GET_PRIVACYMODE_CNF. Asynchronous return status
+ *  is indicated by #TelCallCause_t. #TelCallPrivacyMode_t is included in this event.
+ *
+ *
+ * @pre
+ * - Initialize Dbus connection with #tel_init
+ * - Register caller's application name with #tel_register_app_name
+ * - Register telephony events to listen
+ * - A event loop is running to listen events
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ *
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * Int ReqId=-1;
+ * int ret_status = -1;
+ * int api_err;
+ * TelCallPrivacyType_t privacyType;
+ * privacyType=TAPI_CALL_PRIVACY_TYPE_MS;
+ * ret_status =tel_get_call_privacy_mode (TapiHandle *handle, privacyType,&req_id, tapi_response_cb callback, void *user_data); // get call privacy_mode
+ * @endcode
+ *
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+ int tel_get_call_privacy_mode(TapiHandle *handle, TelCallPrivacyType_t PrivacyType, tapi_response_cb callback, void *user_data);
+
+
+ /**
+ *
+ * @brief This function sets voice privacy option mode in phone. It is available only where call exists(TapiHandle *handle, CDMA only).
+ *
+ *
+ * This function 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 being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *  - None.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param[in] PrivacyInfo
+ * - voice privacy option mode(TapiHandle *handle, ENHANCED or STANDARD)
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_SET_PRIVACYMODE_CNF. Asynchronous return status
+ *  is indicated by #TelCallCause_t.
+ *
+ *
+ * @pre
+ * - Initialize Dbus connection with #tel_init
+ * - Register caller's application name with #tel_register_app_name
+ * - Register telephony events to listen
+ * - A event loop is running to listen events
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ *
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ReqId=-1;
+ * int ret_status = -1;
+ * int api_err;
+ * TelCallPrivacyMode_t pPrivacyMode_info={0,};
+ * pPrivacyMode_info = TAPI_CALL_PRIVACY_MODE_STANDARD;
+ *
+ * ret_status = tel_set_call_privacy_mode (TapiHandle *handle, pPrivacyMode_info,&reqId, tapi_response_cb callback, void *user_data); // set call privacy mode
+ * @endcode
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+ int tel_set_call_privacy_mode(TapiHandle *handle, TelCallVoicePrivacyInfo_t PrivacyInfo, tapi_response_cb callback, void *user_data);
+
+
+/**
+ *
+ * @brief This function requests to send a Flash with Information Message(TapiHandle *handle, CDMA only).
+ *
+ * This function 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 being delivered in the corresponding event asynchronously.
+ *
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *  - None.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param[in] pDialNumber
+ * - this is the calling number for 3 way call. But in the call waiting, this param should be NULL.
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_FLASHINFO_CNF. Asynchronous return status
+ *  is indicated by #TelCallCause_t.
+ *
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status = -1;
+ * int api_err;
+ * char const * const pDialNumber = "9999900000";
+ * ret_status = tel_exe_call_flash_info(TapiHandle *handle, pDialNumber,&reqId, tapi_response_cb callback, void *user_data); // call flash info
+ * @endcode
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+ int tel_exe_call_flash_info(TapiHandle *handle, const char *pDialNumber, tapi_response_cb callback, void *user_data);
+
+
+/**
+ *
+ * @brief This function requests to exit emergency call mode(TapiHandle *handle, CDMA only).
+ *
+ * This function 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 being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *  - None.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_EXIT_EMERGENCYMODE_CNF. Asynchronous return status
+ *  is indicated by #TelCallCause_t.
+ *
+ * @pre
+ * - current state is emergency callback mode.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int req_id;
+ * int ret;
+ *
+ * ret = tel_exit_call_emergency_mode (TapiHandle *handle, &req_id, tapi_response_cb callback, void *user_data); // emergency call
+ *
+ * @endcode
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+ int tel_exit_call_emergency_mode(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+
+/**
+ *
+ * @brief This function is used for querying the information about a call time and call count.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *  - None.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param[in] req_mask
+ * - call time request type mask.
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_GET_CALL_TIME_CNF. Asynchronous return status
+ *  is indicated by #TelCallCause_t.
+ *
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status = -1;
+ * int api_err;
+ * TelCallTimeMaskType_t mask_byte1 = {0,};
+ * TelCallTimeMaskType_t mask_byte2 = {0,};
+ * unsigned short mask_type;
+ * mask_byte1 = TAPI_CALL_TIME_TYPE_TOTAL_CALL_CNT; //masking call type
+ * mask_byte2 = TAPI_CALL_TIME_TYPE_TOTAL_CALL_TIME;
+ *
+ * mask_type = mask_byte1;
+ * mask_type << 8;
+ * mask_type = mask_byte2;
+ *
+ * ret_status = tel_get_call_time(TapiHandle *handle, mask_type,&reqId, tapi_response_cb callback, void *user_data);
+ *
+ * @endcode
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+ int tel_get_call_time(TapiHandle *handle, unsigned short req_mask, tapi_response_cb callback, void *user_data);
+
+ /**
+ *
+ * @brief This function is to get call volume.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *  - None.
+ *
+ * @warning
+ * 
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] device
+ * - sound device
+ *
+ * @param [in] type
+ * - sound type
+ *
+ * @param [in] callback
+ * - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ * - user data for user specification
+ *
+ * @par Async Response Message:
+ * - TelCallGetVolumeInfoResp_t
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+
+ int tel_get_call_volume_info(TapiHandle *handle, TelSoundDevice_t device, TelSoundType_t type, tapi_response_cb callback, void *user_data );
+
+/**
+ *
+ * @brief This function is to set call volume.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *  - None.
+ *
+ * @warning
+ * 
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] path
+ * - call volume information
+ *
+ * @param [in] callback
+ * - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ * - user data for user specification
+ *
+ * @par Async Response Message:
+ * - None.
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+
+int tel_set_call_volume_info(TapiHandle *handle, TelCallVolumeInfo_t *info, tapi_response_cb callback, void *user_data );
+
+/**
+ *
+ * @brief This function is to set call sound path.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *  - None.
+ *
+ * @warning
+ * 
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] path
+ * - call sound path information
+ *
+ * @param [in] callback
+ * - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ * - user data for user specification
+ *
+ * @par Async Response Message:
+ * - None.
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+
+int tel_set_call_sound_path(TapiHandle *handle, TelCallSoundPathInfo_t *path, tapi_response_cb callback, void *user_data );
+
+/**
+ *
+ * @brief This function is to set call mute state
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *  - None.
+ *
+ * @warning
+ * 
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] mute
+ * - Sound Mute Status
+ *
+ * @param [in] callback
+ * - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ * - user data for user specification
+ *
+ * @par Async Response Message:
+ * - None.
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+
+int tel_set_call_mute_status(TapiHandle *handle, TelSoundMuteStatus_t mute, tapi_response_cb callback, void *user_data );
+
+/**
+ *
+ * @brief This function is to get call mute state
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *  - None.
+ *
+ * @warning
+ * 
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] callback
+ * - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ * - user data for user specification
+ *
+ * @par Async Response Message:
+ * - TelCallGetMuteStatusResp_t
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+
+int tel_get_call_mute_status(TapiHandle *handle, tapi_response_cb callback, void *user_data );
+
+/**
+ *
+ * @brief This function is to set call sound recording
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *  - None.
+ *
+ * @warning
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] on
+ * - Sound recording on / off
+ *
+ * @param [in] callback
+ * - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ * - user data for user specification
+ *
+ * @par Async Response Message:
+ * - None.
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+
+int tel_set_call_sound_recording(TapiHandle *handle, TelSoundRecording_t *on, tapi_response_cb callback, void *user_data);
+
+/**
+ *
+ * @brief This function is to set call sound equalization.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *  - None.
+ *
+ * @warning
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] eq
+ * - call sound equalization information
+ *
+ * @param [in] callback
+ * - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ * - user data for user specification
+ *
+ * @par Async Response Message:
+ * - None.
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+
+int tel_set_call_sound_equalization(TapiHandle *handle, TelCallSoundEqualization_t *eq, tapi_response_cb callback, void *user_data);
+
+ /**
+ *
+ * @brief This function is used for querying the set call sound reduction.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *  - None.
+ *
+ * @warning
+ * 
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] noise
+ * - 
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ *
+ * @par Async Response Message:
+ * - None.
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @code
+ *
+ * @endcode
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+ int tel_set_call_sound_noise_reduction(TapiHandle *handle, TelSoundNoiseReduction_t noise, tapi_response_cb callback, void *user_data);
+
+ /**
+ *
+ * @brief This function is used to set call sound clock status
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *  - None.
+ *
+ * @warning
+ * 
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] enable
+ * - sound clock status ( TRUE : enable, FALSE : disable )
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ *
+ * @par Async Response Message:
+ * - None.
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @code
+ *
+ * @endcode
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+
+ int tel_set_call_sound_clock_status(TapiHandle *handle, gboolean status, tapi_response_cb callback, void *user_data );
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ITAPI_CALL_H_ */
+
+ /**
+* @}
+*/
diff --git a/include/ITapiGps.h b/include/ITapiGps.h
new file mode 100644 (file)
index 0000000..f78f228
--- /dev/null
@@ -0,0 +1,170 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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.
+ */
+
+/**
+ * @open
+ * @ingroup            TelephonyAPI
+ * @addtogroup GPS_TAPI                GPS
+ * @{
+ *
+ * @file ITapiGps.h
+
+ @brief This file serves as a "C" header file defines functions for Tapi GPS\n
+ It contains a sample set of function prototypes that would be required by applications.
+ * GPS APIs allow an application to accomplish the following services: @n
+ * - Confirm gps measure position information. @n
+ */
+
+
+#ifndef _ITAPI_GPS_H_
+#define _ITAPI_GPS_H_
+
+#include <tapi_common.h>
+#include <TelErr.h>
+#include <TelDefines.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @brief  This function sends the confirmation data for measure position message.
+ *
+ * @par Sync (or) Async:
+ * This is an Synchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param [in] data
+ * -#user confirmation data for each vender.
+ *
+ * @param [in] data_len
+ * - data length
+ *
+ * @pre
+ * - TAPI_EVENT_GPS_MEASURE_POSITION_IND should be sent to application by Telephony Server.
+ *
+ * @post
+ *
+ * @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:
+ * GPS Deamon
+ *
+ *
+ * @code
+ *
+ *     int result;
+ *     gps_measure_position_confirm_t data;
+ *     result = tel_confirm_gps_measure_pos(handle, (unsigned char *)&data, sizeof(gps_measure_position_confirm_t));
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_confirm_gps_measure_pos(TapiHandle *handle, unsigned char *data, unsigned int data_len);
+
+/**
+ * @brief  This function is invoked to set the gps frequency aiding and allows the underlying OEM provider to scan the set band.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param [in] state
+ * - enable / disable state.
+ *
+ * @param [in] data_len
+ * - data length
+
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_GPS_FREQ_AIDING_SET_RESP and there is no event data associated with this event and asynchronous.
+ *
+ * @pre
+ *  - None.
+ *
+ * @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:
+ * GPS daemon.
+ *
+ * @code
+ *
+ *     unsigned char state = true;
+ *
+ *     result = tel_set_gps_frequency_aiding(handle, state, on_gps_set_frequency_aiding, NULL);
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ *
+ */
+/*================================================================================================*/
+
+int tel_set_gps_frequency_aiding(TapiHandle *handle, unsigned char state, tapi_response_cb callback, void *user_data);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ITAPI_GPS_H_ */
+
+/**
+ * @}
+ */
diff --git a/include/ITapiModem.h b/include/ITapiModem.h
new file mode 100644 (file)
index 0000000..226b6c3
--- /dev/null
@@ -0,0 +1,500 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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.
+ */
+
+/**
+ * @internal
+ * @ingroup            TelephonyAPI
+ * @addtogroup MODEM_TAPI      POWER
+ * @{
+ *
+ * These APIs allow an application to accomplish the following services: @n
+ * - Process power command @n
+ * - Reset the phone power (on / off), @n
+ * - Process airplane mode @n
+ */
+
+#ifndef _ITAPI_MODEM_H_
+#define _ITAPI_MODEM_H_
+
+#include <tapi_common.h>
+#include <TelDefines.h>
+#include <TelPower.h>
+#include <TelMisc.h>
+#include "ITapiPS.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ *
+ * @brief  This API is used to turn power off or on the modem.
+ *
+ * @par Sync (or) Async:
+ * This is a Synchronous API.
+ *
+ * @par Important Notes:
+ * -NONE
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] cmd
+ * - This index value is the power command as #tapi_power_phone_cmd_t.
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ *
+ */
+int tel_process_power_command(TapiHandle *handle, tapi_power_phone_cmd_t cmd, tapi_response_cb callback, void *user_data);
+
+/**
+ *
+ * @brief  This API is used to enter or leave airplane mode
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * -NONE
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] mode
+ * - This mode value is the flight flag #tapi_power_flight_mode_type_t.
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_MODEM_FLIGHT_MODE_RESP  and the event data is #tapi_power_flight_mode_resp_type_t.
+ * Asynchronous return status is always TAPI_API_SUCCESS.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ *
+ */
+int tel_set_flight_mode(TapiHandle *handle, tapi_power_flight_mode_type_t mode, tapi_response_cb callback, void *user_data);
+
+int tel_get_flight_mode(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ *
+ * @brief  This function is invoked to Get ME version information.
+ *
+ * @par Sync (or) Async:
+ * This is a synchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_get_misc_me_version(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ *
+ * @brief This function is to get misc me version
+ *
+ * @par Sync (or) Async:
+ * This is a Synchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @par Async Response Message:
+ * - Na
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type ( TelMiscVersionInformation * ) \n
+ * - Misc Version Information
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+
+
+TelMiscVersionInformation *tel_get_misc_me_version_sync(TapiHandle *handle);
+
+
+/**
+ *
+ * @brief  This function is invoked to Get ME IMEI/ESN/MEID for each phone type.
+ *
+ * @par Sync (or) Async:
+ * This is a synchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_get_misc_me_sn(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ *
+ * @brief This function is to get misc me Sereal Number
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is a Synchronous API.
+ *
+ * @par Important Notes:
+ *  - None.
+ *
+ * @warning
+ * 
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (char*) \n
+ * - Sereal Number string
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+
+char *tel_get_misc_me_sn_sync(TapiHandle *handle);
+
+/**
+ *
+ * @brief This function is to get misc me imei
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * - IMEI
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+
+int tel_get_misc_me_imei(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ *
+ * @brief This function is to get misc me imei
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is a Synchronous API.
+ *
+ * @par Important Notes:
+ *  - None.
+ *
+ * @warning
+ * 
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (char*) \n
+ * - IMEI string
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+
+char *tel_get_misc_me_imei_sync(TapiHandle *handle);
+
+/**
+ *
+ * @brief This function is to check modem power status
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *  - None.
+ *
+ * @warning
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [out] result
+ * - result of checking modem power status.
+ *
+ * @par Async Response Message:
+ * - 
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+
+int tel_check_modem_power_status(TapiHandle *handle, int *result);
+
+/**
+ *
+ * @brief This function is to control modem dun pin
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (TapiHandle *handle, or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *  - None.
+ *
+ * @warning
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] pincontrol
+ * - pin control inforamation
+ *
+ * @param [in] callback
+ * - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ * - user data for user specification
+ *
+ * @par Async Response Message:
+ * - None.
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (TapiHandle *handle, int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (TapiHandle *handle, Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+
+int tel_control_modem_dun_pin_ctrl(TapiHandle *handle, tapi_ps_btdun_pincontrol *pincontrol, tapi_response_cb callback, void *user_data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ITAPI_MODEM_H_ */
+
+/**
+ * @}
+ */
diff --git a/include/ITapiNetText.h b/include/ITapiNetText.h
new file mode 100644 (file)
index 0000000..059454c
--- /dev/null
@@ -0,0 +1,1360 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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.
+ */
+
+/**
+* @open
+* @ingroup             TelephonyAPI
+* @addtogroup  NetText_TAPI    NetText(SMS)
+* @{
+ *
+* @file ITapiNettext.h
+
+     @brief This file serves as a "C" header file defines functions for Tapi Nettext\n
+      It contains a sample set of function prototypes that would be required by applications.
+
+ */
+
+#ifndef _ITAPI_NETTEXT_H_
+#define _ITAPI_NETTEXT_H_
+
+#include <tapi_common.h>
+#include <TelSms.h>
+#include <TelDefines.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /**
+ * @brief  This API is used to send an SMS message to the network.  This API interface allows transmitting SMS PDU as defined by
+ *             3GPP TS 23.040 (SMS-SUBMIT, SMS-COMMAND) to lower layers. This API allows keeping the dedicated link at lower layers
+ *             by passing information as more messages to send in parameters. This will enable not to release if a dedicated connection is
+ *             used for transmission. Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] pDataPackage
+ *   - Contains SMS-SUBMIT TPDU
+ *
+ * @param [in] bMoreMsgToSend
+ *   - will be set to TRUE when there are more than one message to be send or Multiple segmented concatenated
+ *      message to be send, otherwise FALSE. This flag indicates OEM that more messages to send.
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ *  SMS sent status is returned in this event TAPI_EVENT_NETTEXT_SENTSTATUS_CNF and the event data associated with this event
+ *  is #TelSmsDatapackageInfo_t that has SMS PDU as defined by 3GPP TS 23.040(SMS-SUBMIT-REPORT). Asynchronous return status is indicated by #TelSmsResponse_t.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * TelSmsDatapackageInfo_t *pDataPackage;
+ * int ret_status;
+ * int RequestId = 0;
+ *
+ * pDataPackage = (TelSmsDatapackageInfo_t*) malloc(sizeof(TelSmsDatapackageInfo_t));
+ * // fill the structure appropriately
+ * // Sca parameter is optional. If you don't provide Service center address, you should fill "00" in sca array.
+ * //  MsgLength is length of szData//fill the szData in TelSmsDatapackageInfo_t with SMS-SUBMIT or SMS-COMMAND TPDU.
+ * ret_status = tel_send_sms (pDataPackage, 0, &RequestId);
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_send_sms(TapiHandle *handle, const TelSmsDatapackageInfo_t *pDataPackage, int bMoreMsgToSend, tapi_response_cb callback, void* user_data);
+
+ /**
+ * @brief  This API is used to send an SMS message to the network.  This API interface allows transmitting SMS PDU as defined by
+ *             3GPP2 C.S0015 (SMS-SUBMIT, SMS-ACK, SMS-CANCEL) to lower layers. This API allows keeping the dedicated link at lower layers
+ *             by passing information as more messages to send in parameters. This will enable not to release if a dedicated connection is
+ *             used for transmission. Access to this API is limited to in-house application and  we recommend you use Message Framework API(MAPI).
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] pSmsMsgInfo
+ *   - Contains parameter mask, message type and data.
+ *
+ * @param [in] MoreMsgToSend
+ *   - will be set to TRUE when there are more than one message to be send or Multiple segmented concatenated
+ *      message to be send, otherwise FALSE. This flag indicates OEM that more messages to send.
+ *
+ * @param [out] pRequestId
+ * - Unique identifier for a particular request.
+ * - pRequestId value can be any value from 0 to 255 if the API is returned successfully
+ * - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ *
+ * @par Async Response Message:
+ *  SMS sent status is returned in this event TAPI_EVENT_NETTEXT_SENTSTATUS_EX_CNF and the event data associated with this event
+ *  is #TelSmsIs637CauseCode_t. Asynchronous return status is indicated by #TelSmsResponse_t.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ * int ret_status = TAPI_API_SUCCESS;
+ * int requestId = 0;
+ * TelSmsMsgInfo_t pMsgInfo={0,};
+ * char* diallingNum;
+ * int dialNumLen;
+ * TelSmsMsgInfo_t *pDataPackage = malloc(sizeof(TelSmsMsgInfo_t));
+ *
+ * memset(pDataPackage, 0, sizeof(TelSmsMsgInfo_t));
+ * pDataPackage->MsgType = TAPI_NETTEXT_MESSAGETYPE_SUBMIT; //fill structure appropriately
+ * pDataPackage->ParamMask |= TAPI_NETTEXT_PARAM_TELESERVICE_MASK;
+ *
+ * ret_status = tel_send_sms_msg(pDataPackage, 0 ,&requestId);
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+//int tel_send_sms_msg(const TelSmsMsgInfo_t *pSmsMsgInfo, int MoreMsgToSend, int *pRequestId);
+
+ /**
+ * @brief  This function reads a message from SIM card storage. SIM index (index used when storing the SMS) number to be passed to in order
+ *             to read particular SMS message. Total number of messages can be retrieved by #TelTapiSmsGetCount function.
+  *            Access to this API is limited to in-house application and  we recommend you use Message Framework API(MAPI).
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] index
+ *  -  Index number of the message to be read
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_NETTEXT_READ_SMS_CNF and the event data is #TelSmsData_t. Asynchronous return status is indicated
+ *  by #TelSmsCause_t.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ *
+ * ret_status = tel_read_sms_in_sim(0, &RequestId); //index value which is located in SIM
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+ int tel_read_sms_in_sim(TapiHandle *handle, int index, tapi_response_cb callback, void* user_data);
+
+ /**
+ * @brief  This function writes a message to SIM storage area.
+ *           Access to this API is limited to in-house application and  we recommend you use Message Framework API(MAPI).
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] pWriteData
+ *  - SMS message structure.
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ *  TAPI library will send TAPI_EVENT_NETTEXT_SAVE_STATUS_CNF asynchronous event for this request when received from TS.
+ *  The associated data is SIM Index in which the message stored. Asynchronous return status is indicated by #TelSmsCause_t.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ * TelSmsData_t *pWriteData;
+ * char *msg = "This is an Test SMS";
+ * char *SCA = "821091";
+ *
+ * pWriteData = malloc(sizeof(TelSmsData_t));
+ *
+ * conv_service_center_address(pWriteData->SmsData.Sca, SCA); //convert service center address
+ * conv_msg_into_tpdu(pWriteData->SmsData.szData, pWriteData->SmsData.MsgLength, msg); // convert message into TPDU
+ * pWrite->MsgStatus = TAPI_NETTEXT_STATUS_READ;
+ * pWrite->SimIndex = -1;
+ *
+ * ret_status = tel_write_sms_in_sim (pWriteData, &RequestId);
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_write_sms_in_sim(TapiHandle *handle, const TelSmsData_t *pWriteData, tapi_response_cb callback, void* user_data);
+
+ /**
+ * @brief  This function deletes a message specified by index (SIM index used when storing the SMS)
+ *           number from the SIM storage area. Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] Index
+ *  - Message index to delete.
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * The asynchronous event associated is TAPI_EVENT_NETTEXT_DELETE_STATUS_CNF and the event data is SIM index from which
+ * the message has been deleted. Asynchronous return status is indicated by #TelSmsCause_t.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t).\n
+ * @par Prospective Clients:
+ *  External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ *
+ * ret_status = tel_delete_sms_in_sim(1, &RequestId); //index which is located in SIM
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_delete_sms_in_sim(TapiHandle *handle, int index, tapi_response_cb callback, void* user_data);
+
+ /**
+ * @brief  This function is used to retrieve message count information like Total record count,
+ *  used record count and the indices list for SIM Storage. This is an asynchronous function and
+ *  the response will be sent back by event notification. Access to this API is limited, we recommend you use Message Framework API(MAPI) besides.
+ *  Access to this API is limited to in-house application.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETTEXT_GET_COUNT_CNF and the event data is #TelSmsStoredMsgCountInfo_t.
+ * Asynchronous return status is indicated by #TelSmsCause_t.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ * @par Prospective Clients:
+ * - External Apps.\n
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ *
+ * ret_status = tel_get_sms_count (&RequestId); //get sms count in SIM
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_sms_count(TapiHandle *handle, tapi_response_cb callback, void* user_data);
+
+ /**
+ * @brief  This function is used to set SMS CB Message Identifiers in the appropriate EF-CBMI/EF-CBMIR file in (U)SIM.
+ *             This function also indicates underlying provider to enable or disable CB Channel on which CB messages are received.
+ *             Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI) besides.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] pCBConfig
+ *  - This structure contains parameters to set SMS CB configuration \n
+ *      (i)  Cell broadcast service state. (Enabled/disabled.) \n
+ *      (ii) Cell broadcast message identifier, which denotes whether all cell broadcast message identifiers are selected or only
+ *           some of those.\n
+ *       (iii) The list count of message identifiers to be set.\n
+ *       (iv) The actual list of message identifiers to be set. Each identifier occupies 2 bytes. And the list ranges from 0x00 to 0xff. \n
+ *    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] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no data associated with this event.
+ * Asynchronous return status is indicated by #TelSmsCause_t.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.\n
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ * TelSmsCbConfig_t *pCBConfig = NULL;
+ *
+ * pCBConfig = (TelSmsCbConfig_t *)malloc(sizeof(TelSmsCbConfig_t));
+ * pCBConfig->bCBEnabled = 1; //fill structure appropriately
+ * pCBConfig->SelectedId = 0x01;
+ * pCBConfig->MsgIdCount = 0x02;
+ *
+ * pCBConfig->MsgIDs[0] = 0x0c;
+ * pCBConfig->MsgIDs[1] = 0x0c;
+ * pCBConfig->MsgIDs[2] = 0xdf;
+ * pCBConfig->MsgIDs[3] = 0x00;
+ *
+ * ret_status = tel_set_sms_cb_config(pCBConfig, &RequestId);
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_set_sms_cb_config(TapiHandle *handle, const TelSmsCbConfig_t *pCBConfig, tapi_response_cb callback, void* user_data); 
+
+ /**
+ * @brief  This function is used to retrieve SMS CB configuration options from EFcbmi file in the SIM.
+ *             Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETTEXT_GET_CB_CONFIG_CNF and the event data is #TelSmsCbConfig_t.
+ * Asynchronous return status is indicated by #TelSmsCause_t.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ * @par Prospective Clients:
+ * - External Apps.\n
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ *
+ * ret_status = tel_get_sms_cb_config (&RequestId); //result will come with async response
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_sms_cb_config(TapiHandle *handle, tapi_response_cb callback, void* user_data);
+
+
+ /**
+ * @brief This function is used to set SMS preferred bearer on which SMS has to be transmitted.
+ *           Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] BearerType
+ *  - Specifies the bearer type.
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no data associated with this event.
+ * Asynchronous return status is indicated by #TelSmsCause_t
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ * TelSmsBearerType_t BearerType = TAPI_NETTEXT_BEARER_PS_ONLY;
+ *
+ * ret_status = tel_set_sms_preferred_bearer(BearerType, &RequestId); //result will come with async response
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_set_sms_preferred_bearer(TapiHandle *handle, TelSmsBearerType_t BearerType, tapi_response_cb callback, void* user_data);
+
+ /**
+ * @brief  This function is used to get SMS preferred bearer on which SMS has to be transmitted.
+ *  This is an asynchronous function. Access to this API is limited to in-house application and , we recommend you use Message Framework API(MAPI).
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETTEXT_GET_SMSBEARER_CNF and the associated event data is #TelSmsBearerType_t.
+ * Asynchronous return status is indicated by #TelSmsCause_t.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ *
+ * ret_status = tel_get_sms_preferred_bearer(&RequestId); //result will come with async response
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_sms_preferred_bearer(TapiHandle *handle, tapi_response_cb callback, void* user_data);
+
+ /**
+ * @brief This function is used to get the SMS parameters for a particular SMS (sent/received)
+ *  based on the SIM index where it is stored. This is an asynchronous function. Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] index
+ *  - SIM index where the SMS is stored
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETTEXT_GET_PARAM_CNF and the event data is #TelSmsParams_t. Asynchronous return status
+ * is indicated by #TelSmsCause_t
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ *
+ * ret_status = tel_get_sms_parameters(1, &RequestId); //result will come with async response
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_sms_parameters(TapiHandle *handle, int index, tapi_response_cb callback, void* user_data);
+
+ /**
+ * @brief  This function is used to set the short message service header parameters which are
+ *  used in the origination of MO messages. Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - This API updates/sets SMS Parameters in EFsmsp file in the SIM storage
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] pSmsSetParameters
+ *  - Contains SMS header Parameter information like service center address, destination address, validity period, protocol identifier,
+ *     data coding scheme.
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no data associated with this event. Asynchronous
+ * return status is indicated by #TelSmsCause_t
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ * TelSmsParams_t SmsSetParameters = {0,};
+ *
+ * SmsSetParameters.RecordIndex = 0x01;
+ * SmsSetParameters.RecordLen = 28;
+ * memcpy(SmsSetParameters.TpDestAddr.szDiallingNum, "9986529874", 10);
+ * printf("\ndial no is %s\n", SmsSetParameters.TpDestAddr.szDiallingNum);
+ * SmsSetParameters.TpDestAddr.DialNumLen = 10;
+ * SmsSetParameters.TpDestAddr.Ton = TAPI_SIM_TON_NATIONAL;//national no
+ * SmsSetParameters.TpDestAddr.Npi = TAPI_SIM_NPI_NATIONAL;
+ *
+ * ret_status = tel_set_sms_parameters(SmsSetParameters, &RequestId); //result will come with async response
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_set_sms_parameters(TapiHandle *handle, const TelSmsParams_t *pSmsSetParameters, tapi_response_cb callback, void* user_data);
+
+ /**
+ * @brief This function is used to send a delivery report for the received incoming SMS to the network.
+ *          Access to this API is limited to in-house application.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] pDataPackage
+ *  - Contains SMS Data package..
+ *
+ * @param [in] RPCause
+ *  - Indicates the reason for SMS-DELIVER failure
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETTEXT_DELIVERY_REPORT_CNF and there is no associated event data. Asynchronous return status
+ * is indicated by #TelSmsResponse_t
+ *
+ * @pre
+ *  - SMS-DELIVER-REPORT message structure should be in TPDU format as specified by 3GPP TS 23.040 SMS TPDU.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status = 0;
+ * Int requestId = -1;
+ * TelSmsResponse_t RPCause;
+ * TelSmsDatapackageInfo_t *del_report = NULL;
+ *
+ * del_report = malloc(sizeof(TelSmsDatapackageInfo_t));
+ * memset(del_report, 0, sizeof(TelSmsDatapackageInfo_t));
+ * //Encode Send Delivery Report here
+ * //EncodeSmsDeliveryReportTpdu();
+ *
+ * RPCause = TAPI_NETTEXT_SENDSMS_SUCCESS;
+ * printf("***receive message (Api:SendDeliverreport)****\n");
+ *
+ * ret_status = tel_send_sms_deliver_report(del_report, RPCause, &requestId);
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_send_sms_deliver_report(TapiHandle *handle, const TelSmsDatapackageInfo_t *pDataPackage, TelSmsResponse_t RPCause, tapi_response_cb callback, void* user_data);
+
+ /**
+ * @brief  This function is used to set SMS Service Centre Address information in order to send the SMS.
+ *           Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - This API updates/sets service center address in EFsmsp file in the SIM storage.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] pSCA
+ * - Contains the service centre address informations.
+ *
+ * @param [in] Index
+ * - Contains the record index of the Service center address information in the EF.
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no data associated with this event.
+ * Asynchronous return status is indicated by #TelSmsResponse_t.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t).
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status;
+ * int RequestId = 0;
+ * BYTE        scabuf[512];
+ * char        scaNum[TAPI_NETTEXT_SCADDRESS_LEN_MAX];
+ * BYTE        scaNum_len =0;
+ * TelSmsAddressInfo_t *sc_addr = NULL;
+ * BYTE        packet[500];
+ * int idx = 0;
+ * int i;
+ *
+ * printf("***Setting the SCA(Api:SetSCA)****\n");
+ * sc_addr = (TelSmsAddressInfo_t *)malloc(sizeof(TelSmsAddressInfo_t));
+ * memset(sc_addr, 0, sizeof(sc_addr));
+ * memset(scaNum, 0, sizeof(scaNum));
+ * memset(scabuf, 0, sizeof(scabuf));
+ * sprintf(scaNum, "821091");
+ * scaNum_len = strlen(scaNum);
+ * scaNum_len = strlen(scaNum);
+ * scaNum[scaNum_len] = 0;
+ * scaNum_len = scaNum_len - 1;
+ *
+ * //idx = SmsUtilEncodeAddrField(packet, scaNum, scaNum_len, 0x01, 0x01);
+ * //get idx
+ * sc_addr->DialNumLen = idx ;
+ * memcpy(sc_addr->szDiallingNum, packet, (unsigned int)idx);
+ * ret_status = tel_set_sms_sca(sc_addr, 0, &RequestId); //result will come with async response
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_set_sms_sca(TapiHandle *handle, const TelSmsAddressInfo_t *pSCA, int index, tapi_response_cb callback, void* user_data);
+
+ /**
+ * @brief  This function is used to get current SMS Service Centre Address information.
+ *           Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] Index
+ * - Contains the record index of the Service center address information in the EF.
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETTEXT_GET_SCA_CNF and there is no data associated with this event.
+ * Asynchronous return status is indicated by #TelSmsResponse_t.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ *
+ * ret_status = tel_get_sms_sca(0, &RequestId); //result will come with async response
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_sms_sca(TapiHandle *handle, int index, tapi_response_cb callback, void* user_data);
+
+ /**
+ * @brief This function is used by the applications to inform modem about  the memory status of PDA (whether FULL or AVAILABLE) so that modem can inform network .
+ *           Access to this API is limited to in-house application.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] memoryStatus
+ *  - Contains Memory Status
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no associated event data. Asynchronous return status
+ *  is indicated by #TelSmsResponse_t
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ * int MemoryStatus = TAPI_NETTEXT_PDA_MEMORY_STATUS_AVAILABLE;
+ *
+ * ret_status = tel_set_sms_memory_status(MemoryStatus, &RequestId); //result will come with async response
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_set_sms_memory_status(TapiHandle *handle, int memoryStatus, tapi_response_cb callback, void* user_data);
+
+ /**
+ * @brief  This function is used by the applications to set the message status in the SIM EF.
+ *           Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * 
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] Index
+ *  - Index of the message whose status has to be set.
+ *
+ * @param [in] msgStatus
+ *  - Status of the message to be set.
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no associated event data. Asynchronous return status
+ *  is indicated by #TelSmsResponse_t
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ * int index = 1;
+ * int MemoryStatus = TAPI_NETTEXT_PDA_MEMORY_STATUS_AVAILABLE;
+ *
+ * ret_status = tel_set_sms_memory_status(index, MemoryStatus, &RequestId); //result will come with async response
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_set_sms_message_status(TapiHandle *handle, int index, TelSmsMsgStatus_t msgStatus, tapi_response_cb callback, void* user_data);
+
+ /**
+ * @brief This function is used by the applications to get the count of SMS parameter records stored in SIM EF.
+ *           Access to this API is limited to in-house application.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * 
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [in] callback
+ *   - To register callback function for result of this function.
+ *
+ * @param [in] user_data
+ *   - user data for user specification
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_NETTEXT_PARAM_COUNT_IND and there is no associated event data. Asynchronous return status
+ *  is indicated by #TelSmsResponse_t
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ *
+ * ret_status = tel_get_sms_parameter_count (&RequestId); //result will come with async response
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_sms_parameter_count(TapiHandle *handle, tapi_response_cb callback, void* user_data);
+
+
+/**
+ * @brief This function is used by the applications check the sms ready status (whether ready or not) .
+ *
+ * @par Sync (or) Async:
+ * This is a Synchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * 
+ * @param [in] handle
+ * - handle from tel_init()
+ *
+ * @param [out] pReadyStatus
+ * - Contains Ready Status
+ *
+ * @par Async Response Message:
+ *  None.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_check_sms_device_status(TapiHandle *handle, int *pReadyStatus);
+
+/**
+ * @brief This function is used by the applications to inform modem about the PDA status(whether PDA is ready to
+ * recieve messages from network or not).
+ *
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in]
+ *  - None
+ *
+ * @param [out]
+ *  - None
+ *
+ * @par Async Response Message:
+ *  None.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_set_sms_device_status(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ITAPI_NETTEXT_H_ */
+
+/**
+* @}
+*/
diff --git a/include/ITapiNetwork.h b/include/ITapiNetwork.h
new file mode 100644 (file)
index 0000000..4fad975
--- /dev/null
@@ -0,0 +1,973 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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.
+ */
+
+/**
+ * @open
+ * @ingroup            TelephonyAPI
+ * @addtogroup Network_TAPI    NETWORK
+ * @{
+ *
+ * @file ITapiNetwork.h
+
+ @brief This file serves as a "C" header file defines functions for Tapi Network\n
+ It contains a sample set of function prototypes that would be required by applications.
+ */
+
+#ifndef _ITAPI_NETWORK_H_
+#define _ITAPI_NETWORK_H_
+
+#include <tapi_common.h>
+#include <TelErr.h>
+#include <TelDefines.h>
+#include <TelNetwork.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @brief  This function requests the lower layers to select the network automatically
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Important Notes:
+ * - This function passes the
+ *
+ * @warning
+ * - None.
+ *
+ * @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.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_SELECT_CNF and there is no data associated with this event. Asynchronous return status
+ * is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @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.
+ *
+ * @code
+ * #include <ITapiNetwork.h>
+ *
+ * int ret_status;
+ * int RequestID;
+ *
+ * // AUTOMATIC MODE
+ * ret_status = tel_select_network_automatic(&RequestId);
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_select_network_automatic(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This function requests the lower layers to select the network (PLMN) which has been selected by the user from the Network List
+ *           displayed to the User.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Important Notes:
+ * - This function passes the .
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param[in] plmn
+ *
+ * @param [in] act
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_SELECT_CNF and there is no data associated with this event. Asynchronous return status
+ * is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @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.
+ *
+ * @code
+ * #include <ITapiNetwork.h>
+ *
+ * int ret_status;
+ * int RequestID;
+ * unsigned int plmn = 0;
+ *
+ * // MANUAL MODE
+ * plmn = 45454;
+ * ret_status = tel_select_network_manual(Plmn, &RequestId);
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_select_network_manual(TapiHandle *handle, const char *plmn, int act, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This function sends a request to do manual network selection to search for the available networks and provide the
+ *           Network List to the User/Application.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @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.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_SEARCH_CNF and the event data is #TelNetworkPlmnList_t.
+ * Asynchronous return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - In the available network list, user can select one of the networks successfully.
+ *
+ * @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.
+ *
+ * @code
+ * #include <ITapiNetwork.h>
+ *
+ * int ret_status;
+ * int RequestID;
+ *
+ * // NETWORK SEARCH
+ * ret_status = tel_search_network(&RequestId);
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_search_network(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This function requests for the present network selection mode i.e. automatic or manual.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @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.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_GETSELECTIONMODE_CNF and the event data is #TelNetworkSelectionMode_t.
+ * Asynchronous return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @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.
+ *
+ * @code
+ * #include <ITapiNetwork.h>
+ *
+ * int ret_status;
+ * int RequestId;
+ *
+ * // GET THE SELECTION MODE
+ * ret_status = tel_get_network_selection_mode (&RequestId);
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_network_selection_mode(struct tapi_handle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This function is called when User/application wants to configure the service domain to only CS or Only PS or Both.
+ * This API triggers the underlying protocol stack to do register with Network for only CS services or only PS services
+ * or both based on the option set using this API.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param[in] ServiceDomain
+ * - Specifies the type of Service domain (Packet switch, circuit switch,etc)
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_SET_SVC_DOMAIN_CNF and there is no event data associated with this event
+ * and asynchronous return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @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.
+ *
+ * @code
+ * #include <ITapiNetwork.h>
+ *
+ * int ret_status;
+ * int RequestId;
+ *
+ * // SET NETWORK SERVICE DOMAIN
+ * TelNetworkServiceDomain_t ServiceDomain = TAPI_NETWORK_SERVICE_DOMAIN_AUTOMATIC;
+ *
+ * ret_status = tel_set_network_service_domain (ServiceDomain, &RequestId);
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_set_network_service_domain(TapiHandle *handle, TelNetworkServiceDomain_t domain,
+               tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This function requests for the present network service domain i.e. CS or PS or both or automatic.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @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.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_GET_SVC_DOMAIN_CNF and the event data is #TelNetworkServiceDomain_t.
+ * Asynchronous return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @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.
+ *
+ * @code
+ * #include <ITapiNetwork.h>
+ *
+ * int ret_status;
+ * int RequestId;
+ *
+ * // GET NETWORK SERVICE DOMAIN
+ * ret_status = tel_get_network_service_domain (&RequestId);
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_network_service_domain(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+
+/**
+ * @brief  This function is invoked to set the network band and allows the underlying OEM provider to scan the set band.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param[in]  mode
+ * - Band preference indicates the band provide to be preferred or select the band.
+ *
+ * @param[in]  band
+ * - This enumeration defines different network Bands that user can choose.
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_SETNWBAND_CNF and there is no event data associated with this event and asynchronous
+ * return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @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.
+ *
+ * @code
+ * #include <ITapiNetwork.h>
+ *
+ * int ret_status;
+ * int RequestId;
+ *
+ * TelNetworkBandPreferred_t BandMode = TAPI_NETWORK_BAND_MODE_PREFERRED;
+ * TelNetworkBand_t Band = TAPI_NETWORK_BAND_TYPE_GSM_900_1800;
+ *
+ * // SET NETWORK BAND
+ * ret_status = tel_set_network_band (BandMode, Band, &RequestId);
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_set_network_band(TapiHandle *handle, TelNetworkBandPreferred_t mode,
+               TelNetworkBand_t band, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This function requests for the present network band.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @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.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_GETNWBAND_CNF and the event data is #TelNetworkBand_t.
+ * Asynchronous return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @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.
+ *
+ * @code
+ * #include <ITapiNetwork.h>
+ *
+ * int ret_status;
+ * int RequestId;
+ *
+ * // GET NETWORK BAND
+ * ret_status = tel_get_network_band(&RequestId);
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_network_band(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This function is invoked to set the network preferred plmn
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param[in]  operation
+ * - Operation indicates the operation to be done on preferred plmn .
+ *
+ * @param[in]  info
+ * - This gives the plmn Info.
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_SETPREFFPLMN_CNF and there is no event data associated with this event and asynchronous
+ * return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @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.
+ *
+ * @code
+ * #include <ITapiNetwork.h>
+ *
+ * int ret_status;
+ * int RequestId;
+ *
+ * TelNetworkPreferredPlmnOp_t Operation = TAPI_NETWORK_PREF_PLMN_ADD;
+ * TelNetworkPreferredPlmnInfo_t PrefPlmnInfo;
+ *
+ * memset(&PrefPlmnInfo, 0, sizeof(TelNetworkPreferredPlmnInfo_t));
+ * PrefPlmnInfo.Index = 0;
+ * PrefPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GSM;
+ * unsigned char *plmn = "45454";
+ * memcpy(PrefPlmnInfo.Plmn, plmn, strlen(plmn));
+ *
+ * // SET PREFERRED PLMN
+ * ret_status = tel_set_network_preferred_plmn(Operation, PrefPlmnInfo, &RequestId);
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_set_network_preferred_plmn(TapiHandle *handle, TelNetworkPreferredPlmnOp_t operation,
+               TelNetworkPreferredPlmnInfo_t *info, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This function is invoked to get the preferred plmn list
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @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.
+ *
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_GETPREFFPLMN_CNF and event data associated with this event  is #TelNetworkPreferredPlmnList_t
+ * and asynchronous  return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @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.
+ *
+ * @code
+ * #include <ITapiNetwork.h>
+ *
+ * int ret_status;
+ * int RequestId;
+ *
+ * // GET NETWORK PREFERRED PLMN
+ * ret_status = tel_get_network_preferred_plmn(&RequestId);
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_network_preferred_plmn(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+
+/**
+ * @brief  This function is called to cancel the triggered manual network search.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @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.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_CANCELMANUALSEARCH_CNF and there is no event data associated with this event
+ * and asynchronous return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - Manual network search is already triggered.
+ *
+ * @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_cancel_network_manual_search(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This function is called to get network serving.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @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.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_CANCELMANUALSEARCH_CNF and there is no event data associated with this event
+ * and asynchronous return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *
+ * @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_serving(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This function is called to set network mode.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param [in] mode
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_CANCELMANUALSEARCH_CNF and there is no event data associated with this event
+ * and asynchronous return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *
+ * @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_mode(TapiHandle *handle, int mode, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This function is called to get network mode.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @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.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_CANCELMANUALSEARCH_CNF and there is no event data associated with this event
+ * and asynchronous return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *
+ * @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_mode(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This function is called to get neighboring cell info.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @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.
+ *
+ * @par Async Response Message:
+ * - The event data is #TelNetworkNeighboringCellInfo_t.
+ *
+ * @pre
+ *
+ * @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_neighboring_cell_info(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ITAPI_NETWORK_H_ */
+
+/**
+ * @}
+ */
diff --git a/include/ITapiPS.h b/include/ITapiPS.h
new file mode 100644 (file)
index 0000000..4edae8c
--- /dev/null
@@ -0,0 +1,764 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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.
+ */
+
+/**
+ * @open
+ * @ingroup            TelephonyAPI
+ * @addtogroup GPRS_TAPI       GPRS
+ * @{
+ *
+ * GPRS APIs allow an application to accomplish the following services: @n
+ * - activate , deactivate PDP service @n
+ *
+ */
+
+#ifndef        _ITAPI_PS_H_
+#define _ITAPI_PS_H_
+
+#include <tapi_common.h>
+#include <TelDefines.h>
+#include <TelErr.h>
+#include <TapiUtility.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/* Defining macros for PSMAN profiles */
+#define TAPI_PDP_ADDR_LEN_MAX          20
+#define TAPI_PDP_APN_LEN_MAX           101
+#define TAPI_PDP_NAME_LEN_MAX          16
+#define TAPI_PDP_MAX_USERNAME_LEN      32
+#define TAPI_PDP_MAX_PASSWORD_LEN      32
+#define TAPI_PDP_MAX_DNS_LEN           16
+#define MAX_PDP_CONTEXTS_ALLOWED       3
+#define MAX_GPRS_PORT_LIST                     200
+
+typedef enum {
+     TAPI_GPRS_DEFINE_PDP_CONTEXT=0x01,                /* 0x01 : Define PDP Context */
+     TAPI_GSM_GPRS_QOS,                                                /* 0x02 : Quality of Service Profile */
+     TAPI_GSM_GPRS_PS,                                         /* 0x03 : PS attach or detach */
+     TAPI_GSM_GPRS_PDP_CONTEXT,                                /* 0x04 : PDP context activate or deactivate */
+     TAPI_GSM_GPRS_ENTER_DATA,                         /* 0x05 : Enter data */
+     TAPI_GSM_GPRS_SHOW_PDP_ADDR,                      /* 0x06 : Show PDP address*/
+     TAPI_GSM_GPRS_MS_CLASS,                                   /* 0x07 : GPRS mobile station class*/
+     TAPI_GSM_GPRS_3G_QUAL_SRVC_PROFILE,               /* 0x08 : 3G Quality of service profile */
+     TAPI_GSM_GPRS_IP_CONFIGURATION,                   /* 0x09 : Multiple PDP context IP configuration */
+     TAPI_GSM_GPRS_DEFINE_SEC_PDP_CONTEXT,             /* 0X0A : AT+CGDSCONT   05.10.07 ky.doo EDIT */
+     TAPI_GSM_GPRS_TFT,                                                        /* 0X0B : AT+CGTFT      05.10.07 ky.doo EDIT */
+     TAPI_GSM_GPRS_HSDPA_STATUS,                               /* 0x0C : HSDPA status */
+     TAPI_GSM_GPRS_CURRENT_SESSION_DATA_COUNTER,/* 0x0D : Current data session tx/rx total bytes */
+     TAPI_GSM_GPRS_DATA_DORMANT,                /* 0x0E : Force to set Dormant */
+     TAPI_GSM_GPRS_DUN_PIN_CTRL ,               /* 0x0F : Dial up Networking Pin Control Message */
+     TAPI_GSM_GPRS_CALL_STATUS,                            /* 0x10 : DS TE2 Data Call result(Multiple PDP) */
+     TAPI_GSM_GPRS_PORT_SEL,                           /* 0x11 : PORT SEL */
+     TAPI_GSM_GPRS_MAX
+} tapi_gprs_type_t;
+
+typedef enum{
+       TAPI_PDP_MODE_ADD = 0x01,                               /*ADD*/
+       TAPI_PDP_MODE_DEL = 0x02                                        /*Delete*/
+} tapi_pdp_mode_type_t;
+
+typedef enum{
+       TAPI_PDP_AUTH_NONE = 0x0,               /* No authentication           */
+       TAPI_PDP_AUTH_PAP  = 0x1,               /* PAP authentication          */
+       TAPI_PDP_AUTH_CHAP = 0x2,               /* CHAP authentication       */
+       TAPI_PDP_AUTH_MAX  = 0xff
+
+} tapi_pdp_auth_type_t;
+
+typedef enum {
+       GPRS_PDP_TYPE_UNKNOWN   = 0x00,
+       GPRS_PDP_TYPE_X25               = 0x01,
+       GPRS_PDP_TYPE_IP                = 0x02,
+       GPRS_PDP_TYPE_IHOSP     = 0x03,
+       GPRS_PDP_TYPE_PPP               = 0x04,
+       GPRS_PDP_TYPE_IPV6              = 0x05,
+} tapi_pdp_type_t;
+
+/* HSDPA Status Variable */
+typedef enum {
+  HSDPA_INACTIVE,
+  HSDPA_ACTIVE
+} tapi_hspda_status_type;
+
+typedef enum {
+       GPRS_SIGNAL_DCD         = 0x01,
+       GPRS_DATA_SIGNAL_DTR    = 0x04,
+       GPRS_DATA_SIGNAL_DSR    = 0x06,
+       GPRS_DATA_SIGNAL_RTS    = 0x07,
+       GPRS_DATA_SIGNAL_CTS    = 0x08,
+       GPRS_DATA_SIGNAL_RI     = 0x09,
+} tapi_ps_btdun_pincontrol_signal;
+
+typedef enum {
+       GPRS_SIGNAL_STATUS_OFF  = 0x00,
+       GPRS_SIGNAL_STATUS_ON   = 0x01,
+} tapi_ps_btdun_pincontrol_status;
+
+typedef enum {
+       TAPI_GPRS_PS_STATUS_DETACH = 0x00,
+       TAPI_GPRS_PS_STATUS_ATTACH = 0x01,
+       TAPI_GPRS_PS_STATUS_MAX
+} tapi_gprs_pdp_status;
+
+typedef enum {
+       TAPI_GPRS_MO_SMS_SVC_CIRCUIT                    = 0x00,
+       TAPI_GPRS_MO_SMS_SVC_GPRS                               = 0x01,
+       TAPI_GPRS_MO_SMS_SVC_CIRCUITPREFERRED   = 0x02,
+       TAPI_GPRS_MO_SMS_SVC_GPRSPREFERRED              = 0x03,
+} tapi_gprs_pdp_mo_sms_service;
+
+typedef enum {
+       TAPI_GPRS_3G_QOS_TYPE_REQUEST                   = 0x01,
+       TAPI_GPRS_3G_QOS_TYPE_MIN_ACCEPT                = 0x02,
+       TAPI_GPRS_3G_QOS_TYPE_NEGOTIATE         = 0x03,
+} tapi_gprs_pdp_3g_qos_type;
+
+typedef enum {
+       TAPI_GPRS_3G_QOS_DELI_ORDER_NO                  = 0x00,
+       TAPI_GPRS_3G_QOS_DELI_ORDER_YES                 = 0x01,
+       TAPI_GPRS_3G_QOS_DELI_ORDER_SUBSCRIBE   = 0x02,
+} tapi_gprs_pdp_3g_qos_deli_order;
+
+typedef enum {
+       DSTATE_OK                       = 0x00,
+       DSTATE_CONNECT,
+       DSTATE_RING,
+       DSTATE_NO_CARRIER,
+       DSTATE_ERROR,
+       DSTATE_NO_DIALTONE,
+       DSTATE_BUSY,
+       DSTATE_NO_ANSWER,
+       DSTATE_RESULT_FDN,
+       DSTATE_MAX,
+} tapi_gprs_data_status;
+
+typedef enum {
+       PDP_ACT_FAILURE_CAUSE_NORMAL                                    = 0x00,                 // 0x00 : Normal Process ( no problem )
+       PDP_ACT_FAILURE_CAUSE_REL_BY_USER                               = 0x01,                 // Call Released by User
+       PDP_ACT_FAILURE_CAUSE_REGULAR_DEACTIVATION              = 0x02,                 // Regular deactivation
+       PDP_ACT_FAILURE_CAUSE_LLC_SNDCP                         = 0x03,                 // LLC SNDCP failure
+       PDP_ACT_FAILURE_CAUSE_INSUFFICIENT_RESOURCE     = 0x04,                 // Insufficient resources
+       PDP_ACT_FAILURE_CAUSE_UNKNOWN_APN                               = 0x05,                 // Missing or unknown apn
+       PDP_ACT_FAILURE_CAUSE_UNKNOWN_PDP_ADDRESS               = 0x06,         // Unknown PDP address or type
+       PDP_ACT_FAILURE_CAUSE_USER_AUTH_FAILED                  = 0x07,         // Unknown PDP address or type
+       PDP_ACT_FAILURE_CAUSE_ACT_REJ_GGSN                              = 0x08,                 // Unknown PDP address or type
+       PDP_ACT_FAILURE_CAUSE_ACT_REJ_UNSPECIFIED               = 0x09,                 // Unknown PDP address or type
+       PDP_ACT_FAILURE_CAUSE_SVC_OPTION_NOT_SUPPORTED  = 0x0A,         // Service option not supported
+       PDP_ACT_FAILURE_CAUSE_SVC_NOT_SUBSCRIBED                = 0x0B,         // Requested service option not subscribed
+       PDP_ACT_FAILURE_CAUSE_SVC_OPT_OUT_ORDER         = 0x0C,                 // Service out of order
+    PDP_ACT_FAILURE_CAUSE_NSAPI_USED                           = 0x0D,         // NSAPI already used
+       PDP_ACT_FAILURE_CAUSE_QOS_NOT_ACCEPTED                  = 0x0E,         // QoS not accepted
+       PDP_ACT_FAILURE_CAUSE_NETWORK_FAILURE                   = 0x0F,         // Network Failure
+    PDP_ACT_FAILURE_CAUSE_REACT_REQUIRED                       = 0x10,         // Reactivation Required
+       PDP_ACT_FAILURE_CAUSE_REATURE_NOT_SUPPORTED             = 0x11,         // Feature not supported
+       PDP_ACT_FAILURE_CAUSE_TFT_FILTER_ERROR                  = 0x12,         // TFT or filter error
+       PDP_ACT_FAILURE_CAUSE_UNKOWN_PDP_CONTEXT                = 0x13,         // Unknown PDP context
+       PDP_ACT_FAILURE_CAUSE_INVALID_MSG                               = 0x14,         // Invalid MSG
+       PDP_ACT_FAILURE_CAUSE_PROTOCOL_ERROR                    = 0x15,         // Protocol error
+       PDP_ACT_FAILURE_CAUSE_MOBILE_FAILURE_ERROR              = 0x16,         // Mobile failure error
+       PDP_ACT_FAILURE_CAUSE_TIMEOUT_ERROR                             = 0x17,         // Timeout error
+       PDP_ACT_FAILURE_CAUSE_UNKNOWN_ERROR                             = 0x18,         // Unknown error
+       PDP_ACT_FAILURE_CAUSE_MAX ,
+} tapi_gprs_ds_status_reason;
+
+typedef enum {
+       INTERNAL_PS_CALL = 0x00,
+       EXTERNAL_PS_CALL = 0x01
+} tapi_gprs_external_status;
+
+typedef enum {
+       PDP_DEVICE_INFO_GET = 0x00,
+       PDP_DEVICE_INFO_SET = 0x01
+} tapi_gprs_device_info;
+
+typedef enum{
+    TAPI_GPRS_PORT_LIST_NOT_USE,    // 0x00
+       TAPI_GPRS_PORT_LIST_WHITE,      // 0x01
+       TAPI_GPRS_PORT_LIST_BLACK,      // 0x02
+} tapi_gprs_port_list_type;
+
+typedef enum {
+       TAPI_PDP_STATE_NONE,             /* 0x00 Default state for a given PDP context*/
+    TAPI_PDP_STATE_ACTIVATING,          /* 0x01 TS will be in this state when there is a START PDP Request until it is  activated by modem - This state PDP is not yet UP*/
+    TAPI_PDP_STATE_ACTIVE,           /* 0x02 After PDP activation is completed by modem and sent to PDA - This state PDP is fully UP*/
+    TAPI_PDP_STATE_MODIFYING,        /* 0x03 This state is reserved for future use - When TS support modifying existing PDP*/
+    TAPI_PDP_STATE_DEACTIVATING,     /* 0x04 TS will be in this state when there is STOP PDP request from App until it is deactivated by modem */
+} tapi_gprs_state;
+
+typedef enum {
+       TAPI_PDP_DATA_DORMANCY_SUCCESS,
+       TAPI_PDP_DATA_DORMANCY_FAILED
+} TelTapiGprsDataDormancy_t;
+
+/* Suspend Reason Type */
+typedef enum {
+  TAPI_PDP_SUSPEND_NO_SVC                      = 0x01,
+  TAPI_PDP_SUSPEND_RAT_CHANGE          = 0x02,
+  TAPI_PDP_SUSPEND_GPRS_HOLD           = 0x03,
+  TAPI_PDP_SUSPEND_FLOW_CONTROL        = 0x04,
+  TAPI_PDP_SUSPEND_GPRS_SUSPEND        = 0x05,
+  TAPI_PDP_SUSPEND_RAU                 = 0x06,
+  TAPI_PDP_SUSPEND_LU                      = 0x07,
+  TAPI_PDP_TRANSFER_STATUS_MAX
+} tapi_gprs_suspend_type;
+
+typedef struct {
+       tapi_gprs_type_t type;
+       tapi_phone_err_t cause;
+} tapi_gprs_error_info_t;
+
+typedef struct {
+       int cont_id;
+       tapi_pdp_err_t err;
+} tapi_ps_pdp_info_t;
+
+typedef struct {
+       int cont_id;
+       tapi_pdp_err_t err;
+} tapi_ps_net_stop_rsp_t;
+
+typedef struct {
+       int cont_id;
+       tapi_pdp_err_t err;
+} tapi_ps_net_activation_rsp_t;
+
+typedef struct {
+       int cont_id;
+       tapi_pdp_err_t err;
+} tapi_ps_net_stop_ind_t;
+
+/*     ps attach response      */
+typedef struct {
+       int     state;
+       int     transfer_status;
+} tapi_ps_attach_response_t;
+
+/*     ps call statistics      */
+typedef struct {
+       unsigned char       cid;        //      call id . for proper bit alignment prefer int than short
+       unsigned long int       rx;     //      total number of bytes received for this cid
+       unsigned long int       tx;             //      total number of bytes transmitted for this cid
+} tapi_ps_call_statistics_t;
+
+typedef struct {
+       tapi_ps_btdun_pincontrol_signal signal;
+       tapi_ps_btdun_pincontrol_status status;
+} tapi_ps_btdun_pincontrol;
+
+/**
+ * This structure defines PDP information.
+ * @see        ps_net_info_t
+ */
+typedef struct {
+   unsigned short      is_primary_cont;                /*Primary or secondary*/
+   int                         primary_cont;                   /*Primary context id, if the is the context is secondary*/
+   char                        apn[TAPI_PDP_APN_LEN_MAX];
+   unsigned char       pdp_address[TAPI_PDP_ADDR_LEN_MAX];
+   unsigned char       username[TAPI_PDP_MAX_USERNAME_LEN ];
+   unsigned char       password[TAPI_PDP_MAX_PASSWORD_LEN ];
+   unsigned char       dns1[TAPI_PDP_MAX_DNS_LEN ];               // @field Context activation DNS1
+   unsigned char       dns2[TAPI_PDP_MAX_DNS_LEN ];               // @field Context activation DNS2
+   tapi_pdp_auth_type_t auth_type;
+   tapi_pdp_type_t             pdp_type;
+} tapi_pdp_info_t;
+
+typedef struct {
+       int cont_id;
+       tapi_pdp_info_t pdp_info;
+} tapi_ps_net_start_req_t;
+
+typedef struct {
+       unsigned short  is_primary_cont;  /*Primary or secondary*/
+       unsigned char           username[TAPI_PDP_MAX_USERNAME_LEN ];
+       unsigned char   password[TAPI_PDP_MAX_PASSWORD_LEN ];
+       unsigned char   dns1[TAPI_PDP_MAX_DNS_LEN ];               // @field Context activation DNS1
+       unsigned char   dns2[TAPI_PDP_MAX_DNS_LEN ];               // @field Context activation DNS2
+    tapi_pdp_auth_type_t auth_type;
+} tapi_pdpdeact_info_t;
+
+typedef struct {
+       int cont_id;
+       tapi_pdpdeact_info_t pdp_info;
+} tapi_ps_net_stop_req_t;
+
+typedef struct {
+       unsigned char field_flag;
+       unsigned char ip_address[4];
+       unsigned char primary_dns[4];
+       unsigned char secondary_dns[4];
+       unsigned char gateway[4];
+       unsigned char subnet_mask[4];
+} tapi_pdp_resp_info_t;
+
+typedef struct {
+       int cont_id;
+       tapi_pdp_err_t err;
+       tapi_pdp_resp_info_t pdp_info;
+       char devname[TAPI_PDP_NAME_LEN_MAX];
+} tapi_ps_net_start_rsp_t;
+
+typedef struct tagSetPDPActDeact {
+       int cid;
+       unsigned char username[TAPI_PDP_MAX_USERNAME_LEN ];     // @field Context activation user name
+       unsigned char passwd[TAPI_PDP_MAX_PASSWORD_LEN ];               // @field Context activation password
+       unsigned char dns1[TAPI_PDP_MAX_DNS_LEN ];                              // @field Context activation DNS1
+       unsigned char dns2[TAPI_PDP_MAX_DNS_LEN ];                              // @field Context activation DNS2
+       tapi_pdp_auth_type_t    auth;
+} tapi_gprs_pdp_act_deact_set;
+
+typedef struct {
+       char cid;
+       tapi_gprs_pdp_status state;
+} tapi_gprs_pdp_status_info;
+
+typedef struct {
+       char num_act;
+       tapi_gprs_pdp_status_info info[3];
+} tapi_gprs_pdp_status_res;
+
+typedef struct {
+       char cid;
+       char address[20];
+} tapi_gprs_pdp_address_res;
+
+typedef struct {
+       unsigned char                           cid;
+       tapi_gprs_data_status           status;
+       tapi_gprs_ds_status_reason      reason;
+       unsigned char                           external;
+} tapi_gprs_pdp_status_reason_info;
+
+typedef struct {
+    tapi_gprs_port_list_type type;
+    unsigned char len;
+    unsigned short list[MAX_GPRS_PORT_LIST];
+} tapi_gprs_port_list;
+
+typedef struct {
+    tapi_gprs_port_list tcp_list;
+    tapi_gprs_port_list udp_list;
+} tapi_gprs_pdp_port_list_setting_info_t;
+
+/**
+ * @brief  This API is used to request to Telephony Server to set PDP context define info, PDP activation.
+ *  Access to this API is limited, we recommend you use Data Network API
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * -NONE
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] pNet_start_req_info
+ * - This input has the PDP context define info, PDP activation info #tapi_ps_net_start_req_t
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * -The event associated is TAPI_EVENT_PS_PDP_ACT_RSP  and the event data is #tapi_ps_pdp_info_t.
+ *
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiPS.h>
+ *
+ * int ret_status;
+ * int request_id = 0;
+ * tapi_ps_net_start_req_t start_req;
+ *
+ * start_req.cont_id = CONTEXT_ID; //use proper id regarding upper layer usage
+ * strcpy(start_req.pdp_info.apn, APN_ADDRESS);
+ *
+ * ret_status = tel_activate_gprs_pdp (&start_req, &request_id);
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ */
+/*================================================================================================*/
+int    tel_activate_gprs_pdp(const tapi_ps_net_start_req_t *pNet_start_req_info, int *pRequestID);
+
+/**
+ * @brief  This API is used to request to Telephony Server to deactivate PDP service
+ *  Access to this API is limited, we recommend you use Data Network API
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * -NONE
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] net_stop_req_info
+ * - This input has the PDP context define info, PDP activation info #tapi_ps_net_start_req_t
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * -The event associated is TAPI_EVENT_PS_PDP_DEACT_RSP  and the event data is #tapi_ps_pdp_info_t.
+ *
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiPS.h>
+ *
+ * int ret_status;
+ * int request_id = 0;
+ * tapi_ps_net_stop_req_t end_req;
+ *
+ * memset(&end_req, 0, sizeof(tapi_ps_net_stop_req_t));
+ *
+ * end_req.cont_id = CONTEXT_ID;
+ *
+ * ret_status = tel_deactivate_gprs_pdp (&end_req, &request_id); //use context id which is used in activate time
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ */
+/*================================================================================================*/
+int    tel_deactivate_gprs_pdp(const tapi_ps_net_stop_req_t *net_stop_req_info, int *pRequestID);
+
+/**
+ * @brief  This API is used to send modem data channels to dormant state for power saving when there is no data flowing for certain time
+ *         Access to this API is limited, we recommend you use Data Network API
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * -NONE
+ *
+ * @warning
+ * - None.
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ *  -The event associated is TAPI_EVENT_PS_DATA_DORMANT_RESP  and the event data is #TelTapiGprsDataDormancy_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiPS.h>
+ *
+ * int ret_status;
+ * int request_id = 0;
+ *
+ * ret_status = tel_set_gprs_dormant(&request_id); //if user want to dormant state
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ */
+/*================================================================================================*/
+int    tel_set_gprs_dormant(int *pRequestID);
+
+/**
+ * @brief  This API is used to get port list
+ *         Access to this API is limited, we recommend you use Data Network API
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * -NONE
+ *
+ * @warning
+ * - None.
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ *  -The event associated is TAPI_EVENT_PS_PDP_GET_PORTLIST_RSP  and the event data is #tapi_gprs_pdp_port_list_setting_info_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiPS.h>
+ *
+ * int ret_val;
+ * int requestId = 0;
+ *
+ * ret_val = tel_get_gprs_port_list(&requestId); //get port list with async response. current return value means whether request send low layer properly or not
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ */
+/*================================================================================================*/
+int    tel_get_gprs_port_list(int *pRequestID);
+
+/**
+ * @brief  This API is used to set port list
+ *         Access to this API is limited, we recommend you use Data Network API
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * -NONE
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] info
+ * - This input has the TCP/UDP port list information info #tapi_gprs_pdp_port_list_setting_info_t
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ *  -None
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiPS.h>
+ *
+ * int ret_val;
+ * int requestId = 0;
+ * tapi_gprs_pdp_port_list_setting_info_t test;
+ *
+ * memset(&test, 0, sizeof(tapi_gprs_pdp_port_list_setting_info_t));
+ * test.tcp_list.type = TAPI_GPRS_PORT_LIST_NOT_USE;
+ * test.tcp_list.len = 1;
+ * test.tcp_list.list[0] = 1004;
+ * test.udp_list.type = TAPI_GPRS_PORT_LIST_NOT_USE;
+ * test.udp_list.len = 1;
+ * test.udp_list.list[i] = 1111;
+ *
+ * ret_val = tel_set_gprs_port_list(&test, &requestId); //get operation result with async response. current return value means whether request send low layer properly or not
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ */
+/*================================================================================================*/
+int    tel_set_gprs_port_list(tapi_gprs_pdp_port_list_setting_info_t *info, int *pRequestID);
+
+
+/**
+ * @brief  This API is used to request BT Dun enable or disable
+ *         Access to this API is limited, we recommend you use Data Network API
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * -NONE
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] pincontrol
+ * - This input has the BT Dun pin control information #tapi_ps_btdun_pincontrol
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * -The event associated is TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI or TAPI_EVENT_PS_ERROR_IND.
+ * -In success, the event associated is TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI  and the event data is #tapi_ps_btdun_pincontrol.
+ *   In fail, the event associated is TAPI_EVENT_PS_ERROR_IND  and the event data is #tapi_gprs_error_info_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiPS.h>
+ *
+ * int ret_status;
+ * int request_id = 0;
+ * tapi_ps_btdun_pincontrol bt_control;
+ *
+ * bt_control.signal = GPRS_SIGNAL_DCD;
+ * bt_control.status = GPRS_SIGNAL_STATUS_OFF;
+ *
+ * ret_status = tel_control_gprs_btdun_pin(bt_control, &request_id); //get control result with async response. current return value means whether request send low layer properly or not
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ */
+/*================================================================================================*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  //_ITAPI_PS_H_
+
+/**
+   *  @}
+   */
diff --git a/include/ITapiPhonebook.h b/include/ITapiPhonebook.h
new file mode 100644 (file)
index 0000000..935971a
--- /dev/null
@@ -0,0 +1,535 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2012 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.
+ */
+
+/**
+* @open
+* @ingroup             TelephonyAPI
+* @addtogroup  PHONEBOOK_TAPI  PHONEBOOK
+* @{
+*
+* @file ITapiPhonebook.h
+
+     @brief This file serves as a "C" header file defines functions for Tapi SIM phonebook Services.\n
+      It contains a sample set of function prototypes that would be required by applications.
+
+*/
+
+#ifndef _ITAPI_PHONEBOOK_H_
+#define _ITAPI_PHONEBOOK_H_
+
+#include <tapi_common.h>
+#include <TelErr.h>
+#include <TelSim.h>
+#include <TelDefines.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @brief  This function is used to get current inserted SIM phonebook init status, available phonebook list and first valid index in case of FDN, ADN, 3G phonebook.
+ *     Access to this API is limited to in-house application and we recommend you use phonebook-engine APIs.
+ *
+ * @par Sync (or) Async:
+ * This is an synchronous API.
+ *
+ * @par Important Notes:
+ * - We recommend to use phonebook-engine APIs for handling phonebook(including SIM phonebook).
+ * If user uses SIM phonebook related APIs directly, it can break device phonebook consistency because all phonebook information managed in phonebook-engine.
+ * pb_list and first_index value are available at init_completed status is '1' only.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_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.
+ *
+ * @par Async Response Message:
+ * - None.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int valid_index = 0; // usim or sim adn first valid index
+ * TelSimPbList_t pb_list = {0,};
+ * int pPbInitCompleted = 0; // init or not
+ *
+ * // GET SIM PHONEBOOK INIT INFORMATION
+ * err_code = tel_get_sim_pb_init_info(&pPbInitCompleted, &pb_list, &valid_index);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_pb_init_info(TapiHandle *handle, int *init_completed, TelSimPbList_t *pb_list);
+
+
+/**
+ * @brief  This API is used to get number of used records and total records in specific SIM phonebook type.
+ *     Access to this API is limited to in-house application and we recommend you use phonebook-engine APIs.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - We recommend to use phonebook-engine APIs for handling phonebook(including SIM phonebook).
+ * If user uses SIM phonebook related APIs directly, it can break device phonebook consistency because all phonebook information managed in phonebook-engine.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param[in] pb_type
+ * -Different storage types to be selected in SIM. #TelSimPbType_t
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_SIM_PB_STORAGE_COUNT_CNF  and the event data is #TelSimPbStorageInfo_t.
+ * Asynchronous return status is indicated by #TelSimPbAccessResult_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * TelSimPbType_t storage_type = 0x00;
+ * storage_type = TAPI_SIM_PB_3GSIM; // usim phonebook
+ * err_code = tel_get_sim_pb_count(storage_type, &request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_pb_count(TapiHandle *handle, TelSimPbType_t pb_type, tapi_response_cb callback, void *user_data);
+
+
+/**
+ * @brief  This API is used to get max text length and max number length supported by SIM phone book elementary file.
+ *     Access to this API is limited to in-house application and we recommend you use phonebook-engine APIs.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - The max number length includes the storage space provided by the corresponding EXT file for a given Dialling Number file.
+ * - We recommend to use phonebook-engine APIs for handling phonebook(including SIM phonebook).
+ * If user uses SIM phonebook related APIs directly, it can break device phonebook consistency because all phonebook information managed in phonebook-engine.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param[in] pb_type
+ * -Different storage types to be selected in SIM. #TelSimPbType_t
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF  and the event data is #TelSimPbEntryInfo_t.
+ * Asynchronous return status is indicated by #TelSimPbAccessResult_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * TelSimPbType_t storage_type = 0x00;
+ * storage_type = TAPI_SIM_PB_3GSIM; // usim phonebook
+ * err_code = tel_get_sim_pb_meta_info(storage_type, &request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_pb_meta_info(TapiHandle *handle, TelSimPbType_t pb_type, tapi_response_cb callback, void *user_data);
+
+
+/**
+ * @brief  This API is used to get SIM 3G phonebook supported EFs like ANR, SNE, GRP, EMAIL etc and corresponding EFs max text length, number length and size.
+ *     Access to this API is limited to in-house application and we recommend you use phonebook-engine APIs.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - We recommend to use phonebook-engine APIs for handling phonebook(including SIM phonebook).
+ * If user uses SIM phonebook related APIs directly, it can break device phonebook consistency because all phonebook information managed in phonebook-engine.
+ *
+ * @warning
+ * - None.
+ *
+ * @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.
+ *
+ * @par Async Response Message:
+ * - The event associated is TAPI_SIM_EVENT_PB_3G_CAPABILITY_INFO_CNF  and the event data is #TelSimPbCapabilityInfo_t.
+ * Asynchronous return status is indicated by #TelSimPbAccessResult_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * err_code = tel_get_sim_pb_3g_meta_info(&request_id); // you can find result by receiving asynch event response
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_pb_usim_meta_info(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+
+/**
+ * @brief  This API is used to read SIM phone book entry information from given storage type.
+ *     Access to this API is limited to in-house application and we recommend you use phonebook-engine APIs.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - The index ranges from 1 through to a maximum of 254 for a Linear fixed file and 255 for a cyclic file.
+ * - We recommend to use phonebook-engine APIs for handling phonebook(including SIM phonebook).
+ * If user uses SIM phonebook related APIs directly, it can break device phonebook consistency because all phonebook information managed in phonebook-engine.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param[in] pb_type
+ * -Different storage types to be selected in SIM. #TelSimPbType_t
+ *
+ * @param[in] index
+ * -Index for accessing the SIM data.
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_SIM_PB_ACCESS_READ_CNF  and the event data is #TelSimPbRecordData_t.
+ * Asynchronous return status is indicated by #TelSimPbAccessResult_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * unsigned short index = 1;
+ * TelSimPbType_t storage_type = 0x00;
+ * storage_type = TAPI_SIM_PB_3GSIM; // usim phonebook
+ * err_code = tel_read_sim_pb_record(storage_type, index, &request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_read_sim_pb_record(TapiHandle *handle, TelSimPbType_t pb_type, unsigned short index, tapi_response_cb callback, void *user_data);
+
+
+/**
+ * @brief  This API is used to add or edit SIM phone book record entry information.
+ *     Access to this API is limited to in-house application and we recommend you use phonebook-engine APIs.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - We recommend to use phonebook-engine APIs for handling phonebook(including SIM phonebook).
+ * If user uses SIM phonebook related APIs directly, it can break device phonebook consistency because all phonebook information managed in phonebook-engine.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param[in] req_data
+ * -phonebook data which will be updated or added. #TelSimPbRecordData_t
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_SIM_PB_UPDATE_CNF  and the event data is #TelSimPbUpdateResp_t.
+ * Asynchronous return status is indicated by #TelSimPbAccessResult_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * unsigned short index = 1;
+ * TelSimPbRecordData_t data;
+ * data.StorageFileType  = TAPI_SIM_PB_3GSIM; // usim phonebook
+ * data.Index  = 1; // index which will be updated
+ * data.NextIndex  = 0;
+ * //data.ContactInfo will be added
+ * err_code = tel_update_sim_pb_record(&data, &request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_update_sim_pb_record(TapiHandle *handle, const TelSimPbRecord_t *req_data, tapi_response_cb callback, void *user_data);
+
+
+/**
+ * @brief  This API is used to delete a SIM phonebook record.
+ *     Access to this API is limited to in-house application and we recommend you use phonebook-engine APIs.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - The index ranges from 1 through to a maximum of 254 for a Linear fixed file and 255 for a cyclic file.
+ * - We recommend to use phonebook-engine APIs for handling phonebook(including SIM phonebook).
+ * If user uses SIM phonebook related APIs directly, it can break device phonebook consistency because all phonebook information managed in phonebook-engine.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param[in] pb_type
+ * -Different storage types to be selected in SIM. #TelSimPbType_t
+ *
+ * @param[in] index
+ * -Index of the record to be deleted.
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_SIM_PB_DELETE_CNF  and the event data is #TelSimPbUpdateResp_t.
+ * Asynchronous return status is indicated by #TelSimPbAccessResult_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * unsigned short index = 1;
+ * TelSimPbType_t storage_type = 0x00;
+ * storage_type = TAPI_SIM_PB_3GSIM; // usim phonebook
+ * err_code = tel_delete_sim_pb_record(storage_type, index, &request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_delete_sim_pb_record(TapiHandle *handle, TelSimPbType_t pb_type, unsigned short 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..c23bd37
--- /dev/null
@@ -0,0 +1,433 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2012 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.
+ */
+
+/**
+* @open
+* @ingroup             TelephonyAPI
+* @addtogroup  SAP_TAPI        SAP
+* @{
+*
+* @file ITapiSap.h
+
+     @brief This file serves as a "C" header file defines functions for Tapi SAP Services.\n
+      It contains a sample set of function prototypes that would be required by applications.
+
+*/
+
+#ifndef _ITAPI_SAP_H_
+#define _ITAPI_SAP_H_
+
+#include <tapi_common.h>
+#include <TelErr.h>
+#include <TelSim.h>
+#include <TelDefines.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @brief  This API is used to request to connect sap.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param[in] max_msg_size
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par
+ *
+ * @pre
+ *
+ * @post
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ *
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_req_sap_connect(TapiHandle *handle, int max_msg_size, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This API is used to request sap to disconnect sap.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @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.
+ *
+ * @par
+ *
+ * @pre
+ *
+ * @post
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ *
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_req_sap_disconnect(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This API is used to request sap connection status.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @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.
+ *
+ * @par
+ *
+ * @pre
+ *
+ * @post
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ *
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_req_sap_connection_status(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This API is used to request to get atr.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @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.
+ *
+ * @par
+ *
+ * @pre
+ *
+ * @post
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ *
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_req_sap_transfer_atr(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This API is used to request to transfer apdu.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param [in] apdu_data
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par
+ *
+ * @pre
+ *
+ * @post
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ *
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_req_sap_transfer_apdu(TapiHandle *handle, TelSapApduData_t *apdu_data, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This API is used to request to transport protocol.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param [in] protocol
+ * - SAP transport protocol type
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par
+ *
+ * @pre
+ *
+ * @post
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ *
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_req_sap_transport_protocol(TapiHandle *handle, TelSimSapProtocol_t protocol, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This API is used to request to control power_mode.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param [in] power_mode
+ * - enum data for controlling power mode of client
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par
+ *
+ * @pre
+ *
+ * @post
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ *
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_req_sap_power_operation(TapiHandle *handle, TelSimSapPowerMode_t power_mode, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This API is used to request to get card_reader_status.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @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.
+ *
+ * @par
+ *
+ * @pre
+ *
+ * @post
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ *
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+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..2c03a30
--- /dev/null
@@ -0,0 +1,411 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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.
+ */
+
+/**
+* @open
+* @ingroup             TelephonyAPI
+* @addtogroup  SAT_TAPI        SAT
+* @{
+*
+* @file ITapiSat.h
+
+     @brief This file serves as a "C" header file defines functions for Tapi Sat Services.\n
+      It contains a sample set of function prototypes that would be required by applications.
+
+      Note: Telephony SAT functionality is message relaying from USIM application to SAT related applications.
+ */
+
+#ifndef _ITAPI_SAT_H_
+#define _ITAPI_SAT_H_
+
+#include <tapi_common.h>
+#include <TelSat.h>
+#include <TelDefines.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
+ * - 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 callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ * - The event associated is TAPI_EVENT_SAT_MENU_SELECTION_CNF and the Asynchronous return status is indicated by #TelSatEnvelopeResp_t.
+ *
+ * @pre
+ *  - This function supposed to be called after getting TAPI_EVENT_SAT_SETUP_MENU_IND event from telephony server\n
+ *
+ * @post
+ *  - None
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * SAT-UI
+ *
+ * @see tel_get_sat_main_menu_info
+ *
+ * @code
+ * #include <ITapiSat.h>
+ * int ret_status =0;
+ * int pRequestID=0;
+ * TelSatMenuSelectionReqInfo_t selected_menu;
+ * selected_menu.itemIdentifier = '1'; //selected menu num
+ * selected_menu.bIsHelpRequested = 0;
+ * ret_status = tel_select_sat_menu(&selected_menu, &pRequestId);
+ * @endcode
+ *
+ * @remarks None
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_select_sat_menu(TapiHandle *handle, const TelSatMenuSelectionReqInfo_t* pMenuSelect, tapi_response_cb 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
+ * - handle from tel_init().
+ *
+ * @param [in] pEventData
+ * - #TelSatEventDownloadReqInfo_t contains the necessary parameters like event type and information associated with it.
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ * - The event associated is TAPI_EVENT_SAT_EVENT_DOWNLOAD_CNF and the Asynchronous return status is indicated by #TelSatEnvelopeResp_t.
+ *
+ * @pre
+ *  - A SET UP EVENT LIST proactive command supplies a set of event to monitor.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * SAT-UI
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSat.h>
+ * int ret_status =0;
+ * int pRequestID=0;
+ * TelSatEventDownloadReqInfo_t pEventData;
+ * pEventData.eventDownloadType = TAPI_EVENT_SAT_DW_TYPE_IDLE_SCREEN_AVAILABLE;
+ * pEventData.u.bIdleScreenAvailable = 1; //event occur or not
+ * ret_status = tel_download_sat_event(&pEventData, &pRequestId);
+ * @endcode
+ *
+ * @remarks None
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_download_sat_event(TapiHandle *handle, const TelSatEventDownloadReqInfo_t*  pEventData, tapi_response_cb 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
+ * - handle from tel_init().
+ *
+ * @param [in] commandId
+ * - Specific proactive command id from the Application
+ *
+ * @param [in] status
+ * - #TelSatUiDisplayStatusType_t 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 Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * SAT-UI
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSat.h>
+ * int commandId = 1; //this value should be server given value
+ * ret_status = 0;
+ * ret_status = tel_send_ui_display_status(1, TAPI_SAT_DISPLAY_SUCCESS);
+ * @endcode
+ *
+ * @remarks None
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_send_sat_ui_display_status(TapiHandle *handle, int commandId, TelSatUiDisplayStatusType_t 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
+ * - handle from tel_init().
+ *
+ *@param [in] pUserConfirmData
+ * -#TelSatUiUserConfirmInfo_t 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 Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * SAT-UI
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSat.h>
+ * int ret_status =0;
+ * TelSatUiUserConfirmInfo_t cfm_data;
+ * cfm_data.commandId = '1'; //this value should be server given value
+ * cfm_data.commandType = TAPI_SAT_CMD_TYPE_SETUP_CALL;
+ * cfm_data.keyType = TAPI_SAT_USER_CONFIRM_YES;
+ * ret_status = tel_send_sat_ui_user_confirm(&cfm_data);
+ * @endcode
+ *
+ * @remarks None
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_send_sat_ui_user_confirm(TapiHandle *handle, TelSatUiUserConfirmInfo_t *pUserConfirmData);
+
+ /**
+ * @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
+ * - handle from tel_init().
+ *
+ * @param [out] pMainMenu
+ * - #TelSatSetupMenuInfo_t 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 Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * SAT-UI
+ *
+ * @see tel_select_sat_menu
+ *
+ * @code
+ * #include <ITapiSat.h>
+ * int ret_status =0;
+ * TelSatSetupMenuInfo_t menu; //this struct will be pull up with SIM menu info
+ * ret_status = tel_get_sat_main_menu_info(&menu);
+ * @endcode
+ *
+ * @remarks None
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_sat_main_menu_info(TapiHandle *handle, TelSatSetupMenuInfo_t *pMainMenu);
+
+ /**
+ * @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
+ * - handle from tel_init().
+ *
+ * @param [out] pAppRetInfo
+ * - #TelSatAppsRetInfo_t 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 Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embeded applications which are predefined by 3GPP TS31.111
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSat.h>
+ * int ret_status =0;
+ * TelSatAppsRetInfo_t app_ret;
+ * app_ret.commandType = TAPI_SAT_CMD_TYPE_SETUP_CALL;
+ * app_ret.commandId = 1; //this value should be server given value
+ * app_ret.appsRet.setupCall.resp = TAPI_SAT_R_SUCCESS;
+ * ret_status = tel_send_sat_app_exec_result(&app_ret);
+ * @endcode
+ *
+ * @remarks None
+ *
+ *
+ */
+/*================================================================================================*/
+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..95cb200
--- /dev/null
@@ -0,0 +1,1611 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2012 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.
+ */
+
+/**
+* @open
+* @ingroup             TelephonyAPI
+* @addtogroup  SIM_TAPI        SIM
+* @{
+*
+* @file ITapiSim.h
+
+     @brief This file serves as a "C" header file defines functions for Tapi SIM Services.\n
+      It contains a sample set of function prototypes that would be required by applications.
+
+*/
+
+#ifndef _ITAPI_SIM_H_
+#define _ITAPI_SIM_H_
+
+#include <tapi_common.h>
+#include <TelErr.h>
+#include <TelSim.h>
+#include <TelDefines.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+* @brief  This API is used to get SIM Card Initialization status and SIM Card Identification.
+* Most of modules which require SIM data should check SIM status before using it definitely.
+ *
+* @par Sync (or) Async:
+* This is a Synchronous API.
+*
+* @par Important Notes:
+* - Card Identification value is available in TAPI_SIM_STATUS_SIM_INIT_COMPLETED case only.
+*
+* @warning
+* - None.
+*
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+* @param [out] sim_status
+* - This parameter returns SIM initialization status from Telephony server boot up time.
+* First, You can find sim existance if returned value are not in TAPI_SIM_STATUS_CARD_NOT_PRESENT and TAPI_SIM_STATUS_CARD_REMOVED.
+*
+* @param [out] card_changed
+* - This parameter returns sim card identification value when sim_status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED.
+* - card_changed value just present whether current inserted SIM card differs with previous SIM or not.
+*
+* @par Async Response Message:
+* - None
+*
+* @pre
+*  - None.
+*
+* @post
+*  - None.
+*
+* @return Return Type (int)
+* - Integer '0' ( same with TAPI_API_SUCCESS ) - indicating that the operation has completed successfully. \n
+* - Negative integer : it provides an error code (Refer #TapiResult_t)
+*
+* @par Prospective Clients:
+* External Apps.
+*
+* @see None
+*
+* @code
+* #include <ITapiSim.h>
+*
+* int err_code = TAPI_API_SUCCESS;
+* TelSimCardStatus_t status = 0x00;
+* int b_card_changed = 0;
+*
+* // GET SIM INIT INFORMATION
+* err_code = tel_get_sim_init_info(&status, &b_card_changed);
+*
+* @endcode
+*
+* @remarks None
+*
+*/
+/*================================================================================================*/
+int tel_get_sim_init_info(TapiHandle *handle, TelSimCardStatus_t *sim_status, int *card_changed);
+
+/**
+ * @brief  This function is a synchronous API which gets the Card Type whether Card is a SIM or a USIM.
+ *
+ * @par Sync (or) Async:
+ * This is a synchronous function.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param [out] card_type
+ * This parameter returns the SIM card type information like whether it is GSM SIM card or USIM or it is of unknown type.
+ *
+ *  - TAPI_SIM_CARD_TYPE_UNKNOWN
+ *  - TAPI_SIM_CARD_TYPE_GSM
+ *  - TAPI_SIM_CARD_TYPE_USIM
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * TelSimCardType_t cardInfo; //unkwon, sim(normally gsm), usim(normally umts)
+ * err_code = tel_get_sim_type(&cardInfo);
+ *
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_type(TapiHandle *handle, TelSimCardType_t *card_type);
+
+/**
+ * @brief  This function is a synchronous API gets the IMSI information.
+ *
+ * @par Sync (or) Async:
+ * This is a synchronous function.
+ *
+ * @par Important Notes:
+ * - IMSI value is the value that security needs.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param [out] imsi
+ * This parameter returns the IMSI information. Refer #TelSimImsiInfo_t
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * TelSimImsiInfo_t sim_imsi_info; // mcc, mnc, msisdn
+ * err_code = tel_get_sim_imsi(&sim_imsi_info);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_imsi(TapiHandle *handle, TelSimImsiInfo_t *imsi);
+
+/**
+ * @brief  This function is a synchronous API used to get ECC(SIM) or UECC(USIM) data.
+ *
+ * @par Sync (or) Async:
+ * This is a synchronous function.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param [out] ecc
+ * - This parameter returns
+ *             the SIM emergency call code information like ecc length, service type etc
+ *             and number of ECC records.
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int ecc_rec_count = 0; // count in sim card
+ * int err_code = 0;
+ * TelSimEccData_t ecc_info = {{{0,}}};
+ * err_code = tel_get_sim_ecc(&ecc_info, &ecc_rec_count);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_ecc(TapiHandle *handle, TelSimEccList_t *ecc);
+
+/**
+ * @brief  This function is a synchronous API gets a Unique identification number of the (U)ICC.
+ * ICC means Integrated Circuit Card.
+ *
+ * @par Sync (or) Async:
+ * This is a synchronous function.
+ *
+ * @par Important Notes:
+ * - IC Card number value is the value that security needs.
+ *
+ * @warning
+ * - None.
+ *
+ * @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.
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * TelSimIccIdInfo_t icc_data; // this struct consists of number length and number.
+ * err_code = tel_get_sim_iccid(&icc_data);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_iccid(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This API is used to get the language preference(indication) information.
+ *
+ * @par Sync (or) Async:
+ * This is a synchronous function.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @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.
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * TelSimLanguageInfo_t li_info = {0,};
+ * err_code = tel_get_sim_language(&li_info); // you can find language info with li_info variable
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_language(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+
+/**
+ * @brief  This API is used to update the language preference information to SIM card.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous function.
+ *
+ * @par Important Notes:
+ * - This function update SIM Language information directly and can effect device language setting. Use carefully.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param [in] language
+ * This parameter returns the language preference information.
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_SIM_SET_LANGUAGE_CNF.
+ * Asynchronous return status is indicated by #TelSimAccessResult_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * TelSimLanguagePreferenceCode_t language = 0x00; //init
+ * language = TAPI_SIM_LP_ENGLISH; //language value
+ * err_code = tel_set_sim_language(language, &request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_set_sim_language(TapiHandle *handle, TelSimLanguagePreferenceCode_t language, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This API is used to get the SIM Call forwarding indication related data(EF-CFIS and CPHS case).
+ * this data is required for Call forwarding related functionality in handset.
+ *
+ * @par Sync (or) Async:
+ * This is a synchronous function.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None
+ *
+ * @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.
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *  - None
+ *
+ * @post
+ *  - None
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * TelSimCallForwarding_s cf_data;
+ * TapiResult_t err_code = 0;
+ * err_code = tel_get_sim_callforwarding_info(&cf_data);
+ * if(err_code == TAPI_API_SUCCESS) {
+ *   if(cf_data.b_cphs) { //b_cphs means current SIM is for CPHS or not.
+ *     printf("Current SIM is CPHS");
+ *   } else {
+ *     printf("Current SIM is not CPHS but 3GPP");
+ *   }
+ * } else {
+ *   printf("TAPI API FAIL: Error Code [0x%x]",err_code);
+ * }
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_callforwarding_info(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+int tel_set_sim_callforwarding_info(TapiHandle *handle, TelSimCallForwardingReq_t *req_cf, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This API is used to get the SIM message waiting indication related data(EF-MWIS and CPHS case).
+ * this data is required for Message waiting related functionality in handset.
+ *
+ * @par Sync (or) Async:
+ * This is a synchronous function.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None
+ *
+ * @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.
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *  - None
+ *
+ * @post
+ *  - None
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * TelSimMessageWaiting_s mw_data;
+ * TapiResult_t err_code = 0;
+ * err_code = tel_get_sim_messagewaiting_info(&mw_data);
+ * if(err_code == TAPI_API_SUCCESS) {
+ *   if(mw_data.b_cphs) { //b_cphs means current SIM is for CPHS or not.
+ *     printf("Current SIM is CPHS");
+ *   } else {
+ *     printf("Current SIM is not CPHS but 3GPP");
+ *   }
+ * } else {
+ *   printf("TAPI API FAIL: Error Code [0x%x]",err_code);
+ * }
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_messagewaiting_info(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+int tel_set_sim_messagewaiting_info(TapiHandle *handle, TelSimMessageWaitingReq_t *req_mw, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This API is used to get the SIM mailbox related data(EF-MBDN, MBDI and CPHS case).
+ * this data is required for Mailbox related functionality in handset.
+ *
+ * @par Sync (or) Async:
+ * This is a synchronous function.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @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.
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * TelSimMailboxNumbers_s mbox;
+ * TapiResult_t err_code = 0;
+ * err_code = tel_get_sim_mailbox_info(&mbox);
+ * if(err_code == TAPI_API_SUCCESS) {
+ *   if(mbox.b_cphs) { //b_cphs means current SIM is for CPHS or not.
+ *     printf("Current SIM is CPHS");
+ *   } else {
+ *     printf("Current SIM is not CPHS but 3GPP");
+ *   }
+ * } else {
+ *   printf("TAPI API FAIL: Error Code [0x%x]",err_code);
+ * }
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_mailbox_info(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+int tel_set_sim_mailbox_info(TapiHandle *handle, TelSimMailBoxNumber_t *req_mb, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This API is used to get the SIM CPHS specific data.
+ * this data is required for CPHS related functionality in handset.
+ *
+ * @par Sync (or) Async:
+ * This is an Synchronous API.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None
+ *
+ * @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.
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *
+ * @post
+ *  - None
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * TelSimCphsLocalInfo_t cphs_data;
+ * TapiResult_t err_code = 0;
+ * err_code = tel_get_sim_cphs_info(&cphs_data);
+ * if(err_code == TAPI_API_SUCCESS) {
+ *   if(cphs_data.b_used) { //b_used means current SIM is for CPHS or not.
+ *     printf("Current SIM is CPHS");
+ *   } else {
+ *     printf("Current SIM is not CPHS but 3GPP");
+ *   }
+ * } else {
+ *   printf("TAPI API FAIL: Error Code [0x%x]",err_code);
+ * }
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_cphs_info(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This API is used to get the SIM MSISDN data. Regarding 3GPP specification, Current value is optional.
+ *
+ * @par Sync (or) Async:
+ * This is an Synchronous API.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None
+ *
+ * @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.
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *
+ * @post
+ *  - None
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * TelSimSubscriberInfo_t msisdn;
+ * TapiResult_t err_code = 0;
+ * err_code = tel_get_sim_msisdn(&msisdn);
+ * if(err_code == TAPI_API_SUCCESS)
+ * {
+ *      printf(" ============================================");
+ *      printf("name[%s]",msisdn.name);
+ *      printf("num[%s]",msisdn.num);
+ *      if(msisdn.name == '\0';) //If current SIM does not have, Null string will be returned.
+ *              printf("name is null string");
+ *
+ *      if(msisdn.num == '\0';) //If current SIM does not have, Null string will be returned.
+ *              printf("number is null string");
+ * }
+ * else
+ * {
+ *      printf("TAPI API FAIL: Error Code [0x%x]",err_code);
+ * }
+ *
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_msisdn(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This API is used to get the SIM OPLMNWACT(Operator controlled PLMN Selector with Access Technology) data. Regarding 3GPP specification, Current value is optional.
+ *
+ * @par Sync (or) Async:
+ * This is an Synchronous API.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None
+ *
+ * @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.
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *
+ * @post
+ *  - None
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps
+ *
+ * @see None
+ *
+ * @code
+ *
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_oplmnwact(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This API is used to get the SIM SPN data. Regarding 3GPP specification, Current value is optional.
+ *
+ * @par Sync (or) Async:
+ * This is an Synchronous API.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None
+ *
+ * @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.
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *
+ * @post
+ *  - None
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps
+ *
+ * @see None
+ *
+ * @code
+ *
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_spn(TapiHandle *handle, tapi_response_cb callback,     void *user_data);
+
+/**
+ * @brief  This API is used to get the SIM CPHS NETNAME data.
+ *
+ * @par Sync (or) Async:
+ * This is an Synchronous API.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None
+ *
+ * @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.
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *
+ * @post
+ *  - None
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps
+ *
+ * @see None
+ *
+ * @code
+ *
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_cphs_netname(TapiHandle *handle, tapi_response_cb callback,    void *user_data);
+
+/**
+ * @brief  This API is used to execute the authentication procedure by using SIM.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ * This function supports IMS, 3G and GSM authentication.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * -NONE
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param[in] authentication_data
+ * - This input has the authentication code to be validated by ISIM,3G and GSM application in the SIM card. #TelSimAuthenticationData_t
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ * -The event associated is TAPI_SIM_EVENT_AUTHENTICATION_CNF  and the event data is #TelSimAuthenticationResponse_t.
+ * Asynchronous return status is indicated by #TelSimAccessResult_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * TelSimAuthenticationData_t pAuthenticationData;
+ * strcpy((char*)pAuthenticationData.rand_data, "username@operator.com"); //access data
+ * pAuthenticationData.rand_length= strlen("username@operator.com");
+ * strcpy((char*)pAuthenticationData.autn_data,  "+1-212-555-12345"); // auth data
+ * pAuthenticationData.autn_length = strlen("+1-212-555-12345");
+ * err_code = tel_req_sim_authentication(&pAuthenticationData,&request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_req_sim_authentication(TapiHandle *handle, TelSimAuthenticationData_t *authentication_data, tapi_response_cb 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.
+ * PIN1 code : The SIM card has its own password is to check access permissions
+ * SIM Lock code : Between Device and the SIM card using a SIM password is only available on certain handsets to be used to authorize.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - Based on Pin status (PIN/PUK/SIM LOCK) is blocked, an unsolicited event TAPI_EVENT_SIM_STATUS_IND is published to Applications on Device boot time.
+ * - if pin status is PUK, you should use #tel_verify_sim_puks instead of this API.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param[in] pin_data
+ * -PIN code, entered by the user. you should make all parameters.
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_SIM_VERIFY_SEC_CNF  and the event data is #TelSimSecResult_t.
+ * Asynchronous return status is indicated by #TelSimPinOperationResult_t.
+ * If returned status is TAPI_SIM_PIN_OPERATION_SUCCESS, Verification successes.
+ * If returned status is TAPI_SIM_PIN_INCORRECT_PASSWORD, Verification fails and you can check retry count by using event data  #TelSimSecResult_t.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ * - This API is used when #TelSimCardStatus_t is TAPI_SIM_STATUS_SIM_PIN_REQUIRED or TAPI_SIM_STATUS_SIM_LOCK_REQUIRED on boot time.
+ * - Currently there`s no proper scenario for PIN2 verification by using this API.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ *
+ * int request_id = 0;
+ * err_code = TAPI_API_SUCCESS; // 0
+ * int length = TAPI_SIM_PIN_LENGTH+1;
+ * char init_pin_val[length] ;
+ *
+ * strcpy(init_pin_val, PIN1_NORMAL);
+ *
+ * TelSimSecPw_t pin_data = {0,};
+ *
+ * pin_data.type = TAPI_SIM_PTYPE_PIN1;
+ * pin_data.pw_len = strlen(init_pin_val);
+ *
+ * printf("pw_len[%d]", pin_data.pw_len);
+ *
+ * pin_data.pw = (char*)malloc(length);
+ * memcpy(pin_data.pw,init_pin_val,length);
+ *
+ * err_code = tel_verifiy_sim_pins(&pin_data, &request_id);
+ *
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_verifiy_sim_pins(TapiHandle *handle, const TelSimSecPw_t *pin_data, tapi_response_cb 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.
+ * If you get sim card status(TAPI_SIM_STATUS_SIM_PUK_REQUIRED) by using #tel_get_sim_init_info on boot time
+ * or (TAPI_SIM_PIN_STATUS_BLOCKED) by using #tel_get_sim_security_status after normal initialization for specific operation,
+ * you may unblock PIN1/PIN2.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - Based on Pin status (PIN1/PIN2) is blocked, an unsolicited event TAPI_EVENT_SIM_STATUS_IND
+ * is published to Applications on boot time also.
+ *
+ * @warning
+ * - If you fail to unblock PIN til given retry count, Your SIM card be permanent block status.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param[in] puk_data
+ * -Specifies unblocking PIN password #TelSimSecPw_t
+ *
+ * @param[in] new_pin_data
+ * -Specifies PIN password which you want to use after unblocking operation #TelSimSecPw_t
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_SIM_VERIFY_PUK_CNF  and the event data is #TelSimSecResult_t.
+ * Asynchronous return status is indicated by #TelSimPinOperationResult_t.
+ * If returned status is TAPI_SIM_PIN_OPERATION_SUCCESS, Verification successes.
+ * If returned status is TAPI_SIM_PUK_INCORRECT_PASSWORD, Verification fails and you can check retry count by using event data  #TelSimSecResult_t.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *  - 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 previous facility is disabled.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ *
+ * int request_id = 0;
+ * err_code = TAPI_API_SUCCESS; // 0
+ * int length = TAPI_SIM_PIN_LENGTH+1;
+ *
+ * char init_pin_val[length];
+ * char init_puk_val[length];
+ *
+ * strcpy(init_pin_val, PIN1_NORMAL);
+ * strcpy(init_puk_val, PUK1_NORMAL);
+ *
+ * TelSimSecPw_t puk_data = {0,};
+ * TelSimSecPw_t new_pin_data = {0,};
+ *
+ * puk_data.type = TAPI_SIM_PTYPE_PUK1;   // 0x00
+ * puk_data.pw_len = length;
+ * puk_data.pw_len = strlen(init_puk_val);
+ * printf("pw_len[%d]", puk_data.pw_len);
+ * memcpy(puk_data.pw,init_pin_val,length);
+ *
+ * new_pin_data.type = TAPI_SIM_PTYPE_PIN1;   // 0x00
+ * new_pin_data.pw_len = strlen(init_pin_val);
+ * printf("pw_len[%d]", new_pin_data.pw_len);
+ * new_pin_data.pw = (char*)malloc(length);
+ * memcpy(new_pin_data.pw,init_pin_val,length);
+ *
+ * err_code = tel_verify_sim_puks(&puk_data, &new_pin_data, &request_id);
+ *
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+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  This function changes PIN1/PIN2 code based on the pin type passed along with old pin data and new pin data.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - User should fill up pin type equally both old_pin and new_pin.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param[in] old_pin
+ * -Old pin code, entered by the user. #TelSimSecPw_t
+ *
+ * @param[in] new_pin
+ * -New pin code, entered by the user. #TelSimSecPw_t
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_SIM_CHANGE_PINS_CNF  and the event data is #TelSimSecResult_t.
+ * Asynchronous return status is indicated by #TelSimPinOperationResult_t.
+ * If returned status is TAPI_SIM_PIN_OPERATION_SUCCESS, Change operation finish successfully.
+ * If returned status is TAPI_SIM_PIN_INCORRECT_PASSWORD, Change operation fails and you can check retry count by using event data  #TelSimSecResult_t.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *  - PIN which user want to change check facility should be enabled.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ *
+ * int request_id = 0;
+ * err_code = TAPI_API_SUCCESS; // 0
+ * int length = TAPI_SIM_PIN_LENGTH+1;
+ * char init_old_pin_val[length] ;
+ * char init_new_pin_val[length];
+ *
+ * memset(&init_old_pin_val, 0 , length);
+ * memset(&init_new_pin_val, 0 , length);
+ *
+ * TelSimSecPw_t old_pin = {0,};
+ * TelSimSecPw_t new_pin = {0,};
+ *
+ * strcpy(init_old_pin_val, PIN1_ORG);
+ *
+ * old_pin.type = TAPI_SIM_PTYPE_PIN1;
+ * old_pin.pw_len = strlen(init_old_pin_val);
+ * printf("pw_len[%d]", old_pin.pw_len);
+ * old_pin.pw = (char*)malloc(length);
+ * memcpy(old_pin.pw,init_old_pin_val,length);
+ *
+ * strcpy(init_new_pin_val, PIN1_NEW);
+ *
+ * new_pin.type = TAPI_SIM_PTYPE_PIN1;
+ * new_pin.pw_len = strlen(init_new_pin_val);
+ * printf("pw_len[%d]", new_pin.pw_len);
+ * new_pin.pw = (char*)malloc(length);
+ * memcpy(new_pin.pw,init_new_pin_val,length);
+ *
+ * err_code = tel_change_sim_pins(&old_pin, &new_pin, &request_id);
+ *
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+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  This API is used to disable the SIM facility.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param[in] pw
+ *  - a structure which contains facility type and password.
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par
+ *
+ * @pre
+ *
+ * @post
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ *
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_disable_sim_facility(TapiHandle *handle, TelSimFacilityPw_t *pw, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This API is used to enable the SIM facility.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param[in] pw
+ *  - a structure which contains facility type and password.
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par
+ *
+ * @pre
+ *
+ * @post
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ *
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_enable_sim_facility(TapiHandle *handle, TelSimFacilityPw_t *pw, tapi_response_cb callback, void *user_data);
+
+
+/**
+ * @brief  This API is used to get the SIM facility.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param[in] type
+ *  - type of security lock type enum values.
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par
+ *
+ * @pre
+ *
+ * @post
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ *
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_facility(TapiHandle *handle, TelSimLockType_t type, tapi_response_cb callback, void *user_data);
+
+/**
+ * @brief  This API is used to get the SIM LOCK TYPE info.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param[in] type
+ *  - type of security lock type enum values.
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par
+ *
+ * @pre
+ *
+ * @post
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ *
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_lock_info(TapiHandle *handle, TelSimLockType_t type, tapi_response_cb 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.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param[in] apdu_data
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_SIM_APDU_CNF  and the event data is #TelSimApduResp_t.
+ * Asynchronous return status is indicated by #TelSimAccessResult_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code =0;
+ * int request_id = 0;
+ * TelSimApdu_t apdu = {0,};
+ * int tmp_apdu[5] = {0xa,5,6,7,8};
+ * apdu.apdu_len = 5; //user should check
+ * apdu.apdu = apdu;
+ *
+ * // REQUEST SIM ACCESS
+ * err_code = tel_req_sim_apdu((const TelSimRSimReq_t*)&rsim, &request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_req_sim_apdu(TapiHandle *handle, TelSimApdu_t* apdu_data, tapi_response_cb callback, void *user_data);
+
+
+/**
+ * @brief  This function provides common interface to get SIM ATR(Answer To Reset) value.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns 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.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @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.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_SIM_ATR_CNF  and the event data is #TelSimAtrResp_t.
+ * Asynchronous return status is indicated by #TelSimAccessResult_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code =0;
+ * int request_id = 0;
+ *
+ * // REQUEST SIM ATR
+ * err_code = tel_req_sim_atr(&request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_req_sim_atr(TapiHandle *handle, tapi_response_cb callback, void *user_data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ITAPI_SIM_H_ */
+
+/**
+* @}
+*/
diff --git a/include/ITapiSs.h b/include/ITapiSs.h
new file mode 100644 (file)
index 0000000..bcd00c6
--- /dev/null
@@ -0,0 +1,1002 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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.
+ */
+
+/**
+* @open
+* @ingroup             TelephonyAPI
+* @addtogroup  SS_TAPI         SS(Supplementary services)
+* @{
+*
+* @file ITapiSs.h
+
+     @brief This file serves as a "C" header file defines functions for Tapi Supplementary services\n
+      It contains a sample set of function prototypes that would be required by applications.
+ */
+
+#ifndef _ITAPI_SS_H_
+#define _ITAPI_SS_H_
+
+#include <tapi_common.h>
+#include <TelSs.h>
+#include <TelDefines.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ /**
+ * @brief  This function sends a request to activate/deactivate call barring.
+ *
+ *  This service makes it possible for 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 call this function with wrong password 3 times subsequently, the barring service can be blocked.
+ * If this function is called normally, the asynchronous response comes in a few second from network. The response indicates
+ * the service request has been granted or not.
+ *
+ * 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 Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+  *
+ * @param [in] info
+ *   - Contains the information about call barring
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ *  An asynchronous notification event is returned as a confirmation
+ *  The event associated is TAPI_EVENT_SS_BARRING_CNF and asynchronous return status is indicated by #TelSsCause_t.
+ *  The event data is #TelSsBarringStatusInfo_t. \n
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *
+ * @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.
+ *
+ * \see tel_get_ss_barring_status, tel_change_ss_barring_password
+ *
+ * @code
+ * #include<ITapiSS.h>
+ *
+ * int ret_status = -1;
+ * TelSsCallBarringInfo_t  pBarringInfo;// = {0,};
+ * int pRequestId=0;
+ * char bar_pwd[5]="0000";
+ *
+ * pBarringInfo.Mode = TAPI_SS_CALL_BAR_ACTIVATE;
+ * pBarringInfo.Type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;
+ * pBarringInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
+ * strcpy(pBarringInfo.szPassword,bar_pwd);
+ * ret_status = tel_set_ss_barring (&pBarringInfo,&pRequestId);
+ * @endcode
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+ /*================================================================================================*/
+int tel_set_ss_barring(TapiHandle *handle, TelSsBarringInfo_t *info, tapi_response_cb callback, void *user_data);
+
+/**
+ *
+ * @brief  This function gets call barring status.
+ *
+ * The mobile subscriber may determine by subscription of a set of one or more unique barring
+ * programs what kind of outgoing or incoming calls should be barred.
+ * If this function is called normally, the asynchronous response comes in a few second from network.
+ * The response indicates the service status.
+ *
+ * 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 Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param [in] ss_class
+ *   - Specifies the type of call i.e. Voice call, Video Call etc.
+ *
+ * @param [in] type
+ *   - Specifies barring type i.e. Outgoing international, outgoing all, Incoming all etc.
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_SS_BARRING_QUERYSTATUS_CNF and asynchronous return status is indicated by #TelSsCause_t.
+ *  The event data is #TelSsBarringStatusInfo_t.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (#TapiResult_t) \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.
+ *
+ * \see tel_set_ss_barring, tel_change_ss_barring_password
+ *
+ * @code
+ * #include<ITapiSS.h>
+ *
+ * int ret_status;
+ * TelSsCallBarType_t BarType =TAPI_CALL_BARRING_ALL_OUTGOING_INTERN_CALL;
+ * TelSsCallType_t CallType = TAPI_CALL_TYPE_VOICE_EV;
+ * int pRequestId=0;
+ *
+ * ret_status = tel_get_ss_barring_status(BarType,CallType,&pRequestId); // get barring status
+ * printf ("The return value is %d\n", ret_status);
+ *
+ * @endcode
+ *
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_ss_barring_status(TapiHandle *handle, TelSsClass_t ss_class, TelSsBarringType_t type, tapi_response_cb callback, void *user_data);
+
+ /**
+ *
+ * @brief  This function allows changing of the barring password in Network.
+ *
+ * User can request network to change his own barring password. If the old password is not same with
+ * what network knows, it will be rejected by network. Also new password should be same with another new password
+ * which is to confirm user input. Otherwise the request must be rejected by Telephony Sever.
+ * If the user call this function with 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 second from network.
+ * The response indicates the service request has been granted or not.
+ *
+ * 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 Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - 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.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param [in] old_password
+ *   - Old password set for Barring in Network. This is Null terminated string
+ *
+ * @param [in] new_password
+ *   - New password for Barring to be set in Network. This is Null terminated string.
+ *
+ * @param [in] new_password_again
+ *   - New password again. This is Null terminated string.
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_SS_BARRING_CHANGEPASS_CNF and asynchronous return status is indicated by #TelSsCause_t.
+ *  There is no event data with this event.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *
+ * @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.
+ *
+ * @see
+ * - None
+ *
+ * @code
+ * #include<ITapiSS.h>
+ *
+ * int ret_status;
+ * int pRequestId=0;
+ *
+ * ret_status = tel_change_ss_barring_password ("0000","0000","0000",&pRequestId); // change barring password
+ *
+ * @endcode
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+/*================================================================================================*/
+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  This function allows to set (register/erase/activate/deactivate) call forwarding option at the Network.
+ *
+ * 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 meet
+ * various call FORWARD condition 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 under this call forward condition.
+ * Application has to call this API in order to explicitly register/erase/activate/deactivate
+ * the call forwarding. Request will be passed irrespective of whether already
+ * another SS call forward is ongoing.
+ *
+ * If this function is called normally, the asynchronous response comes in a few second from network. The response indicates
+ * the service request has been granted or not.
+ *
+ * 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 Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param [in] info
+ *   - Contains the Call forward information like forward mode, forward type, etc.
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_SS_FORWARD_CNF and asynchronous return status is indicated by #TelSsCause_t.
+ *  The event data will be #TelSsForwardingStatusInfo_t.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *
+ * @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.
+ *
+ *
+ * \image html CallForward.jpg
+ * \image latex CallForward.jpg
+ *
+ * \see tel_get_ss_forward_status
+ *
+ * @code
+ * #include<ITapiSS.h>
+ *
+ * int ret_status =0;
+ * int pRequestId=0;
+ * TelSsForwardInfo_t pForwardInfo;
+ * pForwardInfo.Mode =TAPI_CALL_FORWARD_MODE_ENABLE_EV;
+ * pForwardInfo.Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
+ * pForwardInfo.Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+ * pForwardInfo.NoReplyConditionTimer = 10;
+ * int len;
+ * char cf_number[20]= {"9986529874"};//number to which calles need to be forwarded.
+ *
+ * len = strlen(cf_number);
+ * printf("Length of CF number :%d \n",len);
+ * memcpy(&(pForwardInfo.szPhoneNumber),cf_number,len);
+ *
+ * ret_status = tel_set_ss_forward (&pForwardInfo,&pRequestId);
+ *
+ * @endcode
+ * @remarks
+ * - None
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_set_ss_forward(TapiHandle *handle, const TelSsForwardInfo_t *info, tapi_response_cb callback, void *user_data);
+
+ /**
+ *
+ * @brief  This function provides option to get the call forwarding status of different calls from Network.
+ *
+ * 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:
+ * -   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 whether or not it is active and operative,
+ *     and the associated forwarded-to numbers
+ * -   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 whether or not it is active and operative for that Basic service group.
+ *     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 second from network.
+ * The response indicates the service status.
+ *
+ * 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 Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param [in] ss_class
+ *   - Specifying the Forward call type i.e. voice call, Video Call, Data Calls etc.
+ *
+ * @param [in] condition
+ *   - Used to specify the forward condition i.e. unconditional, When no reply, when busy, when not reachable etc.
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_SS_FORWARD_QUERYSTATUS_CNF  and asynchronous return status is indicated by #TelSsCause_t.
+ *  The event data is #TelSsForwardingStatusInfo_t.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *
+ * @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.
+ *
+ * \see tel_set_ss_forward
+ *
+ * @code
+ * #include<ITapiSS.h>
+ * int  ret_status = 0;
+ * TelSsForwardType_t Type =TAPI_CS_FORWARD_TYPE_VOICE_EV;
+ * TelSsForwardWhen_t  Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+ * int pRequestId=0;
+ *
+ * ret_status = tel_get_ss_forward_status(Type,Condition,&pRequestId); // get forward status
+ *
+ * @endcode
+ * @remarks
+ * - None
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_ss_forward_status(TapiHandle *handle, TelSsClass_t ss_class, TelSsForwardWhen_t condition, tapi_response_cb callback, void *user_data);
+
+ /**
+ *
+ * @brief  This function activates/deactivates the call waiting service.
+ * 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 second from network. The response indicates
+ * the service request has been granted or not.
+ *
+ * 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 Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param [in] info
+ *   - Specifies the status of call-waiting service i.e. On (TRUE) or off (FALSE)
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_SS_WAITING_CNF and asynchronous return status is indicated by #TelSsCause_t.
+ *  The event data is #TelSsWaitingStatusInfo_t.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *
+ * @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.
+ *
+ * \see tel_get_ss_waiting_status
+ *
+ * @code
+ * #include<ITapiSS.h>
+ *
+ * int   ret_status;
+ * TelSsWaitingInfo_t waitInfo;
+ * waitInfo.Mode = TAPI_SS_CW_ACTIVATE;
+ * waitInfo.CallType =TAPI_CALL_TYPE_VOICE_EV;
+ * int RequestID;
+ *
+ * ret_status = tel_set_ss_waiting (&waitInfo,&RequestID); // set call waiting
+ * @endcode
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_set_ss_waiting(TapiHandle *handle, const TelSsWaitingInfo_t *info, tapi_response_cb callback, void *user_data);
+
+ /**
+ *
+ * @brief  This function queries the status of call waiting service.
+ *
+ * @par Notes:
+ * 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 second from network.
+ * The response indicates the service status.
+ *
+ * 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 Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param [in] ss_class
+ *   - enum data defines call type
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_SS_WAITING_QUERYSTATUS_CNF and asynchronous return status is indicated by #TelSsCause_t.
+ *  The event data is #TelSsWaitingInfo_t.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *
+ * @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.
+ *
+ * \see tel_set_ss_waiting
+ * @code
+ * #include<ITapiSS.h>
+ *
+ * int   ret_status;
+ * TelSsCallType_t CallType = TAPI_CALL_TYPE_VOICE_EV;
+ * int RequestID;
+ *
+ * ret_status = tel_get_ss_waiting_status ( CallType,&RequestID); // get call waiting info
+ * @endcode
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_ss_waiting_status(TapiHandle *handle, const TelSsClass_t ss_class, tapi_response_cb callback, void *user_data);
+
+ /**
+ *
+ * @brief  This function queries the status of calling line identity service.
+ *
+ * @par Notes:
+ * The group of Line Identification Supplementary Services is divided into the following six Supplementary Services:
+ * CLIP - Calling line identification presentation
+ *        This Supplementary Service provides for 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.
+ * CLIR - Calling line identification restriction
+ *       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.
+ * COLP - Connected line identification presentation
+ *        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.
+ * COLR - Connected line identification restriction
+ *        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.
+ * CDIP - Called line identification presentation
+ * CNAP - Calling name presentation
+ * This function queries the service status with #TelSsCliType_t
+ *
+ * If this function is called normally, the asynchronous response comes in a few second from network.
+ * The response indicates the service status.
+ *
+ * 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 Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param [in] type
+ *   - enum data defines Cli service type
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_SS_CLI_QUERYSTATUS_CNF and asynchronous return status is indicated by #TelSsCause_t.
+ *  The event data is #TelCliStatusInfo_t.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *
+ * @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.
+ *
+ * @code
+ * #include<ITapiSS.h>
+ *
+ * int  ret_status = 0;
+ * TelSsCliType_t CliType =TAPI_SS_CLI_CDIP;
+ * int pRequestId;
+ *
+ * ret_status = tel_get_ss_cli_status(CliType,&pRequestId); // get cli info
+ * @endcode
+ *
+ * @see
+ * - None
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_ss_cli_status(TapiHandle *handle, TelSsCliType_t type, tapi_response_cb callback, void *user_data);
+
+ /**
+ *
+ * @brief  This function is used to send a USSD string or User response to the Network.
+ *
+ * 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 to intermediate network entities.
+ * The mechanism allows development of PLMN specific supplementary services.
+ * USSD string is like *109, *109*72348937857623#.
+ * There are two modes of USSD: MMI-mode and application mode.
+ * 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.
+ * Application mode USSD is for the transparent transport of data between the network and the UE.
+ * Application mode USSD is intended to be used by applications in the network and their peer applications in the UE.
+ * The peer application in the UE send response with #tel_send_ss_ussd_response
+ *
+ * If this function is called normally, the asynchronous response comes in a few second from the telephony server.
+ * The response indicates whether the sending request is successfully delivered or not.
+ *
+ * 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 Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param [in] info
+ *   - 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 callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_SS_USSD_CNF and asynchronous return status is indicated by #TelSsCause_t. The event data
+ *  is #TelSsUssdMsgInfo_t.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *  - No SS and USSD Transaction should be ongoing. If there an ongoing transaction, new USSD request will be returned to the Application
+ *   with an error (USSD_BUSY)
+ *
+ * @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.
+ *
+ * \see #tel_send_ss_ussd_response, #tel_send_ss_ussd_cancel
+ *
+ *\image html ussd.jpg
+ *\image latex ussd.jpg
+ *
+ * @code
+ * #include<ITapiSS.h>
+ *
+ * char ussdString[TAPI_SS_USSD_DATA_SIZE_MAX];
+ * int  ret;
+ *
+ * memset(ussdString, 0, TAPI_SS_USSD_DATA_SIZE_MAX);
+ * strcpy(ussdString , "*124#");
+ *
+ * ret = tel_send_ss_ussd_request(ussdString, &request_id); // request ussd
+ * @endcode
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_send_ss_ussd_request(TapiHandle *handle, const TelSsUssdMsgInfo_t *info, tapi_response_cb callback, void *user_data);
+
+ /**
+ *
+ * @brief  This function is used to Read AOC parameter values on the SIM.
+ *
+ * @par Notes
+ * This supplementary service provides the MS with the information to produce an estimate
+ * of the cost of the service used. Charges are indicated for the call(s) in progress
+ * when mobile originated or for the roaming leg only when mobile terminated.
+ * Any charges for non-call related transactions, and for certain supplementary services,
+ * such as Call Forwarding are not indicated.
+ * The MS will receive at the beginning of each call (and as necessary during the call)
+ * a message, the Charge Advice Information. This message contains the elements which together define
+ * the rate at which the call is to be charged, time dependence,
+ * data dependence and for unit increments - see TS 22.024 [3].
+ * The MS shall still indicate appropriate charges even when roaming, based on Home PLMN units.
+ * Where applicable, the volume charge for Packet data service,
+ * in addition to the normal time dependent and incremental charges, shall be indicated.
+ * To indicate the charge per call the Mobile station shall display the units consumed
+ * so far during the present call(s) and maintain this value until the MS is switched off or a new call set-up is attempted.
+ * Where required to indicate the total accumulated charge, the MS shall be able to display,
+ * and the SIM/USIM shall store in the ACM, the running cumulative unit charge.
+ * This value must be stored securely, and all reasonable steps shall be taken to ensure that
+ * the written value cannot be interrupted, reset or corrupted (except resetting under control of the unblocking key).
+ * This function get the AOC configuration information from PLMN
+ *
+ * If this function is called normally, the asynchronous response comes in a few second from Telephony Server.
+ * The response indicates whether the query is delivered successfully to network or not.
+ *
+ * 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 being delivered asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param [in] AocType
+ *   - Specifies which type of Advice of charge information to be read namely Maximum ACM,
+ *     Price per unit currency, Current call meter and Accumulated call meter values.
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_SS_AOC_RSP and asynchronous return status is indicated by #TelSsCause_t. The event data
+ *  is #TelCallAocInfo_t.
+ *
+ * @pre
+ *  - Advice of charge depends on the SIM for setting or reading AOC parameters.
+ *  - Setting of AOC needs PIN2 Verification
+ *
+ * @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.
+ *
+ * \see tel_set_ss_aoc_info
+ *
+ *\image html ussd.jpg
+ *\image latex ussd.jpg
+ * @code
+ * #include<ITapiSS.h>
+ *
+ * TelSsAocType_t AocType = TAPI_SS_AOC_TYPE_ACM;
+ * ret_status = tel_get_ss_aoc_info (AocType,&pRequestId); // get AOC info
+ * @endcode
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_ss_aoc_info(TapiHandle *handle, TelSsAocType_t AocType, tapi_response_cb callback, void *user_data);
+
+ /**
+ *
+ * @brief  This function is used to Read AOC parameter values on the SIM.
+ *
+ * @par Notes:
+ * Refer #tel_get_ss_aoc_info
+ *
+ * If this function is called normally, the asynchronous response comes in a few second from Telephony Server.
+ * The response indicates whether the query is delivered successfully to network or not.
+ *
+ * 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 being delivered asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] handle
+ * - handle from tel_init().
+ *
+ * @param [in] AocSetInfo
+ *   - Specifies which type of Advice of charge information to be set namely Maximum ACM,
+ *     Price per unit currency, Current call meter and Accumulated call meter values.
+ *
+ * @param [in] callback
+ * - To register callback function for result.
+ *
+ * @param [in] user_data
+ * - user_data for user specification.
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_SS_SET_AOC_CNF and asynchronous return status is indicated by #TelSsCause_t. The event data
+ *  is #TelSsErrorInfo_t.
+ *
+ * @pre
+ *  - Advice of charge depends on the SIM for setting or reading AOC parameters.
+ *  - Setting of AOC needs PIN2 Verification
+ *
+ * @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.
+ *
+ * \see tel_get_ss_aoc_info
+ *
+ *\image html ussd.jpg
+ *\image latex ussd.jpg
+ * @code
+ * #include<ITapiSS.h>
+ *
+ * TelCallAocInfo_t  *pAocSetInfo;
+ * int request_id=0;
+ * pAocSetInfo = (TelCallAocInfo_t *)calloc(1,sizeof(TelCallAocInfo_t));
+ * pAocSetInfo->AocType = TAPI_SS_AOC_TYPE_RESET;
+ * int ret_status =0;
+ *
+ * ret = tel_set_ss_aoc_info (pAocSetInfo,&request_id); // set aoc info
+ * @endcode
+ *
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_set_ss_aoc_info(TapiHandle *handle, TelCallAocInfo_t *AocSetInfo, tapi_response_cb callback, void *user_data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ITAPI_SS_H_ */
+
+/**
+* @}
+*/
diff --git a/include/SLP_TelephonyFW_PG.h b/include/SLP_TelephonyFW_PG.h
new file mode 100644 (file)
index 0000000..0d0ea5a
--- /dev/null
@@ -0,0 +1,9600 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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.
+ */
+
+/**
+ * @ingroup   SLP_PG
+ * @defgroup   TELEPHONY Telephony
+@{
+
+<h1 class="pg">Introduction</h1>
+       <h2 class="pg">Purpose</h2>
+The purpose of this document is to describe how applications can use Telephony Framework APIs. This document gives programming guidelines to application engineers.
+
+       <h2 class="pg">Scope</h2>
+The scope of this document is limited to Samsung Linux platform Telephony Framework API usage.
+
+       <h2 class="pg">Abbreviations</h2>
+<table>
+<tr><td>OEM</td><td>Original Equipment Manufacturer</td></tr>
+<tr><td>RPC</td><td>Remote Procedure Call</td></tr>
+<tr><td>SAP</td><td>Sim Access Profile</td></tr>
+<tr><td>SAT</td><td>SIM Application Toolkit</td></tr>
+<tr><td>SIM</td><td>Subscriber Identity Module</td></tr>
+<tr><td>SVC</td><td>Service</td></tr>
+<tr><td>TAPI</td><td>Telephony API</td></tr>
+<tr><td>EFL</td><td>Enlightenment Foundation Libraries</td></tr>
+</table>
+
+       <h2 class="pg">Restriction Modules</h2>
+CALL, SMS, GPRS, SAT have the permission. Refer to each module API description
+@}
+@defgroup Telephony_Architecture 1.Architecture
+@ingroup TELEPHONY
+@{
+<h1 class="pg">Telephony Framework Architecture</h1>
+@image html SLP_TelephonyFW_PG_image001.png
+
+@image html SLP_TelephonyFW_PG_image002.png System Architecture of Telephony Framework
+
+Telephony is a middleware component which acts as an interface layer between applications and the OEM.
+@n Telephony Framework provides interfaces to applications in the form of a library and to the OEM providers in the form of OEM plug-in.
+@n The applications make use of the library of exported APIs, which uses a RPC mechanism for making telephony service requests.
+@n On the other side, OEM-Plug-in library is the OEM layer, which is the wireless protocol stack specific implementation. This layer acts as a plug-in giving flexibility for any wireless protocol stack to be used avoiding any changes to be made in the Telephony clients.
+@n Telephony has certain synchronous and asynchronous exported APIs. Synchronous APIs provide data as the function parameter passed to Telephony. Asynchronous APIs provide data using an event based mechanism.
+@image html SLP_TelephonyFW_PG_image003.png Asynchronous service request (response Use-Case Diagram)
+@image html SLP_TelephonyFW_PG_image003.png Synchronous service request (response Use-Case Diagram)
+@}
+@defgroup Telephony_Feature 2.SubModules & Services
+@ingroup TELEPHONY
+@{
+
+<h1 class="pg">Telephony Framework SubModules & Services</h1>
+       <h2 class="pg">Call & Call-dependent SS</h2>
+       Also see Use Cases of @ref Use_Cases2_CALL
+- Initiate, accept, reject and end calls.
+- Call supplementary service ( Hold,CLI, Multiparty, Call Waiting, Forwarding, Barring)
+- Get Call Time, Status, Duration, Conference List
+- Get and Set Active Line
+- Retrieve, swap, and transfer call.
+- For CDMA
+       - Call Flash Information
+       - Get and Set voice privacy mode
+
+       <h2 class="pg">SMS</h2>
+       Also see Use Cases of @ref Use_Cases4_SMS
+SMS service in Telephony Framework only provides the interface to the modem and doesn’t handle Transport layer, storing and deleting the SMS in the storage except SIM. We recommend you use MAPI of Message Framework.
+- 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
+
+       <h2 class="pg">Supplementary Service</h2>
+- Interrogation and activation for Call Barring, forwarding and waiting.
+- USSD services, AOC Services.
+
+       <h2 class="pg">Network Registration/Configuration</h2>
+- Search and Select Network.
+- Set and Get Selection Mode, Service Domain, network Mode and Band.
+- Get Network information.
+- For CDMA
+       - Get and Set CDMA Hybrid Mode
+       - Get and Set Roaming Mode, Preferred PLMN
+
+       <h2 class="pg">SIM</h2>
+- Handling SIM security procedure (PIN, PUK).
+- Get / Update / Delete SIM EF files.
+- Support 2G/3G Phonebook data.
+- SIM Lock Personalisation enable or disable
+- SIM lock enable or disable
+- SAP
+
+       <h2 class="pg">SAT (SIM Application Tool Kit)</h2>
+- 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 to applications
+- Send UI / User confirmation to the SIM application
+
+       <h2 class="pg">Sound</h2>
+Sound that is related with voice call is used to control modem configuration
+- Sound user configuration
+- Voice path control
+- Volume control
+- Mic mute control
+
+       <h2 class="pg">Common</h2>
+
+- TAPI initialization & De-initialization
+- Register, Deregister event
+- TAPI Initialization & De-initialization for Ecore
+- Register, Deregister Ecore event
+- Request Connection name
+
+@}
+
+<h1 class="pg">Feature Description</h1>
+<h2 class="pg">COMMON</h2>
+
+@defgroup Use_Cases1_1 TAPI Initialization
+@ingroup Use_Cases1_COMMON
+@{
+<h3 class="pg">TAPI Initialization</h3>
+This API shall be used to initialize the TAPI library. This API internally performs initialization routines related to Event delivery.
+@n This API should be called before any other TAPI APIs. This API should be used by GTK/Glib applications.
+
+@code
+int tel_init (void);
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+
+void tapiinit()
+{
+       int api_err;
+
+       api_err = tel_init();
+       if (api_err != TAPI_API_SUCCESS)
+       {
+               printf ("tel_init Failed - api_err = %d\n", api_err);
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases1_2 TAPI De-initialization
+@ingroup Use_Cases1_COMMON
+@{
+               <h3 class="pg">TAPI De-initialization</h3>
+This API shall be used to de initialize the Tapi library.
+@n It shall perform the deinitializing routines related to event delivery.
+@n The API shall be called finally, as a part of clean up routines. This API should be used by GTK/Glib applications.
+
+@code
+int tel_deinit (void);
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+
+void tapideinit()
+{
+       int api_err;
+
+       api_err = tel_deinit();
+       if (api_err != TAPI_API_SUCCESS)
+       {
+               printf ("tel_deinit Failed - api_err = %d\n", api_err);
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases1_3 Register Event
+@ingroup Use_Cases1_COMMON
+@{
+
+               <h3 class="pg">Register Event</h3>
+API is used to register the callback function for a specific TAPI Event. Upon successful registration of the event, the function shall return a valid subscription id.
+
+If Application registers multiple callbacks for a specific event, then all the callbacks will be called when an event indication is received.
+@n This API should be used by GTK/Glib applications.
+
+@code
+int tel_register_event (int EventType , unsigned int * SubscriptionId, TelAppCallback AppCallBack);
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+
+void app_callback(TelTapiEvent_t *event);
+
+// REGISTER EVENT
+void registerevent()
+{
+       unsigned int subscription_id = 0;
+       int api_err;
+
+       api_err = tel_init();
+       if (api_err != TAPI_API_SUCCESS)
+       {
+               printf ("tel_init Failed - api_err = %d\n", api_err);
+       }
+
+       api_err = tel_register_event (TAPI_EVENT_CALL_SETUP_CNF, &subscription_id, (TelAppCallback)&app_callback);
+
+       printf("MISC Event registeration is Done: sub id is %d, api_err is %d\n", subscription_id, api_err);
+
+       tel_register_app_name("com.samsung.appname");
+}
+
+void app_callback(TelTapiEvent_t *event)
+{
+       //Callback function to be called
+}
+@endcode
+@}
+
+@defgroup Use_Cases1_4 Deregister Event
+@ingroup Use_Cases1_COMMON
+@{
+
+               <h3 class="pg">Deregister Event</h3>
+API shall de-register the pre-registered TAPI event and the associated application callback, based on the subscription id.
+@n This identifier is the same as the subscription identifier returned to the application during the TAPI registration procedure. If the de-register API is called during any service requests, the registered callback will be cleared based on the subscription id. No application callback shall be called when any confirmation/indication events are received after de-registration.
+@n This API should be used by GTK/Glib applications.
+
+@code
+int tel_deregister_event ( unsigned int  SubscriptionId);
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+
+void app_callback(TelTapiEvent_t *event);
+
+void registerevent()
+{
+       unsigned int subscription_id = 0;
+       int api_err;
+
+       api_err = tel_init();
+       if (api_err != TAPI_API_SUCCESS)
+       {
+               printf ("tel_deregister_event Failed - api_err = %d\n", api_err);
+       }
+
+       // REGISTER EVENT
+       api_err = tel_register_event (TAPI_EVENT_CALL_SETUP_CNF, &subscription_id, (TelAppCallback)&app_callback);
+       printf("MISC Event registeration is Done: sub id is %d, api_err is %d\n",subscription_id,api_err);
+
+       tel_register_app_name("com.samsung.appname");
+
+       // DEREGISTER EVENT
+       api_err = tel_deregister_event (subscription_id);
+       if (api_err != TAPI_API_SUCCESS)
+       {
+               printf("Event Deregistration Failed\n");
+       }
+}
+
+void app_callback(TelTapiEvent_t *event)
+{
+       // callback function to be called
+}
+@endcode
+@}
+
+
+@defgroup Use_Cases1_5 TAPI Ecore Initialization
+@ingroup Use_Cases1_COMMON
+@{
+
+       <h3 class="pg">TAPI Ecore Initialization</h3>
+This API shall be used by Ecore based applications, to initialize TAPI library. This API internally performs event delivery related initialization routines. This API shall be called before any other TAPI APIs.
+@n This API is for applications using Ecore library.
+
+@code
+int tel_init_ecore_loop (void);
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+
+void tapiinitecore()
+{
+       int api_err;
+
+       api_err = tel_init_ecore_loop();
+       if (api_err != TAPI_API_SUCCESS)
+       {
+               printf("tel_init_ecore_loop Failed - api_err = %d\n", api_err);
+       }
+}
+@endcode
+
+5              <h3 class="pg">TAPI Ecore De-Initialization</h3>
+API shall be used to de-initialize the TAPI library. It shall be used by Ecore based applications.
+@n This API shall be called finally, as a part of cleanup routine. This API is for applications using Ecore library.
+
+@code
+int tel_deinit_ecore_loop (void);
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+
+void tapideinitecore()
+{
+       int api_err;
+
+       api_err = tel_deinit_ecore_loop();
+       if (api_err != TAPI_API_SUCCESS)
+       {
+               printf("tel_deinit_ecore_loop Failed - api_err = %d\n", api_err);
+       }
+}
+@endcode
+@}
+
+@defgroup Use_Cases1_6 TAPI RegisterEvent Ecore
+@ingroup Use_Cases1_COMMON
+@{
+
+               <h3 class="pg">TAPI RegisterEvent Ecore</h3>
+API shall be used to register for TAPI events (for application that use EFL).
+@n Upon successful registration of the event, the API shall return a valid subscription id.
+@n If Application registers multiple callbacks for a specific event, then all the callbacks will be called when an event indication is received
+@n This API is for applications using Ecore library.
+
+@code
+int tel_register_event_at_ecore_loop(int EventType, unsigned int * SubscriptionId, TelAppCallback AppCallBack);
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+
+void app_callback(TelTapiEvent_t *event);
+
+void registereventecore()
+{
+       int api_err;
+       unsigned int subscription_id = 0;
+
+       api_err = tel_register_event_at_ecore_loop (TAPI_EVENT_CALL_SETUP_CNF, &subscription_id, (TellAppCallback)&app_callback);
+       if (api_err != TAPI_API_SUCCESS)
+       {
+               printf ("tel_register_event_at_ecore_loop Failed - api_err = %d \n", api_err);
+       }
+       printf("RegisterEventEcore done with subscription_id:%d and return Status:%d\n", subscription_id, api_err);
+
+       tel_register_app_name("com.samsung.appname");
+}
+
+void app_callback(TelTapiEvent_t *event)
+{
+       //Callback function to be called
+}
+@endcode
+@}
+
+
+@defgroup Use_Cases1_7 TAPI DeRegisterEvent Ecore
+@ingroup Use_Cases1_COMMON
+@{
+
+       <h3 class="pg">TAPI DeRegisterEvent Ecore</h3>
+API shall de-register the pre-registered TAPI event and the associated application callback, based on the subscription id.
+@n This identifier is the same as the subscription identifier returned to the application during the TAPI registration procedure.
+@n If the de-register API is called during any service requests, the registered callback will be cleared based on the subscription id. No application callback shall be called when any confirmation/indication events are received after de-registration.
+@n This API is for applications based on Ecore library.
+
+@code
+int tel_deregister_event_at_ecore_loop (unsigned int SubscriptionId);
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+
+Void deregistereventecore()
+{
+       int api_err;
+       unsigned int subscription_id = 0;
+
+       // REGISTER EVENT
+       api_err = tel_register_event_at_ecore_loop (TAPI_EVENT_CALL_SETUP_CNF, &subscription_id, (TellAppCallback)&app_callback);
+       printf("RegisterEventEcore done with subscription_id:%d and return Status:%d\n", subscription_id, api_err);
+
+       tel_register_app_name("com.samsung.appname");
+
+       // DEREGISTER EVENT
+       api_err = tel_deregister_event_at_ecore_loop (subscription_id);
+       if (api_err != TAPI_API_SUCCESS)
+       {
+               printf("tel_deregister_event_at_ecore_loop Failed - api_err = %d\n", api_err);
+       }
+}
+@endcode
+@}
+
+@defgroup Use_Cases1_8 Register Application Name
+@ingroup Use_Cases1_COMMON
+@{
+
+               <h3 class="pg">Register Application Name</h3>
+This function registers the application name which requests any telephony service. Telephony Server uses this name as the destination name of response message upon the service request. If the name is not set, the request will fails. Before an application invoke this function, it shall initialize a connection to Telephony Sever with #tel_init or #tel_init_ecore_loop. And the application name shall be registered prior to start a event loop.
+
+@code
+int tel_register_app_name(char *name)
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+
+Void register_app_name()
+{
+       tel_init();
+       //register telephony event
+       tel_register_event(...);
+       //...
+       tel_register_app_name("com.samsung.appname");
+       GMainLoop *loop = g_main_loop_new(NULL, false);
+       g_main_loop_run(loop);
+}
+@endcode
+@}
+
+@defgroup Use_Cases1_9 Get Application Name
+@ingroup Use_Cases1_COMMON
+@{
+
+               <h3 class="pg">Get Application Name</h3>
+This function get the application name which was registered with #tel_register_application_name.
+
+@code
+int tel_get_app_name(tapi_dbus_connection_name *app_name)
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+
+void get_app_name()
+{
+       tapi_dbus_connection_name app_name;
+       tel_get_app_name(&app_name);
+       printf("app_name = %s\n", app_name.name);
+}
+@endcode
+@}
+@defgroup Use_Cases1_10 TAPI Check service ready
+@ingroup Use_Cases1_COMMON
+@{
+
+       <h3 class="pg">TAPI Check service ready </h3>
+API is used to get the modem status i.e. whether modem is on or off.
+
+@code
+int tel_check_service_ready (int* bStatus)
+@endcode
+
+SAMPLE CODE:
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+
+void getmodemstatus()
+{
+       int bStatus = 0;
+       int err_code;
+
+       err_code = tel_check_service_ready(&bStatus);
+       if (err_code != TAPI_API_SUCCESS) {
+               printf("Error Code [%x]\n", err_code);
+       }
+       else {
+               if (bStatus == 0)
+                       printf("Telephony Service Not Ready";
+               else if (bStatus == 1)
+                       printf("Telephony Service Ready";
+       }
+}
+@endcode
+@}
+
+
+<h2 class="pg">CALL</h2>
+
+@defgroup Use_Cases2_1 Event Register and Deregister
+@ingroup Use_Cases2_CALL
+@{
+
+       <h3 class="pg">Event Register and Deregister</h3>
+To receive asynchronous event notifications for the call APIs, the registration of related events with their associated call backs is required. After these are registered, when an asynchronous API is called, the confirmation is returned as an asynchronous event notification which invokes the callback function along with the event data.
+
+SAMPLE CODE:
+@code
+// REGISTER EVENT
+int api_err;
+unsigned int subscription_id = 0;
+
+api_err = tel_init();
+if (api_err != TAPI_API_SUCCESS)
+{
+       printf("tel_init Failed - api_err = %d \n", api_err);
+}
+
+api_err = tel_register_event (TAPI_EVENT_CALL_CALL_SETUP_CNF, &subscription_id, (TelAppCallback)&app_callback);
+printf("VOICE CALL Event registration is Done: sub id is %d, api_err is %d\n",subscription_id,api_err);
+
+tel_register_app_name("com.samsung.appname");
+
+// DEREGISTER EVENT
+api_err = tel_deregister_event (subscription_id);
+if (api_err != TAPI_API_SUCCESS)
+{
+       printf("Event Class Unregistration Fail\n");
+}
+@endcode
+@}
+
+@defgroup Use_Cases2_2 Call Setup
+@ingroup Use_Cases2_CALL
+@{
+
+<h3 class="pg">Call Setup</h3>
+This API originates an MO call setup.
+
+@code
+int  tel_exe_call_mo _t (const TelCallSetupParams_t* const pParams, unsigned int  * pCallHandle, int * pRequestID);
+@endcode
+
+On success, this API returns a valid call handle and the request ID as out parameters.
+@n The MO call setup procedure continues in background. There are multiple states involved in the call setup procedure. Upon completion of the setup request, the event notifications and associated event data are sent to the client, based on the indication or response received by the Telephony Server.
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE:
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void callsetup()
+{
+       int ret_status;
+       int pRequestID = 0;
+       unsigned int pCallHandle;
+       TelCallSetupParams_t pParams;
+       char normal[16] = "1234"; //Called party number
+
+       memset(&pParams, 0, sizeof(TelCallSetupParams_t));
+       pParams.CallType = TAPI_CALL_TYPE_VOICE;
+       strcpy(pParams.szNumber, normal);
+
+       ret_status = tel_exe_call_mo (&pParams, &pCallHandle, &pRequestID);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status); //WAIT FOR EVENT HERE
+}
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       unsigned int temp_handle = 0;
+
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d]\n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_CALL_SETUP_CNF:
+                       printf("TAPI_EVENT_CALL_SETUP_CNF");
+                       memcpy(&temp_handle, EventData, sizeof(unsigned int));
+                       TEST_DEBUG("Received setup cnf for call Handle [%d]", temp_handle);
+
+                       break;
+
+               case TAPI_EVENT_CALL_ALERT_IND:
+                       int index;
+                       TEST_DEBUG("TAPI_EVENT_CALL_ALERT_IND");
+                       memcpy(&temp_handle, event->pData, sizeof(unsigned int));
+                       TEST_DEBUG("Received Alert for call Handle [%d]", temp_handle);
+                       break;
+
+               case TAPI_EVENT_CALL_CONNECTED_IND:
+                       int index;
+                       TEST_DEBUG("TAPI_EVENT_CALL_CONNECTED_IND");
+                       memcpy(&temp_handle, event->pData, sizeof(TS_UINT));
+                       TEST_DEBUG("Received Connected Event  for call Handle [%d]", temp_handle);
+                       break;
+       }
+       //...
+}
+@endcode
+@}
+@defgroup Use_Cases2_3 Call Answer
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Call Answer</h3>
+This API responds to an incoming call either by accepting or rejecting the call.
+
+Pre Conditions:
+@n Call associated with the call handle should be in TAPI_CALL_STATE_INCOM state.
+@n There should be no more than one existing call.
+
+@code
+int  tel_answer_call (unsigned int CallHandle,TelCallAnswerType_t AnsType, int * pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE:
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+
+void callsetup(unsigned int CallHandle)
+{
+       int ret_status;
+       int pRequestID = 0;
+
+       ret_status = tel_answer_call (CallHandle, &pRequestID);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status); //WAIT FOR EVENT HERE
+}
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       //..
+       switch (eventType) //REFER Call Setup TO GET eventType
+       {
+               //GET CALL HANDLE FROM INCOMING CALL EVENT DATA
+               case TAPI_EVENT_CALL_INCOM_IND:
+                       unsigned int CallHandle;
+                       TelCallIncomingCallInfo_t IncomingInfo;
+                       memcpy(&IncomingInfo, event->pData, sizeof(TelCallIncomingCallInfo_t));
+                       CallHandle = IncomingInfo.CallHandle;
+                       break;
+
+               case TAPI_EVENT_CALL_ANSWER_CNF:
+                       memcpy(&CallHandle, event->pData, sizeof(unsigned int));
+                       printf("TAPI_EVENT_CALL_ANSWER_CNF\n");
+                       break;
+       }
+       //..
+}
+@endcode
+@}
+@defgroup Use_Cases2_4 Call Release
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Call Release</h3>
+This API is used to release the call.
+@n The call to be released can be a single call based on the call handle, or all active calls or all calls.
+
+Pre Conditions:
+@n Call handle should be valid and there should be an existing call in Active/hold state.
+
+@code
+int tel_release_call (unsigned int  CallHandle, int * pRequestID);
+int tel_release_call_all (int * pRequestId);
+int tel_release_call_all_active (int *pRequestID);
+int tel_release_call_all_held (int *pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE:
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+
+void callrelease(unsigned int CallHandle)
+{
+       int ret_status;
+       int pRequestID = 0;
+
+       ret_status = tel_release_call (CallHandle, &pRequestID);
+       //OR
+       ret_status = tel_release_call_all (&pRequestID);
+       //OR
+       ret_status = tel_release_call_all_active (&pRequestID);
+       //OR
+       ret_status = tel_release_call_all_held (&pRequestID);
+
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+} //WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback(TelTapiEvent_t *event)
+{
+       //...
+       switch (eventType) //REFER Call Setup TO GET eventType
+       {
+               //GET CALL HANDLE FROM INCOMING CALL EVENT DATA
+               case TAPI_EVENT_CALL_INCOM_IND:
+                       TelCallIncomingCallInfo_t IncomingInfo;
+                       memcpy(&IncomingInfo, event->pData, sizeof(TelCallIncomingCallInfo_t));
+                       CallHandle = IncomingInfo.CallHandle;
+                       break;
+
+               case TAPI_EVENT_CALL_RELEASE_CNF:
+               case TAPI_EVENT_CALL_RELEASE_ALL_CNF:
+               case TAPI_EVENT_CALL_RELEASE_ALL_ACTIVE_CNF:
+               case TAPI_EVENT_CALL_RELEASE_ALL_HELD_CNF:
+               case TAPI_EVENT_CALL_END_IND_IND:
+                       unsigned int handle;
+                       memcpy(&handle, event->pData, sizeof(unsigned int));
+                       printf("TAPI_EVENT_CALL_RELEASE_CNF\n");
+                       break;
+                       //...
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases2_5 Call Hold
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Call Hold</h3>
+This API puts the specified call on hold. The call identified by Call Handle should be in the active state.
+
+@code
+int tel_hold_call (unsigned int CallHandle, int * pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void callhold(unsigned int CallHandle)
+{
+       int ret_status;
+       int pRequestID = 0;
+
+       ret_status = tel_hold_call(CallHandle, &pRequestID);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+} //WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       //..
+       switch (eventType) //REFER Call Setup TO GET eventType
+       {
+               case TAPI_EVENT_CALL_HOLD_CNF:
+                       unsigned int CallHandle;
+                       memcpy(&CallHandle, event->pData, sizeof(unsigned int));
+                       printf("TAPI_EVENT_CALL_HOLD_CNF\n");
+                       break;
+               //...
+       }
+       //...
+}
+@endcode
+@}
+@defgroup Use_Cases2_6  Call Retrieve
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Call Retrieve</h3>
+This API can be used to retrieve a held call.
+
+Pre Conditions:
+@n Call should be in held state in order to return to the active state, and no other call should be active.
+
+@code
+int tel_retrieve_call (unsigned int CallHandle, int * pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE:
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void callretrieve(unsigned int CallHandle)
+{
+       int ret_status;
+       int pRequestID=0;
+
+       ret_status = tel_retrieve_call(CallHandle, &pRequestID);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+} //WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback(TelTapiEvent_t *event)
+{
+       //..
+       switch (eventType) //REFER Call Setup TO GET eventType
+       {
+               case TAPI_EVENT_CALL_HOLD_CNF:
+                       unsigned int CallHandle;
+                       memcpy(&CallHandle, event->pData, sizeof(unsigned int));
+                       printf("TAPI_EVENT_CALL_HOLD_CNF\n");
+                       break;
+
+               case TAPI_EVENT_CALL_RETRIEVE_CNF:
+                       unsigned int CallHandle;
+                       memcpy(&CallHandle, event->pData, sizeof(unsigned int));
+                       printf("TAPI_EVENT_CALL_RETRIEVE_CNF ");
+                       break;
+       }
+       //...
+}
+//...
+@endcode
+@}
+@defgroup Use_Cases2_7  Call Swap
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Call Swap</h3>
+This API can be used to swap calls. This feature is only available for the calls that have been setup and answered using the Telephony service. The swap functionality is only available for voice calls.
+
+Pre Conditions:
+@n Two calls should be present, one of them in the Active state and the other in the held state
+
+@code
+int tel_swap_call (unsigned int CallHandle1, const TS_UINT CallHandle2, int * pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE:
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+
+void callswap(unsigned int CallHandle1, unsigned int CallHandle2)
+{
+       int ret_status;
+       int pRequestID = 0;
+
+       ret_status = tel_swap_call(CallHandle1, CallHandle2, &pRequestID);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //..
+} //WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       //..
+       switch (eventType) //REFER Call Setup TO GET eventType
+       {
+               case TAPI_EVENT_CALL_SWAP_CNF:
+                       printf("TAPI_EVENT_CALL_RETRIEVE_CNF\n");
+                       break;
+       }
+       //..
+}
+//..
+@endcode
+@}
+@defgroup Use_Cases2_8 Send DTMF
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Send DTMF</h3>
+This API can be used for sending one or more DTMF digits during the call.
+
+Pre Conditions:
+@n Active call should be present.
+
+@code
+int tel_send_call_dtmf (char const * const pDtmfString, int * pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE:
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void senddtmf()
+{
+       int ret_status;
+       int pRequestID = 0;
+       char DtmfString[10];
+
+       strcpy(DtmfString, "123456789"); //Sample DTMF digits that need to be sent
+
+       ret_status = tel_send_call_dtmf(DtmfString, &pRequestID);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+}
+//WAIT FOR EVENT HERE
+static void app_callback(TelTapiEvent_t *event)
+{
+       //..
+       switch (eventType) //REFER Call Setup TO GET eventType
+       {
+               case TAPI_EVENT_CALL_SEND_DTMF_CNF:
+                       printf("TAPI_EVENT_CALL_SEND_DTMF_CNF\n");
+                       break;
+       }
+       //..
+}
+@endcode
+@}
+@defgroup Use_Cases2_9 Call Join
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Call Join</h3>
+This API joins the specified two calls (one call which is in the active state and other call which is in the held state) into a conference call.
+
+Pre Conditions:
+@n For a Multiparty call or for joining two calls into conference, there should be one call in active state and another call in held state.
+
+@code
+int tel_join_call (unsigned int CallHandle1, const unsigned int CallHandle2,int * pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void calljoin(unsigned int CallHandle1, unsigned int CallHandle2)
+{
+       int ret_status;
+       int pRequestID = 0;
+
+       ret_status= tel_join_call(CallHandle1, CallHandle2, &pRequestID);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+} //WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       //..
+       switch (eventType) //REFER Call Setup TO GET eventType
+       {
+               case TAPI_EVENT_CALL_SETUPCONFERENCE_CNF:
+                       unsigned int temp_handle;
+                       memcpy(&temp_handle, event->pData, sizeof(unsigned int));
+                       printf("TAPI_EVENT_CALL_SETUPCONFERENCE_CNF ");
+                       break;
+       }
+       //..
+}
+@endcode
+@}
+@defgroup Use_Cases2_10 Call Split
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Call Split</h3>
+This API triggers the split of a single call from multiparty call. This can be used for creating a private communication with one of remote parties in a multiparty session.
+@n TAPI client application has to pass the call handle which should be split from the multiparty call.
+
+Pre Conditions:
+@n Call should be in multiparty conference call.
+
+Post Conditions:
+@n Split call will be the active call and the conference will be held call.
+
+@code
+int tel_split_call (unsigned int CallHandle, int * pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void callsplit(unsigned int CallHandle)
+{
+       int ret_status;
+       int pRequestID = 0;
+
+       ret_status = tel_split_call(CallHandle, &pRequestID);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+}//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       //..
+       switch (eventType) //REFER Call Setup TO GET eventType
+       {
+               case TAPI TAPI_EVENT_CALL_SPLITCONFERENCE_CNF:
+                       unsigned int temp_handle;
+                       memcpy(&temp_handle, event->pData, sizeof(unsigned int));
+                       printf("TAPI_EVENT_CALL_SPLITCONFERENCE_CNF ");
+                       break;
+       }
+       //..
+}
+@endcode
+@}
+@defgroup Use_Cases2_11 Active Line
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Active Line </h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+@n Telephony provides APIs for setting and getting the current calling line identification number.
+
+@code
+int tel_set_call_act_line const TelCallActiveLine_t active_line, int * pRequestID);
+int tel_get_call_act_line ( int * pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SET ACTIVE LINE
+void activeline()
+{
+       int ret_status;
+       int pRequestID = 0;
+       TelCallActiveLine_t g_curLine = TAPI_CALL_ACTIVE_LINE1;
+       TelCallActiveLine_t active_line;
+
+       printf (" Set Active Line with TAPI_ACTIVE_LINE1.");
+
+       ret_status = tel_set_call_act_line (g_curLine, &pRequestID);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+
+       //GET ACTIVE LINE
+       ret_status = tel_get_call_act_line (&pRequestID);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //..
+}
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       //..
+       switch (eventType) //REFER Call Setup TO GET eventType
+       {
+               case TAPI_EVENT_CALL_SET_LINEID_CNF:
+                       //TEST_DEBUG("Received TAPI_EVENT_CALL_SET_LINEID_CNF");
+                       //AUTO_LOG("EVENT: SET_LINEID_CNF:");
+                       break;
+
+               case TAPI_EVENT_CALL_GET_LINEID_CNF:
+                       TelCallActiveLine_t active_line;
+                       memcpy(&active_line, event->pData, sizeof(TelCallActiveLine_t));
+                       TEST_DEBUG("Received TAPI_EVENT_CALL_GET_LINEID_CNF");
+                       break;
+       }
+       //..
+}
+@endcode
+@}
+@defgroup Use_Cases2_12  Call transfer
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Call transfer</h3>
+This API triggers an explicit call transfer by connecting two parties, one of which is in the active state with the other in the held state.
+
+Pre Conditions:
+@n In order to call transfer, 2 calls should be present. One in the active state and the other in the Held state.
+
+Post Conditions:
+@n When the request has been completed successfully, Call end indication will be sent to both the calls (active and held).
+
+@code
+int tel_exe_call_explicit_transfer (unsigned int CallHandle, int * pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE:
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void calltransfer(unsigned int CallHandle)
+{
+       int ret_status;
+       int pRequestID = 0;
+
+       ret_status = tel_exe_call_explicit_transfer (CallHandle, &pRequestID);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+}//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       //..
+       switch (eventType) //REFER Call Setup TO GET eventType
+       {
+               case TAPI_EVENT_CALL_TRANSFER_CNF:
+                       unsigned int temp_handle = 0;
+                       memcpy(&temp_handle, event->pData, sizeof(unsigned int));
+                       printf("TAPI_EVENT_CALL_TRANSFER_CNF. ");
+                       break;
+       }
+       //..
+}
+@endcode
+@}
+@defgroup Use_Cases2_13 Get Call Status
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Get Call Status</h3>
+When call status is requested by the application, this API gets the status of the call associated with the input Call Handle. Call status information consists of destination number, call direction (MO or MT), call type (voice or data etc), multiparty state (whether the call is in conference state or not) and present call state.
+@n Call handle must be valid.
+
+@code
+int tel_get_call_status (unsigned int CallHandle, TelCallStatus_t * pCallStatus)
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+void getcallstatus(unsigned int CallHandle)
+{
+       int ret_status;
+       TelCallStatus_t callStatus;
+
+       ret_status = tel_get_call_status(CallHandle, &callStatus);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+               printf("CallNumber: %s\n", callStatus.pNumber);
+               printf("Is Mobile Originated:%d n\t CallType : %d \n\t CallActiveState: %d\n\t CallState : %d\n\t isConferenceState:%d \n",
+                               callStatus.bMoCall,
+                               callStatus.CallType,
+                               callStatus.CallActiveState,
+                               callStatus.CallState,
+                               callStatus.bConferenceState);
+       }
+       else {
+               printf("error=%d\n", ret_status);
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases2_14  Get Call Duration
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Get Call Duration</h3>
+This API gets the duration of the specified call.
+@n This is a synchronous API. Duration is timed from the moment the connection is established, i.e. call goes into active state for first time. The total call duration is provided in seconds, from the call connecting time to the current time.
+
+@code
+int tel_get_call_duration unsigned int CallHandle, unsigned int * pDurationInSecs);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+void getcallduration(unsigned int CallHandle)
+{
+       int ret_status;
+       unsigned int duration;
+
+       ret_status = tel_get_call_duration (CallHandle, &duration);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+               printf("Call Duration : %d Seconds\n", duration);
+       }
+       else {
+               printf("error=%d\n", ret_status);
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases2_15 Get Call Conference List
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Get Call Conference List</h3>
+This is a synchronous API which returns information about all the call handles and the total number of call handles, within the specified conference call.
+
+Pre Conditions:
+@n Call should be a multi-party conference call in order to return actual number of calls and call handles in the conference call.
+
+@code
+int tel_get_call_conf_list(unsigned int  CallHandle,  unsigned int * pCallList, int * pNoOfCalls);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+void getconferencelist(unsigned int CallHandle)
+{
+       int ret_status ;
+       unsigned int callList[5];
+       int  noOfCalls;
+
+       ret_status = tel_get_call_conf_list(CallHandle, callList, &noOfCalls);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+               printf("\n No.of Calls %d, \n", noOfCalls);
+               for (i = 0; i < noOfCalls; i++)
+               {
+                       printf("\n Call Handle in conference calls %d \n", callList[i]);
+               }
+       }
+       else {
+               printf("error=%d\n", ret_status);
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases2_16 Voice Privacy Mode
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Voice Privacy Mode</h3>
+Telephony provides two APIs which can be used to set and get the CDMA voice privacy mode .
+
+@code
+int tel_get_call_privacy_mode (TelCallVoicePrivacyInfo_t PrivacyInfo, int *pRequestID);
+int tel_set_call_privacy_mode (TelCallPrivacyType_t PrivacyType, int *pRequestID);
+@endcode
+
+This API is restricted for direct use.  Use the Voice call engine API instead.
+
+SAMPLE CODE
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+
+//SetVoicePrivacyMode
+void setvoiceprivacymode()
+{
+       int ReqId = -1;
+       int ret_status = -1;
+       int api_err;
+       TelCallPrivacyMode_t PrivacyMode_info;
+
+       pPrivacyMode_info = TAPI_CALL_PRIVACY_MODE_STANDARD;
+
+       ret_status = tel_set_call_privacy_mode (pPrivacyMode_info, &reqId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("Successful\n");
+       else
+               printf("error:%d\n", ret_status);
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+
+bool call_app_callback (TelTapiEvent_t *Event)
+{
+       int ret = -1;
+       int eventClass = Event->EventClass;
+       int eventType = Event->EventType;
+       int RequestId = Event->RequestId;
+       int Status = Event->Status;
+
+       if (eventClass == TAPI_EVENT_CLASS_CALL_VOICE)
+       {
+               switch (eventType) {
+                       case TAPI_EVENT_CALL_SET_PRIVACYMODE_CNF:
+                               if (RequestId != reqId) {
+                                       printf("Invalid RequestID received %d \n", reqId);
+                                       return false;
+                               }
+
+                               if (Status != TAPI_CAUSE_SUCCESS) {
+                                       printf("Invalid Status value received");
+                                       return false;
+                               }
+                               break;
+               }
+       }
+}
+
+//GetVoicePrivacyMode
+void getprivacymode()
+{
+       Int ReqId = -1;
+       int ret_status = -1;
+       int api_err;
+       TelCallPrivacyType_t privacyType;
+
+       privacyType = TAPI_CALL_PRIVACY_TYPE_MS;
+
+       ret_status = tel_get_call_privacy_mode (privacyType, &req_id);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("Successful\n");
+       else
+               printf("error:%d\n", ret_status);
+}
+
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+
+bool call_app_callback (TelTapiEvent_t *Event)
+{
+       int ret = -1;
+       int eventClass = Event->EventClass;
+       int eventType = Event->EventType;
+       int RequestId = Event->RequestId;
+       int Status = Event->Status;
+
+       if (eventClass == TAPI_EVENT_CLASS_CALL_VOICE)
+       {
+               switch (eventType) {
+                       case TAPI_EVENT_CALL_GET_PRIVACYMODE_CNF:
+                               TelCallVoicePrivacyInfo_t vp_info;
+                               memcpy(&vp_info, event->pData, sizeof(TelCallVoicePrivacyInfo_t));
+                               if (Status != TAPI_CAUSE_SUCCESS)
+                               {
+                                       printf("Invalid Status value received");
+                                       return false;
+                               }
+                               break;
+               }
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases2_17 Call FlashInformation
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Call FlashInformation</h3>
+The user makes an additional outgoing call in CDMA, this API is used instead of the CALL Outgoing API because there is no additional voice call transaction in CDMA. So the voice call id is only one in CDMA. The multiparty call is not supported in CDMA.
+
+@code
+int tel_exe_call_flash_info (const char* pDialNumber, int *pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+//CallFlashInfo
+void callflashinfo()
+{
+       int ret_status = -1;
+       int api_err;
+       const char *pDialNumber = "9999900000";
+
+       ret_status = tel_exe_call_flash_info(pDialNumber, &reqId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("Successful\n");
+       else
+               printf("error:%d\n", ret_status);
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+bool call_app_callback(TelTapiEvent_t *Event)
+{
+       int ret = -1;
+       int eventClass = Event->EventClass;
+       int eventType = Event->EventType;
+       int RequestId = Event->RequestId;
+       int Status = Event->Status;
+
+       if (eventClass == TAPI_EVENT_CLASS_CALL_VOICE)
+       {
+               switch (eventType)
+               {
+                       case TAPI_EVENT_CALL_FLASHINFO_CNF:
+                               if (RequestId != reqId)
+                               {
+                                       printf("Invalid RequestID received %d \n", reqId);
+                                       return false;
+                               }
+
+                               if (Status != TAPI_CAUSE_SUCCESS)
+                               {
+                                       printf("Invalid Status value received");
+                                       return false;
+                               }
+                               printf("\n Received TAPI_EVENT_CALL_FLASHINFO_CNF \n");
+                               break;
+
+               }
+       }
+       return true;
+}
+@endcode
+@}
+@defgroup Use_Cases2_18 Getting Call Time
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Getting Call Time</h3>
+This API is used to query information about a call time and call count.
+
+@code
+int tel_get_call_time (const TS_WORD req_mask, int *pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+void getcalltime()
+{
+       int ret_status = -1;
+       int api_err;
+       TelCallTimeMaskType_t mask_byte1;
+       TelCallTimeMaskType_t mask_byte2;
+       unsigned short mask_type;
+
+       mask_byte1 = TAPI_CALL_TIME_TYPE_TOTAL_CALL_CNT;
+       mask_byte2 = TAPI_CALL_TIME_TYPE_TOTAL_CALL_TIME;
+
+       mask_type = (mask_byte1 | mask_byte2);
+
+       ret_status = tel_get_call_time(mask_type, &reqId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("Successful\n");
+       else
+               printf("error:%d\n", ret_status);
+}
+//WAIT FOR EVENT HERE
+
+bool call_app_callback(TelTapiEvent_t *Event)
+{
+       int ret = -1;
+       int eventClass = Event->EventClass;
+       int eventType = Event->EventType;
+       int RequestId = Event->RequestId;
+       int Status = Event->Status;
+
+       if (eventClass == TAPI_EVENT_CLASS_CALL_VOICE)
+       {
+               switch (eventType)
+               {
+                       case TAPI_EVENT_CALL_SET_PRIVACYMODE_CNF:
+                               if (RequestId != reqId)
+                               {
+                                       printf("Invalid RequestID received %d \n", reqId);
+                                       return false;
+                               }
+
+                               if (Status != TAPI_CAUSE_SUCCESS)
+                               {
+                                       printf("Invalid Status value received");
+                                       return false;
+                               }
+                               break;
+               }
+       }
+}
+@endcode
+@}
+
+<h2 class="pg">SUPPLEMENTARY SERVICE </h2>
+@defgroup Use_Cases3_1 Event register and deregister
+@ingroup Use_Cases3_SUPPLEMENTARY_SERVICE
+@{
+               <h3 class="pg">Event register and deregister</h3>
+To receive asynchronous event notifications for the SS APIs, the registration of related events with their associated call backs is required. After these are registered, when an asynchronous API is called, the confirmation is returned as an asynchronous event notification which invokes the callback function along with the event data.
+
+SAMPLE CODE
+@code
+// REGISTER EVENT
+unsigned int subscription_id = 0;
+int api_err;
+
+api_err = tel_init();
+if (api_err != TAPI_API_SUCCESS)
+{
+       TEST_DEBUG("tel_init Failed - api_err = %d \n", api_err);
+}
+
+api_err = tel_register_event (TAPI_EVENT_SS_WAITING_CNF, &subscription_id, (TelAppCallback)&app_callback);
+printf("SS Event registration is Done: sub id is %d, api_err is %d\n",subscription_id,api_err);
+
+tel_register_app_name("com.samsung.appname");
+
+// DEREGISTER EVENT
+api_err = tel_deregister_event(subscription_id);
+if (api_err != TAPI_API_SUCCESS)
+{
+       printf("Event Class Unregisteration Fail\n");
+}
+@endcode
+@}
+@defgroup Use_Cases3_2 Call Barring
+@ingroup Use_Cases3_SUPPLEMENTARY_SERVICE
+@{
+
+               <h3 class="pg">Call Barring </h3>
+Telephony provides APIs to activate/deactivate call barring, get the barring status and change the barring password. It also provides APIs for applications to provide barring password requested by network for Call Barring Request or Change barring password request.
+@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 set.
+@n The mobile subscriber may also determine the type of barring preferrred for incoming/outgoing calls, by subscribing to a set of one or more unique barring programs .
+
+@code
+int   tel_set_ss_barring (const  TelSsCallBarringInfo_t *pBarringInfo, int * pRequestId);
+int   tel_get_ss_barring_status (TelSsCallBarType_t  BarType, TelSsCallType_t  CallType,  int * pRequestId )
+int   tel_change_ss_barring_password ( const char*  pOldPassword,const char*  pNewPassword,const char * pNewPasswordAgain, int *  pRequestId);
+@endcode
+
+SAMPLE CODE FOR CALL BARRING
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSS.h>
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void callbarring()
+{
+       int ret_status = -1;
+       TelSsCallBarringInfo_t BarringInfo;
+       int RequestId = 0;
+       char *bar_pwd = "0000";
+
+       BarringInfo.Mode = TAPI_SS_CALL_BAR_ACTIVATE;
+       BarringInfo.Type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;
+       BarringInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
+       strcpy(BarringInfo.szPassword, bar_pwd);
+
+       ret_status = tel_set_ss_barring (&BarringInfo, &RequestId);
+       if (ret_status == TAPI_API_SUCCESS) {
+               printf("successful\n");
+       }
+       else {
+               printf("Error  = %d \n", ret_status);
+       }
+}
+//WAIT FOR THE EVENT  HERE
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_SS_BARRING_CNF:
+                       TelSsInfo_t SsInfo;
+                       memcpy(&SsInfo, (TelSsInfo_t*)event->pData, sizeof(TelSsInfo_t));
+                       printf("Received Event :TAPI_EVENT_SS_BARRING_CNF\n");
+                       break;
+       }
+}
+@endcode
+
+SAMPLE CODE FOR BARRING STATUS
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSS.h>
+
+void callbarringstatus()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       int ret_status;
+       TelSsCallBarType_t BarType = TAPI_CALL_BARRING_ALL_OUTGOING_INTERN_CALL;
+       TelSsCallType_t CallType = TAPI_CALL_TYPE_VOICE_EV;
+       int pRequestId = 0;
+
+       ret_status = tel_get_ss_barring_status (BarType, CallType, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("Error  = %d \n", ret_status);
+       }
+}
+//WAIT FOR THE EVENT  HERE
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId, i;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_SS_BARRING_QUERYSTATUS_CNF:
+                       printf(" Received Event :TAPI_EVENT_SS_BARRING_QUERYSTATUS_CNF \n");
+                       TelSsInfo_t SsInfo;
+                       memcpy(&SsInfo, (TelSsInfo_t*)EventData, sizeof(TelSsInfo_t));
+
+                       for (i=0; i<SsInfo.NumberOfRecords; i++) {
+                               printf("Number of records %d \n", SsInfo.NumberOfRecords);
+                               printf("Record:%d Status:%d Teleservice:%d \n", i,
+                                               SsInfo.SsRecord.BarringRecord.rec_class[i].Status,
+                                               SsInfo.SsRecord.BarringRecord.rec_class[i].TeleCommService);
+
+                               if (SsInfo.SsRecord.BarringRecord.rec_class[i].Status == TAPI_SS_STATUS_ACTIVE)
+                                       printf("  Status: Active \n");
+                               else
+                                       printf("Status: Not Active \n");
+                       }
+
+                       break;
+       }
+}
+@endcode
+
+SAMPLE CODE FOR CHANGING BARRING PASSWORD
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSS.h>
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void changebarpwd()
+{
+       int ret_status;
+       int pRequestId = 0;
+
+       ret_status = tel_change_ss_barring_password ("0000", "0000", "0000", &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("Error  = %d \n", ret_status);
+       }
+}
+
+//WAIT FOR THE EVENT  HERE
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       //...
+       switch (eventType)
+       {
+               case TAPI_EVENT_SS_BARRING_CHANGEPASS_CNF:
+                       printf("Received Event : TAPI_EVENT_SS_BARRING_CHANGEPASS_CNF\n");
+                       //check data
+                       //
+                       printf("Call barring Password Changed successfully\n");
+                       break;
+                       //...
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases3_3 Call Forward
+@ingroup Use_Cases3_SUPPLEMENTARY_SERVICE
+@{
+
+
+               <h3 class="pg">Call Forward</h3>
+These APIs are used to set (activate/deactivate) the call forwarding option at the Network and to get call forward status. 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. 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 Application has to call this API in order to explicitly register/erase/activate/deactivate the call forwarding. Request will be sent irrespective of whether another SS call forward is already ongoing.
+
+@code
+int   tel_set_ss_forward ( const  TelSsForwardInfo_t *pForwardInfo, int * pRequestId);
+int   tel_get_ss_forward_status (TelSsForwardType_t Type, TelSsForwardWhen_t Condition, int *  pRequestId);
+@endcode
+
+SAMPLE CODE FOR CALL FORWARD
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSS.h>
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED INEvent Register and Deregister
+void callfwd()
+{
+       int ret_status = 0;
+       int pRequestId = 0;
+       TelSsForwardInfo_t pForwardInfo;
+
+       pForwardInfo.Mode = TAPI_CALL_FORWARD_MODE_ENABLE_EV;
+       pForwardInfo.Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
+       pForwardInfo.Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+       pForwardInfo.NoReplyConditionTimer = 10;
+
+       int len;
+       char *cf_number = "9986529874"; //number to which calles need to be forwarded.
+
+       len = strlen(cf_number);
+       printf("Length of CF number :%d \n", len);
+       memcpy(&(pForwardInfo.szPhoneNumber), cf_number, len);
+
+       ret_status = tel_set_ss_forward (&pForwardInfo, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("Error  = %d \n", ret_status);
+       }
+}
+//WAIT FOR THE EVENT  HERE
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId,i;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       //REFER Call Barring TO GET eventType AND EventData
+       switch (eventType)
+       {
+               case TAPI_EVENT_SS_FORWARD_CNF:
+                       printf("Received Event :TAPI_EVENT_SS_FORWARD_CNF \n");
+                       TelSsInfo_t SsInfo;
+
+                       if (EventData != NULL) {
+                               memcpy(&SsInfo, (TelSsInfo_t*)EventData, sizeof(TelSsInfo_t));
+                               printf("Number of records %d\n", SsInfo.NumberOfRecords);
+                       }
+
+                       for (i=0; i<SsInfo.NumberOfRecords; i++)
+                       {
+                               printf("Number of records %d\n", SsInfo.NumberOfRecords);
+                               printf("Record:%d Status:%d Teleservice:%d \n",
+                                               i,
+                                               SsInfo.SsRecord.ForwardingRecord.rec_class[i].Status,
+                                               SsInfo.SsRecord.ForwardingRecord.rec_class[i].TeleCommService);
+
+                               if (SsInfo.SsRecord.ForwardingRecord.rec_class[i].Status == TAPI_SS_STATUS_REGISTERED)
+                                       printf("Status: Registered \n");
+                               else if (SsInfo.SsRecord.ForwardingRecord.rec_class[i].Status == TAPI_SS_STATUS_ACTIVE)
+                                       printf("Status: Active \n");
+                               else
+                                       printf("Status: Not Registered /Not Active\n");
+                       }
+                       break;
+       }
+}
+@endcode
+
+SAMPLE CODE FOR CALL FORWARD STATUS
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSS.h>
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void callfwdstatus()
+{
+       int ret_status = 0;
+       TelSsForwardType_t Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
+       TelSsForwardWhen_t Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+       int pRequestId = 0;
+
+       ret_status = tel_get_ss_forward_status(Type, Condition, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("Error  = %d \n", ret_status);
+       }
+}
+
+//WAIT FOR THE EVENT  HERE
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId, i;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       //...
+       //...
+       switch (eventType)
+       {
+               case TAPI_EVENT_SS_FORWARD_QUERYSTATUS_CNF:
+                       // REFER Call Barring TO GET eventType AND EventData
+                       TelSsInfo_t SsInfo;
+
+                       if (EventData != NULL)
+                               memcpy(&SsInfo, (TelSsInfo_t*)EventData, sizeof(TelSsInfo_t));
+
+                       for (i=0; i<SsInfo.NumberOfRecords; i++)
+                       {
+                               printf("Number of records %d \n",SsInfo.NumberOfRecords);
+                               printf("Record:%d Status:%d Teleservice:%d \n",
+                                               i,
+                                               SsInfo.SsRecord.ForwardingRecord.rec_class[i].Status,
+                                               SsInfo.SsRecord.ForwardingRecord.rec_class[i].TeleCommService);
+
+                               if (SsInfo.SsRecord.ForwardingRecord.rec_class[i].Status == TAPI_SS_STATUS_REGISTERED)
+                                       printf(" Status: Registered      \n");
+                               else if (SsInfo.SsRecord.ForwardingRecord.rec_class[i].Status == TAPI_SS_STATUS_ACTIVE)
+                                       printf("  Status: Active   \n");
+                               else
+                                       printf("    Status: Not Registered /Not Active     \n");
+                       }
+                       break;
+       }
+}
+//...
+@endcode
+@}
+@defgroup Use_Cases3_4 Call Waiting
+@ingroup Use_Cases3_SUPPLEMENTARY_SERVICE
+@{
+
+
+               <h3 class="pg">Call Waiting</h3>
+These APIs activate/deactivate the call waiting service and provide the status of call wait feature. The call waiting service permits a mobile to be notified of an incoming call (as per basic call procedures) whilst the traffic channel is not available for the incoming call or when the mobile subscriber is engaged in an active or held call. Subsequently, the subscriber can accept, reject, or ignore the incoming call.
+
+@code
+int   tel_set_ss_waiting ( const TelSsWaitingInfo_t *waitInfo, int * RequestID);
+int   tel_get_ss_waiting_status ( const TelSsCallType_t CallType, int * RequestID);
+@endcode
+
+SAMPLE CODE FOR CALL WAITING
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSS.h>
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void callwaiting()
+{
+       int ret_status;
+       int RequestID;
+       TelSsWaitingInfo_t waitInfo;
+
+       waitInfo.Mode = TAPI_SS_CW_ACTIVATE;
+       waitInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
+
+       ret_status = tel_set_ss_waiting (&waitInfo, &RequestID);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("Error  = %d \n", ret_status);
+       }
+}
+//WAIT FOR THE EVENT  HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId, i;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       //...
+       switch (eventType)
+       {
+               case TAPI_EVENT_SS_WAITING_CNF:
+                       printf("Received Event : TAPI_EVENT_SS_WAITING_CNF  \n");
+                       //REFER Call Barring TO GET eventType AND EventData
+
+                       TelSsInfo_t SsInfo;
+
+                       memcpy(&SsInfo, (TelSsInfo_t*)EventData, sizeof(TelSsInfo_t));
+
+                       for (i=0; i<SsInfo.NumberOfRecords; i++)
+                       {
+                               printf("Number of records %d \n", SsInfo.NumberOfRecords);
+                               printf("Record:%d Status:%d Teleservice:%d \n",
+                                               i,
+                                               SsInfo.SsRecord.WaitingRecord.rec_class[i].Status,
+                                               SsInfo.SsRecord.WaitingRecord.rec_class[i].TeleCommService);
+
+                               if (SsInfo.SsRecord.WaitingRecord.rec_class[i].Status == TAPI_SS_STATUS_ACTIVE)
+                                       printf("Status: Active      \n");
+                               else
+                                       printf(" Status: Not Active   \n");
+                       }
+                       break;
+               //...
+       }
+}
+@endcode
+
+SAMPLE CODE FOR CALL WAITING STATUS
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSS.h>
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void callwaiting()
+{
+       int ret_status;
+       TelSsCallType_t CallType = TAPI_CALL_TYPE_VOICE_EV;
+       int RequestID=0;
+
+       ret_status = tel_get_ss_waiting_status(CallType, &RequestID);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("Error  = %d \n", ret_status);
+       }
+}
+//WAIT FOR THE EVENT  HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId, i;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d]\n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       //...
+       switch (eventType)
+       {
+               case TAPI_EVENT_SS_WAITING_QUERYSTATUS_CNF:
+                       printf("Received Event :TAPI_EVENT_SS_WAITING_QUERYSTATUS_CNF\n");
+                       //REFER Call Barring TO GET eventType AND EventData
+
+                       TelSsInfo_t SsInfo;
+                       if (EventData != NULL)
+                               memcpy(&SsInfo, (TelSsInfo_t*)EventData, sizeof(TelSsInfo_t));
+
+                       for (i=0; i<SsInfo.NumberOfRecords; i++)
+                       {
+                               printf("Number of records %d \n", SsInfo.NumberOfRecords);
+                               printf("Record:%d Status:%d Teleservice:%d \n",
+                                               i,
+                                               SsInfo.SsRecord.WaitingRecord.rec_class[i].Status,
+                                               SsInfo.SsRecord.WaitingRecord.rec_class[i].TeleCommService);
+
+                               if (SsInfo.SsRecord.WaitingRecord.rec_class[i].Status == TAPI_SS_STATUS_ACTIVE)
+                                       printf(" Status: Active      \n");
+                               else
+                                       printf("Status: Not Active   \n");
+                       }
+                       break;
+                       //...
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases3_5 CLI Service Status
+@ingroup Use_Cases3_SUPPLEMENTARY_SERVICE
+@{
+
+
+               <h3 class="pg">CLI Service Status</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+
+Telephony provides an API to query the status of calling line identity service. The CLI service permits a mobile to show or hide his identity to the called party.
+
+@code
+int   tel_get_ss_cli_status (TelSsCliType_t CliType,int * pRequestId );
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <TapiCommon.h
+#include <ITapiSS.h>
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void cliservicestatus()
+{
+       int ret_status;
+       TelSsCliType_t CliType = TAPI_SS_CLI_CDIP;
+       int pRequestId;
+
+       ret_status = tel_get_ss_cli_status (CliType, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("Error  = %d \n", ret_status);
+       }
+}
+//WAIT FOR THE EVENT  HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       Int requestId;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       // TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d]\n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       //...
+       switch (eventType)
+       {
+               //REFER Call Barring TO GET eventType AND EventData
+
+               case TAPI_EVENT_SS_IDENTIFY_IND:
+                       TelSsInfo_t SsInfo;
+                       memcpy(&SsInfo, (TelSsInfo_t*)EventData, sizeof(TelSsInfo_t));
+                       printf("Received Event : TAPI_EVENT_SS_IDENTIFY_IND \n");
+                       printf("Status :%d   CLI Service : %d\n",
+                                       SsInfo.SsRecord.CliRecord.CliStatus,
+                                       SsInfo.SsRecord.CliRecord.IdentificationType);
+                       break;
+                       //...
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases3_6 Send USSD Request
+@ingroup Use_Cases3_SUPPLEMENTARY_SERVICE
+@{
+
+
+               <h3 class="pg">Send USSD Request </h3>
+This API is used to send a USSD string to the Network. This is an Asynchronous API.
+
+Pre Conditions:
+@n No SS and USSD Transaction should be ongoing. If there an ongoing transaction, new USSD request will be returned to the Application with an error (USSD_BUSY)
+
+@code
+int  tel_send_ss_ussd_request( const char* szUssdString, int * pRequestId);
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSS.h>
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void sendussdreq()
+{
+       char ussdString[TAPI_SS_USSD_DATA_SIZE_MAX];
+       int ret;
+
+       memset(ussdString, 0, TAPI_SS_USSD_DATA_SIZE_MAX);
+       strcpy(ussdString, "*124#");
+
+       ret = tel_send_ss_ussd_request (ussdString, &request_id);
+
+       ret = tel_send_ss_ussd_request (pAppMsg, &pRequestId);
+}
+//WAIT FOR THE EVENT  HERE
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //..
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d]\n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //..
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_SS_USSD_CNF:
+                       TelSsUssdMsgIndInfo_t UssdRecord;
+                       memcpy(&UssdRecord, (TelSsInfo_t*)EventData, sizeof(TelSsUssdMsgIndInfo_t));
+                       printf("got event : TAPI_EVENT_SS_USSD_CNF:\n");
+                       //...
+                       break;
+               //..
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases3_7 Send USSD Response
+@ingroup Use_Cases3_SUPPLEMENTARY_SERVICE
+@{
+
+
+               <h3 class="pg">Send USSD Response</h3>
+This API is used to send a User response to the Network. This is an Asynchronous API.
+
+Pre Conditions:
+No SS and USSD Transaction should be ongoing. If there an ongoing transaction, new USSD request will be returned to the Application with an error (USSD_BUSY)
+@code
+int  tel_send_ss_ussd_response( const TelSsUssdMsgRspInfo_t* ussdRspRecord, int * RequestID);
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSS.h>
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void sendussdresp()
+{
+       char *ussd_str = "*123*0#";
+       int ret = 0;
+       int pRequestId = 0;
+
+       TelSsUssdMsgRspInfo_t *ussdRspRecord;
+
+       ussdRspRecord = (TelSsUssdMsgRspInfo_t*)malloc(sizeof(TelSsUssdMsgRspInfo_t));
+       ussdRspRecord->SsRespType = TAPI_USSD_RES_OK;
+       ussdRspRecord->IndType = TAPI_USSD_IND_NOTIFY;
+       ussdRspRecord->UssdInfo.Dcs = 0x0f;
+       ussdRspRecord->UssdInfo.RequestedBySAT = 0;
+       strncpy(ussdRspRecord->UssdInfo.szUssdString, ussd_str, TAPI_SS_USSD_DATA_SIZE_MAX);
+       ussdRspRecord->UssdInfo.szUssdString[strlen(ussdRspRecord->UssdInfo.szUssdString)] = '\0';
+       ussdRspRecord->UssdInfo.UssdStringLength = strlen(ussd_str);
+
+       ret = tel_send_ss_ussd_response (ussdRspRecord, &pRequestId);
+       printf ("The return value is %d\n", ret);
+}
+//WAIT FOR THE EVENT  HERE
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d]\n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType)
+       {
+               case TAPI_EVENT_SS_USSD_CNF:
+                       TelSsUssdMsgIndInfo_t UssdRecord;
+                       memcpy(&UssdRecord, (TelSsInfo_t*)EventData, sizeof(TelSsUssdMsgIndInfo_t));
+                       printf("got event : TAPI_EVENT_SS_USSD_CNF:\n");
+                       //...
+                       break;
+                       //...
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases3_8 Send USSD Cancel Request
+@ingroup Use_Cases3_SUPPLEMENTARY_SERVICE
+@{
+
+
+               <h3 class="pg">Send USSD Cancel Request </h3>
+This API sends a USSD cancel request to the Network to release USSD session.
+
+Pre Conditions:
+@n SS and USSD Transaction should be ongoing.
+
+@code
+int  tel_send_ss_ussd_cancel ( int * pRequestId);
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSS.h>
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void sendussdcancelreq()
+{
+       char ussdString[TAPI_SS_USSD_DATA_SIZE_MAX];
+       int ret;
+       int requestId = 0;
+
+       memset(ussdString, 0, TAPI_SS_USSD_DATA_SIZE_MAX);
+       strcpy(ussdString, "*124#");
+
+       ret = tel_send_ss_ussd_request(ussdString, &requestId);
+       printf ("The return value is %d\n", ret);
+
+       ret = tel_send_ss_ussd_cancel(&equestId);
+       printf ("The return value is %d\n", ret);
+}
+
+//WAIT FOR THE EVENTS  HERE
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d]          \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType)
+       {
+               case TAPI_EVENT_SS_USSD_CNF:
+                       printf("got event : TAPI_EVENT_SS_USSD_CNF:\n");
+                       //...
+                       break;
+
+               case TAPI_EVENT_SS_USSD_CANCEL_CNF:
+                       printf("got event : TAPI_EVENT_SS_USSD_CANCEL_CNF:\n");
+                       //...
+                       break;
+
+               //...
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases3_9 AOC Info
+@ingroup Use_Cases3_SUPPLEMENTARY_SERVICE
+@{
+
+
+               <h3 class="pg">AOC Info</h3>
+These APIs set and read AOC parameter values on the SIM.
+
+Pre Conditions:
+@n Advice of charge feature is dependent on the SIM for setting or reading aoc parameters. Setting of AOC requires PIN2 Verification
+
+@code
+int  tel_get_ss_aoc_info ( TelSsAocType_t AocType, int * pRequestId);
+int  tel_set_ss_aoc_info ( TelCallAocInfo_t * pAocSetInfo, int * pRequestId);
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSS.h>
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+
+//Complete PIN2verification process as mentioned in SIM
+void aocinforeq()
+{
+       //set aoc
+       printf(" Resetting Total Cost  \n");
+
+       TelCallAocInfo_t *pAocSetInfo;
+       int request_id;
+       int ret_status = 0;
+
+       pAocSetInfo = (TelCallAocInfo_t *)calloc(1, sizeof(TelCallAocInfo_t));
+       pAocSetInfo->AocType = TAPI_SS_AOC_TYPE_RESET;
+
+       ret = tel_set_ss_aoc_info (pAocSetInfo, &request_id);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("Error  = %d \n", ret_status);
+       }
+}
+
+//WAIT FOR THE EVENT  HERE
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d]\n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       switch (eventType)
+       {
+               case TAPI_EVENT_SS_SET_AOC_CNF:
+                       printf("Received Event : SS -- TAPI_EVENT_SS_SET_AOC_CNF\n");
+                       break;
+       }//...
+}
+
+//read aoc
+void readaoc()
+{
+       TelSsAocType_t AocType = TAPI_SS_AOC_TYPE_ACM;
+
+       ret_status = tel_get_ss_aoc_info (AocType, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("Error  = %d \n", ret_status);
+       }
+}
+//WAIT FOR THE EVENT  HERE
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d]\n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_SS_AOC_RSP:
+                       TelCallAocInfo_t aoc_info;
+                       memcpy(&aoc_info, (TelCallAocInfo_t*)EventData, sizeof(TelCallAocInfo_t));
+                       printf("Received Event : SS -- TAPI_EVENT_SS_AOC_RSP\n");
+                       printf(" AOC TYPE :%d\n", aoc_info.AocType);
+                       break;
+       }
+
+}//...
+@endcode
+@}
+
+       <h2 class="pg">SMS</h2>
+
+@defgroup Use_Cases4_1 Event register and deregister
+@ingroup Use_Cases4_SMS
+@{
+
+               <h3 class="pg">Event register and deregister</h3>
+To receive asynchronous event notifications for the SMS APIs, the registration of related events with their associated call backs is required. When an asynchronous API is called, the confirmation is returned as an asynchronous event notification which invokes the callback function along with the event data.
+@nSMS in the telephony framework only provides an interface to the modem and doesn’t handle Transport layer, storing and deleting the SMS in the storage except SIM. Because of this we recommend you shouldn’t access this API directly, and should use the MAPI of Message Framework instead.
+
+Notification Events are as follows.
+@code
+TAPI_EVENT_NETTEXT_INCOM_IND
+TAPI_EVENT_NETTEXT_CB_INCOM_IND
+TAPI_EVENT_NETTEXT_INCOM_EX_IND
+TAPI_EVENT_NETTEXT_CB_INCOM_EX_IND
+TAPI_EVENT_NETTEXT_MEMORY_STATUS_IND
+TAPI_EVENT_NETTEXT_DEVICE_READY_IND
+@endcode
+
+SAMPLE CODE
+@code
+// REGISTER EVENT
+unsigned int subscription_id = 0;
+int api_err;
+
+api_err = tel_init();
+if (api_err != TAPI_API_SUCCESS)
+{
+       TEST_DEBUG("tel_init Failed - api_err = %d \n", api_err);
+}
+api_err = tel_register_event(TAPI_EVENT_NETTEXT_SENTSTATUS_CNF, &subscription_id, (TelAppCallback)&app_callback);
+printf("Nettext Class registration is Done: sub id is %d, api_err is %d\n", subscription_id, api_err);
+
+tel_register_app_name("com.samsung.appname");
+
+// DEREGISTER EVENT
+api_err = tel_deregister_event(subscription_id);
+if (api_err != TAPI_API_SUCCESS)
+{
+       printf("Event Class Unregistration Fail\n");
+}
+
+// SMS notification callback function
+void app_callback(void)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void *EventData = NULL;
+
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       printf(" app _callback is called \n");
+
+       print_events((int)eventType);
+       printf("\n event came in power_callback [%d] \n", eventType);
+       printf("\n expected event is  in callback [%d] \n", expected_event);
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_NETTEXT_INCOM_IND:
+                       TelSmsDatapackageInfo_t *ptrDataPackage;
+                       printf("SMS Incoming Message\n");
+                       ptrDataPackage = (TelSmsDatapackageInfo_t *)EventData;
+                       // Decoding Service Center Address
+                       // Decoding TPDU(SMS-DELIVER, SMS-STATUS)
+                       break;
+
+               case TAPI_EVENT_NETTEXT_CB_INCOM_IND:
+                       TelSmsCbMsg_t *ptrCbMsgInfo;
+                       printf("SMS Cell Broadcasting Incoming Message\n");
+                       ptrCbMsgInfo = (TelSmsCbMsg_t *)EventData;
+                       // Decoding Cell broadcasting Message in szData [Refer to 3GPP TS23.041 9.4.1]
+                       break;
+
+               case TAPI_EVENT_NETTEXT_INCOM_EX_IND:
+                       TelSmsMsgInfo_t *pMsgInfo;
+                       printf("CDMA SMS Incoming Message\n");
+                       pMsgInfo = (TelSmsMsgInfo_t *)EventData;
+                       // Decoding TPDU(SMS-DELIVER, SMS-STATUS)
+                       break;
+
+               case TAPI_EVENT_NETTEXT_CB_INCOM_EX_IND:
+                       TelSmsMsgInfo_t *pMsgInfo = NULL;
+                       printf("CDMA SMS Incoming Message\n");
+                       pMsgInfo = (TelSmsMsgInfo_t *)EventData;
+                       // Decoding Cell broadcasting Message in szData
+                       break;
+
+               case TAPI_EVENT_NETTEXT_MEMORY_STATUS_IND:
+                       int *status = NULL;
+                       printf("SIM Memory Status Notification\n");
+                       status = (TelSmsMemStatusType *)EventData;
+                       if (*status == TAPI_NETTEXT_PHONE_MEMORY_STATUS_AVAILABLE)
+                               printf("SIM Memory Available\n");
+                       else if (*status == TAPI_NETTEXT_PHONE_MEMORY_STATUS_FULL)
+                               printf("SIM Memory Full\n");
+                       else
+                               printf("Unknown Type\n");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_DEVICE_READY_IND:
+                       int *pDeviceReady = NULL;
+                       printf("SMS Device Ready Status Notification\n");
+                       pDeviceReady = (int*)EventData;
+                       if (pDeviceReady->Result == 1)
+                               printf("Device Ready\n");
+                       else
+                               printf("Unknown Type\n");
+                       break;
+       }
+       return;
+}
+@endcode
+@}
+@defgroup Use_Cases4_2 Send SMS
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Send SMS</h3>
+Telephony provides an API to send an SMS to the network. This API allows the transmission of an SMS PDU as defined by 3GPP TS 23.040 (SMS-SUBMIT, SMS-COMMAND) to the lower layers. If there is a need to send multiple parts of a concatenated message, this API requests for a dedicated link, through the input parameter MoreMessageToSend, from the lower layers. This will ensure the lower layers do not release the dedicated connection if there are more messages expected.
+
+@code
+int tel_send_sms (const TelSmsDatapackageInfo_t* pDataPackage, int bMoreMsgToSend, int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void send_sms()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       TelSmsDatapackageInfo_t *pDataPackage;
+       int ret_status;
+       int pRequestId = 0;
+
+       pDataPackage = (TelSmsDatapackageInfo_t *)malloc(sizeof(TelSmsDatapackageInfo_t));
+
+       //fill the structure appropriately
+       //Sca parameter is optional. If you don't provide Service center address, you should fill "00" in sca array.
+       //MsgLength is length of szData//fill the szData in TelSmsDatapackageInfo_t with SMS-SUBMIT or SMS-COMMAND TPDU.
+
+       ret_status = tel_send_sms (pDataPackage, 0, &pRequestId);
+       if  (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR THE EVENT  HERE
+}
+
+static void app_callback (TelTapiEvent_t* event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       switch (eventType) {
+               case TAPI_EVENT_NETTEXT_SENTSTATUS_CNF:
+                       printf("\n***************************************\n");
+                       printf("\n$$$ TAPI_EVENT_NETTEXT_SENTSTATUS_CNF $$$\n");
+                       // Extract the Event Data here
+
+                       break;
+       }
+       //..
+}
+@endcode
+@}
+@defgroup Use_Cases4_3 Send SMS Message
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Send SMS Message</h3>
+This API is used to send an SMS message to the network. This API allows the transmission of an SMS PDU as defined by 3GPP2 C.S0015 (SMS-SUBMIT, SMS-ACK, SMS-CANCEL) to the lower layers. If there is a need to send multiple parts of a concatenated message, this API requests for a dedicated link, through the input parameter MoreMessageToSend, from the lower layers. This will ensure the lower layers do not release the dedicated connection if there are more messages expected. This is currently supported in CDMA.
+
+@code
+int tel_send_sms_msg (const TelSmsMsgInfo_t* pSmsMsgInfo,unsigned int MoreMsgToSend, int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void send_sms_ex()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       int ret_status;
+       int requestId = 0;
+       TelSmsMsgInfo_t pMsgInfo;
+       char* diallingNum;
+       int dialNumLen;
+       TelSmsMsgInfo_t *pDataPackage = malloc(sizeof(TelSmsMsgInfo_t));
+
+       memset(pDataPackage, 0, sizeof(TelSmsMsgInfo_t));
+       pDataPackage->MsgType = TAPI_NETTEXT_MESSAGETYPE_SUBMIT;
+       pDataPackage->ParamMask |= TAPI_NETTEXT_PARAM_TELESERVICE_MASK;
+       //fill structure appropriately
+
+       ret_status = tel_send_sms_msg (pDataPackage, 0, &requestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+}
+//WAIT FOR EVENT HERE
+//CALLBACK FUNTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       switch (eventType) {
+               case TAPI_EVENT_NETTEXT_SENTSTATUS_EX_CNF:
+                       printf("\n***************************************\n");
+                       printf("\n$$$ TAPI_EVENT_NETTEXT_SENTSTATUS_EX_CNF $$$\n");
+                       break;
+       }
+       //...
+}
+@endcode
+@}
+@defgroup Use_Cases4_4 Read SMS
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Read SMS</h3>
+This API reads a message from SIM card storage. You should not access this API directly; instead use the Message Framework API.
+
+@code
+int  tel_read_sms_in_sim(int Index, int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void read_sms()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       int ret_status;
+       int pRequestId = 0;
+
+       ret_status = tel_read_sms_in_sim(0, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("Error  = %d \n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_READ_SMS_CNF:
+                       TelSmsData_t *pReadData;
+                       printf("\n$$Read Msg Notification $$$\n");
+                       pReadData = (TelSmsData_t *) event->pData;
+                       printf("\n$$Read Msg index = [%d] $$$\n", pReadData->SimIndex);
+                       printf("\n$$Read Msg status = [%d] $$$\n", pReadData->MsgStatus);
+                       // TPDU
+                       // pReadData->SmsData.szData
+
+                       break;
+       }
+}
+//...
+@endcode
+@}
+@defgroup Use_Cases4_5 Write Sms
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Write Sms</h3>
+This API writes a message to SIM storage area.
+@n The parameter of this API is changed into TelSmsData_t.
+@n If SIM index in TelSmsData_t is -1, SMS message is stored at the first empty SIM index . The contents of szData is SMS-SUBMIT, SMS-DELIVER or SMS-STATUS REPORT TPDU. You should not access this API directly; use the Message Framework API.
+
+@code
+int   tel_write_sms_in_sim(const TelSmsData_t *pWriteData, int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void write_sms()
+{
+       // SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       int ret_status;
+       TelSmsData_t *pWriteData;
+       int pRequestId = 0;
+       char *msg = "This is an Test SMS";
+       char *SCA = "821091";
+
+       pWriteData = malloc(sizeof(TelSmsData_t));
+       if (pWriteData == NULL) {
+               printf("Memory Allocation fails\n");
+               return;
+       }
+
+       // conv_service_center_address(pWriteData->SmsData.Sca, SCA);
+       // conv_msg_into_tpdu(pWriteData->SmsData.szData, pWriteData->SmsData.MsgLength, msg);
+       pWrite->MsgStatus = TAPI_NETTEXT_STATUS_READ;
+       pWrite-> SimIndex = -1;
+
+       ret_status = tel_write_sms_in_sim (pWriteData, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //..
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //..
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_SAVE_STATUS_CNF:
+                       int *SimIndex = NULL;
+                       printf("\n***************************************\n");
+                       printf("\n$$Save Status Notification$$\n");
+                       SimIndex = (int *)EventData;
+                       printf("SIM Index stored SMS is [%d]\n", *SimIndex);
+                       break;
+       }
+       //..
+}
+@endcode
+@}
+@defgroup Use_Cases4_6 Delete Sms
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Delete Sms</h3>
+This API deletes a message specified by the index (SIM index used when storing the sms) number or all the messages in the SIM storage area. If SIM index is -1, all SMS stored in SIM are deleted. You should not access this API directly; use the Message Framework API.
+
+@code
+int tel_delete_sms_in_sim(int Index, int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE:
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void delete_sms()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       int ret_status;
+       int pRequestId = 0;
+
+       ret_status = tel_delete_sms_in_sim(1, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_DELETE_STATUS_CNF:
+                       printf("\n***************************************\n");
+                       printf("\n$$Delete Notification$$$\n");
+                       break;
+       }
+       //..
+}
+@endcode
+@}
+@defgroup Use_Cases4_7 Getting Sms Count
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Getting Sms Count</h3>
+This API is used to retrieve message count information such as Total record count, used record count and the indices list for SIM Storage. You should not access this API directly; use the Message Framework API.
+
+@code
+int tel_get_sms_count (int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void get_count()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       int ret_status;
+       int pRequestId = 0;
+
+       ret_status = tel_get_sms_count (&pRequestId);
+       if  (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //..
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_GET_COUNT_CNF:
+                       printf("\n***************************************\n");
+                       printf("\n$$$GetMsgCountNotification$$$$\n");
+                       MsgCountNotification(tapiEvent.pData);
+                       break;
+       }
+       //..
+}
+void MsgCountNotification (char *pData)
+{
+       static TelSmsStoredMsgCountInfo_t *countInfo;
+       int loop_counter = 0;
+       int returnStatus;
+       countInfo = (TelSmsStoredMsgCountInfo_t *)pData;
+       int requestId = 0;
+
+       if (countInfo->UsedCount != 0x00)
+       {
+               fprintf(stderr, "Index LIST..........\n");
+               for (loop_counter  = 0; loop_counter < countInfo->UsedCount; loop_counter++)
+               {
+                       fprintf(stderr, "[%02x]", countInfo->IndexList[loop_counter]);
+                       returnStatus = tel_read_sms_in_sim (countInfo->IndexList[loop_counter], &requestId);
+                       printf("After read msg: returnstatus %d request id is %d\n", returnStatus, requestId);
+               }
+               printf("In MsgCountNotification total cnt is %d, usedcnt is %dapi_err %d\n",
+                               countInfo->TotalCount,
+                               countInfo->UsedCount,
+                               returnStatus);
+       }
+
+       printf("In MsgCountNotification total cnt is %d, usedcnt is %d\n", countInfo->TotalCount, countInfo->UsedCount);
+}
+@endcode
+@}
+@defgroup Use_Cases4_8 Setting Sms CB message
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Setting Sms CB message</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+@n This API is used to set the SMS CB Message Identifiers in the appropriate EF-CBMI/EF-CBMIR file in (U)SIM. This API also indicates the underlying provider to enable or disable CB Channel on which CB messages are received. You should not access this API directly; use the Message Framework API.
+
+@code
+int  tel_set_sms_cb_config(const TelSmsCbConfig_t *pCBConfig, int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void set_cbconfig()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       int ret_status;
+       int pRequestId = 0;
+       TelSmsCbConfig_t *pCBConfig = NULL;
+
+       pCBConfig = (TelSmsCbConfig_t *)malloc(sizeof(TelSmsCbConfig_t));
+       pCBConfig->bCBEnabled = 1;
+       pCBConfig->SelectedId = 0x01;
+       pCBConfig->MsgIdCount = 0x02;
+
+       pCBConfig->MsgIDs[0] = 0x0c;
+       pCBConfig->MsgIDs[1] = 0x0c;
+       pCBConfig->MsgIDs[2] = 0xdf;
+       pCBConfig->MsgIDs[3] = 0x00;
+
+       ret_status = tel_set_sms_cb_config(pCBConfig, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //..
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_SET_REQUEST_CNF:
+                       TelSmsSetResponse *RequestType;
+                       printf("\n***************************************\n");
+                       printf("\n$$$$$$   SET CONFIRMATION $$$$$$ \n");
+                       RequestType = (TelSmsSetResponse *)EventData;
+                       if (*RequestType == TAPI_NETTEXT_CBSETCONFIG_RSP) {
+                               printf("\n$$$$$$   SET CB CONFIRMATION $$$$$$ \n");
+                       }
+                       break;
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases4_9 Getting Sms CB configuration
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Getting Sms CB configuration</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+@n This API is used to retrieve SMS CB configuration options from EFcbmi file in the SIM. You should not access this API directly; use the Message Framework API.
+
+@code
+TapiResult_t    tel_get_sms_cb_config (int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE:
+
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void get_cbconfig()
+{
+       int ret_status;
+       int pRequestId = 0;
+
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       ret_status = tel_get_sms_cb_config (&pRequestId);
+
+       printf ("The return value is %d\n", ret_status);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //..
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //..
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_GET_CB_CONFIG_CNF:
+                       printf("\n***************************************\n");
+                       printf("\n$$$GET CB Config$$$\n");
+                       GetCBNotification(tapiEvent.pData);
+                       break;
+       }
+       //..
+}
+
+void GetCBNotification (char *pData)
+{
+       TelSmsCbConfig_t *CBConfig;
+       int i = 0;
+
+       CBConfig = (TelSmsCbConfig_t *) pData;
+       printf("=========CB Configuration=========\n");
+
+       // CB Enable/Diable
+       if (CBConfig->bCBEnabled == 0x01)
+               printf("Cell Broadcast Msg Enabled...\n");
+       else if (CBConfig->bCBEnabled == 0x02)
+               printf("Cell Broadcast Msg Disabled...\n");
+
+       // Selected ID
+       if (CBConfig->SelectedId == 0x01)
+               printf("All CBMI is selected... \n");
+       else if (CBConfig->SelectedId == 0x02)
+               printf("There are some selected CBMI...\n");
+
+       // CBMI  Count
+       printf("CBMI Count: %d \n\n", CBConfig->MsgIdCount);
+       // CBMI  List
+       if (CBConfig->MsgIdCount != 0)
+       {
+               printf("----- CBMI List -----\n");
+               for (i=0; i < CBConfig->MsgIdCount; i++)
+               {
+                       printf("No.%d - [0x%04x]\n", i, CBConfig->MsgIDs[i]);
+               }
+       }
+}
+//...
+@endcode
+@}
+@defgroup Use_Cases4_10 Service Center Address
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Service Center Address</h3>
+This API sets the SMS Service Centre Address information in order to send the SMS.
+@n It is also possible to get current SMS Service Centre Address information. Currently Only index 0 is supported in Aquila’s Telephony OEM Plugin. You should not access this API directly; use the Message Framework API.
+
+@code
+int  tel_set_sms_sca(const TelSmsAddressInfo_t *pSCA, int Index, int *pRequestId);
+int  tel_get_sms_sca (int Index, int *pRequestId)
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void set_sca()
+{
+
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       int ret_status;
+       int pRequestId = 0;
+       BYTE scabuf[512];
+       char scaNum[TAPI_NETTEXT_SCADDRESS_LEN_MAX];
+       BYTE scaNum_len = 0;
+       TelSmsAddressInfo_t *sc_addr = NULL;
+       BYTE packet[500];
+       int idx = 0;
+       int i;
+
+       printf("***Setting the SCA(Api:SetSCA)****\n");
+       sc_addr = (TelSmsAddressInfo_t *)malloc(sizeof(TelSmsAddressInfo_t));
+       memset(sc_addr, 0, sizeof(sc_addr));
+       memset(scaNum, 0, sizeof(scaNum));
+       memset(scabuf, 0, sizeof(scabuf));
+       sprintf(scaNum, "821091");
+       scaNum_len = strlen(scaNum);
+       scaNum_len = strlen(scaNum);
+       scaNum[scaNum_len] = 0;
+       scaNum_len = scaNum_len - 1;
+
+       printf("==========================\n");
+       printf("Sca Number :%s\n", scaNum);
+       printf("sca  number length : %d \n", scaNum_len);
+       printf("==========================\n");
+
+       //idx = SmsUtilEncodeAddrField( packet, scaNum, scaNum_len, 0x01, 0x01);
+       //get idx
+       printf("idx =%d\n", idx);
+       sc_addr->DialNumLen = idx ;
+       memcpy(sc_addr->szDiallingNum, packet, (unsigned int)idx);
+
+       ret_status = tel_set_sms_sca(sc_addr, 0, &pRequestId);
+       //[Note] Telephony Emulator Not Support
+
+       printf("returnstatus after scaddr set is %d requestId:%d \n", ret_status, pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //..
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //..
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_SET_REQUEST_CNF:
+                       TelSmsSetResponse *RequestType;
+                       printf("\n***************************************\n");
+                       RequestType = (TelSmsSetResponse *)EventData;
+                       if (*RequestType == TAPI_NETTEXT_SETSCADDR_RSP) {
+                               printf("\n$$$TAPI_EVENT_NETTEXT_SET_SCA_CNF$$$\n");
+                               // service center address decoding
+                       }
+                       break;
+       }
+}
+//..
+
+//get SCA
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void get_sca()
+{
+       int ret_status;
+       int pRequestId = 0;
+
+       ret_status = tel_get_sms_sca(0, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+
+       //WAIT FOR EVENT HERE
+}
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       //...
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_GET_SCA_CNF:
+                       printf("\n****************************************\n");
+                       printf("\n$$$ TAPI_EVENT_NETTEXT_GET_SCA_CNF$$$\n");
+                       // SCA address decoding
+                       printf("\n****************************************\n");
+                       break;
+       }
+       //...
+}
+@endcode
+@}
+@defgroup Use_Cases4_11 Sms Preferred Bearer
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Sms Preferred Bearer</h3>
+<strong>[Note] Telephony Emulator and Aquila’s Telephony OEM Plugin do not support this feature.</strong>
+@n Telephony provides APIs to set SMS preferred bearer on which SMS has to be transmitted. You should not access this API directly; use the Message Framework API.
+
+@code
+int  tel_set_sms_preferred_bearer (TelSmsBearerType_t    BearerType, int *pRequestId);
+int  tel_get_sms_preferred_bearer(int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE:
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void set_pb()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       int ret_status;
+       int pRequestId = 0;
+       TelSmsBearerType_t BearerType = TAPI_NETTEXT_BEARER_PS_ONLY;
+
+       ret_status = tel_set_sms_preferred_bearer(BearerType, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_SET_REQUEST_CNF:
+                       TelSmsSetResponse *RequestType;
+                       RequestType = (TelSmsSetResponse *)EventData;
+                       if (*RequestType == TAPI_NETTEXT_SETPREFERREDBEARER_RSP) {
+                               printf("\n$$$TAPI_EVENT_NETTEXT_SET_Preferred Bearer_CNF$$$\n");
+                       }
+                       break;
+       }
+       //...
+}
+
+//get preferred bearer
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+void get_pb()
+{
+       int ret_status;
+       int pRequestId = 0;
+
+       ret_status = tel_get_sms_preferred_bearer(&pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       //...
+       //...
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_GET_SMSBEARER_CNF:
+                       printf("\n****************************************\n");
+                       printf("\n$$$ GET PREFERRED BEARER$$$\n");
+                       printf("\n****************************************\n");
+                       break;
+       }
+       //...
+}
+@endcode
+@}
+@defgroup Use_Cases4_12 Sms Parameters
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Sms Parameters</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+@n Telephony provides APIs to set the header parameters of SMS, which are used in the origination of MO messages. It also provides API to get the SMS parameters for a particular SMS (sent/received) based on the SIM index where it is stored. You should not access this API directly; use the Message Framework API.
+
+@code
+int  tel_set_sms_parameters(const TelSmsParams_t SmsSetParameters, int *pRequestId);
+int  tel_get_sms_parameters(const int SmsRecordIndex, int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE:
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void set_param()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       int ret_status;
+       int pRequestId = 0;
+       TelSmsParams_t SmsSetParameters;
+
+       SmsSetParameters.RecordIndex = 0x01;
+       SmsSetParameters.RecordLen = 28;
+       memcpy(SmsSetParameters.TpDestAddr.szDiallingNum, "9986529874", 10);
+       printf("\ndial no is %s\n", SmsSetParameters.TpDestAddr.szDiallingNum);
+
+       SmsSetParameters.TpDestAddr.DialNumLen = 10;
+       SmsSetParameters.TpDestAddr.Ton = TAPI_SIM_TON_NATIONAL;//national no
+       SmsSetParameters.TpDestAddr.Npi = TAPI_SIM_NPI_NATIONAL;
+
+       ret_status = tel_set_sms_parameters(SmsSetParameters, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_SET_REQUEST_CNF:
+                       TelSmsSetResponse *RequestType;
+                       RequestType = (TelSmsSetResponse *)EventData;
+                       if (*RequestType == TAPI_NETTEXT_SETPARAMETERS_RSP) {
+                               printf("\n$$$TAPI_EVENT_NETTEXT_SET_Parameter_CNF$$$\n");
+                       }
+                       break;
+       }
+}
+//...
+
+//get params
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void get_params()
+{
+       int ret_status;
+       int pRequestId = 0;
+
+       ret_status = tel_get_sms_parameters(1, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d]\n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_GET_PARAM_CNF:
+                       printf("\n***************************************\n");
+                       printf("\n$$$ GET PARAM NOTI$$$\n");
+                       // decoding SMS parameter
+                       break;
+       }
+       //...
+}
+@endcode
+@}
+@defgroup Use_Cases4_13 Sending Delivery Report
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Sending Delivery Report</h3>
+This API sends a SMS-deliver report to the network, after receiving an incoming SMS. You should not access this API directly.
+
+@code
+int  tel_send_sms_deliver_report(const TelSmsDatapackageInfo_t *pDataPackage, TelSmsResponse_t RPCause, int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+void send_delivery()
+{
+       int ret_status;
+       int requestId = -1;
+       TelSmsResponse_t RPCause;
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       TelSmsDatapackageInfo_t *del_report = NULL;
+
+       del_report = malloc(sizeof(TelSmsDatapackageInfo_t));
+       memset(del_report, 0, sizeof(TelSmsDatapackageInfo_t));
+       //Encode Send Delivery Report here
+       //EncodeSmsDeliveryReportTpdu();
+
+       RPCause = TAPI_NETTEXT_SENDSMS_SUCCESS;
+       printf("***receive message (Api:SendDeliverreport)****\n");
+
+       ret_status = tel_send_sms_deliver_report(del_report, RPCause, &requestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d]\n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_DELIVERY_REPORT_CNF:
+                       printf("\n***************************************\n");
+                       printf("\n$$$ DELIVER REPORT NOTI$$$\n");
+                       printf("\n***************************************\n");
+                       break;
+       }
+       //...
+}
+@endcode
+@}
+@defgroup Use_Cases4_14 Setting Memory Status
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Setting Memory Status</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+@n This API is used by applications to inform the modem about the memory status of PDA (whether FULL or AVAILABLE) so that modem can inform network. You should not access this API directly.
+
+@code
+int  tel_set_sms_memory_status      (int  MemoryStatus ,  int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE:
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+void set_memstatus()
+{
+
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       int ret_status;
+       int pRequestId = 0;
+       int MemoryStatus = TAPI_NETTEXT_PDA_MEMORY_STATUS_AVAILABLE;
+
+       ret_status = tel_set_sms_memory_status(MemoryStatus, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_SET_REQUEST_CNF:
+                       TelSmsSetResponse *RequestType;
+                       printf("\n***************************************\n");
+                       printf("\n$$$$$$   SET CONFIRMATION $$$$$$ \n");
+                       RequestType = (TelSmsSetResponse *)EventData;
+                       if (*RequestType == TAPI_NETTEXT_SETMEMORYSTATUS_RSP) {
+                               printf("\n$$$$$$   SET Memory Status $$$$$$ \n");
+                       }
+                       break;
+       }
+       //...
+}
+@endcode
+@}
+@defgroup Use_Cases4_15 Setting Message Status
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Setting Message Status</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+This API is used by applications to set the message status in the Sim file. You should not access this API directly; use the Message Framework API.
+
+@code
+int    tel_set_sms_message_status(int Index, TelSmsMsgStatus_t MsgStatus, int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE:
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void set_msgstatus()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       int ret_status;
+       int Index = 2;
+       int pRequestId = 0;
+       TelSmsMsgStatus_t MsgStatus = TAPI_NETTEXT_STATUS_READ;
+
+       ret_status = tel_set_sms_message_status (Index, MsgStatus, &pRequestId);
+       printf ("The return value is %d\n", ret_status);
+       printf("RequestId is %d\n", pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType)
+       {
+               case TAPI_EVENT_NETTEXT_SET_REQUEST_CNF:
+                       TelSmsSetResponse *RequestType;
+                       printf("\n***************************************\n");
+                       printf("\n$$$$$$   SET CONFIRMATION $$$$$$ \n");
+                       RequestType = (TelSmsSetResponse *)EventData;
+                       if (*RequestType == TAPI_NETTEXT_SETMESSAGESTATUS_RSP) {
+                               printf("\n$$$$$$   SET Memory Status $$$$$$ \n");
+                       }
+                       break;
+       }
+       //...
+}
+@endcode
+@}
+@defgroup Use_Cases4_16 Getting SMS Parameter Count
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Getting SMS Parameter Count</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+@n This API is used by applications to get the count of sms parameter records stored in Sim EF. You should not access this API directly.
+
+@code
+int  tel_get_sms_parameter_count (int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE:
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void get_paramcount()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       int ret_status;
+       int pRequestId = 0;
+
+       ret_status = tel_get_sms_parameter_count (&pRequestId);
+       printf ("The return value is %d\n", ret_status);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_PARAM_COUNT_IND:
+                       printf("\n***************************************\n");
+                       printf("\n$$$ PARAM COUNT NOTI$$$\n");
+                       printf("\n***************************************\n");
+                       break;
+       }
+       //...
+}
+@endcode
+@}
+       <h2 class="pg">NETWORK Registration and Configuration<h/h2>
+
+@defgroup Use_Cases5_1 Event register and deregister
+@ingroup Use_Cases5_NETWORK
+@{
+
+               <h3 class="pg">Event register and deregister</h3>
+To receive asynchronous event notifications for the network APIs, the registration of related events with their associated call backs is required. When an asynchronous API is called, the confirmation is returned as an asynchronous event notification which invokes the callback function along with the event data.
+
+Network Notification Events
+@code
+TAPI_EVENT_NETWORK_LOCATIONCELLINFO_IND
+TAPI_EVENT_NETWORK_RADIO_INFO_IND
+TAPI_EVENT_NETWORK_SPN_INFO
+TAPI_EVENT_NETWORK_DISPLAYINFO_IND
+@endcode
+
+SAMPLE CODE:
+@code
+// REGISTER EVENT
+unsigned int subscription_id = 0;
+int api_err;
+
+api_err = tel_init();
+if (api_err != TAPI_API_SUCCESS)
+{
+       TEST_DEBUG("TelTapiInit Failed - api_err = %d \n", api_err);
+}
+
+api_err = tel_register_event(TAPI_EVENT_NETWORK_GETNWBAND_CNF, &subscription_id, (TelAppCallback)&app_callback);
+printf("Network Event registration is Done: sub id is %d, api_err is %d\n", subscription_id, api_err);
+
+tel_register_app_name("com.samsung.appname");
+
+// DEREGISTER EVENT
+api_err = tel_deregister_event (subscription_id);
+if (api_err != TAPI_API_SUCCESS)
+{
+       printf("Event Class Unregeration Fail\n");
+}
+
+// Network notification callback function
+void app_callback(void)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void *EventData = NULL;
+
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+       printf(" app _callback is called \n");
+
+       print_events((int)eventType);
+       printf("\n event came in power_callback [%d] \n", eventType);
+       printf("\n expected event is  in callback [%d] \n", expected_event);
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_NETWORK_LOCATIONCELLINFO_IND:
+                       TelSmsDatapackageInfo_t *ptrDataPackage = NULL;
+                       printf("SMS Incoming Message\n");
+                       ptrDataPackage = (TelSmsDatapackageInfo_t *)EventData;
+                       // Decoding Service Center Address
+                       // Decoding TPDU(SMS-DELIVER, SMS-STATUS)
+                       break;
+
+               case TAPI_EVENT_NETWORK_RADIO_INFO_IND:
+                       TelSmsDatapackageInfo_t *ptrDataPackage = NULL;
+                       printf("SMS Incoming Message\n");
+                       ptrDataPackage = (TelSmsDatapackageInfo_t *)EventData;
+                       // Decoding Service Center Address
+                       // Decoding TPDU(SMS-DELIVER, SMS-STATUS)
+                       break;
+
+               case TAPI_EVENT_NETWORK_SPN_INFO:
+                       TelSmsDatapackageInfo_t *ptrDataPackage = NULL;
+                       printf("SMS Incoming Message\n");
+                       ptrDataPackage = (TelSmsDatapackageInfo_t *)EventData;
+                       // Decoding Service Center Address
+                       // Decoding TPDU(SMS-DELIVER, SMS-STATUS)
+                       break;
+
+               case TAPI_EVENT_NETWORK_DISPLAYINFO_IND:
+                       TelSmsDatapackageInfo_t *ptrDataPackage = NULL;
+                       printf("SMS Incoming Message\n");
+                       ptrDataPackage = (TelSmsDatapackageInfo_t *)EventData;
+                       // Decoding Service Center Address
+                       // Decoding TPDU(SMS-DELIVER, SMS-STATUS)
+                       break;
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_2 Network Selection
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Network Selection</h3>
+Telephony provides APIs which can request the lower layers use the network (PLMN) which has been selected by the user from the Network List displayed to the User.
+
+@code
+int tel_select_network_automatic(int *pRequestId)
+int tel_select_network_manual(unsigned int Plmn, int *pRequestId)
+@endcode
+
+SAMPLE CODE:
+@code
+#include <ITapiNetwork.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+void select_nw()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN  Event Register and Deregister
+       int ret_status;
+       int pRequestID;
+       unsigned int plmn = 0;
+
+       //CASE 1. MANUAL MODE
+       plmn = 45454;
+       ret_status = tel_select_network_manual(Plmn, &pRequestId);
+
+       // CASE 2. AUTOMATIC MODE
+       // selectionMode = TAPI_NETWORK_SELECTIONMODE_AUTOMATIC;
+       ret_status = tel_select_network_automatic(&pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+
+       //WAIT FOR EVENT HERE
+}
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType)
+       {
+               case TAPI_EVENT_NETWORK_SELECT_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_SELECT_CNF $$$$$$ \n");
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_3 Network Search
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Network Search</h3>
+This API is used to search for the available networks, and to provide the Network List to the User/Application.
+
+@code
+int     tel_search_network (int *pRequestId);
+@endcode
+
+SAMPLE CODE:
+@code
+#include <ITapiNetwork.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+void searchnw()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN  Event Register and Deregister
+       int ret_status;
+
+       ret_status = tel_search_network(&pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //WAIT FOR EVENT HERE
+}
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType)   //REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_SEARCH_CNF:
+                       int ui_entry_count = 0;
+                       TelNetworkPlmnList_t *pNetSearchCnf;
+                       pNetSearchCnf = (TelNetworkPlmnList_t *)EventData;
+                       while (ui_entry_count <  pNetSearchCnf->networks_count)
+                       {
+                               printf("Type_of_plmn[%d] 0:unkwon,1:home,2:available,3:forbidden, NetworkName[%s]",
+                                               pNetSearchCnf->network_list[ui_entry_count].type_of_plmn,
+                                               pNetSearchCnf->network_list[ui_entry_count].network_name);
+                               printf("ServiceProviderName[%s]", pNetSearchCnf->network_list[ui_entry_count].service_provider_name);
+                               printf("PLMN ID[%lu]", pNetSearchCnf->network_list[ui_entry_count].plmn_id);
+                               ui_entry_count++;
+                       }
+                       break;
+       }
+       //...
+}
+@endcode
+@}
+@defgroup Use_Cases5_4 Selection Mode
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Selection Mode</h3>
+Telephony provides APIs to set and retrieve the current mode of network selection i.e. automatic or manual. Request for Automatic network selection or Manual network selection will allow OEM provider to do PLMN Selection based on network selection preference.
+
+@code
+int tel_get_network_selection_mode (int *pRequestId);
+@endcode
+
+SAMPLE CODE
+@code
+#include <ITapiNetwork.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+void get_selmode()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN  Event Register and Deregister
+       int ret_status;
+       int pRequestId;
+       //GET THE SELECTION MODE
+
+       ret_status = tel_get_network_selection_mode (&pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //WAIT FOR EVENT HERE
+}
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) // REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_GETSELECTIONMODE_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_GETSELECTIONMODE_CNF $$$$$$ \n");
+                       break;
+       }
+       //...
+}
+@endcode
+@}
+@defgroup Use_Cases5_5 Service Domain
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Service Domain</h3>
+Telephony provides APIs so that User/application can configure the service domain and also retrieve the present network service domain.
+
+@code
+int tel_set_network_service_domain (TelNetworkServiceDomain_t ServiceDomain, int *pRequestId);
+int tel_get_network_service_domain (int *pRequestId);
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <ITapiNetwork.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+void set_servicedomain()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN  Event Register and Deregister
+       int ret_status;
+       int pRequestId;
+       //SET NETWORK SERVICE DOMAIN
+       TelNetworkServiceDomain_t ServiceDomain = TAPI_NETWORK_SERVICE_DOMAIN_AUTOMATIC;
+
+       ret_status = tel_set_network_service_domain (ServiceDomain, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //WAIT FOR EVENT HERE
+}
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_SET_SVC_DOMAIN_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_SET_SVC_DOMAIN_CNF $$$$$$ \n");
+                       break;
+       }
+
+       //...
+}
+
+//GET NETWORK SERVICE DOMAIN
+#include <ITapiNetwork.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+void get_servicedomain()
+{
+       int ret_status;
+       ret_status = tel_get_network_service_domain (&pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //WAIT FOR EVENT HERE
+}
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_GET_SVC_DOMAIN_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_GET_SVC_DOMAIN_CNF $$$$$$ \n");
+                       break;
+                       //...
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_6 Network Mode
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Network Mode</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+@n The Network Mode (Automatic, GSM, and WCDMA) can be configured at OEM provider, based on which lower layers can scan only those radio access technologies, to register with network.
+
+@code
+int tel_set_network_mode (TelNetworkMode_t NwMode, int *pRequestId);
+int     tel_get_network_mode (int *pRequestId);
+@endcode
+
+SAMPLE CODE
+@code
+#include <ITapiNetwork.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+void setnwmode()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN  Event Register and Deregister
+       int ret_status;
+       int pRequestId;
+
+       ret_status = tel_set_network_mode(NwMode, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //WAIT FOR EVENT HERE
+}
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_SETNWMODE_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_SETNWMODE_CNF $$$$$$ \n");
+                       break;
+                       //...
+       }
+}
+
+//GET NETWORK MODE
+#include <ITapiNetwork.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+void getnwmode()
+{
+       int ret_status;
+       int pRequestId;
+
+       ret_status = tel_get_network_mode(&pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //WAIT FOR EVENT HERE
+}
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_GETNWMODE_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_GETNWMODE_CNF $$$$$$ \n");
+                       break;
+                       //...
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_7 Network Band
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Network Band</h3>
+Telephony provides APIs to set and retrieve the network band and allows the underlying OEM provider to scan the set band.
+
+@code
+int tel_set_network_band (TelNetworkBandPreferred_t BandMode, TelNetworkBand_t Band, int *pRequestId);
+int tel_get_network_band ( int *pRequestId);
+@endcode
+
+SAMPLE CODE:
+@code
+#include <ITapiNetwork.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+void setnwband()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN  Event Register and Deregister
+       int ret_status;
+       int pRequestId;
+       TelNetworkBandPreferred_t BandMode = TAPI_NETWORK_BAND_MODE_PREFERRED;
+       TelNetworkBand_t Band = TAPI_NETWORK_BAND_TYPE_GSM_900_1800;
+       int pRequestId = 0;
+
+       ret_status = tel_set_network_band (BandMode,Band, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //WAIT FOR EVENT HERE
+}
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_SETNWBAND_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_SETNWBAND_CNF $$$$$$ \n");
+                       break;
+                       //...
+       }
+}
+
+//GET NETWORK BAND
+#include <ITapiNetwork.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+void getnwband()
+{
+       int ret_status;
+       int pRequestId;
+       ret_status = tel_get_network_band (BandMode, Band, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //WAIT FOR EVENT HERE
+}
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) // REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_GETNWBAND_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_GTNWBAND_CNF $$$$$$ \n");
+                       break;
+                       //...
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_8 Preferred PLMN
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Preferred PLMN</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+@n Telephony provides APIs which can be used to set and retrieve the preferred plmn of network.
+
+@code
+int tel_set_network_preferred_plmn (TelNetworkPrefferedPlmnOp_t Operation, TelNetworkPrefferedPlmnInfo_t  PreffPlmnInfo, int *pRequestId);
+int tel_get_network_preferred_plmn ( int *pRequestId);
+@endcode
+
+SAMPLE CODE
+@code
+#include <ITapiNetwork.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+void set_preferredplmn()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN  Event Register and Deregister
+       int ret_status;
+       int pRequestId;
+
+       //SET PLMN
+       TelNetworkPrefferedPlmnOp_t Operation = TAPI_NETWORK_PREF_PLMN_ADD;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       unsigned char *plmn = "45454";
+
+       memset(&PreffPlmnInfo, 0, sizeof(TelNetworkPrefferedPlmnInfo_t));
+       PreffPlmnInfo.Index = 0;
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GSM;
+       memcpy(PreffPlmnInfo.Plmn, plmn, 6);
+
+       ret_status = tel_set_network_preferred_plmn (Operation,PreffPlmnInfo, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //WAIT FOR EVENT HERE
+}
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       //...
+       //...
+       switch (eventType) //REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_SETPREFFPLMN_CNF:
+                       printf("\n$$$$$$ TAPI TAPI_EVENT_NETWORK_SETPREFFPLMN_CNF $$$$$$ \n");
+                       break;
+       }
+       //...
+}
+@endcode
+
+@code
+//GET PLMN
+#include <ITapiNetwork.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+void get_preferredplmn()
+{
+       int ret_status;
+       int pRequestId;
+
+       ret_status = tel_get_network_preferred_plmn (&pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status); //WAIT FOR EVENT HERE
+       //WAIT FOR EVENT HERE
+}
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_GETPREFFPLMN_CNF:
+                       printf("\n$$$$$$ TAPI TAPI_EVENT_NETWORK_GETPREFFPLMN_CNF $$$$$$ \n");
+                       break;
+       }
+@endcode
+@}
+@defgroup Use_Cases5_9 Network Roaming Mode
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Network Roaming Mode</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+Telephony provides APIs which can be used to set and retrieve the mode of network roaming. This is for CDMA.
+
+@code
+int tel_set_network_roaming (TelNetworkRoamingMode_t *RoamingMode, int *pRequestId);
+int tel_get_network_roaming (int *pRequestId);
+@endcode
+
+SAMPLE CODE:
+@code
+//SetRoamingMode
+#include <ITapiNetwork.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+void set_roamingmode()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN  Event Register and Deregister
+
+       TelNetworkRoamingMode_t roamingMode;
+       int ret_status;
+
+       roamingMode.pref_net_type = TAPI_NETWORK_PREF_NET_HOME_ONLY;
+       roamingMode.prl_pref_only = TAPI_NETWORK_PRL_PREF_ONLY_ON;
+
+       ret_status = tel_get_network_roaming (&roamingMode, &requestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("Successful\n");
+       else
+               printf("error:%d\n", ret_status);
+
+       //WAIT FOR EVENT HERE
+}
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_SET_ROAMING_MODE_CNF:
+                       printf("$$$$$TAPI_EVENT_NETWORK_SET_ROAMING_MODE_CNF$$$$$\n");
+                       //....
+                       break;
+       }
+       //...
+}
+@endcode
+
+@code
+//GetRoamingMode
+#include<stdio.h>
+#include<TapiCommon.h>
+#include<ITapiNetwork.h>
+void set_roamingmode()
+{
+       int ret_status;
+
+       ret_status = tel_get_network_roaming(&requestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               ("Successful\n");
+       else
+               printf("error:%d\n", ret_status);
+
+       //WAIT FOR EVENT HERE
+}
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_GET_ROAMING_MODE_CNF:
+                       printf("$$$$TAPI_EVENT_NETWORK_GET_ROAMING_MODE_CNF$$$$\n");
+                       //...
+                       break;
+       }
+       //...
+}
+@endcode
+@}
+@defgroup Use_Cases5_10 Network CDMA Hybrid Mode
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Network CDMA Hybrid Mode</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+Telephony provides APIs which can be used to set and get the CDMA Hybrid Mode. This is for CDMA.
+Hybrid means 1x only, EVDO only combined. we can set network mode separately also in CDMA network.
+
+@code
+int tel_set_network_hybrid_in_cdma (TelNetworkCDMAHybridMode_t CDMAHybridMode, int *pRequestId);
+int tel_get_network_hybrid_in_cdma (int *pRequestId);
+@endcode
+
+SAMPLE CODE:
+@code
+//Set CDMA Hybrid Mode
+#include <ITapiNetwork.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+void set_hybridmode()
+{
+       int ret_status;
+
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN  Event Register and Deregister
+
+       TelNetworkCDMAHybridMode_t cdmaHybridMode;
+       cdmaHybridMode = TAPI_NETWORK_CDMA_HYBRID; // TAPI_NETWORK_CDMA_1X_ONLY, TAPI_NETWORK_CDMA_EVDO_ONLY, TAPI_NETWORK_CDMA_HYBRID(1X + EVDO)
+
+       ret_status = tel_get_network_hybrid_in_cdma(cdmaHybridMode, &requestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("Successful\n");
+       else
+               printf("error:%d\n", ret_status);
+
+       //WAIT FOR EVENT HERE
+}
+//CALLBACK FUNCTION TO BE USED
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_SET_CDMA_HYBRID_MODE_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_SET_CDMA_HYBRID_MODE_CNF $$$$$$ \n");
+                       break;
+                       //...
+       }
+}
+@endcode
+
+@code
+//Get CDMA Hybrid Mode
+#include<stdio.h>
+#include<TapiCommon.h>
+#include<ITapiNetwork.h>
+void get_hybridmode()
+{
+       int ret_status;
+
+       ret_status = tel_get_network_hybrid_in_cdma (&requestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf(successful\n);
+       else
+               printf(error=%d\n, ret_status);
+       //WAIT FOR EVENT HERE
+}
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //...
+
+       eventClass = event->EventClass;
+
+       eventType = event->EventType;
+
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_GET_CDMA_HYBRID_MODE_CNF:
+                       printf("$$$$$TAPI_EVENT_NETWORK_GET_CDMA_HYBRID_MODE_CNF$$$$\n");
+                       //...
+                       break;
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_11 SIM
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">SIM</h3>
+Event Register and Deregister
+To receive asynchronous event notifications for the SIM APIs, the registration of related events with their associated call backs is required. When an asynchronous API is called, the confirmation is returned as an asynchronous event notification which invokes the callback function along with the event data.
+
+SAMPLE CODE:
+@code
+// REGISTER EVENT
+unsigned int subscription_id = 0;
+TapiResult_t api_err;
+
+api_err = TelTapiInit();
+if (api_err != TAPI_API_SUCCESS)
+{
+       TEST_DEBUG("TelTapiInit Failed - api_err = %d \n", api_err);
+}
+
+api_err = TelTapiRegisterEvent (TAPI_EVENT_SIM_ENABLE_PERS_CNF, &subscription_id, (TelAppCallback)&app_callback);
+printf("VSIM Event registration is Done: sub id is %d, api_err is %d\n",subscription_id,api_err);
+
+
+// DEREGISTER EVENT
+api_err = TelTapiDeRegister(subscription_id);
+if (api_err != TAPI_API_SUCCESS)
+{
+       printf("Event Class Unregeration Fail\n");
+
+}
+@endcode
+@}
+@defgroup Use_Cases5_12 PIN, SIM Lock operations
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">PIN, SIM Lock operations</h3>
+Telephony provides APIs to enable/disable pin, change pin, unblock pin, pin verification and sim lock enable/disable/verification. It is also possible to retrieve the pin/sim lock status.
+
+@code
+int tel_enable_sim_security(TelSimSecPw_t *sec_data, int *req_id);
+int tel_disable_sim_security(TelSimSecPw_t *sec_data, int *req_id);
+int  tel_change_sim_pins(const TelSimSecPw_t *old_pin , const TelSimSecPw_t *new_pin, int *req_id);
+int tel_verify_sim_puks(const TelSimSecPw_t *puk_data, const TelSimSecPw_t *new_pin_data, int *req_id)
+int  tel_verifiy_sim_pins(const TelSimSecPw_t *pin_data, int *req_id)
+int  tel_get_sim_security_status(TelSimPinType_t type, TelSimPinStatus_t *status)
+@endcode
+
+SAMPLE CODE: PIN1/PIN2/SIM LOCK/PUK1 VERIFICATION AND CHANGE PIN1
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//  OPERATION REQUEST PIN1 VERIFICATION PART
+#define PIN1_NORMAL "0000" //Sample PIN1 code
+
+Void pin1_verify()
+{
+       int request_id = 0;
+       int err_code;
+       int length = TAPI_SIM_PIN_LENGTH + 1;
+       char init_pin_val[length] ;
+       TelSimSecPw_t pin_data;
+
+       strcpy(init_pin_val, PIN1_NORMAL);
+
+       pin_data.type = TAPI_SIM_PTYPE_PIN1;
+       pin_data.pw_len = strlen(init_pin_val);
+
+       printf("pw_len[%d]", pin_data.pw_len);
+
+       pin_data.pw = (char*)malloc(length);
+       memcpy(pin_data.pw, init_pin_val, length);
+
+       err_code = tel_verifiy_sim_pins(&pin_data, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT FOR EVENT FROM HERE
+}
+
+//  OPERATION REQUEST PIN2 VERIFICATION PART
+#define PIN2_NORMAL "0000" //Sample PIN2 code
+Void verify_pin2()
+{
+       int request_id = 0;
+       int err_code;
+       int length = TAPI_SIM_PIN_LENGTH+1;
+       char init_pin_val[length] ;
+       TelSimSecPw_t pin_data;
+
+       strcpy(init_pin_val, PIN2_NORMAL);
+
+       pin_data.type = TAPI_SIM_PTYPE_PIN2;
+       pin_data.pw_len = strlen(init_pin_val);
+
+       printf("pw_len[%d]", pin_data.pw_len);
+
+       pin_data.pw = (char*)malloc(length);
+       memcpy(pin_data.pw, init_pin_val, length);
+
+       err_code = tel_verifiy_sim_pins(&pin_data, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT FOR EVENT FROM HERE
+}
+
+//  OPERATION REQUEST CHANGE PIN1 PART
+#define PIN1_ORG "0000" //Sample old PIN1 code
+#define PIN1_NEW "1111" //Sample new PIN1 code
+void change_pins()
+{
+       int request_id = 0;
+       int err_code;
+       int length = TAPI_SIM_PIN_LENGTH+1;
+       char init_old_pin_val[length] ;
+       char init_new_pin_val[length];
+       TelSimSecPw_t old_pin;
+       TelSimSecPw_t new_pin;
+
+       memset(&init_old_pin_val, 0, length);
+       memset(&init_new_pin_val, 0, length);
+
+       strcpy(init_old_pin_val, PIN1_ORG);
+
+       old_pin.type = TAPI_SIM_PTYPE_PIN1;
+       old_pin.pw_len = strlen(init_old_pin_val);
+       printf("pw_len[%d]", old_pin.pw_len);
+       old_pin.pw = (char*)malloc(length);
+       memcpy(old_pin.pw, init_old_pin_val, length);
+
+       strcpy(init_new_pin_val, PIN1_NEW);
+
+       new_pin.type = TAPI_SIM_PTYPE_PIN1;
+       new_pin.pw_len = strlen(init_new_pin_val);
+       printf("pw_len[%d]", new_pin.pw_len);
+       new_pin.pw = (char*)malloc(length);
+       memcpy(new_pin.pw, init_new_pin_val, length);
+
+       err_code = tel_change_sim_pins(&old_pin, &new_pin, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT EVENT RESPONSE FROM HERE
+}
+
+//  OPERATION REQUEST VERIFICATION PUK1 PART
+#define PUK1_NORMAL "00000000" //Sample PUK1 code
+#define PIN1_NORMAL "0000" //Sample PIN1 code
+
+void verify_puks()
+{
+       int request_id = 0;
+       int err_code;
+       int length = TAPI_SIM_PIN_LENGTH + 1;
+
+       char init_pin_val[length];
+       char init_puk_val[length];
+
+       TelSimSecPw_t puk_data;
+       TelSimSecPw_t new_pin_data;
+
+       strcpy(init_pin_val, PIN1_NORMAL);
+       strcpy(init_puk_val, PUK1_NORMAL);
+
+       puk_data.type = TAPI_SIM_PTYPE_PUK1;   // 0x00
+       puk_data.pw_len = length;
+       puk_data.pw_len = strlen(init_puk_val);
+       printf("pw_len[%d]", puk_data.pw_len);
+       memcpy(puk_data.pw, init_pin_val, length);
+
+       new_pin_data.type = TAPI_SIM_PTYPE_PIN1;   // 0x00
+       new_pin_data.pw_len = strlen(init_pin_val);
+       printf("pw_len[%d]", new_pin_data.pw_len);
+       new_pin_data.pw = (char*)malloc(length);
+       memcpy(new_pin_data.pw, init_pin_val, length);
+
+       err_code = tel_verify_sim_puks(&puk_data, &new_pin_data, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT EVENT RESPONSE FROM HERE
+}
+//  OPERATION REQUEST SIM LOCK VERIFICATION PART
+#define SIM_NORMAL "0000" //Sample SIM Lock code
+Void verify_sim()
+{
+       int request_id = 0;
+       int err_code;
+       int length = TAPI_SIM_PIN_LENGTH + 1;
+       char init_pin_val[length] ;
+       TelSimSecPw_t pin_data;
+
+       strcpy(init_pin_val, SIM_NORMAL);
+
+       pin_data.type = TAPI_SIM_PTYPE_SIM;
+       pin_data.pw_len = strlen(init_pin_val);
+
+       printf("pw_len[%d]", pin_data.pw_len);
+
+       pin_data.pw = (char*)malloc(length);
+       memcpy(pin_data.pw, init_pin_val, length);
+
+       err_code = tel_verifiy_sim_pins(&pin_data, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT FOR EVENT FROM HERE
+}
+
+//  EVENT RESPONSE PART
+//CALLBACK FUNCTION TO BE USED
+
+static void app_callback(TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*)event;
+
+       unsigned int temp_handle = -1;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       printf("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       switch (EventType)
+       {
+               case TAPI_EVENT_SIM_VERIFY_SEC_CNF:
+                       printf("********TAPI_EVENT_SIM_VERIFY_SEC_CNF**********");
+
+                       TelSimSecResult_t *pPinInfo = (TelSimSecResult_t*) EventData;
+
+                       if (status == TAPI_SIM_OPERATION_TIMEOUT )
+                       {
+                               printf("TAPI SIM Operation Timeout!!");
+                       }
+                       else if (sim_event->Status == TAPI_SIM_PIN_OPERATION_SUCCESS)
+                       {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1)
+                               {
+                                       printf("PIN1 Verification Success!");
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_SIM)
+                               {
+                                       printf("SIM Lock Verification Success!");
+                               }
+                               else
+                               {
+                                       printf("PIN2 Vefication Success!");
+                               }
+                       }
+                       else
+                       {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1)
+                               {
+                                       printf("PIN1 Verification Failed! - PIN Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK1)
+                               {
+                                       printf("PIN1 Verification Failed! - PUK Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2)
+                               {
+                                       printf("PIN2 Verification Failed! - PIN2 Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK2)
+                               {
+                                       printf("PIN2 Verification Failed! - PUK2 Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_SIM)
+                               {
+                                       printf("SIM Lock Verification Failed! - SIM Lock code Required");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                       }
+                       printf("********************************************");
+                       break;
+
+               case TAPI_EVENT_SIM_VERIFY_PUK_CNF:
+                       printf("**********TAPI_EVENT_SIM_VERIFY_PUK_CNF********");
+
+                       TelSimSecResult_t *pPinInfo = (TelSimSecResult_t*)EventData;
+
+                       if (status == TAPI_SIM_PIN_OPERATION_SUCCESS)
+                       {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1)
+                               {
+                                       printf("Unblock PIN1 Success!");
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2)
+                               {
+                                       printf("Unblock PIN2 Success!");
+                               }
+                       }
+                       else
+                       {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PUK1)
+                               {
+                                       printf("PIN1 Verification Failed! - PUK Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK2)
+                               {
+                                       printf("PIN2 Verification Failed! - PUK2 Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                       }
+                       printf("********************************************");
+                       break;
+
+               case TAPI_EVENT_SIM_CHANGE_PINS_CNF:
+                       printf("*********TAPI_EVENT_SIM_CHANGE_PINS_CNF*******************");
+
+                       TelSimSecResult_t *pPinInfo = (TelSimSecResult_t*)EventData;
+
+                       printf("PinType[%d]", pPinInfo->type);
+
+                       if (status == TAPI_SIM_PIN_OPERATION_SUCCESS)
+                       {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1)
+                               {
+                                       printf("Change PIN1 Success!");
+                               }
+                               else
+                               {
+                                       printf("Change PIN2 Success!");
+                               }
+
+                       }
+                       else
+                       {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1)
+                               {
+                                       printf("Change PIN1 Failed! - PIN Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK1)
+                               {
+                                       printf("Change PIN1 Failed! - PUK Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2)
+                               {
+                                       printf("Change PIN2 Failed! - PIN2 Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK2)
+                               {
+                                       printf("Change PIN2 Failed! - PUK2 Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                       }
+                       printf("********************************************");
+                       break;
+       }
+       //...
+}
+@endcode
+
+SAMPLE CODE: ENABLE/DISABLE PIN1 and SIM LOCK
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//  OPERATION REQUEST DISABLING PIN1 PART
+#define PIN1_NORMAL "0000" //Sample PIN1 code
+void disable_pin1()
+{
+       int request_id = 0;
+       int err_code;
+       int length = TAPI_SIM_PIN_LENGTH+1;
+       char init_pin_val[length];
+
+       strcpy(init_pin_val, PIN1_NORMAL);
+
+       TelSimSecPw_t sec_data;
+       sec_data.type = TAPI_SIM_PTYPE_PIN1;   // 0x00
+       sec_data.pw_len = strlen(init_pin_val);
+       printf("pw_len[%d]", sec_data.pw_len);
+
+       sec_data.pw = (char*)malloc(length);
+       memcpy(sec_data.pw, init_pin_val, length);
+
+       err_code = tel_disable_sim_security(&sec_data, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT EVENT RESPONSE FROM HERE
+}
+
+//  OPERATION REQUEST ENABLING PIN1 PART
+#define PIN1_NORMAL "0000" //Sample PIN1 code
+void enable_pin1()
+{
+       int request_id = 0;
+       int err_code;
+       int length = TAPI_SIM_PIN_LENGTH+1;
+       char init_pin_val[length];
+
+       strcpy(init_pin_val, PIN1_NORMAL);
+
+       TelSimSecPw_t sec_data;
+       sec_data.type = TAPI_SIM_PTYPE_PIN1;   // 0x00
+       sec_data.pw_len = strlen(init_pin_val);
+       printf("pw_len[%d]", sec_data.pw_len);
+
+       sec_data.pw = (char*)malloc(length);
+       memcpy(sec_data.pw, init_pin_val, length);
+
+       err_code = tel_enable_sim_security(&sec_data, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       //WAIT EVENT RESPONSE FROM HERE
+}
+
+//  OPERATION REQUEST DISABLING SIM LOCK PART
+#define SIM_NORMAL "0000" //Sample SIM LOCK code
+void disable_sim()
+{
+       int request_id = 0;
+       int err_code;
+       int length = TAPI_SIM_PIN_LENGTH+1;
+       char init_pin_val[length];
+
+       strcpy(init_pin_val, SIM_NORMAL);
+
+       TelSimSecPw_t sec_data;
+       sec_data.type = TAPI_SIM_PTYPE_SIM;   // 0x00
+       sec_data.pw_len = strlen(init_pin_val);
+       printf("pw_len[%d]", sec_data.pw_len);
+
+       sec_data.pw = (char*)malloc(length);
+       memcpy(sec_data.pw, init_pin_val, length);
+
+       err_code = tel_disable_sim_security(&sec_data, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       //WAIT EVENT RESPONSE FROM HERE
+}
+
+
+//  OPERATION REQUEST ENABLING SIM LOCK PART
+#define SIM_NORMAL "0000" //Sample SIM LOCK code
+void enable_sim()
+{
+       int request_id = 0;
+       int err_code;
+       int length = TAPI_SIM_PIN_LENGTH+1;
+       char init_pin_val[length];
+
+       strcpy(init_pin_val, SIM_NORMAL);
+
+       TelSimSecPw_t sec_data;
+       sec_data.type = TAPI_SIM_PTYPE_SIM;   // 0x00
+       sec_data.pw_len = strlen(init_pin_val);
+       printf("pw_len[%d]", sec_data.pw_len);
+
+       sec_data.pw = (char*)malloc(length);
+       memcpy(sec_data.pw, init_pin_val, length);
+
+       err_code = tel_enable_sim_security(&sec_data, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       //WAIT EVENT RESPONSE FROM HERE
+}
+
+
+//  EVENT RESPONSE PART
+//CALLBACK FUNCTION TO BE USED
+static void app_callback(TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event;
+
+       unsigned int temp_handle = -1;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       printf("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       switch (EventType)
+       {
+               case TAPI_EVENT_SIM_DISABLE_SEC_CNF:
+                       printf("****************TAPI_EVENT_SIM_DISABLE_SEC_CNF****************");
+
+                       TelSimSecResult_t *pPinInfo = (TelSimSecResult_t*)EventData;
+
+                       if (status == TAPI_SIM_PIN_OPERATION_SUCCESS)
+                       {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1)
+                               {
+                                       printf("Disable PIN1 Success!");
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2)
+                               {
+                                       printf("Disable PIN2 Success!");
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_SIM)
+                               {
+                                       printf("Disable SIM LOCK Success!");
+                               }
+                       }
+                       else
+                       {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1)
+                               {
+                                       printf("Disable PIN1 Failed! - PIN1Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2)
+                               {
+                                       printf("Disable PIN2 Failed! - PIN2 Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK1)
+                               {
+                                       printf("Disable PIN1 Failed! - PUK1 Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK2)
+                               {
+                                       printf("Disable PIN2 Failed! - PUK2 Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_SIM)
+                               {
+                                       printf("Disable SIM LOCK Failed! - SIM LOCK CODE Required ");
+                               }
+                       }
+                       printf("********************************************");
+                       break;
+
+               case TAPI_EVENT_SIM_ENABLE_SEC_CNF:
+                       printf("*****************TAPI_EVENT_SIM_ENABLE_SEC_CNF****************");
+
+                       TelSimSecResult_t *pPinInfo = (TelSimSecResult_t*)EventData;
+
+                       if (status == TAPI_SIM_PIN_OPERATION_SUCCESS)
+                       {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1)
+                               {
+                                       printf("Enable PIN1 Success!");
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2)
+                               {
+                                       printf("Enable PIN2 Success!");
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_SIM)
+                               {
+                                       printf("Enable SIM LOCK Success!");
+                               }
+                       }
+                       else
+                       {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1)
+                               {
+                                       printf("Enable PIN1 Failed! - PIN1Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2)
+                               {
+                                       printf("Enable PIN2 Failed! - PIN2 Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK1)
+                               {
+                                       printf("Enable PIN1 Failed! - PUK1 Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK2)
+                               {
+                                       printf("Enable PIN2 Failed! - PUK2 Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_SIM)
+                               {
+                                       printf("Enable SIM LOCK Failed! - SIM LOCK CODE Required ");
+                               }
+                       }
+                       printf("********************************************");
+                       break;
+       }
+       //...
+}
+@endcode
+
+SAMPLE CODE: GET PIN1/PIN2/SIM LOCK STATUS
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//  OPERATION REQUEST GET PIN1/PIN2/SIM LOCK STATUS PART
+void get_security_status()
+{
+       int error_code;
+       TelSimPinType_t type = TAPI_SIM_PTYPE_PIN1 // or TAPI_SIM_PTYPE_PIN2 or TAPI_SIM_PTYPE_SIM;
+       TelSimPinStatus_t status = -1;
+       printf("Get Security status");
+
+       err_code = tel_get_sim_security_status(type, &status);
+       if (err_code == TAPI_API_SUCCESS)
+       {
+               printf(" *****************************************************");
+               switch (status)
+               {
+                       case TAPI_SIM_PIN_STATUS_DISABLED:
+                               printf("TAPI_SIM_PIN_STATUS_DISABLED ");
+                               break;
+
+                       case TAPI_SIM_PIN_STATUS_ENABLED:
+                               printf("TAPI_SIM_PIN_STATUS_ENABLED ");
+                               break;
+
+                       case TAPI_SIM_PIN_STATUS_BLOCKED:
+                               printf("TAPI_SIM_PIN_STATUS_BLOCKED ");
+                               break;
+
+                       case TAPI_SIM_PIN_STATUS_PUK_BLOCKED:
+                               printf("TAPI_SIM_PIN_STATUS_PUK_BLOCKED ");
+                               break;
+
+                       case TAPI_SIM_PIN_STATUS_UNKNOWN:
+                               printf("TAPI_SIM_PIN_STATUS_UNKNOWN ");
+                               break;
+
+                       default:
+                               printf(" Default case statment: sim_status(%d)", status);
+                               break;
+               }
+       }
+       else
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       printf("*****************************************************");
+}
+@endcode
+@}
+@defgroup Use_Cases5_13 Personalisation Lock
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Personalisation Lock</h3>
+These APIs are used to enable/disable and get the status information about personalisation of network, network subset, corporate, service provider personalisation.
+
+@code
+int tel_enable_sim_personalization(TelSimPersPw_t *pers_data, int *req_id);
+int tel_disable_sim_personalization(TelSimPersPw_t *pers_data, int *req_id);
+int tel_get_sim_personalization_status(TelSimPersType_t type, int *req_id);
+@endcode
+
+SAMPLE CODE: GET PERSONALIZATION STATUS
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENIONED IN Event Register and Deregister
+//  OPERATION REQUEST GET NETWORK PERSONALIZATION PART
+void get_net_pers()
+{
+       int request_id = 0;
+       int err_code;
+
+       TelSimPersType_t type = TAPI_SIM_PERS_NET;
+
+       err_code = tel_get_sim_personalization_status(type, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT EVENT RESPONSE FROM HERE
+}
+
+//  EVENT RESPONSE PART
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_SIM_PERS_STATUS_CNF:
+                       int i = 0;
+                       TelSimPersStatus_t* pers_status = (TelSimPersStatus_t*)EventData;
+
+                       printf("[SIM APP]*********** TAPI_EVENT_SIM_PERS_STATUS_CNF************\n");
+                       printf("[SIM APP]SIM lock personalisation event status = [%x]\n", status);
+                       printf("[SIM APP]SIM lock personalisation status - net0-ns1-sp2-cp3  = [%d]\n", pers_status->type);
+                       printf("[SIM APP]SIM lock personalisation status - unlock0-lock1  = [%d]\n", pers_status->mode);
+                       printf("[SIM APP]***************************************************\n");
+                       break;
+       }
+}
+@endcode
+
+SAMPLE CODE: ENABLE/DISABLE PERSONALIZATION
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENIONED IN Event Register and Deregister
+//  OPERATION REQUEST ENABLING NETWORK PERSONALIZATION PART
+#define NET_ENCODE "54500112345678" //Sample Network Personalization code
+void enable_net_pers()
+{
+       printf("Lock Personalisation MCC+MNC 5\n");
+       printf("Plese input Network Lock CODE : length of MCC+MNC, MCC, MNC, NCK\n");
+       printf("We need to use this for testing : length of MCC+MNC(5), MCC(450), MNC(01), NCK(12345678) => 54500112345678\n");
+
+       int request_id = 0;
+       int err_code;
+       int length = 14+1;
+       char init_pin_val[length];
+
+       strcpy(init_pin_val, NET_ENCODE);
+
+       TelSimPersPw_t lock_pers = {0,};
+       lock_pers.type = TAPI_SIM_PERS_NET;
+       lock_pers.pw_len = 14;
+       lock_pers.pw = (char*)malloc(length);
+       memcpy(lock_pers.pw, init_password_val, length);
+
+       err_code = tel_enable_sim_personalization(&lock_pers, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT EVENT RESPONSE FROM HERE
+}
+
+//  OPERATION REQUEST DISABLING NETWORK PERSONALIZATION PART
+#define NET_DISCODE "12345678" //Sample Network Personalization code
+void disable_net_pers()
+{
+       printf("de Personalisation key is 8 byte \n");
+       printf("We need to use this for testing : 12345678\n");
+
+       int request_id = 0;
+       int err_code;
+       int length = 8+1;
+       char init_pin_val[length];
+
+       strcpy(init_pin_val, NET_DISCODE);
+
+       TelSimPersPw_t lock_pers = {0,};
+       lock_pers.pw_len =  8; //control key
+       lock_pers.pw = (char*)malloc(length);
+       memcpy(lock_pers.pw,init_password_val,length);
+
+       err_code = tel_disable_sim_personalization(&lock_pers, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT EVENT RESPONSE FROM HERE
+}
+
+//  EVENT RESPONSE PART
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_SIM_DISABLE_PERS_CNF:
+                       TelSimPinOperationResult_t opResult = (TelSimPinOperationResult_t)status;
+
+                       printf("[SIM APP]**** *TAPI_EVENT_SIM_DISABLE_PERS_CNF********\n");
+                       printf("[SIM APP]Eable Personalization event status = [%x]\n", opResult);
+
+                       if (opResult == TAPI_SIM_PIN_OPERATION_SUCCESS)
+                       {
+                               ("[SIM APP]Disable Personalization Success!\n");
+                       }
+                       else
+                       {
+                               printf("[SIM APP]Verification Failed! - Correct Password Required\n");
+                       }
+                       printf("\n***************************************************************\n");
+                       break;
+
+               case TAPI_EVENT_SIM_ENABLE_PERS_CNF:
+                       TelSimPinOperationResult_t opResult = (TelSimPinOperationResult_t)status;
+
+                       printf("[SIM APP]****** *TAPI_EVENT_SIM_ENABLE_PERS_CNF*********\n");
+                       printf("[SIM APP]Eable Personalization event status = [%x]\n", opResult);
+
+                       if (opResult == TAPI_SIM_PIN_OPERATION_SUCCESS)
+                       {
+                               printf("[SIM APP]Enable Personalization Success!\n");
+                       }
+                       else
+                       {
+                               printf("[SIM APP]Verification Failed! - Correct Password Required\n");
+                       }
+                       printf("\n***************************************************************\n");
+                       break;
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_14 FDN
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">FDN</h3>
+These APIs are used to enable/disable FDN and to retrieve the current FDN status.
+
+@code
+int tel_enable_sim_fdn(const unsigned char *pin2, int *pin2_len, int *req_id);
+int tel_disable_sim_fdn(const unsigned char *pin2, int *pin2_len, int *req_id);
+int tel_get_sim_fdn_status(int *fdn_status);
+@endcode
+
+SAMPLE CODE
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENIONED IN Event Register and Deregister
+
+//  OPERATION REQUEST ENABLE FDN MODE PART
+#define PIN2_NORMAL "0000" //Sample PIN2 code
+void enable_fdn()
+{
+       int request_id = 0;
+       int api_ret;
+       int length = TAPI_SIM_PIN_LENGTH+1;
+       char init_pin_val[length] ;
+
+       strcpy(init_pin_val, PIN2_NORMAL);
+
+       TelSimSecPw_t pin_data = {0,};
+
+       pin_data.type = TAPI_SIM_PTYPE_PIN2;
+       pin_data.pw_len = strlen(init_pin_val);
+
+       printf("pw_len[%d]", pin_data.pw_len);
+
+       pin_data.pw = (char*)malloc(length);
+       memcpy(pin_data.pw, init_pin_val, length);
+
+       err_code = tel_enable_sim_fdn(pin_data.pw, &pin_data.pw_len, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT FOR EVENT FROM HERE
+}
+
+
+//  OPERATION REQUEST DISABLE FDN MODE PART
+#define PIN2_NORMAL "0000" //Sample PIN2 code
+void disable_fdn()
+{
+       int request_id = 0;
+       int api_ret;
+       int length = TAPI_SIM_PIN_LENGTH+1;
+       char init_pin_val[length] ;
+
+       strcpy(init_pin_val, PIN2_NORMAL);
+
+       TelSimSecPw_t pin_data = {0,};
+
+       pin_data.type = TAPI_SIM_PTYPE_PIN2;
+       pin_data.pw_len = strlen(init_pin_val);
+
+       printf("pw_len[%d]", pin_data.pw_len);
+
+       pin_data.pw = (char*)malloc(length);
+       memcpy(pin_data.pw, init_pin_val, length);
+
+       err_code = tel_disable_sim_fdn(pin_data.pw, &pin_data.pw_len, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT FOR EVENT FROM HERE
+
+
+       //  EVENT RESPONSE PART
+       //CALLBACK FUNCTION TO BE USED
+       static void app_callback (TelTapiEvent_t *event)
+       {
+               int eventClass;
+               int eventType;
+               int requestId;
+               int status;
+               void* EventData = NULL;
+
+               TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event;
+
+               unsigned int temp_handle = -1;
+               //
+               eventClass = event->EventClass;
+               eventType = event->EventType;
+               requestId = event->RequestId;
+               status = event->Status;
+               EventData = event->pData;
+
+               switch (eventType)
+               {
+                       case TAPI_EVENT_SIM_DISABLE_FDNMODE_CNF:
+                               printf("**********TAPI_EVENT_SIM_DISABLE_FDNMODE_CNF***********");
+
+                               TelSimSecResult_t *pPinInfo = (TelSimSecResult_t*)EventData;
+
+                               if (status == TAPI_SIM_PIN_OPERATION_SUCCESS)
+                               {
+                                       if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2)
+                                       {
+                                               printf("Disable FDN Success!");
+                                       }
+                                       else
+                                       {
+                                               printf("Unhandled type[%d]", pPinInfo->type);
+                                       }
+                               }
+                               else
+                               {
+                                       if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2)
+                                       {
+                                               printf("Disable FDN Failed! - PIN2 Required ");
+                                               printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                                       }
+                                       else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK2)
+                                       {
+                                               printf("Disable FDN Failed! - PUK2 Required ");
+                                               printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                                       }
+                                       else
+                                       {
+                                               printf("Unhandled type[%d]", pPinInfo->type);
+                                       }
+                               }
+                               printf("********************************************");
+                               break;
+
+                       case TAPI_EVENT_SIM_ENABLE_FDNMODE_CNF:
+                               printf("*******TAPI_EVENT_SIM_ENABLE_FDNMODE_CNF*******");
+
+                               TelSimSecResult_t *pPinInfo = (TelSimSecResult_t*)EventData;
+
+                               if (status == TAPI_SIM_PIN_OPERATION_SUCCESS)
+                               {
+                                       if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2)
+                                       {
+                                               printf("Enable FDN Success!");
+                                       }
+                                       else
+                                       {
+                                               printf("Unhandled type[%d]", pPinInfo->type);
+                                       }
+                               }
+                               else
+                               {
+                                       if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2)
+                                       {
+                                               printf("Enable FDN Failed! - PIN2 Required ");
+                                               printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                                       }
+                                       else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK2)
+                                       {
+                                               printf("Enable FDN Failed! - PUK2 Required ");
+                                               printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                                       }
+                                       else
+                                       {
+                                               printf("Unhandled type[%d]", pPinInfo->type);
+                                       }
+                               }
+                               printf("********************************************");
+                               break;
+               }
+       }
+
+
+       //  OPERATION REQUEST GET FDN STATUS PART
+       void get_fdn_status()
+       {
+               printf("Get FDN status");
+               int fdn_status = 0 ;
+
+               err_code = tel_get_sim_fdn_status(&fdn_status);
+               if (err_code == TAPI_API_SUCCESS)
+               {
+                       if (fdn_status == 0)
+                       {
+                               printf("*************************");
+                               printf("FDN disabled ");
+                               printf("*************************");
+                       }
+                       else
+                       {
+                               printf("*************************");
+                               printf("FDN enabled");
+                               printf("*************************");
+                       }
+               }
+               else
+               {
+                       printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+               }
+
+       }
+@endcode
+@}
+@defgroup Use_Cases5_15 IMSI Information
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">IMSI Information</h3>
+This API retrieves the IMSI (International Mobile Subscriber Identity) information.
+
+@code
+int tel_get_sim_imsi(TelSimImsiInfo_t* imsi);
+@endcode
+
+SAMPLE CODE:
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+void getimsiInfo()
+{
+       int err_code;
+       TelSimImsiInfo_t sim_imsi_info;
+
+       err_code = tel_get_sim_imsi (&sim_imsi_info);
+       if (err_code == TAPI_API_SUCCESS)
+       {
+               printf("[SIM APP] IMSI [mcc,mnc,msin]= ");
+               printf(" [%s]",sim_imsi_info.szMcc);
+               printf(" [%s]",sim_imsi_info.szMnc);
+               printf(" [%s]",sim_imsi_info.szMsin);
+       }
+       else
+       {
+               printf("Error Code [%x]\n", err_code);
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_16 ECC Information
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">ECC Information</h3>
+This API retreieves the ECC (Emergency Call Codes) data.
+
+@code
+int tel_get_sim_ecc(TelSimEccData_t *ecc_data, int *ecc_count);
+@endcode
+
+SAMPLE CODE:
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+void geteccinfo()
+{
+       int err_code;
+       int ecc_rec_count = 0;
+       TelSimEccData_t  ecc_info = {0,};
+
+       err_code = tel_get_sim_ecc (&ecc_info, &ecc_rec_count);
+       printf("The Retrun Status is %d", err_code);
+
+       printf(" ECC count [%d]\n", ecc_rec_count);
+       printf("ECC1 [%s]\n", ecc_info.EccInfo.szEcc1);
+       printf("ECC2 [%s]\n", ecc_info.EccInfo.szEcc2);
+       printf("ECC3 [%s]\n", ecc_info.EccInfo.szEcc3);
+       printf("ECC4 [%s]\n", ecc_info.EccInfo.szEcc4);
+       printf("ECC5 [%s]\n", ecc_info.EccInfo.szEcc5);
+}
+
+void get_uecc()
+{
+       int err_code;
+       int i = 0;
+       int uecc_rec_count = 0;
+
+       printf(" Get USIM ECC  ");
+
+       TelSimEccData_t uecc_info = {{{0,}}};
+
+       err_code = tel_get_sim_ecc(&uecc_info, &uecc_rec_count);
+       if (err_code == TAPI_API_SUCCESS)
+       {
+               printf("ECC count [%d]",uecc_rec_count );
+
+               for (i=0; i<uecc_rec_count; i++)
+               {
+                       printf("Loop(%d): ", i);
+                       printf(" ECC Used [%d]", uecc_info.UeccInfo[i].bUsed);
+                       printf(" ECC Len [%d]", uecc_info.UeccInfo[i].EccLen);
+
+                       if (NULL != uecc_info.UeccInfo[i].szEcc)
+                       {
+                               printf("ECC string [%s]", uecc_info.UeccInfo[i].szEcc);
+                       }
+                       else
+                       {
+                               printf("ECC string [null]");
+                       }
+
+                       printf("ECC alphaID [%s]",uecc_info.UeccInfo[i].szEccAlphaIdentifier);
+               }
+       }
+       else
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_17 Language Preference Information
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Language Preference Information</h3>
+These APIs are used to get and set the language preference information stored in SIM.
+
+@code
+int tel_get_sim_language(TelSimLanguageInfo_t *sim_language);
+int tel_set_sim_language(TelSimLanguagePreferenceCode_t language, int *req_id);
+@endcode
+
+SAMPLE CODE: GET SIM LANGUAGE
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+void getlanguageprefinfo()
+{
+       int err_code;
+       TelSimLanguageInfo_t li_info;
+       int i;
+
+       err_code = tel_get_sim_language (&li_info);
+       printf("Error Code [%x]\n", err_code);
+
+       for (i =0; i<li_info.LpCount; i++)
+               printf(" LI[%d] --> Val  [%d]\n", i, li_info.Lp[i]);
+}
+@endcode
+
+SAMPLE CODE: UPDATE SIM LANGUAGE
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENIONED IN Event Register and Deregister
+//  OPERATION REQUEST UPDATE SIM LANGUAGE PART
+void get_net_pers()
+{
+       int err_code;
+       int request_id = 0;
+       TelSimLanguagePreferenceCode_t language = 0x00;
+
+       language = TAPI_SIM_LP_ENGLISH; //0x01
+
+       err_code = tel_set_sim_language(language, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT EVENT RESPONSE FROM HERE
+}
+
+
+//  EVENT RESPONSE PART
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event;
+
+       unsigned int temp_handle = -1;
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_SIM_SET_LANGUAGE_CNF:
+                       printf("*****TAPI_EVENT_SIM_SET_LANGUAGE_CNF*********");
+                       printf("update event status = [0x%x]", status);
+                       printf("*********************************************");
+                       break;
+
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_18 Getting Card Type
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Getting Card Type</h3>
+This API is a synchronous API which gets the Card Type i.e. whether the SIM Card is a GSM SIM or a 3G SIM.
+
+@code
+int tel_get_sim_type(TelSimCardType_t *card_type);
+@endcode
+
+SAMPLE CODE:
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+void getcardtype()
+{
+       int err_code;
+       TelSimCardType_t cardInfo;
+
+       printf("Get card type !!!\n");
+       err_code = tel_get_sim_type (&cardInfo);
+       printf("card type is %d\n", cardInfo);
+}
+@endcode
+@}
+@defgroup Use_Cases5_19  Getting SIM Card Initialization Status
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Getting SIM Card Initialization Status</h3>
+API is a synchronous API which gets the Card Init status and Identification.
+
+@code
+int tel_get_sim_init_info(TelSimCardStatus_t *sim_status, int *card_changed);
+@endcode
+
+SAMPLE CODE:
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//  OPERATION REQUEST GET CARD INIT STATUS PART
+void get_sim_init_status()
+{
+       int err_code;
+       TelSimCardStatus_t status = 0x00;
+       int b_card_changed = 0;
+
+       err_code = tel_get_sim_init_info(&status, &b_card_changed);
+       if (err_code == TAPI_API_SUCCESS)
+       {
+               printf("**********************************************");
+               printf("CardStatus:[0x%x]",status);
+               printf("b_card_changed[%d]\n",b_card_changed);
+               printf("**********************************************");
+       }
+       else
+       {
+               printf("TAPI Fail: Error Code [%d]\n", err_code);
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_20 SIM ACCESS COMMANDS Interface
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">SIM ACCESS COMMANDS Interface</h3>
+This API is used to handle SIM EF data directly according to sim access command (select-file info, read, update command). Use_Cases is defined in the 3GPP or ETSI SIM specifications.
+
+@code
+int tel_req_sim_access(const TelSimRSimReq_t *rsim_data, int *req_id);
+@endcode
+
+SAMPLE CODE: EF HANDLING ( SELECT-FILE INFO)
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENIONED IN Event Register and Deregister
+//  OPERATION REQUEST GET SIM FILE INFO PART
+void get_sim_file_info()
+{
+       int err_code;
+       int request_id = 0;
+
+       TelRSimReq_t rsim_data;
+       rsim_data.file_id = TAPI_SIM_EFILE_SPN;      // rsim access : sim file id to access
+       rsim_data.rsim_cmd = TAPI_SIM_GET_RESPONSE;  // rsim access : get response, read, update available
+
+       err_code = tel_req_sim_access(&rsim_data, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT EVENT RESPONSE FROM HERE
+}
+
+//  EVENT RESPONSE PART
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+
+       int status;
+
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event;
+
+       unsigned int temp_handle = -1;
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_SIM_RSIM_ACCESS_CNF:
+                       TelSimReadFileRaw_t* rsim_resp = (TelSimReadFileRaw_t*)EventData;
+
+                       printf("*******TAPI_EVENT_SIM_RSIM_ACCESS_CNF**********");
+                       printf("Read event status = [0x%x]", status);
+
+                       if ((rsim_resp->sw1 == 0x90 && rsim_resp->sw2 == 0x00) ||rsim_resp->sw1 == 0x91)
+                       {
+                               printf("**********GET FILE INFO************");
+                               printf("you should parse current data array value properly regarding 3GPP or ETSI TS 102 221 SPEC");
+                       }
+                       printf("************************************************");
+                       break;
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_21 SIM Mailbox EF management
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">SIM Mailbox EF management</h3>
+These APIs are used to get and update the mailbox information stored in SIM.
+
+@code
+int tel_get_sim_mailbox_info(TelSimMsgWaitingGroup_t type, int *req_id);
+int tel_set_sim_mailbox_info(TelSimMsgWaitingGroup_t type, const TelSimDialingNumberInfo_t *update_data, int *req_id);
+@endcode
+
+SAMPLE CODE: READ / UPDATE MAILBOX INFO
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENIONED IN Event Register and Deregister
+
+void get_sim_mailbox()
+{
+       int err_code;
+       int request_id = 0;
+       TelSimMsgWaitingGroup_t type = 0x00;
+
+       type = TAPI_SIM_MWG_VOICE;
+
+       err_code = tel_get_sim_mailbox_info(type, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT EVENT RESPONSE FROM HERE
+}
+//  OPERATION REQUEST UPDATE SIM MAILBOX INFO PART
+void update_sim_mailbox()
+{
+       int err_code;
+       int request_id = 0;
+
+       TelSimMsgWaitingGroup_t type = 0x00;
+       TelSimDialingNumberInfo_t update_data;
+
+       type = TAPI_SIM_MWG_VOICE;
+
+       memcpy(update_data.AlphaId, "TestUpdate", 10);
+       update_data.AlphaIdLength = strlen(update_data.AlphaId);
+       update_data.CapaConfigId = 1;
+       memcpy(update_data.DiallingNum, "101020203030", 12);
+       update_data.DiallingnumLength = strlen(update_data.DiallingNum);
+       update_data.Ext1RecordId = 1;
+       update_data.NumberingPlanIdent =2;
+       update_data.TypeOfNumber = 2;
+
+       err_code = tel_set_sim_mailbox_info(type, &update_data, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT EVENT RESPONSE FROM HERE
+}
+
+//  EVENT RESPONSE PART
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event;
+
+       unsigned int temp_handle = -1;
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_SIM_GET_MAILBOX_CNF:
+                       TelSimDialingNumberInfo_t* mailbox = (TelSimDialingNumberInfo_t*)EventData;
+
+                       printf("*******TAPI_EVENT_SIM_GET_MAILBOX_CNF*********");
+                       printf("Read event status = [0x%x]", status);
+                       printf("bUsed[%d]", mailbox->bUsed);
+                       printf("AlphaIDMaxLength[%d]", mailbox->AlphaIDMaxLength);
+                       printf("AlphaIdLength[%d]", mailbox->AlphaIdLength);
+                       printf("AlphaId[%s]", mailbox->AlphaId);
+                       printf("DiallingNumMaxLength[%d]", mailbox->DiallingNumMaxLength);
+                       printf("DiallingnumLength[%d]", mailbox->DiallingnumLength);
+                       printf("TypeOfNumber:0-unknown,1-international,2-national[%d]", mailbox->TypeOfNumber);
+                       printf("NumberingPlanIdent:0-unknown,1-isdn,3-data[%d]", mailbox->NumberingPlanIdent);
+                       printf("DiallingNum[%s]", mailbox->DiallingNum);
+                       printf("CapaConfigId[%c]", mailbox->CapaConfigId);
+                       printf("Ext1RecordId[%c]", mailbox->Ext1RecordId);
+                       printf("**********************************************************");
+                       break;
+
+               case TAPI_EVENT_SIM_SET_MAILBOX_CNF:
+                       printf("*********NEW*TAPI_EVENT_SIM_SET_MAILBOX_CNF************");
+                       printf("update event status = [0x%x]", status);
+                       printf("**********************************************************");
+                       break;
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_22 SIM Indication Status EFs management
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">SIM Indication Status EFs management</h3>
+These APIs are used to get and set the message indication status stored in SIM.
+
+@code
+int tel_get_sim_indicator_info(TelSimIndicationStatusType_t type, int *req_id);
+int tel_set_sim_indicator_info(const TelSimIndicationStatusData_t *update_data, int *req_id);
+@endcode
+
+SAMPLE CODE:  READ / UPDATE INDICATION STATUS DATA
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENIONED IN Event Register and Deregister
+
+//  OPERATION REQUEST READ SIM MESSAGE WAITING INDICATION STATUS INFO PART
+void read_sim_mwis()
+{
+       int err_code;
+       int request_id = 0;
+
+       TelSimIndicationStatusType_t type = 0x00;
+
+       type = TAPI_SIM_INDICATION_MW;
+
+       err_code = tel_get_sim_indicator_info(type, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT EVENT RESPONSE FROM HERE
+}
+
+//  OPERATION REQUEST UPDATE SIM MESSAGE WAITING INDICATION STATUS INFO PART
+//SUBSCRIBE FOR EVENTS AS MENIONED IN Event Register and Deregister
+
+void update_sim_mwis()
+{
+       int err_code;
+       int request_id = 0;
+
+       TelSimIndicationStatusType_t type = 0x00;
+       TelSimIndicationStatusData_t update_data;
+       memset(&update_data, 0x00, sizeof(TelSimIndicationStatusData_t));
+
+       type = TAPI_SIM_INDICATION_MW;
+
+       update_data.requested_type = type;
+       update_data.data.Mwis.VoiceMailCount = 1;           // VoiceMail Count
+       update_data.data.Mwis.FaxCount = 2;                 // Fax Count
+       update_data.data.Mwis.EmailCount = 3;               // Email Count
+       update_data.data.Mwis.OtherCount = 4;               // Other Count
+       update_data.data.Mwis.VideoMailCount = 5;           // VideoMail Count
+
+       err_code = tel_set_sim_indicator_info(&update_data, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT EVENT RESPONSE FROM HERE
+}
+
+
+//  EVENT RESPONSE PART
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event;
+
+       unsigned int temp_handle = -1;
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_SIM_GET_INDICATION_CNF:
+                       TelSimIndicationStatusData_t* indi_data = (TelSimIndicationStatusData_t*)EventData;
+
+                       printf("*******TAPI_EVENT_SIM_GET_INDICATION_CNF**********");
+                       printf("Read event status = [0x%x]", status);
+
+                       if (indi_data->requested_type == TAPI_SIM_INDICATION_MW)
+                       {
+                               printf("**********MWIS************");
+                               printf("IndicatorType[%d]", indi_data->data.Mwis.IndicatorType);
+                               printf("VoiceMailCount[%d]", indi_data->data.Mwis.VoiceMailCount);
+                               printf("FaxCount[%d]", indi_data->data.Mwis.FaxCount);
+                               printf("EmailCount[%d]", indi_data->data.Mwis.EmailCount);
+                               printf("OtherCount[%d]", indi_data->data.Mwis.OtherCount);
+                               printf("VideoMailCount[%d]", indi_data->data.Mwis.VideoMailCount);
+                       }
+                       else if (indi_data->requested_type == TAPI_SIM_INDICATION_CF)
+                       {
+                               printf("**********CFIS************");
+                               printf("bUsed[%d]", indi_data->data.Cfis.bUsed);
+                               printf("MspNumber[%d]", indi_data->data.Cfis.MspNumber);
+                               printf("Status[%d]", indi_data->data.Cfis.Status);
+                               printf("DiallingnumLen[%d]", indi_data->data.Cfis.DiallingnumLen);
+                               printf("TypeOfNumber[%d]", indi_data->data.Cfis.TypeOfNumber);
+                               printf("NumberingPlanIdent[%d]", indi_data->data.Cfis.NumberingPlanIdent);
+                               printf("DiallingNum[%s]", indi_data->data.Cfis.DiallingNum);
+                               printf("CapaConfig2Id[%d]", indi_data->data.Cfis.CapaConfig2Id);
+                               printf("Ext7RecordId[%d]", indi_data->data.Cfis.Ext7RecordId);
+                       }
+                       else
+                       {
+                               printf("Unhandled indication status type[%d]",indi_data->requested_type );
+                       }
+                       printf("************************************************");
+                       break;
+
+               case TAPI_EVENT_SIM_SET_INDICATION_CNF:
+                       printf("******TAPI_EVENT_SIM_SET_INDICATION_CNF*******");
+                       printf("update event status = [0x%x]", status);
+                       printf("**********************************************");
+                       break;
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_23 Phone Book
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Phone Book</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+
+Telephony provides APIs for various phone book related features, such as getting total records in phone book, retrieving phone book entry information, reading, updating and deleting phone book information, getting first valid index.
+
+@code
+int tel_get_sim_pb_count(TelSimPbFileType_t pb_type, int* req_id);
+int tel_get_sim_pb_meta_info(TelSimPbFileType_t pb_type, int* req_id);
+int tel_read_sim_pb_record(TelSimPbFileType_t pb_type, unsigned short index, int *req_id );
+int tel_update_sim_pb_record(const TelSimPbRecordData_t *req_data, int *req_id );
+int tel_delete_sim_pb_record(TelSimPbFileType_t pb_type, unsigned short index, int *req_id );
+int tel_get_sim_pb_init_info(int *init_completed, TelSimPbList_t *pb_list, int *first_index );
+@endcode
+
+SAMPLE CODE FOR GETTING STORAGE COUNT
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void getstoragecount()
+{
+       int ret_status;
+       TelSimPbFileType_t StorageFileType = TAPI_SIM_PB_LDN;
+       int pRequestId = 0;
+
+       ret_status = tel_get_sim_pb_count (StorageFileType, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_SIM_PB_STORAGE_COUNT_CNF:
+                       printf("TAPI_EVENT_SIM_PB_STORAGE_COUNT_CNF");
+                       break;
+       }
+}
+@endcode
+
+SAMPLE CODE TO GET PHONE BOOK ENTRY INFO
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENIONED IN Event Register and Deregister
+void getPBEntryInfo()
+{
+       int ret_status;
+       TelSimPbFileType_t StorageFileType = TAPI_SIM_PB_FDN;
+       int pRequestId = 0;
+
+       ret_status = tel_get_sim_pb_meta_info (StorageFileType, &pRequestId);
+       if (ret _status == TAPI_API_SUCCESS)
+               printf(successful\n);
+       else
+               printf(error=%d\n, ret_status);
+       //WAIT FOR EVENT HERE
+}
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event;
+
+       unsigned int temp_handle = -1;
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (EventType) {
+               case TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF:
+                       TelSimPbEntryInfo_t *entryInfo = (TelSimPbEntryInfo_t*)sim_event->pData ;
+                       printf("SIM PB entry info event status = [%x]\n", sim_event->Status);
+                       printf("[SIM APP]STORAGE TYPE [%d]\n", entryInfo->StorageFileType);
+                       printf("[SIM APP]PB_INDEX_MIN %d\n", entryInfo->PbIndexMin);
+                       printf("[SIM APP]PB_INDEX_MAX = %d\n", entryInfo->PbIndexMax);
+                       printf("[SIM APP]PB_NUM_LEN_MAX =  %d\n", entryInfo->PbNumLenMax);
+                       printf("[SIM APP]PB_TEXT_LEN_MAX =  %d\n", entryInfo->PbTextLenMax);
+                       printf("********************************************\n");
+                       break;
+       }
+}
+@endcode
+
+SAMPLE CODE FOR READING RECORD
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void simreadrecord()
+{
+       int ret_status;
+       TelSimPbFileType_t StorageFileType = TAPI_SIM_PB_FDN;
+       unsigned short Index = 4;
+       int pRequestId = 0;
+
+       ret_status = tel_read_sim_pb_record (StorageFileType,Index, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf(successful\n);
+       else
+               printf(error=%d\n, ret_status);
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (eventType) {
+               case TAPI TAPI_EVENT_SIM_PB_ACCESS_READ_CNF:
+                       printf("TAPI_EVENT_SIM_PB_ACCESS_READ_CNF");
+                       //READ DATA
+                       break;
+                       //
+       }
+}
+@endcode
+
+SAMPLE CODE FOR UPDATING RECORD
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void simupdaterecord()
+{
+       int ret_status;
+       TelSimPbRecordData_t pb_add;
+       pb_add.StorageFileType = TAPI_SIM_PB_GAS;
+       int pRequestId = 0;
+
+       pb_add.Index = 1;
+
+       ret_status = tel_update_sim_pb_record (&pb_add, &pRequestId);
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (EventType)
+       {
+               case TAPI_EVENT_SIM_PB_UPDATE_CNF:
+                       printf("TAPI_EVENT_SIM_PB_UPDATE_CNF");
+                       break;
+                       //...
+       }
+}
+@endcode
+
+SAMPLE CODE FOR DELETING RECORD
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void contactdelete()
+{
+       int ret_status;
+       //DELETE RECORD
+       TelSimPbFileType_t StorageFileType = TAPI_SIM_PB_3GSIM;
+       unsigned short RecordIndex = 1;
+       int pRequestId = 0;
+
+       ret_status = tel_delete_sim_pb_record (StorageFileType, RecordIndex, &pRequestId);
+}//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (EventType)
+       {
+               case TAPI_EVENT_SIM_PB_DELETE_CNF:
+                       printf(TAPI_EVENT_SIM_PB_DELETE_CNF);
+                       //
+                       break;
+       }
+}
+@endcode
+
+SAMPLE CODE FOR GETTING PHONEBOOK INIT INFO
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//  OPERATION REQUEST GET SIM PHONEBOOK INIT STATUS PART
+void get_sim_phonebook_init_status()
+{
+       int valid_index = 0;
+       TelSimPbList_t pb_list;
+       int pPbInitCompleted = 0;
+
+       err_code = tel_get_sim_pb_init_info(&pPbInitCompleted, &pb_list, &valid_index);
+       if (err_code == TAPI_API_SUCCESS)
+       {
+               if (pPbInitCompleted == 0)
+               {
+                       printf(" SIM PB INIT NOT completed ");
+               }
+               else
+               {
+                       printf("SIM PB INIT completed");
+                       // if no sim records at all then valid_index = 0xFF
+                       printf ("ADN First index is [%d]",valid_index);
+                       printf ("SIM phone book storage list Information ");
+                       printf ("********************************************");
+                       printf ("pb_list.b_fdn[%d]",pb_list.b_fdn);
+                       printf ("pb_list.b_msisdn[%d]",pb_list.b_msisdn);
+                       printf ("pb_list.b_adn[%d]",pb_list.b_adn);
+                       printf ("pb_list.b_sdn[%d]",pb_list.b_sdn);
+                       printf ("pb_list.b_3g[%d]",pb_list.b_3g);
+                       printf ("pb_list.b_aas[%d]",pb_list.b_aas);
+                       printf ("pb_list.b_gas[%d]",pb_list.b_gas);
+               }
+       }
+       else
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_24 Getting 3G Phone Book Information
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Getting 3G Phone Book Information</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+
+Telephony provides APIs to retrieve SIM EFs supported by 3G phone , such as ANR, SNE, GRP, EMAIL etc and corresponding EFs max text length, number length and size.
+
+@code
+int tel_get_sim_pb_3g_meta_info(int *req_id);
+@endcode
+
+SAMPLE CODE:
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void get3gcapainfo()
+{
+       int ret_status;
+       int req_id = 0;
+
+       ret_status = tel_get_sim_pb_3g_meta_info (&req_id);
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId, i;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (eventType) {
+               case TAPI_EVENT_SIM_PB_CAPABILITY_INFO_CNF:
+                       printf("[SIM APP]SIM PB Capability Info event status = [%x]\n", sim_event->Status);
+                       TelSimPbCapabilityInfo_t *sim_capability_info = (TelSimPbCapabilityInfo_t*)sim_event->pData;
+                       int i;
+                       for (i=0; i<sim_capability_info->FileTypeCount; i++)
+                       {
+                               printf(" [SIM APP]Filed tag type[%d]", sim_capability_info->FileTypeInfo[i].FileType3G);
+                               printf(" [SIM APP]max index [%d]\n", sim_capability_info->FileTypeInfo[i].PbIndexMax);
+                               printf(" [SIM APP]max text [%d]\n", sim_capability_info->FileTypeInfo[i].PbTextMax);
+                               printf(" [SIM APP]used count [%d]\n",  sim_capability_info->FileTypeInfo[i].TotalRecordCount);
+                       }
+                       break;
+                       //...
+       }
+}
+@endcode
+
+@}
+@defgroup Use_Cases5_25 SAP (Sim access Profile) features
+@ingroup Use_Cases5_NETWORK
+@{
+
+               <h3 class="pg">SAP (Sim access Profile) features</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+
+The SIM Access Profile defines the protocols and procedures that shall be used to access data and services of GSM SIM card, a UICC card or a R-UIM card via a Bluetooth link.
+
+The SIM Access Profile specifies the following features:
+- Connection Management
+- Transfer APDU
+- Transfer ATR
+- Power SIM off/on
+- Transfer Card Reader Status
+- Set Transport Protocol
+
+<h4>Connection Management:</h4>
+An established SIM Access Profile connection is the prerequisite for all other features.
+Telephony exposes APIs to make a connection request to SIM and to get connection status information.
+
+@code
+int tel_req_sap_connection( TelSimSapConnect_t *req_data, int *req_id);
+int tel_req_sap_connection_status( int *req_id);
+@endcode
+
+SAMPLE CODE:
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void sapconnectreq()
+{
+       int ret_status;
+       TelSimSapConnect_t pConnectionReq;
+       int pRequestId = 0;
+
+       pConnectionReq.MsgId = TAPI_SIM_SAP_CONNECT_REQ;
+       pConnectionReq.MaxMsgSize = 10; //temp for testing only - not clear
+
+       ret_status = tel_req_sap_connection (&pConnectionReq, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (eventType)
+       {
+               case TAPI_SIM_EVENT_SAP_CONNECT_CNF:
+                       printf("TAPI_SIM_EVENT_SAP_CONNECT_CNF");
+                       break;
+                       //...
+       }
+}
+
+//GET STATUS
+void sapconnectstatusreq()
+{
+       int request_id = 0;
+       int ret_status = tel_req_sap_connection_status (&request_id);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (eventType)
+       {
+               case TAPI_SIM_EVENT_SAP_CONNECT_STATUS_CNF:
+                       printf("TAPI_SIM_EVENT_SAP_CONNECT_STATUS_CNF");
+                       break;
+                       //...
+       }
+}
+@endcode
+
+<h4>Transfer APDU:</h4>
+The ability to send APDUs (Application Protocol Data Units) over the Bluetooth link
+@n Telephony provides API to transfer APDU to sim.
+
+@code
+int tel_req_sap_transfer_apdu(TelSimSapApduData_t *apdu_data, int *req_id);
+@endcode
+
+SAMPLE CODE:
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void saptransferapdu()
+{
+       int err_code;
+       int file_id = TAPI_SIM_EFILE_ICCID;
+
+       // for selecting EF ICCID
+       TelSimSapApduData_t apdu_data;
+       int pRequestId = 0;
+
+       apdu_data.ApduLength = 7;
+       apdu_data.Apdu[0] = 0xA0; // class
+       apdu_data.Apdu[1] = 0xA4; // instruction
+       apdu_data.Apdu[2] = 0; // p1 = parameter 1
+       apdu_data.Apdu[3] = 0; // p2 = parameter 2
+       apdu_data.Apdu[4] = 2; // p3 - parameter 3
+
+       memcpy(&apdu_data.Apdu[5], &file_id, sizeof(unsigned short));
+       err_code = tel_req_sap_transfer_apdu (&apdu_data, NULL);
+       if (err_code == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", err_code);
+}
+//WAIT FOR EVENT HERE
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (eventType)
+       {
+               case TAPI_SIM_EVENT_SAP_TRANSFER_APDU_CNF:
+                       printf("TAPI_SIM_EVENT_SAP_TRANSFER_APDU_CNF");
+                       break;
+       }//...
+}
+@endcode
+
+<h4>Transfer ATR:</h4>
+The ability to send the content of the ATR (Answer to Reset) from the Server to the Client over the Bluetooth link. It contains information about the interface provided by the subscription module and the services on the GSM SIM, the UICC or the R-UIM.
+
+@code
+int tel_req_sap_transfer_atr( int *req_id);
+@endcode
+
+SAMPLE CODE
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void saptransferatrreq()
+{
+       int ret_status;
+       int pRequestId = 0;
+
+       ret_status = tel_req_sap_transfer_atr (&pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (eventType)
+       {
+               case TAPI_SIM_EVENT_SAP_TRANSFER_ATR_CNF:
+                       printf("TAPI_SIM_EVENT_SAP_TRANSFER_ATR_CNF");
+                       break;
+                       //...
+       }
+}
+@endcode
+
+<h4>Power sim on/off:</h4>
+The ability to power the subscription module on/off remotely.
+
+@code
+int tel_req_sap_power_operation(TelSimSapMsgId_t req_data, int *req_id );
+@endcode
+
+SAMPLE CODE
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void sapsetpower()
+{
+       int ret_status;
+       TelSimSapMsgId_t MsgId = TAPI_SIM_SAP_CONNECT_REQ;
+       int pRequestId = 0;
+
+       ret_status = tel_req_sap_power_operation (MsgId, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+
+       switch (EventType)
+       {
+               case TAPI_SIM_EVENT_SAP_SET_SIM_POWER_CNF:
+                       printf("TAPI_SIM_EVENT_SAP_SET_SIM_POWER_CNF");
+                       break;
+                       //...
+       }
+}
+@endcode
+
+<h4>Transfer Card Reader Status:</h4>
+The card reader status contains some basic information about the Card Reader and the subscription module (e.g. the size of the SIM or if the SIM is removable).
+
+@code
+int tel_req_sap_cardreader_status(int *req_id);
+@endcode
+
+SAMPLE CODE
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void simsapcardreaderstatus()
+{
+       int ret_status;
+       int pRequestId = 0;
+
+       ret_status = tel_req_sap_cardreader_status (&pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+
+       switch (eventType)
+       {
+               case TAPI_SIM_EVENT_SAP_CARD_READER_STATUS_CNF:
+                       printf("TAPI_SIM_EVENT_SAP_CARD_READER_STATUS_CNF");
+                       break;
+                       //...
+       }
+}
+@endcode
+
+<h4>Set Transport Protocol:</h4>
+The server shall reset the subscription module and switch to the desired protocol if supported by subscription module and Server.
+
+@code
+int tel_req_sap_transport_protocol(TelSimSapProtocol_t protocol, int *req_id);
+@endcode
+
+SAMPLE CODE
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void sapsettransportprotocol()
+{
+       int ret_status;
+       TelSimSapProtocol_t Protocol = TAPI_SIM_SAP_PROTOCOL_T0;
+       int pRequestId = 0;
+
+       ret_status = tel_req_sap_transport_protocol (Protocol, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (EventType)
+       {
+               case TAPI_SIM_EVENT_SAP_SET_PROTOCOL_CNF:
+                       printf("TAPI_SIM_EVENT_SAP_SET_PROTOCOL_CNF");
+                       break;
+                       //...
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_26 ISIM Features
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">ISIM Features</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+
+@code
+int tel_req_sim_authentication( TelSimAuthenticationData_t *authentication_data, int *req_id);
+@endcode
+
+Application uses this API to send the ISIM authentication request to telephony.
+
+SAMPLE CODE
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void isimauthreq()
+{
+       int ret_status;
+       TelSimAuthenticationData_t authenticationData;
+       authenticationData.rand_length = 100;
+       authenticationData.rand_length = 100;
+       authenticationData.rand_data = "test data";
+       authenticationData.autn_data = "test data";
+       int pRequestId = 0;
+
+       ret_status = tel_req_sim_authentication (&authenticationData, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (EventType)
+       {
+               case TAPI_EVENT_SIM_AUTHENTICATION_CNF:
+                       printf("TAPI_EVENT_SIM_AUTHENTICATION_CNF");
+                       break;
+                       //...
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_27 SIM NOTIFICATION MESSAGE
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">SIM NOTIFICATION MESSAGE </h3>
+These are not APIs, but EVENTs from the low layer. User can receive the following events:
+@code
+TAPI_EVENT_SIM_STATUS_IND
+TAPI_EVENT_SIM_FDN_STATUS_IND
+@endcode
+
+Application uses this event as follows.
+SAMPLE CODE
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (EventType)
+       {
+               case TAPI_EVENT_SIM_STATUS_IND:
+                       printf("***********TAPI_EVENT_SIM_STATUS_IND**************");
+
+                       if (status == TAPI_SIM_STATUS_CARD_ERROR)
+                       {
+                               printf("SIM CARD ERROR");
+                       }
+                       else if (status == TAPI_SIM_STATUS_CARD_NOT_PRESENT)
+                       {
+                               printf("SIM CARD NOT INSERTED");
+                       }
+                       else if (status == TAPI_SIM_STATUS_SIM_INITIALIZING)
+                       {
+                               printf("SIM INITITIALIZING");
+                       }
+                       else if (status == TAPI_SIM_STATUS_SIM_INIT_COMPLETED)
+                       {
+                               printf("SIM INIT COMPLETED");
+                       }
+                       else if (status == TAPI_SIM_STATUS_SIM_PIN_REQUIRED)
+                       {
+                               printf("SIM PIN REQUIRED");
+                       }
+                       else if (status == TAPI_SIM_STATUS_SIM_PUK_REQUIRED)
+                       {
+                               printf("SIM PUK REQUIRED");
+                       }
+                       else if (status == TAPI_SIM_STATUS_CARD_BLOCKED)
+                       {
+                               printf("SIM CARD BLOCKED");
+                       }
+                       printf("********************************************");
+                       break;
+
+               case TAPI_EVENT_SIM_FDN_STATUS_IND:
+                       printf("*********TAPI_EVENT_SIM_FDN_STATUS_IND***********");
+                       printf("SIM FDN status event status = [0x%x]", status);
+                       printf("********************************************");
+                       break;
+                       //...
+       }
+}
+@endcode
+@}
+
+       <h2 class="pg">SOUND</h2>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+These APIs provide the interface for configuring sound related parameters.
+
+@defgroup Use_Cases6_1 Event Register and Deregister
+@ingroup Use_Cases6_SOUND
+@{
+
+
+               <h3 class="pg">Event Register and Deregister </h3>
+To receive asynchronous event notifications for the Sound APIs, the registration of related events with their associated call backs is required. When an asynchronous API is called, the confirmation is returned as an asynchronous event notification which invokes the callback function along with the event data.
+
+SAMPLE CODE:
+@code
+// REGISTER EVENT
+unsigned int subscription_id = 0;
+int api_err;
+
+api_err = tel_init ();
+if (api_err != TAPI_API_SUCCESS)
+{
+       TEST_DEBUG("tel_init Failed - api_err = %d \n", api_err);
+}
+
+api_err = tel_register_event (TAPI_EVENT_SOUND_VOLUMECTRL_CNF, &subscription_id, (TelAppCallback)&app_callback);
+printf("VSOUND Event registration is Done: sub id is %d, api_err is %d\n",subscription_id,api_err);
+
+tel_register_app_name("com.samsung.appname");
+
+// DEREGISTER EVENT
+api_err = tel_deregister_event (subscription_id);
+if (api_err != TAPI_API_SUCCESS)
+{
+       printf("Event Class Deregestration Fail\n");
+}
+@endcode
+
+The main features provided by the Sound APIs include setting the volume,voice path and user configuration such as minute alert,Service change,Connet tone, Disconnect Tone...etc.
+@}
+@defgroup Use_Cases6_2 Voice path control
+@ingroup Use_Cases6_SOUND
+@{
+
+
+               <h3 class="pg">Voice path control</h3>
+This API provides an interface for controlling voice path via application.
+
+@code
+int tel_set_sound_path (tapi_sound_audio_path_t  vc_path, int *pRequestId);
+@endcode
+
+<strong>This API is permitted for Samsung in-house applications only</strong>
+@}
+@defgroup Use_Cases6_3 Volume control
+@ingroup Use_Cases6_SOUND
+@{
+
+
+               <h3 class="pg">Volume control</h3>
+These APIs provide interfaces for controlling volume via application.
+
+@code
+int     tel_set_sound_volume_info (tapi_sound_volume_control_t vol_control, int *pRequestId);
+int     tel_get_sound_volume_info (tapi_sound_volume_type_t vol_control, int *pRequestId);
+@endcode
+
+<strong>This API is permitted for Samsung in-house applications only</strong>
+@}
+@defgroup Use_Cases6_4 Mic mute control
+@ingroup Use_Cases6_SOUND
+@{
+
+
+               <h3 class="pg">Mic mute control</h3>
+This API provides an interface for mute/unmute mic via application.
+
+@code
+int  tel_set_sound_mute_status(tapi_sound_mic_mute_t micmute_set, int * pRequestId);
+@endcode
+
+<strong>This API is permitted for Samsung in-house applications only</strong>
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSound.h>
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+
+//VOLUME CONTROL
+void vol_controlset()
+{
+       int ret_val;
+       int requestId = -1;
+       tapi_sound_volume_control_t vol_control;
+
+       vol_control.volume = TAPI_SOUND_VOLUME_LEVEL_3;
+       vol_control.vol_type = TAPI_SOUND_VOL_VOICE;
+
+       ret_val = tel_set_sound_volume_info(vol_control, &requestId);
+       if (ret_val == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_val);
+       //WAIT FOR EVENT HERE
+}
+void vol_controlget()
+{
+       int ret_val;
+       int requestId = -1;
+       api_sound_volume_type_t vol_type;
+       vol_type = TAPI_SOUND_VOL_VOICE;
+
+       ret_val = tel_get_sound_volume_info (vol_type, &requestId);
+       if (ret_val == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_val);
+       //WAIT FOR EVENT HERE
+}
+
+//VOICE PATH AND USER CONFIGURATION
+void voicepathset()
+{
+       int ret_val;
+       int requestId = -1;
+
+       tapi_sound_audio_path_t vc_path;
+       //VOICE PATH
+       vc_path = TAPI_SOUND_HANDSET;
+
+       ret_val = tel_set_sound_path (vc_path, &requestId);
+       if (ret_val == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //WAIT FOR EVENT HERE
+}
+
+
+//USER CONFIGURATION
+void usr_configset()
+{
+       int ret_val;
+       Int requestId = -1;
+       tapi_sound_user_sound_mask_t snd_mask;
+       tapi_sound_user_sound_value_t snd_value;
+
+       snd_mask = TAPI_SOUND_USER_MASK_ONE_MIN_ALERT;
+       snd_value = TAPI_SOUND_ON;
+       printf("tapi_sound_usr_configuration_set\n");
+       ret_val = tapi_sound_usr_configuration_set(snd_mask,snd_value, &requestId);
+       if (ret_val == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //WAIT FOR EVENT HERE
+}
+
+void usr_configget()
+{
+       int ret_val;
+       tapi_sound_user_sound_mask_t snd_mask;
+
+       snd_mask = TAPI_SOUND_USER_MASK_SERVICE_CHANGE_ALERT;
+       printf("tel_get_sound_mute_status \n");
+       ret_val = tel_get_sound_mute_status(snd_mask, &requestId);
+       if (ret_val == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //WAIT FOR EVENT HERE
+}
+
+//MIC MUTE CONT\ROL
+void micmute_controlset()
+{
+       int ret_val;
+       tapi_sound_mic_mute_t set_micmute;
+
+       set_micmute = TAPI_SOUND_MIC_MUTE;
+
+       printf(" tel_set_sound_mute_status \n");
+       ret_val = tel_set_sound_mute_status (set_micmute, &requestId);
+       if (ret_val == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //WAIT FOR EVENT HERE
+}
+
+
+//CALL BACK TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       unsigned int temp_handle = -1;
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d]\n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+
+       switch (eventClass)
+       {
+               case TAPI_EVENT_CLASS_SOUND:
+                       switch (eventType)
+                       {
+                               case TAPI_EVENT_SOUND_VOLUMECTRL_RSP :
+                                       printf("***  TAPI_EVENT_SOUND_VOLUMECTRL_RSP received : %x ****\n", eventType);
+                                       tapi_sound_volumn_ctrl_res vlm_ctrl_info;
+                                       int index;
+
+                                       memcpy(&vlm_ctrl_info, event->pData,
+                                                       sizeof(tapi_sound_volumn_ctrl_res));
+                                       break;
+
+                               case TAPI_EVENT_SOUND_AUDIOPATHCTRL_NOTI:
+                                       tapi_sound_audio_path_t AudioPath = 0;
+                                       int OldSndOutPath = MM_SOUND_PATH_NONE;
+                                       AudioPath = *((tapi_sound_audio_path_t *)(event->pData));
+                                       printf("***  TAPI_EVENT_SOUND_AUDIOPATHCTRL_NOTI received : %x ****\n", eventType);
+                                       break;
+
+                               case TAPI_EVENT_SOUND_AUDIOSOURCECTRL_NOTI:
+                                       tapi_sound_audio_source_type_t *pAudioSrcCtrl = NULL;
+                                       pAudioSrcCtrl = (tapi_sound_audio_source_type_t*)(event->pData);
+                                       printf("***  TAPI_EVENT_SOUND_AUDIOSOURCECTRL_NOTI received : %x ****\n", eventType);
+                                       break;
+
+                               case TAPI_EVENT_SOUND_ERROR_IND:
+                                       tapi_phone_err_t errorCause;
+                                       errorCause = *(( tapi_phone_err_t *)(event->pData));
+                                       printf("***  TAPI_EVENT_SOUND_ERROR_IND received : %x ****\n", eventType);
+                                       break;
+
+                               case TAPI_EVENT_SOUND_MICMUTECTRL_RSP:
+                                       tapi_sound_mic_mute_t *mute_status = NULL;
+                                       mute_status = (tapi_sound_audio_source_type_t*)(event->pData);
+
+                                       printf("***  TAPI_EVENT_SOUND_MICMUTECTRL_RSP received : %x ****\n", eventType);
+                                       break;
+
+                               default:
+                                       printf("***  Default Event  %x ****\n", eventType);
+                                       break;
+                       }
+                       //...
+                       break;
+
+               default:
+                       printf("*** Other TAPI EVENT received : class : %x ****\n", eventClass);
+                       break;
+       }
+}
+@endcode
+@}
+
+
+       <h2 class="pg">SAT (SIM Application Toolkit)</h2>
+@defgroup Use_Cases7_1 Event register and deregister
+@ingroup Use_Cases7_SAT
+@{
+
+               <h3 class="pg">Event register and deregister</h3>
+To receive asynchronous event notifications for SAT APIs, the registration of related events with their associated call backs is required. When an asynchronous API is called, the confirmation is returned as an asynchronous event notification which invokes the callback function along with the event data.
+
+SAMPLE CODE
+@code
+// REGISTER EVENT
+unsigned int subscription_id = 0;
+int api_err;
+
+api_err = tel_init();
+if (api_err != TAPI_API_SUCCESS)
+{
+       TEST_DEBUG("tel_init Failed - api_err = %d \n", api_err);
+}
+
+api_err = tel_register_event(TAPI_EVENT_SAT_MENU_SELECTION_CNF, &subscription_id, (TelAppCallback)&app_callback);
+printf("SAT Event registration is Done: sub id is %d, api_err is %d\n",subscription_id,api_err);
+
+tel_register_app_name("com.samsung.appname");
+
+// DEREGISTER EVENT
+api_err = tel_deregister_event(subscription_id);
+if (api_err != TAPI_API_SUCCESS)
+{
+       printf("Event Class Unregeration Fail\n");
+}
+
+api_err = tel_deinit();
+if (api_err != TAPI_API_SUCCESS)
+{
+       printf("tel_deinit Fail\n");
+}
+
+static void app_callback(TelTapiEvent_t *event)
+{
+       //CALL BACK FUNTION TO BE CALLED
+       switch (event->EventType)
+       {
+               case TAPI_EVENT_SAT_DISPLAY_TEXT_IND:
+                       TelSatDisplayTextInd_t *event_data;
+                       event_data = (TelSatDisplayTextInd_t*)event->pData;
+                       break;
+               case TAPI_EVENT_SAT_GET_INKEY_IND:
+                       TelSatGetInkeyIndInfo_t *event_data;
+                       event_data = (TelSatGetInkeyIndInfo_t *)event->pData;
+                       break;
+               case TAPI_EVENT_SAT_GET_INPUT_IND:
+                       TelSatGetInputInd_t *event_data;
+                       event_data = (TelSatGetInputInd_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_UI_PLAY_TONE_IND:
+                       TelSatPlayToneInd_t *event_data;
+                       event_data = (TelSatPlayToneInd_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_PLAY_TONE_IND:
+                       TelSatPlayToneInd_t *event_data;
+                       event_data = (TelSatPlayToneInd_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_UI_REFRESH_IND:
+                       TelSatRefreshIndUiInfo_t *event_data;
+                       event_data = (TelSatRefreshIndUiInfo_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_SETUP_MENU_IND:
+                       TelSatSetupMenuInfo_t *event_data;
+                       event_data = (TelSatSetupMenuInfo_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_UI_SETUP_MENU_IND:
+                       TelSatSetupMenuInfo_t *event_data;
+                       event_data = (TelSatSetupMenuInfo_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_SELECT_ITEM_IND:
+                       TelSatSelectItemInd_t *event_data;
+                       event_data = (TelSatSelectItemInd_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_UI_SEND_SMS_IND:
+                       TelSatSendSmsIndUiInfo_t *event_data;
+                       event_data = (TelSatSendSmsIndUiInfo_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_UI_SEND_SS_IND:
+                       TelSatSendSsIndUiInfo_t *event_data;
+                       event_data = (TelSatSendSsIndUiInfo_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_UI_SEND_USSD_IND:
+                       TelSatSendUssdIndUiInfo_t *event_data;
+                       event_data = (TelSatSendUssdIndUiInfo_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_UI_SETUP_CALL_IND:
+                       TelSatSetupCallIndUiInfo_t *event_data;
+                       event_data = (TelSatSetupCallIndUiInfo_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_PROVIDE_LOCAL_INFO_IND:
+                       TelSatProvideLocalInfoInd_t *event_data;
+                       event_data = (TelSatProvideLocalInfoInd_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_SETUP_IDLE_MODE_TEXT_IND:
+                       TelSatSetupIdleModeTextInd_t *event_data;
+                       event_data = (TelSatSetupIdleModeTextInd_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_UI_SEND_DTMF_IND:
+                       TelSatSendDtmfIndUiInfo_t *event_data;
+                       event_data = (TelSatSendDtmfIndUiInfo_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_LANGUAGE_NOTIFICATION_IND:
+                       TelSatLanguageNotiInfoInd_t *event_data;
+                       event_data = (TelSatLanguageNotiInfoInd_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_UI_LAUNCH_BROWSER_IND:
+                       TelSatLaunchBrowserIndUiInfo_t *event_data;
+                       event_data = (TelSatLaunchBrowserIndUiInfo_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_END_PROACTIVE_SESSION_IND:
+                       TelSatEndProactiveSessionIndInfo_t *event_data;
+                       event_data = (TelSatEndProactiveSessionIndInfo_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_MENU_SELECTION_CNF:
+                       TelSatEnvelopeResp_t *event_data;
+                       event_data = (TelSatEnvelopeResp_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_CALL_CONTROL_IND:
+                       TelSatCallCtrlIndData_t *event_data;
+                       event_data = (TelSatCallCtrlIndData_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_MO_SMS_CONTROL_IND:
+                       TelSatMoSmCtrlIndData_t *event_data;
+                       event_data = (TelSatMoSmCtrlIndData_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_EVENT_DOWNLOAD_CNF:
+                       TelSatEnvelopeResp_t *event_data;
+                       event_data = (TelSatEnvelopeResp_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_SMS_REFRESH_IND:
+               case TAPI_EVENT_SAT_PB_REFRESH_IND:
+               case TAPI_EVENT_SAT_IDLE_REFRESH_IND:
+                       TelSatRefreshInd_t *event_data;
+                       event_data = (TelSatRefreshInd_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_SEND_SMS_IND:
+                       TelSatSendSmsIndSmsData_t *event_data;
+                       event_data = (TelSatSendSmsIndSmsData_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_SETUP_CALL_IND:
+                       TelSatSetupCallIndCallData_t *event_data;
+                       event_data = (TelSatSetupCallIndCallData_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_SEND_SS_IND:
+                       TelSatSendSsIndSsData_t *event_data;
+                       event_data = (TelSatSendSsIndSsData_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_SEND_USSD_IND:
+                       TelSatSendUssdIndUssdData_t *event_data;
+                       event_data = (TelSatSendUssdIndUssdData_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_SEND_DTMF_IND:
+                       TelSatSendDtmfIndDtmfData_t *event_data;
+                       event_data = (TelSatSendDtmfIndDtmfData_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_LAUNCH_BROWSER_IND:
+                       TelSatLaunchBrowserIndBrowserData_t *event_data;
+                       event_data = (TelSatLaunchBrowserIndBrowserData_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_END_OF_APP_EXEC_IND:
+                       TelSatProactiveCmdEndIndInfo_t *event_data;
+                       event_data = (TelSatProactiveCmdEndIndInfo_t *)event->pData;
+                       break;
+
+               default:
+                       break;
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases7_2 Main Menu Information
+@ingroup Use_Cases7_SAT
+@{
+
+
+               <h3 class="pg">Main Menu Information</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+
+Telephony provides APIs for retreiving SAT Main Menu Information.
+
+<strong>This API is permitted for Samsung in-house applications only</strong>
+
+@code
+int tel_get_sat_main_menu_info(TelSatSetupMenuInfo_t* pMainMenu)
+@endcode
+
+SAMPLE CODE:
+@code
+//SAT MAIN MENU INFORMATION
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSat.h>
+
+void mainmenuinformation()
+{
+       int i = 0;
+       int ReturnStatus;
+       TelSatSetupMenuInfo_t SatMainMenuInfo;
+
+       ReturnStatus = tel_get_sat_main_menu_info(&SatMainMenuInfo);
+       if (ReturnStatus == TAPI_API_SUCCESS)
+       {
+               printf(" SAT Main Menu Information \n");
+               printf("Main Menu Title  :%s\n", satMainMenuInfo.satMainTitle);
+               printf("Number of SAT Menu Items :%d\n", satMainMenuNum);
+               printf("Sat Menu Items are:\n");
+               for (i=0; i<SatMainMenuInfo.satMainMenuNum; i++)
+                       printf(" %s \n", SatMainMenuInfo.satMainMenuItem[i]);
+       }
+       else
+               printf("ReturnStatus =%d\n", ReturnStatus);
+}
+@endcode
+@}
+@defgroup Use_Cases7_3 Envelope Commands
+@ingroup Use_Cases7_SAT
+@{
+
+
+               <h3 class="pg">Envelope Commands</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+
+This API sends a USIM application toolkit command to the USIM, using the envelope mechanism of USIM application toolkit. (See GSM TS 31.111)
+
+<strong>These APIs are permitted for Samsung in-house applications only</strong>
+
+@code
+int tel_select_sat_menu(TelSatMenuSelectionReqInfo_t* pMenuSelect, int* pRequestId);
+int tel_download_sat_event(TelSatEventDownloadReqInfo_t*  pEventData, int* pRequestId);
+@endcode
+
+SAMPLE CODE:
+@code
+//MENU SELECTION ENVELOPE
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSat.h>
+
+//Precondition
+//SUBSCRIBE TO SAT EVENT(TAPI_EVENT_SAT_MENU_SELECTION_CNF) AS MENTIONED IN //Event Register and Deregister
+
+void satmenuselectionenvelope()
+{
+       int RequestId = -1;
+       int ReturnStatus;
+       TelSatMenuSelectionReqInfo_t SatMenuSelect;
+
+       SatMenuSelect.itemIdentifier = 1;
+       SatMenuSelect.bIsHelpRequested = FALSE;
+
+       ReturnStatus = tel_select_sat_menu(&SatMenuSelect, &RequestId);
+       if (ReturnStatus != TAPI_API_SUCCESS)
+       {
+               printf("ReturnStatus =%d\n", ReturnStatus);
+       }
+       else
+       {
+               //WAIT FOR TAPI_EVENT_SAT_MENU_SELECTION_CNF EVENT HERE
+       }
+}
+
+//CALLBACK FUNCTION TO BE USED
+static void SatAppCallback (TelTapiEvent_t *event)
+{
+       int EventClass = event->EventClass;
+       int EventType = event->EventType;
+       int RequestId = event->RequestId;
+       void* EventData = event->pData;
+       int Status = event->Status;
+
+       if (EventType == TAPI_EVENT_SAT_MENU_SELECTION_CNF)
+       {
+               printf(" TAPI_EVENT_SAT_MENU_SELECTION_CNF Event Received \n");
+       }
+}
+@endcode
+
+@code
+//EVENT DOWNLOAD ENVELOPE
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSat.h>
+
+
+//Precondition
+//SUBSCRIBE TO SAT EVENT(TAPI_EVENT_SAT_EVENT_DOWNLOAD_CNF) AS MENTIONED IN //Event Register and Deregister
+void eventdownloadenvelope()
+{
+       int RequestId = -1;
+       int ReturnStatus;
+       TelSatEventDownloadReqInfo_t SatEventData;
+
+       SatEventData.eventDownloadType = TAPI_EVENT_SAT_DW_TYPE_IDLE_SCREEN_AVAILABLE;
+
+       SatEventData.u.bIdleScreenAvailable = TRUE;
+
+       ReturnStatus = tel_download_sat_event(&SatEventData, &RequestId);
+       if (ReturnStatus != TAPI_API_SUCCESS)
+       {
+               printf("ReturnStatus =%d\n", ReturnStatus);
+       }
+       else
+       {
+               //WAIT FOR TAPI_EVENT_SAT_EVENT_DOWNLOAD_CNF EVENT HERE
+       }
+}
+
+//CALLBACK FUNCTION TO BE USED
+static void  SatAppCallback  (TelTapiEvent_t *event)
+{
+       int EventClass = event->EventClass;
+       int EventType = event->EventType;
+       int RequestId = event->RequestId;
+       void* EventData = event->pData;
+       int Status = event->Status;
+
+       if (EventType == TAPI_EVENT_SAT_EVENT_DOWNLOAD_CNF)
+       {
+               printf("TAPI_EVENT_SAT_EVENT_DOWNLOAD_CNF Event Received \n");
+               //Extract Event Data here
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases7_4 Application Execution result
+@ingroup Use_Cases7_SAT
+@{
+
+
+               <h3 class="pg">Application Execution result</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+
+Telephony provides this API to get the Application execution result.
+
+<strong>This API is permitted for Samsung in-house applications only</strong>
+
+@code
+Int tel_send_sat_app_exec_result(TelSatAppsRetInfo_t* pAppRetInfo);
+@endcode
+
+SAMPLE CODE:
+@code
+//SAT MAIN MENU TITLE
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSat.h>
+
+void sendappexecutionresult()
+{
+       int ReturnStatus;
+       TelSatAppsRetInfo_t SatAppRetInfo;
+
+       SatAppRetInfo.commandType = TAPI_SAT_CMD_TYPE_SETUP_IDLE_MODE_TEXT;
+       SatAppRetInfo.appsRet.setupIdleModeText.resp = TAPI_SAT_R_SUCCESS;
+
+       ReturnStatus = tel_send_sat_app_exec_result(&SatAppRetInfo);
+       if (ReturnStatus == TAPI_API_SUCCESS)
+       {
+               printf(" Sending Application Execution Result Successful \n");
+       }
+       else
+               printf("ReturnStatus =%d\n", ReturnStatus);
+}
+@endcode
+@}
+@defgroup Use_Cases7_5  UI /User Confirmation
+@ingroup Use_Cases7_SAT
+@{
+
+
+               <h3 class="pg">UI /User Confirmation </h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+
+Send user’s confirmation message to the USIM application
+
+<strong>These APIs are permitted for Samsung in-house applications only</strong>
+
+@code
+int tel_send_sat_ui_display_status(int commandId, TelSatUiDisplayStatusType_t status);
+int tel_send_sat_ui_user_confirm(TelSatUiUserConfirmInfo_t * pUserConfirmData) ;
+@endcode
+
+SAMPLE CODE:
+@code
+//UI DISPLAY STATUS
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSat.h>
+
+void senduidisplaystatus()
+{
+       int ReturnStatus;
+       TelSatUiDisplayStatusType_t DisplatStatus;
+       int CommandId;
+
+       DisplatStatus = TAPI_SAT_DISPLAY_SUCCESS;
+       CommandId = commandId; //Command Id of the Proactive Command
+
+       ReturnStatus = tel_send_ui_display_status(CommandId, DisplayStatus);
+       if (ReturnStatus == TAPI_API_SUCCESS)
+               printf(" Sending UI Display Status Successful \n");
+       else
+               printf("ReturnStatus =%d\n", ReturnStatus);
+}
+@endcode
+
+@code
+//USER CONFIRMATION
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSat.h>
+
+void senduiuserconfirm()
+{
+       int ReturnStatus;
+       TelSatUiUserConfirmInfo_t UserConfirmData;
+
+       UserConfirmData.commandId = commandId ; //Command Id of the Proactive Command
+
+       UserConfirmData.commandType = TAPI_SAT_CMD_TYPE_PLAY_TONE;
+       UserConfirmData.keyType = TAPI_SAT_USER_CONFIRM_YES;
+
+       UserConfirmData.pAdditionalData = NULL;
+       UserConfirmData.dataLen = 0;
+
+       ReturnStatus = tel_send_sat_ui_user_confirm(&UserConfirmData);
+       if (ReturnStatus == TAPI_API_SUCCESS)
+               printf(" Sending User Confirmation Data Successful \n");
+       else
+               printf("ReturnStatus =%d\n", ReturnStatus);
+}
+@endcode
+@}
+
+
+       <h2 class="pg">GPRS</h2>
+@defgroup Use_Cases8_1 Event Register and Deregister
+@ingroup Use_Cases8_GPRS
+@{
+
+               <h3 class="pg">Event Register and Deregister</h3>
+To receive asynchronous event notifications for GPRS APIs, the registration of related events with their associated call backs is required. When an asynchronous API is called, the confirmation is returned as an asynchronous event notification which invokes the callback function along with the event data.
+
+SAMPLE CODE:
+@code
+// REGISTER EVENT
+unsigned int subscription_id = 0;
+int api_err;
+
+api_err = tel_init();
+if (api_err != 0)
+{
+      printf ("tel_init Failed - api_err = %d \n", api_err);
+}
+
+api_err = tel_register_event(TAPI_EVENT_PS_PDP_ACT_RSP, &subscription_id , (TelAppCallback)&app_callback);
+printf("Power Event registeration is Done: sub id is %d, api_err is %d\n", subscription_id, api_err);
+
+tel_register_app_name("com.samsung.appname");
+
+void app_callback(TelTapiEvent_t *event)
+{
+       //callback function to be called
+}
+@endcode
+@}
+@defgroup Use_Cases8_2 Pdp Activation
+@ingroup Use_Cases8_GPRS
+@{
+
+
+               <h3 class="pg">Pdp Activation</h3>
+This API is used to start a GPRS session successfully.
+
+@code
+int tel_activate_gprs_pdp (const tapi_ps_net_start_req_t *pNet_start_req_info,int * pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use. Use the Data Network API instead.</strong>
+
+SAMPLE CODE
+@code
+#include<stdio.h>
+#include <TapiCommon.h>
+#include <ITapiPS.h>
+
+int ret_status;
+tapi_ps_net_start_req_t start_req;
+int request_id = 0;
+
+#define CONTEXT_ID 1
+#define APN_ADDRESS "nate.sktelecom.com"
+
+void gprsstart()
+{
+       int ret_status;
+       tapi_ps_net_start_req_t start_req;
+       int request_id = 0;
+
+       start_req.cont_id = CONTEXT_ID;
+       strcpy(start_req.pdp_info.apn , APN_ADDRESS);
+
+       ret_status = tel_activate_gprs_pdp (&start_req, &request_id);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("/n/  gprs mode Started successfully \\n");
+       }
+       else
+       {
+               printf("/n/ gprs mode not started \\n");
+       }
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+void  ps_app_callback  (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void *EventData = NULL;
+
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+       printf(" app _callback is called \n");
+
+       switch (eventClass)
+       {
+               case TAPI_EVENT_CLASS_DATA:
+                       switch (eventType)
+                       {
+                               case TAPI_EVENT_PS_PDP_ACT_RSP:
+                                       tapi_ps_net_activation_rsp_t  pdp_ip_resp;
+                                       memcpy(&pdp_ip_resp, psEvent->pData, sizeof(tapi_ps_net_activation_rsp_t));
+                                       printf("TAPI_EVENT_PS_PDP_ACT_RSP\n");
+                                       break;
+
+                               case TAPI_EVENT_PS_PDP_ACT_IPCONFIG_INFO:
+                                       tapi_ps_net_start_rsp_t  pdp_ip_resp;
+                                       memcpy(&pdp_ip_resp, psEvent->pData, sizeof(tapi_ps_net_start_rsp_t));
+
+                               case TAPI_EVENT_PS_STATUS:
+                                       tapi_ps_attach_response_t res;
+                                       memcpy(&res, psEvent->pData, sizeof(tapi_ps_attach_response_t));
+                       }
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases8_3 Check PDP Signal line On
+@ingroup Use_Cases8_GPRS
+@{
+
+
+               <h3 class="pg">Check PDP Signal line On</h3>
+This API is used to check whether the PDP siganl line is on or not.
+
+Precondition:
+@n GPRS session should be started before running this API.
+
+@code
+int tel_control_gprs_btdun_pin (tapi_ps_btdun_pincontrol pincontrol,int * pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use. Use the Data Network API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiPS.h>
+
+void pdpbtduncontrolget()
+{
+       int ret_status;
+       int request_id = 0;
+       tapi_ps_btdun_pincontrol bt_control;
+
+       bt_control.signal = GPRS_SIGNAL_DCD ;
+       bt_control.status = GPRS_SIGNAL_STATUS_OFF;
+
+       ret_status = tel_control_gprs_btdun_pin(bt_control, &request_id) ;
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("/n/  Successful \\n");
+       }
+       else
+       {
+               printf("/n/error:%d \n", ret_status);
+       }
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+void  ps_app_callback  (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void *EventData = NULL;
+
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+       printf(" app _callback is called \n");
+
+       switch (eventClass)
+       {
+               case TAPI_EVENT_CLASS_DATA:
+                       switch (eventType)
+                       {
+                               case TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI:
+                                       tapi_ps_btdun_pincontrol pincontrol;
+                                       memcpy(&pincontrol, psEvent->pData, sizeof(tapi_ps_btdun_pincontrol));
+                                       printf("TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI\n");
+                                       break;
+                       }
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases8_4 Set PDP deactivation
+@ingroup Use_Cases8_GPRS
+@{
+
+
+               <h3 class="pg">Set PDP deactivation</h3>
+This API is used to deactivate the PDP service.
+
+Precondition:
+@n GPRS session must be started before executing this API.
+
+@code
+int     tel_deactivate_gprs_pdp (const tapi_ps_net_stop_req_t *net_stop_req_info,int * pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use. Use the Data Network API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiPS.h>
+
+#define CONTEXT_ID 1
+
+void setpdpdeactivation()
+{
+       int ret_status;
+       tapi_ps_net_stop_req_t end_req;
+       int request_id = 0;
+
+       memset(&end_req, 0, sizeof(tapi_ps_net_stop_req_t));
+
+       end_req.cont_id = CONTEXT_ID;
+
+       ret_status = tel_deactivate_gprs_pdp (&end_req, &request_id);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("/n/ gprs active session ended successfully \\n");
+       }
+       else
+       {
+               printf("/n/  gprs active session not ended  \\n");
+       }
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+void  ps_app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void *EventData = NULL;
+
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+       printf(" app _callback is called \n");
+
+       switch (eventClass)
+       {
+               case TAPI_EVENT_CLASS_DATA:
+                       switch (eventType)
+                       {
+                               case TAPI_EVENT_PS_PDP_DEACT_IND:
+                                       tapi_ps_net_stop_rsp_t* pdp_stop_resp;
+                                       memcpy(pdp_stop_resp, psEvent->pData, sizeof(tapi_ps_net_stop_rsp_t));
+                                       printf("TAPI_EVENT_PS_PDP_DEACT_IND\n");
+                                       break;
+
+                               case TAPI_EVENT_PS_CALL_STATISTICS:
+                                       tapi_ps_call_statistics_t call_stats;
+                                       memcpy(&call_stats, psEvent->pData,
+                                                       sizeof(tapi_ps_call_statistics_t));
+                                       break;
+                       }
+                       break;
+       }
+       break;
+}
+@endcode
+@}
+@defgroup Use_Cases8_5 DataEnterDormantState
+@ingroup Use_Cases8_GPRS
+@{
+
+
+               <h3 class="pg">DataEnterDormantState</h3>
+This API is used to set the modem’s data channels to the dormant state for power saving when there is no data flowing for certain time.
+
+Precondition:
+@n GPRS session must be started before executing this API.
+
+@code
+int     tel_set_gprs_dormant (int * pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use. Use the Data Network API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiPS.h>
+
+void enterdormantstate()
+{
+       int ret_status;
+       int request_id = 0;
+
+       ret_status = TelTapiDataEnterDormantState(&request_id);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("/n/ Entered Dormant State successfully \\n");
+       }
+       else
+       {
+               printf("/nerror:%d  \\n", ret_status);
+       }
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+void  ps_app_callback  (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int  requestId;
+       int  status;
+       void  *EventData = NULL;
+
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+       printf(" app _callback is called \n");
+
+       switch (eventClass)
+       {
+               case TAPI_EVENT_CLASS_DATA:
+                       switch (eventType)
+                       {
+                               case TAPI_EVENT_PS_DATA_DORMANT_RESP:
+                                       TelTapiGprsDataDormancy_t resp;
+                                       memcpy(&resp, psEvent->pData, sizeof(TelTapiGprsDataDormancy_t));
+                                       printf("TAPI_EVENT_PS_DATA_DORMANT_RESP\n");
+                                       break;
+                       }
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases8_6 SetPortlist
+@ingroup Use_Cases8_GPRS
+@{
+
+
+               <h3 class="pg">SetPortlist</h3>
+This API is used to set white or black port list
+
+@code
+int tel_set_gprs_port_list(int *pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use. Use the Data Network API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiPS.h>
+
+void setportlist()
+{
+       int ret_val;
+       int requestId = 0;
+       tapi_gprs_pdp_port_list_setting_info_t test;
+
+       memset(&test, 0, sizeof(tapi_gprs_pdp_port_list_setting_info_t));
+       test.tcp_list.type = TAPI_GPRS_PORT_LIST_NOT_USE;
+       test.tcp_list.len = 1;
+       test.tcp_list.list[0] = 1004;
+       test.udp_list.type = TAPI_GPRS_PORT_LIST_NOT_USE;
+       test.udp_list.len = 1;
+       test.udp_list.list[i] = 1111;
+
+       ret_val = tel_set_gprs_port_list(&test, &requestId);
+}
+//CALLBACK FUNCTION TO BE USED
+void  ps_app_callback  (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void *EventData = NULL;
+
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+       printf(" app _callback is called \n");
+
+       switch (eventClass)
+       {
+               case TAPI_EVENT_CLASS_DATA:
+                       switch (eventType)
+                       {
+                               case TAPI_EVENT_PS_DATA_DORMANT_RESP:
+                                       printf("TAPI_EVENT_PS_DATA_DORMANT_RESP\n");
+                                       break;
+                       }
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases8_7 GetPortlist
+@ingroup Use_Cases8_GPRS
+@{
+
+
+               <h3 class="pg">GetPortlist</h3>
+This function is used to get white or black port list from modem
+
+@code
+int tel_get_gprs_port_list(int *pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use. Use the Data Network API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiPS.h>
+
+Void getportlist()
+{
+       int ret_val;
+       int requestId = 0;
+       ret_val = tel_get_gprs_port_list(&requestId);
+}
+
+//CALLBACK FUNCTION TO BE USED
+void  ps_app_callback  (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void *EventData = NULL;
+
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+       printf(" app _callback is called \n");
+
+       switch (eventClass)
+       {
+               case TAPI_EVENT_CLASS_DATA:
+                       switch (eventType)
+                       {
+                               case TAPI_EVENT_PS_DATA_DORMANT_RESP:
+                                       tapi_gprs_pdp_port_list_setting_info_t *info;
+                                       memcpy(info, psEvent->pData, sizeof(tapi_gprs_pdp_port_list_setting_info_t));
+                                       printf("TAPI_EVENT_PS_DATA_DORMANT_RESP\n");
+                                       break;
+                       }
+       }
+}
+@endcode
+@}
+
+@defgroup Appendixes1 Appendix A. Sample Codes
+@ingroup Appendix
+@{
+<h1 class="pg">Appendixes</h1>
+       <h2 class="pg">Appendix A. Sample Codes</h2>
+Some reference sample code is attached to help the application developer understand the telephony Framework Module
+
+How to use supplementary service APIs and handle SS events
+@code
+#include <ITapiSs.h>
+#include <TapiEvent.h>
+#include <TapiCommon.h>
+#include <TelUtility.h>
+
+GMainLoop *nw_context_loop = NULL;
+
+typedef struct
+{
+       int group;
+       int type;
+       int len;
+       void *dst;
+} data_t;
+
+static int SS_Callback(int eventClass, int eventType, void * param2)
+{
+       int i;
+       printf ("\n\n\n SS_Callback is called! eventClass : %d\n, eventType : %d\n", eventClass, eventType);
+       fflush(stdout);
+       switch (eventType)
+       {
+               case TAPI_EVENT_SS_REL_COMP_MSG_NOTIFY:
+                       if (param2 != NULL) {
+                               int x = 0;
+                               TelSsRelCompMsgInfo_t rel_comp_msg;
+                               memcpy(&rel_comp_msg, (TelSsRelCompMsgInfo_t *)param2,
+                                               sizeof(TelSsRelCompMsgInfo_t));
+                               printf("Printing the Release Complete Message \n");
+
+                               for (x=0; x<rel_comp_msg.RelCompMsgLen; x++)
+                               {
+                                       printf("[%.2x]", rel_comp_msg.szRelCompMsg[x]);
+                               }
+                       }// end if
+                       break;
+
+               case TAPI_EVENT_SS_WAITING_CNF:
+                       printf("####    Received Event : TAPI_EVENT_SS_WAITING_CNF  ##### \n");
+                       if (param2 == NULL) {
+                               printf("param2 is NULL\n");
+                       }
+                       else {
+                               TelSsInfo_t SsInfo;
+                               memcpy(&SsInfo, (TelSsInfo_t*)param2, sizeof(TelSsInfo_t));
+                               for (i=0; i<SsInfo.NumberOfRecords; i++)
+                               {
+                                       printf("Number of records %d \n", SsInfo.NumberOfRecords);
+                                       printf("Record:%d Status:%d Teleservice:%d \n",
+                                                       i,
+                                                       sInfo.SsRecord.WaitingRecord.rec_class[i].Status,
+                                                       SsInfo.SsRecord.WaitingRecord.rec_class[i].TeleCommService);
+                                       if (SsInfo.SsRecord.WaitingRecord.rec_class[i].Status == TAPI_SS_STATUS_ACTIVE)
+                                               printf("####    Status: Active      #### \n");
+                                       else
+                                               printf("####     Status: Not Active   #### \n");
+                               } //end for
+                       }//end else
+                       break;
+
+               case TAPI_EVENT_SS_WAITING_QUERYSTATUS_CNF:
+                       printf("####    Received vent :TAPI_EVENT_SS_WAITING_QUERYSTATUS_CNF  ##### \n");
+                       if (param2 == NULL) {
+                               printf("\n paran 2 is NULL\n");
+                               break;
+                       }
+                       TelSsInfo_t SsInfo;
+                       memcpy(&SsInfo, (TelSsInfo_t*)param2, sizeof(TelSsInfo_t));
+                       for (i=0; i<SsInfo.NumberOfRecords; i++) {
+                               printf("Number of records %d \n",SsInfo.NumberOfRecords);
+                               printf("Record:%d Status:%d Teleservice:%d \n",
+                                               i,
+                                               SsInfo.SsRecord.WaitingRecord.rec_class[i].Status,
+                                               SsInfo.SsRecord.WaitingRecord.rec_class[i].TeleCommService);
+
+                               if (SsInfo.SsRecord.WaitingRecord.rec_class[i].Status == TAPI_SS_STATUS_ACTIVE)
+                                       printf("####    Status: Active      #### \n");
+                               else
+                                       printf("####     Status: Not Active   #### \n");
+                       }//end for
+                       break;
+
+               case TAPI_EVENT_SS_BARRING_QUERYSTATUS_CNF:
+                       printf("####    Received Event :TAPI_EVENT_SS_BARRING_QUERYSTATUS_CNF  ##### \n");
+                       break;
+
+               case TAPI_EVENT_SS_BARRING_CNF:
+                       printf("####    Received Event :TAPI_EVENT_SS_BARRING_CNF   ##### \n");
+                       break;
+
+               case TAPI_EVENT_SS_BARRING_CHANGEPASS_CNF:
+                       printf("####    Received Event : TAPI_EVENT_SS_BARRING_CHANGEPASS_CNF  ##### \n");
+                       printf("Call barring Password Changed successfully\n");
+                       break;
+
+               case TAPI_EVENT_SS_FORWARD_CNF:
+                       printf("####    Received Event :TAPI_EVENT_SS_FORWARD_CNF  ##### \n");
+                       if (param2 != NULL) {
+                               TelSsInfo_t SsInfo;
+                               memset(&SsInfo, 0, sizeof(TelSsInfo_t));
+                               memcpy(&SsInfo, (TelSsInfo_t*)param2, sizeof(TelSsInfo_t));
+                               printf("Number of records %d \n", SsInfo.NumberOfRecords);
+                               for (i=0; i<SsInfo.NumberOfRecords; i++)
+                               {
+                                       printf("Number of records %d\n", SsInfo.NumberOfRecords);
+                                       printf("Record:%d Status:%d Teleservice:%d \n",
+                                                       i,
+                                                       SsInfo.SsRecord.ForwardingRecord.rec_class[i].Status,
+                                                       SsInfo.SsRecord.ForwardingRecord.rec_class[i].TeleCommService);
+                                       if (SsInfo.SsRecord.ForwardingRecord.rec_class[i].Status == TAPI_SS_STATUS_REGISTERED)
+                                               printf("####    Status: Registered      #### \n");
+                                       else if (SsInfo.SsRecord.ForwardingRecord.rec_class[i].Status == TAPI_SS_STATUS_ACTIVE)
+                                               printf("####     Status: Active   #### \n");
+                                       else
+                                               printf("####    Status: Not Registered /Not Active     ####\n");
+                               }//end for
+                       }
+                       else
+                       {
+                               printf("param2 is NULL\n");
+                       }
+                       break;
+
+               case TAPI_EVENT_SS_FORWARD_QUERYSTATUS_CNF:
+                       printf("####    Received Event : TAPI_EVENT_SS_FORWARD_QUERYSTATUS_CNF  ##### \n");
+                       if (param2 != NULL) {
+                               TelSsInfo_t SsInfo;
+                               memcpy(&SsInfo, (TelSsInfo_t*)param2, sizeof(TelSsInfo_t));
+                               for (i=0; i<SsInfo.NumberOfRecords; i++)
+                               {
+                                       printf("Number of records %d \n", SsInfo.NumberOfRecords);
+                                       printf("Record:%d Status:%d Teleservice:%d \n",
+                                                       i,
+                                                       SsInfo.SsRecord.ForwardingRecord.rec_class[i].Status,
+                                                       SsInfo.SsRecord.ForwardingRecord.rec_class[i].TeleCommService);
+                                       if (SsInfo.SsRecord.ForwardingRecord.rec_class[i].Status == TAPI_SS_STATUS_REGISTERED)
+                                               printf("####    Status: Registered      #### \n");
+                                       else if (SsInfo.SsRecord.ForwardingRecord.rec_class[i].Status == TAPI_SS_STATUS_ACTIVE)
+                                               printf("####     Status: Active   #### \n");
+                                       else
+                                               printf("####    Status: Not Registered /Not Active     #### \n");
+                               }//end for
+                       }//end if
+                       else
+                       {
+                               printf("param 2 is NULL\n");
+                       }
+                       break;
+
+               case TAPI_EVENT_SS_CLI_QUERYSTATUS_CNF:
+                       printf("####    Received Event : TAPI_EVENT_SS_IDENTIFY_IND #### \n");
+                       if (param2 != NULL) {
+                               TelSsInfo_t SsInfo;
+                               memcpy(&SsInfo, (TelSsInfo_t*)param2, sizeof(TelSsInfo_t));
+                               printf("Status :%d   CLI Service : %d \n",
+                                               SsInfo.SsRecord.CliRecord.CliStatus,
+                                               SsInfo.SsRecord.CliRecord.IdentificationType);
+                               if (SsInfo.SsRecord.CliRecord.CliStatus == 1)
+                                       printf(" #####    Status : Not Provisioned   #####\n");
+                               else if (SsInfo.SsRecord.CliRecord.CliStatus == 2)
+                                       printf(" #####    Status :  Provisioned  but Deactivated #####\n");
+                               else if (SsInfo.SsRecord.CliRecord.CliStatus == 3)
+                                       printf(" #####    Status : Provisioned  and Activated   #####\n");
+                               else if (SsInfo.SsRecord.CliRecord.CliStatus == 4)
+                                       printf(" #####    Status : Unknown   #####\n");
+                               else if (SsInfo.SsRecord.CliRecord.CliStatus == 5)
+                                       printf(" #####    Status : Temporarily Restricted  #####\n");
+                               else if (SsInfo.SsRecord.CliRecord.CliStatus == 6)
+                                       printf(" #####    Status : Temporarily Allowed  #####\n");
+                       }
+                       else
+                       {
+                               printf("param 2 is NULL\n");
+                       }
+                       break;
+
+               default:
+                       printf("\n\nDID NOT GET THE EVENT\n");
+                       break;
+       }//end switch
+       g_main_loop_quit(nw_context_loop);
+       return 0;
+}//end call back
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       SS_Callback((int)eventClass, (int)eventType, EventData);
+}
+
+ss_test_subscribe_tapi_events()
+{
+       //REGISTER EVENT
+       unsigned int subscription_id = 0;
+       TapiResult_t api_err;
+
+       api_err = TelTapiInit();
+       if (api_err != TAPI_API_SUCCESS)
+       {
+               printf("TelTapiInit Failed - api_err = %d \n", api_err);
+       }
+       api_err = TelTapiRegisterEvent(TAPI_EVENT_SS_WAITING_CNF, &subscription_id, (TelAppCallback)&app_callback);
+       printf("SS Class registeration is Done: sub id is %d, api_err is %d\n",subscription_id,api_err);
+       fflush(stdout);
+}
+
+noti_finish()
+{
+       //DEREGISTER EVENT
+       unsigned int subscription_id = 0;
+       TapiResult_t api_err;
+
+       api_err = tel_deregister_event(subscription_id);
+       if (api_err != TAPI_API_SUCCESS)
+       {
+               printf("Event Class Unregeration Fail\n");
+       }
+}
+
+tapi_ss_call_barr()
+{
+       TapiResult_t ret_status;
+       TelSsCallBarringInfo_t pBarringInfo;
+       int pRequestId = 0;
+       char *bar_pwd = "0000";
+
+       printf("Before copying ,,,length is %d\n", strlen(pBarringInfo.szPassword));
+       printf("len initially is %d\n", strlen(bar_pwd));
+
+       pBarringInfo.Mode = TAPI_SS_CALL_BAR_ACTIVATE;
+       pBarringInfo.Type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;//TAPI_CALL_BARRING_ALL_OUTGOING_INTERN_CALL;
+       pBarringInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
+       strcpy(pBarringInfo.szPassword, bar_pwd);
+       printf("length is %d\n", strlen(pBarringInfo.szPassword));
+       ret_status = tel_set_ss_barring(&pBarringInfo, &pRequestId);
+       if (ret_status != TAPI_API_SUCCESS) {
+               return;
+       }
+
+       nw_context_loop = g_main_loop_new(NULL, FALSE);
+       g_main_loop_run(nw_context_loop);
+
+
+       //now , get the status
+       TelSsCallBarType_t BarType = TAPI_CALL_BARRING_ALL_OUTGOING_INTERN_CALL;
+       TelSsCallType_t CallType = TAPI_CALL_TYPE_VOICE_EV;
+       ret_status = tel_get_ss_barring_status(BarType,CallType, &pRequestId);
+       if (ret_status != TAPI_API_SUCCESS) {
+               return ;
+       }
+
+       nw_context_loop = g_main_loop_new(NULL, FALSE);
+       g_main_loop_run(nw_context_loop);
+}
+
+tapi_ss_call_fwd()
+{
+       TapiResult_t ret_status;
+       TelSsForwardInfo_t pForwardInfo;
+       int len;
+       int pRequestId = 0;
+       char *cf_number = "9986529874";
+
+       pForwardInfo.Mode = TAPI_CALL_FORWARD_MODE_ENABLE_EV;
+       pForwardInfo.Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
+       pForwardInfo.Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+       pForwardInfo.NoReplyConditionTimer = 10;
+
+       len = strlen(cf_number);
+       printf("Length of CF number :%d \n", len);
+       memcpy(&(pForwardInfo.szPhoneNumber), cf_number, len);
+       ret_status = tel_set_ss_forward(&pForwardInfo, &pRequestId);
+       if (ret_status != TAPI_API_SUCCESS) {
+               return ;
+       }
+
+       nw_context_loop = g_main_loop_new(NULL, FALSE);
+       g_main_loop_run(nw_context_loop);
+
+       //now , get call forward status
+       TelSsForwardType_t Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
+       TelSsForwardWhen_t Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+
+       // Calling TAPI SS Call Frwd Query Req Status Api
+       ret_status = tel_get_ss_forward_status(Type,Condition, &pRequestId);
+       if (ret_status != TAPI_API_SUCCESS) {
+               return ;
+       }
+
+       nw_context_loop = g_main_loop_new(NULL, FALSE);
+       g_main_loop_run(nw_context_loop);
+}
+
+tapi_ss_call_wait()
+{
+       //set and get call waiting
+       TapiResult_t ret_status;
+       TelSsWaitingInfo_t waitInfo;
+       int RequestID;
+
+       waitInfo.Mode = TAPI_SS_CW_ACTIVATE;
+       waitInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
+
+       //set call wait
+       ret_status = tel_set_ss_waiting(&waitInfo, &RequestID);
+       if (ret_status != TAPI_API_SUCCESS) {
+               return;
+       }
+
+       nw_context_loop = g_main_loop_new(NULL, FALSE);
+       g_main_loop_run(nw_context_loop);
+
+       sleep(4);
+
+       //now get call wait
+       TelSsCallType_t CallType = TAPI_CALL_TYPE_VOICE_EV;
+       ret_status = tel_get_ss_waiting_status(CallType, &RequestID);
+       if (ret_status != TAPI_API_SUCCESS) {
+               return;
+       }
+       nw_context_loop = g_main_loop_new(NULL, FALSE);
+       g_main_loop_run(nw_context_loop);
+}
+
+ss_test()
+{
+       ss_test_subscribe_tapi_events();
+       tapi_ss_call_barr();
+       tapi_ss_call_fwd();
+       tapi_ss_call_wait();
+       noti_finish();
+}
+
+int main(int argc, char *argv[])
+{
+       ss_test();
+       return 0;
+}
+@endcode
+@}
+@defgroup Appendixes2 Appendix   B. Error Code
+@ingroup Appendix
+@{
+
+       <h2 class="pg">Appendix B. Error Code</h2>
+<table>
+<tr><td>Error Num.</td>
+<td>Error Code</td>
+<td>Error Description</td></tr>
+<tr><td>0</td>
+<td>TAPI_API_SUCCESS</td>
+<td>No Error occurred</td></tr>
+<tr><td>-1</td>
+<td>TAPI_API_INVALID_INPUT</td>
+<td>Input values are not correct in TAPI Library</td></tr>
+<tr><td>-2</td>
+<td>TAPI_API_INVALID_PTR</td>
+<td>invalid pointer</td></tr>
+<tr><td>-3</td>
+<td>TAPI_API_NOT_SUPPORTED</td>
+<td>The feature corresponding to requested API is not supported. This may be due to market/network/vendor reasons such as the feature is not available in the network.</td></tr>
+<tr><td>-4</td>
+<td>TAPI_API_DEPRICATED </td>
+<td>This API is deprecated and will be so in future also </td></tr>
+<tr><td>-5</td>
+<td>TAPI_API_SYSTEM_OUT_OF_MEM</td>
+<td>Out of memory</td></tr>
+<tr><td>-6</td>
+<td>TAPI_API_SYSTEM_RPC_LINK_DOWN</td>
+<td>RPC link down</td></tr>
+<tr><td>-7</td>
+<td>TAPI_API_SERVICE_NOT_READY          </td>
+<td>Phone was powered on, but yet to receive the power up completed notification </td></tr>
+<tr><td>-8</td>
+<td>TAPI_API_SERVER_FAILURE</td>
+<td>error occurred in Telephony server</td></tr>
+<tr><td>-9</td>
+<td>TAPI_API_OEM_PLUGIN_FAILURE</td>
+<td>Plug-in layer failure</td></tr>
+<tr><td>-10</td>
+<td>TAPI_API_TRANSPORT_LAYER_FAILURE</td>
+<td>Transport layer Failure</td></tr>
+<tr><td>-11</td>
+<td>TAPI_API_INVALID_DATA_LEN</td>
+<td>Invalid data length</td></tr>
+</table>
+@}
+*/
+/**
+* @defgroup  TELEPHONY
+ @{
+*      @defgroup Appendix Reference
+*      @defgroup TELEPHONY_USECASES Use Cases
+       @{
+*              @defgroup Use_Cases1_COMMON COMMON
+*              @defgroup Use_Cases2_CALL CALL
+*              @defgroup Use_Cases3_SUPPLEMENTARY_SERVICE SUPPLEMENTARY_SERVICE
+*              @defgroup Use_Cases4_SMS SMS
+*              @defgroup Use_Cases5_NETWORK NETWORK_Registration_and_Configuration
+*              @defgroup Use_Cases6_SOUND SOUND
+*              @defgroup Use_Cases7_SAT SAT
+*              @defgroup Use_Cases8_GPRS GPRS
+       @}
+ @}
+*/
diff --git a/include/TapiUtility.h b/include/TapiUtility.h
new file mode 100644 (file)
index 0000000..c7227c5
--- /dev/null
@@ -0,0 +1,272 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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.
+ */
+
+/**
+ * @open
+ * @ingroup            TelephonyAPI
+ * @addtogroup COMMON_TAPI     COMMON
+ * @{
+ *
+ * @file TelUtility.h
+
+ @brief This file serves as a "C" header file defines structures for Utility Services. \n
+ It contains a sample set of constants, enums, structs that would be required by applications.
+ */
+
+#ifndef _TEL_UTILITY_H_
+#define _TEL_UTILITY_H_
+
+__BEGIN_DECLS
+
+#define INVALID_REQUEST_ID     -1    /**< Invalid RequestId Value */
+#define DBUS_DEFAULT_PATH      "/org/tizen/telephony"
+
+/**
+ * @enum TapiResult_t
+ * Below enumerations are the return codes of TAPI API's
+ */
+typedef enum {
+       TAPI_API_SUCCESS = 0, /**<No Error occurred */
+       TAPI_API_INVALID_INPUT = -1, /**<input values are not correct in TAPI Library */
+       TAPI_API_INVALID_PTR = -2, /**<invalid pointer */
+       TAPI_API_NOT_SUPPORTED = -3, /**<The feature corresponding to 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 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 was powered on, but yet to receive the power up completed notification */
+       TAPI_API_SERVER_FAILURE = -8, /**<error occurred in 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 Request for the same service are already in progress */
+       TAPI_API_OFFLINE_MODE_ERROR = -13, /**<OEM Telephony Provider is in Offline mode. */
+       TAPI_EVENT_CLASS_UNKNOWN = -14, /**<Event class specified is not present in Event Class list. - 20*/
+       TAPI_EVENT_UNKNOWN = -15, /**<Event specified is not present in 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_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 call  context*/
+       TAPI_API_CTXT_SEARCH_RET_NON_CALL_CTXT = -203, /**< Context search returned non-call context*/
+       TAPI_API_COULD_NOT_DESTROY_CTXT = -204, /**< could not destroy context*/
+       TAPI_API_INVALID_LINE_ID = -205, /**< invalid line ID*/
+       TAPI_API_INVALID_CALL_HANDLE = -206, /**<Invalid call handle  - 35*/
+       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 can not be established now.*/
+       TAPI_API_CALL_SAME_REQ_PENDING = -209, /**<  Can not accept same request multiple times  */
+
+       /*      POWER   */
+       TAPI_API_MODEM_POWERED_OFF = -300, /**<The Modem is powered off */
+       TAPI_API_MODEM_ALREADY_ON = -301, /**<Modem already on */
+       TAPI_API_MODEM_ALREADY_OFF = -302, /**<Modem already off */
+
+       /* NETTEXT */
+       TAPI_API_NETTEXT_DEVICE_NOT_READY = -400, /**<Nettext device not ready */
+       TAPI_API_NETTEXT_SCADDR_NOT_SET = -401, /**<Nettext SCA address not set */
+       TAPI_API_NETTEXT_INVALID_DATA_LEN = -402, /**<Nettext Invalid data length */
+       TAPI_NETTEXT_SCADDRESS_NOT_SET = -403, /**<Nettext SCA address not set*/
+
+       /* SIM  */
+       TAPI_API_SIM_CARD_ERROR = -500, /**<SIM error/blocked state */
+       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, etc) */
+       TAPI_API_SIM_LOCKED = -503,
+
+       /* 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 USIM*/
+
+       /* Network */
+       TAPI_API_NETWORK_INVALID_CTXT = -700, /**< Network invalid context*/
+
+       /*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;
+
+/**
+ * This will check the 'scalar_exp' for TRUE, if failed then return 'err_value' from 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; \
+       } \
+}
+
+/**
+ * Returns from the current function if the expression is not true. 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.
+ *
+ * expr : the expression to check.
+ */
+#define TAPI_RETURN_IF_FAIL(scalar_exp) {\
+       if (!scalar_exp) \
+       { \
+               err("TAPI_RETURN_IF_FAIL: Failed: Returning from here."); \
+               return; \
+       } \
+}
+
+/**
+ * Returns from the current function, returning the value ret, if the expression is not true.
+ * If the expression evaluates to FALSE, a critical message is logged and 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; \
+       } \
+}
+
+/**
+ * Returns from the current function, returning the value ret, if the expression is not true.
+ * If the expression evaluates to FALSE, a critical message is logged and 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; \
+       } \
+}
+
+/**
+ * This assert will log an err on stderr and abort,  if assertion failed,
+ * Use this only if the telephpny sevrer needs to be exited, if asertion fails
+ */
+#define TAPI_ASSERT(scalar_exp)        assert(scalar_exp);
+
+/**
+ * Returns from the current function, returning the value ret, if the exp1 and exp2 are of same value.
+ * If the equal expression evaluates to TRUE, a critical message is logged and 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; \
+       } \
+}
+
+/**
+ * void *calloc(size_t nelements, size_t bytes);
+ * which allocates a region of memory large enough to hold nelements of size bytes each.
+ * 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); \
+               fprintf(stderr,"Calloc ERRNO %d\n", errno); \
+               TAPI_ASSERT(ptr); \
+       }
+
+/**
+ * why ptr = NULL; after free()?.
+ * 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"); \
+       }
+
+/**
+ * check for available destination buffer size before copying source buffer data to destination buffer.
+ * Assert if destination buffer size less than 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); \
+       }
+
+/**
+ * Encode a sequence of binary data into its Base-64 stringified representation.
+ *
+ * data : the binary data to encode.
+ * len : the length of data.
+ * Returns : a newly allocated, zero-terminated Base-64 encoded string representing data.
+ * gchar *g_base64_encode (const guchar *data, gsize len);
+ */
+#define TAPI_BASE64_ENCODE(data, len, encoded_data) \
+       encoded_data = g_base64_encode((const guchar *)data, (gsize) len);
+
+/**
+ * Decode a sequence of Base-64 encoded text into binary data
+ *
+ * text : zero-terminated string with base64 text to decode.
+ * out_len : The length of the decoded data is written here.
+ * Returns : a newly allocated buffer containing the binary data that text represents
+ * guchar *g_base64_decode  (const gchar *text, gsize *out_len);
+ */
+#define TAPI_BASE64_DECODE(text, decoded_data, ptr_out_len)    \
+       decoded_data = g_base64_decode((const gchar *)text, (gsize *)ptr_out_len);
+
+/**
+ * Define Macro for calculate 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..f20f9b8
--- /dev/null
@@ -0,0 +1,1015 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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.
+ */
+
+/**
+ * @open
+ * @ingroup            TelephonyAPI
+ * @addtogroup TAPI_CALL       CALL
+ * @{
+ *
+ * @file TelCall.h
+
+ @brief This file serves as a "C" header file defines structures for Tapi Call Services. \n
+ It contains a sample set of constants, enums, structs that would be required by applications.
+ */
+
+#ifndef _TEL_CALL_H_
+#define _TEL_CALL_H_
+
+#include <TelSs.h>
+#include <TelDefines.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define TAPI_CALLING_NAME_SIZE_MAX      80      /**< The maximum length of the string for calling party name.   */
+#define TAPI_CALL_UUS_DATA_LEN_MAX      131     /**< The Maximum length of the user to user singnalling data string.   */
+#define TAPI_CALL_DISPLAY_RECORD_MAX    32      /**< The maximum length of the string for display record in CDMA   */
+#define MAX_TAPI_CALL_COUNT                            6       /**< Maximum number of call can be possible at a time */
+#define MAX_TAPI_CONF_CALL_COUNT               5       /**< Maximum number of Call can be possible in a conference call at a time */
+#define INVALID_CALL_HANDLE                            0               /**< TS_UINT is used for call handle */
+
+/* Call */
+#define        TAPI_CALL_DIALDIGIT_LEN_MAX             82              /**< Maximum Dialling Digit Length  */
+#define        TAPI_CALL_SUBADDRESS_LEN_MAX    40              /**< Maximum Call Subaddress Length */
+#define        TAPI_CALL_NUMBER_LEN_MAX                7               /**< Dialling Num length */
+#define        TAPI_CONTEXT_CALL_SIZE_MAX              6               /**< Maximum Call context */
+#define        TAPI_CALL_DIAL_NUMBER_LEN_MAX   82
+
+#define TAPI_INVALID_CONTEXTHANDLE             (HTapiContext)-1
+#define TAPI_CLIENT_SIZE_MAX                   30
+#define TAPI_CALL_CUSTOM_SERVICE_DATA_MAX              128
+
+/**
+ * @enum TelCallCause_t
+ * This structure defines the values for Call Cause.
+ */
+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 un authorized */
+       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 happened */
+       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_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 fail */                                                  //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 already USSD transaction is ongoing. */
+       TAPI_CAUSE_IDLE,                                        /**< Idle */
+       TAPI_CAUSE_NETWORK_SPECIFIC,            /**< Network specific error */
+       TAPI_CAUSE_FADE,                                        /**< voice call was dropped e.g. because of a loss of signal */
+       TAPI_CAUSE_UNKNOWN,                             /**< unknown no details available */
+       TAPI_CAUSE_INCOM_CALL,                          /**< terminated by incoming call */
+       TAPI_CAUSE_ALERT_STOP,                          /**< terminated by alert stop */
+       TAPI_CAUSE_INTERCEPT,                           /**< voice call was dropped by interception */
+       TAPI_CAUSE_REORDER,                             /**< voice call was 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,       /**< Un acceptable 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 Success */
+       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;
+
+/**
+ * @enum TelTapiEndCause_t
+ * When a call is ended, this end cause is given with the CALL END notification to the application.  This end cause can be originated
+ * from different elements in the communication path or different modules in the same element.
+ */
+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 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,                  /**< incomming 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,/**< Resticted 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 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_END = 128,
+
+       /* 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 not existant */
+       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 expire */
+       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 of Network 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 cal failure */
+       TAPI_CDMA_END_CAUSE_PHONE_OFFLINE,                              /**< Call Released because of phone offline */
+       TAPI_CDMA_END_CAUSE_PHONE_IS_CDMA_LOCKED,               /**< Call Released because of CDMA locked */
+       TAPI_CDMA_END_CAUSE_FLASH_IS_IN_PROGRESS_ERR,   /**< Call Released because of flash-is-in-progress error */
+       TAPI_CDMA_END_CAUSE_E911_MODE_ERR,                              /**< Call Released because of e911 mode */
+       TAPI_CDMA_END_CAUSE_OTHERS,                                     /**< Call Released by Others */
+       TAPI_CDMA_END_CAUSE_MAX                                         /**< Maximum End Cause limit for cdma */
+} TelTapiEndCause_t;
+
+/**
+ * @enum TelConferenceCallState_t
+ * This enum defines the call conference states
+ */
+typedef enum {
+       TAPI_CALL_CONFERENCE_IDLE,      /**< idle */
+       TAPI_CALL_CONFERENCE_ACTIVE /**< active */
+} TelConferenceCallState_t;
+
+/**
+ * @enum TelCallStates_t
+ * Applications can use these sates or can have their own states.
+ */
+typedef enum {
+       TAPI_CALL_STATE_IDLE,           /**< Call is in idle state - i.e. no call */
+       TAPI_CALL_STATE_ACTIVE,         /**< Call is in connected and conversation state */
+       TAPI_CALL_STATE_HELD,           /**< Call is in held state */
+       TAPI_CALL_STATE_DIALING,        /**< Call is in dialing state */
+       TAPI_CALL_STATE_ALERT,          /**< Call is in alerting state */
+       TAPI_CALL_STATE_INCOMING,       /**< Call is in incoming state */
+       TAPI_CALL_STATE_WAITING,        /**< Call is in answered state, and waiting for connected indication event */
+       TAPI_CALL_STATE_MAX
+} TelCallStates_t;
+
+/**
+ * IN GSM ONLY: call identification number.
+ */
+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;
+
+/**
+ * The Incoming call indication could have be one of the following SS info messages in it.
+ */
+typedef enum {
+       /*      Number details are present in the "char number" of call info struct. if number is not present
+        then "no cli cause" member in  mt_ss_info is set accordingly.  */
+       TAPI_CALL_MT_CLI_PRESENT = 0x31,
+
+       /*      Calling Name Info presnet,      TelCallingNameInfo_t of call info struct contains this info.  */
+       TAPI_CALL_MT_CNA_PRESENT = 0x32,
+
+       /*      Undefined ss indication. Ignore mt_ss_info */
+       TAPI_CALL_MT_SS_UNDEFINED = 0x00,
+
+} TelCallMtSSInfo_t;
+
+/**
+ * @enum TelCallAnswerType_t
+ * Answer type used as in parameter in the answer call API.
+ */
+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 */
+       TAPI_CALL_ANSWER_HOLD_AND_ACCEPT,       /**< Hold the current active call, and accept the wating call */
+} TelCallAnswerType_t;
+
+/**
+ * @enum TelCallEndType_t
+ * End type used as in parameter in the end call API.
+ */
+typedef enum {
+       TAPI_CALL_END = 0,      
+       TAPI_CALL_END_ALL,
+       TAPI_CALL_END_ACTIVE_ALL,
+       TAPI_CALL_END_HOLD_ALL,
+} TelCallEndType_t;
+
+
+
+
+/**
+ * @enum TelCallType_t
+ * Applications needs to use this call type while using the setup call API. Like the requested call is a voice call or video call.
+ */
+typedef enum {
+       TAPI_CALL_TYPE_VOICE,   /**< Voice call type. */// in ipcv4, 0x0100
+       TAPI_CALL_TYPE_DATA,    /**< Data call type - (for modem, fax, packet, etc. calls). */// in ipcv4, 0x0200
+       TAPI_CALL_TYPE_E911     /**< Emergency call type. */// in ipcv4, 0x0700
+} TelCallType_t;
+
+/**
+ * @enum TelCallAlertingPattern_t
+ * This enumeration defines the different alerting patterns available.
+ */
+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;
+
+/**
+ * @enum TelCallActiveState_t
+ * State of the current call.
+ */
+typedef enum {
+       TAPI_CALL_CONNECT_IDLE, /**< Call is in Idle state. */
+       TAPI_CALL_CONNECT_ACTIVE,       /**< Call is in Active state.*/
+       TAPI_CALL_CONNECT_HELD          /**< Call is in Held state. */
+} TelCallActiveState_t;
+
+/**
+ * @enum TelCallCugOptions_t
+ * This enumeration defines the closed user group options
+ */
+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;
+
+/**
+ * @enum TelCallUusProtocolType_t
+ *  This enumeration defines the tapi call uus protocol types
+ */
+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;
+
+/**
+ * @enum TelCallNameMode_t
+ *  This enumeration defines the call name mode
+ */
+typedef enum {
+       TAPI_CALL_NAME_AVAIL = 0,                               /**< This identifier refers to the presentation of the calling party's name identity to the called party. */
+       TAPI_CALL_NAME_RESTRICTED = 1,                  /**< This identifier refers to the restriction of presentation of the name identity of the calling party to the called party. */
+       TAPI_CALL_NAME_UNAVAIL = 2,                     /**< This identifier refers to the unavailability of the calling party's name identity to be offered to the called party. */
+       TAPI_CALL_NAME_AVAIL_RESTRICTED = 3     /**< This identifier refers to the calling party's name identity to be offered to the called party with which presentation restriction is overridden.  */
+} TelCallNameMode_t;
+
+/**
+ * @enum TelCallSSNocliCause_t
+ * This enumeration defines the value for "No Cli cause".
+ */
+typedef enum {
+       TAPI_SS_NO_CLI_CAUSE_UNAVAILABLE = 0x00,                /**< Unavailable */
+       TAPI_SS_NO_CLI_CAUSE_REJECTBY_USER = 0x01,              /**< Rejected by User */
+       TAPI_SS_NO_CLI_CAUSE_INTERACTION_OTHERSERVICES = 0x02, /**<  Other services */
+       TAPI_SS_NO_CLI_CAUSE_COINLINE_PAYPHONE = 0x03,  /**< Coin line phone */
+       TAPI_SS_NO_CLI_CAUSE_MAX                                                /**< maximum usage */
+} TelCallSSNocliCause_t;
+
+/**
+ * Fwded Ind Type used for MO and Mt from SS Noti Info
+ */
+typedef enum {
+       TAPI_CALL_OUTGOING_FWDED = 0x00,        /* Outgoing call forwarded */
+       TAPI_CALL_INCOMMING_FWDED = 0x01,       /* Incoming call forwarded */
+} TelCallForwardType_t;
+
+/**
+ * @enum TelCallPrivacyMode_t
+ * This structure contains the voice privacy option mode(CDMA only).
+ */
+typedef enum {
+       TAPI_CALL_PRIVACY_MODE_STANDARD = 0x00, /**< Standard mode */
+       TAPI_CALL_PRIVACY_MODE_ENHANCED         /**< Enhanced mode */
+} TelCallPrivacyMode_t;
+
+/**
+ * @enum TelCallPrivacyType_t
+ * This structure contains the voice privacy request type(CDMA only).
+ */
+typedef enum {
+       TAPI_CALL_PRIVACY_TYPE_MS = 0x01,       /**< Mobile Station Voice Privacy Mode */
+       TAPI_CALL_PRIVACY_TYPE_BS,                      /**< Base Station Voice Privacy Mode */
+       TAPI_CALL_PRIVACY_TYPE_CURRENT          /**< Current Serving Privacy Mode */
+} TelCallPrivacyType_t;
+
+/**
+ * @enum TelCallEmergecyMode_t
+ * This structure contains the emergency callback mode(CDMA only).
+ */
+typedef enum {
+       TAPI_CALL_EMERGENCY_MODE_EXIT,  /**< Emergency CB Exit mode */
+       TAPI_CALL_EMERGENCY_MODE_ENTER  /**< Emergency CB Enter mode */
+} TelCallEmergecyMode_t;
+
+/**
+ * @enum TelCallOtaType_t
+ * This structure contains the OTA type(CDMA only).
+ */
+typedef enum {
+       TAPI_CALL_OTATYPE_OTASP = 0x01, /**< OTASP : mobile initiated OTA*/
+       TAPI_CALL_OTATYPE_OTAPA,                /**< OTAPA : network initiated OTA */
+} TelCallOtaType_t;
+
+/**
+ * @enum TelCallOtaspStatus_t
+ * This structure contains the OTASP Status(CDMA only).
+ */
+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;
+
+/**
+ * @enum TelCallOtapaStatus_t
+ * This structure contains the OTAPA Status(CDMA only).
+ */
+typedef enum {
+       TAPI_CALL_OTAPA_STOP = 0x00,    /**< OTAPA : stop */
+       TAPI_CALL_OTAPA_START,                  /**< OTAPA : start */
+} TelCallOtapaStatus_t;
+
+/**
+ * @enum TelCallTimeMaskType_t
+ * This structure contains call time request mask type.
+ */
+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;
+
+/**
+ * @enum TelCallToneDuration_t
+ * This structure contains dtmf tone length.
+ */
+typedef enum {
+       TAPI_CALL_TONE_DURATION_SHORT = 0x01,
+       TAPI_CALL_TONE_DURATION_LONG
+} TelCallToneDuration_t;
+
+/**
+ * @enum TelCallEmergencyCategory_t
+ * This structure contains emergency category type
+ */
+typedef enum {
+       TAPI_CALL_ECC_DEFAULT = 0x00,
+       TAPI_CALL_ECC_POLICE = 0x01,
+       TAPI_CALL_ECC_AMBULANCE = 0x02,
+       TAPI_CALL_ECC_FIREBRIGADE = 0x04,
+       TAPI_CALL_ECC_MARINEGUARD = 0x08,
+       TAPI_CALL_ECC_MOUNTAINRESCUE = 0x10,
+       TAPI_CALL_ECC_MANUAL_ECALL = 0x20,
+       TAPI_CALL_ECCY_AUTO_ECALL = 0x40
+} TelCallEmergencyCategory_t;
+
+typedef enum {
+       TAPI_CALL_IDENTITY_DEFAULT, /**< Calling line identity will be sent. Based on network setting, Line identity will presented to the called party. */
+       TAPI_CALL_IDENTITY_SHOW,        /**< Display calling line identity */
+       TAPI_CALL_IDENTITY_HIDE /**< Hide the display of Calling line identity */
+} TelCallIdentityMode_t;
+
+
+/**
+ * context type
+ */
+typedef enum {
+       TAPI_CONTEXT_TYPE_NONE = 0x00,
+       TAPI_CONTEXT_TYPE_VOICE_CALL = 0x01,
+       TAPI_CONTEXT_TYPE_DATA_CALL = 0x2,
+       TAPI_CONTEXT_TYPE_VIDEO_CALL = 0x3,
+       TAPI_CONTEXT_TYPE_NETTEXT,
+       TAPI_CONTEXT_TYPE_E911,
+} TapiContextType;
+
+
+/**
+ * Timer State and or Call Timer ID
+ */
+typedef enum {
+       TAPI_CALL_TSTATE_IDLE = 0x00,           /**< No timer running */
+       TAPI_CALL_TSTATE_SETUP_PENDING, /**< Setup Timer */
+       TAPI_CALL_TSTATE_CONNECT_PENDING,       /**< Connected 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;
+
+typedef struct {
+       TS_BOOL bRequestedBySAT;                        /** This flag is to indicate whether the request has been initiated by SAT or not.Possible values are 0 and 1. This flag should be updated only when originating a setup request */
+       TelCallIdentityMode_t IdentityMode; /**< Sets Calling Line Identity mode. If default value  TAPI_IDENTITY_DEFAULT is set, OEM will set the default value. */
+       TelCallEmergencyCategory_t ecc;
+} tel_set_call_satflag_identiymode;
+
+/**
+ * This structure contains information about the redirect destination  information.
+ */
+typedef struct {
+       unsigned char number[TAPI_CALL_DIAL_NUMBER_LEN_MAX + 1]; /**< Redirect destination number */
+} TelCallDeflectDstInfo_t;
+
+/**
+ * This structure defines the calling name information
+ */
+typedef struct {
+       TelCallNameMode_t NameMode;                                     /**< Display mode of the szNameData. */
+       char szNameData[TAPI_CALLING_NAME_SIZE_MAX];    /**< Calling party name string.   */
+} TelCallingNameInfo_t;
+
+/**
+ * This structure contains information about an outgoing call.
+ */
+typedef struct {
+       TelCallType_t CallType;                                         /**< sets type of call (voice, data, video, emergency) */
+       char szNumber[TAPI_CALL_DIALDIGIT_LEN_MAX + 1]; /**< A string containing the destination phone number. This follows the dial number format.*/
+} TelCallDial_t;
+
+/**
+ * This structure contains information about call status.
+ */
+typedef struct {
+       int CallHandle;
+       int bMoCall;                                                                    /**< Status will be yes for MO Call. If MT call, then FALSE*/
+       char pNumber[TAPI_CALL_DIALDIGIT_LEN_MAX + 1];  /**< Mobile Number */
+       TelCallType_t CallType;                                         /**< Specifies type of call (voice, data, emergency) */
+       TelCallStates_t CallState;                                              /**< Current Call state */
+       int bConferenceState;                                                   /**< Whether Call is in Conference or not*/
+} TelCallStatus_t;
+
+typedef void (*TelCallStatusCallback)( TelCallStatus_t *out, void *user_data );
+
+
+/**
+ * This structure contains information about call redirection details.
+ */
+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;
+
+/**
+ * This structure contains the incoming call information.
+ */
+typedef struct {
+       unsigned int CallHandle;                                /**< At Foundation API Level, Call handle indicates the Handle of the Call for the Application . At Framework API Level, call handle indicates the Call identifier used for 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 network, this information will be NULL.*/
+       TelCallRedirectionInfo_t RedirectInfo;  /**< The data for the Call Redirect information. If there is no information from network, this information will be NULL.  */
+       TelCallSSNocliCause_t CliCause;         /**< No of CLI cause */
+       int fwded;                                                              /**< True or false. If Incoming call is a forwarded call, then true else false. */
+       TelCallActiveLine_t ActiveLine;         /**< Current Active Line */
+} TelCallIncomingCallInfo_t;
+
+/**
+ *SS Info message.
+ */
+typedef struct {
+       TelCallMtSSInfo_t type; /* Type of the SS Info presnet. */
+       TelCallSSNocliCause_t no_cli_cause;
+} 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 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;                             /* EndCause */
+} TelTapiCallInfo_t;
+
+/**
+ * This structure contains the connected number information.
+ */
+typedef struct {
+       TelCallSSNocliCause_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;
+
+/**
+ * This structure contains the voice privacy info(CDMA only).
+ */
+typedef struct {
+       TelCallPrivacyType_t PrivacyType; /**< Voice Privacy Request Type */
+       TelCallPrivacyMode_t PrivacyMode; /**< Voice Privacy Mode */
+} TelCallVoicePrivacyInfo_t;
+
+/**
+ * This structure contains the OTA progress indication information(CDMA only).
+ */
+typedef struct {
+       TelCallOtaType_t OtaType;                       /**< OTA type */
+       TelCallOtaspStatus_t OtaspStatus;       /**< OTASP status : if OTA type is  OTASP, it is valid */
+       TelCallOtapaStatus_t OtapaStatus;       /**< OTAPA status : if OTA type is  OTAPA, it is valid */
+} TelCallOtaProgressInfo_t;
+
+/**
+ * This structure contains information about a call time and call count.
+ */
+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 second) */
+       unsigned long OutgoingCallTime; /**< Overall Outgoing Call Time(in second) */
+       unsigned long IncomingCallTime; /**< Overall Incoming Call Time(in second) */
+       unsigned long LastCallTime;     /**< Last Call Time(in second) */
+} TelCallTimeInfo_t;
+
+/**
+ * This structure contains information about display record in CDMA.
+ */
+typedef struct {
+       unsigned char Record[TAPI_CALL_DISPLAY_RECORD_MAX + 1]; /**< display record */
+} TelCallDisplayRecordInfo_t;
+
+// New Struct for New API
+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;
+
+typedef enum {
+       TAPI_SOUND_RECORDING_OFF,
+       TAPI_SOUND_RECORDING_ON,
+
+} TelSoundRecording_t;
+
+typedef enum {
+       TAPI_SOUND_DEVICE_RECEIVER = 0x00,
+       TAPI_SOUND_DEVICE_SPEAKER_PHONE = 0x10,
+       TAPI_SOUND_DEVICE_HFK = 0x20,
+       TAPI_SOUND_DEVICE_HEADSET = 0x30,
+       TAPI_SOUND_DEVICE_BLUETOOTH = 0x40,
+       TAPI_SOUND_DEVICE_EC = 0xA0,
+} TelSoundDevice_t;
+
+typedef enum {
+       TAPI_SOUND_TYPE_VOICE = 0x01,
+       TAPI_SOUND_TYPE_KEYTONE = 0x02,
+       TAPI_SOUND_TYPE_BELL = 0x03,
+       TAPI_SOUND_TYPE_MESSAGE = 0x04,
+       TAPI_SOUND_TYPE_ALARM = 0x05,
+       TAPI_SOUND_TYPE_PDA_MISC = 0x06,
+} TelSoundType_t;
+
+
+typedef struct {
+       TelSoundDevice_t device;
+       TelSoundType_t type;
+       TelSoundVolume_t volume;
+} 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,
+       TAPI_SOUND_PATH_MIC1                =0x09,
+       TAPI_SOUND_PATH_MIC2                =0x0A,
+       TAPI_SOUND_PATH_HEADSET_HAC         =0x0B,
+} TelSoundPath_t;
+
+typedef struct {
+       TelSoundPath_t path;
+       enum ExtraVolumeStatus {
+               TAPI_SOUND_EX_VOLUME_OFF,
+               TAPI_SOUND_EX_VOLUME_ON,
+       } ex_volume;
+} TelCallSoundPathInfo_t;
+
+typedef enum {
+       TAPI_SOUND_MUTE_STATUS_OFF,
+       TAPI_SOUND_MUTE_STATUS_ON,
+} TelSoundMuteStatus_t;
+
+typedef enum {
+       TAPI_SOUND_NOISE_REDUCTION_OFF,
+       TAPI_SOUND_NOISE_REDUCTION_ON,
+} TelSoundNoiseReduction_t;
+
+typedef enum {
+       TAPI_SOUND_EQUALIZATION_MODE_OFF,
+       TAPI_SOUND_EQUALIZATION_MODE_ON,
+       TAPI_SOUND_EQUALIZATION_MODE_FLAG_OFF,
+       TAPI_SOUND_EQUALIZATION_MODE_FLAG_ON,
+       TAPI_SOUND_EQUALIZATION_MODE_SOFT1,
+       TAPI_SOUND_EQUALIZATION_MODE_SOFT2,
+} TelSoundEqualizationMode_t;
+
+typedef enum {
+       TAPI_SOUND_DIRECTION_LEFT,
+       TAPI_SOUND_DIRECTION_RIGHT,
+} TelSoundDirection_t;
+
+
+#define MAX_SOUND_EQ_PARAMETER_SIZE 6
+typedef struct {
+       TelSoundEqualizationMode_t mode;
+       TelSoundDirection_t direction;
+       unsigned short parameter[MAX_SOUND_EQ_PARAMETER_SIZE];
+} TelCallSoundEqualization_t;
+
+
+
+
+typedef struct {
+       unsigned int id;
+} TelCallAnswerCnf_t;
+
+typedef struct {
+       TelCallEndType_t type;
+       unsigned int id;
+} TelCallEndCnf_t;
+
+typedef struct {
+       unsigned int id;
+} TelCallHoldCnf_t;
+
+typedef struct {
+       unsigned int id;
+} TelCallActiveCnf_t;
+
+typedef struct {
+       unsigned int id;
+} TelCallSwapCnf_t;
+
+typedef struct {
+       unsigned int id;
+} TelCallJoinCnf_t;
+
+typedef struct {
+       unsigned int id;
+} TelCallSplitCnf_t;
+
+typedef struct {
+       unsigned int id;
+} TelCallTransferCnf_t;
+
+typedef struct {
+       unsigned int record_num;
+       TelCallVolumeInfo_t record[ 20 ];
+} TelCallGetVolumeInfoResp_t;
+
+typedef struct {
+       TelSoundMuteStatus_t status;
+} TelCallGetMuteStatusResp_t;
+
+
+
+
+
+
+typedef struct {
+       unsigned int id;
+       TelTapiEndCause_t cause; /**< End cause for the call indicates whether the call is released normally or due to other cause*/
+} TelCallStatusIdleNoti_t;
+
+typedef struct {
+       unsigned int id;
+} TelCallStatusActiveNoti_t;
+
+typedef struct {
+       unsigned int id;
+} TelCallStatusHeldNoti_t;
+
+typedef struct {
+       unsigned int id;
+} TelCallStatusDialingNoti_t;
+
+typedef struct {
+       unsigned int id;
+} TelCallStatusAlertNoti_t;
+
+typedef struct {
+       unsigned int id;
+} TelCallStatusIncomingNoti_t;
+
+typedef struct {
+       unsigned int id;
+} TelCallStatusWaitingNoti_t;
+
+typedef struct {
+       unsigned int id;
+} TelCallInfoWaitingNoti_t;
+
+typedef struct {
+       unsigned int id;
+} TelCallInfoForwardedNoti_t;
+
+typedef struct {
+       unsigned int id;
+} TelCallInfoBarredIncomingNoti_t;
+
+typedef struct {
+       unsigned int id;
+} TelCallInfoBarredOutgoingNoti_t;
+
+typedef struct {
+       unsigned int id;
+} TelCallInfoForwardConditionalNoti_t;
+
+typedef struct {
+       unsigned int id;
+} TelCallInfoForwardUnconditionalNoti_t;
+
+typedef struct {
+       unsigned int id;
+} TelCallInfoActiveNoti_t;
+
+typedef struct {
+       unsigned int id;
+} TelCallInfoHeldNoti_t;
+
+typedef struct {
+       unsigned int id;
+} TelCallInfoJoinedNoti_t;
+
+typedef struct {
+       TelSoundPath_t path;
+} TelCallSoundPathNoti_t;
+
+typedef enum {
+       TAPI_CALL_SOUND_RINGBACK_TONE_START,
+       TAPI_CALL_SOUND_RINGBACK_TONE_END,
+} TelCallSoundRingbackToneNoti_t;
+
+typedef enum {
+       TAPI_CALL_SOUND_WBAMR_STATUS_OFF,
+       TAPI_CALL_SOUND_WBAMR_STATUS_ON,
+} TelCallSoundWbamrNoti_t;
+
+typedef struct {
+       TelSoundNoiseReduction_t status;
+} TelCallSoundNoiseReductionNoti_t;
+
+typedef struct {
+       TelSoundEqualizationMode_t mode;
+       TelSoundDirection_t direction;
+} TelCallSoundEqualizationNoti_t;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  // _TEL_CALL_H_
+/**
+ * @}
+ */
diff --git a/include/TelDefines.h b/include/TelDefines.h
new file mode 100644 (file)
index 0000000..a303c99
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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.
+ */
+
+/**
+ * @ingroup            TelephonyAPI
+ * @addtogroup COMMON_TAPI     COMMON
+ * @{
+ *
+ * @file TelDefines.h
+ * @brief  This file  provides #defines required for Telephony server and TAPI Client Library
+ */
+
+#ifndef _TEL_DEFINES_H_
+#define _TEL_DEFINES_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Machine independence */
+typedef long TS_INT32;
+typedef unsigned long TS_UINT32;
+
+typedef int TS_INT;
+typedef unsigned int TS_UINT;
+typedef double TS_DOUBLE;
+
+typedef int TS_BOOL;
+
+/* Programming concept */
+typedef unsigned char TS_BYTE;
+typedef unsigned short TS_WORD;
+typedef unsigned long TS_DWORD;
+typedef unsigned char TS_UINT8;
+typedef char TS_INT8;
+typedef unsigned short TS_UINT16;
+typedef unsigned long TS_ULONG;
+typedef unsigned long long TS_UINT64;
+typedef unsigned short TS_USHORT;
+
+#ifndef TRUE
+#define TRUE           1
+#endif
+
+#ifndef FALSE
+#define FALSE          0
+#endif
+
+#ifndef DEPRECATED
+#define DEPRECATED __attribute__((deprecated))
+#endif
+
+typedef int HObj;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TEL_DEFINES_H_ */
+
+/**
+ *  @}
+ */
diff --git a/include/TelDisplay.h b/include/TelDisplay.h
new file mode 100644 (file)
index 0000000..82eeda1
--- /dev/null
@@ -0,0 +1,200 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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.
+ */
+
+/**
+ * @internal
+ * @ingroup            TelephonyAPI
+ * @addtogroup         DISPLAY_TAPI    DISPLAY
+ * @{
+ *
+ * These APIs allow an application to accomplish the following services: @n
+ * - Get the Display Icon Information. @n
+ */
+
+#ifndef _TEL_DISPLAY_H_
+#define _TEL_DISPLAY_H_
+
+#include <TelDefines.h>
+#include <TelUtility.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define TAPI_MAX_DISP_O2_HOMEZONE_TAG_LEN      13      /** Maximum number of bytes Home Zone Tag name */
+#define TAPI_MAX_DISP_ROAM_INFO_LEN                            49      /* Roaming location information Maximum length is 32 bytes, But, 49 bytes in Modem code*/
+#define TAPI_MAX_DISP_PHONE_FATAL_ERR_MSG_LEN  64      /* Phone fatal error message length */
+
+/**
+ * This defines the RSSI levels.
+ * In GSM, this field represent the radio signal strength in  dBm , but in the CDMA this field represents
+ * the number of the antenna bar as follows
+ */
+typedef enum {
+       TAPI_DISPLAY_RSSI_0 = 0x00,
+       TAPI_DISPLAY_RSSI_1 = 0x01,
+       TAPI_DISPLAY_RSSI_2 = 0x02,
+       TAPI_DISPLAY_RSSI_3 = 0x03,
+       TAPI_DISPLAY_RSSI_4 = 0x04,
+       TAPI_DISPLAY_RSSI_5 = 0x05,
+       TAPI_DISPLAY_RSSI_6 = 0x06
+} tapi_display_rssi_level_t;
+
+/**
+ * This enum defines the strength of the battery in levels
+ */
+typedef enum {
+       TAPI_POWER_PHONE_BATT_LEVEL0 = 0x00, /**< BLANK(Critical Low) */
+       TAPI_POWER_PHONE_BATT_LEVEL1 = 0x01, /**< bar1 */
+       TAPI_POWER_PHONE_BATT_LEVEL2 = 0x02, /**< bar2 */
+       TAPI_POWER_PHONE_BATT_LEVEL3 = 0x03, /**< bar3 */
+       TAPI_POWER_PHONE_BATT_LEVEL4 = 0x04, /**< bar4 */
+       TAPI_POWER_PHONE_BATT_LEVEL5 = 0x05, /**< bar5 */
+       TAPI_POWER_PHONE_BATT_LEVEL_INIT = 0x06 /**< init value */
+} tapi_phone_battery_level_t;
+
+/**
+ * Home Zone UI Icon Indiction Type
+ */
+typedef enum {
+       TAPI_DISPLAY_HMZ_O2_ZONE_INDI_NONE = 0x00, /**< None */
+       TAPI_DISPLAY_HMZ_O2_ZONE_INDI_IND = 0x01, /**< Ind */
+       TAPI_DISPLAY_HMZ_O2_ZONE_INDI_CLEAR = 0x02 /**< Clear */
+} tapi_display_hmz_02_zone_ind_t;
+
+/**
+ * Home Zone Type
+ */
+typedef enum {
+       TAPI_DISPLAY_HMZ_O2_ZONE_TYPE_NONE = 0x00, /**< None */
+       TAPI_DISPLAY_HMZ_O2_ZONE_TYPE_HOME = 0x01, /**< Home Zone */
+       TAPI_DISPLAY_HMZ_O2_ZONE_TYPE_CITY = 0x02 /**< City Zone */
+} tapi_display_hmz_02_zone_type_t;
+
+/**
+ * ZONE_TAG_PRESENT
+ */
+typedef enum {
+       TAPI_DISPLAY_HMZ_O2_ZONE_TAG_NONE = 0x00, /**< None */
+       TAPI_DISPLAY_HMZ_O2_ZONE_TAG_PRESENT = 0x01, /**< Present */
+       TAPI_DISPLAY_HMZ_O2_ZONE_TAG_ABSENT = 0x02 /**< Absent */
+} tapi_display_hmz_02_zone_tag_t;
+
+/**
+ * This enumeration is used to identify what icon info the client is interested in..
+ */
+typedef enum {
+       TAPI_DISPLAY_GET_ICON_RSSI = 0x01, /**< Signal Strength */
+       TAPI_DISPLAY_GET_ICON_BATT = 0x02, /**< Battery Level */
+       TAPI_DISPLAY_GET_ICON_HDR_RSSI = 0x04, /**< HDR(High Data Rate RSSI - CDMA */
+       TAPI_DISPLAY_GET_ICON_ALL = 0xFF /**< All Values Request */
+} tapi_display_get_icon_req_type_t;
+
+/**
+ * roam info Control Indication Type
+ */
+typedef enum {
+       TAPI_DISPLAY_ROAM_INDI_NONE = 0x00, /**< None */
+       TAPI_DISPLAY_ROAM_TEXT_OFF = 0x01, /**< Roam Text Off */
+       TAPI_DISPLAY_ROAM_TEXT_ON = 0x02 /**< Roam Text On */
+} tapi_display_roam_control_ind_t;
+
+/**
+ * roam info data roam guard Indication Type
+ */
+typedef enum {
+       TAPI_DISPLAY_DATA_ROAM_GUARD_NONE = 0x00, /**< None */
+       TAPI_DISPLAY_DATA_ROAM_GUARD_OFF = 0x01, /**< Data Roam Guard Off */
+       TAPI_DISPLAY_DATA_ROAM_GUARD_ON = 0x02 /**< Data Roam Guard On */
+} tapi_display_data_roam_guard_ind_t;
+
+/**
+ * roam info data roam guard Indication Type
+ */
+typedef enum {
+       TAPI_DISPLAY_USER_IND_NORMAL_MODE = 0x01, /**< Normal Mode */
+       TAPI_DISPLAY_USER_IND_INITIAL_PROGRAMMING = 0x02, /**< Initial Programming needed */
+       TAPI_DISPLAY_USER_IND_MAINTENANCE_REQUIRED = 0x03, /**< Maintenance Required */
+       TAPI_DISPLAY_USER_IND_AUTHENTICATION_REQUIRED = 0x04 /**< Authentication Required */
+} tapi_display_user_ind_message_t;
+
+/**
+ * This structure defines the display icon information
+ */
+typedef struct {
+       tapi_display_rssi_level_t rssi; /**< RSSI Levels */
+       tapi_display_rssi_level_t hdrRssi; /**< HDR(High Data Rate) RSSI Levels -CDMA */
+       tapi_phone_battery_level_t batt; /**< Battery Level */
+} tapi_display_icon_info_t;
+
+/**
+ * HomeZone Information Notification Message
+ *
+ * This service specifies the implementation of o2 DE's HomeZone Indication (HZI) service
+ * in 3G or 2G handsets. The HZI service consists of displaying a text and, optionally depending
+ * on the zone, an icon in the handset (UE) when the UE is located within a zone which is defined
+ * individually for each customer. The zone is defined by a set of cells, i. e. for each cell the
+ * indication is either displayed or not. If the display of a MS is too small to display the complete
+ * operator name together with the complete tag, it will be allowed to display the operator
+ * name and the HomeZone/CityZone-tag in the same line ('o2 - de city' or 'o2 - de home').
+ *
+ * Reference O2 Home Zone spec.
+ */
+typedef struct {
+       tapi_display_hmz_02_zone_ind_t ind;
+       tapi_display_hmz_02_zone_type_t type;
+       tapi_display_hmz_02_zone_tag_t tag_presnet;
+
+       /**
+        * The coding is 12-character string coded in the short message alphabet given
+        * In GSM 03.38 with bit 8 set to zero. Default FF. FF indicates no display.
+        * If ZONE_TAG_PRESENT, then this is 13 bytes.
+        * If ZONE_TAG_ABSENT, then this is zero byte.
+        */
+       unsigned char tag_name[TAPI_MAX_DISP_O2_HOMEZONE_TAG_LEN];
+} tapi_display_hmz_o2_ind_t;
+
+/**
+ * Notify the TS of the occurrence of the phone fatal in the phone
+ */
+typedef struct {
+       unsigned char Msg_len;
+       unsigned char Message[TAPI_MAX_DISP_PHONE_FATAL_ERR_MSG_LEN];
+} tapi_display_phone_fatal_info_noti_t;
+
+/**
+ * Notify the TS of the occurrence of the ext roam info in the phone
+ */
+typedef struct {
+       tapi_display_roam_control_ind_t control;
+       tapi_display_data_roam_guard_ind_t data_roam_guard;
+       unsigned char txt_len;
+       unsigned char text[TAPI_MAX_DISP_ROAM_INFO_LEN];
+} tapi_display_ext_roam_info_noti_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TEL_DISPLAY_H_ */
+
+/**
+ *  @}
+ */
diff --git a/include/TelErr.h b/include/TelErr.h
new file mode 100644 (file)
index 0000000..0b25164
--- /dev/null
@@ -0,0 +1,186 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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.
+ */
+
+/**
+ * @open
+ * @ingroup                    TelephonyAPI
+ * @addtogroup         COMMON_TAPI     COMMON
+ * @{
+ *     These error codes are used by Applications.
+ */
+
+
+#ifndef _TEL_ERR_H_
+#define _TEL_ERR_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/************************************************************
+**    Errors defined in  "+CME ERROR" ,
+**    - see 3GPP TS 27.007
+**    - ranges are 0x00 ~ 0x7FFF
+************************************************************/
+/**
+       Error codes sent by the modem in response to the above operations.
+*/
+typedef enum
+{
+  /* GENERAL ERRORS */
+  TAPI_OP_GEN_ERR_PHONE_FAILURE        = 0,                                            /* 0 */
+  TAPI_OP_GEN_ERR_NO_CONNECTION_TO_PHONE,                                      /* 1 */
+  TAPI_OP_GEN_ERR_PHONE_ADAPTOR_LINK_RESERVED,                 /* 2 */
+  TAPI_OP_GEN_ERR_OPER_NOT_ALLOWED,                                            /* 3 */
+  TAPI_OP_GEN_ERR_OPER_NOT_SUPPORTED,                                          /* 4 */
+  TAPI_OP_GEN_ERR_PH_SIM_PIN_REQU,                                             /* 5 */
+  TAPI_OP_GEN_ERR_PH_FSIM_PIN_REQU,                                            /* 6 */
+  TAPI_OP_GEN_ERR_PH_FSIM_PUK_REQU,                                            /* 7 */
+  TAPI_OP_GEN_ERR_SIM_NOT_INSERTED     =10,                                    /* 10 */
+  TAPI_OP_GEN_ERR_SIM_PIN_REQU,                                                        /* 11 */
+  TAPI_OP_GEN_ERR_SIM_PUK_REQU,                                                        /* 12 */
+  TAPI_OP_GEN_ERR_SIM_FAILURE,                                                 /* 13 */
+  TAPI_OP_GEN_ERR_SIM_BUSY,                                                            /* 14 */
+  TAPI_OP_GEN_ERR_SIM_WRONG,                                                           /* 15 */
+  TAPI_OP_GEN_ERR_INCORRECT_PW,                                                        /* 16 */
+  TAPI_OP_GEN_ERR_SIM_PIN2_REQU,                                                       /* 17 */
+  TAPI_OP_GEN_ERR_SIM_PUK2_REQU,                                                       /* 18 */
+  TAPI_OP_GEN_ERR_MEM_FULL     = 20,                                                   /* 20 */
+  TAPI_OP_GEN_ERR_INVALID_INDEX,                                                       /* 21 */
+  TAPI_OP_GEN_ERR_NOT_FOUND,                                                           /* 22 */
+  TAPI_OP_GEN_ERR_MEM_FAILURE,                                                 /* 23 */
+  TAPI_OP_GEN_ERR_TEXT_STR_TOO_LONG,                                           /* 24 */
+  TAPI_OP_GEN_ERR_INVALID_CHARACTERS_IN_TEXT_STR,                      /* 25 */
+  TAPI_OP_GEN_ERR_DIAL_STR_TOO_LONG,                                           /* 26 */
+  TAPI_OP_GEN_ERR_INVALID_CHARACTERS_IN_DIAL_STR,                      /* 27 */
+  TAPI_OP_GEN_ERR_NO_NET_SVC   = 30,                                           /* 30 */
+  TAPI_OP_GEN_ERR_NET_TIMEOUT,                                                 /* 31 */
+  TAPI_OP_GEN_ERR_NET_NOT_ALLOWED_EMERGENCY_CALLS_ONLY,        /* 32 */
+  TAPI_OP_GEN_ERR_NET_PERS_PIN_REQU    = 40,                                   /* 40 */
+  TAPI_OP_GEN_ERR_NET_PERS_PUK_REQU,                                           /* 41 */
+  TAPI_OP_GEN_ERR_NET_SUBSET_PERS_PIN_REQU,                            /* 42 */
+  TAPI_OP_GEN_ERR_NET_SUBSET_PERS_PUK_REQU,                            /* 43 */
+  TAPI_OP_GEN_ERR_SVC_PROVIDER_PERS_PIN_REQU,                          /* 44 */
+  TAPI_OP_GEN_ERR_SVC_PROVIDER_PERS_PUK_REQU,                          /* 45 */
+  TAPI_OP_GEN_ERR_CORPORATE_PERS_PIN_REQU,                             /* 46 */
+  TAPI_OP_GEN_ERR_CORPORATE_PERS_PUK_REQU,                             /* 47 */
+  TAPI_OP_GEN_ERR_HIDDEN_KEY_REQU,                                             /* 48 */
+  TAPI_OP_GEN_ERR_UNKNOWN      = 100,                                          /* 100 */
+
+  /* Errors related to a failure to perform an Attach */
+  TAPI_OP_GEN_ERR_ILLEGAL_MS   = 103,                                  /* 103 */
+  TAPI_OP_GEN_ERR_ILLEGAL_ME   = 106,                                  /* 106 */
+  TAPI_OP_GEN_ERR_GPRS_SVC_NOT_ALLOWED,                                        /* 107 */
+  TAPI_OP_GEN_ERR_PLMN_NOT_ALLOWED     = 111,                          /* 111 */
+  TAPI_OP_GEN_ERR_LOCATION_AREA_NOT_ALLOWED,                           /* 112 */
+  TAPI_OP_GEN_ERR_ROAMING_NOT_ALLOWED_IN_THIS_LOCATION_AREA,/* 113 */
+
+  /* Errors related to a failure to Activate a Context */
+  TAPI_OP_GEN_ERR_SVC_OPT_NOT_SUPPORTED        = 132,                  /* 132 */
+  TAPI_OP_GEN_ERR_REQ_SVC_OPT_NOT_SUBSCRIBED,                          /* 133 */
+  TAPI_OP_GEN_ERR_SVC_OPT_TEMPORARILY_OUT_OF_ORDER,            /* 134 */
+  TAPI_OP_GEN_ERR_UNSPECIFIED_GPRS_ERR = 148,                  /* 148 */
+  TAPI_OP_GEN_ERR_PDP_AUTHENTICATION_FAILURE,                          /* 149 */
+  TAPI_OP_GEN_ERR_INVALID_MOBILE_CLASS,                                        /* 150 */
+
+  /* VBS / VGCS and eMLPP -related errors */
+  TAPI_OP_GEN_ERR_VBS_VGCS_NOT_SUPPORTED_BY_THE_NET    = 151,  /* 151 */
+  TAPI_OP_GEN_ERR_NO_SVC_SUBSCRIPTION_ON_SIM,                          /* 152 */
+  TAPI_OP_GEN_ERR_NO_SUBSCRIPTION_FOR_GROUP_ID,                        /* 153 */
+  TAPI_OP_GEN_ERR_GROUP_ID_NOT_ACTIVATED_ON_SIM,                       /* 154 */
+  TAPI_OP_GEN_ERR_NO_MATCHING_NOTI     = 155,                          /* 155 */
+  TAPI_OP_GEN_ERR_VBS_VGCS_CALL_ALREADY_PRESENT,                       /* 156 */
+  TAPI_OP_GEN_ERR_CONGESTION,                                                          /* 157 */
+  TAPI_OP_GEN_ERR_NET_FAILURE,                                                 /* 158 */
+  TAPI_OP_GEN_ERR_UPLINK_BUSY,                                                 /* 159 */
+  TAPI_OP_GEN_ERR_NO_ACCESS_RIGHTS_FOR_SIM_FILE        = 160,  /* 160 */
+  TAPI_OP_GEN_ERR_NO_SUBSCRIPTION_FOR_PRIORITY,                        /* 161 */
+  TAPI_OP_GEN_ERR_OPER_NOT_APPLICABLE_OR_NOT_POSSIBLE, /* 162 */
+
+
+  TAPI_OP_GEN_ERR_NONE = 0x8000,                               /* 0x8000 : No Errors */
+
+  /* General Common Errors : 0x8000 - 0x80FF */
+  TAPI_OP_GEN_ERR_INVALID_IPC,                                                 /* 0x8001 : Invalid IPC_GSM Parameter or Format */
+  TAPI_OP_GEN_ERR_PHONE_OFFLINE,                                                       /* 0x8002 : */
+  TAPI_OP_GEN_ERR_CMD_NOT_ALLOWED,                                             /* 0x8003 : */
+  TAPI_OP_GEN_ERR_PHONE_IS_INUSE,                                                      /* 0x8004 : */
+  TAPI_OP_GEN_ERR_INVALID_STATE        = 0x8005,                                       /* 0x8005 : */
+
+  TAPI_OP_GEN_ERR_NO_BUFFER,                                                           /* 0x8006 :  No internal free buffers */
+  TAPI_OP_GEN_ERR_OPER_REJ,                                                            /* 0x8007 :  Operation Rejected */
+  TAPI_OP_GEN_ERR_INSUFFICIENT_RESOURCE,                                       /* 0x8008 : insufficient resource */
+  TAPI_OP_GEN_ERR_NET_NOT_RESPOND,                                             /* 0x8009 : Network not responding */
+  TAPI_OP_GEN_ERR_SIM_PIN_ENABLE_REQ   = 0x800A,                       /* 0x800A : SIM Pin Enable Required */
+  TAPI_OP_GEN_ERR_SIM_PERM_BLOCKED,                                    /* 0x800B : SIM Permanent Blocked */
+  TAPI_OP_GEN_ERR_SIM_PHONEBOOK_RESTRICTED,                            /*0x800C: SIM Phonebook Restricted*/
+  TAPI_OP_GEM_ERR_FIXED_DIALING_NUMBER_ONLY,                           /*0x800D: Restricted By FDN Mode */
+
+  /* Reserved : 0x800E ~ 0x80FF */
+  TAPI_OP_GEN_ERR_800E_RESERVED_START  = 0x800E,                       /* 0x800E */
+
+  TAPI_OP_GEN_ERR_80FF_RESERVED_END    = 0x80ff,                               /* 0x80FF */
+
+  /* the other errors */
+  TAPI_OP_GEN_ERR_OTHERS                               = 0xFFFE,                                 /* 0xFFFE */
+
+  TAPI_OP_GEN_ERR_MAX                                  = 0xFFFF
+
+}tapi_phone_err_t;
+
+typedef enum {
+       TAPI_PDP_FAILURE_CAUSE_NORMAL                                           = 0x00,           // 0x00 : Normal Process ( no problem )
+       TAPI_PDP_FAILURE_CAUSE_REL_BY_USER                                      = 0x01,           // Call Released by User
+       TAPI_PDP_FAILURE_CAUSE_REGULAR_DEACTIVATION                     = 0x02,           // Regular de-activation
+       TAPI_PDP_FAILURE_CAUSE_LLC_SNDCP                                        = 0x03,           // LLC SNDCP failure
+       TAPI_PDP_FAILURE_CAUSE_INSUFFICIENT_RESOURCE            = 0x04,           // Insufficient resources
+       TAPI_PDP_FAILURE_CAUSE_UNKNOWN_APN                                      = 0x05,           // Missing or unknown APN
+       TAPI_PDP_FAILURE_CAUSE_UNKNOWN_PDP_ADDRESS                      = 0x06,           // Unknown PDP address or type
+       TAPI_PDP_FAILURE_CAUSE_USER_AUTH_FAILED                         = 0x07,           // Unknown PDP address or type
+       TAPI_PDP_FAILURE_CAUSE_ACT_REJ_GGSN                                     = 0x08,           // Unknown PDP address or type
+       TAPI_PDP_FAILURE_CAUSE_ACT_REJ_UNSPECIFIED                      = 0x09,           // Unknown PDP address or type
+       TAPI_PDP_FAILURE_CAUSE_SVC_OPTION_NOT_SUPPORTED         = 0x0A,           // Service option not supported
+       TAPI_PDP_FAILURE_CAUSE_SVC_NOT_SUBSCRIBED                       = 0x0B,           // Requested service option not subscribed
+       TAPI_PDP_FAILURE_CAUSE_SVC_OPT_OUT_ORDER                        = 0x0C,           // Service out of order
+    TAPI_PDP_FAILURE_CAUSE_NSAPI_USED                                  = 0x0D,           // NSAPI already used
+       TAPI_PDP_FAILURE_CAUSE_QOS_NOT_ACCEPTED                         = 0x0E,           // QoS not accepted
+       TAPI_PDP_FAILURE_CAUSE_NETWORK_FAILURE                          = 0x0F,           // Network Failure
+    TAPI_PDP_FAILURE_CAUSE_REACT_REQUIRED                              = 0x10,           // Reactivation Required
+       TAPI_PDP_FAILURE_CAUSE_FEATURE_NOT_SUPPORTED            = 0x11,           // Feature not supported
+       TAPI_PDP_FAILURE_CAUSE_TFT_FILTER_ERROR                         = 0x12,           // TFT or filter error
+       TAPI_PDP_FAILURE_CAUSE_UNKOWN_PDP_CONTEXT                       = 0x13,           // Unknown PDP context
+       TAPI_PDP_FAILURE_CAUSE_INVALID_MSG                                      = 0x14,           // Invalid MSG
+       TAPI_PDP_FAILURE_CAUSE_PROTOCOL_ERROR                           = 0x15,           // Protocol error
+       TAPI_PDP_FAILURE_CAUSE_MOBILE_FAILURE_ERROR                     = 0x16,           // Mobile failure error
+       TAPI_PDP_FAILURE_CAUSE_TIMEOUT_ERROR                            = 0x17,           // Timeout error
+       TAPI_PDP_FAILURE_CAUSE_UNKNOWN_ERROR                            = 0x18,           // Unknown error
+       TAPI_PDP_FAILURE_CAUSE_MAX ,
+} tapi_pdp_err_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _TEL_ERR_H_
+
+/**
+* @}
+*/
diff --git a/include/TelMisc.h b/include/TelMisc.h
new file mode 100644 (file)
index 0000000..8e4a8c4
--- /dev/null
@@ -0,0 +1,349 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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.
+ */
+
+/**
+ * @internal
+ * @ingroup            TelephonyAPI
+ * @addtogroup MISC_TAPI       MISC
+ * @{
+ *
+ * @file TelMisc.h
+
+ @brief This file serves as a "C" header file defines structures for Tapi Misc Services. \n
+ It contains a sample set of constants, enums, structs that would be required by applications.
+
+ */
+
+#ifndef _TEL_MISC_H_
+#define _TEL_MISC_H_
+
+#include <sys/time.h>
+#include <TelDefines.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
+
+/**
+ * @enum TelMiscApplicationKey_t
+ * This enumeration defines mmi check key values
+ */
+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,   //
+
+       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
+} TelMiscMMICHECK_t;
+
+/**
+ * @enum TelMiscApplicationKey_t
+ * This enumeration defines application key type
+ */
+typedef enum {
+       KEY_EXT_DIAL_0 = 0,
+       KEY_EXT_DIAL_1,
+       KEY_EXT_DIAL_2,
+       KEY_EXT_DIAL_3,
+       KEY_EXT_DIAL_4,
+       KEY_EXT_DIAL_5,
+       KEY_EXT_DIAL_6,
+       KEY_EXT_DIAL_7,
+       KEY_EXT_DIAL_8,
+       KEY_EXT_DIAL_9,
+       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,
+
+       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
+} TelMiscApplicationKey_t;
+
+/**
+ * @enum TelMiscDiagTouchEventType_t
+ * This enumeration defines the touch event type
+ */
+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;
+
+/**
+ * @enum  TelMiscAlarmMode_t
+ * Enum type for Validity of the Alarm booting
+ */
+typedef enum {
+       TAPI_MISC_ALARMBOOT_INACTIVATE, /**< 0x00: Inactivated */
+       TAPI_MISC_ALARMBOOT_ACTIVATE /**< 0x00: Activated */
+} 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`s 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;
+
+/**
+ * NAM Information MASK fiel
+ */
+typedef enum {
+       TAPI_MISC_NAM_INFO_MASK_TOTAL                   = 0x0001,
+       TAPI_MISC_NAM_INFO_MASK_CURRENT_INDEX   = 0x0002,
+       TAPI_MISC_NAM_INFO_MASK_REQUEST_INDEX   = 0x0004,
+       TAPI_MISC_NAM_INFO_MASK_AUTONAM         = 0x0008,
+       TAPI_MISC_NAM_INFO_MASK_MCC                     = 0x0010,
+       TAPI_MISC_NAM_INFO_MASK_MNC                     = 0x0020,
+       TAPI_MISC_NAM_INFO_MASK_MIN                     = 0x0040,
+       TAPI_MISC_NAM_INFO_MASK_MDN                     = 0x0080,
+       TAPI_MISC_NAM_INFO_MASK_NAM_NAME                = 0x0100,
+       TAPI_MISC_NAM_INFO_MASK_NAM_CHANGE              = 0x0200,
+       TAPI_MISC_NAM_INFO_MASK_NAM_NUM         = 0x0400,
+       TAPI_MISC_NAM_INFO_MASK_ALL                     = 0x8000
+} TelMiscNamInfoMaskType_t;
+
+/**
+ * NAMIndex Field
+ */
+typedef enum {
+       TAPI_MISC_NAM_1 = 0x00,
+       TAPI_MISC_NAM_2,
+       TAPI_MISC_NAM_3,
+       TAPI_MISC_NAM_4,
+       TAPI_MISC_NAM_5
+} TelMiscNamIndex_t;
+
+
+/**
+ * @enum  tapi_misc_nitz_dayofweek_t
+ * Enum type for day of week
+ */
+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;
+
+/**
+ * @enum  tapi_misc_nitz_daylight_t
+ * Enum type for daylight
+ */
+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;
+
+/**
+ * @enum  tapi_misc_nitz_timeinfo_t
+ * Enum type for types of data
+ */
+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;
+
+/**
+ * Mobile Equipment Version Information
+ */
+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;
+
+/**
+ * Mobile Equipment Serial Number Information
+ */
+typedef struct {
+       TelMiscSNIndexType_t sn_index; /**< serial number index */
+       int sn_len; /**< Length */
+       unsigned char szNumber[TAPI_MISC_ME_SN_LEN_MAX]; /**< Number */
+} TelMiscSNInformation;
+
+/**
+ * Event delivery - event type
+ */
+typedef struct {
+       struct timeval time; /**< Time information */
+       unsigned short type; /**< Type of event */
+       unsigned short code; /**< Code */
+       long value; /**< Value */
+} input_event_t;
+
+/**
+ * Diagnostic Key Code Information
+ */
+typedef struct {
+       unsigned char keycode; /**< Key Code */
+       unsigned char keyhold; /**< Key Hold */
+} TelMiscDiagKeyCodeInfomation;
+
+/**
+ * Struct for alarm info
+ */
+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 week */
+} TelMiscAlarmInfo_t;
+
+/**
+ * Struct for alarm response
+ */
+typedef struct {
+       TelMiscAlarmMode_t validity; /**< validity */
+       TelMiscAlarmInfo_t alarm_info; /**< alarm info */
+} TelMiscAlarmStatus_t;
+
+/**
+ * @struct  TelMiscNamInfo_t
+ * struct type for nam info
+ */
+typedef struct {
+       unsigned short nam_info_mask;
+       unsigned char nam_total; // this field is not used in case of nam set req.
+       unsigned char nam_current_index;
+       unsigned char nam_req_index;
+       unsigned char nam_auto;
+       unsigned char nam_mcc[TAPI_MISC_MCC_LEN_MAX+1];
+       unsigned char nam_mnc[TAPI_MISC_MCC_LEN_MAX+1];
+       unsigned char nam_min[TAPI_MISC_MIN_LEN_MAX+1];
+       unsigned char nam_mdn[TAPI_MISC_MDN_LEN_MAX+1];
+       unsigned char nam_name[TAPI_MISC_NAME_LEN_MAX+1];
+} TelMiscNamInfo_t;
+
+/**
+ * Struct for time info
+ */
+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 week */
+       unsigned long plmn; /**< day of 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..36233f5
--- /dev/null
@@ -0,0 +1,514 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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.
+ */
+
+/**
+* @open
+* @ingroup     TelephonyAPI
+* @addtogroup  Network_TAPI    Network
+* @{
+*
+* @file TelNetwork.h
+
+     @brief This file serves as a "C" header file and defines structures for Tapi Network Services\n
+      It contains a sample set of constants, enums, structs that would be required by applications.
+ */
+
+#ifndef _TEL_NETWORK_H_
+#define _TEL_NETWORK_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#define TAPI_NETWORK_ORDER_MAX                                 5               /**< Maximum network order */
+#define TAPI_NETWORK_LIST_MAX                                  15              /**< Maximum network list */
+#define TAPI_NETWORK_NAME_LEN_MAX                              40              /**< Maximum network name or PLMN name length*/
+#define TAPI_NETWORK_SPN_LEN_MAX                               20              /**< Maximum network service provider name length */
+#define TAPI_PREFERRED_PLMN_RECORDS_MAX                        150             /**< Maximum record length for preferred plmn list*/
+#define TAPI_NETWORK_DISPLAY_INFO_ELEMENTS             4               /**< Maximum network Display info element length */
+#define TAPI_NETWORK_HOMEZONE_TAG_MAX_LEN              13              /**< Maximum Network  Home zone tag  length */
+#define TAPI_NETWORK_CS_DISP_INDEX                             0               /**< Maximum   Network CS display index length */
+#define TAPI_NETWORK_PS_DISP_INDEX                             1               /**< Maximum  Network PS display index  length */
+#define TAPI_NETWORK_SVC_DISP_INDEX                            2               /**< Maximum  Network SVC display index length */
+#define TAPI_NETWORK_ROAM_DISP_INDEX                   3               /**< Maximum  Network roaming display index length */
+#define TAPI_NETWORK_SUBS_SVC_NUM_MAX                  6               /**< Maximum number of the Subscriber's services */
+#define TAPI_NETWORK_SUBS_NUM_LEN_MAX                  40              /**< Maximum Subscriber Number Length */
+#define TAPI_NETWORK_SUBS_ALPHA_LEN_MAX                        16              /**< Maximum Subscriber Name Length */
+#define TAPI_NETWORK_GERAN_NEIGHBORING_CELL_LIST_MAX 6 /**< Maximum GERAN neighboring cell list */
+#define TAPI_NETWORK_UMTS_NEIGHBORING_CELL_LIST_MAX 24 /**< Maximum UMTS neighboring cell list  */
+
+/* This value defines the network mode */
+#define TAPI_NETWORK_MODE_AUTO         0x00            /**< Set Network mode to AUTOMATIC */
+#define TAPI_NETWORK_MODE_GSM          0x01            /**< Set Network mode to GSM */
+#define TAPI_NETWORK_MODE_WCDMA                0x02            /**< Set Network mode to WCDMA  */
+#define TAPI_NETWORK_MODE_CDMA         0x04            /**< Set Network mode to CDMA */
+#define TAPI_NETWORK_MODE_LTE          0x08            /**< Set Network mode to LTE */
+
+/**
+ * @enum TelNetworkSelectionMode_t
+ *  This enumeration defines the network selection modes.
+ */
+typedef enum {
+       TAPI_NETWORK_SELECTIONMODE_AUTOMATIC,                   /**< Network selection is in Automatic selection mode*/
+       TAPI_NETWORK_SELECTIONMODE_MANUAL                               /**< Network selection is in Manual selection mode */
+} TelNetworkSelectionMode_t;
+
+/**
+ * @enum TelNetworkServiceDomain_t
+ * This enumeration defines the network service domains .
+ */
+typedef enum {
+       TAPI_NETWORK_SERVICE_DOMAIN_COMBINED,           /**< This member sets the Circuit switch   and Packet Switch domain */
+       TAPI_NETWORK_SERVICE_DOMAIN_PS,                         /**< This member sets the Packet Switch service domain */
+       TAPI_NETWORK_SERVICE_DOMAIN_CS,                         /**< This member sets the Circuit Switch service domain */
+       TAPI_NETWORK_SERVICE_DOMAIN_AUTOMATIC           /**< This member sets the service domain to Circuit Switch and Packet Switch or Circuit Switch or Packet Switch domain */
+} TelNetworkServiceDomain_t;
+
+/**
+ * @enum TelNetworkServiceLevel_t
+ * This enumeration defines the status of network service.
+ */
+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;
+
+/**
+ * @enum TelNetworkServiceLevel_t
+ * This enumeration defines the service types of TAPI.
+ */
+typedef enum {
+       TAPI_NETWORK_SERVICE_TYPE_NO_SVE,               /**< No service  (This enumeration is not applicable for OEM_TAPI_NW_select_network_req API) */
+       TAPI_NETWORK_SERVICE_TYPE_LIMITED,              /**< Limited service available in the camped network  (This enumeration is not applicable for OEM_TAPI_NW_select_network_req API) */
+       TAPI_NETWORK_SERVICE_TYPE_CS,                   /**< CS service available in the camped network */
+       TAPI_NETWORK_SERVICE_TYPE_PS,                   /**< PS service available in the camped network */
+       TAPI_NETWORK_SERVICE_TYPE_COMBINED              /**< Both CS and PS services available in the camped network */
+} TelNetworkServiceType_t;
+
+/**
+ * @enum TelNetworkSystemType_t
+ * This enumeration defines the system types of TAPI.
+ */
+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_EVDV,               /**< Available service is EV-DV */
+       TAPI_NETWORK_SYSTEM_LTE                 /**< Available service is LTE */
+} TelNetworkSystemType_t;
+
+/**
+ *  @enum TelNetworkBandPreferred_t
+ * This enumeration defines the operations that can be done on network Band.
+ */
+typedef enum
+{
+       TAPI_NETWORK_BAND_MODE_PREFERRED = 0x01,                 /**<  Preferred band. (If preferred Band is not available, then underlying modem can search on other bands) */
+       TAPI_NETWORK_BAND_MODE_ONLY = 0x02,                              /**<   This allows only particular band. */
+} TelNetworkBandPreferred_t;
+
+/**
+ * @enum TelNetworkBand_t
+ * This enumeration defines different network Bands.
+ */
+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;
+
+/**
+ * @enum TelNetworkOperationCause_t
+ * This enumeration defines different network operation cause.
+ */
+typedef enum
+{
+       TAPI_NETWORK_NO_ERR = 0x00,                                     /**< There is no error for any network operation.  */
+       TAPI_NETWORK_OPERATION_FAILED,                          /**< There is an error for any network operation.  */
+       TAPI_NETWORK_PHONE_IN_USE_ERR,                          /**< This error will be returned when any network operation is tried while 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 any network option is tried when phone is in offline mode */
+       TAPI_NETWORK_CONFIG_SETTINGS_FAILURE_ERR,       /**< This error is sent when modem is unable to process the config settings information. */
+       TAPI_NETWORK_INTERNAL_FAILURE_ERR,                      /**< This error to indicate internal failure */
+       TAPI_NETWORK_MEMORY_FULL_ERR                            /**< This error is caused by memory full */
+} TelNetworkOperationCause_t;
+
+
+/**
+ * @enum TelNetworkPreferredPlmnOp_t
+ * This enumeration defines the operation that can be done on preferred PLMN.
+ */
+typedef enum
+{
+       TAPI_NETWORK_PREF_PLMN_ADD=0x01,                        /**< Addition to  Network Preferred Plmn list*/
+       TAPI_NETWORK_PREF_PLMN_EDIT,                            /**< Edit the network Preferred Plmn list */
+       TAPI_NETWORK_PREF_PLMN_DELETE                           /**< Delete the entry to network Preferred Plmn list*/
+} TelNetworkPreferredPlmnOp_t;
+
+/**
+ * @enum TelNetworkPowerOnAttach_t
+ * This enumeration defines operation that can be done on power on attach.
+ * It is used on CDMA.
+ */
+typedef enum
+{
+       TAPI_NETWORK_SERVING_CARRIER_TEST = 0x00,                       /**< TestBed */
+       TAPI_NETWORK_SERVING_CARRIER_SKT,                                       /**< Korea SKT */
+       TAPI_NETWORK_SERVING_CARRIER_KTF,                                       /**< Korea KTF */
+       TAPI_NETWORK_SERVING_CARRIER_LGT,                                       /**< Korea LGT */
+       TAPI_NETWORK_SERVING_CARRIER_VERIZON = 0x11,            /**< US VERIZON */
+       TAPI_NETWORK_SERVING_CARRIER_SPRINT,                            /**< US SPRINT */
+       TAPI_NETWORK_SERVING_CARRIER_ALLTEL,                            /**< US ALLTEL */
+       TAPI_NETWORK_SERVING_CARRIER_METRO_PCS,                 /**< US METRO_PCS */
+       TAPI_NETWORK_SERVING_CARRIER_CELLULAR,                          /**< US CELLULAR */
+       TAPI_NETWORK_SERVING_CARRIER_CRIKET,                            /**< US CRIKET */
+       TAPI_NETWORK_SERVING_CARRIER_TELUS = 0x21,                      /**< CANADA TELUS */
+       TAPI_NETWORK_SERVING_CARRIER_BMC,                                       /**< CANADA BMC */
+       TAPI_NETWORK_SERVING_CARRIER_BWA,                                       /**< CANADA BWA */
+       TAPI_NETWORK_SERVING_CARRIER_CTC = 0x31,                        /**< CHINA CTC */
+       TAPI_NETWORK_SERVING_CARRIER_UNKNOWN = 0xFF             /**< SERVING NETWORK UNKNOWN */
+} TelNetworkServCarrierType_t;
+
+/**
+ * @enum TelNetworkPlmnType_t
+ * This structure defines Network Plmn type.
+ */
+typedef enum
+{
+       TAPI_UNKNOWN_PLMN=0,                            /**< Network Plmn type Unknown */
+       TAPI_HOME_PLMN ,                                        /**< Network Plmn type Home Plmn */
+       TAPI_AVAILABLE_PLMN,                            /**< Network Plmn Available */
+       TAPI_FORBIDDEN_PLMN,                            /**< Network Plmn Forbidden */
+}TelNetworkPlmnType_t;
+
+/**
+ * @enum TelNetworkHomeZoneCommand_t
+ * This enumeration defines network home zone command.
+ */
+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;
+
+/**
+ * @enum TelNetworkHomeZone_t
+ * This enumeration defines network home zone type.
+ */
+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;
+
+/**
+ * @enum TelNetworkNameDispCondition_t
+ * This enumeration defines network name display condition type.
+ */
+typedef enum
+{
+       TAPI_NETWORK_DISP_INVALID= 0x00,
+       TAPI_NETWORK_DISP_SPN = 0x01,
+       TAPI_NETWORK_DISP_PLMN = 0x02,
+       TAPI_NETWORK_DISP_SPN_PLMN = 0x03,
+}TelNetworkNameDispCondition_t;
+
+/**
+ * @enum TelNetworkPrefNetType_t
+ * This enumeration defines CDMA Preferred Network Type(CDMA only).
+ */
+typedef enum
+{
+    TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC = 0x01,               /**< 0x01 : AUTOMATIC */
+    TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC_A,                    /**<  0x02 : AUTOMATIC A */
+    TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC_B,                    /**<  0x03 : AUTOMATIC B */
+    TAPI_NETWORK_PREF_NET_TYPE_HOME_ONLY,                      /**<  0x04 : HOME ONLY */
+    TAPI_NETWORK_PREF_NET_TYPE_ROAM_ONLY,                      /**<  0x05 : ROAM ONLY */
+} TelNetworkPrefNetType_t;
+
+/**
+ * @enum TelNetworkPrlPrefOnly_t
+ * This enumeration defines CDMA PRL Preferred Only field stored in the PRL(CDMA only).
+ */
+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 Preferred Only Option */
+} TelNetworkPrlPrefOnly_t;
+
+/**
+ * @enum TelNetworkCDMAHybridMode_t
+ * This enumeration defines CDMA Hybrid Mode State(CDMA only).
+ */
+typedef enum
+{
+    TAPI_NETWORK_CDMA_HYBRID = 0x01,   /**< 0x01 : HYBRID(1X + EVDO) */
+    TAPI_NETWORK_CDMA_1X_ONLY,         /**< 0x02 : 1X ONLY */
+    TAPI_NETWORK_CDMA_EVDO_ONLY,               /**< 0x03 : EVDO ONLY */
+}TelNetworkCDMAHybridMode_t;
+
+
+/**
+ * This structure has information related to cdma system.
+ */
+typedef struct {
+       TelNetworkServCarrierType_t carrier; /**< for CDMA, Optional */
+       unsigned short system_id; /**< for CDMA, Mandatory */
+       unsigned short network_id; /**< for CDMA, Mandatory */
+       unsigned short base_station_id; /**< for CDMA, Mandatory */
+       unsigned short base_station_latitude; /**< for CDMA, Mandatory */
+       unsigned short base_station_longitude; /**< for CDMA, Mandatory */
+       unsigned short registration_zone; /**< for CDMA, Optional */
+       unsigned short pilot_offset; /**< for CDMA, Optional */
+} TelNetworkCDMASysInfo_t;
+
+/**
+ *
+ * This structure defines the preferred plmn information.
+ */
+typedef struct {
+       unsigned char Index; /**< Network Preferred Plmn list index */
+       char Plmn[7]; /**< 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;
+
+/**
+ *
+ * This structure defines the preferred plmn list.
+ */
+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;
+
+/**
+ *
+ * This structure defines the location area code and cell id.
+ */
+typedef struct {
+       unsigned short LocationAreaCode; /**< Network Location area code */
+       unsigned long CellId; /**< Network Cell Id */
+} TelNetworkLocationCellInfo_t;
+
+/**
+ *
+ * This structure defines the network status .
+ */
+typedef struct {
+       unsigned char svctype; /**< Network svc type  */
+       unsigned char roaming; /**< Network roaming  */
+} TelNetworkStatus_t;
+
+/**
+ *
+ * This structure defines the network Cs,Ps status.
+ */
+typedef struct {
+       unsigned char cstype; /**< Network Cs type  */
+       unsigned char pstype; /**< Network Ps type  */
+} TelNetworkCsPsStatus_t;
+
+/**
+ *   TelNetworkIdentity_t
+ * This structure defines the network identity.
+ */
+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 */
+       unsigned int plmn_id; /**< PLMN ID */
+       TelNetworkPlmnType_t type_of_plmn; /**< PLMN type */
+       TelNetworkSystemType_t access_technology; /**< Access technology  */
+} TelNetworkIdentity_t;
+
+/**
+ *
+ * This structure defines the network Plmn list.
+ */
+typedef struct {
+       char networks_count; /**< Network Plmn count  */
+       TelNetworkIdentity_t network_list[TAPI_NETWORK_LIST_MAX]; /**< Network list  */
+} TelNetworkPlmnList_t;
+
+/**
+ *
+ * This structure defines the network display info.
+ */
+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 true and the PLMN value is null then Network module has to display registered PLMN*/
+} TelNetworkSpnPlmnDisplayInfo_t;
+
+/**
+ *  * @struct TelNetworkSpnMccMncInfo_t
+ * This structure defines the network Spn, Mcc and Mnc info.
+ */
+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;
+
+
+typedef struct {
+       TelNetworkSystemType_t act; /**< Access technology  */
+       char plmn[7];
+       int lac;
+} TelNetworkServing_t;
+
+typedef struct {
+       int cell_id;    /* Cell ID (-1 indicates cell ID information not present)*/
+       int lac;                /* Location area code (this field is ignored when cell_id 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 not detectable
+                                    */
+} TelNetworkGeranNeighboringCellInfo_t;
+
+typedef struct {
+       int cell_id;    /* Cell ID (-1 indicates cell ID information not present)*/
+       int lac;                /* Location area code (this field is ignored when cell_id 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 not detectable
+                                */
+} TelNetworkUmtsNeighboringCellInfo_t;
+
+typedef struct {
+       int geran_list_count;
+       TelNetworkGeranNeighboringCellInfo_t geran_list[TAPI_NETWORK_GERAN_NEIGHBORING_CELL_LIST_MAX];
+       int umts_list_count;
+       TelNetworkUmtsNeighboringCellInfo_t umts_list[TAPI_NETWORK_UMTS_NEIGHBORING_CELL_LIST_MAX];
+} TelNetworkNeighboringCellInfo_t;
+
+
+/**
+ * NEW NEW NEW
+ */
+struct tel_noti_network_registration_status {
+       int cs;
+       int ps;
+       int type;
+       int is_roaming;
+};
+
+struct tel_noti_network_info {
+       int rssi;
+       int battery;
+};
+
+struct tel_noti_network_cell_info {
+       int lac;
+       int cell_id;
+};
+
+struct tel_noti_network_change {
+       TelNetworkSystemType_t act; /**< Access technology  */
+       char plmn[7];
+       int lac;
+};
+
+struct tel_noti_network_time_info {
+       int year;
+       int month;
+       int day;
+       int hour;
+       int minute;
+       int second;
+       int wday;
+       int gmtoff;
+       int dstoff;
+       int isdst;
+       char plmn[7];
+};
+
+struct  tel_noti_network_identity {
+       char plmn[7];
+       char short_name[17];
+       char full_name[33];
+};
+
+struct tel_noti_network_neighboring_cell_info {
+       TelNetworkNeighboringCellInfo_t info;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _TEL_NETWORK_H_
+
+/**
+* @}
+*/
diff --git a/include/TelPower.h b/include/TelPower.h
new file mode 100644 (file)
index 0000000..ffeb191
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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.
+ */
+
+/**
+ * @internal
+ * @ingroup            TelephonyAPI
+ * @addtogroup POWER_TAPI      POWER
+ * @{
+ *
+ * These APIs allow an application to accomplish the following services: @n
+ * - Get current phone power status,  @n
+ * - Reset the phone power (on / off), @n
+ * - Get the Display Icon Information. @n
+ */
+
+#ifndef _TEL_POWER_H_
+#define _TEL_POWER_H_
+
+#include <TelDefines.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * This defines the phone power reset commands.
+ */
+typedef enum {
+       TAPI_PHONE_POWER_OFF = 0, TAPI_PHONE_POWER_ON, TAPI_PHONE_POWER_RESET,
+} tapi_power_phone_cmd_t;
+
+/**
+ * This defines the phone power status values.
+ */
+typedef enum {
+       TAPI_PHONE_POWER_STATUS_ON = 0, TAPI_PHONE_POWER_STATUS_OFF, TAPI_PHONE_POWER_STATUS_ERROR,
+} tapi_power_phone_power_status_t;
+
+/**
+ * Use to Enter or Leave Flight Mode.
+ *
+ */
+typedef enum {
+       TAPI_POWER_FLIGHT_MODE_ENTER = 0x01, /**< ONLINE OFF */
+       TAPI_POWER_FLIGHT_MODE_LEAVE, /**< ONLINE ON */
+       TAPI_POWER_FLIGHT_MODE_MAX
+} 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
+} tapi_power_flight_mode_resp_type_t;
+
+/**
+ * This enum defines the phone battery status levels.
+ *
+ * 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
+ */
+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..203053f
--- /dev/null
@@ -0,0 +1,717 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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.
+ */
+
+/**
+* @open
+* @ingroup             TelephonyAPI
+* @addtogroup  SAT_TAPI        SAT
+* @{
+*
+* @file TelSat.h
+
+     @brief This file serves as a "C" header file defines structures for Telephony SAT Services. \n
+      It contains a sample set of constants, enums, structs that would be required by applications.
+
+
+ */
+
+#ifndef _TEL_SAT_H_
+#define _TEL_SAT_H_
+
+#include <TelDefines.h>
+#include <TelCall.h>
+#include <TelSs.h>
+#include <TelSatObj.h>
+#include <TelSatProactvCmd.h>
+#include <TelSatEnvelope.h>
+#include <TelSim.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#define TAPI_SAT_DEF_TITLE_LEN_MAX                     50 /**< max length for Menu Title */
+#define TAPI_SAT_DEF_ITEM_STR_LEN_MAX          50 /**< max length for Menu Item  */
+#define TAPI_SAT_DEF_TEXT_STRING_LEN_MAX       500 /**< max length for Text String  */
+#define TAPI_SAT_DEF_BIT_MASK_CONTACT          0x01 /**< Bit Mask for Contact */
+#define TAPI_SAT_DEF_BIT_MASK_MSG                      0x02 /**< Bit Mask for Msg */
+#define TAPI_SAT_DEF_BIT_MASK_OTHER                    0x04 /**< Bit Mask for Psh */
+#define TAPI_SAT_REFRESH_FILE_LIST                     20 /**< Refresh File List*/
+#define TAPI_SAT_DEF_SS_LEN_MAX             250
+#define TAPI_SAT_DEF_USSD_LEN_MAX           250
+
+//     Telephony UI USER CONFIRM TYPE
+/**
+ * @enum TelSatUiUserConfirmType_t
+ * This enumeration defines the UI User Confirm Type.
+ */
+typedef enum
+{
+       TAPI_SAT_USER_CONFIRM_YES,                                              /**<This Enum Informs That user confirms yes */
+       TAPI_SAT_USER_CONFIRM_NO_OR_CANCEL,                             /**<This enum informs that user confirms no/cancel */
+       TAPI_SAT_USER_CONFIRM_HELP_INFO,                                /**<This enum informs that user wants help information */
+       TAPI_SAT_USER_CONFIRM_END,                                              /**<This enum informs that user confirms end */
+       TAPI_SAT_USER_CONFIRM_TIMEOUT,                                  /**<This enum informs that user did not respond */
+}TelSatUiUserConfirmType_t;
+
+//     Telephony UI INKEY TYPE
+/**
+ * @enum TelSatUiInkeyYesNoCaseType_t
+ * This enumeration defines the UI Inkey Type Yes or No.
+ */
+typedef enum
+{
+       TAPI_SAT_INKEY_CONFIRM_NO                               = 0x00,                 /**<No*/
+       TAPI_SAT_INKEY_CONFIRM_YES                              = 0x01,                 /**<Yes*/
+}TelSatUiInkeyYesNoCaseType_t;
+
+//     Telephony UI DISPLAY STATUS
+/**
+ * @enum TelSatUiDisplayStatusType_t
+ * This enumeration defines the UI Display Status.
+ */
+typedef enum
+{
+       TAPI_SAT_DISPLAY_SUCCESS                                = 0x00,                                 /**<This enum informs  UI display success*/
+       TAPI_SAT_DISPLAY_FAIL                                   = 0x01,                                 /**<This enum informs  UI display failure*/
+}TelSatUiDisplayStatusType_t;
+
+//     TELEPHONY REFRESH APPLICATION TYPE
+/**
+ * @enum TelSatRefreshAppType_t
+ * This enumeration defines the Refresh Application Type.
+ */
+ 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
+/**
+ * @enum TelSatCommandPerformResultType_t
+ * This enumeration defines the Result of Proactive Command execution.
+ */
+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
+/**
+ * @enum TelSatCallCtrlType_t
+ * This enumeration defines Call Control Type.
+ */
+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
+/**
+ * This structure defines the user confirmation data.
+ */
+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
+/**
+ * This structure defines the character data for sat engine data structure.
+ */
+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
+/**
+ * This structure defines the main menu title to check sat menu.
+ */
+typedef struct
+{
+       int                             bIsMainMenuPresent;             /**<flag to check sat main menu existence*/
+       TelSatTextInfo_t        mainMenuTitle;                  /**<main menu title data*/
+}TelSatMainMenuTitleInfo_t;
+
+//     Telephony DISPLAY TEXT DATA
+/**
+ * This structure defines the display text proactive command for sat ui.
+ */
+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 display */
+       int                                                     bIsPriorityHigh;                        /**<indicates whether the text is to be displayed if some other app is using the screen.*/
+       int                                                     bIsUserRespRequired;            /**<indicates whether user response required or Not*/
+       int                                                     b_immediately_resp;
+       TelSatIconIdentifierInfo_t      iconId;                                         /**< Icon Identifier */
+}TelSatDisplayTextInd_t;
+
+//     Telephony INKEY DATA
+/**
+ * This structure defines the get inkey proactive command data for sat ui.
+ */
+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 screen*/
+       unsigned int                                    duration;                               /**<the duration of display*/
+       TelSatIconIdentifierInfo_t              iconId;                                 /**<Icon Identifier*/
+}TelSatGetInkeyInd_t;
+
+//     Telephony GET INPUT DATA
+/**
+ * This structure defines the get input proactive command data for sat ui.
+ */
+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;   /**<flag for help info request */
+       int                                                     bIsEchoInput;                   /**<indicates whether to show input data on screen or not*/
+       TelSatTextInfo_t                                text;                                   /**<character data to display on 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
+/**
+ * This structure defines the play tone proactive command data for application.
+ */
+typedef struct
+{
+       int                                             commandId;      /**<Proactive Command Number sent by USIM*/
+       TelSatTextInfo_t                        text;           /**<character data to display on screen*/
+       TelSatToneInfo_t                        tone;           /**<tone info   */
+       unsigned int                            duration;       /**<the duration for playing tone*/
+       TelSatIconIdentifierInfo_t      iconId;         /**<Icon Identifier*/
+}TelSatPlayToneInd_t;
+
+//     Telephony UI info
+/**
+ * This structure defines the data for sat ui.
+ */
+typedef struct
+{
+       int                                             commandId;              /**<Proactive Command Number sent by USIM*/
+       int                                             user_confirm;
+       TelSatTextInfo_t                        text;                   /**<character data to display on screen*/
+       TelSatIconIdentifierInfo_t      iconId;                 /**<Icon Identifier*/
+}TelSatSendUiInfo_t;
+
+//     Telephony MENU ITEM DATA FOR SETUP MENU
+/**
+ * This structure defines the menu item info for setup menu.
+ */
+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 user selected*/
+}TelSatMenuInfo_t;
+
+//     Telephony SETUP MENU INFO
+/**
+ * This structure defines the sat main menu info.
+ */
+typedef struct
+{
+       int commandId;  /**<Proactive Command Number sent by USIM*/
+       int     bIsMainMenuPresent;
+       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 help information request */
+       int     bIsUpdatedSatMainMenu;
+       TelSatIconIdentifierInfo_t iconId;      /**<Icon Identifier*/
+       TelSatIconIdentifierListInfo_t iconIdList;      /**<List of Icon Identifiers*/
+}TelSatSetupMenuInfo_t;
+
+//     Telephony SELECT ITEM DATA
+/**
+ * This structure defines the select item proactive command data for sat ui.
+ */
+typedef struct
+{
+       int                                                     commandId;                                                                      /**<Proactive Command Number sent by USIM*/
+       int                                                     bIsHelpInfoAvailable;                                           /**<flag for help information request*/
+       TelSatTextInfo_t                                text;                                                                           /**<menu title text*/
+       char                                                    defaultItemIndex;                                                       /**<selected default item - default value is 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
+/**
+ * This structure defines the setup idle mode text proactive command for idle application.
+ */
+typedef struct
+{
+       int                                             commandId;                      /**<Proactive Command Number sent by USIM*/
+       TelSatTextInfo_t                        text;                           /**<character data to display on screen*/
+       TelSatIconIdentifierInfo_t      iconId;
+} TelSatSetupIdleModeTextInd_t;
+
+//     Telephony REFRESH DATA
+/**
+ * This structure defines the refresh proactive command data for sat ui.
+ */
+typedef struct
+{
+       int                                                     commandId;                      /**<Proactive Command Number sent by USIM*/
+       unsigned int                            duration;                       /**<the duration of display*/
+       TelSatCmdQualiRefresh_t         refreshType;            /**<refresh mode*/
+}TelSatRefreshIndUiInfo_t;
+
+//     Telephony REFRESH DATA
+/**
+ * This structure defines the refresh proactive command data for applications which are concerned with files resident on USIM .
+ */
+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
+/**
+ * This structure defines the data objects to indicate to sat ui, the end of execution of a specific proactive command by other application.
+ */
+typedef struct
+{
+       int                                                                     commandId;                      /**<Proactive Command Number sent by USIM*/
+       char                                                                    commandType;            /**< Command Type*/
+       TelSatCommandPerformResultType_t                result;                         /**<result of command execution by application*/
+}TelSatProactiveCmdEndIndInfo_t;
+
+//     Telephony SEND SMS DATA
+/**
+ * This structure defines the send sms proactive command data for sms application.
+ */
+typedef struct
+{
+       int                                     commandId;                              /**<Proactive Command Number sent by USIM*/
+       int                                     bIsPackingRequired;             /**<flag to check if packing required for sms tpdu*/
+       TelSatAddressInfo_t     address;                                /**<destination address*/
+       TelSatSmsTpduInfo_t     smsTpdu;                                /**<SMS TPDU data*/
+} TelSatSendSmsIndSmsData_t;
+
+//     Telephony SEND SS DATA
+/**
+ * This structure defines the send ss proactive command data for ss application.
+ */
+typedef struct
+{
+       int                                     commandId;              /**<Proactive Command Number sent by USIM*/
+       unsigned short          ssStringLen;
+       unsigned char           ssString[TAPI_SAT_DEF_SS_LEN_MAX+1];
+}TelSatSendSsIndSsData_t;
+
+//     Telephony USSD DATA
+/**
+ * This structure defines the send ussd proactive command data for ussd application.
+ */
+typedef struct
+{
+       int                     commandId;              /**<Proactive Command Number sent by USIM*/
+       unsigned char           rawDcs;                 /**<data coding scheme*/
+       unsigned short          ussdStringLen;
+       unsigned char           ussdString[TAPI_SAT_DEF_USSD_LEN_MAX+1];
+}TelSatSendUssdIndUssdData_t;
+
+//     Telephony SEND DTMF DATA
+/**
+ * This structure defines the send dtmf proactive command data for dtmf application.
+ */
+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
+/**
+ * This structure defines the setup call proactive command data for call application.
+ */
+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 call application*/
+}TelSatSetupCallIndCallData_t;
+
+//     Telephony LAUNCH BROWSER DATA
+/**
+ * This structure defines the launch browser proactive command data for browser application.
+ */
+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, etc*/
+}TelSatLaunchBrowserIndBrowserData_t;
+
+//     Telephony PROVIDE LOCAL INFO DATA
+/**
+ * This structure defines the provide local info proactive command data for application.
+ */
+typedef struct
+{
+       int commandId;                                                                          /**<Proactive Command Number sent by USIM*/
+       TelSatCmdQualiProvideLocalInfo_t localInfoType;         /**<Provide Local Information Type*/
+}TelSatProvideLocalInfoInd_t;
+
+//     Telephony LANGUAGE NOTIFICATION DATA
+/**
+ * This structure defines the language notification proactive command data for application.
+ */
+typedef struct
+{
+       int                                                     commandId;                                              /**<Proactive Command Number sent by USIM*/
+       int                                                     bSpecificLanguageNotification;  /**<flag for checking specific language notification. if FALSE, non-specific language notification      */
+       TelSatLanguageInfo_t                    language;                                       /**<language info from USIM application */
+}TelSatLanguageNotiInfoInd_t;
+
+//     Telephony PLAY TONE RETURN INFO
+/**
+ * This structure defines the return result data for Play Tone proactive command.
+ */
+typedef struct
+{
+       TelSatResultType_t      resp;                   /**<result response value*/
+}TelSatSetupMenuRetInfo_t;
+
+//     Telephony REFRESH RETURN INFO
+/**
+ * This structure defines the return result data for refresh proactive command.
+ */
+typedef struct
+{
+       TelSatRefreshAppType_t  appType;                        /**<application type*/
+       TelSatResultType_t              resp;                           /**<result response value*/
+}TelSatRefreshRetInfo_t;
+
+//     Telephony CALL RETURN INFO
+/**
+ * This structure defines the return result data for setup call proactive command.
+ */
+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
+/**
+ * This structure defines the return result data for send ss proactive command.
+ */
+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
+/**
+ * This structure defines the return result data for send ussd proactive command.
+ */
+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
+/**
+ * This structure defines the return result data for send sms proactive command.
+ */
+typedef struct
+{
+       TelSatResultType_t      resp;                   /**<result response value*/
+}TelSatSmsRetInfo_t;
+
+//     Telephony DTMF RETUEN INFO
+/**
+ * This structure defines the return result data for send dtmf proactive command.
+ */
+typedef struct
+{
+       TelSatResultType_t      resp;                   /**<result response value*/
+}TelSatDtmfRetInfo_t;
+
+//     Telephony BROWSER RETURN INFO
+/**
+ * This structure defines the return result data for launch browser proactive command.
+ */
+typedef struct
+{
+       TelSatResultType_t                                      resp;                   /**<result response value*/
+       TelSatLaunchBrowserProblemType_t    browserProblem;     /**<specific browser problem*/
+}TelSatBrowserRetInfo_t;
+
+//     Telephony SETUP IDLE MODE TEXT RETURN INFO
+/**
+ * This structure defines the return result data for setup idle mode text proactive command.
+ */
+typedef struct
+{
+       TelSatResultType_t      resp;                   /**<result response value*/
+}TelSatIdleTextRetInfo_t;
+
+//     Telephony PLAY TONE RETURN INFO
+/**
+ * This structure defines the return result data for Play Tone proactive command.
+ */
+typedef struct
+{
+       TelSatResultType_t      resp;                   /**<result response value*/
+}TelSatPlayToneRetInfo_t;
+
+//     Telephony  PROVIDE LOCAL INFO RETURN INFO
+/**
+ * This structure defines the return result data for setup idle mode text proactive command.
+ */
+typedef struct
+{
+       TelSatResultType_t                                      resp;                   /**<result response value*/
+       int                                                             bOtherInfo;             /**<flag to check whether other information are required or not */
+       TelSatCmdQualiProvideLocalInfo_t        infoType;               /**<local info type - e.g. time zone or language info, etc      */
+       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
+/**
+ * This structure defines the return result data for setup idle mode text proactive command.
+ */
+typedef struct
+       {
+               TelSatResultType_t               resp;                          /**<result response value*/
+       }TelSatLanguageNotiRetInfo_t;
+
+//     Telephony DISPLAY TEXT RETURN INFO
+/**
+ * This structure defines the return result data for setup idle mode text proactive command.
+ */
+typedef struct
+       {
+               TelSatResultType_t               resp;                          /**<result response value*/
+               TelSatMeProblemType_t    meProblem;                     /**<Me Problem Type */
+       }TelSatDiplayTextRetInfo_t;
+
+//     Telephony APPLICATIONS RETURN DATA
+/**
+ * This structure defines the common return result data for applications proactive command.
+ */
+typedef struct
+{
+       TelSatCommandType_t     commandType;                                            /**<Proactive Command type*/
+       int commandId;                                                                                  /**<Proactive Command Number sent by USIM*/
+       union
+               {
+                       TelSatSetupMenuRetInfo_t        setupMenu;                      /**<result response value for setup menu*/
+                       TelSatRefreshRetInfo_t          refresh;                                /**<result response value for refresh*/
+                       TelSatCallRetInfo_t                     setupCall;                              /**<result response value for setup call*/
+                       TelSatSsRetInfo_t                       sendSs;                                 /**<result response value for send ss*/
+                       TelSatUssdRetInfo_t                     sendUssd;                               /**<result response value for send ussd*/
+                       TelSatSmsRetInfo_t                      sendSms;                                /**<result response value for send sms*/
+                       TelSatDtmfRetInfo_t                     sendDtmf;                               /**<result response value for send dtmf*/
+                       TelSatBrowserRetInfo_t          launchBrowser;                  /**<result response value for launch browser*/
+                       TelSatIdleTextRetInfo_t         setupIdleModeText;              /**<result response value for setup idle mode text*/
+                       TelSatLanguageNotiRetInfo_t     languageNoti;                   /**<result response value for language notification*/
+                       TelSatProvideLocalRetInfo_t provideLocalInfo;           /**<result response value for provide local info*/
+                       TelSatDiplayTextRetInfo_t   displayText;                        /**<result response value for dsiplay text*/
+                       TelSatPlayToneRetInfo_t     playTone;                           /**<result response value for play tone*/
+               }appsRet;                                                                                               /**< common union result value */
+}TelSatAppsRetInfo_t;
+
+//     Telephony CALL CONTROL CONFIRM  DATA FOR CALL
+/**
+ * This structure defines the call control confirm data for call.
+ */
+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
+/**
+ * This structure defines the call control confirm data for ss.
+ */
+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
+/**
+ * This structure defines the call control confirm data for ussd.
+ */
+typedef struct
+{
+       TelSatTextInfo_t                ussdString;                     /**< ussd destination address*/
+} TelSatCallCtrlIndUssdData_t;
+
+//     Telephony READ FILE REQUEST DATA
+/**
+ * This structure defines the common call control confirm data.
+ */
+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
+/**
+ * This structure defines the mo sms control confirm data.
+ */
+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
+/**
+ * This structure defines the Event List Info.
+ */
+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;
+
+/**
+ * This is the structure to be used by the Application to send envelope/event download data.
+ * This contains the data structures to be used to send any envelope/event download data.
+ */
+typedef struct
+{
+       TelSatEventDownloadType_t                                       eventDownloadType;                              /**<    eventDownload Type      */
+
+       union
+       {
+               int                                                                     bIdleScreenAvailable;                   /**<flag to specify whether Idle Screen is Available or not*/
+               TelSatLanguageSelectionEventReqInfo_t   languageSelectionEventReqInfo;  /**<Selected Language Information*/
+               TelSatBrowserTerminationEventReqInfo_t  browserTerminationEventReqInfo; /**<BrowserTermination 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..0232bff
--- /dev/null
@@ -0,0 +1,225 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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.
+ */
+
+/**
+* @open
+* @ingroup             TelephonyAPI
+* @addtogroup  SAT_TAPI        SAT
+* @{
+*
+* @file TelSatEnvelope.h
+
+     @brief This file serves as a "C" header file defines structures for Tapi Sat envelope command Services. \n
+      It contains a sample set of constants, enums, structs that would be required by applications.
+ */
+
+#ifndef _TEL_SAT_ENVELOPE_H_
+#define _TEL_SAT_ENVELOPE_H_
+
+#include <TelSatObj.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @enum TelSatCallType_t
+ * This enum indicates the SAT call type
+ */
+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;
+
+/**
+ * @enum TelSatCallCtrlResultType_t
+ * This enum indicates the result of call control by SIM.
+ */
+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;
+
+/**
+ * @enum TelSatEnvelopeResp_t
+ * This enum indicates the general result of sending an envelope command to USIM.
+ */
+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
+/**
+ * This structure contains the data objects for MENU SELECTION envelope.
+ */
+typedef struct
+{
+       unsigned char           itemIdentifier;         /**<    menu selection item identifier  */
+       int                             bIsHelpRequested;       /**<    flag to check whether help information required or not  */
+} TelSatMenuSelectionReqInfo_t;
+
+//     9.1 CALL CONTROL BY SIM
+/**
+ * This struct contains the data objects for Call Control result data sent by USIM.
+ */
+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 parameter1     */
+       TelSatCapaConfigParamInfo_t             ccp2;                           /**<    capability configuration parameter2     */
+}TelSatVoiceCallCtrlIndInfo_t;
+
+/**
+ * This struct contains SAT ss control result data sent by USIM.
+ */
+typedef struct
+{
+       TelSatSsStringInfo_t                    ssString;                       /**<    ss number       */
+       TelSatSubAddressInfo_t                  subAddress;                     /**<    ss sub address */
+       TelSatBcRepeatIndicatorType_t   bcRepeatIndicator;      /**<    bc repeat indicator     */
+       TelSatCapaConfigParamInfo_t             ccp1;                           /**<    capability configuration parameter1     */
+       TelSatCapaConfigParamInfo_t             ccp2;                           /**<    capability configuration parameter2     */
+}TelSatSsCtrlIndInfo_t;
+
+/**
+ * This struct contains SAT mo SMS control configuration data
+ */
+typedef struct
+{
+       TelSatAddressInfo_t             rpDestAddress;  /**<    sms control rp destination address      */
+       TelSatAddressInfo_t             tpDestAddress;  /**<    sms control tp destination address      */
+} TelSatMoSmsCtrlIndInfo_t;
+
+/**
+ * This struct contains SAT call control configuration data
+ */
+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
+/**
+ * This struct contains SAT mo ss control request data
+ */
+ 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
+/**
+ * This struct contains SAT user activity event request data
+ */
+typedef struct
+{
+       TelSatEventListInfo_t                           eventList;                      /**<    event List      */
+       TelSatDeviceIdentitiesInfo_t            deviceIdentities;       /**<    device identities info  */
+
+} TelSatUserActivityEventReqInfo_t;
+
+//     11.6 EVENT DOWNLOAD - IDLE SCREEN AVAILABLE EVENT
+/**
+ * This structure contains the data objects for IDLE SCREEN AVAILABLE event download.
+ */
+typedef struct
+{
+       TelSatEventDownloadType_t       eventData;      /**<    event type      */
+} TelSatIdleScreenAvailableEventReqInfo_t;
+
+//     11.8 EVENT DOWNLOAD - LANGUAGE SELECTION EVENT
+/**
+ * This structure contains the data objects for LANGUAGE SELECTION event download.
+ */
+typedef struct
+{
+       TelSatLanguageType_t     language;              /**<    selected language info  */
+} TelSatLanguageSelectionEventReqInfo_t;
+
+//     11.9 EVENT DOWNLOAD - BROWSER TERMINATION EVENT
+/**
+ * This structure contains the data objects for BROWSER TERMINATION event download.
+ */
+typedef struct
+{
+       TelSatBrowserTerminationCauseType_t             browserTerminationCause;        /**<    browser Termination Cause       */
+} TelSatBrowserTerminationEventReqInfo_t;
+
+//     11.10 EVENT DOWNLOAD - DATA AVAILABLE EVENT
+/**
+ * This struct contains SAT data available event request data
+ */
+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
+/**
+ * This struct contains SAT channel status even request data
+ */
+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..7c75233
--- /dev/null
@@ -0,0 +1,1399 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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.
+ */
+
+/**
+ * @open
+ * @ingroup            TelephonyAPI
+ * @addtogroup         SAT_TAPI        SAT
+ * @{
+ *
+ * @file TelSatObj.h
+
+ @brief This file serves as a "C" header file defines structures for Telephony SAT Services. \n
+ It contains a sample set of constants, enums, structs that would be required by applications.
+ */
+
+#ifndef _TEL_SAT_OBJ_H_
+#define _TEL_SAT_OBJ_H_
+
+#include <TelDefines.h>
+#include <TelSim.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#define EXTENDED_ASCII 1
+
+#define TAPI_SAT_DIALLING_NUMBER_LEN_MAX                               200      /**<   max length of dialing number            */
+#define TAPI_SAT_ALPHA_ID_LEN_MAX                                              255      /**<   max length of  alpha identifier         */
+#define TAPI_SAT_TEXT_STRING_LEN_MAX                                   500      /**<   max length of text string -when the string data is in 7Bit packed format, this length is not enough to support the maximum size so should increase the value to a value > 275 */
+#define TAPI_SAT_SUB_ADDR_LEN_MAX                                              30       /**<   max length of sub address               */
+#define TAPI_SAT_CCP_DATA_LEN_MAX                                              30       /**<   max length of ccp data          */
+#define TAPI_SAT_ITEM_TEXT_LEN_MAX                                             45       /**<   max length of item text                 */
+#define TAPI_SAT_SMS_TPDU_SMS_DATA_LEN_MAX                             175      /**<   max length of sms tpdu data             */
+#define TAPI_SAT_SS_STRING_LEN_MAX                                             160      /**<   max length of ss string         */
+#define TAPI_SAT_USSD_STRING_LEN_MAX                                   255      /**<   max length of ussd string               */
+#define TAPI_SAT_FILE_ID_LIST_MAX_COUNT                                        255      /**<   max count of file id list               */
+#define TAPI_SAT_ITEMS_NEXT_ACTION_INDI_LIST_MAX_COUNT 50       /**<   max count of items next action indication list  */
+#define TAPI_SAT_EVENT_LIST_MAX_COUNT                                  17       /**<   max count of sat event list             */
+#define TAPI_SAT_IMG_INSTANT_RAW_DATA_LEN_MAX                  256      /**<   max length of image instant raw         */
+#define TAPI_SAT_CLUT_DATA_LEN_MAX                                             256      /**<   max length of clut data                 */
+#define TAPI_SAT_IMG_DATA_FILE_PATH_LEN_MAX                            50       /**<   max length of image data file name (Icon, CLUT)         */
+#define TAPI_SAT_ICON_LIST_MAX_COUNT                                   50       /**<   max count of icon list          */
+#define TAPI_SAT_DTMF_STRING_LEN_MAX                                   30       /**<   max length of dtmf string               */
+#define TAPI_SAT_DATE_TIME_AND_TIME_ZONE_LEN                   7        /**<   max length of date time and time zone           */
+#define TAPI_SAT_URL_LEN_MAX                                                   129      /**<   max length of url               */
+#define TAPI_SAT_BEARER_LIST_MAX_COUNT                                 50       /**<   max count of bearer list                */
+#define TAPI_SAT_PROVISIONING_FILE_PATH_LEN_MAX                        50       /**<   max length of provisioning file path    */
+#define TAPI_SAT_BEARER_PARAMS_LEN_MAX                                 10       /**<   max length of bearer parameters                 */
+#define TAPI_SAT_CHANNEL_DATA_STRING_LEN_MAX                   255      /**<   max length of channel data string               */
+#define TAPI_SAT_CHANNEL_STATUS_LEN                                            2        /**<   max length of channel status            */
+#define TAPI_SAT_CHANNEL_ID_LEN                                                        3        /**<   max length of channel id                */
+#define TAPI_SAT_OTHER_ADDR_LEN_MAX                                            30       /**<   max length of other address             */
+#define TAPI_SAT_PORT_NUMBER_LEN                                               2        /**<   max length of port number               */
+#define TAPI_SAT_NET_ACC_NAM_LEN_MAX                                   30       /**<   max length of net acc name              */
+#define TAPI_SAT_AID_LEN_MAX                                                   128      /**<   max length of aid               */
+#define TAPI_SAT_REMOTE_ENTITY_ADDR_LEN_MAX                            50       /**<   max length of remote entity address     */
+#define TAPI_SAT_ITEM_TEXT_ATTRIBUTES_LIST_MAX_COUNT   50       /**<   max count of item text attributes list          */
+#define TAPI_SAT_MCC_CODE_LEN                                                  3        /**<   max length of mcc               */
+#define TAPI_SAT_MNC_CODE_LEN                                                  3        /**<   max length of mnc               */
+#define TAPI_SAT_LAC_CODE_LEN                                                  2        /**<   max length of lac               */
+#define TAPI_SAT_CELL_ID_LEN                                                   2        /**<   max length of cell id   */
+
+/**
+ * @enum TelSatAlphabetFormatType_t
+ * This enum lists the Alphabet Format.
+ */
+typedef enum {
+       TAPI_SAT_ALPHABET_FORMAT_SMS_DEFAULT = 0x00, /**<       ALPHABET FROMAT SMS DEFAULT             */
+       TAPI_SAT_ALPHABET_FORMAT_8BIT_DATA = 0x01, /**< ALPHABET FROMAT 8BIT DATA               */
+       TAPI_SAT_ALPHABET_FORMAT_UCS2 = 0x02, /**<      ALPHABET FROMAT UCS2            */
+       TAPI_SAT_ALPHABET_FORMAT_RESERVED = 0x03 /**<   ALPHABET FROMAT RESERVED                */
+} TelSatAlphabetFormatType_t;
+
+/**
+ * @enum TelSatMsgClassType_t
+ * This enum lists the message class.
+ */
+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;
+
+/**
+ * @enum TelSatCommandType_t
+ * This enum lists the type of command and the next action indicator.
+ */
+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;
+
+/**
+ * @enum TelSatCmdQualiRefresh_t
+ * This enum lists the Command qualifier values for Refresh command.
+ */
+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;
+
+/**
+ * @enum TelSatCmdQualiSetupCall_t
+ * This enum lists the Command qualifier values for setup call command.
+ */
+typedef enum {
+       TAPI_SAT_SETUP_CALL_IF_ANOTHER_CALL_NOT_BUSY = 0x00, /**<       command qualifier for SETUP CALL IF ANOTHER CALL NOT BUSY               */
+       TAPI_SAT_SETUP_CALL_IF_ANOTHER_CALL_NOT_BUSY_WITH_REDIAL = 0x01, /**<   command qualifier for SETUP CALL IF ANOTHER CALL 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;
+
+/**
+ * @enum TelSatDisplayTextPriorityType_t
+ * This is associated with the command qualifier for display text.
+ */
+typedef enum {
+       TAPI_SAT_MSG_PRIORITY_NORMAL = 0, /**<  MSG PRIORITY NORMAL             */
+       TAPI_SAT_MSG_PRIORITY_HIGH = 1 /**<     MSG PRIORITY HIGH               */
+} TelSatDisplayTextPriorityType_t;
+
+/**
+ * @enum TelSatDisplayTextMsgClearType_t
+ * This is associated with the command qualifier for display text.
+ */
+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;
+
+/**
+ * @enum TelSatInkeyType_t
+ * This is associated with the command qualifier for get inkey.
+ */
+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;
+
+/**
+ * @enum TelSatUseInputAlphabetType_t
+ * This is associated with the command qualifier for get input.
+ */
+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;
+
+/**
+ * @enum TelSatDisplayVibrateAlertType_t
+ * This is associated with the command qualifier for play tone command.
+ */
+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;
+
+/**
+ * @enum TelSatPresentationType_t
+ * This is associated with the command qualifier for select item command.
+ */
+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;
+
+/**
+ * @enum TelSatSelectionPreferenceType_t
+ * This is associated with the command qualifier for select item command.
+ */
+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;
+
+/**
+ * @enum TelSatCmdQualiProvideLocalInfo_t
+ * This enum defines the Command qualifier values for provide local info command.
+ */
+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;
+
+/**
+ * @enum TelSatCmdQualiLaunchBrowser_t
+ * This enum defines the Command qualifier values for launch browser command.
+ */
+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;
+
+/**
+ * @enum TelSatDeviceIdentitiesTagType_t
+ * This enum lists the device identity tag value IDs.
+ */
+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;
+
+/**
+ * @enum TelSatTimeUnitType_t
+ * This enum lists the time units for the duration data object.
+ */
+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;
+
+/**
+ * @enum TelSatResultType_t
+ * This enum lists the values for the RESULT data object - General Response.
+ */
+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 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 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 command          */
+       TAPI_SAT_R_NETWORK_UNABLE_TO_PROCESS_COMMAND = 0x21, /**<       Network currently unable to process command             */
+       TAPI_SAT_R_USER_DID_NOT_ACCEPT_CALL_SETUP_REQ = 0x22, /**<      User did not accept call setup request          */
+       TAPI_SAT_R_USER_CLEAR_DOWN_CALL_BEFORE_CONN = 0x23, /**<        User cleared down call before connection or network released            */
+
+       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;
+
+/**
+ * @enum TelSatMeProblemType_t
+ * This enum lists the values for the Additional response for the RESULT object and specifies a particular ME PROBLEM.
+ */
+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;
+
+/**
+ * @enum TelSatNetworkProblemType_t
+ * This enum lists the values for the Additional response for the RESULT object and specifies a particular network PROBLEM.
+ */
+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;
+
+/**
+ * @enum TelSatSsProblemType_t
+ * This enum lists the values for the Additional response for the RESULT object related to SEND SS.
+ */
+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;
+
+/**
+ * @enum TelSatSmsProblemType_t
+ * This enum lists the values for the Additional response for the RESULT object related to SEND SMS.
+ */
+typedef enum {
+       TAPI_SAT_SMS_PROBLEM_NO_SPECIFIC_CAUSE = 0 /**< SMS problem with no specific cause              */
+} TelSatSmsProblemType_t;
+
+/**
+ * @enum TelSatUssdProblemType_t
+ * This enum lists the values for the Additional response for the RESULT object related to SEND USSD STRING.
+ */
+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;
+
+/**
+ * @enum TelSatCallCtrlProblemType_t
+ * This enum lists the values for the Additional response for the RESULT object related to CALL CONTROL or MO SMS CONTROL.
+ */
+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 with request type has changed      */
+} TelSatCallCtrlProblemType_t;
+
+/**
+ * @enum TelSatLaunchBrowserProblemType_t
+ * This enum lists the values for the Additional response for the RESULT object related to LAUNCH BROWSER PROBLEM
+ */
+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;
+
+/**
+ * @enum TelSatBipProblemType_t
+ * This enum lists the values for the Additional response for the RESULT object.
+ *  Permanent Problems  ::: 12.12.11 ADDITIONAL INFORMATION :  BEARER INDEPENDENT PROTOCOL
+ */
+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;
+
+/**
+ * @enum TelSatSmsTpduType_t
+ * This enum lists the values for the SMS TPDU type.
+ */
+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;
+
+/**
+ * @enum TelSatToneType_t
+ * This enum lists the values tones type.
+ */
+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;
+
+/**
+ * @enum TelSatEventDownloadType_t
+ * This enum lists event types required by ME to monitor and report to SIM.
+ */
+typedef enum {
+       TAPI_EVENT_SAT_DW_TYPE_MT_CALL = 0,
+       TAPI_EVENT_SAT_DW_TYPE_CALL_CONNECTED = 1,
+       TAPI_EVENT_SAT_DW_TYPE_CALL_DISCONNECTED = 2,
+       TAPI_EVENT_SAT_DW_TYPE_LOCATION_STATUS = 3,
+       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,
+       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,
+       TAPI_EVENT_SAT_DW_TYPE_DISPLAY_PARAMETERS_CHANGED = 0x0C,
+       TAPI_EVENT_SAT_DW_TYPE_LOCAL_CONNECTION = 0x0D,
+       TAPI_EVENT_SAT_DW_TYPE_NW_SEARCH_MODE_CHANGED = 0X0E,
+       TAPI_EVENT_SAT_DW_TYPE_BROWSING_STATUS = 0X0F,
+       TAPI_EVENT_SAT_DW_TYPE_FRAMES_INFORMATION_CHANGED = 0X10,
+       TAPI_EVENT_SAT_DW_TYPE_RESERVED_FOR_3GPP = 0X11,
+       TAPI_EVENT_SAT_DW_TYPE_UNKNOWN = 0xFF /**<      data download type - unknown            */
+} TelSatEventDownloadType_t;
+
+/**
+ * @enum TelSatImageCodingSchemeType_t
+ * This enum lists image coding scheme types required by ME to show.
+ */
+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;
+
+/**
+ * @enum TelSatIconQualifierType_t
+ * This enum defines the icon qualifier.
+ */
+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;
+
+/**
+ * @enum TelSatBcRepeatIndicatorType_t
+ * This enum defines the SIM ATK BC repeat indicator type.
+ */
+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;
+
+/**
+ * @enum TelSatCallCtrlStringType_t
+ * This enum defines call control string type.
+ */
+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;
+
+/**
+ * @enum TelSatLanguageType_t
+ * This enum lists the language values.
+ */
+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;
+
+/**
+ * @enum TelSatBrowserIdentityType_t
+ * This enum lists the SAT browser identity type.
+ */
+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;
+
+/**
+ * @enum TelSatBearerType_t
+ * This enum lists the SAT bearer type.
+ */
+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;
+
+/**
+ * @enum TelSatBrowserTerminationCauseType_t
+ * This enum lists the SAT browser termination cause type.
+ */
+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;
+
+/**
+ * @enum TelSatBearerDescType_t
+ * This enum lists the SAT bearer destination type.
+ */
+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;
+
+/**
+ * @enum TelSatBearerParamCsdDataRateType_t
+ * This enum lists the SAT bearer parameter csd data rate. refer TS 27.007
+ */
+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;
+
+/**
+ * @enum TelSatBearerParamCsdBearerServiceType_t
+ * This enum lists the SAT bearer parameter csd bearer service
+ */
+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;
+
+/**
+ * @enum TelSatBearerParamCsdConnectionElementType_t
+ * This enum lists the SAT bearer parameter csd connection element
+ */
+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;
+
+/**
+ * @enum TelSatBearerParamGprsPrecedenceClassType_t
+ * This enum lists the SAT bearer parameter GPRS precedence class. refer  TS 23.107
+ */
+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;
+
+/**
+ * @enum TelSatBearerParamGprsDelayClassType_t
+ * This enum lists the SAT bearer parameter GPRS delay class.
+ */
+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;
+
+/**
+ * @enum TelSatBearerParamGprsReliabilityClassType_t
+ * This enum lists the SAT bearer parameter GPRS Reliability class.
+ */
+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;
+
+/**
+ * @enum TelSatBearerParamGprsPeakThroughputClassType_t
+ * This enum lists the SAT bearer parameter GPRS peak throughput class.
+ */
+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;
+
+/**
+ * @enum TelSatBearerParamGprsMeanThroughputClassType_t
+ * This enum lists the SAT bearer parameter GPRS mean throughput class.
+ */
+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;
+
+/**
+ * @enum TelSatBearerParamGprsPdpType_t
+ * This enum lists the SAT bearer parameter GPRS pdp type.
+ */
+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;
+
+/**
+ * @enum TelSatBearerParamLocalLinksServiceIdentityType_t
+ * This enum lists the SAT bearer parameters local links service identity.
+ */
+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;
+
+/**
+ * @enum TelSatChannelStatusType_t
+ * This enum lists the SAT channel status type.
+ */
+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;
+
+/**
+ * @enum TelSatChannelStatusInfoType_t
+ * This enum lists the SAT channel status info type.
+ */
+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;
+
+/**
+ * @enum TelSatAddressType_t
+ * This enum lists the SAT address type.
+ */
+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;
+
+/**
+ * @enum TelSatTransportProtocolType_t
+ * This enum lists the SAT transport protocol type.
+ */
+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;
+
+/**
+ * @enum TelSatRemoteEntityAddrCodingType_t
+ * This enum lists the SAT remote entity address coding type.
+ */
+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;
+
+/**
+ * This structure defines the Address data object.
+ */
+typedef struct {
+       TelSimTypeOfNum_t ton; /**<     type of number          */
+       TelSimNumberingPlanIdentity_t npi; /**< number plan identity            */
+       unsigned char diallingNumberLen; /**<   dialing number length           */
+       char diallingNumber[TAPI_SAT_DIALLING_NUMBER_LEN_MAX]; /**<     dialing number  */
+} TelSatAddressInfo_t;
+
+/**
+ * This structure defines the data coding scheme object.
+ */
+typedef struct {
+       int bIsCompressedFormat; /**<   flag to verify compressed format        */
+       TelSatAlphabetFormatType_t alphabetFormat; /**< alphabet format Type            */
+       TelSatMsgClassType_t msgClass; /**<     Type of message class           */
+       unsigned char rawDcs; /**<      raw dcs info            */
+} TelSatDataCodingSchemeInfo_t;
+
+/**
+ * This structure defines the Alpha ID data object.
+ */
+typedef struct {
+       int bIsPresent; /**<    flag for checking existence of 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;
+
+/**
+ * This structure defines the Sub Address data object.
+ */
+typedef struct {
+       unsigned char subAddressLen; /**<       sub address length              */
+       char subAddress[TAPI_SAT_SUB_ADDR_LEN_MAX]; /**<        sub address             */
+} TelSatSubAddressInfo_t;
+
+/**
+ * This structure defines the Capability Configuration Parameters data object.
+ */
+typedef struct {
+       unsigned char dataLen; /**<     capability configuration parameter length       */
+       char data[TAPI_SAT_CCP_DATA_LEN_MAX]; /**<      capability configuration parameter      */
+} TelSatCapaConfigParamInfo_t;
+
+/**
+ * This struct defines the Command qualifier values for send SMS command.
+ */
+typedef struct {
+       int bIsPackingByMeRequired; /**<        flag to verify packing requirement, if FALSE, packing by ME not required        */
+} TelSatCmdQualiSendSms_t;
+
+/**
+ * This struct defines the Command qualifier values for display text command.
+ */
+typedef struct {
+       TelSatDisplayTextPriorityType_t msgPriority; /**<       message priority                */
+       TelSatDisplayTextMsgClearType_t msgClear; /**<  message clear type              */
+} TelSatCmdQualiDisplayText_t;
+
+/**
+ * This struct defines the Command qualifier values for get inkey command.
+ */
+typedef struct {
+       TelSatInkeyType_t inkeyType; /**<       inkey type              */
+       int bIsUsingAlphabetSet; /**<   flag for checking whether using alphabet set or not. if FALSE, digits(0-9,*,#and+) only         */
+       TelSatUseInputAlphabetType_t alphabetType; /**< alphabet type           */
+       int bIsImmediateResponseRequired;/**<   flag for checking whether immediate response required or not            */
+       int bIsHelpInfoAvailable; /**<  flag for checking whether help info available or not. if FALSE, no help information available   */
+} TelSatCmdQualiGetInkey_t;
+
+/**
+ * This struct defines the Command qualifier values for get input command.
+ */
+typedef struct {
+       int bIsUsingAlphabetSet; /**<   flag for checking whether using alphabet set. 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 or not.  if FALSE, user input in SMS packed format   */
+       int bIsHelpInfoAvailable; /**<  flag to verify if help info available or not. if FALSE, no help information available   */
+} TelSatCmdQualiGetInput_t;
+
+/**
+ * This struct defines the Command qualifier values for play tone command.
+ */
+typedef struct {
+       TelSatDisplayVibrateAlertType_t vibrateAlert; /**<      type of vibrate alert           */
+} TelSatCmdQualiPlayTone_t;
+
+/**
+ * This struct defines the Command qualifier values for select item command.
+ */
+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 available or not. if FALSE, no help information available   */
+} TelSatCmdQualiSelectItem_t;
+
+/**
+ * This struct defines the Command qualifier values for setup menu command.
+ */
+typedef struct {
+       TelSatSelectionPreferenceType_t selectionPreference; /**<       type of selection preference            */
+       int bIsHelpInfoAvailable; /**<  flag to verify help info available or not. if FALSE, no help information available      */
+} TelSatCmdQualiSetupMenu_t;
+
+/**
+ * This struct defines the Command qualifier values for language notification command.
+ */
+typedef struct {
+       int bSpecificLanguageNotification; /**< flag for specific language notification. if FALSE, non-specific language notification   */
+} TelSatCmdQualiLanguageNotification_t;
+
+/**
+ * SAT command qualifier open channel
+ */
+typedef struct {
+       int bIsEstablishImmediateLink; /**<     flag whether establishing immediate link or not. if FALSE, on demand link establishment */
+       int bIsAutomaticReconnection; /**<      flag whether automatic reconnection or not. if FALSE, no automatic reconnection */
+       int bIsModeBackground; /**<     flag whether background mode or not.            */
+} TelSatCmdQualiOpenChannel_t;
+
+/**
+ * SAT command qualifier send data
+ */
+typedef struct {
+       int bIsSendDataImmediately; /**<        flag whether to send data immediately or not. if FALSE, store data in Tx buffer*/
+} TelSatCmdQualiSendData_t;
+
+/**
+ * This structure contains the command number, type and the qualifier objects of a SATK command.
+ */
+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;
+
+/**
+ * This struct defines the device identity values.
+ */
+typedef struct {
+       TelSatDeviceIdentitiesTagType_t source; /**<    device identity tag for source  */
+       TelSatDeviceIdentitiesTagType_t destination; /**<       device identity for destination */
+} TelSatDeviceIdentitiesInfo_t;
+
+/**
+ * This structure defines the Duration data object.
+ */
+typedef struct {
+       TelSatTimeUnitType_t timeUnit; /**<     time units for the duration data                */
+       unsigned char timeInterval; /**<        time interval           */
+} TelSatDurationInfo_t;
+
+/**
+ * This structure defines the menu item data object.
+ */
+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;
+
+/**
+ * This structure defines the item identifier object.
+ */
+typedef struct {
+       unsigned char selectedItemIdentifier; /**<      selected item identifier                */
+} TelSatItemIdentifierInfo_t;
+
+/**
+ * This structure defines expected user response length.
+ */
+typedef struct {
+       unsigned char min; /**< user response length minimum value              */
+       unsigned char max; /**< user response length maximum value              */
+} TelSatRespLenInfo_t;
+
+/**
+ * This structure defines RESUlT data object.
+ */
+typedef struct {
+       TelSatResultType_t generalResult; /**<  general result  */
+       TelSatMeProblemType_t meProblem; /**<   additional information on general result        */
+} TelSatResultInfo_t;
+
+/**
+ * This structure defines RESUlT data object.
+ */
+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;
+
+/**
+ * This structure defines SS STRING data object.
+ */
+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;
+
+/**
+ * This structure defines TEXT STRING data object.
+ */
+typedef struct {
+       int bIsDigitOnly; /**<  flag for checking whether only digits used or not       */
+       TelSatDataCodingSchemeInfo_t dcs; /**<  data coding scheme              */
+       unsigned short stringLen; /**<  text length             */
+       char string[TAPI_SAT_TEXT_STRING_LEN_MAX + 1]; /**<     text string     */
+} TelSatTextTypeInfo_t;
+
+/**
+ * This structure defines menu item text object.
+ */
+typedef struct {
+       int bIsDigitOnly; /**<  flag for checking whether only digits used or not       */
+       TelSatDataCodingSchemeInfo_t dcs; /**<  data coding scheme              */
+       unsigned char stringLen; /**<   menu item string length */
+       char* pString; /**<     Menu Item String */
+} TelSatMenuItemTextInfo_t;
+
+/**
+ * This structure defines tone object.
+ */
+typedef struct {
+       TelSatToneType_t type; /**<     tone type       */
+} TelSatToneInfo_t;
+
+/**
+ * This structure defines USSD string data object.
+ */
+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;
+
+/**
+ * This structure defines File list data object.
+ */
+typedef struct {
+       unsigned char fileCount; /**<   file count      */
+//     TelSimFileName_t fileId[TAPI_SAT_FILE_ID_LIST_MAX_COUNT]; /**<  file identifier */
+} TelSatFileListInfo_t;
+
+/**
+ * This structure defines default text data object.
+ */
+typedef struct {
+       int bIsPresent; /**<    flag for checking whether default text exists or not    */
+       int bIsDigitOnly; /**<  flag for checking whether only digits used or not       */
+       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;
+
+/**
+ * This structure defines Next Action Indicator List data object.
+ */
+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;
+
+/**
+ * This structure defines event list data object.
+ */
+typedef struct {
+       unsigned char eventListCount; /**<      event list count        */
+       TelSatEventDownloadType_t list[TAPI_SAT_EVENT_LIST_MAX_COUNT]; /**<     event list */
+} TelSatEventListInfo_t;
+
+/**
+ * This structure defines icon info object.
+ */
+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];
+       char clutFile[TAPI_SAT_IMG_DATA_FILE_PATH_LEN_MAX];
+} TelSatIconInfo_t;
+
+/**
+ * This structure defines icon data object.
+ */
+typedef struct {
+       int bIsPresent; /**<    flag for checking whether icon identifier exists or not         */
+       TelSatIconQualifierType_t iconQualifier; /**<   icon qualifier type             */
+       unsigned char iconIdentifier; /**<      icon identifier         */
+       TelSatIconInfo_t iconInfo; /**< icon info       */
+} TelSatIconIdentifierInfo_t;
+
+/**
+ * This structure defines icon identifier data object.
+ */
+typedef struct {
+       int bIsPresent; /**<    flag for checking whether icon identifier exists or not */
+       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;
+
+/**
+ * This structure defines SAT bc repeat indicator Info
+ */
+typedef struct {
+       TelSatBcRepeatIndicatorType_t indType; /**<     bc repeat indicator type        */
+} TelSatBcRepeatIndicatorInfo_t;
+
+/**
+ * This structure defines call control strings.
+ */
+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;
+
+/**
+ * This structure defines the Action requested call control data.
+ */
+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;
+
+/**
+ * This structure defines dtmf string data object.
+ */
+typedef struct {
+       unsigned char stringLen; /**<   dtmf string lengh       */
+       char dtmfTone[TAPI_SAT_DTMF_STRING_LEN_MAX]; /**<       dtmf tone data  */
+} TelSatDtmfStringInfo_t;
+
+/**
+ * This structure defines language data object.
+ */
+typedef struct {
+       TelSatLanguageType_t language; /**<     language type   */
+} TelSatLanguageInfo_t;
+
+/**
+ * This structure defines date time and time zone data object.
+ */
+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;
+
+/**
+ * This structure defines SAT browser identities.
+ */
+typedef struct {
+       TelSatBrowserIdentityType_t browserIdentity; /**<       browser identity        */
+} TelSatBrowserIdentitiesInfo_t;
+
+/**
+ * This structure defines SAT browser URL Data Object.
+ */
+typedef struct {
+       char string[TAPI_SAT_URL_LEN_MAX + 1]; /**<     url string      */
+} TelSatUrlInfo_t;
+
+/**
+ * This structure defines SAT bearer type.
+ */
+typedef struct {
+       unsigned char listLen; /**<     bearer list length      */
+       TelSatBearerType_t bearerList[TAPI_SAT_BEARER_LIST_MAX_COUNT]; /**<     bearer list     */
+} TelSatBearerInfo_t;
+
+/**
+ * This structure defines SAT provisioning reference.
+ */
+typedef struct {
+       char provisioningFilePath[TAPI_SAT_PROVISIONING_FILE_PATH_LEN_MAX]; /**<        provisioning file path  */
+} TelSatProvisioningRefInfo_t;
+
+/**
+ * This structure defines SAT browser termination cause.
+ */
+typedef struct {
+       TelSatBrowserTerminationCauseType_t cause; /**< browser termination cause       */
+} TelSatBrowserTerminationCauseInfo_t;
+
+/**
+ * This structure defines SAT Csd bearer parameters .
+ */
+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;
+
+/**
+ * This structure defines SAT bearer parameters GPRS.
+ */
+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 gprs peak throughput     */
+       TelSatBearerParamGprsMeanThroughputClassType_t meanThroughputClass;/**< bearer gprs mean throughput     */
+       TelSatBearerParamGprsPdpType_t pdpType; /**<    bearer gprs pdp type    */
+} TelSatBearerParametersGprsInfo_t;
+
+/**
+ * This structure defines SAT bearer parameters local links.
+ */
+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;
+
+/**
+ * This structure defines SAT bearer description.
+ */
+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;
+
+/**
+ * This structure defines SAT channel data.
+ */
+typedef struct {
+       unsigned char channelDataStringLen; /**<        channel data length     */
+       char channelDataString[TAPI_SAT_CHANNEL_DATA_STRING_LEN_MAX]; /**<      channel data    */
+} TelSatChannelDataInfo_t;
+
+/**
+ * This structure defines SAT channel data length.
+ */
+typedef struct {
+       unsigned char channelDataLen; /**<      channel data length     */
+} TelSatChannelDataLengthInfo_t;
+
+/**
+ * This structure defines SAT buffer size.
+ */
+typedef struct {
+       unsigned char bufferSize[2]; /**<       channel data buffer size        */
+} TelSatBufferSizeInfo_t;
+
+/**
+ * This structure defines SAT channel status.
+ */
+typedef struct {
+       unsigned char channelId; /**<   channel id      */
+       TelSatChannelStatusType_t status; /**<  channel status          */
+       TelSatChannelStatusInfoType_t channelInfo; /**< channel status info     */
+} TelSatChannelStatusInfo_t;
+
+/**
+ * This structure defines SAT other address.
+ */
+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;
+
+/**
+ * This structure defines SIM me interface transport level.
+ */
+typedef struct {
+       TelSatTransportProtocolType_t transportProtocolType; /**<       transport protocol type */
+       unsigned short portNumber; /**< port number     */
+} TelSatSimMeInterfaceTransportLevelInfo_t;
+
+/**
+ * This structure defines SAT network access name.
+ */
+typedef struct {
+       unsigned char length; /**<      network access name length      */
+       unsigned char netAccName[TAPI_SAT_NET_ACC_NAM_LEN_MAX]; /**<    network access name     */
+} TelSatnetworkAccessNameInfo_t;
+
+/**
+ * This structure defines SAT aid.
+ */
+typedef struct {
+       char aid[TAPI_SAT_AID_LEN_MAX]; /**<    application Id  */
+} TelSatAidInfo_t;
+
+/**
+ * This structure defines SAT remote entity address.
+ */
+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;
+
+/**
+ * This structure defines SAT text attribute.
+ */
+typedef struct {
+       unsigned char textFormatting[4]; /**<   text attribute -e.g. bold, center align, etc    */
+} TelSatTextAttributeInfo_t;
+
+/**
+ * This structure defines SAT text attribute list.
+ */
+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..86ad042
--- /dev/null
@@ -0,0 +1,704 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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.
+ */
+
+/**
+ * @open
+ * @ingroup            TelephonyAPI
+ * @addtogroup SAT_TAPI        SAT
+ * @{
+ *
+ * @file TelSatProactvCmd.h
+
+ @brief This file serves as a "C" header file defines structures for Tapi SAT Proactive commands and terminal response Services. \n
+ It contains a sample set of constants, enums, structs that would be required by applications.
+ */
+
+#ifndef _TEL_SAT_PROACTV_CMD_H_
+#define _TEL_SAT_PROACTV_CMD_H_
+
+#include <TelSatObj.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#define TAPI_SAT_MENU_ITEM_COUNT_MAX                   40      /**<    max count of sat menu items     */
+#define TAPI_SAT_PROVISIONING_REF_MAX_COUNT            10      /**<    max count of sat provisioning reference */
+
+/**
+ * This structure contains the data objects for DISPLAY TEXT proactive command indication.
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
+} TelSatMoreTimeIndInfo_t;
+
+/**
+ * This structure contains the data objects for DISPLAY TEXT proactive command indication.
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. 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 required or not    */
+       TelSatDurationInfo_t duration; /**<     duration for which text should be displayed     */
+       TelSatTextAttributeInfo_t textAttribute; /**<   text attribute info -e.g. bold, center align    */
+} TelSatDisplayTextIndInfo_t;
+
+/**
+ * This structure contains the data objects for GET INKEY proactive command indication.
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. 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;
+
+/**
+ * This structure contains the data objects for GET INPUT proactive command indication.
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. 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;
+
+/**
+ * This structure contains the data objects for PLAY TONE proactive command indication.
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. 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;
+
+/**
+ * This structure contains the data objects for SETUP MENU proactive command indication.
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. 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;
+
+/**
+ * This structure contains the data objects for SELECT ITEM proactive command indication data.
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. 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;
+
+/**
+ * This structure contains the data objects for SEND SHORT MESSAGE proactive command indication.
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. 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;
+
+/**
+ * This structure contains the data objects for SEND SS proactive command indication.
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. 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;
+
+/**
+ * This structure contains the data objects for SEND USSD proactive command indication.
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. 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;
+
+/**
+ * This structure contains the data objects for SETUP CALL proactive command indication.
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. 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 AlphaId */
+       TelSatAlphaIdentifierInfo_t callSetupPhaseAlphaId; /**< call Setup Phase AlphaId        */
+       TelSatIconIdentifierInfo_t userConfirmPhaseIconId; /**< user Confirmation Phase IconId  */
+       TelSatIconIdentifierInfo_t callSetupPhaseIconId; /**<   call Setup Phase IconId */
+       TelSatTextAttributeInfo_t userConfirmPhaseTextAttribute; /**<   user Confirmation Phase Text Attribute  */
+       TelSatTextAttributeInfo_t callSetupPhaseTextAttribute; /**<     call Setup PhaseText Attribute  */
+} TelSatSetupCallIndInfo_t;
+
+/**
+ * This structure contains the data objects for REFRESH proactive command indication.
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
+       TelSatFileListInfo_t fileList; /**<     file list for refresh   */
+       TelSatAidInfo_t aid; /**<       application Id  */
+} TelSatRefreshIndInfo_t;
+
+/**
+ * This structure contains the data objects for PROVIDE LOCAL INFO proactive command indication.
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
+
+} TelSatProvideLocalInfoIndInfo_t;
+
+/**
+ * This structure contains the data objects for SETUP EVENT LIST proactive command indication data.
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
+       TelSatEventListInfo_t eventList; /**<   event list contains events which are required by USIM application       */
+
+} TelSatSetupEventListIndInfo_t;
+
+/**
+ * This structure contains the data objects for SETUP IDLE MODE TEXT proactive command indication.
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
+       TelSatTextTypeInfo_t text; /**< text to be shown on idle screen */
+       TelSatIconIdentifierInfo_t iconId; /**< icon identifier info    */
+       TelSatTextAttributeInfo_t textAttribute; /**<   text attribute info -e.g. bold, center align    */
+} TelSatSetupIdleModeTextIndInfo_t;
+
+/**
+ * This structure contains the data objects for SEND DTMF COMMAND proactive command indication.
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. 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;
+
+/**
+ * This structure contains the data objects for LANGUAGE NOTIFICATION proactive command indication.
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
+       TelSatLanguageInfo_t language; /**<     language info from USIM application     */
+} TelSatLanguageNotificationIndInfo_t;
+
+/**
+ * This structure contains the data objects for LAUNCH BROWSER proactive command indication.
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
+       TelSatBrowserIdentitiesInfo_t browserId; /**<   browser identity        */
+       TelSatUrlInfo_t url; /**<       url     */
+       TelSatBearerInfo_t bearer; /**< bearer which is used by 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;
+
+/**
+ * This structure contains the data objects for OPEN CHANNEL CSB proactive command indication data.
+ */
+typedef struct {
+       TelSatAddressInfo_t address; /**<       channel address */
+       TelSatSubAddressInfo_t subAddress; /**< channel sub address     */
+       TelSatDurationInfo_t duration1; /**<    connection require time */
+       TelSatDurationInfo_t duration2; /**<    connection require time2        */
+       TelSatBearerParametersCsdInfo_t bearerParamsCsd; /**<   csd info        */
+       TelSatBufferSizeInfo_t bufferSize; /**< bufferSize      */
+       TelSatOtherAddressInfo_t otherAddress; /**<     otherAddress    */
+       TelSatTextTypeInfo_t userLogin; /**<    userLogin       */
+       TelSatTextTypeInfo_t userPassword; /**< userPassword    */
+       TelSatSimMeInterfaceTransportLevelInfo_t simMeInterfaceTransportLevel; /**<     simMeInterfaceTransportLevel    */
+       TelSatOtherAddressInfo_t dataDestinationAddress; /**<   dataDestinationAddress  */
+} TelSatOpenChannelCsbInfo_t;
+
+/**
+ * This structure contains the data objects for OPEN CHANNEL (packet) proactive command indication data.
+ */
+typedef struct {
+       TelSatBearerParametersGprsInfo_t bearerParamsGprs; /**< gprs info       */
+       TelSatBufferSizeInfo_t bufferSize; /**< bufferSize      */
+       TelSatnetworkAccessNameInfo_t networkAccessName; /**<   networkAccessName       */
+       TelSatOtherAddressInfo_t otherAddress; /**<     otherAddress    */
+       TelSatTextTypeInfo_t userLogin; /**<    userLogin       */
+       TelSatTextTypeInfo_t userPassword; /**< userPassword    */
+       TelSatSimMeInterfaceTransportLevelInfo_t simMeInterfaceTransportLevel; /**<     simMeInterfaceTransportLevel    */
+       TelSatOtherAddressInfo_t dataDestinationAddress; /**<   dataDestinationAddress  */
+       TelSatTextAttributeInfo_t textAttribute; /**<   text attribute info -e.g. bold, center align    */
+} TelSatOpenChannelpdbInfo_t;
+
+/**
+ * This structure contains the data objects for OPEN CHANNEL LOCAL LINK proactive command indication data.
+ */
+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; /**< bufferSize      */
+       TelSatTextTypeInfo_t userPassword; /**< userPassword    */
+       TelSatSimMeInterfaceTransportLevelInfo_t simMeInterfaceTransportLevel; /**<     simMeInterfaceTransportLevel    */
+       TelSatOtherAddressInfo_t dataDestinationAddress; /**<   dataDestinationAddress  */
+       TelSatRemoteEntityAddressInfo_t remoteEntityAddress; /**<       remoteEntityAddress     */
+       TelSatTextAttributeInfo_t textAttribute; /**<   text attribute info -e.g. bold, center align    */
+} TelSatOpenChannelLocalBearerInfo_t;
+
+/**
+ * This structure contains the data objects for OPEN CHANNEL (DEFAULT BEARER) proactive command indication data.
+ */
+typedef struct {
+       TelSatBufferSizeInfo_t bufferSize; /**< bufferSize      */
+       TelSatOtherAddressInfo_t otherAddress; /**<     otherAddress    */
+       TelSatTextTypeInfo_t userLogin; /**<    userLogin       */
+       TelSatTextTypeInfo_t userPassword; /**< userPassword    */
+       TelSatSimMeInterfaceTransportLevelInfo_t simMeInterfaceTransportLevel;/**<      simMeInterfaceTransportLevel    */
+       TelSatOtherAddressInfo_t dataDestinationAddress; /**<   dataDestinationAddress  */
+} TelSatOpenChannelDefaultBearerInfo_t;
+
+/**
+ * This structure contains the data objects for OPEN CHANNEL (UICC Server Mode) proactive command indication data.
+ */
+typedef struct {
+       TelSatBufferSizeInfo_t bufferSize; /**< bufferSize      */
+       TelSatSimMeInterfaceTransportLevelInfo_t simMeInterfaceTransportLevel; /**<     simMeInterfaceTransportLevel    */
+} TelSatOpenChannelUiccServerModeInfo_t;
+
+/**
+ * This structure contains the data objects for OPEN CHANNEL proactive command indication data.
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
+       int bIsUiccServerMode; /**<     flag whether UICC server mode or not    */
+       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; /**<        defaultBearer   */
+               TelSatOpenChannelUiccServerModeInfo_t uiccServerMode; /**<      uiccServerMode  */
+       } details; /**< Open Channel Details */
+} TelSatOpenChannelIndInfo_t;
+
+/**
+ * This structure contains the data objects for CLOSE CHANNEL proactive command indication data.
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. 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;
+
+/**
+ * This structure contains the data objects for RECEIVE DATA proactive command indication data.
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. 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;
+
+/**
+ * This structure contains the data objects for SEND DATA proactive command indication data.
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. 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;
+
+/**
+ * This structure contains the data objects for GET CHANNEL STATUS proactive command indication data.
+ */
+typedef struct {
+       TelSatCommandDetailInfo_t commandDetail; /**<   command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t deviceIdentities; /**<     device identities info. includes source and destination devices */
+} TelSatGetChannelStatusIndInfo_t;
+
+/**
+ * This structure contains the data object for END PROACTIVE SESSION command indication.
+ */
+typedef struct {
+       TelSatCommandType_t commandType; /**<   proactive command type  */
+} TelSatEndProactiveSessionIndInfo_t;
+
+/**
+ * This structure contains the data objects for PROACTIVE command indication union data.
+ */
+typedef struct {
+       union {
+               TelSatMoreTimeIndInfo_t moreTime;
+               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;
+
+/**
+ * This structure contains the data objects for the Terminal Response of DISPLAY TEXT proactive command.
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
+} TelSatDisplayTextRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of GET INKEY proactive command.
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
+       TelSatTextTypeInfo_t text; /**< inserted key info       */
+       TelSatDurationInfo_t duration;
+} TelSatGetInkeyRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of PLAY TONE proactive command.
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
+} TelSatPlayToneRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of MORE TIME proactive command.
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
+} TelSatMoreTimeRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of SETUP MENU proactive command.
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
+} TelSatSetupMenuRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of GET INPUT proactive command.
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
+       TelSatTextTypeInfo_t text; /**< inserted string info    */
+} TelSatGetInputRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of SELECT ITEM proactive command.
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
+       int bOtherInfo; /**<    flag to check whether other information is required or not      */
+       unsigned char itemIdentifier; /**<      item identifier */
+} TelSatSelectItemRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of PROVIDE LOCAL INFORMATION proactive command.
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
+       int bOtherInfo; /**<    flag to check whether other information is required or not      */
+       TelSatCmdQualiProvideLocalInfo_t infoType; /**< local info type - e.g. time zone or language info, etc  */
+       union {
+               TelSatDataTimeZoneInfo_t timeZoneInfo; /**<     current time zone info  */
+               TelSatLanguageInfo_t languageInfo; /**< current ME language setting info        */
+       } u; /**<       Union   */
+} TelSatProvideLocalInfoRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of SETUP EVENT LIST proactive command.
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
+} TelSatSetupEventListRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of SEND SMS proactive command.
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
+       TelSatCallCtrlProblemType_t additionalCallCtrlProblemInfo; /**< call control problem    */
+} TelSatSendSmsRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of SET UP CALL proactive command.
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
+       int bOtherInfo; /**<    flag to check whether other information are required or not     */
+       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 makes problem or not */
+       unsigned long tapiCause; /**<   tapi call level cause   */
+       unsigned long tapiSsCause; /**< tapi ss level cause     */
+} TelSatSetupCallRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of SEND SS proactive command.
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
+       int bOtherInfo; /**<    flag to check whether whether other information is required or not      */
+       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;
+
+/**
+ * This structure contains the data objects for the Terminal Response of SEND USSD proactive command.
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
+       int bOtherInfo; /**<    flag to check whether other information is required or not      */
+       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;
+
+/**
+ * This structure contains the data objects for the Terminal Response of REFRESH proactive command.
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
+} TelSatRefreshRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of GET CHANNEL STATUS proactive command.
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
+       int bOtherInfo; /**<    flag whether other information are required or not      */
+       TelSatBipProblemType_t additionalProblemInfo; /**<      bip specific problem info       */
+       TelSatChannelStatusInfo_t channelStatus; /**<   channel Status  */
+} TelSatGetChannelStatusRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of CLOSE CHANNEL proactive command.
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
+       TelSatBipProblemType_t additionalProblemInfo; /**<      bip specific problem info       */
+} TelSatCloseChannelRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of OPEN CHANNEL proactive command.
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
+       int bOtherInfo; /**<    flag whether other information are required or not */
+       TelSatBearerDescriptionInfo_t bearerDescription; /**<   bearerDescription       */
+       TelSatBipProblemType_t additionalProblemInfo; /**<      bip specific problem info       */
+       TelSatChannelStatusInfo_t channelStatus; /**<   channelStatus   */
+       TelSatBufferSizeInfo_t bufferSize; /**< bufferSize      */
+} TelSatOpenChannelRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of LANGAUGE NOTIFICATION proactive command.
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
+} TelSatLanguageNotificationRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of LAUNCH BROWSER proactive command.
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
+       TelSatLaunchBrowserProblemType_t additionalProblemInfo; /**<    browser specific problem info   */
+} TelSatLaunchBrowserRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of RECEIVE DATA proactive command.
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
+       TelSatBipProblemType_t additionalProblemInfo; /**<      bip specific problem info       */
+       int bOtherInfo; /**<    flag whether other information are required or not      */
+       TelSatChannelDataInfo_t channel_data; /**<      channel data    */
+       unsigned char channelDataLen; /**<      channel data length     */
+} TelSatReceiveDataRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of SEND DATA proactive command.
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
+       TelSatBipProblemType_t additionalProblemInfo; /**<      bip specific problem info       */
+       unsigned char channelDataLen; /**<      channel data length     */
+} TelSatSendDataRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of SETUP IDLE MODE TEXT proactive command.
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
+} TelSatSetupIdlemodeTextRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of SEND DTMF proactive command.
+ */
+typedef struct {
+       TelSatResultInfo_t result; /**< result whether current proactive command request was executed successfully or not       */
+} TelSatSendDtmfRespInfo_t;
+
+/**
+ * This contains the data structures to be used to send proactive command response.
+ */
+typedef struct {
+       unsigned char commandNumber; /**<         proactive command number      */
+       TelSatCommandType_t commandType; /**<     proactive command type        */
+       union {
+               TelSatMoreTimeRespInfo_t moreTime;
+               TelSatDisplayTextRespInfo_t displayText; /**<   terminal response info from displayText proactive command       */
+               TelSatGetInkeyRespInfo_t getInkey; /**< terminal response info from getInkey proactive command  */
+               TelSatGetInputRespInfo_t getInput; /**< terminal response info from getInput proactive command  */
+               TelSatPlayToneRespInfo_t playTone; /**< terminal response info from playTone proactive command  */
+               TelSatSetupMenuRespInfo_t setupMenu; /**<       terminal response info from setupMenu proactive command */
+               TelSatSelectItemRespInfo_t selectItem; /**<     terminal response info from selectItem proactive command        */
+               TelSatSendSmsRespInfo_t sendSms; /**<   terminal response info from sendSms proactive command   */
+               TelSatSendSsRespInfo_t sendSs; /**<     terminal response info from sendSs proactive command    */
+               TelSatSendUssdRespInfo_t sendUssd; /**< terminal response info from sendUssd proactive command  */
+               TelSatSetupCallRespInfo_t setupCall; /**<       terminal response info from setupCall proactive command */
+               TelSatRefreshRespInfo_t refresh; /**<   terminal response info from refresh proactive command   */
+               TelSatProvideLocalInfoRespInfo_t provideLocInfo; /**<   terminal response info from provide Local Info proactive command        */
+               TelSatLaunchBrowserRespInfo_t launchBrowser; /**<       terminal response info from launch Browser proactive command    */
+               TelSatSetupIdlemodeTextRespInfo_t idleText; /**<        terminal response info from setup idle mode text proactive command      */
+               TelSatSendDtmfRespInfo_t sendDtmf; /**< terminal response info from send Dtmf proactive command */
+               TelSatLanguageNotificationRespInfo_t languageNotification; /**< terminal response info from language Notification proactive command     */
+               TelSatSetupEventListRespInfo_t setupEventList; /**<     terminal response info from setup Event List proactive command  */
+               TelSatOpenChannelRespInfo_t openChannel; /**<   terminal response info from openChannel proactive command       */
+       } terminalRespInfo; /**<        Union   */
+} TelSatRespInfo_t;
+
+/*
+ *SAT Icon Data
+ */
+
+typedef struct {
+       unsigned char iconId;
+       unsigned char imgType;
+       unsigned char imgLen;
+       unsigned char imgData[256];
+} TelSatIconDataResp_t;
+
+typedef struct {
+       unsigned char iconId;
+       unsigned char imgType;
+       unsigned char fileId[2];
+       unsigned char reqDataLen[2];
+       unsigned char offset[2];
+} 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..547ea93
--- /dev/null
@@ -0,0 +1,1177 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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.
+ */
+
+/**
+ * @open
+ * @ingroup            TelephonyAPI
+ * @addtogroup SIM_TAPI        SIM
+ * @{
+ *
+ * @file TelSim.h
+
+ @brief This file serves as a "C" header file defines structures for Tapi SIM Services. \n
+ It contains a sample set of constants, enums, structs that would be required by applications.
+ */
+
+#ifndef _TELSIM_H_
+#define _TELSIM_H_
+
+#include <TelDefines.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/** Maximum ICCID Length */
+#define TAPI_SIM_ICCID_LEN_MAX 20
+
+/** Alpha Id  max length */
+#define TAPI_SIM_XDN_ALPHA_ID_MAX_LEN 30
+
+/** Dialing number max length */
+#define TAPI_SIM_XDN_DIALING_NUMBER_LEN        20
+
+/** CSP profile entry count max length */
+#define TAPI_SIM_CPHS_CUSTOMER_SERVICE_PROFILE_ENTRY_COUNT_MAX 11
+
+/** Authentication code max length */
+#define TAPI_SIM_AUTH_MAX_REQ_DATA_LEN 256
+
+/** Authentication response data max length */
+#define TAPI_SIM_AUTH_MAX_RESP_DATA_LEN 128
+
+/** SAP APDU max length */
+#define TAPI_SIM_APDU_MAX_LEN 256+2 // to be fine tuned according to lower layers, 2bytes for SW1 & SW2 should be added
+
+/** SIM 3G Phone book EF Max count */
+#define TAPI_SIM_PB_3G_FILE_MAX_COUNT 13
+
+/** SAP Answer to Reset data max length */
+#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
+
+/**
+ * @enum TelSimCardType_t
+ * This enumeration defines the card type.
+ */
+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,
+       TAPI_SIM_CARD_TYPE_IMS,
+} TelSimCardType_t;
+
+/**
+ * @enum TelSimFileID_t
+ * This enumeration defines the card type.
+ */
+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 ID are less than this Value*/
+       TAPI_SIM_EF_INVALID = 0xFFFF, /**< Invalid file.*/
+       TAPI_SIM_EF_OTHERS, /**< Element to indicate an unknown file.*/
+}TelSimFileID_t;
+
+/**
+ * @enum TelSimFacilityStatus_t
+ * This enumeration defines the pin status.
+ */
+typedef enum {
+       TAPI_SIM_FACILITY_DISABLED = 0x00,
+       TAPI_SIM_FACILITY_ENABLED = 0x01,
+       TAPI_SIM_FACILITY_UNKNOWN = 0xFF
+} TelSimFacilityStatus_t;
+
+/**
+ * @enum TelSimPinOperationResult_t
+ * This enumeration defines the pin operation result from the lower layers.
+ */
+typedef enum {
+       TAPI_SIM_PIN_OPERATION_SUCCESS, /**< Operation involving PIN (verification/change/enable/disable, etc) is successful.  */
+       TAPI_SIM_BUSY, /**< SIM is busy  */
+       TAPI_SIM_CARD_ERROR, /**< SIM card error - Permanently blocked and general errors   */
+       TAPI_SIM_INCOMPATIBLE_PIN_OPERATION, /**< SIM Incompatible pin operation that is in case when 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 **/
+} TelSimPinOperationResult_t;
+
+/**
+ * @enum TelSimAccessResult_t
+ * This enumeration defines the SIM access result from the lower layers.
+ */
+typedef enum {
+       TAPI_SIM_ACCESS_SUCCESS, /**< Access to file 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;
+
+/**
+ * @enum TelSimPinType_t
+ * This enumeration defines the pin type.
+ */
+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;
+
+/**
+ * @enum TelSimTypeOfNum_t
+ * This enumeration defines the type of number.
+ */
+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;
+
+/**
+ *  @enum TelSimTextEncrypt_t
+ *   This enumeration defines the text encryption types
+ */
+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;
+
+/**
+ * @enum TelSimNumberingPlanIdentity_t
+ * This enumeration defines the numbering plan identifier.
+ */
+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;
+
+/**
+ * @enum TelSimEccEmergencyServiceInfo_t
+ * This enumeration defines the emergency service type.
+ */
+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;
+
+/**
+ * @enum TelSimLanguagePreferenceCode_t
+ * This enumeration defines the language indication code.
+ */
+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;
+
+/**
+ * @enum TelSimCardStatus_t
+ * This enumeration defines the SIM card status
+ */
+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 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_UNKNOWN = 0xff /**<  Unknown status. It can be initial status **/
+} TelSimCardStatus_t;
+
+/**
+ * @enum TelSimCphsPhaseType_t
+ * This enum gives the current CPHS phase of SIM card.
+ */
+typedef enum {
+       TAPI_SIM_CPHS_PHASE1 = 0x01, /**< phase1  */
+       TAPI_SIM_CPHS_PHASE2 = 0x02, /**< phase2  */
+       TAPI_SIM_CPHS_PHASE_RFU = 0xff /**< RFU  */
+} TelSimCphsPhaseType_t;
+
+/**
+ * @enum TelSimCphsIndexLevelIndicator_t
+ * This struct gives CPHS index level indication.
+ */
+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;
+
+/**
+ * @enum TelSimCphsCustomerServiceGroup_t
+ * This struct gives CPHS group service type information .
+ */
+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 teleservies*/
+       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;
+
+/**
+ * @enum TelSimMailboxType_t
+ * This enum gives mailbox type.
+ */
+typedef enum {
+       TAPI_SIM_MAILBOX_VOICE = 0x01, /**< CFIS voice*/
+       TAPI_SIM_MAILBOX_FAX = 0x03, /**< CFIS fax*/
+       TAPI_SIM_MAILBOX_DATA = 0x04, /**< CFIS data*/
+       TAPI_SIM_MAILBOX_EMAIL = 0x05, /**< CFIS email*/
+       TAPI_SIM_MAILBOX_OTHER = 0x06, /**< CFIS other*/
+} TelSimMailboxType_t;
+
+/**
+ * @enum TelSimDynamicFlagsSelectedLineId_t
+ * This enum gives dynamics flag selected line  information.
+ */
+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;
+
+/**
+ * @enum tapi_sim_dynamic2_flag_als_status_t
+ * This enum gives dynamics2 flag selected line  information.
+ */
+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;
+
+
+/**
+ * @enum TelSimAuthenticationType_t
+ * This is used for Authentication Procedure by using SIM.
+ */
+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_TYPE_MAX /**< TBD */
+} TelSimAuthenticationType_t;
+
+/**
+ * @enum TelSimAuthenticationResult_t
+ * This is used for Authentication Procedure.
+ */
+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;
+
+/**
+ * @enum TelSimLockType_t
+ *     This structure gives security lock type enum values
+ */
+typedef enum {
+       TAPI_SIM_LOCK_PS = 0x01, /** < PH-SIM (phone-SIM) locked.Lock Phone to SIM/UICC card
+        *      (MT asks password when other than current SIM/UICC card inserted;
+        *      MT may remember certain amount of previously used cards thus not
+        *      requiring 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 password when 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 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;
+
+/**
+ * @enum TelSimLockKey_t
+ *     This structure gives security lock key information enum values
+ */
+typedef enum {
+       TAPI_SIM_LOCK_KEY_NOT_NEED = 0x00, /**< key not need */
+       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;
+
+/**
+ * @enum TelSimSapPowerMode_t
+ * This enum gives the SAP message Ids between SAP client and SAP server.
+ */
+typedef enum {
+       TAPI_SIM_SAP_POWER_SIM_ON_REQ, /**< SAP Client request about power SIM on in Server */
+       TAPI_SIM_SAP_POWER_SIM_OFF_REQ, /**< SAP Client request about power SIM off in Server */
+       TAPI_SIM_SAP_RESET_SIM_REQ, /**< SAP Client request about SIM reset in Server */
+} TelSimSapPowerMode_t;
+
+/**
+ * @enum TelSimSapConnectionStatus_t
+ * This enum gives the SAP connection status information .
+ */
+typedef enum {
+       TAPI_SIM_SAP_CONNECTION_STATUS_OK = 0x00, /**< connect 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 message length that client want send */
+       TAPI_SIM_SAP_CONNECTION_STATUS_TOO_SMALL_MAX_SIZE /**< when client want to connect with very small message length which is not supported by Server */
+} TelSimSapConnectionStatus_t;
+
+/**
+ * @enum TelSimSapDissconnectType_t
+ * This enum gives the SAP  disconnect type information.
+ */
+typedef enum {
+       TAPI_SIM_SAP_DISCONNECT_TYPE_GRACEFUL = 0x00, /**< disconnection procedure ends after finishing current work */
+       TAPI_SIM_SAP_DISCONNECT_TYPE_IMMEDIATE /**<  disconnection procedure ends immediately*/
+} TelSimSapDissconnectType_t;
+
+/**
+ * @enum TelSimSapStatusInfo_t
+ * This enum gives the SAP current connection status information
+ */
+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;
+
+/**
+ * @enum TelSimSapCardStatus_t
+ * This enum gives the SIM card status if server`s status changed about connection with subscription module
+ */
+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;
+
+/**
+ * @enum TelSimSapResultCode_t
+ * This enum gives the SAP result information.
+ */
+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 power 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 power 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 support*/
+} TelSimSapResultCode_t;
+
+/**
+ * @enum TelSimSapProtocol_t
+ * This enum gives SAP transport protocol type
+ */
+typedef enum {
+       TAPI_SIM_SAP_PROTOCOL_T0, /**< T = 0, character*/
+       TAPI_SIM_SAP_PROTOCOL_T1 /**< T = 1, block*/
+} TelSimSapProtocol_t;
+
+/**
+ * @enum TelSimPbAccessResult_t
+ * This enumeration defines the Phone book access result
+ */
+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 was not a valid index. */
+       TAPI_SIM_PB_INVALID_NUMBER_LENGTH, /**< The number length is exceeds the max length allowed (or 0). */
+       TAPI_SIM_PB_INVALID_NAME_LENGTH, /**< The name length is exceeds the max length allowed (or 0). */
+       TAPI_SIM_PB_ACCESS_CONDITION_NOT_SATISFIED, /**< Access condition for PB file is not satisfied. */
+} TelSimPbAccessResult_t;
+
+/**
+ * @enum TelSimPbFileType_t
+ * This enumeration defines  different storage types to be selected in SIM or USIM
+ */
+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;
+
+/**
+ * @enum TelSimPb3GFileType_t
+ *  This enumeration defines the different storage field types in 3G Phone book.
+ */
+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 main name*/
+       TAPI_PB_3G_GRP, /**< Group  */
+       TAPI_PB_3G_PBC, /** <1 byte control info and 1 byte hidden info*/
+} TelSimPb3GFileType_t;
+
+/**
+ * This data structure defines the data for the Imsi information.
+ */
+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;
+
+typedef struct {
+       char name[30+1];
+       char number[6+1];
+       TelSimEccEmergencyServiceInfo_t category;
+}TelSimEcc_t;
+
+typedef struct {
+       int ecc_count;
+       TelSimEcc_t list[15];
+}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;
+       int rec_index; /**< index which stands for the location where record is saved in SIM*/
+       int profile_num; /**< SIM profile index*/
+       TelSimMailboxType_t mb_type;
+       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; /**< Extensiion1 Record Identifier */
+}TelSimMailBoxNumber_t;
+
+typedef struct {
+       int count;
+       TelSimMailBoxNumber_t list[TAPI_SIM_MSP_CNT_MAX*5]; //max is 10
+}TelSimMailboxList_t;
+
+typedef struct {
+       int rec_index;
+       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/Configuration2 Record Identifier */
+       unsigned char ext7_id; /**< Extension 7 Record Identifier */
+}TelSimCfis_t;
+
+typedef struct {
+       int profile_count;
+       TelSimCfis_t cf[TAPI_SIM_MSP_CNT_MAX];
+}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;
+       TelSimCfisList_t cf_list;
+       TelSimCphsCf_t cphs_cf;
+}TelSimCallForwardingResp_t;
+
+typedef struct {
+       int b_cphs;
+       union {
+               TelSimCfis_t cf;
+               TelSimCphsCf_t cphs_cf;
+       } cf_data_u;
+}TelSimCallForwardingReq_t;
+
+typedef struct {
+       int rec_index;
+       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;
+       TelSimMwis_t mw[TAPI_SIM_MSP_CNT_MAX];
+}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;
+       TelSimMwisList_t mw_list;
+       TelSimCphsMw_t cphs_mw;
+}TelSimMessageWaitingResp_t;
+
+typedef struct {
+       int b_cphs;
+       union {
+               TelSimMwis_t mw;
+               TelSimCphsMw_t cphs_mw;
+       } mw_data_u;
+}TelSimMessageWaitingReq_t;
+
+/**
+ *     This data structure represents MSISDN information
+ */
+typedef struct {
+       char num[TAPI_SIM_XDN_DIALING_NUMBER_LEN + 1]; /**< MSISDN number. If not exist, Null string will be returned*/
+       char name[TAPI_SIM_XDN_ALPHA_ID_MAX_LEN + 1]; /**< MSISDN name. If not exist, Null string will be returned*/
+} TelSimSubscriberInfo_t;
+
+typedef struct {
+       int count;
+       TelSimSubscriberInfo_t list[3]; //max is 3
+}TelSimMsisdnList_t;
+
+typedef struct {
+       char plmn[6+1];
+       int b_umts;
+       int b_gsm;
+}TelSimOplmnwact_t;
+
+typedef struct {
+       int count;
+       TelSimOplmnwact_t list[30]; //max is 30
+}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];
+       unsigned char short_name[TAPI_SIM_NET_SHORT_NAME_MAX_LEN + 1];
+}TelSimCphsNetName_t;
+
+/**
+ *This is used for authentication request procedure.
+ */
+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;
+
+/**
+ * This is used for result data of authentication.
+ */
+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 authentication key, Kc*/
+       char authentication_key[TAPI_SIM_AUTH_MAX_RESP_DATA_LEN]; /**< the data of of authentication key, Kc*/
+       int cipher_length; /**< the length of cipher key length */
+       char cipher_data[TAPI_SIM_AUTH_MAX_RESP_DATA_LEN]; /**< cipher key */
+       int integrity_length; /**< the length of integrity key length */
+       char integrity_data[TAPI_SIM_AUTH_MAX_RESP_DATA_LEN]; /**< integrity key */
+} TelSimAuthenticationResponse_t;
+
+
+/**
+ * This structure contains information about pin data.
+ * 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;
+
+/**
+ * This data structure defines the data for the PIN Information.
+ */
+typedef struct {
+       TelSimPinType_t type; /**< Specifies the PIN or PUK type.*/
+       int retry_count; /**< Number of attempts remaining for PIN/PUK verification.*/
+} TelSimSecResult_t;
+
+/**
+ * This structure is used to en/disable facility
+ */
+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;
+       TelSimFacilityStatus_t f_status;
+}TelSimFacilityInfo_t;
+
+/**
+ *
+ * This structure is used to get information about LOCK_TYPE
+ */
+typedef struct {
+       TelSimLockType_t lock_type; /**< Lock type */
+       TelSimLockStatus_t lock_status; /**< Lock key */
+       int retry_count; /**< retry counts */
+} TelSimLockInfo_t;
+
+/**
+ * This data structure defines the data for the apdu.
+ */
+typedef struct {
+       unsigned char apdu_len;
+       unsigned char* apdu;
+} TelSimApdu_t;
+
+/**
+ * This data structure defines the data for the Response of sending apdu.
+ */
+typedef struct {
+       unsigned char apdu_resp_len;
+       unsigned char apdu_resp[TAPI_SIM_APDU_MAX_LEN];
+} TelSimApduResp_t;
+
+/**
+ * This data structure defines the data for the Response of sending apdu.
+ */
+typedef struct {
+       unsigned char atr_resp_len;
+       unsigned char atr_resp[TAPI_SIM_APDU_MAX_LEN];
+} TelSimAtrResp_t;
+
+/**
+ *     This sturcture gives information of available optional CPHS SIM files.
+ */
+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
+ */
+/**
+ *
+ *This structure gives CPHS information data.
+ */
+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
+ */
+/**
+ * This struct gives CPHS information numbers data.
+ */
+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; /**< Extensiion1 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
+ */
+/**
+ *
+ * This struct gives CPHS service call offering information.
+ */
+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;
+
+/**
+ *
+ * This struct gives CPHS service call restriction information.
+ */
+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 IncomingCalls When Roaming */
+} TelSimCphsServiceCallRestriction_t;
+
+/**
+ *
+ * This struct gives CPHS service SS  information.
+ */
+typedef struct {
+       int bMultiPartyService; /**< MultiPartyService*/
+       int bClosedUserGroup; /**< ClosedUserGroup*/
+       int bAdviceOfCharge; /**< AdviceOfCharge*/
+       int bPreferentialClosedUserGroup; /**< PreferentialClosedUserGroup*/
+       int bClosedUserGroupOutgoingAccess; /**< ClosedUserGroupOutgoingAccess*/
+} TelSimCphsServiceOtherSupplimentaryService_t;
+
+/**
+ *
+ * This struct gives CPHS service call complete information.
+ */
+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;
+
+/**
+ *
+ * This struct gives CPHS service teleservices  information.
+ */
+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;
+
+/**
+ *
+ * This struct gives CPHS alternative line service  information.
+ */
+typedef struct {
+       int bAlternativeLineService; /**< Alternative Line Service*/
+} TelSimCphsServiceCphsTeleservices_t;
+
+/**
+ *
+ * This struct gives CPHS string service table information.
+ */
+typedef struct {
+       int bStringServiceTable; /**< String Service Table*/
+} TelSimCphsServiceCphsFeatures_t;
+
+/**
+ *
+ * This struct gives CPHS service number identifier  information.
+ */
+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;
+
+/**
+ *
+ * This struct gives CPHS service phase services information.
+ */
+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;
+
+/**
+ *
+ * This struct gives CPHS value added service   information.
+ */
+typedef struct {
+       int bRestrictMenuForManualSelection; /**< RestrictMenu For ManualSelection*/
+       int bRestrictMenuForVoiceMail; /**< RestrictMenu For VoiceMail*/
+       int bRestrictMenuForMoSmsAndPaging; /**< RestrictMenu For MoSmsAndPaging*/
+       int bRestrictMenuForMoSmsWithEmialType; /**< RestrictMenu For MoSmsWithEmialType*/
+       int bRestrictMenuForFaxCalls; /**< RestrictMenu For FaxCalls*/
+       int bRestrictMenuForDataCalls; /**< RestrictMenu For DataCalls*/
+       int bRestrictMenuForChangeLanguage; /**< RestrictMenu For ChangeLanguage*/
+} TelSimCphsServiceValueAddedServices_t;
+
+/**
+ *
+ * This struct gives CPHS service information number data.
+ */
+typedef struct {
+       int bInformationNumbers; /**< Information Numbers*/
+} TelSimCphsServiceInformationNumbers_t;
+
+/**
+ *
+ * This struct gives CPHS service profile entry  information.
+ */
+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;
+
+/**
+ *
+ * This struct gives CPHS service profile information.
+ */
+typedef struct {
+       TelSimCphsCustomerServiceProfileEntry_t ServiceProfileEntry[TAPI_SIM_CPHS_CUSTOMER_SERVICE_PROFILE_ENTRY_COUNT_MAX]; /**< service profile entry*/
+} TelSimCphsCustomerServiceProfileInfo_t;
+
+/**
+ *
+ * This struct gives dynamics flag selected line  information.
+ */
+typedef struct {
+       TelSimDynamicFlagsSelectedLineId_t DynamicFlags; /**< Dynamic flags information */
+} TelSimDynamicFlagsInfo_t;
+
+/**
+ *
+ * This struct gives dynamics flag selected line  information.
+ */
+typedef struct {
+       TelSimDynamic2FlagAlsStatus_t Dynamic2Flag; /**< Dynamic flags status */
+} TelSimDynamic2FlagsInfo_t;
+
+
+/**
+ * This data structure gives the phone book availability of current SIM.
+ */
+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;
+
+typedef struct {
+       TelSimPbType_t phonebook_type;
+       unsigned short index;
+       unsigned short next_index; //this field is not used in add/update case
+
+       unsigned char name[255+1];
+       TelSimTextEncrypt_t dcs;
+
+       unsigned char number[255+1];
+       TelSimTypeOfNum_t ton;
+
+       /* following field is valid in only USIM*/
+       unsigned char sne[255+1];
+       TelSimTextEncrypt_t sne_dcs;
+       unsigned char anr1[255+1];
+       TelSimTypeOfNum_t anr1_ton;
+       unsigned char anr2[255+1];
+       TelSimTypeOfNum_t anr2_ton;
+       unsigned char anr3[255+1];
+       TelSimTypeOfNum_t anr3_ton;
+
+       unsigned char email1[255+1];
+       unsigned char email2[255+1];
+       unsigned char email3[255+1];
+       unsigned char email4[255+1];
+
+       unsigned short group_index; //GRP
+       unsigned short pb_control; //PBC
+} TelSimPbRecord_t;
+
+/**
+ *     This data structure defines the phone book storage count information.
+ */
+typedef struct {
+       TelSimPbType_t StorageFileType; /**< Storage  file type */
+       unsigned short TotalRecordCount; /**< Total record count */
+       unsigned short UsedRecordCount; /**< Used record count */
+} TelSimPbStorageInfo_t;
+
+/**
+ * This data structure gives the phone book entry information.
+ */
+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 maximum length */
+       unsigned short PbTextLenMax; /**< Text maximum length */
+} TelSimPbEntryInfo_t;
+
+/**
+ *
+ This structure gives 3G phone book capability information.
+ */
+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;
+
+/**
+ *
+ * This data structure defines the data for the SIM PHONEBOOK & ITS CAPABILITIES information.
+ * It refers to EF_PBR
+ */
+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 */
+/**
+ * This struct gives the SAP ATR response data information.
+ */
+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 */
+
+/**
+ * This data structure gives the SAP APDU data information.
+ */
+typedef struct {
+       int apdu_len; /**<  SAP APDU length */
+       unsigned char apdu_data[TAPI_SIM_APDU_MAX_LEN]; /**<  SAP APDU data */
+} TelSapApduData_t;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _TELSIM_H_
+/**
+ * @}
+ */
diff --git a/include/TelSms.h b/include/TelSms.h
new file mode 100644 (file)
index 0000000..357cdf9
--- /dev/null
@@ -0,0 +1,828 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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.
+ */
+
+/**
+* @open
+* @ingroup             TelephonyAPI
+* @addtogroup  NetText_TAPI    NetText(SMS)
+* @{
+*
+* @file TelNetText.h
+
+     @brief This file serves as a "C" header file defines structures for Tapi Network Text Services. \n
+      It contains a sample set of constants, enums, structs that would be required by applications.
+
+ */
+#ifndef _TEL_NETTEXT_H_
+#define _TEL_NETTEXT_H_
+
+#include <TelSim.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/* NetText */
+/** EF-SMSP digit length */
+#define TAPI_SIM_SMSP_ADDRESS_LEN              20
+/** EF-SMSP alpha id length */
+#define TAPI_SIM_SMSP_ALPHA_ID_LEN_MAX         128
+
+#define TAPI_NETTEXT_MSG_SIZE_MAX              918 /**< Maximum Message Size */
+#define TAPI_NETTEXT_CB_SIZE_MAX                       93 /** Maximum CB Message Size */
+#define TAPI_NETTEXT_ETWS_SIZE_MAX                     56 /** Maximum ETWS Message Size */
+#define TAPI_NETTEXT_ADDRESS_LEN_MAX   20 /* Nettext Address Length */
+#define TAPI_NETTEXT_SCADDRESS_LEN_MAX 18 /* SC Address Length */
+
+#define TAPI_NETTEXT_CB_PAGE_SIZE_MAX                           9    /**< CB maximum page size*/
+#define TAPI_NETTEXT_GSM_SMS_MSG_NUM_MAX             255    /**< Maximum GSM SMS message number*/
+#define TAPI_NETTEXT_GSM_SMS_CBMI_LIST_SIZE_MAX      50    /**< Maximum GSM SMS CBMI list size*/
+#define TAPI_NETTEXT_SMDATA_SIZE_MAX                           165  /**< Maximum SMS data size that can be stored*/
+#define TAPI_NETTEXT_MAX_SMS_SERVICE_CENTER_ADDR   12    /**<Maximum SMS service center address*/
+#define TAPI_NETTEXT_MAX_INDEX                                        255 /**< Maximum index value for SMS */
+
+#define TAPI_NETTEXT_SMSP_PARAMS_MAX_LEN               28
+
+// ************************  CDMA Features  **************************//
+#define TAPI_NETTEXT_PARAM_TELESERVICE_MASK                    1 << 0                          /**< Teleservice parameter bit position */
+#define TAPI_NETTEXT_PARAM_SERVICE_CATEGORY_MASK               1 << 1                          /**< Service Category parameter bit position */
+#define TAPI_NETTEXT_PARAM_ADDRESS_MASK                                1 << 2                          /**< Address parameter bit position */
+#define TAPI_NETTEXT_PARAM_SUBADDRESS_MASK                     1 << 3                          /**< Subaddress parameter bit position */
+#define TAPI_NETTEXT_PARAM_BEARER_REPLY_MASK                   1 << 4                          /**< Bearer reply parameter bit position */
+#define TAPI_NETTEXT_PARAM_CAUSE_CODES_MASK                    1 << 5                          /**< Cause Code parameter bit position */
+#define TAPI_NETTEXT_PARAM_MESSAGE_ID_MASK                     1 << 6                          /**< Message ID parameter bit position */
+#define TAPI_NETTEXT_PARAM_USER_DATA_MASK                      1 << 7                          /**< User Data parameter bit position */
+#define TAPI_NETTEXT_PARAM_USER_RESPONSE_CODE_MASK             1 << 8                          /**< User Response Code parameter bit position */
+#define TAPI_NETTEXT_PARAM_MC_TIME_STAMP_MASK                  1 << 9                          /**< Message Center Timestamp parameter bit position */
+#define TAPI_NETTEXT_PARAM_VALIDITY_PERIOD_ABS_MASK            1 << 10                         /**< Valid period Absolute parameter bit position */
+#define TAPI_NETTEXT_PARAM_VALIDITY_PERIOD_REL_MASK                    1 << 11                         /**< Valid period Relative parameter bit position */
+#define TAPI_NETTEXT_PARAM_DEFERRED_DELIVERY_ABS_MASK          1 << 12                         /**< Deferred delivery absolute parameter bit position */
+#define TAPI_NETTEXT_PARAM_DEFERRED_DELIVERY_REL_MASK          1 << 13                         /**< Deferred delivery relative parameter bit position */
+#define TAPI_NETTEXT_PARAM_PRIORITY_MASK                               1 << 14                         /**< Priority parameter bit position */
+#define TAPI_NETTEXT_PARAM_PRIVACY_MASK                                1 << 15                         /**< Privacy parameter bit position */
+#define TAPI_NETTEXT_PARAM_REPLY_OPTION_MASK                   1 << 16                         /**< Reply Option parameter bit position */
+#define TAPI_NETTEXT_PARAM_NUMBER_OF_MESSAGE_MASK              1 << 17                         /**< Number of message parameter bit position */
+#define TAPI_NETTEXT_PARAM_ALERT_ON_DELIVERY_MASK                      1 << 18                         /**< Alert on delivery parameter bit position */
+#define TAPI_NETTEXT_PARAM_LANGUAGE_MASK                       1 << 19                         /**< Language parameter bit position */
+#define TAPI_NETTEXT_PARAM_CALLBACK_MASK                               1 << 20                         /**< Callback Number parameter bit position */
+#define TAPI_NETTEXT_PARAM_DISPLAY_MODE_MASK                   1 << 21                         /**< Display mode parameter bit position */
+#define TAPI_NETTEXT_PARAM_MULTI_ENCODING_USER_DATA_MASK       1 << 22                         /**< Multi Encoding user data parameter bit position */
+
+#define TAPI_NETTEXT_MAXLENGTH_SMS_MT_USER_DATA                                160                                     /**< Maximum MT user data  size*/
+#define TAPI_NETTEXT_MAXLENGTH_SMS_MO_USER_DATA                                160                                     /**< Maximum MO user data  size*/
+
+#define TAPI_NETTEXT_MAXLENGTH_SMS_ADDRESS                                             32                                      /**< MAX sms destination(or origination ) address /call back number */
+
+#define TAPI_NETTEXT_ERR_CLASS0_STATUS_SEND_OK                                                         0       /**< send success */
+#define TAPI_NETTEXT_ERR_CLASS23_ADDRESS_VACANT                                                                0       /**< address vacant */
+#define TAPI_NETTEXT_ERR_CLASS23_ADDRESS_TRANSLATION_FAILURE                                   1       /**< address translation failure */
+#define TAPI_NETTEXT_ERR_CLASS23_NETWORK_RESOURCE_SHORTAGE                                     2       /**< network resource shortage */
+#define TAPI_NETTEXT_ERR_CLASS23_NETWORK_FAILURE                                                               3       /**< network failure */
+#define TAPI_NETTEXT_ERR_CLASS23_INVALID_TELESERVICE_ID                                                        4       /**< invalid teleservice id */
+#define TAPI_NETTEXT_ERR_CLASS23_OTHER_NETWORK_PROBLEM                                         5       /**< other network problem */
+#define TAPI_NETTEXT_ERR_CLASS23_OTHER_NETWORK_PROBLEM_MORE_FIRST                      6       /**< other network problem more first */
+#define TAPI_NETTEXT_ERR_CLASS23_OTHER_NETWORK_PROBLEM_MORE_LAST                       31      /**< other network problem more last */
+#define TAPI_NETTEXT_ERR_CLASS23_NO_PAGE_RESPONSE                                                              32      /**< no page response */
+#define TAPI_NETTEXT_ERR_CLASS23_DESTINATION_BUSY                                                              33      /**< destination busy */
+#define TAPI_NETTEXT_ERR_CLASS23_NO_ACK                                                                                        34      /**< no ack */
+#define TAPI_NETTEXT_ERR_CLASS23_DESTINATION_RESOURCE_SHORTAGE                         35      /**< destination resource shortage */
+#define TAPI_NETTEXT_ERR_CLASS23_SMS_DELIVERY_POSTPONED                                                36      /**< sms delivery postponed */
+#define TAPI_NETTEXT_ERR_CLASS23_DESTINATION_OUT_OF_SERVICE                                    37      /**< destination out of service */
+#define TAPI_NETTEXT_ERR_CLASS23_DESTINATION_NO_LONGER_AT_THIS_ADDRESS         38      /**< destination no longer at this address */
+#define TAPI_NETTEXT_ERR_CLASS23_OTHER_TERMINAL_PROBLEM                                                39      /**< other terminal problem */
+#define TAPI_NETTEXT_ERR_CLASS23_OTHER_TERMINAL_PROBLEM_MORE_FIRST                     40      /**< other terminal problem more first */
+#define TAPI_NETTEXT_ERR_CLASS23_OTHER_TERMINAL_PROBLEM_MORE_LAST                      47      /**< other terminal problem more last */
+#define TAPI_NETTEXT_ERR_CLASS23_SMS_DELIVERY_POSTPONED_MORE_FIRST                     48      /**< sms delivery postpone more first */
+#define TAPI_NETTEXT_ERR_CLASS23_SMS_DELIVERY_POSTPONED_MORE_LAST                      63      /**< sms delivery postpone more last */
+#define TAPI_NETTEXT_ERR_CLASS23_RADIO_IF_RESOURCE_SHORTAGE                                    64      /**< radio interface resource shortage */
+#define TAPI_NETTEXT_ERR_CLASS23_RADIO_IF_INCOMPATIBLE                                                 65      /**< radio interface incompatible */
+#define TAPI_NETTEXT_ERR_CLASS23_OTHER_RADIO_IF_PROBLEM                                                66      /**< other radio interface problem */
+#define TAPI_NETTEXT_ERR_CLASS23_OTHER_RADIO_IF_PROBLEM_MORE_FIRST                     67      /**< other radio interface problem more first */
+#define TAPI_NETTEXT_ERR_CLASS23_OTHER_RADIO_IF_PROBLEM_MORE_LAST                      95      /**< other radio interface problem more last */
+#define TAPI_NETTEXT_ERR_CLASS23_UNEXPECTED_PARM_SIZE                                                  96      /**< unexpected parameter size */
+#define TAPI_NETTEXT_ERR_CLASS23_SMS_ORIGINATION_DENIED                                                97      /**< sms origination denied */
+#define TAPI_NETTEXT_ERR_CLASS23_SMS_TERMINATION_DENIED                                                98      /**< sms termination denied */
+#define TAPI_NETTEXT_ERR_CLASS23_SUPPL_SERVICE_NOT_SUPPORTED                                   99      /**< supplementary service not supported */
+#define TAPI_NETTEXT_ERR_CLASS23_SMS_NOT_SUPPORTED                                                             100     /**< sms not supported */
+#define TAPI_NETTEXT_ERR_CLASS23_RESERVED_101                                                                  101     /**< reserved 101 */
+#define TAPI_NETTEXT_ERR_CLASS23_MISSING_EXPECTED_PARM                                         102     /**< missing expected parameter */
+#define TAPI_NETTEXT_ERR_CLASS23_MISSING_MANDATORY_PARM                                                103     /**< missing mandatory parameter value */
+#define TAPI_NETTEXT_ERR_CLASS23_UNRECOGNIZED_PARM_VALUE                                               104     /**< unrecognized parameter value */
+#define TAPI_NETTEXT_ERR_CLASS23_UNEXPECTED_PARM_VALUE                                         105     /**< unexpected parameter value */
+#define TAPI_NETTEXT_ERR_CLASS23_USER_DATA_SIZE_ERROR                                                  106     /**< user data size error */
+#define TAPI_NETTEXT_ERR_CLASS23_OTHER_GENERAL_PROBLEMS                                                107     /**< other general problem */
+#define TAPI_NETTEXT_ERR_CLASS23_OTHER_GENERAL_PROBLEMS_MORE_FIRST                     108     /**< other general problem first */
+#define TAPI_NETTEXT_ERR_CLASS23_OTHER_GENERAL_PROBLEMS_MORE_LAST                      255     /**< other general problem last */
+
+#define TAPI_NETTEXT_ERR_CLASS4_WAITING_FOR_TL_ACK                                                             1       /**< waiting for transport ack */
+#define TAPI_NETTEXT_ERR_CLASS4_OUT_OF_RESOURCES                                                               2       /**< out of resource */
+#define TAPI_NETTEXT_ERR_CLASS4_ACCESS_TOO_LARGE                                                               3       /**< access to large */
+#define TAPI_NETTEXT_ERR_CLASS4_DTC_TOO_LARGE                                                          4       /**< DTC too large */
+#define TAPI_NETTEXT_ERR_CLASS4_DTC_CONNECTED                                                                  5       /**< DTC connected */
+#define TAPI_NETTEXT_ERR_CLASS4_NETWORK_NOT_READY                                                              6       /**< network not ready */
+#define TAPI_NETTEXT_ERR_CLASS4_NO_SVC                                                                                 7       /**< no service */
+#define TAPI_NETTEXT_ERR_CLASS4_PHONE_NOT_READY                                                                8       /**< phone not ready */
+#define TAPI_NETTEXT_ERR_CLASS4_NOT_ALLOWED_IN_AMPS                                                    9       /**< fail to allowed in amps */
+#define TAPI_NETTEXT_ERR_CLASS4_CANNOT_SEND_BROADCAST                                                  10      /**< fail to send broadcast */
+#define TAPI_NETTEXT_ERR_CLASS4_INVALID_TRANSACTION_ID
+// ********************************************************************//
+
+/**
+ * @enum TelSmsMsgStatus_t
+ * This enumeration defines the network text status type.
+ */
+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;
+
+/**
+ * @enum TelSmsMemStatusType
+ * This enumeration defines the memory status type.
+ */
+typedef enum
+{
+       TAPI_NETTEXT_PDA_MEMORY_STATUS_AVAILABLE                = 0x01, /**< PDA Memory Available */
+       TAPI_NETTEXT_PDA_MEMORY_STATUS_FULL                     = 0x02,  /**< PDAMemory is Full */
+       TAPI_NETTEXT_PHONE_MEMORY_STATUS_AVAILABLE      = 0x03, /**< Phone memory Available */
+       TAPI_NETTEXT_PHONE_MEMORY_STATUS_FULL                   = 0x04, /**< phone memory is full */
+}TelSmsMemStatusType;
+
+/**
+ * @enum TelSmsBearerType_t
+ * This enum defines the different bearer types
+ */
+typedef enum
+{
+       TAPI_NETTEXT_BEARER_PS_ONLY = 0x01,       /**< Send SMS only on PS Bearer */
+       TAPI_NETTEXT_BEARER_CS_ONLY,                  /**< Send SMS only on CS Bearer */
+       TAPI_NETTEXT_BEARER_PS_PREFERRED,        /**<Send SMS preferably on PS Bearer*/
+       TAPI_NETTEXT_BEARER_CS_PREFERRED ,       /**<Send SMS preferably on CS Bearer*/
+       TAPI_NETTEXT_NO_PREFERRED_BEARER         /**<SMS is sent based on default preferred bearer set at OEM based on vendor/operator preference*/
+} TelSmsBearerType_t;
+
+
+/**
+* @enum TelSmsCbMsgType_t
+* This enumeration defines the different CB message types.
+*/
+typedef enum
+{
+               TAPI_NETTEXT_CB_MSG_GSM = 1,            /**< GSM Cell broadcast message */
+               TAPI_NETTEXT_CB_MSG_UMTS                        /**< UMTSCell broadcast message */
+} TelSmsCbMsgType_t;
+
+/**
+* @enum TelSmsEtwsMsgType_t
+* This enumeration defines the different ETWS message types.
+*/
+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  */
+} TelSmsEtwsMsgType_t;
+
+/**
+ * @enum TelSmsResponse_t
+ * This enum defines the different response types that come in the
+ * sent status acknowledgement/notification after sending a message to the network
+ */
+typedef enum
+{
+       TAPI_NETTEXT_SENDSMS_SUCCESS = 0x00,     /**<Message send success*/
+       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 a operation already done*/
+       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 happened*/
+       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;
+
+ /** @enum  TelSmsCause_t
+ * This enum defines the different cause types that come in the
+ * sent status acknowledgement/notification after sending a message to the network
+ */
+
+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 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 allocation of memory for SMS operation.*/
+  TAPI_NETTEXT_OPERATION_NOT_SUPPORTED      /**< operation not allowed/supported*/
+}  TelSmsCause_t;
+
+/**
+ * @enum TelSmsSetResponse
+ * This defines the response values
+ */
+typedef enum
+{
+       TAPI_NETTEXT_CBSETCONFIG_RSP,     /**<  cellbroadcast 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;
+
+// ************************  CDMA Features  **************************//
+ /** @enum  TelSmsIs637AlertPriority_t
+ * This enum defines the type of alerts used to distinguish different priorities
+ * of the message
+ */
+typedef enum{
+  TAPI_NETTEXT_ALERT_PRIORITY_DEFAULT = 0,     /**< Mobile default alert */
+  TAPI_NETTEXT_ALERT_PRIORITY_LOW,                     /**< Low priority alert */
+  TAPI_NETTEXT_ALERT_PRIORITY_MEDIUM,          /**< Medium priority alert */
+  TAPI_NETTEXT_ALERT_PRIORITY_HIGH,                    /**< High priority alert */
+} TelSmsIs637AlertPriority_t;
+
+ /** @enum  TelSmsIs637Privacy_t
+ * This enum defines the desired privacy level of the message
+ */
+typedef enum{
+  TAPI_NETTEXT_PRIVACY_NOT_RESTRICTED = 0,     /**< Not restricted */
+  TAPI_NETTEXT_PRIVACY_RESTRICTED,                     /**< Restricted */
+  TAPI_NETTEXT_PRIVACY_CONFIDENTIAL,                   /**< Confidential */
+  TAPI_NETTEXT_PRIVACY_SECRET,                         /**< Secret */
+} TelSmsIs637Privacy_t;
+
+ /** @enum  TelSmsIs637Priority_t
+ * This enum defines the priority level of the message
+ */
+typedef enum{
+  TAPI_NETTEXT_PRIORITY_NORMAL = 0,                    /**< Normal */
+  TAPI_NETTEXT_PRIORITY_INTERACTIVE,                   /**< Interactive */
+  TAPI_NETTEXT_PRIORITY_URGENT,                                /**< Urgent */
+  TAPI_NETTEXT_PRIORITY_EMERGENCY,                     /**< Emergency */
+} TelSmsIs637Priority_t;
+
+ /** @enum  TelSmsIs637LangIndicator_t
+ * This enum defines the language of the message so that the receiving mobile station can
+ * discard those messages that are not in the user's preferred language
+ */
+typedef enum{
+  TAPI_NETTEXT_LANG_UNKNOWN = 0x0,                     /**< Unknown or unspecified */
+  TAPI_NETTEXT_LANG_ENGLISH,                                   /**< English */
+  TAPI_NETTEXT_LANG_FRENCH,                                    /**< French */
+  TAPI_NETTEXT_LANG_SPANISH,                                   /**< Spanish */
+  TAPI_NETTEXT_LANG_JAPANESE,                                  /**< Japanese */
+  TAPI_NETTEXT_LANG_KOREAN,                                    /**< Korean */
+  TAPI_NETTEXT_LANG_CHINESE,                                   /**< Chinese */
+  TAPI_NETTEXT_LANG_HEBREW,                                    /**< Hebrew */
+} TelSmsIs637LangIndicator_t;
+
+ /** @enum  TelSmsIs637MsgDisplayMode_t
+ * This enum defines the display mode to the mobile station when to display the received message
+ */
+typedef enum{
+  TAPI_NETTEXT_MSG_DISPLAY_IMMEDIATE = 0x0,    /**< The mobile station is to display the received message as soon as possible */
+  TAPI_NETTEXT_MSG_DISPLAY_DEFAULT,                    /**< he mobile station is to display the received message based on a pre-defined mode in the mobile station. */
+  TAPI_NETTEXT_MSG_DISPLAY_USER_INVOKE = 0x3, /**< The mobile station is to display the received message based on the mode selected by the user. */
+  TAPI_NETTEXT_MSG_DISPLAY_RESERVED,                   /**< Reserved */
+} TelSmsIs637MsgDisplayMode_t;
+
+ /** @enum  TelSmsIs637ErrorClass_t
+ * This enum defines the error report class
+ */
+typedef enum{
+  TAPI_NETTEXT_MSG_ERROR_CLASS_NONE = 0x0,                                     /**< None error(for SMS ack) */
+  TAPI_NETTEXT_MSG_ERROR_CLASS_TEMPORARY_ERROR = 0x2,          /**< Temporary error(for SMS ack) */
+  TAPI_NETTEXT_MSG_ERROR_CLASS_PERMANENT_ERROR = 0x3,          /**< Permanent error(for SMS ack) */
+  TAPI_NETTEXT_MSG_ERROR_CLASS_PHONE_INTERNAL_ERROR = 0x4,     /**< Phone Internal Status (for Send status) */
+} TelSmsIs637ErrorClass_t;
+
+ /** @enum  TelSmsBroadCastCategory_t
+ * This enum defines the Broadcast Service Category
+ */
+typedef enum{
+  TAPI_NETTEXT_CATEGORY_UNKNOWN                        = 0x00,                 /**< Unknown category */
+  TAPI_NETTEXT_CATEGORY_EMERGENCY                      = 0x01,                 /**< Emergency category */
+  TAPI_NETTEXT_CATEGORY_ADMIN                          = 0x02,                 /**< Admin category */
+  TAPI_NETTEXT_CATEGORY_MAINTENANCE            = 0x03,                 /**< Maintenance category */
+  TAPI_NETTEXT_CATEGORY_GEN_NEWS_LOC           = 0x04,                 /**< General News(Local) category */
+  TAPI_NETTEXT_CATEGORY_GEN_NEWS_REG           = 0x05,                 /**< General News(Regional) category */
+  TAPI_NETTEXT_CATEGORY_GEN_NEWS_NAT           = 0x06,                 /**< General News(National) category */
+  TAPI_NETTEXT_CATEGORY_GEN_NEWS_INT           = 0x07,                 /**< General News(International) category */
+  TAPI_NETTEXT_CATEGORY_FIN_NEWS_LOC           = 0x08,                 /**< Business/Financial News(Local) category */
+  TAPI_NETTEXT_CATEGORY_FIN_NEWS_REG           = 0x09,                 /**< Business/Financial News(Regional) category */
+  TAPI_NETTEXT_CATEGORY_FIN_NEWS_NAT           = 0x0A,                 /**< Business/Financial News(National) category */
+  TAPI_NETTEXT_CATEGORY_FIN_NEWS_INT           = 0x0B,                 /**< Business/Financial News(International) category */
+  TAPI_NETTEXT_CATEGORY_SPT_NEWS_LOC           = 0x0C,                 /**< Sports News(Local) category */
+  TAPI_NETTEXT_CATEGORY_SPT_NEWS_REG           = 0x0D,                 /**< Sports News(Regional) category */
+  TAPI_NETTEXT_CATEGORY_SPT_NEWS_NAT           = 0x0E,                 /**< Sports News(National) category */
+  TAPI_NETTEXT_CATEGORY_SPT_NEWS_INT           = 0x0F,                 /**< Sports News(International) category */
+  TAPI_NETTEXT_CATEGORY_ENT_NEWS_LOC           = 0x10,                 /**< Entertainment News(Local) category */
+  TAPI_NETTEXT_CATEGORY_ENT_NEWS_REG           = 0x11,                 /**< Entertainment News(Regional) category */
+  TAPI_NETTEXT_CATEGORY_ENT_NEWS_NAT           = 0x12,                 /**< Entertainment News(National) category */
+  TAPI_NETTEXT_CATEGORY_ENT_NEWS_INT           = 0x13,                 /**< Entertainment News(International) category */
+  TAPI_NETTEXT_CATEGORY_LOC_WEATHER            = 0x14,                 /**< Local Weather category */
+  TAPI_NETTEXT_CATEGORY_AREA_TRAFFIC           = 0x15,                 /**< Area Traffic Reports category */
+  TAPI_NETTEXT_CATEGORY_AIRPORT_SCHED          = 0x16,                 /**< Local Airport Flight Schedules category */
+  TAPI_NETTEXT_CATEGORY_RESTAURANTS            = 0x17,                 /**< Restaurants category */
+  TAPI_NETTEXT_CATEGORY_LODGINGS                       = 0x18,                 /**< Lodgings category */
+  TAPI_NETTEXT_CATEGORY_RETAILS                        = 0x19,                 /**< Retail Directory category */
+  TAPI_NETTEXT_CATEGORY_ADS                            = 0x1A,                 /**< Advertisements category */
+  TAPI_NETTEXT_CATEGORY_STOCK_QUOTES           = 0x1B,                 /**< Stock Quotes category */
+  TAPI_NETTEXT_CATEGORY_JOBS                           = 0x1C,                 /**< Employment Opportunities category */
+  TAPI_NETTEXT_CATEGORY_MEDICAL                        = 0x1D,                 /**< Medical/Health/Hospitals category */
+  TAPI_NETTEXT_CATEGORY_TECH_NEWS                      = 0x1E,                 /**< Technology News category */
+  TAPI_NETTEXT_CATEGORY_MULTI                          =  0x1F,                        /**< Multi-category */
+} TelSmsBroadCastCategory_t;
+
+/** @enum  TelSmsMsgType_t
+ * This enum defines the type of IS637 message
+ */
+typedef enum{
+  TAPI_NETTEXT_MESSAGETYPE_DELIVER = 0x01,                                     /**< sms deliver message  */
+  TAPI_NETTEXT_MESSAGETYPE_SUBMIT = 0x02,                                      /**< sms submit message  */
+  TAPI_NETTEXT_MESSAGETYPE_CANCEL = 0x03,                                      /**< sms cancellation message  */
+  TAPI_NETTEXT_MESSAGETYPE_DELIVERY_ACK = 0x04,                                /**< sms delivery acknowledgment message  */
+  TAPI_NETTEXT_MESSAGETYPE_USER_ACK = 0x05,                                    /**< sms user acknowledgment message  */
+} TelSmsMsgType_t;
+
+/** @enum  TelSmsIs637DigitMode_t
+ * This enum defines the type of address whether it is 4-bit mode or 8-bit mode
+ */
+typedef enum{
+  TAPI_NETTEXT_DIGITMODE_4BITDTMF      = 0x00,                                 /**< 4-bit mode  */
+  TAPI_NETTEXT_DIGITMODE_8BITCODE      = 0x01,                                 /**< 8-bit mode  */
+} TelSmsIs637DigitMode_t;
+
+/** @enum  TelSmsIs637NumberMode_t
+ * This enum defines the mode of address number to indicate whether the address type is as defined in ANSI TI.607 or is a data network address
+ */
+typedef enum{
+  TAPI_NETTEXT_NUMMODE_NONE_DATANETWORK =      0x00,           /**< in ANSI TI.607 */
+  TAPI_NETTEXT_NUMMODE_DATANETWORK = 0x01,                                     /**< in Data Network */
+} TelSmsIs637NumberMode_t;
+
+/** @enum  TelSmsIs637NumberType_t
+ * This enum defines the type of address
+ */
+typedef enum{
+  TAPI_NETTEXT_NUMBER_TYPE_UNKNOWN          = 0x00,                            /**<  Unknown */
+  TAPI_NETTEXT_NUMBER_TYPE_INTERNATIONAL    = 0x01,                    /**<  International number*/
+  TAPI_NETTEXT_NUMBER_TYPE_NATIONAL         = 0x02,                            /**<  National number */
+  TAPI_NETTEXT_NUMBER_TYPE_NETWORK          = 0x03,                            /**<  Abbreviated number */
+  TAPI_NETTEXT_NUMBER_TYPE_SUBSCRIBER       = 0x04,                    /**< Abbreviated number */
+  TAPI_NETTEXT_NUMBER_TYPE_RESERVED_5       = 0x05,                    /**<  Reserved */
+  TAPI_NETTEXT_NUMBER_TYPE_ABBREVIATED       = 0x06,                   /**<  Abbreviated number */
+  TAPI_NETTEXT_NUMBER_TYPE_RESERVED_7       = 0x07,                    /**<  Reserved */
+  TAPI_NETTEXT_NUMBER_TYPE_IP                      = 0x11,                     /**<  Internet Protocol(RFC 791) */
+  TAPI_NETTEXT_NUMBER_TYPE_EMAILADDR       = 0x12,                     /**<  Internet Email Address(RFC 822) */
+} TelSmsIs637NumberType_t;
+
+/** @enum  TelSmsIs637NumberPlan_t
+ * This enum defines the plan of address
+ */
+typedef enum{
+  TAPI_NETTEXT_NUMBER_PLAN_UNKNOWN                         = 0x00,             /**<  Unknown */
+  TAPI_NETTEXT_NUMBER_PLAN_TELEPHONY               = 0x01,             /**< ISDN/Telephony numbering plan */
+  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_2              = 0x02,             /**<  Reserved */
+  TAPI_NETTEXT_NUMBER_PLAN_DATA                                = 0x03,                 /**< Data numbering plan */
+  TAPI_NETTEXT_NUMBER_PLAN_TELEX                             = 0x04,           /**< CTelex numbering plan */
+  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_5              = 0x05,             /**<  Reserved */
+  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_6              = 0x06,             /**<  Reserved */
+  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_7              = 0x07,             /**<  Reserved */
+  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_8              = 0x08,             /**<  Reserved */
+  TAPI_NETTEXT_NUMBER_PLAN_PRIVATE                         = 0x09,             /**<  Private numbering plan */
+  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_10           = 0x0A,                       /**<  Reserved */
+  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_11           = 0x0B,                       /**<  Reserved */
+  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_12           = 0x0C,                       /**<  Reserved */
+  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_13           = 0x0D,                       /**<  Reserved */
+  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_14           = 0x0E,                       /**<  Reserved */
+  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_15           = 0x0F,                       /**<  Reserved */
+} TelSmsIs637NumberPlan_t;
+
+/** @enum  TelSmsIs637SubAddressType_t
+ * This enum defines the plan of address
+ */
+typedef enum{
+  TAPI_NETTEXT_SUBADDR_NSAP                                      = 0x00,       /**< NSAP ( CCITT Recommendation X.213 or ISO 8348 AD2 ) */
+  TAPI_NETTEXT_SUBADDR_USER_SPECIFIED              = 0x01,     /**<  User-specified */
+} TelSmsIs637SubAddressType_t;
+
+/**
+ * @enum telephony_sms_3gpp_type
+ * This defines the type of 3gpp
+ */
+typedef enum  {
+       TAPI_NETTEXT_NETTYPE_3GPP = 0x01,                                               /**< 3gpp type */
+       TAPI_NETTEXT_NETTYPE_3GPP2 = 0x02,                                      /**< 3gpp2 type (CDMA) */
+} TelSms3gppType_t;
+
+// ********************************************************************//
+
+/**
+ * This structure defines the different parameters of  CB configuration
+ */
+typedef struct {
+ unsigned short FromMsgId; /**< Starting point of the range of CBS message ID */
+ unsigned short ToMsgId; /**< Ending point of the range of 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 cb_enabled is true then cell broadcast service will be enabled and underlying modem will enable CB Channel to receiving CB messages. Otherwise CB service will be disabled, 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_GSM_SMS_CBMI_LIST_SIZE_MAX]; /**< Range of CB message ID information */
+} TelSmsCbConfig_t;
+
+/**
+ * This structure defines the properties of a dialing number
+ * Type of Number, Numbering Plan Indicator, length and the actual number.
+ */
+typedef struct {
+       unsigned int DialNumLen; /**< length of address. If 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 Address not set, then set to 0xFF */
+} TelSmsAddressInfo_t;
+
+/**
+ * This structure defines different fields involved in setting the parameters of
+ * a particular sms in EFsmsp.
+ */
+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 0.If the parameter is absent then it is set as 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;
+
+/**
+ * This structure defines the fields related to an Sms like SIM index, TPDU  and length
+ */
+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 */
+} TelSmsDatapackageInfo_t;
+
+/**
+ *This structure defines the data Related to SimIndex,MessageStatus and SMS Data Stored.
+ */
+typedef struct {
+       int SimIndex; /**< Index where SMS is stored. */
+       TelSmsMsgStatus_t MsgStatus; /**< Message status.*/
+       TelSmsDatapackageInfo_t SmsData; /**<SMS message */
+} TelSmsData_t;
+
+/**
+ * This structure defines the different parameters that are related to the message count
+ *in a particular memory(Phone/SIM)
+ */
+typedef struct {
+       unsigned int TotalCount; /**< Total count of messages stored in SIM*/
+       int UsedCount; /**< Stored message count in SIM in SIM*/
+       int IndexList[TAPI_NETTEXT_GSM_SMS_MSG_NUM_MAX]; /**< Message index list stored in SIM. And the maximum size of this array can be of totalCount.This array contains the list of index values in which the messages are stored.i.e. index_list[totalcount] = [2,3] denotes that indexs 2 and 3 are stored(valid) and others not(empty).*/
+} TelSmsStoredMsgCountInfo_t;
+
+/**
+ * This structure defines a cell broadcast message.
+ */
+typedef struct {
+
+       TelSmsCbMsgType_t CbMsgType; /**< Cell Broadcast  message type */
+       unsigned short Length; /**<Size of array szMsgData (which is 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;
+
+/**
+ * This structure defines a ETWS message.
+ */
+typedef struct {
+       TelSmsEtwsMsgType_t EtwsMsgType; /**< Cell Broadcast  message type */
+       unsigned short Length; /**<Size of array szMsgData (which is 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;
+
+// ************************  CDMA Features  **************************//
+/**
+ *  This structure defines cause code as an indication whether an SMS error has occurred and
+ *  if so, whether the condition is considered temporary or permanent
+ **/
+typedef struct {
+       unsigned char ReplySeqNumber; /**< Reply sequence number */
+       TelSmsIs637ErrorClass_t ErrClass; /**< Error report class */
+       unsigned char Cause; /**< Error cause identifier */
+} TelSmsIs637CauseCode_t;
+
+/**
+ * This structure defines the parameters of address and its type
+ */
+typedef struct {
+       TelSmsIs637DigitMode_t Digit; /**< Digit mode indicator (0x00:4bit_dtmf, 0x01:8bit_code) */
+       TelSmsIs637NumberMode_t NumberMode; /**< Number mode indicator (0x00:ANSI TI607, 0x01:Data network) */
+       TelSmsIs637NumberType_t NumberType; /**< Type of number */
+       TelSmsIs637NumberPlan_t NumberPlan; /**< Numbering plan */
+       unsigned char szAddrLength; /**< The number of CHARi */
+       unsigned char szAddress[TAPI_NETTEXT_MAXLENGTH_SMS_ADDRESS]; /**< The address digit or character */
+} TelSmsIs637Address_t;
+
+/**
+ * This structure defines the parameters of subaddress of originator and destination
+ */
+typedef struct {
+       TelSmsIs637SubAddressType_t SubType; /**< Subaddress type */
+       unsigned char Odd; /**< Odd/even indicator */
+       unsigned char szAddrLength; /**< The number of CHARi */
+       unsigned char szAddress[TAPI_NETTEXT_MAXLENGTH_SMS_ADDRESS]; /**< A subaddress octet */
+} TelSmsIs637SubAddress_t;
+
+/**
+ * This structure defines the message center time stamp may be include
+ * with SMS message sent from a message center
+ */
+typedef struct {
+       unsigned int year; /**< Year - if the year is 2002, the year field contains 0x02 */
+       unsigned int month; /**< Month (1 ~ 12) */
+       unsigned int day; /**< Day (1 ~ 31) */
+       unsigned int hours; /**< Hours (0 ~ 23) */
+       unsigned int minutes; /**< Minute (0 ~ 59) */
+       unsigned int seconds; /**< Seconds (0 ~ 59) */
+} TelSmsTimeStamp_t;
+
+/**
+ * The structure defines the parameter of SMS submit message
+ */
+typedef struct {
+       TelSmsIs637Address_t DstAddr; /**< Destination address */
+       TelSmsIs637SubAddress_t DstSubAddr; /**< Destination subaddress */
+       unsigned short TeleService; /**< Teleservice Identifier */
+       int bBearerReplySeqRequest; /**< Bearer reply sequence request */
+       unsigned char ReplySeqNumber; /**< Reply sequence number */
+       unsigned short MsgId; /**< Message identifier */
+       unsigned short MsgEncoding; /**< Message encoding (defined in TSB-58A) */
+       unsigned short MsgLength; /**< Message length */
+       unsigned char szData[TAPI_NETTEXT_MAXLENGTH_SMS_MO_USER_DATA]; /**< SMS user data */
+       TelSmsTimeStamp_t ValidityPeriodAbs; /**< Validity period - Absolute (not supported) */
+       unsigned char ValidityPeriodRel; /**< Validity period - Relative (not supported) */
+       TelSmsTimeStamp_t DeferredDelTimeAbs; /**< Deferred delivery time - Absolute */
+       unsigned char DeferredDelTimeRel; /**< Deferred delivery time - Relative */
+       TelSmsIs637Priority_t Priority; /**< Priority indicator */
+       TelSmsIs637Privacy_t Privacy; /**< Privacy indicator */
+       int bUserAckRequest; /**< User acknowledge request */
+       int bDeliveryAckRequest; /**< Delivery acknowledge request */
+       TelSmsIs637AlertPriority_t AlertPriority; /**< Alert priority of message */
+       TelSmsIs637LangIndicator_t MsgLang; /**< Language indicator */
+       TelSmsIs637Address_t CallBackNumber; /**< Callback number address */
+} TelSmsIs637OutSubmit_t;
+
+/**
+ * The structure defines the parameter of SMS acknowledgement message for submit
+ */
+typedef struct {
+       TelSmsIs637Address_t DstAddr; /**< Destination address */
+       TelSmsIs637SubAddress_t DstSubAddr; /**< Destination subaddress */
+       unsigned short TeleService; /**< Teleservice Identifier */
+       int bBearerReplySeqRequest; /**< Bearer reply sequence request */
+       unsigned char ReplySeqNumber; /**< Reply sequence number */
+       unsigned short MsgId; /**< Message identifier */
+       unsigned short MsgEncoding; /**< Message encoding (defined in TSB-58A) */
+       unsigned short MsgLength; /**< Message length */
+       unsigned char szData[TAPI_NETTEXT_MAXLENGTH_SMS_MO_USER_DATA]; /**< SMS user data */
+       unsigned char UserResponseCode; /**< User response code */
+} TelSmsIs637OutAck_t;
+
+/**
+ * The structure defines the parameter of SMS cancellation message
+ */
+typedef struct {
+       TelSmsIs637Address_t DstAddr; /**< Destination address */
+       TelSmsIs637SubAddress_t DstSubAddr; /**< Destination subaddress */
+       unsigned short TeleService; /**< Teleservice Identifier */
+       int bBearerReplySeqRequest; /**< Bearer reply sequence request */
+       unsigned char ReplySeqNumber; /**< Reply sequence number */
+       unsigned short MsgId; /**< Message identifier */
+} TelSmsIs637OutCancel_t;
+
+/**
+ * The structure defines the parameter of SMS devivery message
+ */
+typedef struct {
+       TelSmsIs637Address_t OrigAddr; /**< Origination address */
+       TelSmsIs637SubAddress_t OrigSubAddr; /**< Origination subaddress */
+       unsigned short TeleService; /**< Teleservice Identifier */
+       int bBearerReplySeqRequest; /**< Bearer reply sequence request */
+       unsigned char ReplySeqNumber; /**< Reply sequence number */
+       unsigned short MsgId; /**< Message identifier */
+       unsigned short MsgEncoding; /**< Message encoding (defined in TSB-58A) */
+       unsigned short MsgLength; /**< Message length */
+       unsigned char szData[TAPI_NETTEXT_MAXLENGTH_SMS_MT_USER_DATA]; /**< SMS user data */
+       TelSmsTimeStamp_t MessageCenterTimeStamp; /**< Message center time stamp */
+       TelSmsTimeStamp_t ValidityPeriodAbs; /**< Validity period - Absolute */
+       unsigned char ValidityPeriodRel; /**< Validity period - Relative */
+       TelSmsTimeStamp_t DeferredDelTimeAbs; /**< Deferred delivery time - Absolute (not supported) */
+       unsigned char DeferredDelTimeRel; /**< Deferred delivery time - Relative (not supported) */
+       TelSmsIs637Priority_t Priority; /**< Priority indicator */
+       TelSmsIs637Privacy_t Privacy; /**< Privacy indicator */
+       unsigned char NumMsg; /**< Number of voice mail (0-99) */
+       int bUserAckRequest; /**< User acknowledge request */
+       int bDeliveryAckRequest; /**< Delivery acknowledge request */
+       TelSmsIs637AlertPriority_t AlertPriorty; /**< Alert priority of message */
+       TelSmsIs637LangIndicator_t MsgLang; /**< Language indicator */
+       TelSmsIs637Address_t CallBackNumer; /**< Callback number address */
+       TelSmsIs637MsgDisplayMode_t Display; /**< Message display mode */
+} TelSmsIs637InDeliver_t;
+
+/**
+ * The structure defines the parameter of SMS acknowledge message for deliver
+ */
+typedef struct {
+       TelSmsIs637Address_t OrigAddr; /**< Origination address */
+       TelSmsIs637SubAddress_t OrigSubAddr; /**< Origination subaddress */
+       unsigned short TeleService; /**< Teleservice Identifier */
+       int bBearerReplySeqRequest; /**< Bearer reply sequence request */
+       unsigned char ReplySeqNumber; /**< Reply sequence number */
+       unsigned short MsgId; /**< Message identifier */
+       unsigned short MsgEncoding; /**< Message encoding (defined in TSB-58A) */
+       unsigned short MsgLength; /**< Message length */
+       unsigned char szData[TAPI_NETTEXT_MAXLENGTH_SMS_MT_USER_DATA]; /**< SMS user data */
+       unsigned char UserResponseCode; /**< User response code */
+       TelSmsTimeStamp_t MessageCenterTimeStamp; /**< Message center time stamp */
+} TelSmsIs637InAck_t;
+
+/**
+ * The structure defines the parameter of SMS acknowledge message from message center
+ */
+typedef struct {
+       TelSmsIs637Address_t OrigAddr; /**< Origination address */
+       TelSmsIs637SubAddress_t OrigSubAddr; /**< Origination subaddress */
+       unsigned short TeleService; /**< Teleservice Identifier */
+       int bBearerReplySeqRequest; /**< Bearer reply sequence request */
+       unsigned char ReplySeqNumber; /**< Reply sequence number */
+       unsigned short MsgId; /**< Message identifier */
+       unsigned short MsgEncoding; /**< Message encoding (defined in TSB-58A) */
+       unsigned short MsgLength; /**< Message length */
+       unsigned char szData[TAPI_NETTEXT_MAXLENGTH_SMS_MT_USER_DATA]; /**< SMS user data */
+       TelSmsTimeStamp_t MessageCenterTimeStamp; /**< Message center time stamp */
+} TelSmsIs637InDeliverAck_t;
+
+/**
+ * The structure defines the parameter of SMS broadcast message
+ */
+typedef struct {
+       TelSmsBroadCastCategory_t ServiceCategory; /**< Broadcast service category */
+       unsigned short MsgId; /**< Message identifier */
+       int bBearerReplySeqRequest; /**< Bearer reply sequence request */
+       unsigned char ReplySeqNumber; /**< Reply sequence number */
+       unsigned short MsgEncoding; /**< Message encoding (defined in TSB-58A) */
+       unsigned short MsgLength; /**< Message length */
+       unsigned char szData[TAPI_NETTEXT_MAXLENGTH_SMS_MT_USER_DATA]; /**< SMS user data */
+       TelSmsTimeStamp_t MessageCenterTimeStamp; /**< Message center time stamp */
+       TelSmsTimeStamp_t ValidityPeriodAbs; /**< Validity period - Absolute */
+       unsigned char ValidityPeriodRel; /**< Validity period - Relative */
+       TelSmsIs637Priority_t Priority; /**< Priority indicator */
+       TelSmsIs637AlertPriority_t AlertPriorty; /**< Alert priority of message */
+       TelSmsIs637LangIndicator_t MsgLang; /**< Language indicator */
+       TelSmsIs637MsgDisplayMode_t Display; /**< Message display mode */
+} TelSmsIs637InBroadCast_t;
+
+/**
+ * The structure defines the type of SMS message as union
+ */
+typedef union {
+       TelSmsIs637OutSubmit_t OutSubmit; /**< Outgoing Submit message */
+       TelSmsIs637OutAck_t OutAck; /**< Outgoing Acknowledge message */
+       TelSmsIs637OutCancel_t OutCancel; /**< Outgoing Cancel message */
+       TelSmsIs637InDeliver_t InDeliver; /**< Incoming Delivery message */
+       TelSmsIs637InAck_t InAck; /**< Incoming Acknowledge message */
+       TelSmsIs637InDeliverAck_t InDeliverAck; /**< Incoming Delivery Acknowledge message */
+       TelSmsIs637InBroadCast_t InBc; /**< Incoming Broadcast message */
+} TelSmsMessage_t;
+
+/**
+ * The structure defines the parameter of entire SMS message of each type
+ */
+typedef struct {
+       int ParamMask; /**< Parameter ID mask */
+       TelSmsMsgType_t MsgType; /**< Message type */
+       TelSmsMessage_t MsgData; /**< Message data */
+} TelSmsMsgInfo_t;
+// ********************************************************************//
+
+struct tel_noti_sms_incomming_msg {
+        char Sca[TAPI_SIM_SMSP_ADDRESS_LEN];
+        int MsgLength;
+        char szData[TAPI_NETTEXT_SMDATA_SIZE_MAX + 1];
+};
+
+struct tel_noti_sms_incomming_cb_msg {
+       TelSmsCbMsgType_t CbMsgType; /**< Cell Broadcast  message type */
+        short Length; /**<Size of array szMsgData (which is 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 szMsgData (which is 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..9fcf8ae
--- /dev/null
@@ -0,0 +1,465 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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.
+ */
+
+/**
+ * @open
+ * @ingroup            TelephonyAPI
+ * @addtogroup  SS_TAPI        SS(Supplementary services)
+ * @{
+ *
+ * @file TelSs.h
+
+ @brief This file serves as a "C" header file and defines structures for Tapi Supplementary Services\n
+ It contains a sample set of constants, enums, structs that would be required by applications.
+ */
+
+#ifndef _TEL_SS_H_
+#define _TEL_SS_H_
+
+#include <TelDefines.h>
+#include <TelErr.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/** maximum length of barring password */
+#define TAPI_SS_GSM_BARR_PW_LEN_MAX                            4 /**<Maximum length of barring password */
+
+/** maximum length of dial digit */
+#define TAPI_CALL_DIALDIGIT_LEN_MAX                            82 /**<maximum length of dial digit *///( To Accommodate Unpacked string length, which will be greater than 182, 182* 8 /7 = 208, Packed len = 182* 7/8 = 160)
+#define TAPI_SS_USSD_DATA_SIZE_MAX                             208      /**<User-to-user data maximum size */
+#define TAPI_SS_RECORD_NUM_MAX                                 5 /**< SS record maximum size */
+#define TAPI_SS_AOC_CURRENCY_LEN_MAX                   3 /**< maximum length of AOC currency */
+
+/* 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
+
+/**
+ *  This enumeration defines the call forwarding flavor.
+ */
+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;
+
+/**
+ * The various types of call barring. Note, only one type of incoming barring and only one type of outgoing barring may be active at any time.
+ */
+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 roam, 
+                                                                       outside of 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;
+
+/**
+ * This enumeration defines the ussd Indication Type
+ */
+typedef enum {
+       TAPI_SS_USSD_STATUS_NOTIFY = 0x00, /**< notify : to display USSD data to 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 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 network */
+} TelSsUssdStatus_t;
+
+/**
+ *
+ * This enum defines the values for USSD type.
+ */
+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;
+
+/**
+ *  This enumeration defines the call barring operation mode .
+ */
+typedef enum {
+       TAPI_SS_CB_MODE_ACTIVATE, /**< Activate call barring  */
+       TAPI_SS_CB_MODE_DEACTIVATE, /**< De Activate call barring */
+} TelSsBarringMode_t;
+
+/**
+ *  This enumeration defines the call barring operation mode .
+ */
+typedef enum {
+       TAPI_SS_CW_MODE_ACTIVATE, /**< Activate call barring  */
+       TAPI_SS_CW_MODE_DEACTIVATE, /**< De Activate call barring */
+} TelSsCallWaitingMode_t;
+
+/**
+ *  This enumeration defines the call type .
+ */
+typedef enum {
+       /* TELESERVICE */
+       TAPI_SS_CLASS_ALL_TELE=0x10,                        /* 0x10 : All Teleservices */
+       TAPI_SS_CLASS_VOICE=0x11,                              /* 0x11 : All Voice ( telephony ) */
+       TAPI_SS_CLASS_ALL_DATA_TELE=0x12,             /* 0x12 : All Data Teleservices */
+       TAPI_SS_CLASS_FAX=0x13,                                /* 0x13 : All 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 teleservice 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 : All 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;
+
+/**
+ *  This enumeration defines the forward mode .
+ */
+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, /**< De-register call forwarding */
+} TelSsForwardMode_t;
+
+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;
+
+/**
+ *  Describes whether a supplementary service request was a success or a failure; and if it failed, why.
+ */
+typedef enum {
+       TAPI_SS_SUCCESS, /**<  SS operation was successful */
+       TAPI_SS_TIMEREXPIRE, /**< SS operation timer expired on network. */
+       TAPI_SS_UNKNOWNSUBSCRIBER, /**< SS error indicating unknown/illegal subscriber.  */
+       TAPI_SS_BEARERSERVICENOTPROVISIONED, /**<The network returns this error when it is requested to  @n
+        perform an operation on a supplementary service  */
+       TAPI_SS_TELESERVICENOTPROVISIONED, /**<The network returns this error when it is requested to perform  @n
+        an operation on a supplementary service  */
+       TAPI_SS_ILLEGALSSOPERATION, /**<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, /**<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, /**< SS not available in network */
+       TAPI_SS_SUBSCRIPTIONVIOLATION, /**< SS service subscription violation. */
+       TAPI_SS_INCOMPATIBILITY, /**< This error is returned by the network when it is requested for a supplementary service operation incompatible with the @n
+        status of another supplementary service or with the teleservice or bearer service for which the operation is requested */
+       TAPI_SS_SYSTEMFAILURE, /**< This error is returned by the network, when it cannot perform an operation because of a failure in the network */
+       TAPI_SS_DATAMISSING, /**< 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, /**< SS error indicating unexpected data value on network side *//**< SS operation barred.  */
+       TAPI_SS_PWREGISTRATIONFAILURE, /**< SS error indicating change password failure. */
+       TAPI_SS_NEGATIVEPWCHECK, /**< SS error indicating negative password check.  */
+       TAPI_SS_FACILITYNOTSUPPORTED, /**< SS service facility not supported  */
+       TAPI_SS_RESOURCESNOTAVAILABLE, /**< SS error indicating resources not available in network.  */
+       TAPI_SS_MAXNOMPTYEXCEEDED, /**< SS error indicating Maximum MPTY is reached.  */
+       TAPI_SS_CALLBARRED, /**< This error is returned by the network to the MS when call independent subscriber control procedures are barred by the operator */
+       TAPI_SS_NUMBEROFPWATTEMPTSVIOLATION, /**< SS error indicating barring password attempts violated.  */
+       TAPI_SS_ABSENTSUBSCRIBER, /**< This error is returned when the subscriber has activated the detach service or the system detects the absence condition */
+       TAPI_SS_ILLEGALSUBSCRIBER, /**<This error is returned when illegality of the access has been @n
+        established by use of authentication procedure. */
+       TAPI_SS_ILLEGALEQUIPMENT, /**<This error is returned when the IMEI check procedure has shown that  @n
+        the IMEI is blacklisted or not whitelisted  */
+       TAPI_SS_USSDBUSY, /**< SS error indicating USSD Busy(Already SS / USSD is ongoing).  */
+       TAPI_SS_UNKNOWNALPHABET, /**< SS error indicating unknown SS data coding of alphabet */
+       TAPI_SS_INVALIDDEFLECTEDTONUMBER, /**< SS error indicating the invalid deflected to number.  */
+       TAPI_SS_DEFLECTIONTOSERVEDSUBSCRIBER, /**< This error is returned if a diversion to the served  @n
+        subscriber's number was requested.  */
+       TAPI_SS_SPECIALSERVICECODE, /**< This error is returned if diversion to a special service code was requested.  */
+       TAPI_SS_REJECTEDBYUSER, /**< SS operation rejected by user.  */
+       TAPI_SS_REJECTEDBYNETWORK, /**< SS operation rejected by network.  */
+       TAPI_SS_NET_NOT_ALLOWED_EMERGENCY_CALLS_ONLY, /**< SS operation is not allowed by network.  */
+       TAPI_SS_UNKNOWNERROR, /**< SS error indicating unknown error  */
+       TAPI_SS_OEM_NOT_SUPPORTED /**< If oem do not support any of SS requests, then this error will be returned back */
+} TelSsCause_t;
+
+/**
+ *   The status of a supplementary service feature (e.g. Call Forwarding or Call Barring). @n
+ *   These enumerated values should be used as masks
+ */
+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;
+
+/**
+ * These are the four types of identity presentation / restriction services.
+ */
+typedef enum {
+       TAPI_CALLING_LINE_IDENTITY_PRESENTATION, /**< 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 */
+       TAPI_CONNECTED_LINE_IDENTITY_RESTRICTION, /**< restrict yourself from being identified by incoming calls, such as forwarded calls */
+       TAPI_CALLED_LINE_IDENTITY_PRESENTATION, /**< Called line identity presentation  */
+       TAPI_CALLING_NAME_PRESENTATION /**< Calling Name Presentation */
+} TelSsLineIdentificationType_t;
+
+/**
+ *  This enumeration defines the cli service status .
+ */
+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;
+
+/**
+ *  This enumeration defines the values for Cli service type .
+ */
+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. */
+       TAPI_SS_CLI_COLR = 0x04, /**<  Connected Line Identification Restriction. */
+       TAPI_SS_CLI_CDIP = 0x05, /**<  Called Line Identification Presentation. */
+       TAPI_SS_CLI_CNAP = 0x06, /**<  Calling Name Presentation.*/
+} TelSsCliType_t;
+
+/**
+ * This enum defines the values for AOC type.
+ */
+typedef enum {
+       TAPI_SS_AOC_TYPE_RESET = 0x00, /**< Specifies the Reset MAXACM Value. */
+       TAPI_SS_AOC_TYPE_ACM = 0x01, /**< Specifies the Accumulated call meter. */
+       TAPI_SS_AOC_TYPE_CCM = 0x02, /**< Specifies the Current call meter. */
+       TAPI_SS_AOC_TYPE_MAXACM = 0x04, /**< Specifies the Max accumulated call meter. */
+       TAPI_SS_AOC_TYPE_PUC = 0x08 /**< Specifies the Price per unit and currency.*/
+} TelSsAocType_t;
+
+/**
+ *  This structure  defines the different parameters related to forward info.
+ */
+typedef struct {
+       TelSsClass_t Class;
+       TelSsForwardMode_t Mode; /**< Forward Mode */
+       TelSsForwardWhen_t Condition; /**< Forward Condition */
+       char szPhoneNumber[TAPI_CALL_DIALDIGIT_LEN_MAX]; /**< Phone Number*/
+       TelSsNoReplyTime_t NoReplyConditionTimer; /**< No reply wait time 5-30 secs in intervals of 5. */
+} TelSsForwardInfo_t;
+
+/**
+ *  This structure defines the values for USSD request type.
+ */
+typedef struct {
+       TelSsUssdType_t Type;
+       int Length; /**< USSD  String Length */
+       char szString[TAPI_SS_USSD_DATA_SIZE_MAX]; /**< USSD  String */
+} TelSsUssdMsgInfo_t;
+
+/**
+ *  This structure  defines the different parameters related to call barring.
+ */
+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 */
+} TelSsBarringInfo_t;
+
+/**
+ *  This structure  defines the different parameters related to call waiting.
+ */
+typedef struct {
+       TelSsClass_t Class; /**< Call type */
+       TelSsCallWaitingMode_t Mode; /**< Waiting mode  */
+} TelSsWaitingInfo_t;
+
+/**
+ * This structure defines the release complete message notification type.
+ */
+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;
+
+/**
+ * This structure defines the values for AOC request type.
+ */
+
+typedef struct {
+       float PPM;
+       unsigned char CharTypeOfCurrency;
+       unsigned char szCurrency[TAPI_SS_AOC_CURRENCY_LEN_MAX];
+} TelAocPucInfo_t;
+
+typedef struct {
+       TelSsAocType_t AocType; /**< Specifies the AOC type. */
+       unsigned int ACM; /**< Specifies the accumulated call meter value. */
+       unsigned int MaxAcm; /**< Specifies the maximum value of ACM . */
+       float CCM; /**< Specifies the Current call meter value. */
+       float PPM; /**< Specifies the Price per unit value. */
+       unsigned char CharTypeOfCurrency; /**< Specifies the Char type of currency. */
+       unsigned char szCurrency[TAPI_SS_AOC_CURRENCY_LEN_MAX]; /**< Specifies the Currency characters. */
+} TelCallAocInfo_t;
+
+/**
+ * This structure defines the values for ss call barring record
+ */
+typedef struct {
+       int record_num;
+       struct {
+               TelSsClass_t Class;
+               TelSsStatus_t Status; /**< SS status  */
+               TelSsBarringType_t Flavour; /**< Call barring types providing various barring conditions on that basis call be barred */
+       } record[TAPI_SS_RECORD_NUM_MAX]; /**< Specifies the  Maximum of TAPI_SS_RECORD_NUM_MAX records. */
+} TelSsBarringResp_t;
+
+/**
+ * This structure defines the values for ss call forwarding record
+ */
+typedef struct {
+       int record_num;
+       struct {
+               TelSsClass_t Class;
+               TelSsStatus_t Status; /**< Call forwarding SS status */
+               TelSsForwardWhen_t ForwardCondition; /**< Call forward types providing various conditions when call can be forwarded */
+               int bCallForwardingNumberPresent; /**< Call forwarding number present or not */
+               unsigned char NoReplyWaitTime;
+               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;
+
+/**
+ * This structure defines the values for ss call waiting record
+ */
+typedef struct {
+       int record_num;
+       struct {
+               TelSsClass_t Class;
+               TelSsStatus_t Status; /**< SS status */
+       } record[TAPI_SS_RECORD_NUM_MAX]; /**< Specifies the  Maximum of TAPI_SS_RECORD_NUM_MAX records. */
+} TelSsWaitingResp_t;
+
+/**
+ * This structure defines the values for Calling line identity service
+ */
+typedef struct {
+       TelSsLineIdentificationType_t Type; /**< Various line identification types */
+       TelSsCliStatus_t Status; /**< Line identification status from network */
+} TelSsCliResp_t;
+
+typedef struct {
+       TelSsUssdType_t Type;
+       TelSsUssdStatus_t Status;
+       int Length; /**< USSD  String Length */
+       char szString[TAPI_SS_USSD_DATA_SIZE_MAX]; /**< USSD  String */
+} TelSsUssdResp_t;
+
+typedef struct {
+       TelSsUssdStatus_t Status;
+       int Length; /**< USSD  String Length */
+       char szString[TAPI_SS_USSD_DATA_SIZE_MAX]; /**< USSD  String */
+} TelSsUssdNoti_t;
+
+typedef struct {
+       float PPM; /**< Specifies the Price per unit value. */
+       unsigned char CharTypeOfCurrency; /**< Specifies the Char type of currency. */
+       unsigned char szCurrency[TAPI_SS_AOC_CURRENCY_LEN_MAX]; /**< Specifies the Currency characters. */
+} TelSsAoc_ppm_info_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _TEL_SS_H_
+/**
+ * @}
+ */
diff --git a/include/tapi_common.h b/include/tapi_common.h
new file mode 100644 (file)
index 0000000..8b2cf34
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2012 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_
+
+#include <stdio.h>
+#include <glib.h>
+
+#include <tapi_type.h>
+#include <tapi_event.h>
+
+__BEGIN_DECLS
+
+
+char**       tel_get_cp_name_list(void);
+
+TapiHandle*  tel_init(const char *cp_name);
+int          tel_deinit(TapiHandle *handle);
+
+int          tel_register_noti_event(TapiHandle *handle, const char *noti_id,
+                 tapi_notification_cb callback, void *user_data);
+int          tel_deregister_noti_event(TapiHandle *handle, const char *noti_id);
+
+int          tel_get_property_int(TapiHandle *h, const char *property, int *result);
+
+__END_DECLS
+
+#endif /* _TAPI_COMMON_H_ */
+
+/**
+ *  @}
+ */
diff --git a/include/tapi_event.h b/include/tapi_event.h
new file mode 100644 (file)
index 0000000..5510fb3
--- /dev/null
@@ -0,0 +1,143 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2012 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
+
+#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_SOUND_PATH                                      DBUS_TELEPHONY_CALL_INTERFACE":CallSoundPath"
+#define TAPI_NOTI_CALL_SOUND_RINGBACK_TONE                     DBUS_TELEPHONY_CALL_INTERFACE":CallSoundRingbackToneControl"
+#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 DBUS_TELEPHONY_MODEM_INTERFACE                         DBUS_TELEPHONY_SERVICE".Modem"
+#define TAPI_NOTI_MODEM_POWER                                          DBUS_TELEPHONY_MODEM_INTERFACE":Power"
+#define TAPI_NOTI_MODEM_DUN_PIN_CTRL                           DBUS_TELEPHONY_MODEM_INTERFACE":DunPinCtrl"
+#define TAPI_NOTI_MODEM_DUN_EXTERNAL_CALL                      DBUS_TELEPHONY_MODEM_INTERFACE":DunExternalCall"
+#define TAPI_PROP_MODEM_POWER                                          DBUS_TELEPHONY_MODEM_INTERFACE":power"
+
+#define DBUS_TELEPHONY_SIM_INTERFACE                           DBUS_TELEPHONY_SERVICE".Sim"
+#define TAPI_NOTI_SIM_STATUS                                           DBUS_TELEPHONY_SIM_INTERFACE":Status"
+
+#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_MO_SMS_CTRL                                      DBUS_TELEPHONY_SAT_INTERFACE":MoSmsCtrl"
+
+#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"
+
+// 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"
+
+// PS
+#define TAPI_NOTI_PS_DUN_PIN_CONTROL "org.tizen.telephony.Ps.PinCtrl"
+
+// SMS
+#define DBUS_TELEPHONY_SMS_INTERFACE   DBUS_TELEPHONY_SERVICE".sms"
+#define TAPI_NOTI_SMS_INCOM_MSG                        DBUS_TELEPHONY_SMS_INTERFACE":IncommingMsg"     /* This is an unsolicited Incoming SMS Event*/
+#define TAPI_NOTI_SMS_CB_INCOM_MSG             DBUS_TELEPHONY_SMS_INTERFACE":IncommingCbMsg"   /* This is an unsolicited Incoming cell broadcast message*/
+#define TAPI_NOTI_SMS_ETWS_INCOM_MSG   DBUS_TELEPHONY_SMS_INTERFACE":IncommingEtwsMsg" /* This is an unsolicited Incoming cell broadcast message*/
+#if 0
+#define TAPI_NOTI_SMS_INCOM_EX_MSG "org.tizen.telephony. "             /* This is an extended unsolicited Incoming SMS Event*/
+#define TAPI_NOTI_SMS_CB_INCOM_EX_MSG "org.tizen.telephony. "  /* This is an extended unsolicited Incoming cell broadcast message*/
+#endif
+#define TAPI_NOTI_SMS_MEMORY_STATUS            DBUS_TELEPHONY_SMS_INTERFACE":MemoryStatus"     /* This event is an unsolicited event indicating SIM memory status */
+#define TAPI_NOTI_SMS_DEVICE_READY             DBUS_TELEPHONY_SMS_INTERFACE":SmsReady" /* Device Ready indication */
+
+// Gps
+#define DBUS_TELEPHONY_GPS_INTERFACE           DBUS_TELEPHONY_SERVICE".Gps"
+#define TAPI_NOTI_GPS_ASSIST_DATA                      DBUS_TELEPHONY_GPS_INTERFACE":AssistData"
+#define TAPI_IND_GPS_MEASURE_POSITION          DBUS_TELEPHONY_GPS_INTERFACE":MeasurePosition"
+#define TAPI_NOTI_GPS_RESET_ASSIST_DATA                DBUS_TELEPHONY_GPS_INTERFACE":ResetAssistData"
+#define TAPI_NOTI_GPS_FREQUENCY_AIDING         DBUS_TELEPHONY_GPS_INTERFACE":FrequencyAiding"
+
+__END_DECLS
+
+#endif /* __TAPI_EVENT_H__ */
diff --git a/include/tapi_sat.h b/include/tapi_sat.h
new file mode 100644 (file)
index 0000000..a34832c
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2012 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_SAT_H_
+#define _TAPI_SAT_H_
+
+#include <tapi_type.h>
+
+__BEGIN_DECLS
+
+int tapi_get_sat_main_menu_info(TapiHandle *handle, TelSatSetupMenuInfo_t* pMainMenu);
+int tapi_send_ui_display_status(TapiHandle *handle, int command_id, TelSatUiDisplayStatusType_t status);
+int tapi_send_sat_ui_user_confirm(TapiHandle *handle, TelSatUiUserConfirmInfo_t * pUserConfirmData);
+int tapi_send_sat_app_exec_result(TapiHandle handle, TelSatAppsRetInfo_t* pAppRetInfo);
+
+int tapi_sat_req_menu_selection(TapiHandle *handle, const TelSatMenuSelectionReqInfo_t *menu_select_data, tapi_response_cb callback, void *user_data);
+int tapi_download_sat_event(TapiHandle *handle, const TelSatEventDownloadReqInfo_t *event_data, tapi_response_cb callback, void *user_data);
+
+__END_DECLS
+
+#endif /* _TAPI_SAT_H_ */
diff --git a/include/tapi_type.h b/include/tapi_type.h
new file mode 100644 (file)
index 0000000..866c6b4
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2012 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__
+
+__BEGIN_DECLS
+
+#define DBUS_TELEPHONY_SERVICE      "org.tizen.telephony"
+#define DBUS_TELEPHONY_DEFAULT_PATH "/org/tizen/telephony"
+
+typedef struct tapi_handle TapiHandle;
+
+typedef void (*tapi_notification_cb)(TapiHandle *handle, const char *noti_id, void *data, void *user_data);
+typedef void (*tapi_response_cb)(TapiHandle *handle, int result, void *data, void *user_data);
+
+__END_DECLS
+
+#endif /* __TAPI_TYPE_H__ */
diff --git a/libslp-tapi.manifest b/libslp-tapi.manifest
new file mode 100644 (file)
index 0000000..573257c
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+  <domain name="_"/>    
+ </request>
+</manifest>
diff --git a/packaging/libslp-tapi.spec b/packaging/libslp-tapi.spec
new file mode 100644 (file)
index 0000000..92a36d0
--- /dev/null
@@ -0,0 +1,63 @@
+#sbs-git:slp/pkgs/l/libslp-tapi libslp-tapi 0.1.1
+Name: libslp-tapi
+Summary: Telephony dbus client library
+Version: 0.6.59
+Release:    1
+Group:      System/Libraries
+License:    Apache
+Source0:    libslp-tapi-%{version}.tar.gz
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(gobject-2.0)
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(security-server)
+
+%description
+Telephony client API library
+
+%package devel
+Summary:    Telephony client API (devel)
+Group:      Development/Libraries
+Requires:   %{name} = %{version}-%{release}
+
+%description devel
+Telephony client API library (devel)
+
+
+%prep
+%setup -q
+
+
+%build
+cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+
+rm -rf %{buildroot}/usr/include/telephony/tapi/.gitignore
+mkdir -p %{buildroot}/usr/share/license
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+
+%files
+%manifest libslp-tapi.manifest
+%defattr(-,root,root,-)
+#%doc COPYING
+%{_libdir}/*.so.*
+#%{_bindir}/tapitest
+/usr/share/license/libslp-tapi
+
+%files devel
+%defattr(-,root,root,-)
+%{_includedir}/telephony-client/*.h
+%{_libdir}/pkgconfig/*.pc
+%{_libdir}/*.so
diff --git a/src/common.h b/src/common.h
new file mode 100644 (file)
index 0000000..ab371bd
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2012 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 <glib-object.h>
+#include <gio/gio.h>
+
+__BEGIN_DECLS
+
+#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_DEINIT(error) \
+       if (error) { \
+               dbg("dbus error = %d (%s)", error->code, error->message); \
+               if (error->code == G_IO_ERROR_CANCELLED) { \
+                       g_error_free(error); \
+                       free(evt_cb_data); \
+                       return; \
+               } \
+       }
+
+struct tapi_handle {
+       gpointer dbus_connection;
+       char *path;
+       char *cp_name;
+       GHashTable *evt_list;
+       char cookie[20];
+       GCancellable *ca;
+};
+
+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;
+};
+
+__END_DECLS
+
+#endif /* _TAPI_COMMON_H_ */
+
+/**
+ *  @}
+ */
diff --git a/src/tapi_call.c b/src/tapi_call.c
new file mode 100644 (file)
index 0000000..d4ba04a
--- /dev/null
@@ -0,0 +1,1033 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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 "TelCall.h"
+#include "tapi_common.h"
+#include "TapiUtility.h"
+
+#include "common.h"
+#include "tapi_log.h"
+#include "ITapiCall.h"
+
+static void on_response_call_dial(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;
+
+       GVariant *dbus_result;
+
+       dbg("Func Entrance");
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+
+       g_variant_get (dbus_result, "(i)", &result);
+       if (result != TAPI_CAUSE_SUCCESS)
+               dbg("Modem dialing failed");
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
+       }
+       dbg("Exit");
+}
+
+static void on_response_call_answer(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;
+       TelCallAnswerCnf_t data;
+
+       GVariant *dbus_result;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+
+       g_variant_get (dbus_result, "(ii)", &result, &data.id);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
+       }
+}
+
+static void on_response_call_end(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;
+       TelCallEndCnf_t data;
+
+       GVariant *dbus_result;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+
+       g_variant_get (dbus_result, "(iii)", &result, &data.id, &data.type);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
+       }
+}
+
+static void on_response_call_hold(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;
+       TelCallHoldCnf_t data;
+
+       GVariant *dbus_result;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+
+       g_variant_get (dbus_result, "(ii)", &result, &data.id);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
+       }
+
+}
+
+static void on_response_call_active(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;
+       TelCallActiveCnf_t data;
+
+       GVariant *dbus_result;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+
+       g_variant_get (dbus_result, "(ii)", &result, &data.id);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
+       }
+
+
+}
+
+static void on_response_call_swap(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;
+       TelCallSwapCnf_t data;
+
+       GVariant *dbus_result;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+
+       g_variant_get (dbus_result, "(ii)", &result, &data.id);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
+       }
+}
+
+static void on_response_call_join(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;
+       TelCallJoinCnf_t data;
+
+       GVariant *dbus_result;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+
+       g_variant_get (dbus_result, "(ii)", &result, &data.id);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
+       }
+}
+
+static void on_response_call_split(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;
+       TelCallSplitCnf_t data;
+
+       GVariant *dbus_result;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+
+       g_variant_get (dbus_result, "(ii)", &result, &data.id);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
+       }
+}
+
+static void on_response_call_transfer(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;
+       TelCallTransferCnf_t data;
+
+       GVariant *dbus_result;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+
+       g_variant_get (dbus_result, "(ii)", &result, &data.id);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
+       }
+}
+
+static void on_response_call_dtmf(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;
+
+       GVariant *dbus_result;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+
+       g_variant_get (dbus_result, "(i)", &result);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
+       }
+}
+
+static void on_response_call_deflect(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;
+
+       GVariant *dbus_result;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+
+       g_variant_get (dbus_result, "(i)", &result);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
+       }
+}
+
+static void on_response_get_call_volume_info(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;
+       TelCallGetVolumeInfoResp_t resp;
+
+       GVariant *dbus_result = 0, *value = 0;
+       GVariantIter *iter = 0;
+       GVariantIter *iter_row = 0;
+       const gchar *key = 0;
+
+
+       memset(&resp, '\0', sizeof(TelCallGetVolumeInfoResp_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+
+       g_variant_get (dbus_result, "(aa{sv}i)", &iter, &result);
+
+       resp.record_num = g_variant_iter_n_children(iter);
+
+       while ( g_variant_iter_next(iter, "a{sv}", &iter_row ) ) {
+               while ( g_variant_iter_loop( iter_row, "{sv}", &key, &value ) ) {
+
+                       if ( !g_strcmp0(key, "type") ) {
+                               int type = g_variant_get_int32(value);
+
+                               resp.record[i].device = (type & 0xf0);
+                               resp.record[i].type = (type & 0x0f);
+                       }
+
+                       if ( !g_strcmp0(key, "level") ) {
+                               resp.record[i].volume = g_variant_get_int32(value);
+                       }
+               }
+               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);
+       }
+}
+
+static void on_response_set_call_volume_info(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;
+
+       GVariant *dbus_result;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+
+       g_variant_get (dbus_result, "(i)", &result);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
+       }
+}
+
+static void on_response_set_call_sound_path(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;
+
+       GVariant *dbus_result;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+
+       g_variant_get (dbus_result, "(i)", &result);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
+       }
+}
+
+static void on_response_set_call_mute_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;
+
+       GVariant *dbus_result;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+
+       g_variant_get (dbus_result, "(i)", &result);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
+       }
+}
+
+static void on_response_get_call_mute_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, status = 0;
+       TelCallGetMuteStatusResp_t resp;
+
+       GVariant *dbus_result;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+
+       g_variant_get (dbus_result, "(ii)", &result, &resp.status);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &status, evt_cb_data->user_data);
+       }
+}
+
+static void on_response_set_call_sound_recording(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;
+
+       GVariant *dbus_result;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+
+       g_variant_get (dbus_result, "(i)", &result);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
+       }
+}
+
+static void on_response_set_call_sound_equalization(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;
+
+       GVariant *dbus_result;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+
+       g_variant_get (dbus_result, "(i)", &result);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
+       }
+}
+
+static void on_response_set_call_sound_noise_reduction(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;
+
+       GVariant *dbus_result;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+
+       g_variant_get (dbus_result, "(i)", &result);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
+       }
+}
+
+static void on_response_set_call_sound_clock_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;
+
+       GVariant *dbus_result;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+
+       g_variant_get (dbus_result, "(i)", &result);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
+       }
+}
+
+
+EXPORT_API int tel_dial_call(TapiHandle *handle, const TelCallDial_t *pParams, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       dbg("Func Entrance");
+       if (!pParams)
+               return TAPI_API_INVALID_INPUT;
+
+       dbg("Destination Number : %s", pParams->szNumber);
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(is)", pParams->CallType, pParams->szNumber);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "Dial", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
+                       on_response_call_dial, evt_cb_data );
+       dbg("Exit");
+       return TAPI_API_SUCCESS;
+}
+
+
+EXPORT_API int tel_answer_call(TapiHandle *handle, unsigned int CallHandle, TelCallAnswerType_t AnsType, tapi_response_cb callback, void *user_data )
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       dbg("Func Entrance ");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(ii)", CallHandle, AnsType);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "Answer", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
+                       on_response_call_answer, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+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;
+
+       dbg("Func Entrance ");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(ii)", CallHandle, EndType);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "End", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
+                       on_response_call_end, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_hold_call(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data )
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       dbg("Func Entrance ");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(i)", CallHandle);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "Hold", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
+                       on_response_call_hold, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_active_call(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data )
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       dbg("Func Entrance ");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(i)", CallHandle);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "Active", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
+                       on_response_call_active, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_swap_call(TapiHandle *handle, unsigned int CallHandle1, unsigned int CallHandle2, tapi_response_cb callback, void *user_data )
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       dbg("Func Entrance ");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(i)", CallHandle1, CallHandle2);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "Swap", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
+                       on_response_call_swap, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_join_call(TapiHandle *handle, unsigned int CallHandle1, unsigned int CallHandle2, tapi_response_cb callback, void *user_data )
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       dbg("Func Entrance ");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(i)", CallHandle1, CallHandle2);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "Join", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
+                       on_response_call_join, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_split_call(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data )
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       dbg("Func Entrance ");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(i)", CallHandle);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "Split", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
+                       on_response_call_split, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_transfer_call(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data )
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       dbg("Func Entrance ");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(i)", CallHandle);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "Transfer", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
+                       on_response_call_transfer, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_activate_call_ccbs(TapiHandle *handle, unsigned int CallHandle, tapi_response_cb callback, void *user_data )
+{
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_call_dtmf(TapiHandle *handle, const char *pDtmfString, tapi_response_cb callback, void *user_data )
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       dbg("Func Entrance ");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(s)", pDtmfString);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "Dtmf", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
+                       on_response_call_dtmf, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_deflect_call(TapiHandle *handle, unsigned int CallHandle, const TelCallDeflectDstInfo_t *pInfo, tapi_response_cb callback, void *user_data )
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       dbg("Func Entrance ");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(is)", CallHandle, pInfo->number);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "Deflect", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
+                       on_response_call_deflect, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_call_status(TapiHandle *handle, int call_id, TelCallStatus_t *out )
+{
+       GVariant *gv = 0;
+       GVariant *param = 0;
+
+       GError *gerr = 0;
+
+       gchar *call_number;
+       gint call_type = 0;
+       gboolean call_direction = FALSE;
+       gint call_state = 0;
+       gboolean call_multiparty_state = FALSE;
+
+       if ( !out ) {
+               dbg("[ error ] out : 0 ");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       param = g_variant_new("(i)", call_id);
+
+       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, -1, 0,   &gerr);
+
+       if ( gv ) {
+               g_variant_get(gv, "(isibib)", &call_id, &call_number, &call_type, &call_direction, &call_state, &call_multiparty_state);
+
+               out->CallHandle = (int)call_id;
+               out->bMoCall = (int)call_direction;
+               strncpy( out->pNumber, call_number, TAPI_CALL_DIALDIGIT_LEN_MAX );
+
+               dbg("[ check ] call_number : %s", call_number);
+               dbg("[ check ] out->pNumber : %s", out->pNumber);
+
+               out->CallType = (TelCallType_t)call_type;
+               out->CallState = (TelCallStates_t)call_state;
+               out->bConferenceState = (int)call_multiparty_state;
+
+               g_free( call_number );
+
+       } else {
+
+               dbg("[ error ] fail to get call status : (0x%x)", call_id);
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_call_status_all( TapiHandle *handle, TelCallStatusCallback cb, void *user_data )
+{
+       GVariant *gv = 0;
+       GVariantIter *iter = 0, *iter_row = 0;  
+       GError *gerr = 0;
+
+       if ( !cb ) {
+               dbg("[ error ] out : 0 ");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       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, -1, 0, &gerr);
+
+       if ( gv ) {
+
+               TelCallStatus_t data;
+               gchar *key = 0;
+               GVariant *value = 0;
+
+               g_variant_get(gv, "(aa{sv})", &iter);
+
+               while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
+
+                       while (g_variant_iter_loop(iter_row, "{sv}", &key, &value)) {
+
+                               if (!g_strcmp0(key, "call_id")) {
+                                       data.CallHandle = g_variant_get_int32(value);
+                               }
+                               if (!g_strcmp0(key, "call_number")) {
+                                       strncpy(data.pNumber, g_variant_get_string(value, 0), TAPI_CALL_DIALDIGIT_LEN_MAX);
+                               }
+                               if (!g_strcmp0(key, "call_type")) {
+                                       data.CallType = (int)g_variant_get_int32(value);
+                               }
+                               if (!g_strcmp0(key, "call_direction")) {
+                                       data.bMoCall = (int)g_variant_get_boolean(value);
+                               }
+                               if (!g_strcmp0(key, "call_state")) {
+                                       data.CallState = (int)g_variant_get_int32(value);
+                               }
+                               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);
+       } else {
+
+               dbg("[ error ] fail to get call status");
+               return TAPI_API_OPERATION_FAILED;
+
+       }
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_call_act_line(TapiHandle *handle, tapi_response_cb callback, void *user_data )
+{
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_set_call_act_line(TapiHandle *handle, TelCallActiveLine_t active_line, tapi_response_cb callback, void *user_data )
+{
+       return TAPI_API_SUCCESS;
+}
+
+/*================================================================================================*/
+
+EXPORT_API int tel_get_call_duration(TapiHandle *handle, unsigned int CallHandle, unsigned int *pDurationInSecs)
+{
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_call_conf_list(TapiHandle *handle, unsigned int CallHandle, unsigned int *pCallList, int *pNoOfCalls)
+{
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_call_privacy_mode(TapiHandle *handle, TelCallPrivacyType_t PrivacyType, tapi_response_cb callback, void *user_data )
+{
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_set_call_privacy_mode(TapiHandle *handle, TelCallVoicePrivacyInfo_t PrivacyInfo, tapi_response_cb callback, void *user_data )
+{
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_exe_call_flash_info(TapiHandle *handle, const char *pDialNumber, tapi_response_cb callback, void *user_data )
+{
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_exit_call_emergency_mode(TapiHandle *handle, tapi_response_cb callback, void *user_data )
+{
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_call_time(TapiHandle *handle, unsigned short req_mask, tapi_response_cb callback, void *user_data )
+{
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_call_volume_info(TapiHandle *handle, TelSoundDevice_t device, TelSoundType_t type, tapi_response_cb callback, void *user_data )
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       dbg("Func Entrance ");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(ii)", device, type);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "GetVolume", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
+                       on_response_get_call_volume_info, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_set_call_volume_info(TapiHandle *handle, TelCallVolumeInfo_t *info, tapi_response_cb callback, void *user_data )
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       dbg("Func Entrance ");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(iii)", info->device, info->type, info->volume);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "SetVolume", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
+                       on_response_set_call_volume_info, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_set_call_sound_path(TapiHandle *handle, TelCallSoundPathInfo_t *info, tapi_response_cb callback, void *user_data )
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       dbg("Func Entrance ");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(ib)", info->path, info->ex_volume);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "SetSoundPath", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
+                       on_response_set_call_sound_path, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_set_call_mute_status(TapiHandle *handle, TelSoundMuteStatus_t mute, tapi_response_cb callback, void *user_data )
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       char *method = 0;
+
+       dbg("Func Entrance ");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       if ( mute == TAPI_SOUND_MUTE_STATUS_ON ) 
+               method = "Mute";
+       else
+               method = "Unmute";
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       method, 0, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
+                       on_response_set_call_mute_status, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_call_mute_status(TapiHandle *handle, tapi_response_cb callback, void *user_data )
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+
+       dbg("Func Entrance ");
+
+       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_CALL_INTERFACE,
+                       "GetMuteStatus", 0, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
+                       on_response_get_call_mute_status, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API  int tel_set_call_sound_recording(TapiHandle *handle, TelSoundRecording_t *on, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       dbg("Func Entrance ");
+
+       param = g_variant_new("(i)", on);
+
+       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_CALL_INTERFACE,
+                       "SetSoundRecording", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
+                       on_response_set_call_sound_recording, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API  int tel_set_call_sound_equalization(TapiHandle *handle, TelCallSoundEqualization_t *eq, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+       char *eq_param = 0;
+
+       dbg("Func Entrance ");
+
+       eq_param = (char*)eq->parameter;
+
+       param = g_variant_new("(iis)", eq->mode, eq->direction, eq_param);
+
+       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_CALL_INTERFACE,
+                       "SetSoundEqualization", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
+                       on_response_set_call_sound_equalization, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API  int tel_set_call_sound_noise_reduction(TapiHandle *handle, TelSoundNoiseReduction_t noise, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       dbg("Func Entrance ");
+
+       param = g_variant_new("(i)", noise);
+
+       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_CALL_INTERFACE,
+                       "SetSoundNoiseReduction", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
+                       on_response_set_call_sound_noise_reduction, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_set_call_sound_clock_status(TapiHandle *handle, gboolean status, tapi_response_cb callback, void *user_data )
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       dbg("Func Entrance");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(b)", status);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_CALL_INTERFACE,
+                       "SetSoundClockStatus", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, 0,
+                       on_response_set_call_sound_clock_status, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+
+/*     EOF  */
+
diff --git a/src/tapi_common.c b/src/tapi_common.c
new file mode 100644 (file)
index 0000000..cdd8a76
--- /dev/null
@@ -0,0 +1,1353 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2012 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.
+ */
+
+#define _GNU_SOURCE
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gio/gio.h>
+
+#include "tapi_common.h"
+#include "TapiUtility.h"
+
+//
+#include "ITapiPS.h"
+#include "TelNetwork.h"
+#include "TelSms.h"
+#include "TelSat.h"
+#include "TelSs.h"
+#include "TelCall.h"
+
+//
+#include "common.h"
+#include "tapi_log.h"
+
+#define CALLBACK_CALL(data) \
+       if (evt_cb_data->cb_fn) { \
+               evt_cb_data->cb_fn(handle, noti_id, (data), evt_cb_data->user_data); \
+       } \
+
+extern char *g_cookie_name;
+extern int g_cookie_size;
+
+TelSatEventDownloadType_t g_event_list[TAPI_SAT_EVENT_LIST_MAX_COUNT] = {-1};
+
+/*static void _cookie_deinit(void)
+{
+       if (g_cookie_name)
+               free(g_cookie_name);
+
+       g_cookie_name = NULL;
+       g_cookie_size = 0;
+}*/
+
+static void _process_network_event(const gchar *sig, GVariant *param,
+       TapiHandle *handle, char *noti_id, struct tapi_evt_cb *evt_cb_data)
+{
+       if (!evt_cb_data)
+               return;
+
+       if (!g_strcmp0(sig, "RegistrationStatus")) {
+               struct tel_noti_network_registration_status noti;
+
+               g_variant_get(param, "(iiib)", &noti.cs, &noti.ps, &noti.type, &noti.is_roaming);
+
+               CALLBACK_CALL(&noti);
+       }
+       else if (!g_strcmp0(sig, "Info")) {
+               struct tel_noti_network_info noti;
+
+               memset(&noti, 0, sizeof(struct tel_noti_network_info));
+               g_variant_get(param, "(ii)", &noti.rssi, &noti.battery);
+
+               CALLBACK_CALL(&noti);
+       }
+       else if (!g_strcmp0(sig, "CellInfo")) {
+               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);
+       }
+       else if (!g_strcmp0(sig, "Change")) {
+               struct tel_noti_network_change noti;
+               char *plmn = NULL;
+               int act;
+               memset(&noti, 0, sizeof(struct tel_noti_network_change));
+
+               g_variant_get(param, "(isi)", &act, &plmn, &noti.lac);
+
+               switch (act) {
+                       case 0x1:
+                               noti.act = TAPI_NETWORK_SYSTEM_GSM;
+                               break;
+                       case 0x2:
+                               noti.act = TAPI_NETWORK_SYSTEM_GPRS;
+                               break;
+                       case 0x3:
+                               noti.act = TAPI_NETWORK_SYSTEM_EGPRS;
+                               break;
+                       case 0x4:
+                               noti.act = TAPI_NETWORK_SYSTEM_UMTS;
+                               break;
+                       case 0x5:
+                               noti.act = TAPI_NETWORK_SYSTEM_GSM_AND_UMTS;
+                               break;
+                       case 0x11:
+                               noti.act = TAPI_NETWORK_SYSTEM_IS95A;
+                               break;
+                       case 0x12:
+                               noti.act = TAPI_NETWORK_SYSTEM_IS95B;
+                               break;
+                       case 0x13:
+                               noti.act = TAPI_NETWORK_SYSTEM_CDMA_1X;
+                               break;
+                       case 0x14:
+                               noti.act = TAPI_NETWORK_SYSTEM_EVDO_REV_0;
+                               break;
+                       case 0x15:
+                               noti.act = TAPI_NETWORK_SYSTEM_1X_EVDO_REV_0_HYBRID;
+                               break;
+                       case 0x16:
+                               noti.act = TAPI_NETWORK_SYSTEM_EVDO_REV_A;
+                               break;
+                       case 0x17:
+                               noti.act = TAPI_NETWORK_SYSTEM_1X_EVDO_REV_A_HYBRID;
+                               break;
+                       case 0x18:
+                               noti.act = TAPI_NETWORK_SYSTEM_EVDV;
+                               break;
+                       case 0x21:
+                               noti.act = TAPI_NETWORK_SYSTEM_LTE;
+                               break;
+                       default:
+                               noti.act = TAPI_NETWORK_SYSTEM_NO_SRV;
+                               break;
+               }
+
+               if (plmn) {
+                       snprintf(noti.plmn, 7, "%s", plmn);
+               }
+
+               CALLBACK_CALL(&noti);
+       }
+       else if (!g_strcmp0(sig, "TimeInfo")) {
+               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);
+               }
+
+               CALLBACK_CALL(&noti);
+       }
+       else if (!g_strcmp0(sig, "Identity")) {
+               struct tel_noti_network_identity noti;
+               char *plmn = NULL, *s_name = NULL, *f_name = NULL;
+
+               memset(&noti, 0, sizeof(struct tel_noti_network_identity));
+
+               g_variant_get(param, "(sss)", &plmn, &s_name, &f_name);
+
+               if (plmn) {
+                       snprintf(noti.plmn, 7, "%s", plmn);
+               }
+               if (s_name) {
+                       snprintf(noti.short_name, 17, "%s", s_name);
+               }
+               if (f_name) {
+                       snprintf(noti.full_name, 33, "%s", f_name);
+               }
+
+               CALLBACK_CALL(&noti);
+       }
+       else {
+               dbg("not handled Network noti[%s]", sig);
+       }
+}
+
+static void _process_sms_event(const gchar *sig, GVariant *param,
+       TapiHandle *handle, char *noti_id, struct tapi_evt_cb *evt_cb_data)
+{
+       if (!evt_cb_data)
+               return;
+
+       if (!g_strcmp0(sig, "IncommingMsg")) {
+               struct tel_noti_sms_incomming_msg noti;
+
+               const char *sca = NULL;
+               const char *tpdu = NULL;
+               gsize length;
+               guchar *decoded_sca = NULL;
+               guchar *decoded_tpdu = NULL;
+
+               memset(&noti, 0, sizeof(struct tel_noti_sms_incomming_msg));
+
+               g_variant_get(param, "(sis)", &sca, &noti.MsgLength, &tpdu);
+
+               decoded_sca = g_base64_decode(sca, &length);
+               if (decoded_sca) {
+                       memcpy(&(noti.Sca[0]), decoded_sca, TAPI_SIM_SMSP_ADDRESS_LEN);
+                       g_free(decoded_sca);
+               }
+
+               decoded_tpdu = g_base64_decode(tpdu, &length);
+               if (decoded_tpdu) {
+                       memcpy(&(noti.szData[0]), decoded_tpdu, TAPI_NETTEXT_SMDATA_SIZE_MAX + 1);
+                       g_free(decoded_tpdu);
+               }
+
+               CALLBACK_CALL(&noti);
+       }
+       else if (!g_strcmp0(sig, "IncommingCbMsg")) {
+               struct tel_noti_sms_incomming_cb_msg noti;
+
+               const char *cbMsg = NULL;
+               gsize length;
+               guchar *decoded_cbMsg = NULL;
+
+               memset(&noti, 0, sizeof(struct tel_noti_sms_incomming_cb_msg));
+               g_variant_get(param, "(iis)", &noti.CbMsgType, &noti.Length, &cbMsg);
+
+               decoded_cbMsg = g_base64_decode(cbMsg, &length);
+               if (decoded_cbMsg) {
+                       memcpy(&(noti.szMsgData[0]), decoded_cbMsg, TAPI_NETTEXT_CB_SIZE_MAX + 1);
+                       g_free(decoded_cbMsg);
+               }
+
+               CALLBACK_CALL(&noti);
+       }
+       else if (!g_strcmp0(sig, "IncommingEtwsMsg")) {
+               struct tel_noti_sms_incomming_etws_msg noti;
+
+               const char *etwsMsg = NULL;
+               gsize length;
+               guchar *decoded_etwsMsg = NULL;
+
+               memset(&noti, 0, sizeof(struct tel_noti_sms_incomming_etws_msg));
+               g_variant_get(param, "(iis)", &noti.EtwsMsgType, &noti.Length, &etwsMsg);
+
+               decoded_etwsMsg = g_base64_decode(etwsMsg, &length);
+               if (decoded_etwsMsg) {
+                       memcpy(&(noti.szMsgData[0]), decoded_etwsMsg, TAPI_NETTEXT_ETWS_SIZE_MAX + 1);
+                       g_free(decoded_etwsMsg);
+               }
+
+               CALLBACK_CALL(&noti);
+       }
+       else if (!g_strcmp0(sig, "MemoryStatus")) {
+               int noti = 0;
+
+               g_variant_get(param, "(i)", &noti);
+               CALLBACK_CALL(&noti);
+       }
+       else if (!g_strcmp0(sig, "SmsReady")) {
+               gboolean noti = 0;
+
+               g_variant_get(param, "(b)", &noti);
+               CALLBACK_CALL(&noti);
+       }
+       else {
+               dbg("not handled Sms noti[%s]", sig);
+       }
+}
+
+static void _process_call_event(const gchar *sig, GVariant *param,
+       TapiHandle *handle, char *noti_id, struct tapi_evt_cb *evt_cb_data)
+{
+       if (!evt_cb_data)
+               return;
+
+       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);
+               dbg("[ check ] %s : call_id(%d), end_cause(0x%x)", "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);
+               dbg("[ check ] %s : call_id(%d)", "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);
+               dbg("[ check ] %s : call_id(%d)", "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);
+               dbg("[ check ] %s : call_id(%d)", "Status Active noti", data.id);
+               CALLBACK_CALL(&data);
+       }
+       else if (!g_strcmp0(sig, "VoiceCallStatusHeld") ) {
+               TelCallStatusHeldNoti_t data;
+               g_variant_get(param, "(i)", &data.id);
+               dbg("[ check ] %s : call_id(%d)", "Status Held noti", data.id);
+               CALLBACK_CALL(&data);
+       }
+       else if (!g_strcmp0(sig, "VoiceCallStatusIncoming") || !g_strcmp0(sig, "VideoCallStatusIncoming")) {
+               TelCallStatusIncomingNoti_t data;
+               g_variant_get(param, "(i)", &data.id);
+               dbg("[ check ] %s : call_id(%d)", "Status Incoming noti", data.id);
+               CALLBACK_CALL(&data);
+       }
+       else if (!g_strcmp0(sig, "Waiting")) {
+               TelCallInfoWaitingNoti_t data;
+               g_variant_get(param, "(i)", &data.id);
+               dbg("[ check ] %s : data.id(%d)", "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);
+               dbg("[ check ] %s : data.id(%d)", "Call Info Forwarded noti", data.id);
+               CALLBACK_CALL(&data.id);
+       }
+       else if (!g_strcmp0(sig, "BarredIncoming")) {
+               TelCallInfoBarredIncomingNoti_t data;
+               g_variant_get(param, "(i)", &data.id);
+               dbg("[ check ] %s : data.id(%d)", "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);
+               dbg("[ check ] %s : data.id(%d)", "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);
+               dbg("[ check ] %s : data.id(%d)", "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);
+               dbg("[ check ] %s : data.id(%d)", "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);
+               dbg("[ check ] %s : data.id(%d)", "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);
+               dbg("[ check ] %s : data.id(%d)", "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);
+               dbg("[ check ] %s : data.id(%d)", "Call Info Call Joined noti", data.id);
+               CALLBACK_CALL(&data.id);
+       }
+       else if (!g_strcmp0(sig, "CallSoundPath")) {
+               TelCallSoundPathNoti_t data;
+               g_variant_get(param, "(i)", &data.path);
+               dbg("[ check ] %s : path(%d)", "Call Sound Path noti", data.path);
+               CALLBACK_CALL(&data);
+       }
+       else if (!g_strcmp0(sig, "CallSoundRingbackTone")) {
+               TelCallSoundRingbackToneNoti_t status;
+               g_variant_get(param, "(i)", &status);
+               dbg("[ check ] %s : status(%d)", "Call Sound Ringbacktone noti", status);
+               CALLBACK_CALL(&status);
+       }
+       else if (!g_strcmp0(sig, "CallSoundWbamr")) {
+               TelCallSoundWbamrNoti_t status;
+               g_variant_get(param, "(i)", &status);
+               dbg("[ check ] %s : status(%d)", "Call Sound Wbamr noti", status);
+               CALLBACK_CALL(&status);
+       }
+       else if (!g_strcmp0(sig, "CallSoundEqualization")) {
+               TelCallSoundEqualizationNoti_t data;
+               g_variant_get(param, "(ii)", &data.mode, &data.direction);
+               dbg("[ check ] %s : mode(%d), direction(%d)", "Call Sound Equalization noti", data.mode, data.direction);
+               CALLBACK_CALL(&data);
+       }
+       else if (!g_strcmp0(sig, "CallSoundNoiseReduction")) {
+               TelCallSoundNoiseReductionNoti_t data;
+               g_variant_get(param, "(i)", &data.status);
+               dbg("[ check ] %s : status(%d)", "Call Sound Noise Reduction noti", data.status);
+               CALLBACK_CALL(&data);
+       }
+       else if (!g_strcmp0(sig, "CallSoundClockStatus")) {
+               gboolean data;
+               g_variant_get(param, "(b)", &data);
+               dbg("[ check ] %s : status(%d)", "Call Sound Clock Status noti", data);
+               CALLBACK_CALL(&data);
+       }
+       else {
+               dbg("not handled Call noti[%s]", sig);
+       }
+}
+
+static void _process_sat_event(const gchar *sig, GVariant *param,
+       TapiHandle *handle, char *noti_id, struct tapi_evt_cb *evt_cb_data)
+{
+       if (!evt_cb_data)
+               return;
+
+       if (!g_strcmp0(sig, "SetupMenu")) {
+               TelSatSetupMenuInfo_t setup_menu;
+
+               gchar *title;
+               gint command_id, item_cnt;
+               gboolean b_present, b_helpinfo, b_updated;
+               GVariant *items = NULL;
+
+               memset(&setup_menu, 0, sizeof(TelSatSetupMenuInfo_t));
+
+               g_variant_get(param, "(ibs@vibb)", &command_id, &b_present, &title, &items, &item_cnt,
+                                       &b_helpinfo, &b_updated);
+
+               setup_menu.commandId = command_id;
+               setup_menu.bIsMainMenuPresent = (b_present ? 1 : 0);
+               memcpy(setup_menu.satMainTitle, title, TAPI_SAT_DEF_TITLE_LEN_MAX+1);
+               setup_menu.satMainMenuNum = 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.satMainMenuItem[index].itemId = item_id;
+                               memcpy(setup_menu.satMainMenuItem[index].itemString, item_str, TAPI_SAT_DEF_ITEM_STR_LEN_MAX + 6);
+                               dbg("item index(%d) id(%d) str(%s)",index, setup_menu.satMainMenuItem[index].itemId, setup_menu.satMainMenuItem[index].itemString);
+                               //dbg("item index(%d) id(%d) str(%s)",index, item_id, item_str);
+                               index++;
+                       }
+                       g_variant_iter_free(iter);
+               }
+               setup_menu.bIsSatMainMenuHelpInfo = (b_helpinfo ? 1 : 0);
+               setup_menu.bIsUpdatedSatMainMenu = (b_updated ? 1 : 0);
+
+               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);
+
+               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;
+
+               memset(&display_text, 0, sizeof(TelSatDisplayTextInd_t));
+
+               g_variant_get(param, "(isiibbb)", &command_id, &text, &text_len, &duration,
+                       &high_priority, &user_rsp_required, &immediately_rsp);
+
+               display_text.commandId = command_id;
+               memcpy(display_text.text.string, text, TAPI_SAT_DEF_TEXT_STRING_LEN_MAX+1);
+               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);
+
+               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;
+
+               memset(&select_item, 0, sizeof(TelSatSelectItemInd_t));
+
+               g_variant_get(param, "(ibsiii@v)", &command_id, &help_info, &selected_text,
+                       &text_len, &default_item_id, &menu_cnt, &menu_items);
+
+               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);
+               select_item.text.stringLen = text_len;
+               select_item.defaultItemIndex = default_item_id;
+               select_item.menuItemCount = 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.menuItem[index].itemId = item_id;
+                               select_item.menuItem[index].textLen = item_len;
+                               memcpy(select_item.menuItem[index].text, item_str, TAPI_SAT_ITEM_TEXT_LEN_MAX + 1);
+                               dbg("item index(%d) id(%d) len(%d) str(%s)", index,
+                                               select_item.menuItem[index].itemId, select_item.menuItem[index].textLen, select_item.menuItem[index].text);
+                               index++;
+                       }
+                       g_variant_iter_free(iter);
+               }
+
+               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;
+
+               memset(&get_inkey, 0, sizeof(TelSatGetInkeyInd_t));
+
+               g_variant_get(param, "(iiibbsii)", &command_id, &key_type, &input_character_mode,
+                       &b_numeric,&b_help_info, &text, &text_len, &duration);
+
+               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);
+               get_inkey.text.stringLen = text_len;
+               get_inkey.duration = duration;
+
+               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, *def_text;
+
+               memset(&get_input, 0, sizeof(TelSatGetInputInd_t));
+
+               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);
+
+               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);
+               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);
+               get_input.defaultText.stringLen = def_text_len;
+
+               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, tmp_data_len;
+               gchar* text, *dialling_number;
+               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);
+
+               send_sms.smsTpdu.tpduType = tpdu_type;
+               send_sms.smsTpdu.dataLen = 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.smsTpdu.data[index] = data;
+                               index++;
+                       }
+                       g_variant_iter_free(iter);
+                       g_variant_unref(inner_gv);
+                       tmp_data_len = index - 1;
+               }
+
+               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);
+
+               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;
+
+               gint command_id = 0;
+               gint refresh_type =0;
+               gint file_cnt = 0;
+               GVariant *file_list = NULL;
+
+               memset(&refresh_info, 0, sizeof(TelSatRefreshInd_t));
+
+               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;
+               if(text_len <= 0 || g_strcmp0(text,"") == 0 ){
+                       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);
+
+               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 {
+               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)
+{
+       if (!evt_cb_data)
+               return;
+
+       if (!g_strcmp0(sig, "Status")) {
+               int noti = 0;
+               g_variant_get(param, "(i)", &noti);
+               CALLBACK_CALL(&noti);
+       } 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)
+{
+       if (!evt_cb_data)
+               return;
+
+       if (!g_strcmp0(sig, "Status")) {
+               int noti = 0;
+               g_variant_get(param, "(i)", &noti);
+               CALLBACK_CALL(&noti);
+       } 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)
+{
+       if (!evt_cb_data)
+               return;
+
+       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)
+{
+       if (!evt_cb_data)
+               return;
+
+       if (!g_strcmp0(sig, "Power")) {
+               int noti = 0;
+
+               g_variant_get(param, "(i)", &noti);
+
+               CALLBACK_CALL(&noti);
+       }
+       else if (!g_strcmp0(sig, "DunPinCtrl")) {
+               tapi_ps_btdun_pincontrol pin_ctrl;
+               int signal = 0, status = 0;
+
+               memset(&pin_ctrl, 0, sizeof(tapi_ps_btdun_pincontrol));
+               g_variant_get(param, "(ib)", &signal, &status);
+               pin_ctrl.signal = signal;
+               pin_ctrl.status = status;
+
+               CALLBACK_CALL(&pin_ctrl);
+       }
+       else if (!g_strcmp0(sig, "DunExternalCall")) {
+               gboolean external_call;
+
+               g_variant_get(param, "(b)", &external_call);
+
+               CALLBACK_CALL(&external_call);
+       }
+       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)
+{
+       if (!evt_cb_data)
+               return;
+
+       if (!g_strcmp0(sig, "NotifyUSSD")) {
+               TelSsUssdMsgInfo_t noti;
+               char *str = NULL;
+               memset(&noti, 0, sizeof(TelSsUssdMsgInfo_t));
+
+               g_variant_get(param, "(iis)", &noti.Type, &noti.Length, &str);
+
+               if (str) {
+                       g_strlcpy(noti.szString, str, TAPI_SS_USSD_DATA_SIZE_MAX);
+                       g_free(str);
+               }
+
+               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 i = 0;
+                       guchar data;
+                       GVariantIter *iter = NULL;
+                       GVariant *inner_gv = NULL;
+
+                       inner_gv = g_variant_get_variant(msg);
+                       dbg("[ check ] 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);
+                               noti.szRelCompMsg[i] = data;
+                               i++;
+                       }
+                       g_variant_iter_free(iter);
+                       g_variant_unref(inner_gv);
+               }
+
+               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;
+
+       if (!evt_cb_data)
+               return;
+
+       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);
+               }
+
+               dbg("length=%d", length);
+       }
+
+       if (decoded_data)
+               g_free(decoded_data);
+}
+
+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 (!handle) {
+               dbg("handle is NULL");
+               return;
+       }
+
+       noti_id = g_strdup_printf("%s:%s", interface, sig);
+
+       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_NETWORK_INTERFACE)) {
+               _process_network_event(sig, param, handle, noti_id, evt_cb_data);
+       }
+       else 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 {
+               dbg("can't find interface(%s)", interface);
+       }
+       g_free(noti_id);
+}
+
+EXPORT_API char** tel_get_cp_name_list(void)
+{
+       GError *error = NULL;
+       GDBusProxy *proxy = 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;
+
+       proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_NONE, NULL,
+                               "org.tizen.telephony", "/org/tizen/telephony", "org.tizen.telephony.Manager",
+                               NULL, &error);
+       if (!proxy) {
+               dbg("g_dbus_proxy_new_for_bus_sycn() failed. (%s)", error->message);
+               g_error_free (error);
+               return NULL;
+       }
+
+       rst = g_dbus_proxy_call_sync (proxy, "GetModems", NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
+       if (!rst) {
+               dbg( "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);
+
+       if (!list) {
+               dbg( "No CP name");
+               goto OUT;
+       }
+
+       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);
+               dbg("cp name[%d] = %s", i, cp_list[i]);
+       }
+       cp_list[element_cnt] = NULL;
+
+       g_slist_free(list);
+
+OUT:
+       if (proxy)
+               g_object_unref(proxy);
+
+       return cp_list;
+}
+
+EXPORT_API int tel_get_property_int(TapiHandle *handle, const char *property, int *result)
+{
+       char **dbus_info;
+       GDBusProxy *proxy = NULL;
+       GVariant *value = NULL;
+       GError *error = NULL;
+       int ret = TAPI_API_SUCCESS;
+
+       if (!handle || !property)
+               return TAPI_API_INVALID_INPUT;
+
+       dbus_info = g_strsplit(property, ":", 2);
+       if (!dbus_info) {
+               dbg("invalid property");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       if (!dbus_info[0] || !dbus_info[1]) {
+               dbg("invalid property");
+               ret = TAPI_API_INVALID_INPUT;
+               goto OUT;
+       }
+
+       proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_NONE, NULL,
+                               DBUS_TELEPHONY_SERVICE, handle->path, dbus_info[0],
+                               NULL, &error);
+       if (!proxy) {
+               dbg("g_dbus_proxy_new_for_bus_sycn() failed. (%s)", error->message);
+               g_error_free (error);
+               ret = TAPI_API_OPERATION_FAILED;
+               goto OUT;
+       }
+
+       value = g_dbus_proxy_get_cached_property(proxy, dbus_info[1]);
+       if (!value) {
+               dbg("g_dbus_proxy_get_cached_property('power') failed.");
+               ret = TAPI_API_OPERATION_FAILED;
+               goto OUT;
+       }
+
+       g_variant_get(value, "i", result);
+       g_variant_unref(value);
+
+OUT:
+       if (proxy)
+               g_object_unref(proxy);
+
+       g_strfreev(dbus_info);
+
+       return ret;
+}
+
+EXPORT_API TapiHandle* tel_init(const char *cp_name)
+{
+       GError *error = NULL;
+       struct tapi_handle *handle;
+       gchar *addr;
+
+       g_type_init();
+
+       dbg("process info: env=%s, invocation=%s", getenv("_"), program_invocation_name);
+
+       addr = g_dbus_address_get_for_bus_sync(G_BUS_TYPE_SYSTEM, NULL, &error);
+       if (!addr) {
+               err("Error get dbus: %s\n", error->message);
+               g_error_free (error);
+               return NULL;
+       }
+
+       handle = g_new0(struct tapi_handle, 1);
+       if (!handle)
+               return NULL;
+
+       handle->dbus_connection = g_dbus_connection_new_for_address_sync(addr,
+                       G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT |
+                       G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION,
+                       NULL, NULL, &error);
+       if (!handle->dbus_connection) {
+               err("Error creating dbus connection: %s\n", error->message);
+               g_free(handle);
+               g_error_free (error);
+               return NULL;
+       }
+
+       handle->ca = g_cancellable_new();
+
+       if (cp_name) {
+               handle->cp_name = g_strdup(cp_name);
+       }
+       else {
+               char **list = NULL;
+
+               list = tel_get_cp_name_list();
+               if (!list)
+                       return NULL;
+
+               if (!list[0])
+                       return NULL;
+
+               dbg("use default plugin(%s)", list[0]);
+               handle->cp_name = g_strdup(list[0]);
+       }
+
+       handle->evt_list = 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;
+}
+
+EXPORT_API int tel_deinit(TapiHandle* handle)
+{
+       if (!handle)
+               return -1;
+
+       if (handle->cp_name)
+               g_free(handle->cp_name);
+
+       if (handle->path)
+               g_free(handle->path);
+
+       dbg( "remove all signal");
+       g_hash_table_foreach_remove(handle->evt_list, _unregister_noti, handle);
+       g_hash_table_destroy(handle->evt_list);
+
+       g_cancellable_cancel(handle->ca);
+       g_object_unref(handle->ca);
+
+       dbg("close dbus connection");
+       if (g_dbus_connection_close_sync(handle->dbus_connection, NULL, NULL) == FALSE) {
+               dbg("failed");
+       }
+
+       memset(handle, 0, sizeof(struct tapi_handle));
+       g_free(handle);
+
+       dbg("deinit..");
+       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;
+
+       if (!handle || !handle->dbus_connection || !callback || !noti_id) {
+               dbg("invalid parameter");
+               return 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("path(%s) interface (%s) signal (%s)", handle->path, dbus_str[0], dbus_str[1]);
+
+       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;
+
+       if (!handle || !handle->dbus_connection){
+               dbg("invalid parameter");
+               return 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_gps.c b/src/tapi_gps.c
new file mode 100644 (file)
index 0000000..1520ddd
--- /dev/null
@@ -0,0 +1,125 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2012 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 "tapi_common.h"
+#include "TapiUtility.h"
+
+#include "common.h"
+#include "tapi_log.h"
+#include "ITapiGps.h"
+
+static void on_response_default_set(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;
+
+       GVariant *dbus_result;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+
+       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);
+       }
+
+       free(evt_cb_data);
+}
+
+
+EXPORT_API int tel_set_gps_frequency_aiding(TapiHandle *handle, unsigned char state, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+
+       dbg("Func Entrance");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(y)", state);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_GPS_INTERFACE,
+                       "SetFrequencyAiding", param, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_default_set, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_confirm_gps_measure_pos(TapiHandle *handle, unsigned char *data, unsigned int data_len)
+{
+       GVariant *param = NULL;
+       GVariant *rst = NULL;
+       GError *gerr = 0;
+       gchar *encoded_data = NULL;
+       gint result;
+
+       dbg("Func Entrance");
+
+       if (!handle || !handle->dbus_connection || !data){
+               dbg("invalid parameter");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       msg("call tel_confirm_gps_measure_pos(). data_len=%d", data_len);
+       encoded_data = g_base64_encode((const guchar*)data, data_len);
+
+       param = g_variant_new("(s)", encoded_data);
+
+       rst = g_dbus_connection_call_sync(handle->dbus_connection, DBUS_TELEPHONY_SERVICE , handle->path,
+                       DBUS_TELEPHONY_GPS_INTERFACE, "ConfirmMeasurePos", param, NULL, G_DBUS_CALL_FLAGS_NONE, -1, 0, &gerr);
+
+       g_free(encoded_data);
+
+       if(!rst){
+               dbg( "error to gps measure pos confirm(%s)", gerr->message);
+               g_error_free (gerr);
+               return TAPI_API_OPERATION_FAILED;
+       }
+       dbg("send gps user confirm format(%s)", g_variant_get_type_string(rst));
+
+       g_variant_get(rst, "(i)", &result);
+       dbg("result (%d)", result);
+
+       return TAPI_API_SUCCESS;
+}
+
diff --git a/src/tapi_log.h b/src/tapi_log.h
new file mode 100644 (file)
index 0000000..e26216b
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2012 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, "<%s:%d> " fmt "\n", __func__, __LINE__, ##args); }
+#define warn(fmt,args...)  { RLOG(LOG_WARN, TAPI_LOG_TAG, "<%s:%d> " fmt "\n", __func__, __LINE__, ##args); }
+#define err(fmt,args...)  { RLOG(LOG_FATAL, TAPI_LOG_TAG, "<%s:%d> " fmt "\n", __func__, __LINE__, ##args); }
+
+#else
+
+#define msg(fmt,args...)
+#define dbg(fmt,args...)
+#define warn(fmt,args...)
+#define err(fmt,args...)
+
+#endif
+
+__END_DECLS
+
+#endif
diff --git a/src/tapi_modem.c b/src/tapi_modem.c
new file mode 100644 (file)
index 0000000..1b291c3
--- /dev/null
@@ -0,0 +1,504 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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 "tapi_common.h"
+#include "TapiUtility.h"
+
+#include "TelMisc.h"
+#include "TelPower.h"
+#include "ITapiModem.h"
+#include "ITapiPS.h"
+
+#include "common.h"
+#include "tapi_log.h"
+
+static void on_response_default_set(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;
+
+       GVariant *dbus_result;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       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);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_get_version(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;
+       TelMiscVersionInformation data;
+       char *sw = NULL, *hw = NULL, *rf = NULL, *product = 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_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get (dbus_result, "(issss)", &result,
+                       &sw, &hw, &rf, &product);
+
+       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);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_get_serial_number(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;
+       char *sn = NULL;
+
+       GVariant *dbus_result;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get (dbus_result, "(is)", &result, &sn);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, sn, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_get_imei(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;
+       char *imei = NULL;
+
+       GVariant *dbus_result;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get (dbus_result, "(is)", &result, &imei);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, imei, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_set_dun_pin_ctrl(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;
+
+       GVariant *dbus_result;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get (dbus_result, "(i)", &result);
+       dbg("dun pin ctrl result(%d)", result);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, 0, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_get_flight_mode(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;
+       gboolean mode = FALSE;
+
+       GVariant *dbus_result;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get (dbus_result, "(bi)", &mode, &result);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &mode, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_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)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+
+       dbg("Func Entrance");
+
+       if (cmd > TAPI_PHONE_POWER_RESET)
+               return TAPI_API_INVALID_INPUT;
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(i)", cmd);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_MODEM_INTERFACE,
+                       "SetPower", param, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_default_set, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+/**
+ *
+ * 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)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+       gboolean b_mode;
+
+       dbg("Func Entrance");
+
+       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, -1, 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");
+
+       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, -1, 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");
+
+       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, -1, 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;
+       int result = -1;
+       TelMiscVersionInformation *data = NULL;
+       char *sw = NULL, *hw = NULL, *rf = NULL, *product = NULL;
+
+       dbg("Func Entrance");
+
+       if (!handle)
+               return 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, -1, NULL, NULL);
+
+       g_variant_get (dbus_result, "(issss)", &result,
+                       &sw, &hw, &rf, &product);
+
+       dbg("product code[%s]", product);
+
+       data = calloc(sizeof(TelMiscVersionInformation), 1);
+       if (!data)
+               return NULL;
+
+       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);
+
+       return data;
+}
+
+EXPORT_API int tel_get_misc_me_imei(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+
+       dbg("Func Entrance");
+
+       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,
+                       "GetIMEI", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_get_imei, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API char *tel_get_misc_me_imei_sync(TapiHandle *handle)
+{
+       GVariant *dbus_result;
+       char *imei = NULL;
+       int result = 0;
+
+       dbg("Func Entrance");
+
+       if (!handle)
+               return NULL;
+
+       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, -1, NULL, NULL);
+
+       g_variant_get (dbus_result, "(is)", &result, &imei);
+
+       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;
+
+       dbg("Func Entrance");
+
+       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,
+                       "GetSerialNumber", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_get_serial_number, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API char *tel_get_misc_me_sn_sync(TapiHandle *handle)
+{
+       GVariant *dbus_result;
+       char *sn = NULL;
+       int result = 0;
+
+       dbg("Func Entrance");
+
+       if (!handle)
+               return NULL;
+
+       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, -1, NULL, NULL);
+
+       g_variant_get (dbus_result, "(is)", &result, &sn);
+
+       return sn;
+}
+
+EXPORT_API int tel_check_modem_power_status(TapiHandle *handle, int *result)
+{
+       return tel_get_property_int(handle, TAPI_PROP_MODEM_POWER, result);
+}
+
+EXPORT_API int tel_control_modem_dun_pin_ctrl(TapiHandle *handle, tapi_ps_btdun_pincontrol *pincontrol, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+
+       dbg("Func Entrance ");
+
+       if (!handle || !handle->dbus_connection || !pincontrol){
+               dbg("invalid parameter");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(ib)", pincontrol->signal, pincontrol->status);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_MODEM_INTERFACE,
+                       "SetDunPinCtrl", param, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_set_dun_pin_ctrl, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
diff --git a/src/tapi_network.c b/src/tapi_network.c
new file mode 100644 (file)
index 0000000..b12021a
--- /dev/null
@@ -0,0 +1,926 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2012 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 "tapi_common.h"
+#include "TapiUtility.h"
+#include "TelNetwork.h"
+
+#include "common.h"
+#include "tapi_log.h"
+#include "ITapiNetwork.h"
+
+static int _convert_systemtype_to_act(int type)
+{
+       switch (type) {
+               case TAPI_NETWORK_SYSTEM_GSM:
+                       return 0x1;
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_GPRS:
+                       return 0x2;
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_EGPRS:
+                       return 0x3;
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_PCS1900:
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_UMTS:
+                       return 0x4;
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_GSM_AND_UMTS:
+                       return 0x5;
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_IS95A:
+                       return 0x11;
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_IS95B:
+                       return 0x12;
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_CDMA_1X:
+                       return 0x13;
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_EVDO_REV_0:
+                       return 0x14;
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_1X_EVDO_REV_0_HYBRID:
+                       return 0x15;
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_EVDO_REV_A:
+                       return 0x16;
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_1X_EVDO_REV_A_HYBRID:
+                       return 0x17;
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_EVDV:
+                       return 0x18;
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_LTE:
+                       return 0x21;
+                       break;
+
+               default:
+                       break;
+       }
+
+       return 0xFF;
+}
+
+static int _convert_act_to_systemtype(int act)
+{
+       switch (act) {
+               case 0x1:
+                       return TAPI_NETWORK_SYSTEM_GSM;
+                       break;
+
+               case 0x2:
+                       return TAPI_NETWORK_SYSTEM_GPRS;
+                       break;
+
+               case 0x3:
+                       return TAPI_NETWORK_SYSTEM_EGPRS;
+                       break;
+
+               case 0x4:
+                       return TAPI_NETWORK_SYSTEM_UMTS;
+                       break;
+
+               case 0x5:
+                       return TAPI_NETWORK_SYSTEM_GSM_AND_UMTS;
+                       break;
+
+               case 0x11:
+                       return TAPI_NETWORK_SYSTEM_IS95A;
+                       break;
+
+               case 0x12:
+                       return TAPI_NETWORK_SYSTEM_IS95B;
+                       break;
+
+               case 0x13:
+                       return TAPI_NETWORK_SYSTEM_CDMA_1X;
+                       break;
+
+               case 0x14:
+                       return TAPI_NETWORK_SYSTEM_EVDO_REV_0;
+                       break;
+
+               case 0x15:
+                       return TAPI_NETWORK_SYSTEM_1X_EVDO_REV_0_HYBRID;
+                       break;
+
+               case 0x16:
+                       return TAPI_NETWORK_SYSTEM_EVDO_REV_A;
+                       break;
+
+               case 0x17:
+                       return TAPI_NETWORK_SYSTEM_1X_EVDO_REV_A_HYBRID;
+                       break;
+
+               case 0x18:
+                       return TAPI_NETWORK_SYSTEM_EVDV;
+                       break;
+
+               case 0x21:
+                       return TAPI_NETWORK_SYSTEM_LTE;
+                       break;
+
+               default:
+                       break;
+       }
+
+       return TAPI_NETWORK_SYSTEM_NO_SRV;
+}
+
+static void on_response_search_network(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 i;
+
+       TelNetworkPlmnList_t list;
+
+       GVariant *dbus_result = NULL;
+       GVariant *value = NULL;
+       GVariantIter *iter = NULL;
+       GVariantIter *iter_row = NULL;
+       const gchar *key = NULL;
+
+       memset(&list, 0, sizeof(TelNetworkPlmnList_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       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")) {
+                               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);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &list, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_get_network_selection_mode(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;
+
+       GVariant *dbus_result;
+       int mode = 0;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get (dbus_result, "(ii)", &mode, &result);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &mode, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_default_set(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;
+
+       GVariant *dbus_result;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+
+       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);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_get_network_preferred_plmn(GDBusConnection *conn, GAsyncResult *res, gpointer user_data)
+{
+       GError *error = NULL;
+       struct tapi_resp_data *evt_cb_data = user_data;
+       int result = -1;
+       int i;
+
+       TelNetworkPreferredPlmnList_t list;
+
+       GVariant *dbus_result = NULL;
+       GVariant *value = NULL;
+       GVariantIter *iter = NULL;
+       GVariantIter *iter_row = NULL;
+       const gchar *key = NULL;
+
+       memset(&list, 0, sizeof(TelNetworkPreferredPlmnList_t));
+
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, &list, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get (dbus_result, "(aa{sv}i)", &iter, &result);
+
+       list.NumOfPrefPlmns = g_variant_iter_n_children(iter);
+
+       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);
+               }
+
+               free(evt_cb_data);
+               return;
+       }
+
+       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, "ef_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);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &list, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_get_network_band(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;
+
+       GVariant *dbus_result;
+       int band = 0;
+       int mode = 0;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get (dbus_result, "(iii)", &band, &mode, &result);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &band, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_get_network_mode(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;
+
+       GVariant *dbus_result;
+       int mode = 0;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get (dbus_result, "(ii)", &mode, &result);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &mode, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_get_network_service_domain(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;
+
+       GVariant *dbus_result;
+       int domain = 0;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get (dbus_result, "(ii)", &domain, &result);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &domain, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_get_network_serving(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;
+
+       TelNetworkServing_t data;
+
+       GVariant *dbus_result;
+       char *plmn;
+
+       memset(&data, 0, sizeof(TelNetworkServing_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get (dbus_result, "(isii)",
+                       &data.act,
+                       &plmn,
+                       &data.lac,
+                       &result);
+
+       data.act = _convert_act_to_systemtype(data.act);
+
+       if (plmn) {
+               snprintf(data.plmn, 7, "%s", plmn);
+               free(plmn);
+       }
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &data, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_get_neighboring_cell_info(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 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;
+
+       memset(&list, 0, sizeof(TelNetworkNeighboringCellInfo_t));
+
+       dbg("enter");
+       conn = G_DBUS_CONNECTION (source_object);
+
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       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)) {
+                       g_variant_get(value, "(iiiii)", &v0,&v1,&v2,&v3,&v4);
+                       if (!g_strcmp0(key, "geran")) {
+                               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")) {
+                               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);
+
+       list.geran_list_count = geran_index;
+       list.umts_list_count = umts_index;
+       dbg("geran_list_count=%d, umts_list_count=%d", geran_index, umts_index);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &list, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+EXPORT_API int tel_search_network(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+
+       dbg("Func Entrance");
+
+       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_NETWORK_INTERFACE,
+                       "Search", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, 180000, handle->ca,
+                       on_response_search_network, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_network_selection_mode(struct tapi_handle *handle, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+
+       dbg("Func Entrance");
+
+       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_NETWORK_INTERFACE,
+                       "GetSelectionMode", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_get_network_selection_mode, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_select_network_automatic(struct tapi_handle *handle, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+
+       dbg("Func Entrance");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(isi)",
+                       0, /* Automatic */
+                       "",
+                       0);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
+                       "SetSelectionMode", param, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_default_set, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_select_network_manual(struct tapi_handle *handle, const char *plmn, int type, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+
+       dbg("Func Entrance");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(isi)",
+                       1, /* Manual */
+                       plmn,
+                       _convert_systemtype_to_act(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, 180000, handle->ca,
+                       on_response_default_set, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_set_network_preferred_plmn(
+               TapiHandle *handle,
+               TelNetworkPreferredPlmnOp_t operation,
+               TelNetworkPreferredPlmnInfo_t *info,
+               tapi_response_cb callback,
+               void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+       int act = 0;
+
+       dbg("Func Entrance");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       switch (info->SystemType) {
+               case TAPI_NETWORK_SYSTEM_GSM:
+                       act = 1;
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_UMTS:
+                       act = 4;
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_GPRS:
+                       act = 2;
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_EGPRS:
+                       act = 3;
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_GSM_AND_UMTS:
+                       act = 4;
+                       break;
+
+               default:
+                       act = 4;
+                       break;
+       }
+
+       param = g_variant_new("(iiis)",
+                       operation,
+                       info->Index,
+                       act,
+                       info->Plmn);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
+                       "SetPreferredPlmn", param, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_default_set, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_network_preferred_plmn(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+
+       dbg("Func Entrance");
+
+       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_NETWORK_INTERFACE,
+                       "GetPreferredPlmn", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       (GAsyncReadyCallback) on_response_get_network_preferred_plmn, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_set_network_band(TapiHandle *handle, TelNetworkBandPreferred_t mode, TelNetworkBand_t band, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+
+       dbg("Func Entrance");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(ii)",
+                       band,
+                       mode);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
+                       "SetBand", param, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_default_set, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_network_band(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+
+       dbg("Func Entrance");
+
+       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_NETWORK_INTERFACE,
+                       "GetBand", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_get_network_band, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_set_network_mode(TapiHandle *handle, int mode, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+
+       dbg("Func Entrance");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(i)",
+                       mode);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
+                       "SetMode", param, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_default_set, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_network_mode(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+
+       dbg("Func Entrance");
+
+       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_NETWORK_INTERFACE,
+                       "GetMode", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_get_network_mode, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_set_network_service_domain(TapiHandle *handle, TelNetworkServiceDomain_t domain, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+
+       dbg("Func Entrance");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(i)", domain);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_NETWORK_INTERFACE,
+                       "SetServiceDomain", param, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_default_set, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_network_service_domain(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+
+       dbg("Func Entrance");
+
+       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_NETWORK_INTERFACE,
+                       "GetServiceDomain", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_get_network_service_domain, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_cancel_network_manual_search(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+
+       dbg("Func Entrance");
+
+       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_NETWORK_INTERFACE,
+                       "SearchCancel", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_default_set, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_network_serving(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+
+       dbg("Func Entrance");
+
+       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_NETWORK_INTERFACE,
+                       "GetServingNetwork", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_get_network_serving, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_network_neighboring_cell_info(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+
+       dbg("Func Entrance");
+
+       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_NETWORK_INTERFACE,
+                       "GetNgbrCellInfo", NULL, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_get_neighboring_cell_info, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
diff --git a/src/tapi_phonebook.c b/src/tapi_phonebook.c
new file mode 100644 (file)
index 0000000..4f95971
--- /dev/null
@@ -0,0 +1,679 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2012 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 "tapi_common.h"
+#include "TapiUtility.h"
+#include "TelSim.h"
+
+#include "common.h"
+#include "tapi_log.h"
+#include "ITapiPhonebook.h"
+
+static int _tel_check_pb_state(TapiHandle *handle)
+{
+       GError *gerr = NULL;
+       GVariant *sync_gv = NULL;
+       int api_err = TAPI_API_SUCCESS;
+       TelSimPbList_t pb_list;
+       int init_status = 0;
+
+       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, -1, NULL, &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);
+
+               if(init_status == 1)
+                       api_err = TAPI_API_SUCCESS;
+               else
+                       api_err = TAPI_API_INVALID_OPERATION;
+
+       } else {
+               dbg( "g_dbus_conn failed in _tel_check_pb_state. error (%s)", gerr->message);
+               g_error_free(gerr);
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       return api_err;
+}
+
+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;
+
+       memset(&pb_cnt, 0, sizeof(TelSimPbStorageInfo_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get (dbus_result, "(iiii)",
+                       &result,
+                       &pb_cnt.StorageFileType,
+                       &used,
+                       &total);
+
+       pb_cnt.UsedRecordCount = used;
+       pb_cnt.TotalRecordCount = total;
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &pb_cnt, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+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;
+
+       memset(&pb_entry, 0, sizeof(TelSimPbEntryInfo_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get (dbus_result, "(iiiiii)",
+                       &result,
+                       &pb_entry.StorageFileType,
+                       &imin,
+                       &imax,
+                       &nmax,
+                       &tmax);
+
+       pb_entry.PbIndexMin = imin;
+       pb_entry.PbIndexMax = imax;
+       pb_entry.PbNumLenMax =nmax;
+       pb_entry.PbTextLenMax = tmax;
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &pb_entry, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_get_sim_pb_usim_meta_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;
+       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_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       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);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &list, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+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_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       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;
+
+       if(strlen(name))
+               snprintf((char*)pb_rec.name, strlen(name) + 1, "%s", name);
+
+       if(strlen(number))
+               snprintf((char*)pb_rec.number, strlen(number) + 1, "%s", number);
+
+       if(strlen(sne))
+               snprintf((char*)pb_rec.sne, strlen(sne) + 1, "%s", sne);
+
+       if(strlen(anr1))
+               snprintf((char*)pb_rec.anr1, strlen(anr1) + 1, "%s", anr1);
+
+       if(strlen(anr2))
+               snprintf((char*)pb_rec.anr2, strlen(anr2) + 1, "%s", anr2);
+
+       if(strlen(anr3))
+               snprintf((char*)pb_rec.anr3, strlen(anr3) + 1, "%s", anr3);
+
+       if(strlen(email1))
+               snprintf((char*)pb_rec.email1, strlen(email1) + 1, "%s", email1);
+
+       if(strlen(email2))
+               snprintf((char*)pb_rec.email2, strlen(email2) + 1, "%s", email2);
+
+       if(strlen(email3))
+               snprintf((char*)pb_rec.email3, strlen(email3) + 1, "%s", email3);
+
+       dbg("pb_rec.phonebook_type[%d]",pb_rec.phonebook_type );
+       dbg("pb_rec.index[%d]",pb_rec.index );
+       dbg("pb_rec.next_index[%d]",pb_rec.next_index );
+       dbg("pb_rec.name[%s]",pb_rec.name );
+       dbg("pb_rec.dcs[%d]",pb_rec.dcs );
+       dbg("pb_rec.number[%s]",pb_rec.number );
+       dbg("pb_rec.ton[%d]",pb_rec.ton );
+
+       if(pb_rec.phonebook_type==TAPI_SIM_PB_3GSIM) {
+               dbg("pb_rec.sne[%s]",pb_rec.sne );
+               dbg("pb_rec.sne_dcs[%d]",pb_rec.sne_dcs );
+               dbg("pb_rec.anr1[%s]",pb_rec.anr1 );
+               dbg("pb_rec.anr1_ton[%d]",pb_rec.anr1_ton );
+               dbg("pb_rec.anr2[%s]",pb_rec.anr2 );
+               dbg("pb_rec.anr2_ton[%d]",pb_rec.anr2_ton );
+               dbg("pb_rec.anr3[%s]",pb_rec.anr3 );
+               dbg("pb_rec.anr3_ton[%d]",pb_rec.anr3_ton );
+               dbg("pb_rec.email1[%s]",pb_rec.email1 );
+               dbg("pb_rec.email2[%s]",pb_rec.email2 );
+               dbg("pb_rec.email3[%s]",pb_rec.email3 );
+               dbg("pb_rec.email4[%s]",pb_rec.email4 );
+               dbg("pb_rec.group_index[%d]",pb_rec.group_index );
+               dbg("pb_rec.pb_control[%d]",pb_rec.pb_control );
+       }
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &pb_rec, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+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_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       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);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_delete_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_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       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);
+       }
+
+       free(evt_cb_data);
+}
+
+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 api_err = TAPI_API_SUCCESS;
+       int init_status = 0;
+
+       dbg("Func Entrance");
+
+       TAPI_RETURN_VAL_IF_FAIL(init_completed, TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_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, -1, NULL, &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;
+       }
+
+       dbg("pb_list->b_fdn[%d]", pb_list->b_fdn)
+       dbg("pb_list->b_adn[%d]", pb_list->b_adn)
+       dbg("pb_list->b_sdn[%d]", pb_list->b_sdn)
+       dbg("pb_list->b_3g[%d]", pb_list->b_3g)
+       dbg("pb_list->b_aas[%d]", pb_list->b_aas)
+       dbg("pb_list->b_gas[%d]", pb_list->b_gas)
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_sim_pb_count(TapiHandle *handle, TelSimPbType_t pb_type, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
+       int pb_ready = 0;
+
+       dbg("Func Entrance");
+       pb_ready = _tel_check_pb_state(handle);
+       if(pb_ready != 0)
+               return pb_ready;
+
+       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(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(i)", pb_type);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_PB_INTERFACE,
+                       "GetCount", param, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_get_sim_pb_count, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_sim_pb_meta_info(TapiHandle *handle, TelSimPbType_t pb_type, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
+       int pb_ready = 0;
+
+       dbg("Func Entrance");
+       pb_ready = _tel_check_pb_state(handle);
+       if(pb_ready != 0)
+               return pb_ready;
+
+       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(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(i)", pb_type);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_PB_INTERFACE,
+                       "GetInfo", param, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_get_sim_pb_meta_info, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+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;
+       int pb_ready = 0;
+
+       dbg("Func Entrance");
+       pb_ready = _tel_check_pb_state(handle);
+       if(pb_ready != 0)
+               return pb_ready;
+
+       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, -1, handle->ca,
+                       on_response_get_sim_pb_usim_meta_info, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_read_sim_pb_record(TapiHandle *handle, TelSimPbType_t pb_type, unsigned short index, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
+       int pb_ready = 0;
+
+       dbg("Func Entrance");
+       pb_ready = _tel_check_pb_state(handle);
+       if(pb_ready != 0)
+               return pb_ready;
+
+       if (index == 0)
+               return TAPI_API_INVALID_INPUT;
+
+       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(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(ii)", pb_type, index);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_PB_INTERFACE,
+                       "ReadRecord", param, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_read_sim_pb_record, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_update_sim_pb_record(TapiHandle *handle, const TelSimPbRecord_t *req_data, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
+       int pb_ready = 0;
+
+       dbg("Func Entrance");
+       pb_ready = _tel_check_pb_state(handle);
+       if(pb_ready != 0)
+               return pb_ready;
+
+       TAPI_RETURN_VAL_IF_FAIL((req_data != NULL) , TAPI_API_INVALID_PTR);
+
+       if (req_data->index == 0) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       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;
+       }
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       dbg("req_data->phonebook_type[%d]",req_data->phonebook_type );
+       dbg("req_data->index[%d]",req_data->index );
+       dbg("req_data->name[%s]",req_data->name );
+       dbg("req_data->dcs[%d]",req_data->dcs );
+       dbg("req_data->number[%s]",req_data->number );
+       dbg("req_data->ton[%d]",req_data->ton );
+
+       if(req_data->phonebook_type == TAPI_SIM_PB_3GSIM) {
+               dbg("req_data->sne[%s]",req_data->sne );
+               dbg("req_data->sne_dcs[%d]",req_data->sne_dcs );
+               dbg("req_data->anr1[%s]",req_data->anr1 );
+               dbg("req_data->anr1_ton[%d]",req_data->anr1_ton );
+               dbg("req_data->anr2[%s]",req_data->anr2 );
+               dbg("req_data->anr2_ton[%d]",req_data->anr2_ton );
+               dbg("req_data->anr3[%s]",req_data->anr3 );
+               dbg("req_data->anr3_ton[%d]",req_data->anr3_ton );
+               dbg("req_data->email1[%s]",req_data->email1 );
+               dbg("req_data->email2[%s]",req_data->email2 );
+               dbg("req_data->email3[%s]",req_data->email3 );
+               dbg("req_data->email4[%s]",req_data->email4 );
+               dbg("req_data->group_index[%d]",req_data->group_index );
+               dbg("req_data->pb_control[%d]",req_data->pb_control );
+       }
+
+       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, -1, handle->ca,
+                       on_response_update_sim_pb_record, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+
+}
+
+EXPORT_API int tel_delete_sim_pb_record(TapiHandle *handle, TelSimPbType_t pb_type, unsigned short index, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
+       int pb_ready = 0;
+
+       dbg("Func Entrance");
+       pb_ready = _tel_check_pb_state(handle);
+       if(pb_ready != 0)
+               return pb_ready;
+
+       if (index == 0)
+               return TAPI_API_INVALID_INPUT;
+
+       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(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(ii)", pb_type, index);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_PB_INTERFACE,
+                       "DeleteRecord", param, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_delete_sim_pb_record, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
diff --git a/src/tapi_sap.c b/src/tapi_sap.c
new file mode 100644 (file)
index 0000000..eede90d
--- /dev/null
@@ -0,0 +1,521 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2012 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 "tapi_common.h"
+#include "TapiUtility.h"
+#include "TelSim.h"
+
+#include "common.h"
+#include "tapi_log.h"
+#include "ITapiSap.h"
+
+static void on_response_sap_connect(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;
+       TelSimSapConnectionStatus_t result = TAPI_SIM_SAP_CONNECTION_STATUS_OK;
+       gint max_msg_size = 0;
+
+       dbg("Func Entrance");
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get(dbus_result, "(ii)", &result, &max_msg_size);
+
+       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);
+       }
+
+       free(evt_cb_data);
+}
+
+EXPORT_API int tel_req_sap_connect(TapiHandle *handle, int max_msg_size, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
+
+       dbg("Func Entrance w/ max_msg_size[%d]",max_msg_size);
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_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, -1,
+                       handle->ca, on_response_sap_connect, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+static void on_response_sap_disconnect(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;
+       TelSimSapResultCode_t result = TAPI_SIM_SAP_RESULT_CODE_OK;
+
+       dbg("Func Entrance");
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       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);
+       }
+
+       free(evt_cb_data);
+}
+
+EXPORT_API int tel_req_sap_disconnect(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+
+       dbg("Func Entrance ");
+
+       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_SAP_INTERFACE, "Disconnect", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
+                       handle->ca, on_response_sap_disconnect, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+static void on_response_sap_connection_status(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;
+       TelSimSapStatusInfo_t result = TAPI_SIM_SAP_STATUS_UNKNOWN;
+
+       dbg("Func Entrance");
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       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);
+       }
+
+       free(evt_cb_data);
+}
+
+EXPORT_API int tel_req_sap_connection_status(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+
+       dbg("Func Entrance");
+
+       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_SAP_INTERFACE, "GetStatus", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
+                       handle->ca, on_response_sap_connection_status, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+static void on_response_sap_transfer_atr(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;
+       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_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       /*      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);
+       }
+
+       free(evt_cb_data);
+}
+
+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;
+
+       dbg("Func Entrance");
+
+       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_SAP_INTERFACE, "GetATR", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
+                       handle->ca, on_response_sap_transfer_atr, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+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_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       /*      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);
+       }
+
+       free(evt_cb_data);
+}
+
+EXPORT_API int tel_req_sap_transfer_apdu(TapiHandle *handle, TelSapApduData_t *apdu_data, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariantBuilder *builder = NULL;
+       GVariant *param = NULL;
+       GVariant *inner_gv = NULL;
+       int i = 0;
+
+       dbg("Func Entrance");
+       TAPI_RETURN_VAL_IF_FAIL(apdu_data, TAPI_API_INVALID_PTR);
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       builder = g_variant_builder_new(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, -1,
+                       handle->ca, on_response_sap_transfer_apdu, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+static void on_response_sap_transport_protocol(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;
+       TelSimSapResultCode_t result = TAPI_SIM_SAP_RESULT_CODE_OK;
+
+       dbg("Func Entrance");
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       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);
+       }
+
+       free(evt_cb_data);
+}
+
+EXPORT_API int tel_req_sap_transport_protocol(TapiHandle *handle, TelSimSapProtocol_t protocol, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
+
+       dbg("Func Entrance w/ protocol[%d]", protocol);
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_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, -1,
+                       handle->ca, on_response_sap_transport_protocol, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+static void on_response_sap_power_operation(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;
+       TelSimSapResultCode_t result = TAPI_SIM_SAP_RESULT_CODE_OK;
+
+       dbg("Func Entrance");
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       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);
+       }
+
+       free(evt_cb_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);
+
+       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;
+       }
+
+       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, -1,
+                       handle->ca, on_response_sap_power_operation, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+static void on_response_sap_cardreader_status(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;
+       TelSimSapResultCode_t result = TAPI_SIM_SAP_RESULT_CODE_OK;
+       TelSimSapCardStatus_t reader_status = TAPI_SIM_SAP_CARD_STATUS_UNKNOWN;
+
+       dbg("Func Entrance");
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       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);
+       }
+
+       free(evt_cb_data);
+}
+
+EXPORT_API int tel_req_sap_cardreader_status(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+
+       dbg("Func Entrance ");
+
+       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_SAP_INTERFACE, "GetCardReaderStatus", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
+                       handle->ca, on_response_sap_cardreader_status, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
diff --git a/src/tapi_sat.c b/src/tapi_sat.c
new file mode 100644 (file)
index 0000000..19a387b
--- /dev/null
@@ -0,0 +1,639 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2012 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 "tapi_common.h"
+#include "TapiUtility.h"
+#include "TelSat.h"
+
+#include "common.h"
+#include "tapi_log.h"
+#include "ITapiSat.h"
+
+extern TelSatEventDownloadType_t g_event_list[TAPI_SAT_EVENT_LIST_MAX_COUNT];
+
+static GVariant* _tapi_sat_gen_app_exec_result_data(TelSatAppsRetInfo_t *result_info)
+{
+       GVariant *result = NULL;
+
+       switch(result_info->commandType)
+       {
+               case TAPI_SAT_CMD_TYPE_SETUP_MENU:{
+                       gint exec_result;
+                       dbg("setup menu : result format (i)");
+
+                       exec_result = result_info->appsRet.setupMenu.resp;
+                       result = g_variant_new("(i)", exec_result);
+               } break;
+               case TAPI_SAT_CMD_TYPE_REFRESH:{
+                       gint app_type, exec_result;
+                       dbg("refresh : result format (ii)");
+
+                       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 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->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 TAPI_SAT_CMD_TYPE_SEND_SS:{
+                       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->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;
+                       ss_string = g_strdup((gchar*)result_info->appsRet.sendSs.ssString.string);
+
+                       result = g_variant_new("(iiisii)", exec_result, me_problem, ss_cause, ss_string, ss_str_len, call_ctrl_problem);
+               } break;
+               case TAPI_SAT_CMD_TYPE_SEND_USSD:{
+                       int index;
+                       gint exec_result, me_problem, ss_cause, ussd_str_len;
+                       GVariantBuilder *builder = NULL;
+                       GVariant *ussd_str = NULL;
+
+                       dbg("send ussd : result format (iiivi)");
+
+                       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;
+
+                       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->appsRet.sendUssd.ussdString.string[index]);
+                               g_variant_builder_add(builder, "y", result_info->appsRet.sendUssd.ussdString.string[index]);
+                       }
+                       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 TAPI_SAT_CMD_TYPE_SEND_SMS:{
+                       gint exec_result;
+                       dbg("send sms: result format (i)");
+
+                       exec_result = result_info->appsRet.sendSms.resp;
+                       result = g_variant_new("(i)", exec_result);
+               } break;
+               case TAPI_SAT_CMD_TYPE_SEND_DTMF:{
+                       gint exec_result;
+                       dbg("send DTMF: result format (i)");
+
+                       exec_result = result_info->appsRet.sendDtmf.resp;
+                       result = g_variant_new("(i)", exec_result);
+               } break;
+               case TAPI_SAT_CMD_TYPE_LAUNCH_BROWSER:{
+                       gint exec_result, browser_problem;
+                       dbg("launch browser: result format (ii)");
+
+                       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 TAPI_SAT_CMD_TYPE_SETUP_IDLE_MODE_TEXT:{
+                       gint exec_result;
+                       dbg("setup idle mode text: result format (i)");
+
+                       exec_result = result_info->appsRet.setupIdleModeText.resp;
+                       result = g_variant_new("(i)", exec_result);
+               } break;
+               case TAPI_SAT_CMD_TYPE_LANGUAGE_NOTIFICATION:{
+                       gint exec_result;
+                       dbg("language notification: result format (i)");
+
+                       exec_result = result_info->appsRet.languageNoti.resp;
+                       result = g_variant_new("(i)", exec_result);
+               } break;
+               case TAPI_SAT_CMD_TYPE_PROVIDE_LOCAL_INFO:{
+                       gint exec_result;
+                       dbg("provide local info: result format (i)");
+
+                       exec_result = result_info->appsRet.provideLocalInfo.resp;
+                       result = g_variant_new("(i)", exec_result);
+               } break;
+               case TAPI_SAT_CMD_TYPE_PLAY_TONE:{
+                       gint exec_result;
+                       dbg("play tone: result format (i)");
+
+                       exec_result = result_info->appsRet.playTone.resp;
+                       result = g_variant_new("(i)", exec_result);
+               } break;
+               case TAPI_SAT_CMD_TYPE_DISPLAY_TEXT:{
+                       gint exec_result, me_problem;
+                       dbg("display text: result format (ii)");
+
+                       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->commandType);
+                       break;
+       }
+
+       return result;
+}
+
+static GVariant* _tapi_sat_gen_event_download_data(const TelSatEventDownloadReqInfo_t *pEventData)
+{
+       GVariant *result = NULL;
+
+       switch(pEventData->eventDownloadType)
+       {
+               case TAPI_EVENT_SAT_DW_TYPE_IDLE_SCREEN_AVAILABLE:{
+                       gboolean idle_screen;
+                       dbg("idle screen available (%d)", pEventData->u.bIdleScreenAvailable);
+
+                       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);
+
+                       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);
+
+                       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);
+                       break;
+       }
+
+       return result;
+}
+
+static void on_response_menu_selection_envelop(GObject *source_object, GAsyncResult *res, gpointer user_data)
+{
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+
+       GVariant *rst;
+       struct tapi_resp_data *evt_cb_data = user_data;
+
+       int result = -1;
+       int envelop_rsp = 0;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       rst = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if(!rst){
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &envelop_rsp, evt_cb_data->user_data);
+
+               g_error_free (error);
+               g_free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get (rst, "(ii)", &result, &envelop_rsp);
+       dbg("menu selection 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);
+       }
+
+       g_variant_unref(rst);
+       g_free(evt_cb_data);
+}
+
+static void on_response_download_event_envelop(GObject *source_object, GAsyncResult *res, gpointer user_data)
+{
+       GError *error = NULL;
+       GDBusConnection *conn = NULL;
+
+       GVariant *rst;
+       struct tapi_resp_data *evt_cb_data = user_data;
+
+       int result = -1;
+       int envelop_rsp = 0;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       rst = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if(!rst){
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &envelop_rsp, evt_cb_data->user_data);
+
+               g_error_free (error);
+               g_free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get (rst, "(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);
+       }
+
+       g_variant_unref(rst);
+       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 ");
+
+       if (!handle || !handle->dbus_connection || !pMenuSelect){
+               dbg("invalid parameter");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       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, -1,
+                       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 TapiResult_t.
+ * @param[in]          TelSatEventDownloadReqInfo_t    event download data.
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer              TelSatEventDownloadReqInfo_t
+ */
+EXPORT_API int tel_download_sat_event(TapiHandle *handle, const TelSatEventDownloadReqInfo_t *pEventData, tapi_response_cb callback, void *user_data)
+{
+       gboolean evt_check = FALSE;
+       int g_index = 0;
+       gint event_download_type, src_dev, dest_dev;
+       GVariant *download_data = NULL;
+
+       GVariant *inparam = NULL;
+       struct tapi_resp_data *evt_cb_data = NULL;
+
+       dbg("Func Entrance ");
+
+       if (!handle || !handle->dbus_connection || !pEventData){
+               dbg("invalid parameter");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       for(g_index = 0; g_event_list[g_index] > 0; g_index++){
+               if(g_event_list[g_index] == pEventData->eventDownloadType ){
+                       dbg("event (%d) shoud be passed to sim");
+                       evt_check = TRUE;
+               }
+       }
+
+       if(!evt_check){
+               dbg("sim does not request event(%d)", pEventData->eventDownloadType);
+               return TAPI_API_SAT_EVENT_NOT_REQUIRED_BY_USIM;
+       }
+
+       MAKE_RESP_CB_DATA(evt_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);
+       dbg("event type(%d)", event_download_type);
+       inparam = g_variant_new("(iiiv)", event_download_type, src_dev, dest_dev, download_data);
+
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SAT_INTERFACE, "DownloadEvent", inparam, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
+                       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 TapiResult_t.
+ * @param[out]         TelSatSetupMenuInfo_t   main menu data.
+ * @Interface          Synchronous.
+ * @remark
+ * @Refer              TelSatSetupMenuInfo_t
+ */
+EXPORT_API int tel_get_sat_main_menu_info(TapiHandle *handle, TelSatSetupMenuInfo_t *pMainMenu)
+{
+       GError *error;
+       GVariant *rst = NULL;
+
+       gchar *title;
+       gint result, command_id, item_cnt;
+       gboolean b_present, b_helpinfo, b_updated;
+       GVariant *items = NULL;
+
+       dbg("Func Entrance ");
+
+       if (!handle || !handle->dbus_connection || !pMainMenu){
+               dbg("invalid parameter");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       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, -1, NULL, &error);
+
+       if(!rst){
+               dbg( "error to get main menu(%s)", error->message);
+               g_error_free (error);
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       dbg("menu_info type_format(%s)", g_variant_get_type_string(rst));
+
+       g_variant_get(rst, "(iibs@vibb)", &result, &command_id, &b_present, &title, &items, &item_cnt,
+                       &b_helpinfo, &b_updated);
+
+       pMainMenu->commandId = command_id;
+       pMainMenu->bIsMainMenuPresent = (b_present ? 1 : 0);
+       memcpy(pMainMenu->satMainTitle, title, TAPI_SAT_DEF_TITLE_LEN_MAX+1);
+       pMainMenu->satMainMenuNum = 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)){
+                       pMainMenu->satMainMenuItem[index].itemId = item_id;
+                       memcpy(pMainMenu->satMainMenuItem[index].itemString, item_str, TAPI_SAT_DEF_ITEM_STR_LEN_MAX + 6);
+                       dbg("item index(%d) id(%d) str(%s)",index, pMainMenu->satMainMenuItem[index].itemId, pMainMenu->satMainMenuItem[index].itemString);
+                       //dbg("item index(%d) id(%d) str(%s)",index, item_id, item_str);
+                       index++;
+               }
+               g_variant_iter_free(iter);
+       }
+       pMainMenu->bIsSatMainMenuHelpInfo = (b_helpinfo ? 1 : 0);
+       pMainMenu->bIsUpdatedSatMainMenu = (b_updated ? 1 : 0);
+
+       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 TapiResult_t.
+ * @param[in]          TelSatUiDisplayStatusType_t     display status data.
+ command_id    command identifier
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer              TelSatUiDisplayStatusType_t
+ */
+EXPORT_API int tel_send_sat_ui_display_status(TapiHandle *handle, int commandId, TelSatUiDisplayStatusType_t status)
+{
+       GError *error;
+       GVariant *rst = NULL;
+
+       gint result, command_id;
+       gboolean display_status;
+       GVariant *inparam = NULL;
+
+       dbg("Func Entrance ");
+
+       if (!handle || !handle->dbus_connection){
+               dbg("invalid parameter");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       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, -1, NULL, &error);
+
+       if(!rst){
+               dbg( "error to send ui display status(%s)", error->message);
+               g_error_free (error);
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       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;
+       }
+       dbg("result (%d)", result);
+
+       return result;
+}
+
+/**
+ *
+ * API to send UI user confirmation data.
+ *
+ * @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          Asynchronous.
+ * @remark
+ * @Refer
+ */
+EXPORT_API int tel_send_sat_ui_user_confirm(TapiHandle *handle, TelSatUiUserConfirmInfo_t *pUserConfirmData)
+{
+       GError *error;
+       GVariant *rst = NULL;
+       GVariantBuilder *builder = NULL;
+       GVariant *inner_gv = NULL;
+
+       int index = 0;
+       gchar *data;
+       gint result, command_id, command_type, key_type, data_len;
+       GVariant *inparam = NULL;
+
+       dbg("Func Entrance ");
+
+       if (!handle || !handle->dbus_connection || !pUserConfirmData){
+               dbg("invalid parameter");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       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]);
+       }
+       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, -1, NULL, &error);
+
+       if(!rst){
+               dbg( "error to send ui user confirm(%s)", error->message);
+               g_error_free (error);
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       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;
+       }
+       dbg("result (%d)", result);
+
+       return result;
+}
+
+/**
+ *
+ * API to send application excution result.
+ *
+ * @return             values in enum TapiResult_t.
+ * @param[in]          TelSatAppsRetInfo_t     application result information data.
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer              TelSatAppsRetInfo_t
+ */
+EXPORT_API int tel_send_sat_app_exec_result(TapiHandle *handle, TelSatAppsRetInfo_t *pAppRetInfo)
+{
+       GError *error;
+       GVariant *rst = NULL;
+
+       gint result, command_id, command_type;
+       GVariant *app_exec_result = NULL;
+       GVariant *inparam = NULL;
+
+       dbg("Func Entrance ");
+
+       if (!handle || !handle->dbus_connection || !pAppRetInfo){
+               dbg("invalid parameter");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       command_id = pAppRetInfo->commandId;
+       command_type = pAppRetInfo->commandType;
+       app_exec_result = _tapi_sat_gen_app_exec_result_data(pAppRetInfo);
+
+       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);
+
+       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, -1, NULL, &error);
+
+       if(!rst){
+               dbg( "error to send app execution result(%s)", error->message);
+               g_error_free (error);
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       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;
+       }
+       dbg("result (%d)", result);
+
+       return result;
+}
diff --git a/src/tapi_sim.c b/src/tapi_sim.c
new file mode 100644 (file)
index 0000000..d2cdaee
--- /dev/null
@@ -0,0 +1,2469 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2012 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 "tapi_common.h"
+#include "TapiUtility.h"
+#include "TelSim.h"
+
+#include "common.h"
+#include "tapi_log.h"
+#include "ITapiSim.h"
+
+static int _tel_check_tapi_state()
+{
+       return 0;
+}
+
+static int _tel_check_sim_state(TapiHandle *handle)
+{
+       GError *gerr = NULL;
+       GVariant *sync_gv = NULL;
+       int api_err = TAPI_API_SUCCESS;
+       TelSimCardStatus_t init_status = 0;
+       int changed = FALSE;
+
+       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, -1, NULL, &gerr);
+
+       if (sync_gv) {
+               g_variant_get(sync_gv, "(ib)", &init_status, &changed);
+               dbg("init_status[%d]",init_status);
+
+               switch(init_status){
+                       case TAPI_SIM_STATUS_CARD_NOT_PRESENT :
+                       case TAPI_SIM_STATUS_CARD_REMOVED :
+                               api_err = TAPI_API_SIM_NOT_FOUND;
+                               break;
+                       case TAPI_SIM_STATUS_CARD_BLOCKED :
+                       case TAPI_SIM_STATUS_CARD_ERROR :
+                               api_err = TAPI_API_SIM_CARD_ERROR;
+                               break;
+                       case TAPI_SIM_STATUS_SIM_INITIALIZING :
+                               api_err = TAPI_API_SIM_NOT_INITIALIZED;
+                               break;
+                       case TAPI_SIM_STATUS_SIM_INIT_COMPLETED :
+                               api_err = TAPI_API_SUCCESS;
+                               break;
+                       case TAPI_SIM_STATUS_SIM_PIN_REQUIRED :
+                       case TAPI_SIM_STATUS_SIM_PUK_REQUIRED :
+                       case TAPI_SIM_STATUS_SIM_NCK_REQUIRED :
+                       case TAPI_SIM_STATUS_SIM_NSCK_REQUIRED :
+                       case TAPI_SIM_STATUS_SIM_SPCK_REQUIRED :
+                       case TAPI_SIM_STATUS_SIM_CCK_REQUIRED :
+                       case TAPI_SIM_STATUS_SIM_LOCK_REQUIRED :
+                               api_err = TAPI_API_SIM_LOCKED;
+                               break;
+                       case TAPI_SIM_STATUS_UNKNOWN:
+                               api_err = TAPI_API_SERVICE_NOT_READY;
+                               break;
+                       default:
+                               dbg("not handled status[%d] in here",init_status);
+                               break;
+               }
+       } else {
+               dbg( "g_dbus_conn failed in _tel_check_sim_state. error (%s)", gerr->message);
+               g_error_free(gerr);
+               return TAPI_API_OPERATION_FAILED;
+       }
+       dbg("api_err[%d]", api_err);
+       return api_err;
+}
+
+static void on_response_get_sim_iccid(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;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
+       TelSimIccIdInfo_t iccid_info;
+       gchar *iccid = NULL;
+
+       dbg("Func Entrance");
+       memset(&iccid_info, 0, sizeof(TelSimIccIdInfo_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       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);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &iccid_info, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_get_sim_language(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;
+       TelSimLanguagePreferenceCode_t lang = TAPI_SIM_LP_LANG_UNSPECIFIED;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
+
+       dbg("Func Entrance");
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get(dbus_result, "(ii)", &result, &lang);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &lang, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_set_sim_language(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;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
+
+       dbg("Func Entrance");
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       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);
+       }
+
+       free(evt_cb_data);
+}
+
+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;
+
+       memset(&cf, 0, sizeof(TelSimCallForwardingResp_t));
+
+       dbg("Func Entrance");
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+       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);
+
+               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")) {
+                                       cf.cf_list.cf[i].rec_index = g_variant_get_int32(value);
+                               }
+                               if (!g_strcmp0(key, "msp_num")) {
+                                       cf.cf_list.cf[i].msp_num = g_variant_get_byte(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++;
+                       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, &cf, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_set_sim_callforwarding_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;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
+
+       dbg("Func Entrance");
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       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);
+       }
+
+       free(evt_cb_data);
+}
+
+
+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;
+
+       dbg("Func Entrance");
+       memset(&mw, 0, sizeof(TelSimMessageWaitingResp_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       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);
+                       }
+               }
+
+       } else {
+               mw.mw_list.profile_count = g_variant_iter_n_children(iter);
+
+               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);
+               }
+               g_variant_iter_free(iter);
+       }
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &mw, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_set_sim_messagewaiting_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;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
+
+       dbg("Func Entrance");
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       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);
+       }
+
+       free(evt_cb_data);
+}
+
+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;
+
+       dbg("Func Entrance");
+       memset(&list, 0, sizeof(TelSimMailboxList_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get(dbus_result, "(ibaa{sv})", &result, &b_cphs, &iter);
+       list.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)) {
+                       list.list[i].b_cphs = b_cphs;
+
+                       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);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &list, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_set_sim_mailbox_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;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
+
+       dbg("Func Entrance");
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       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);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_get_sim_cphs_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;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
+       TelSimCphsInfo_t cphs;
+
+       dbg("Func Entrance");
+       memset(&cphs, 0, sizeof(TelSimCphsInfo_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get(dbus_result, "(iibbbbb)", &result, &cphs.CphsPhase,
+                       &cphs.CphsServiceTable.bOperatorNameShortForm, &cphs.CphsServiceTable.bMailBoxNumbers,
+                       &cphs.CphsServiceTable.bServiceStringTable,
+                       &cphs.CphsServiceTable.bCustomerServiceProfile,
+                       &cphs.CphsServiceTable.bInformationNumbers);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &cphs, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_get_sim_msisdn(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;
+       TelSimMsisdnList_t list;
+       int i = 0;
+
+       dbg("Func Entrance");
+       memset(&list, 0, sizeof(TelSimMsisdnList_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get(dbus_result, "(iaa{sv})", &result, &iter);
+       list.count = g_variant_iter_n_children(iter);
+
+       /*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*/
+
+       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);
+
+       dbg("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);
+       }
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &list, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_get_sim_oplmnwact(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;
+       TelSimOplmnwactList_t list;
+       int i = 0;
+
+       dbg("Func Entrance");
+       memset(&list, 0, sizeof(TelSimOplmnwactList_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get(dbus_result, "(iaa{sv})", &result, &iter);
+       list.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")) {
+                               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);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &list, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_get_sim_spn(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;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
+       TelSimSpn_t spn_info;
+       gchar *spn = NULL;
+       guchar dc = 0;
+
+       memset(&spn_info, 0, sizeof(TelSimSpn_t));
+
+       dbg("Func Entrance");
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get(dbus_result, "(iys)", &result, &dc, &spn);
+
+       dbg("result[%d]", result);
+       if ( result == TAPI_SIM_ACCESS_SUCCESS) {
+               dbg("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);
+       }
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &spn_info, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_get_sim_cphs_netname(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;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
+       TelSimCphsNetName_t cphs_net;
+       gchar *full_name = NULL;
+       gchar *short_name = NULL;
+
+       memset(&cphs_net, 0, sizeof(TelSimCphsNetName_t));
+
+       dbg("Func Entrance");
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get(dbus_result, "(iss)", &result, &full_name, &short_name);
+
+       dbg("result[%d]", result);
+       if ( result == TAPI_SIM_ACCESS_SUCCESS) {
+               dbg("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);
+       }
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &cphs_net, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+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;
+
+       dbg("Func Entrance");
+       memset(&auth_resp, 0, sizeof(TelSimAuthenticationResponse_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       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;
+               dbg("auth_resp.authentication_key[%d]=[0x%02x]", i, auth_resp.authentication_key[i]);
+               i++;
+       }
+       auth_resp.authentication_key_length = i;
+       g_variant_iter_free(iter);
+       i = 0;
+
+       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;
+               dbg("auth_resp.cipher_data[%d]=[0x%02x]", i, auth_resp.cipher_data[i]);
+               i++;
+       }
+       auth_resp.cipher_length = i;
+       g_variant_iter_free(iter);
+       i = 0;
+
+       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;
+               dbg("auth_resp.integrity_data[%d]=[0x%02x]", i, auth_resp.integrity_data[i]);
+               i++;
+       }
+       auth_resp.integrity_length = i;
+       g_variant_iter_free(iter);
+       i = 0;
+
+       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;
+               dbg("auth_resp.resp_data[%d]=[0x%02x]", i, auth_resp.resp_data[i]);
+               i++;
+       }
+       auth_resp.resp_length = i;
+       g_variant_iter_free(iter);
+       i = 0;
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &auth_resp, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_verify_sim_pins(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;
+       TelSimPinOperationResult_t result = TAPI_SIM_PIN_OPERATION_SUCCESS;
+       TelSimSecResult_t sec_rt;
+
+       dbg("Func Entrance");
+       memset(&sec_rt, 0, sizeof(TelSimSecResult_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       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);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_verify_sim_puks(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;
+       TelSimPinOperationResult_t result = TAPI_SIM_PIN_OPERATION_SUCCESS;
+       TelSimSecResult_t sec_rt;
+
+       dbg("Func Entrance");
+       memset(&sec_rt, 0, sizeof(TelSimSecResult_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       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);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_change_sim_pins(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;
+       TelSimPinOperationResult_t result = TAPI_SIM_PIN_OPERATION_SUCCESS;
+       TelSimSecResult_t sec_rt;
+
+       dbg("Func Entrance");
+       memset(&sec_rt, 0, sizeof(TelSimSecResult_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       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);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_disable_sim_facility(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;
+       TelSimPinOperationResult_t result = TAPI_SIM_PIN_OPERATION_SUCCESS;
+       TelSimFacilityResult_t f_rt;
+
+       dbg("Func Entrance");
+       memset(&f_rt, 0, sizeof(TelSimFacilityResult_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get(dbus_result, "(iii)", &result, &f_rt.type, &f_rt.retry_count);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &f_rt, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_enable_sim_facility(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;
+       TelSimPinOperationResult_t result = TAPI_SIM_PIN_OPERATION_SUCCESS;
+       TelSimFacilityResult_t f_rt;
+
+       dbg("Func Entrance");
+       memset(&f_rt, 0, sizeof(TelSimFacilityResult_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get(dbus_result, "(iii)", &result, &f_rt.type, &f_rt.retry_count);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &f_rt, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_get_sim_facility(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;
+       TelSimPinOperationResult_t result = TAPI_SIM_PIN_OPERATION_SUCCESS;
+       TelSimFacilityInfo_t fi;
+
+       dbg("Func Entrance");
+       memset(&fi, 0, sizeof(TelSimFacilityInfo_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get(dbus_result, "(iii)", &result, &fi.type, &fi.f_status);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &fi, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+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;
+
+       struct tapi_resp_data *evt_cb_data = user_data;
+       TelSimPinOperationResult_t result = TAPI_SIM_PIN_OPERATION_SUCCESS;
+       TelSimLockInfo_t lock;
+
+       dbg("Func Entrance");
+       memset(&lock, 0, sizeof(TelSimLockInfo_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get(dbus_result, "(iiii)", &result, &lock.lock_type, &lock.lock_status,
+                       &lock.retry_count);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &lock, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_req_sim_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;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
+       TelSimApduResp_t r_apdu;
+
+       dbg("Func Entrance");
+       memset(&r_apdu, 0, sizeof(TelSimApduResp_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       /*      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_resp[i] = rt_i;
+               i++;
+       }
+       r_apdu.apdu_resp_len = (unsigned char) i;
+       g_variant_iter_free(iter);
+       g_variant_unref(inner_gv);
+       g_variant_unref(param_gv);
+       /*              for(i=0; i < (int)r_apdu.apdu_resp_len; i++)
+        dbg("apdu[%d][0x%02x]",i, r_apdu.apdu_resp[i]);*/
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &r_apdu, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_req_sim_atr(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;
+       TelSimAccessResult_t result = TAPI_SIM_ACCESS_SUCCESS;
+       TelSimAtrResp_t r_atr;
+
+       dbg("Func Entrance");
+       memset(&r_atr, 0, sizeof(TelSimAtrResp_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       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_resp[i] = rt_i;
+               i++;
+       }
+       r_atr.atr_resp_len = (unsigned char) i;
+       g_variant_iter_free(iter);
+       g_variant_unref(inner_gv);
+       g_variant_unref(param_gv);
+       /*              for(i=0; i < (int)r_atr.atr_resp_len; i++)
+        dbg("r_atr[%d][0x%02x]",i, r_atr.atr_resp[i]);*/
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &r_atr, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+EXPORT_API int tel_get_sim_init_info(TapiHandle *handle, TelSimCardStatus_t *sim_status,
+               int *card_changed)
+{
+       GError *gerr = NULL;
+       GVariant *sync_gv = NULL;
+       int api_err = TAPI_API_SUCCESS;
+       TelSimCardStatus_t init_status = 0;
+       int changed = FALSE;
+
+       dbg("Func Entrance");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(sim_status, TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(card_changed, TAPI_API_INVALID_PTR);
+
+       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, -1, NULL, &gerr);
+
+       if (sync_gv) {
+               g_variant_get(sync_gv, "(ib)", &init_status, &changed);
+               *sim_status = init_status;
+               *card_changed = changed;
+               dbg("init_status[%d]",init_status); dbg("changed[%d]",changed);
+       } else {
+               dbg( "g_dbus_conn failed. error (%s)", gerr->message);
+               g_error_free(gerr);
+               return TAPI_API_OPERATION_FAILED;
+       }
+       return api_err;
+}
+
+EXPORT_API int tel_get_sim_type(TapiHandle *handle, TelSimCardType_t *card_type)
+{
+       GError *gerr = NULL;
+       GVariant *sync_gv = NULL;
+       int sim_ret =0;
+
+       dbg("Func Entrance");
+
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(card_type, TAPI_API_INVALID_PTR);
+
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       sim_ret = _tel_check_sim_state(handle);
+       if (sim_ret == TAPI_API_SIM_CARD_ERROR || sim_ret == TAPI_API_SIM_NOT_FOUND)
+               return sim_ret;
+
+       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, -1, NULL, &gerr);
+
+       if (sync_gv) {
+               g_variant_get(sync_gv, "(i)", card_type);
+       } else {
+               dbg( "g_dbus_conn failed. error (%s)", gerr->message);
+               g_error_free(gerr);
+               return TAPI_API_OPERATION_FAILED;
+       }
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_sim_imsi(TapiHandle *handle, TelSimImsiInfo_t *imsi)
+{
+       GError *gerr = NULL;
+       GVariant *sync_gv = NULL;
+       gchar *gplmn = NULL;
+       gchar *gmsin = NULL;
+       int sim_ret = 0;
+
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       dbg("Func Entrance");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       sim_ret =_tel_check_sim_state(handle);
+       if (sim_ret != TAPI_API_SUCCESS)
+               return sim_ret;
+
+       TAPI_RETURN_VAL_IF_FAIL(imsi, TAPI_API_INVALID_PTR);
+
+       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, -1, NULL, &gerr);
+
+       if (sync_gv) {
+               dbg("imsi type_format(%s)", g_variant_get_type_string(sync_gv));
+               g_variant_get(sync_gv, "(ss)", &gplmn, &gmsin);
+
+               dbg("gplmn[%s],gmsin[%s]",gplmn,gmsin);
+               snprintf(imsi->szMcc, 3 + 1, "%s", gplmn);
+               snprintf(imsi->szMnc, strlen((const char*)gplmn) - 3 + 1, "%s", &gplmn[3]);
+               snprintf(imsi->szMsin, strlen((const char*)gmsin) + 1, "%s", gmsin);
+
+               dbg("imsi->szMnc[%s]", imsi->szMnc);
+               dbg("imsi->szMcc[%s]", imsi->szMcc);
+       } else {
+               dbg( "g_dbus_conn failed. error (%s)", gerr->message);
+               g_error_free(gerr);
+               return TAPI_API_OPERATION_FAILED;
+       }
+       return TAPI_API_SUCCESS;
+}
+
+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;
+       int sim_ret = 0;
+
+       dbg("Func Entrance");
+       memset(ecc, 0, sizeof(TelSimEccList_t));
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(ecc, TAPI_API_INVALID_PTR);
+
+       sim_ret =_tel_check_sim_state(handle);
+       if (sim_ret == TAPI_API_SIM_CARD_ERROR || sim_ret == TAPI_API_SIM_NOT_FOUND)
+               return sim_ret;
+
+       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, -1, NULL, &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);
+               dbg("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, &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, "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 {
+               dbg( "g_dbus_conn failed. error (%s)", gerr->message);
+               g_error_free(gerr);
+               return TAPI_API_OPERATION_FAILED;
+       }
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_sim_iccid(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       int sim_ret = 0;
+
+       dbg("Func Entrance ");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       sim_ret =_tel_check_sim_state(handle);
+       if (sim_ret == TAPI_API_SIM_CARD_ERROR || sim_ret == TAPI_API_SIM_NOT_FOUND)
+               return sim_ret;
+
+       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_SIM_INTERFACE, "GetICCID", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_get_sim_iccid, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_sim_language(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       int sim_ret = 0;
+
+       dbg("Func Entrance ");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       sim_ret =_tel_check_sim_state(handle);
+       if (sim_ret == TAPI_API_SIM_CARD_ERROR || sim_ret == TAPI_API_SIM_NOT_FOUND)
+               return sim_ret;
+
+       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_SIM_INTERFACE, "GetLanguage", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
+                       handle->ca, on_response_get_sim_language, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+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;
+       int sim_ret = 0;
+
+       dbg("Func Entrance w/ lang[%d]",language);
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       sim_ret =_tel_check_sim_state(handle);
+       if (sim_ret != TAPI_API_SUCCESS)
+               return sim_ret;
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(i)", language);
+
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "SetLanguage", param, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
+                       handle->ca, on_response_set_sim_language, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+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;
+       int sim_ret = 0;
+
+       dbg("Func Entrance ");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       sim_ret =_tel_check_sim_state(handle);
+       if (sim_ret != TAPI_API_SUCCESS)
+               return sim_ret;
+
+       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_SIM_INTERFACE, "GetCallForwarding", NULL, NULL, G_DBUS_CALL_FLAGS_NONE,
+                       -1, handle->ca, on_response_get_sim_callforwarding_info, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+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;
+       int sim_ret = 0;
+       gchar *g_number = NULL;
+
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       sim_ret =_tel_check_sim_state(handle);
+       if (sim_ret != TAPI_API_SUCCESS)
+               return sim_ret;
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       g_number = calloc(strlen((const char*)&req_cf->cf_data_u.cf.cfu_num)+1, 1);
+       if (!g_number) {
+               g_free(evt_cb_data);
+               return TAPI_API_SYSTEM_OUT_OF_MEM;
+       }
+
+       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));
+
+       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);
+
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "SetCallForwarding", param, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
+                       handle->ca, on_response_set_sim_callforwarding_info, evt_cb_data);
+
+       if (g_number)
+               free(g_number);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_sim_messagewaiting_info(TapiHandle *handle, tapi_response_cb callback,
+               void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       int sim_ret = 0;
+
+       dbg("Func Entrance ");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       sim_ret =_tel_check_sim_state(handle);
+       if (sim_ret != TAPI_API_SUCCESS)
+               return sim_ret;
+
+       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_SIM_INTERFACE, "GetMessageWaiting", NULL, NULL, G_DBUS_CALL_FLAGS_NONE,
+                       -1, handle->ca, on_response_get_sim_messagewaiting_info, evt_cb_data);
+
+       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;
+       int sim_ret = 0;
+
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       sim_ret =_tel_check_sim_state(handle);
+       if (sim_ret != TAPI_API_SUCCESS)
+               return sim_ret;
+
+       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, -1,
+                       handle->ca, on_response_set_sim_messagewaiting_info, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+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;
+       int sim_ret = 0;
+
+       dbg("Func Entrance ");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       sim_ret =_tel_check_sim_state(handle);
+       if (sim_ret != TAPI_API_SUCCESS)
+               return sim_ret;
+
+       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_SIM_INTERFACE, "GetMailbox", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
+                       handle->ca, on_response_get_sim_mailbox_info, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_set_sim_mailbox_info(TapiHandle *handle, TelSimMailBoxNumber_t *req_mb,
+               tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
+       int sim_ret = 0;
+       gchar *g_alpha = NULL;
+       gchar *g_number = NULL;
+
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       sim_ret =_tel_check_sim_state(handle);
+       if (sim_ret != TAPI_API_SUCCESS)
+               return sim_ret;
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       g_alpha = calloc(strlen((const char*)&req_mb->alpha_id)+1, 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(strlen((const char*)&req_mb->num)+1, 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, -1,
+                       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;
+}
+
+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;
+       int sim_ret = 0;
+
+       dbg("Func Entrance ");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       sim_ret =_tel_check_sim_state(handle);
+       if (sim_ret == TAPI_API_SIM_CARD_ERROR || sim_ret == TAPI_API_SIM_NOT_FOUND)
+               return sim_ret;
+
+       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_SIM_INTERFACE, "GetCPHSInfo", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_get_sim_cphs_info, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_sim_msisdn(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       int sim_ret = 0;
+
+       dbg("Func Entrance ");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       sim_ret =_tel_check_sim_state(handle);
+       if (sim_ret != TAPI_API_SUCCESS)
+               return sim_ret;;
+
+       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_SIM_INTERFACE, "GetMSISDN", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_get_sim_msisdn, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_sim_oplmnwact(TapiHandle *handle, tapi_response_cb callback,
+               void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       int sim_ret = 0;
+
+       dbg("Func Entrance ");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       sim_ret =_tel_check_sim_state(handle);
+       if (sim_ret != TAPI_API_SUCCESS)
+               return sim_ret;
+
+       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_SIM_INTERFACE, "GetOplmnwact", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
+                       handle->ca, on_response_get_sim_oplmnwact, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_sim_spn(TapiHandle *handle, tapi_response_cb callback,
+               void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       int sim_ret = 0;
+
+       dbg("Func Entrance ");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       sim_ret =_tel_check_sim_state(handle);
+       if (sim_ret == TAPI_API_SIM_CARD_ERROR || sim_ret == TAPI_API_SIM_NOT_FOUND)
+               return sim_ret;
+
+       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_SIM_INTERFACE, "GetSpn", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
+                       handle->ca, on_response_get_sim_spn, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_sim_cphs_netname(TapiHandle *handle, tapi_response_cb callback,
+               void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       int sim_ret = 0;
+
+       dbg("Func Entrance ");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       sim_ret =_tel_check_sim_state(handle);
+       if (sim_ret != TAPI_API_SUCCESS)
+               return sim_ret;
+
+       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_SIM_INTERFACE, "GetCphsNetName", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
+                       handle->ca, on_response_get_sim_cphs_netname, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_req_sim_authentication(TapiHandle *handle,
+               TelSimAuthenticationData_t *authentication_data, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariantBuilder *builder = NULL;
+       GVariant *param = NULL;
+       GVariant *rand_gv = NULL;
+       GVariant *autn_gv = NULL;
+       int i =0;
+       int sim_ret = 0;
+
+       dbg("Func Entrance ");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       sim_ret =_tel_check_sim_state(handle);
+       if (sim_ret == TAPI_API_SIM_CARD_ERROR || sim_ret == TAPI_API_SIM_NOT_FOUND)
+               return sim_ret;
+
+       TAPI_RETURN_VAL_IF_FAIL(authentication_data, TAPI_API_INVALID_PTR);
+
+       if (authentication_data->auth_type > TAPI_SIM_AUTH_TYPE_3G)
+               return TAPI_API_INVALID_INPUT;
+
+       if (authentication_data->rand_length == 0)
+               return TAPI_API_INVALID_INPUT;
+
+       if (authentication_data->auth_type != TAPI_SIM_AUTH_TYPE_GSM
+                       && authentication_data->autn_length == 0)
+               return TAPI_API_INVALID_INPUT;
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       builder = g_variant_builder_new(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]);
+       }
+       rand_gv = g_variant_builder_end(builder);
+
+       builder = g_variant_builder_new(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_variant_builder_unref (builder);*/
+
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "Authentication", param, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
+                       handle->ca, on_response_req_sim_authentication, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_verifiy_sim_pins(TapiHandle *handle, const TelSimSecPw_t *pin_data,
+               tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
+       gchar *gpw = NULL;
+       int sim_ret = 0;
+
+       dbg("Func Entrance");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       sim_ret =_tel_check_sim_state(handle);
+       if (sim_ret == TAPI_API_SIM_CARD_ERROR || sim_ret == TAPI_API_SIM_NOT_FOUND)
+               return sim_ret;
+
+       TAPI_RETURN_VAL_IF_FAIL(pin_data, TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(pin_data->pw, TAPI_API_INVALID_PTR);
+
+       dbg("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 ((pin_data->pw_len < 4) || (pin_data->pw_len > 8))
+               return TAPI_API_INVALID_INPUT;
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       gpw = calloc(pin_data->pw_len+1, 1);
+       if (!gpw) {
+               g_free(evt_cb_data);
+               return TAPI_API_SYSTEM_OUT_OF_MEM;
+       }
+
+       memcpy((void*)gpw, (const void*)pin_data->pw, pin_data->pw_len);
+
+       param = g_variant_new("(is)", pin_data->type, gpw);
+
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "VerifySec", param, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
+                       handle->ca, on_response_verify_sim_pins, evt_cb_data);
+
+       if (gpw)
+               free(gpw);
+
+       return TAPI_API_SUCCESS;
+}
+
+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;
+       int sim_ret = 0;
+
+       dbg("Func Entrance");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       sim_ret =_tel_check_sim_state(handle);
+       if (sim_ret == TAPI_API_SIM_CARD_ERROR || sim_ret == TAPI_API_SIM_NOT_FOUND)
+               return sim_ret;
+
+       TAPI_RETURN_VAL_IF_FAIL((puk_data != NULL && new_pin_data != NULL), TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL((puk_data->pw != NULL && new_pin_data->pw != NULL),     TAPI_API_INVALID_PTR);
+
+       dbg("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;
+
+       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;
+
+       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;
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       gpin = calloc(new_pin_data->pw_len+1, 1);
+       if (!gpin) {
+               g_free(evt_cb_data);
+               return TAPI_API_SYSTEM_OUT_OF_MEM;
+       }
+
+       gpuk = calloc(puk_data->pw_len+1, 1);
+       if (!gpuk) {
+               g_free(evt_cb_data);
+               free(gpin);
+               return TAPI_API_SYSTEM_OUT_OF_MEM;
+       }
+
+       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, -1,
+                       handle->ca, on_response_verify_sim_puks, evt_cb_data);
+
+       if (gpin)
+               free(gpin);
+
+       if (gpuk)
+               free(gpuk);
+
+       return TAPI_API_SUCCESS;
+}
+
+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)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
+       gchar *gpin_o = NULL;
+       gchar *gpin_n = NULL;
+       int sim_ret = 0;
+
+       dbg("Func Entrance");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       sim_ret =_tel_check_sim_state(handle);
+       if (sim_ret != TAPI_API_SUCCESS)
+               return sim_ret;
+
+       TAPI_RETURN_VAL_IF_FAIL((old_pin != NULL && new_pin != NULL), TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL((old_pin->pw != NULL && new_pin->pw != NULL), TAPI_API_INVALID_PTR);
+
+       dbg("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;
+
+       if (old_pin->type != new_pin->type)
+               return TAPI_API_INVALID_INPUT;
+
+       if ((old_pin->pw_len < 4) || (old_pin->pw_len > 8))
+               return TAPI_API_INVALID_INPUT;
+
+       if ((new_pin->pw_len < 4) || (new_pin->pw_len > 8))
+               return TAPI_API_INVALID_INPUT;
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       gpin_o = calloc(old_pin->pw_len+1, 1);
+       if (!gpin_o) {
+               g_free(evt_cb_data);
+               return TAPI_API_SYSTEM_OUT_OF_MEM;
+       }
+
+       gpin_n = calloc(new_pin->pw_len+1, 1);
+       if (!gpin_n) {
+               free(gpin_o);
+               g_free(evt_cb_data);
+               return TAPI_API_SYSTEM_OUT_OF_MEM;
+       }
+
+       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);
+
+       param = g_variant_new("(iss)", old_pin->type, gpin_o, gpin_n);
+       dbg("old_pin len[%d],new_pin len[%d]", old_pin->pw_len, new_pin->pw_len);
+
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "ChangePIN", param, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
+                       handle->ca, on_response_change_sim_pins, evt_cb_data);
+
+       if (gpin_o)
+               free(gpin_o);
+
+       if (gpin_n)
+               free(gpin_n);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_disable_sim_facility(TapiHandle *handle, TelSimFacilityPw_t *pw,
+               tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
+       gchar *gpw = NULL;
+       int sim_ret = 0;
+
+       dbg("Func Entrance");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       sim_ret =_tel_check_sim_state(handle);
+       if (sim_ret != TAPI_API_SUCCESS)
+               return sim_ret;
+
+       TAPI_RETURN_VAL_IF_FAIL(pw, TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(pw->pw, TAPI_API_INVALID_PTR);
+
+       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;
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       gpw = calloc(pw->pw_len+1, 1);
+       if (!gpw) {
+               g_free(evt_cb_data);
+               return TAPI_API_SYSTEM_OUT_OF_MEM;
+       }
+
+       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,
+                       -1, handle->ca, on_response_disable_sim_facility, evt_cb_data);
+
+       if (gpw)
+               free(gpw);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_enable_sim_facility(TapiHandle *handle, TelSimFacilityPw_t *pw,
+               tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
+       gchar *gpw = NULL;
+       int sim_ret = 0;
+
+       dbg("Func Entrance");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       sim_ret =_tel_check_sim_state(handle);
+       if (sim_ret != TAPI_API_SUCCESS)
+               return sim_ret;
+
+       TAPI_RETURN_VAL_IF_FAIL(pw, TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(pw->pw, TAPI_API_INVALID_PTR);
+
+       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;
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       gpw = calloc(pw->pw_len+1, 1);
+       if (!gpw) {
+               g_free(evt_cb_data);
+               return TAPI_API_SYSTEM_OUT_OF_MEM;
+       }
+
+       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, "EnableFacility", param, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
+                       handle->ca, on_response_enable_sim_facility, evt_cb_data);
+
+       if (gpw)
+               free(gpw);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_sim_facility(TapiHandle *handle, TelSimLockType_t type,
+               tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param = NULL;
+       int sim_ret = 0;
+
+       dbg("Func Entrance");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       sim_ret =_tel_check_sim_state(handle);
+       if (sim_ret != TAPI_API_SUCCESS)
+               return sim_ret;
+
+       dbg("facility type[%d]", type);
+       if(type < TAPI_SIM_LOCK_PS || type >TAPI_SIM_LOCK_PC)
+               return TAPI_API_INVALID_INPUT;
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(i)", type);
+
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "GetFacility", param, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
+                       handle->ca, on_response_get_sim_facility, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+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;
+       int sim_ret = 0;
+
+       dbg("Func Entrance");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       sim_ret =_tel_check_sim_state(handle);
+       if (sim_ret != TAPI_API_SUCCESS && sim_ret != TAPI_API_SIM_LOCKED)
+               return sim_ret;
+
+       dbg("lock type[%d]", type);
+       if(type < TAPI_SIM_LOCK_PS || type >TAPI_SIM_LOCK_PC)
+               return TAPI_API_INVALID_INPUT;
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(i)", type);
+
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "GetLockInfo", param, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
+                       handle->ca, on_response_get_sim_lock_info, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+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 = NULL;
+       GVariant *param = NULL;
+       GVariant *inner_gv = NULL;
+       int i = 0;
+       int sim_ret = 0;
+
+       dbg("Func Entrance");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       sim_ret =_tel_check_sim_state(handle);
+       if (sim_ret == TAPI_API_SIM_CARD_ERROR || sim_ret == TAPI_API_SIM_NOT_FOUND)
+               return sim_ret;
+
+       TAPI_RETURN_VAL_IF_FAIL(apdu_data, TAPI_API_INVALID_PTR);
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       builder = g_variant_builder_new(G_VARIANT_TYPE ("ay"));
+       for (i = 0; i < apdu_data->apdu_len; i++) {
+               dbg("apdu_data->apdu[%d][0x%02x]", i,apdu_data->apdu[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);
+       /*g_variant_builder_unref (builder);*/
+
+       g_dbus_connection_call(handle->dbus_connection, DBUS_TELEPHONY_SERVICE, handle->path,
+                       DBUS_TELEPHONY_SIM_INTERFACE, "TransferAPDU", param, NULL, G_DBUS_CALL_FLAGS_NONE, -1,
+                       handle->ca, on_response_req_sim_apdu, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_req_sim_atr(TapiHandle *handle, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       int sim_ret = 0;
+
+       dbg("Func Entrance");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+
+       sim_ret =_tel_check_sim_state(handle);
+       if (sim_ret == TAPI_API_SIM_CARD_ERROR || sim_ret == TAPI_API_SIM_NOT_FOUND)
+               return sim_ret;
+
+       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_SIM_INTERFACE, "GetATR", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_req_sim_atr, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
diff --git a/src/tapi_sms.c b/src/tapi_sms.c
new file mode 100644 (file)
index 0000000..6188d54
--- /dev/null
@@ -0,0 +1,1522 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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.
+ */
+
+
+/**
+ * @ingroup    TAPI
+ * @defgroup   SMS
+ * @{
+ *
+ * SMS APIs allow a client to accomplish the following features: @n
+ * - Send, Recieve, Save, Delete, Read short messages  @n
+ * - Set and Get information like Service Center Address, Cell Broadcast configuration,Preferred Bearer, SMS parameters @n
+ * - Retrieve information like Current Memory selected, NetTextCount related to the messages @n
+ * - Set delivery report @n
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "tapi_common.h"
+#include "TapiUtility.h"
+#include "TelSms.h"
+
+#include "common.h"
+#include "tapi_log.h"
+#include "ITapiNetText.h"
+
+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;
+
+       GVariant *dbus_result = NULL;
+       int data = 0;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data) {
+                       if (evt_cb_data->cb_fn) {
+                               evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+                       }
+
+                       free(evt_cb_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               return;
+       }
+
+       dbg("on_response_default type_format(%s)", g_variant_get_type_string(dbus_result));
+
+       g_variant_get (dbus_result, "(i)", &result);
+
+       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);
+               }
+
+               free(evt_cb_data);
+       }
+}
+
+static void on_response_read_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;
+
+       TelSmsData_t    readMsg = {0,};
+
+       GVariant *dbus_result = NULL;
+       const char *sca = NULL;
+       const char *tpdu = NULL;
+       gsize length;
+       guchar *decoded_sca = NULL;
+       guchar *decoded_tpdu = NULL;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data) {
+                       if (evt_cb_data->cb_fn) {
+                               evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+                       }
+
+                       free(evt_cb_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               return;
+       }
+
+       dbg("on_response_read_msg type_format(%s)", g_variant_get_type_string(dbus_result));
+
+//     readMsg.SimIndex = 0xFFFFFFFF;
+       g_variant_get (dbus_result, "(iiisis)", &result,
+                       &readMsg.SimIndex,
+                       &readMsg.MsgStatus,
+                       &sca,
+                       &readMsg.SmsData.MsgLength,
+                       &tpdu);
+
+       decoded_sca = g_base64_decode(sca, &length);
+       if (decoded_sca) {
+               memcpy(&(readMsg.SmsData.Sca[0]), decoded_sca, TAPI_SIM_SMSP_ADDRESS_LEN);
+               g_free(decoded_sca);
+       }
+
+       decoded_tpdu = g_base64_decode(tpdu, &length);
+       if (decoded_tpdu) {
+               memcpy(&(readMsg.SmsData.szData[0]), decoded_tpdu, TAPI_NETTEXT_SMDATA_SIZE_MAX + 1);
+               g_free(decoded_tpdu);
+       }
+
+       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);
+               }
+
+               free(evt_cb_data);
+       }
+}
+
+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 index = 0;
+
+       GVariant *dbus_result = NULL;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data) {
+                       if (evt_cb_data->cb_fn) {
+                               evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+                       }
+
+                       free(evt_cb_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               return;
+       }
+
+       dbg("on_response_write_msg type_format(%s)", g_variant_get_type_string(dbus_result));
+
+       g_variant_get (dbus_result, "(ii)", &result, &index);
+
+       if (evt_cb_data) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, result, &index, evt_cb_data->user_data);
+               }
+
+               free(evt_cb_data);
+       }
+}
+
+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 index = -1;
+
+       GVariant *dbus_result = NULL;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data) {
+                       if (evt_cb_data->cb_fn) {
+                               evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+                       }
+
+                       free(evt_cb_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               return;
+       }
+
+       dbg("on_response_delete_msg type_format(%s)", g_variant_get_type_string(dbus_result));
+
+       g_variant_get (dbus_result, "(ii)", &result, &index);
+
+       if (evt_cb_data) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, result, &index, evt_cb_data->user_data);
+               }
+
+               free(evt_cb_data);
+       }
+}
+
+static void on_response_get_msg_count(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;
+       TelSmsStoredMsgCountInfo_t storedMsgCnt = {0,};
+
+       GVariant *dbus_result = NULL;
+       const char *indexList = NULL;
+       gsize length;
+       guchar *decoded_indexList = NULL;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data) {
+                       if (evt_cb_data->cb_fn) {
+                               evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+                       }
+
+                       free(evt_cb_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               return;
+       }
+
+       dbg("on_response_get_msg_count type_format(%s)", g_variant_get_type_string(dbus_result));
+
+       g_variant_get (dbus_result, "(iiis)", &result,
+                                                               &storedMsgCnt.TotalCount,
+                                                               &storedMsgCnt.UsedCount,
+                                                               &indexList);
+
+       decoded_indexList = g_base64_decode(indexList, &length);
+       if (decoded_indexList) {
+               memcpy(&(storedMsgCnt.IndexList[0]), decoded_indexList, TAPI_NETTEXT_GSM_SMS_MSG_NUM_MAX);
+               g_free(decoded_indexList);
+       }
+
+       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);
+               }
+
+               free(evt_cb_data);
+       }
+
+}
+
+static void on_response_get_sca(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;
+       TelSmsAddressInfo_t scaInfo = {0,};
+
+       GVariant *dbus_result = NULL;
+       const char *sca = NULL;
+       gsize length;
+       guchar *decoded_sca = NULL;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data) {
+                       if (evt_cb_data->cb_fn) {
+                               evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+                       }
+
+                       free(evt_cb_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               return;
+       }
+
+       dbg("on_response_get_sca type_format(%s)", g_variant_get_type_string(dbus_result));
+
+       g_variant_get (dbus_result, "(iiiis)", &result,
+                                       &scaInfo.Ton,
+                                       &scaInfo.Npi,
+                                       &scaInfo.DialNumLen,
+                                       &sca);
+
+       decoded_sca = g_base64_decode(sca, &length);
+       if (decoded_sca) {
+               memcpy(&(scaInfo.szDiallingNum[0]), decoded_sca, TAPI_SIM_SMSP_ADDRESS_LEN + 1);
+               g_free(decoded_sca);
+       }
+
+       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);
+               }
+
+               free(evt_cb_data);
+       }
+}
+
+static void on_response_get_cb_config(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 i;
+       TelSmsCbConfig_t cbConfig = {0,};
+
+       GVariant *dbus_result = NULL;
+       GVariant *value = NULL;
+       GVariantIter *iter = NULL;
+       GVariantIter *iter_row = NULL;
+       const gchar *key = NULL;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data) {
+                       if (evt_cb_data->cb_fn) {
+                               evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+                       }
+
+                       free(evt_cb_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               return;
+       }
+
+       dbg("on_response_get_cb_config type_format(%s)", g_variant_get_type_string(dbus_result));
+
+       g_variant_get (dbus_result, "(iiiiiaa{sv})", &result,
+                                       &cbConfig.Net3gppType,
+                                       &cbConfig.CBEnabled,
+                                       &cbConfig.MsgIdMaxCount,
+                                       &cbConfig.MsgIdRangeCount,
+                                       &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, "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);
+
+       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);
+               }
+
+               free(evt_cb_data);
+       }
+}
+
+static void on_response_get_sms_params(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;
+       TelSmsParams_t paramInfo = {0,};
+
+       GVariant *dbus_result = NULL;
+       const char *alphaId = NULL;
+       const char *destDialNum = NULL;
+       const char *scaDialNum = NULL;
+       gsize length;
+       guchar *decoded_alphaId = NULL;
+       guchar *decoded_destDialNum = NULL;
+       guchar *decoded_scaDialNum = NULL;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data) {
+                       if (evt_cb_data->cb_fn) {
+                               evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+                       }
+
+                       free(evt_cb_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               return;
+       }
+
+       dbg("on_response_get_sms_params type_format(%s)", g_variant_get_type_string(dbus_result));
+
+       g_variant_get (dbus_result, "(iiiisiiiisiiisiii)", &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);
+
+       decoded_alphaId = g_base64_decode(alphaId, &length);
+       if (decoded_alphaId) {
+               memcpy(&(paramInfo.szAlphaId[0]), decoded_alphaId, TAPI_SIM_SMSP_ALPHA_ID_LEN_MAX + 1);
+               g_free(decoded_alphaId);
+       }
+
+       decoded_destDialNum = g_base64_decode(destDialNum, &length);
+       if (decoded_destDialNum) {
+               memcpy(&(paramInfo.TpDestAddr.szDiallingNum[0]), decoded_destDialNum, TAPI_SIM_SMSP_ADDRESS_LEN + 1);
+               g_free(decoded_destDialNum);
+       }
+
+       decoded_scaDialNum = g_base64_decode(scaDialNum, &length);
+       if (decoded_scaDialNum) {
+               memcpy(&(paramInfo.TpSvcCntrAddr.szDiallingNum[0]), decoded_scaDialNum, TAPI_SIM_SMSP_ADDRESS_LEN + 1);
+               g_free(decoded_scaDialNum);
+       }
+
+       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);
+               }
+
+               free(evt_cb_data);
+       }
+
+}
+
+static void on_response_get_sms_param_cnt(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 recordCount = 0;
+
+       GVariant *dbus_result = NULL;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data) {
+                       if (evt_cb_data->cb_fn) {
+                               evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+                       }
+
+                       free(evt_cb_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               return;
+       }
+
+       dbg("on_response_get_sms_param_cnt type_format(%s)", g_variant_get_type_string(dbus_result));
+
+       g_variant_get (dbus_result, "(ii)", &result,
+                       &recordCount);
+
+       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);
+               }
+
+               free(evt_cb_data);
+       }
+}
+
+/**
+ *
+ * This function enables the applications to send SMS to the network.
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]         pDataPackage - SMS-SUBMIT TPDU or SMS-COMMAND, and its length have to be passed in this structure.
+ *                             tapi_sms_more_to_send_t parameter denotes whether the sms is short or concatenated.
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer              tapi_sms_datapackage, tapi_sms_more_to_send_t.
+ */
+EXPORT_API int tel_send_sms(struct tapi_handle *handle,
+               const TelSmsDatapackageInfo_t *pDataPackage,
+               int bMoreMsgToSend,
+               tapi_response_cb callback, void* user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+       gchar *encoded_sca = NULL;
+       gchar *encoded_tpdu = NULL;
+
+       int emergency_mode = 0;
+
+       dbg("Func Entrance ");
+
+       TAPI_RET_ERR_NUM_IF_FAIL(pDataPackage ,TAPI_API_INVALID_PTR);
+#if 0
+       if (vconf_get_int("db/telephony/emergency", &emergency_mode) != 0) {
+               err("[FAIL]GET db/telephony/emergency");
+               return TAPI_API_OPERATION_FAILED;
+       }
+#endif
+
+       if (emergency_mode) {
+               dbg("emergency mode on");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       encoded_sca = g_base64_encode(&(pDataPackage->Sca[0]), TAPI_SIM_SMSP_ADDRESS_LEN);
+       if (encoded_sca == NULL) {
+               dbg("g_base64_encode: Failed to Enocde the SCA");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       encoded_tpdu = g_base64_encode(&(pDataPackage->szData[0]), TAPI_NETTEXT_SMDATA_SIZE_MAX + 1);
+       if (encoded_tpdu == NULL) {
+               dbg("g_base64_encode: Failed to Enocde the TPDU");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       param = g_variant_new("(sisi)", encoded_sca,
+                                                       pDataPackage->MsgLength,
+                                                       encoded_tpdu,
+                                                       bMoreMsgToSend);
+
+       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_sca);
+       g_free(encoded_tpdu);
+
+       return TAPI_API_SUCCESS;
+}
+
+
+/**
+ *
+ * This function enables the applications to read sms from the preferred storage.
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          index - the message to be read
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          Asynchronous.
+ * @remark             tapi_sms_selmem_set is to be called always to select the
+ *                             preferred memory before calling this api.
+ * @Refer
+ */
+EXPORT_API int tel_read_sms_in_sim(struct tapi_handle *handle, int index, tapi_response_cb callback, void* user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+
+       dbg("Func Entrance ");
+
+       if( (index < 0) || (index > TAPI_NETTEXT_MAX_INDEX) ) {
+               err("Invalid Input -Read SMS %d",index);
+
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_RET_ERR_NUM_IF_FAIL(callback ,TAPI_API_INVALID_PTR);
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(i)", index);
+
+       g_dbus_connection_call(handle->dbus_connection,
+               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
+               "ReadMsg", param, NULL,
+               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+               on_response_read_msg, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+
+/**
+ *
+ * This function enables the applications to write/save sms to the preferred storage.
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          index - the message to be saved, msg_status will denote the status
+ *                             of the message whether Sent, Unsent, Read, Unread, Unknown.
+ *                             pDataPackage- the SMS-SUBMIT PDU or SMS-DELIVER,SMS-STATUSREPORT
+ *                             being passed to be saved in memory.
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          Asynchronous.
+ * @Refer              tapi_sms_datapackage, tapi_sms_status_type.
+ */
+EXPORT_API int tel_write_sms_in_sim(struct tapi_handle *handle, const TelSmsData_t *pWriteData, tapi_response_cb callback, void* user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+       gchar *encoded_sca = NULL;
+       gchar *encoded_tpdu = NULL;
+
+       dbg("Func Entrance ");
+
+       TAPI_RET_ERR_NUM_IF_FAIL(pWriteData ,TAPI_API_INVALID_PTR);
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       encoded_sca = g_base64_encode(&(pWriteData->SmsData.Sca[0]), TAPI_SIM_SMSP_ADDRESS_LEN);
+       if (encoded_sca == NULL) {
+               dbg("g_base64_encode: Failed to Enocde the SCA");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       encoded_tpdu = g_base64_encode(&(pWriteData->SmsData.szData[0]), TAPI_NETTEXT_SMDATA_SIZE_MAX + 1);
+       if (encoded_tpdu == NULL) {
+               dbg("g_base64_encode: Failed to Enocde the TPDU");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       param = g_variant_new("(isis)", pWriteData->MsgStatus,
+                                                       encoded_sca,
+                                                       pWriteData->SmsData.MsgLength,
+                                                       encoded_tpdu);
+
+       g_dbus_connection_call(handle->dbus_connection,
+               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
+               "SaveMsg", param, NULL,
+               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+               on_response_write_msg, evt_cb_data);
+
+       g_free(encoded_sca);
+       g_free(encoded_tpdu);
+
+       return TAPI_API_SUCCESS;
+}
+
+
+/**
+ *
+ * This function enables the applications to delete sms to the preferred storage.
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          index - the message to be deleted. if index is -1, all sms in the sim are deleted.
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          Asynchronous.
+ * @remark             tapi_sms_selmem_set has to be called always before calling this API
+ * @Refer
+ */
+EXPORT_API int tel_delete_sms_in_sim(struct tapi_handle *handle, int index, tapi_response_cb callback, void* user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+
+       dbg("Func Entrance ");
+
+       if ((index < -1) || (index > TAPI_NETTEXT_MAX_INDEX)) {
+               err("Invalid Index Input");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(i)", 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, -1, handle->ca,
+               on_response_delete_msg, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+
+/**
+ *
+ * This function enables the applications to get the count of the messages stored in the memory
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]  None
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *              Its value can be any value from 0 to 255 if the API is returned successfully
+ *                 -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface  Asynchronous
+ * @remark             The requested memory details come in response API
+ * @Refer          None
+ */
+EXPORT_API int tel_get_sms_count(struct tapi_handle *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(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_SMS_INTERFACE,
+               "GetMsgCount", NULL, NULL,
+               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+               on_response_get_msg_count, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+
+/**
+ *
+ * This function enables the applications to get the service center address from the SIM storage
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          pSCA - the service center address that is to be set in the SIM storage
+ *                                         refer to 3GPP TS 23.040:9.1.2.5 Address fields
+ *                             index - the index that is to be set in the SIM storage
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer             tapi_sms_sms_addr_info
+ */
+EXPORT_API int tel_get_sms_sca(struct tapi_handle *handle, int index, tapi_response_cb callback, void* user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+
+       dbg("Func Entrance ");
+
+       TAPI_RET_ERR_NUM_IF_FAIL(callback ,TAPI_API_INVALID_PTR);
+
+       if ((index < 0) || (index > TAPI_NETTEXT_MAX_INDEX)) {
+               err("Invalid Index Input");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(i)", index);
+
+       g_dbus_connection_call(handle->dbus_connection,
+               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
+               "GetSca", param, NULL,
+               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+               on_response_get_sca, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+
+/**
+ *
+ * This function enables the applications to set the service center address in the SIM storage
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          pSCA - the service center address that is to be set in the SIM storage
+ *                                         refer to 3GPP TS 23.040:9.1.2.5 Address fields
+ *                             index - the index that is to be set in the SIM storage
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          ASynchronous.
+ * @remark
+ * @Refer             tapi_sms_sms_addr_info
+ */
+EXPORT_API int tel_set_sms_sca(struct tapi_handle *handle, const TelSmsAddressInfo_t *pSCA, int index, tapi_response_cb callback, void* user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+       gchar *encoded_sca = NULL;
+
+       dbg("Func Entrance ");
+
+       TAPI_RET_ERR_NUM_IF_FAIL(pSCA ,TAPI_API_INVALID_PTR);
+
+       if ((index < 0) || (index > TAPI_NETTEXT_MAX_INDEX)) {
+               err("Invalid Index Input");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       encoded_sca = g_base64_encode(&(pSCA->szDiallingNum[0]), TAPI_SIM_SMSP_ADDRESS_LEN);
+       if (encoded_sca == NULL) {
+               dbg("g_base64_encode: Failed to Enocde the SCA");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       param = g_variant_new("(iiiis)", index,
+                                                       pSCA->Ton,
+                                                       pSCA->Npi,
+                                                       pSCA->DialNumLen,
+                                                       encoded_sca);
+
+       g_dbus_connection_call(handle->dbus_connection,
+               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
+               "SetSca", param, NULL,
+               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+               on_response_default, evt_cb_data);
+
+       g_free(encoded_sca);
+
+
+       return TAPI_API_SUCCESS;
+}
+
+
+/**
+ *
+ * This function enables the applications to set the configuration for cell broadcast messages
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          None
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer             None
+ */
+EXPORT_API int tel_get_sms_cb_config(struct tapi_handle *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(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_SMS_INTERFACE,
+               "GetCbConfig", NULL, NULL,
+               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+               on_response_get_cb_config, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+/**
+ *
+ * This function enables the applications to set the configuration for cell broadcast messages
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          tapi_sms_cb_config the configuration details to be set
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer             tapi_sms_cb_config
+ */
+EXPORT_API int tel_set_sms_cb_config(struct tapi_handle *handle, const TelSmsCbConfig_t *pCBConfig, tapi_response_cb callback, void* user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+       gchar *encoded_cbConfig = NULL;
+
+       dbg("Func Entrance ");
+
+       TAPI_RET_ERR_NUM_IF_FAIL(pCBConfig ,TAPI_API_INVALID_PTR);
+
+       if ((pCBConfig->Net3gppType > 2) || (pCBConfig->MsgIdRangeCount < 0)) {
+               err("Invalid Input -3gppType(%d)",pCBConfig->Net3gppType);
+               err("Invalid Input -MsgIdRangeCount(%d)",pCBConfig->MsgIdRangeCount);
+
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       encoded_cbConfig = g_base64_encode((const guchar *)&(pCBConfig->MsgIDs[0]), TAPI_NETTEXT_GSM_SMS_CBMI_LIST_SIZE_MAX*5);
+       if (encoded_cbConfig == NULL) {
+               dbg("g_base64_encode: Failed to Enocde the CB Config");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       param = g_variant_new("(iiiis)", pCBConfig->Net3gppType,
+                                                       pCBConfig->CBEnabled,
+                                                       pCBConfig->MsgIdMaxCount,
+                                                       pCBConfig->MsgIdRangeCount,
+                                                       encoded_cbConfig);
+
+       g_dbus_connection_call(handle->dbus_connection,
+               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
+               "SetCbConfig", param, NULL,
+               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+               on_response_default, evt_cb_data);
+
+       g_free(encoded_cbConfig);
+
+       return TAPI_API_SUCCESS;
+}
+
+/**
+ *
+ * This function enables the applications to set the phone memory status whether full or available
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          memory_status whether full or available
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer             tapi_sms_memstatus_type
+ */
+EXPORT_API int tel_set_sms_memory_status(struct tapi_handle *handle, int memoryStatus, tapi_response_cb callback, void* user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+
+       dbg("Func Entrance ");
+
+       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;
+       }
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(i)", memoryStatus);
+
+       g_dbus_connection_call(handle->dbus_connection,
+               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
+               "SetMemStatus", param, NULL,
+               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+               on_response_default, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+/**
+ *
+ * This function is used to get SMS preferred bearer on which SMS has to be transmitted. This is a synchronous function
+ *
+ * @return             TRUE in case of success and FALSE in case of error .
+ * @param[in]        None
+ *
+ * @param[out] requestId-Unique identifier for a particular request
+ *                          Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer
+ */
+EXPORT_API int tel_get_sms_preferred_bearer(struct tapi_handle *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(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_SMS_INTERFACE,
+               "GetPrefBearer", NULL, NULL,
+               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+               on_response_default, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+/**
+ *
+ * This function enables the applications to set the preferred bearer
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          service option ie the bearer type to be set
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer             tapi_sms_bearer_type
+ */
+EXPORT_API int tel_set_sms_preferred_bearer(struct tapi_handle *handle, TelSmsBearerType_t BearerType, tapi_response_cb callback, void* user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+
+       dbg("Func Entrance ");
+
+       if ((TAPI_NETTEXT_BEARER_PS_ONLY > BearerType) || (TAPI_NETTEXT_NO_PREFERRED_BEARER < BearerType)) {
+               err("Invalid Input -PrefBearer Set Nettext");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(i)", BearerType);
+
+       g_dbus_connection_call(handle->dbus_connection,
+               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
+               "SetPrefBearer", param, NULL,
+               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+               on_response_default, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+/**
+ *
+ * This function enables the applications to set the deliver report for an incoming message(MT).
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]         pDataPackage - SMS-DELIVER-REPORT, and its length have to be passed in this structure.
+ * @param[in]          RPCause - the result cause
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          Synchronous.
+ * @remark
+ * @Refer             tapi_sms_deliver_report
+ */
+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)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+       gchar *encoded_sca = NULL;
+       gchar *encoded_tpdu = NULL;
+
+       dbg("Func Entrance ");
+
+       TAPI_RET_ERR_NUM_IF_FAIL(pDataPackage ,TAPI_API_INVALID_PTR);
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       encoded_sca = g_base64_encode(&(pDataPackage->Sca[0]), TAPI_SIM_SMSP_ADDRESS_LEN);
+       if (encoded_sca == NULL) {
+               dbg("g_base64_encode: Failed to Enocde the SCA");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       encoded_tpdu = g_base64_encode(&(pDataPackage->szData[0]), TAPI_NETTEXT_SMDATA_SIZE_MAX + 1);
+       if (encoded_tpdu == NULL) {
+               dbg("g_base64_encode: Failed to Enocde the TPDU");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       param = g_variant_new("(sisi)", encoded_sca,
+                                                       pDataPackage->MsgLength,
+                                                       encoded_tpdu,
+                                                       RPCause);
+
+       g_dbus_connection_call(handle->dbus_connection,
+               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
+               "SetDeliveryReport", param, NULL,
+               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+               on_response_default, evt_cb_data);
+
+       g_free(encoded_sca);
+       g_free(encoded_tpdu);
+
+       return TAPI_API_SUCCESS;
+}
+
+/**
+ *
+ * This function enables the application to set the status of a message
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          index - the message to be changed
+ *                             msgStatus -SMS message status
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer             tapi_sms_memory_type,tapi_sms_status_type
+ */
+EXPORT_API int tel_set_sms_message_status(struct tapi_handle *handle, int index, TelSmsMsgStatus_t msgStatus, tapi_response_cb callback, void* user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+
+       dbg("Func Entrance ");
+
+       if ((index < 0) || (index > TAPI_NETTEXT_MAX_INDEX) ||
+               (msgStatus > TAPI_NETTEXT_STATUS_RESERVED)) {
+               err("Invalid Input -MsgStatus Set Nettext");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(ii)", index, msgStatus);
+
+       g_dbus_connection_call(handle->dbus_connection,
+               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
+               "SetMsgStatus", param, NULL,
+               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+               on_response_default, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+/**
+ *
+ * This function enables to application to get the sms parameters
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          record index of the record in which the sms parameters are stored in the EFsmsp file
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          ASynchronous.
+ * @remark             Requested details come in response API
+ * @Refer
+ */
+EXPORT_API int tel_get_sms_parameters(struct tapi_handle *handle, int index, tapi_response_cb callback, void* user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+
+       dbg("Func Entrance ");
+
+       TAPI_RET_ERR_NUM_IF_FAIL(callback ,TAPI_API_INVALID_PTR);
+
+       if ((index < 0) || (index > TAPI_NETTEXT_MAX_INDEX)) {
+               err("Invalid Input -SMS Param Get Nettext");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(i)", index);
+
+       g_dbus_connection_call(handle->dbus_connection,
+               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
+               "GetSmsParams", param, NULL,
+               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+               on_response_get_sms_params, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+/**
+ *
+ * This function enables to application to get the sms parameters
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          tapi_smsp_set_param_t sms parameters to be set in the EFsmsp file
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          ASynchronous.
+ * @remark
+ * @Refer             tapi_smsp_set_param_t
+ */
+EXPORT_API int tel_set_sms_parameters(struct tapi_handle *handle, const TelSmsParams_t *pSmsSetParameters, tapi_response_cb callback, void* user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+       gchar *encoded_alphaId = NULL;
+       gchar *encoded_destDialNum = NULL;
+       gchar *encoded_scaDialNum = NULL;
+
+       dbg("Func Entrance ");
+
+       TAPI_RET_ERR_NUM_IF_FAIL(pSmsSetParameters ,TAPI_API_INVALID_PTR);
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       encoded_alphaId = g_base64_encode((guchar *)&(pSmsSetParameters->szAlphaId[0]), TAPI_SIM_SMSP_ALPHA_ID_LEN_MAX + 1);
+       if (encoded_alphaId == NULL) {
+               dbg("g_base64_encode: Failed to Enocde the AlphaId");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       encoded_destDialNum = g_base64_encode(&(pSmsSetParameters->TpDestAddr.szDiallingNum[0]), TAPI_SIM_SMSP_ADDRESS_LEN + 1);
+       if (encoded_destDialNum == NULL) {
+               dbg("g_base64_encode: Failed to Enocde the DestAddr.DiallingNum");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       encoded_scaDialNum = g_base64_encode(&(pSmsSetParameters->TpSvcCntrAddr.szDiallingNum[0]), TAPI_SIM_SMSP_ADDRESS_LEN + 1);
+       if (encoded_scaDialNum == NULL) {
+               dbg("g_base64_encode: Failed to Enocde the ScaAddr.DiallingNum");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       param = g_variant_new("(iiisiiiisiiisiii)", pSmsSetParameters->RecordIndex,
+                                                                       pSmsSetParameters->RecordLen,
+                                                                       pSmsSetParameters->AlphaIdLen,
+                                                                       encoded_alphaId,
+                                                                       pSmsSetParameters->ParamIndicator,
+                                                                       pSmsSetParameters->TpDestAddr.DialNumLen,
+                                                                       pSmsSetParameters->TpDestAddr.Ton,
+                                                                       pSmsSetParameters->TpDestAddr.Npi,
+                                                                       encoded_destDialNum,
+                                                                       pSmsSetParameters->TpSvcCntrAddr.DialNumLen,
+                                                                       pSmsSetParameters->TpSvcCntrAddr.Ton,
+                                                                       pSmsSetParameters->TpSvcCntrAddr.Npi,
+                                                                       encoded_scaDialNum,
+                                                                       pSmsSetParameters->TpProtocolId,
+                                                                       pSmsSetParameters->TpDataCodingScheme,
+                                                                       pSmsSetParameters->TpValidityPeriod);
+
+       g_dbus_connection_call(handle->dbus_connection,
+               DBUS_TELEPHONY_SERVICE , handle->path, DBUS_TELEPHONY_SMS_INTERFACE,
+               "SetSmsParams", param, NULL,
+               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+               on_response_default, evt_cb_data);
+
+       g_free(encoded_alphaId);
+       g_free(encoded_destDialNum);
+       g_free(encoded_scaDialNum);
+
+       return TAPI_API_SUCCESS;
+}
+
+/**
+ *
+ * This function enables to application to get the sms parameter count from the EFsmsp file.
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          None
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          ASynchronous.
+ * @remark             Requested details come in response API
+ * @Refer
+ */
+EXPORT_API int tel_get_sms_parameter_count(struct tapi_handle *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(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_SMS_INTERFACE,
+               "GetSmsParamCnt", NULL, NULL,
+               G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+               on_response_get_sms_param_cnt, evt_cb_data);
+
+       return TAPI_API_SUCCESS;
+}
+
+#if 0
+/**
+ *
+ *  This API is used to send an SMS message to the network. This API allows keeping
+ *  the dedicated link at lower layers by passing information as more messages to send in parameters.
+ * This will enable not to release if a dedicated connection is used for transmission.
+ *
+ * @return             TRUE in case of success and FALSE in case of error .
+ * @param[in]          TelSmsMsgInfo_t - SMS_SUBMIT/ACK/CANCEL and its length have to be passed in this structure.
+ *
+ *                             unsigned int MoreMsgToSend will be set to TRUE when there are more than one message to be
+ *                         send or Multiple segmented concatenated message to be send, otherwise FALSE. This flag
+ *                         indicates OEM that more messages to send.
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ *
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer              TelSmsMsgInfo_t.
+ */
+EXPORT_API int tel_send_sms_msg(struct tapi_handle *handle, const TelSmsMsgInfo_t *pSmsMsgInfo, unsigned int MoreMsgToSend, tapi_response_cb callback, void* user_data)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+
+       dbg("Func Entrance ");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+       int emergency_mode = 0;
+
+       if (vconf_get_int("db/telephony/emergency", &emergency_mode) != 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "[FAIL]GET db/telephony/emergency");
+               return TAPI_API_OPERATION_FAILED;
+       }
+       if (emergency_mode) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "emergency mode on");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_RET_ERR_NUM_IF_FAIL(pSmsMsgInfo ,TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, pSmsMsgInfo, sizeof(TelSmsMsgInfo_t));
+       g_array_append_vals(in_param2, &MoreMsgToSend, sizeof(unsigned int));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETTEXT, TAPI_CS_NETTEXT_SEND_EX, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+#endif
+
+/**
+ *
+ * This function enables the applications to check the device status
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          None
+ *
+ *
+ * @param[out] Device status whether Ready or Not Ready
+ * @Interface          Synchronous.
+ * @remark
+ * @Refer
+ */
+EXPORT_API int tel_check_sms_device_status(struct tapi_handle *handle, int *pReadyStatus)
+{
+       GError *error;
+       GVariant *smsReady = NULL;
+
+       dbg("Func Entrance ");
+
+       TAPI_RET_ERR_NUM_IF_FAIL(handle, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(pReadyStatus, TAPI_API_INVALID_PTR);
+
+       memset(pReadyStatus, 0, sizeof(int));
+
+       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, -1, NULL, &error);
+
+       if(!smsReady){
+               dbg( "error to get SMS ready_status(%s)", error->message);
+               g_error_free (error);
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       dbg("get SMS ready_status type_format(%s)", g_variant_get_type_string(smsReady));
+
+       g_variant_get(smsReady, "(b)", pReadyStatus);
+
+       dbg("************SMS_device_status (%d)", *pReadyStatus);
+
+       return TAPI_API_SUCCESS;
+}
+
+#if 0
+/**
+ *
+ * This function enables to application to set that the device is ready to recieve messages from network.
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          None
+ *
+ * @param[out] None
+ * @Interface          Synchronous.
+ * @remark
+ * @Refer
+ */
+EXPORT_API int tel_set_sms_device_status(struct tapi_handle *handle)
+{
+       struct tapi_resp_data *evt_cb_data = NULL;
+       GVariant *param;
+
+       dbg("Func Entrance ");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_NETTEXT, TAPI_CS_NETTEXT_DEVICEREADY,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       return api_err;
+}
+#endif
+//eof
diff --git a/src/tapi_ss.c b/src/tapi_ss.c
new file mode 100644 (file)
index 0000000..3e9d174
--- /dev/null
@@ -0,0 +1,676 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 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 <string.h>
+#include <stdlib.h>
+
+#include "tapi_common.h"
+#include "TapiUtility.h"
+#include "TelSs.h"
+
+#include "common.h"
+#include "tapi_log.h"
+#include "ITapiSs.h"
+
+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;
+
+       GVariant *dbus_result = 0, *value = 0;
+       GVariantIter *iter = 0;
+       GVariantIter *iter_row = 0;
+       const gchar *key = 0;
+
+       memset(&resp, '\0', sizeof(TelSsBarringResp_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get (dbus_result, "(aa{sv}i)", &iter, &result);
+
+       resp.record_num = g_variant_iter_n_children(iter);
+
+       while ( g_variant_iter_next(iter, "a{sv}", &iter_row ) ) {
+               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);
+                       }
+
+                       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);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &resp, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_change_ss_barring_password(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;
+
+       GVariant *dbus_result = 0;
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       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);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_get_ss_forward_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;
+       TelSsForwardResp_t resp;
+
+       GVariant *dbus_result = 0, *value = 0;
+       GVariantIter *iter = 0;
+       GVariantIter *iter_row = 0;
+       const gchar *key = 0;
+
+
+       memset(&resp, '\0', sizeof(TelSsForwardResp_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get (dbus_result, "(aa{sv}i)", &iter, &result);
+
+       resp.record_num = g_variant_iter_n_children(iter);
+
+       while ( g_variant_iter_next(iter, "a{sv}", &iter_row ) ) {
+               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);
+                       }
+
+                       if ( !g_strcmp0(key, "forwarding_mode") ) {
+                               resp.record[i].ForwardCondition = g_variant_get_int32(value);
+                       }
+
+                       if ( !g_strcmp0(key, "no_reply_time") ) {
+                               resp.record[i].NoReplyWaitTime = g_variant_get_int32(value);
+                       }
+
+                       if ( !g_strcmp0(key, "number_present") ) {
+                               resp.record[i].bCallForwardingNumberPresent = 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);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_get_ss_waiting_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;
+       TelSsWaitingResp_t resp;
+
+       GVariant *dbus_result = 0, *value = 0;
+       GVariantIter *iter = 0;
+       GVariantIter *iter_row = 0;
+       const gchar *key = 0;
+
+
+       memset(&resp, '\0', sizeof(TelSsWaitingResp_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get (dbus_result, "(aa{sv}i)", &iter, &result);
+
+       resp.record_num = g_variant_iter_n_children(iter);
+
+       while ( g_variant_iter_next(iter, "a{sv}", &iter_row ) ) {
+               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);
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &resp, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+
+static void on_response_get_ss_cli_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;
+       TelSsCliResp_t resp;
+
+       GVariant *dbus_result = 0;
+
+       memset(&resp, '\0', sizeof(TelSsCliResp_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get (dbus_result, "(iii)",  &result, &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);
+       }
+
+       free(evt_cb_data);
+}
+
+static void on_response_send_ss_ussd_request(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;
+       char *tmp_str = 0;
+       TelSsUssdResp_t resp;
+
+       GVariant *dbus_result = 0;
+
+       memset(&resp, '\0', sizeof(TelSsUssdResp_t));
+
+       conn = G_DBUS_CONNECTION (source_object);
+       dbus_result = g_dbus_connection_call_finish(conn, res, &error);
+       CHECK_DEINIT(error);
+
+       if (!dbus_result) {
+               if (evt_cb_data->cb_fn) {
+                       evt_cb_data->cb_fn(evt_cb_data->handle, -1, NULL, evt_cb_data->user_data);
+               }
+
+               if (error)
+                       g_error_free(error);
+
+               free(evt_cb_data);
+               return;
+       }
+
+       g_variant_get (dbus_result, "(iiiis)",  &result, &resp.Type, &resp.Status, &resp.Length, &tmp_str);
+
+       if (!result) {
+               memcpy( resp.szString, tmp_str, resp.Length );
+               g_free(tmp_str);
+       }
+
+       if (evt_cb_data->cb_fn) {
+               evt_cb_data->cb_fn(evt_cb_data->handle, result, &resp, evt_cb_data->user_data);
+       }
+
+       free(evt_cb_data);
+}
+
+EXPORT_API int tel_set_ss_barring(TapiHandle *handle, TelSsBarringInfo_t *info, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+       gchar *method = 0;
+
+       dbg("Func Entrance ");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(iis)", info->Class, info->Type, info->szPassword);
+
+       if ( info->Mode == TAPI_SS_CB_MODE_ACTIVATE ) {
+               dbg("[ check ] barring activate");
+               method = "ActivateBarring";
+
+       } else {
+               dbg("[ check ] barring deactivate");
+               method = "DeactivateBarring";
+
+       }
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
+                       method, param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_get_ss_barring_status, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_ss_barring_status(TapiHandle *handle, TelSsClass_t class, TelSsBarringType_t type, tapi_response_cb callback, void *user_data)
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       dbg("Func Entrance ");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(ii)", class, type);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
+                       "GetBarringStatus", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_get_ss_barring_status, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+/**********************************************************************************************
+ *
+ * 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)
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       dbg("Func Entrance ");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(sss)", old_password, new_password, new_password_again);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
+                       "ChangeBarringPassword", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_change_ss_barring_password, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+/**********************************************************************************************
+ *
+ * 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;
+       gchar *method = 0;
+
+       dbg("Func Entrance ");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(iiis)", info->Class, info->Condition, info->NoReplyConditionTimer, info->szPhoneNumber);
+
+       switch ( info->Mode ) {
+               case TAPI_SS_CF_MODE_DISABLE_EV: {
+                       dbg("[ check ] forwarding deactivate");
+                       method = "DeactivateForwarding";
+               } break;
+
+               case TAPI_SS_CF_MODE_ENABLE_EV: {
+                       dbg("[ check ] forwarding activate");
+                       method = "ActivateForwarding";
+               } break;
+
+               case TAPI_SS_CF_MODE_REGISTRATION_EV: {
+                       dbg("[ check ] forwarding registration");
+                       method = "RegisterForwarding";
+               } break;
+
+               case TAPI_SS_CF_MODE_ERASURE_EV: {
+                       dbg("[ check ] forwarding deregistration");
+                       method = "DeregisterForwarding";
+               } break;
+
+               default:
+                       dbg("[ error ] invalid input : (0x%x)", info->Mode);
+                       return TAPI_API_INVALID_INPUT;
+       }
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
+                       method, param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_get_ss_forward_status, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+/**********************************************************************************************
+ *
+ * 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)
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       dbg("Func Entrance ");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(ii)", class, condition);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
+                       "GetForwardingStatus", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_get_ss_forward_status, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+/**********************************************************************************************
+ *
+ * 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)
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+       gchar *method = 0;
+
+       dbg("Func Entrance ");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(i)", info->Class);
+
+       if ( info->Mode == TAPI_SS_CW_MODE_ACTIVATE ) {
+               dbg("[ check ] waiting activate");
+               method = "ActivateWaiting";
+
+       } else {
+               dbg("[ check ] waiting deactivate");
+               method = "DeactivateWaiting";
+
+       }
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
+                       method, param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_get_ss_waiting_status, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+/**********************************************************************************************
+ *
+ * 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
+ *
+ ***********************************************************************************************/
+
+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;
+
+       dbg("Func Entrance ");
+
+       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, -1, handle->ca,
+                       on_response_get_ss_waiting_status, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+/**********************************************************************************************
+ *
+ * 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)
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       dbg("Func Entrance ");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(i)", type);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
+                       "GetCLIStatus", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_get_ss_cli_status, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+/**********************************************************************************************
+ *
+ * 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)
+{
+       struct tapi_resp_data *evt_cb_data = 0;
+       GVariant *param = 0;
+
+       dbg("Func Entrance ");
+
+       MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
+
+       param = g_variant_new("(iis)", info->Type, info->Length, info->szString);
+
+       g_dbus_connection_call(handle->dbus_connection,
+                       DBUS_TELEPHONY_SERVICE, handle->path, DBUS_TELEPHONY_SS_INTERFACE,
+                       "SendUSSD", param, 0,
+                       G_DBUS_CALL_FLAGS_NONE, -1, handle->ca,
+                       on_response_send_ss_ussd_request, evt_cb_data );
+
+       return TAPI_API_SUCCESS;
+}
+
+/**********************************************************************************************
+ *
+ * This function is used to Sets AOC information.
+ *
+ * @param      AocType[IN] of type TelSsAocType_t which specifies the which AOC type to read.
+ * @return     enum type TapiResult_t Specifies the API's Return result.
+ * @remark
+ *
+ ***********************************************************************************************/
+EXPORT_API int tel_get_ss_aoc_info(TapiHandle *handle, TelSsAocType_t AocType, tapi_response_cb callback, void *user_data)
+{
+       return 0;
+}
+
+/**********************************************************************************************
+ *
+ * This function is used to Sets AOC information.
+ *
+ * @param      AocSetInfo[IN] of type TelCallAocInfo_t which specifies the AOC info parameters .
+ * @return     enum type TapiResult_t Specifies the API's Return result.
+ * @remark
+ *
+ ***********************************************************************************************/
+EXPORT_API int tel_set_ss_aoc_info(TapiHandle *handle, TelCallAocInfo_t *AocSetInfo, tapi_response_cb callback, void *user_data)
+{
+       return 0;
+}
+
+/*     EOF  */
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